From e89cb76c5187659da7912f1cc5ee7ee2e63105f3 Mon Sep 17 00:00:00 2001 From: Ruel Tmeizeh - RuhNet Date: Sun, 2 Mar 2025 18:11:58 -0500 Subject: [PATCH] namespace change --- app.js | 28 +++++++++++++------------- i18n/en-US.json | 2 +- style/app.css | 8 ++++---- style/app.scss | 2 +- submodules/mts/i18n/en-US.json | 2 +- submodules/mts/mts.js | 2 +- submodules/mts/views/formElements.html | 8 ++++---- submodules/mts/views/logo.html | 2 +- submodules/s3/i18n/en-US.json | 2 +- submodules/s3/s3.js | 2 +- submodules/s3/views/formElements.html | 8 ++++---- submodules/s3/views/logo.html | 2 +- views/field-path.html | 2 +- views/item-settings.html | 4 ++-- views/layout.html | 4 ++-- views/new-item.html | 6 +++--- 16 files changed, 42 insertions(+), 42 deletions(-) diff --git a/app.js b/app.js index 95b8e9c..444990f 100644 --- a/app.js +++ b/app.js @@ -15,7 +15,7 @@ define(function(require) { }; // Autoload submodules - // (Submodules should be described in /apps/storagemgmt/storages.js) + // (Submodules should be described in /apps/storage/storages.js) var storagesList = storagesConfig.storages; var storagesPaths = []; for (var i = 0, len = storagesList.length; i < len; i++) { @@ -24,12 +24,12 @@ define(function(require) { require(storagesPaths); var storageManager = { - name: 'storagemgmt', + name: 'storage', css: [ 'app' ], requests: {}, subscribe: { - 'storagemgmt.fetchStorages': 'define_storage_nodes' // For all submodules + 'storage.fetchStorages': 'define_storage_nodes' // For all submodules }, subModules: storagesList, @@ -60,7 +60,7 @@ define(function(require) { render: function(container) { var self = this; - monster.pub('storagemgmt.fetchStorages', { + monster.pub('storage.fetchStorages', { storages: self.storages, callback: function (args) { self.extendI18nOfSubmodule(args); @@ -79,7 +79,7 @@ define(function(require) { ] }); - $(document.body).addClass('storagemgmt-app'); // class for styles; + $(document.body).addClass('storage-app'); // class for styles; }, extendI18nOfSubmodule: function (args) { @@ -90,7 +90,7 @@ define(function(require) { if (submoduleLanguages.length && submoduleLanguages.length > 0) { if(submoduleLanguages.indexOf(curLanguage) > -1) { - $.getJSON('/apps/storagemgmt/submodules/' + args.submoduleName + '/i18n/' + curLanguage + '.json').done(function (newDict) { + $.getJSON('/apps/storage/submodules/' + args.submoduleName + '/i18n/' + curLanguage + '.json').done(function (newDict) { var dict = self.data.i18n[curLanguage]; $.extend(true, dict, newDict); }) @@ -163,7 +163,7 @@ define(function(require) { } }, error: function(error) { - var errorMessage = self.i18n.active().storagemgmt.universalErrorMessageTemplate.replace('%api%', 'Storage'); + var errorMessage = self.i18n.active().storage.universalErrorMessageTemplate.replace('%api%', 'Storage'); monster.ui.alert(errorMessage); log(error.status + ' - ' + error.error + ': ' + error.message + ' '); } @@ -321,17 +321,17 @@ define(function(require) { template.on('click', '.js-remove-storage', function(e) { e.preventDefault(); var uuid = $(this).closest('.js-storage-item').data('uuid'); - monster.ui.confirm(self.i18n.active().storagemgmt.confirmDeleteText, function() { + monster.ui.confirm(self.i18n.active().storage.confirmDeleteText, function() { self.storageManagerDeleteStorage(uuid, function() { $('.js-storage-item[data-uuid="' + uuid + '"]').slideUp(400, function() { $(this).remove(); }); - self.storageManagerShowMessage(self.i18n.active().storagemgmt.successRemovingMessage); + self.storageManagerShowMessage(self.i18n.active().storage.successRemovingMessage); }); }, undefined, { type: 'warning', - title: self.i18n.active().storagemgmt.confirmDeleteTitle, - confirmButtonText: self.i18n.active().storagemgmt.confirmDelete + title: self.i18n.active().storage.confirmDeleteTitle, + confirmButtonText: self.i18n.active().storage.confirmDelete }); }); @@ -356,7 +356,7 @@ define(function(require) { var isAlreadyActive = $(this).closest('.js-storage-item').hasClass('active-storage'); if(isAlreadyActive) { - self.storageManagerShowMessage(self.i18n.active().storagemgmt.alreadyActiveMessage, 'warning') + self.storageManagerShowMessage(self.i18n.active().storage.alreadyActiveMessage, 'warning') } else { self.storageManagerSetDefaultStorage(uuid); } @@ -414,7 +414,7 @@ define(function(require) { self.storageManagerPatchStorage(storageData, function(){ var renderArgs = { callback: function () { - self.storageManagerShowMessage(self.i18n.active().storagemgmt.successSavingMessage, 'success'); + self.storageManagerShowMessage(self.i18n.active().storage.successSavingMessage, 'success'); } }; @@ -528,7 +528,7 @@ define(function(require) { self.storageManagerPatchStorage(storageData, function(data) { // update item name $('.js-storage-item[data-uuid="' + uuid + '"]').find('.js-storage-name').text(storageName); - self.storageManagerShowMessage(self.i18n.active().storagemgmt.successUpdate, 'success'); + self.storageManagerShowMessage(self.i18n.active().storage.successUpdate, 'success'); }); }); diff --git a/i18n/en-US.json b/i18n/en-US.json index 5701b8c..f94ea28 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -1,5 +1,5 @@ { - "storagemgmt": { + "storage": { "title": "Storage Engine Management", "description": "The Storage Engine Management app allows you manage your storage", "universalErrorMessageTemplate": "Please contact your system administrator to configure %api% API, required for this application to work", diff --git a/style/app.css b/style/app.css index 2ed82e9..e8ed3e3 100644 --- a/style/app.css +++ b/style/app.css @@ -1,20 +1,20 @@ -.storagemgmt-app .storages-settings { +.storage-app .storages-settings { display: block; background: white; padding: 13px 23px 2px; margin-bottom: 24px; border-radius: 8px; position: relative; } - .storagemgmt-app .storages-settings .close-btn { + .storage-app .storages-settings .close-btn { width: 31px; display: inline-block; text-align: center; position: absolute; top: 10px; right: 10px; } - .storagemgmt-app .storages-settings .close-btn i.fa { + .storage-app .storages-settings .close-btn i.fa { font-size: 20px; } - .storagemgmt-app .storages-settings .close-btn:hover i.fa { + .storage-app .storages-settings .close-btn:hover i.fa { color: #22A5FF; } .storage-manager-wrapper { diff --git a/style/app.scss b/style/app.scss index b002de5..6866b1e 100644 --- a/style/app.scss +++ b/style/app.scss @@ -1,4 +1,4 @@ -.storagemgmt-app { +.storage-app { .storages-settings { display: block; background: white; diff --git a/submodules/mts/i18n/en-US.json b/submodules/mts/i18n/en-US.json index 658c9a4..6f31f71 100644 --- a/submodules/mts/i18n/en-US.json +++ b/submodules/mts/i18n/en-US.json @@ -1,5 +1,5 @@ { - "storagemgmt": { + "storage": { "submodules": { "mts": { "nameLabel": "Name", diff --git a/submodules/mts/mts.js b/submodules/mts/mts.js index 2c99be7..f721416 100644 --- a/submodules/mts/mts.js +++ b/submodules/mts/mts.js @@ -10,7 +10,7 @@ define(function(require){ requests: {}, subscribe: { - 'storagemgmt.fetchStorages': 'defineStorageMTS' + 'storage.fetchStorages': 'defineStorageMTS' }, defineStorageMTS: function(args) { diff --git a/submodules/mts/views/formElements.html b/submodules/mts/views/formElements.html index ccdabd1..08220f2 100644 --- a/submodules/mts/views/formElements.html +++ b/submodules/mts/views/formElements.html @@ -1,25 +1,25 @@