refactor(constants): introduce constants.js and wire timing/selector constants into framework transitions and navigation
This commit is contained in:
27
public/scripts/constants.js
Normal file
27
public/scripts/constants.js
Normal file
@@ -0,0 +1,27 @@
|
||||
(function(){
|
||||
const TIMING = {
|
||||
NAV_COOLDOWN_MS: 300,
|
||||
VIEW_FADE_OUT_MS: 150,
|
||||
VIEW_FADE_IN_MS: 200,
|
||||
VIEW_FADE_DELAY_MS: 50,
|
||||
AUTO_REFRESH_MS: 30000,
|
||||
PRIMARY_NODE_REFRESH_MS: 10000,
|
||||
LOAD_GUARD_MS: 10000
|
||||
};
|
||||
|
||||
const SELECTORS = {
|
||||
NAV_TAB: '.nav-tab',
|
||||
VIEW_CONTENT: '.view-content',
|
||||
CLUSTER_STATUS: '.cluster-status'
|
||||
};
|
||||
|
||||
const CLASSES = {
|
||||
CLUSTER_STATUS_ONLINE: 'cluster-status-online',
|
||||
CLUSTER_STATUS_OFFLINE: 'cluster-status-offline',
|
||||
CLUSTER_STATUS_CONNECTING: 'cluster-status-connecting',
|
||||
CLUSTER_STATUS_ERROR: 'cluster-status-error',
|
||||
CLUSTER_STATUS_DISCOVERING: 'cluster-status-discovering'
|
||||
};
|
||||
|
||||
window.CONSTANTS = window.CONSTANTS || { TIMING, SELECTORS, CLASSES };
|
||||
})();
|
||||
Reference in New Issue
Block a user