Move filemanager/ to frontend/
This commit is contained in:
104
frontend/src/constants.js
Normal file
104
frontend/src/constants.js
Normal file
@@ -0,0 +1,104 @@
|
||||
|
||||
// keep in sync with box/src/apps.js
|
||||
const ISTATES = {
|
||||
PENDING_INSTALL: 'pending_install',
|
||||
PENDING_CLONE: 'pending_clone',
|
||||
PENDING_CONFIGURE: 'pending_configure',
|
||||
PENDING_UNINSTALL: 'pending_uninstall',
|
||||
PENDING_RESTORE: 'pending_restore',
|
||||
PENDING_IMPORT: 'pending_import',
|
||||
PENDING_UPDATE: 'pending_update',
|
||||
PENDING_BACKUP: 'pending_backup',
|
||||
PENDING_RECREATE_CONTAINER: 'pending_recreate_container', // env change or addon change
|
||||
PENDING_LOCATION_CHANGE: 'pending_location_change',
|
||||
PENDING_DATA_DIR_MIGRATION: 'pending_data_dir_migration',
|
||||
PENDING_RESIZE: 'pending_resize',
|
||||
PENDING_DEBUG: 'pending_debug',
|
||||
PENDING_START: 'pending_start',
|
||||
PENDING_STOP: 'pending_stop',
|
||||
PENDING_RESTART: 'pending_restart',
|
||||
ERROR: 'error',
|
||||
INSTALLED: 'installed'
|
||||
};
|
||||
|
||||
const HSTATES = {
|
||||
HEALTHY: 'healthy',
|
||||
UNHEALTHY: 'unhealthy',
|
||||
ERROR: 'error',
|
||||
DEAD: 'dead'
|
||||
};
|
||||
|
||||
const RSTATES ={
|
||||
RUNNING: 'running',
|
||||
STOPPED: 'stopped'
|
||||
};
|
||||
|
||||
const ERROR = {
|
||||
ACCESS_DENIED: 'Access Denied',
|
||||
ALREADY_EXISTS: 'Already Exists',
|
||||
BAD_FIELD: 'Bad Field',
|
||||
COLLECTD_ERROR: 'Collectd Error',
|
||||
CONFLICT: 'Conflict',
|
||||
DATABASE_ERROR: 'Database Error',
|
||||
DNS_ERROR: 'DNS Error',
|
||||
DOCKER_ERROR: 'Docker Error',
|
||||
EXTERNAL_ERROR: 'External Error',
|
||||
FS_ERROR: 'FileSystem Error',
|
||||
INTERNAL_ERROR: 'Internal Error',
|
||||
LOGROTATE_ERROR: 'Logrotate Error',
|
||||
NETWORK_ERROR: 'Network Error',
|
||||
NOT_FOUND: 'Not found',
|
||||
REVERSEPROXY_ERROR: 'ReverseProxy Error',
|
||||
TASK_ERROR: 'Task Error',
|
||||
UNKNOWN_ERROR: 'Unknown Error' // only used for portin,
|
||||
};
|
||||
|
||||
const ROLES = {
|
||||
OWNER: 'owner',
|
||||
ADMIN: 'admin',
|
||||
MAIL_MANAGER: 'mailmanager',
|
||||
USER_MANAGER: 'usermanager',
|
||||
USER: 'user'
|
||||
};
|
||||
|
||||
// sync up with tasks.js
|
||||
const TASK_TYPES = {
|
||||
TASK_APP: 'app',
|
||||
TASK_BACKUP: 'backup',
|
||||
TASK_UPDATE: 'update',
|
||||
TASK_CHECK_CERTS: 'checkCerts',
|
||||
TASK_SETUP_DNS_AND_CERT: 'setupDnsAndCert',
|
||||
TASK_CLEAN_BACKUPS: 'cleanBackups',
|
||||
TASK_SYNC_EXTERNAL_LDAP: 'syncExternalLdap',
|
||||
TASK_CHANGE_MAIL_LOCATION: 'changeMailLocation',
|
||||
TASK_SYNC_DNS_RECORDS: 'syncDnsRecords',
|
||||
TASK_UPDATE_DISK_USAGE: 'updateDiskUsage',
|
||||
};
|
||||
|
||||
const APP_TYPES = {
|
||||
APP: 'app', //default
|
||||
LINK: 'link',
|
||||
PROXIED: 'proxied'
|
||||
};
|
||||
|
||||
// named exports
|
||||
export {
|
||||
APP_TYPES,
|
||||
ERROR,
|
||||
HSTATES,
|
||||
ISTATES,
|
||||
RSTATES,
|
||||
ROLES,
|
||||
TASK_TYPES
|
||||
};
|
||||
|
||||
// default export
|
||||
export default {
|
||||
APP_TYPES,
|
||||
ERROR,
|
||||
HSTATES,
|
||||
ISTATES,
|
||||
RSTATES,
|
||||
ROLES,
|
||||
TASK_TYPES
|
||||
};
|
||||
Reference in New Issue
Block a user