summaryrefslogtreecommitdiffstats
path: root/static/enums.js
blob: e494e87e6c86e7188da2de00aff071e5ca84a17d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* jshint esversion: 2024, module: true */

/**
 * Application state enumerations
 * @module Enums
 */

// Editor modes
const EditorMode = {
    RAW: Symbol("raw"),
    STRUCTURED: Symbol("structured")
};
Object.freeze(EditorMode);

// Panel types
const PanelType = {
    STATUS: Symbol("status"),
    CONFIGS: Symbol("configs"),
    LOGS: Symbol("logs"),
    COMMANDS: Symbol("commands")
};
Object.freeze(PanelType);

// Interface states
const InterfaceState = {
    UP: Symbol("up"),
    DOWN: Symbol("down"),
    UNKNOWN: Symbol("unknown")
};
Object.freeze(InterfaceState);

// Theme modes
const ThemeMode = {
    LIGHT: Symbol("light"),
    DARK: Symbol("dark")
};
Object.freeze(ThemeMode);

// Validation states
const ValidationState = {
    PENDING: Symbol("pending"),
    SUCCESS: Symbol("success"),
    ERROR: Symbol("error")
};
Object.freeze(ValidationState);

// API endpoints
const ApiEndpoints = {
    STATUS: '/api/status',
    CONFIGS: '/api/configs',
    CONFIG: '/api/config',
    VALIDATE: '/api/validate',
    SAVE: '/api/save',
    LOGS: '/api/logs',
    RELOAD: '/api/reload',
    REBOOT: '/api/reboot'
};
Object.freeze(ApiEndpoints);

export {
    EditorMode,
    PanelType,
    InterfaceState,
    ThemeMode,
    ValidationState,
    ApiEndpoints
};