diff options
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 +}; |
