define([
'jquery',
'/api/config',
'/bower_components/chainpad-crypto/crypto.js',
'/common/toolbar.js',
'/bower_components/nthen/index.js',
'/common/sframe-common.js',
'/common/hyperscript.js',
'/customize/messages.js',
'/common/common-interface.js',
'/common/common-util.js',
'/common/common-hash.js',
'/common/common-signing-keys.js',
'/support/ui.js',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'less!/admin/app-admin.less',
], function (
$,
ApiConfig,
Crypto,
Toolbar,
nThen,
SFCommon,
h,
Messages,
UI,
Util,
Hash,
Keys,
Support
)
{
var APP = {
'instanceStatus': {}
};
var common;
var sFrameChan;
var categories = {
'general': [
'cp-admin-flush-cache',
'cp-admin-update-limit',
'cp-admin-archive',
'cp-admin-unarchive',
// 'cp-admin-registration',
],
'quota': [
'cp-admin-defaultlimit',
'cp-admin-setlimit',
'cp-admin-getlimits',
],
'stats': [
'cp-admin-active-sessions',
'cp-admin-active-pads',
'cp-admin-open-files',
'cp-admin-registered',
'cp-admin-disk-usage',
],
'support': [
'cp-admin-support-list',
'cp-admin-support-init'
],
'performance': [
'cp-admin-performance-profiling',
]
};
var create = {};
var makeBlock = function (key, addButton) {
// Convert to camlCase for translation keys
var safeKey = key.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });
var $div = $('
', {'class': 'cp-admin-' + key + ' cp-sidebarlayout-element'});
$('