diff options
| author | Petri Hienonen <petri.hienonen@gmail.com> | 2025-09-28 15:08:14 +0300 |
|---|---|---|
| committer | Petri Hienonen <petri.hienonen@gmail.com> | 2025-09-28 15:08:14 +0300 |
| commit | 8489f1f83da5dcc5818401393b1f6a430eea677c (patch) | |
| tree | d55c205a0b45127765c1547fef5904d08e1171a4 /static/enums.js | |
| parent | 289e73570674b67f7a1561cff9cec61498efc6cc (diff) | |
| download | network-8489f1f83da5dcc5818401393b1f6a430eea677c.tar.zst | |
Intial version
Diffstat (limited to 'static/enums.js')
| -rw-r--r-- | static/enums.js | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/static/enums.js b/static/enums.js new file mode 100644 index 0000000..e494e87 --- /dev/null +++ b/static/enums.js @@ -0,0 +1,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 +}; |
