diff --git a/zaqar_ui/content/queues/templates/queues/index.html b/zaqar_ui/content/queues/templates/queues/index.html index 17e679b..e2dda2f 100644 --- a/zaqar_ui/content/queues/templates/queues/index.html +++ b/zaqar_ui/content/queues/templates/queues/index.html @@ -7,5 +7,5 @@ {% endblock page_header %} {% block main %} - + {% endblock %} diff --git a/zaqar_ui/static/dashboard/project/queues/actions/actions.module.js b/zaqar_ui/static/dashboard/project/queues/actions/actions.module.js index c3d7732..82c58a3 100644 --- a/zaqar_ui/static/dashboard/project/queues/actions/actions.module.js +++ b/zaqar_ui/static/dashboard/project/queues/actions/actions.module.js @@ -29,18 +29,18 @@ registerActions.$inject = [ 'horizon.framework.conf.resource-type-registry.service', - 'horizon.dashboard.project.queues.actions.createService', - 'horizon.dashboard.project.queues.actions.deleteService', - 'horizon.dashboard.project.queues.actions.updateService', + 'horizon.dashboard.project.queues.actions.createQueueService', + 'horizon.dashboard.project.queues.actions.deleteQueueService', + 'horizon.dashboard.project.queues.actions.updateQueueService', 'horizon.dashboard.project.queues.actions.createSubscriptionService', 'horizon.dashboard.project.queues.resourceType' ]; function registerActions( registry, - createService, - deleteService, - updateService, + createQueueService, + deleteQueueService, + updateQueueService, createSubscriptionService, resourceType ) { @@ -49,7 +49,7 @@ queueResourceType.itemActions .append({ id: 'queuesItemUpdate', - service: updateService, + service: updateQueueService, template: { text: gettext('Update') } @@ -63,7 +63,7 @@ }) .append({ id: 'queuesItemDelete', - service: deleteService, + service: deleteQueueService, template: { type: 'delete', text: gettext('Delete') @@ -73,7 +73,7 @@ queueResourceType.batchActions .append({ id: 'queuesBatchCreate', - service: createService, + service: createQueueService, template: { type: 'create', text: gettext('Create Queues') @@ -81,7 +81,7 @@ }) .append({ id: 'queuesBatchDelete', - service: deleteService, + service: deleteQueueService, template: { type: 'delete-selected', text: gettext('Delete Queues') diff --git a/zaqar_ui/static/dashboard/project/queues/actions/create.service.js b/zaqar_ui/static/dashboard/project/queues/actions/create-queue.service.js similarity index 85% rename from zaqar_ui/static/dashboard/project/queues/actions/create.service.js rename to zaqar_ui/static/dashboard/project/queues/actions/create-queue.service.js index 7b41be7..88437dd 100644 --- a/zaqar_ui/static/dashboard/project/queues/actions/create.service.js +++ b/zaqar_ui/static/dashboard/project/queues/actions/create-queue.service.js @@ -19,13 +19,13 @@ angular .module('horizon.dashboard.project.queues') - .factory('horizon.dashboard.project.queues.actions.createService', createService); + .factory('horizon.dashboard.project.queues.actions.createQueueService', createQueueService); - createService.$inject = [ + createQueueService.$inject = [ 'horizon.app.core.metadata.service', 'horizon.app.core.openstack-service-api.policy', 'horizon.dashboard.project.queues.events', - 'horizon.dashboard.project.queues.actions.createWorkflow', + 'horizon.dashboard.project.queues.actions.createQueueWorkflow', 'horizon.app.core.openstack-service-api.zaqar', 'horizon.framework.widgets.modal.wizard-modal.service', 'horizon.framework.widgets.toast.service' @@ -33,10 +33,10 @@ /** * @ngDoc factory - * @name horizon.dashboard.project.queues.actions.createService + * @name horizon.dashboard.project.queues.actions.createQueueService * @Description A service to open the queues wizard. */ - function createService(meta, policy, events, createWorkflow, zaqar, wizard, toast) { + function createQueueService(meta, policy, events, createQueueWorkflow, zaqar, wizard, toast) { var message = { success: gettext('Queue %s was successfully created.') @@ -83,7 +83,7 @@ function perform() { wizard.modal({ scope: scope, - workflow: createWorkflow, + workflow: createQueueWorkflow, submit: submit }); } @@ -101,5 +101,5 @@ scope.$emit(events.CREATE_SUCCESS, response.data); } - } // end of createService + } // end of createQueueService })(); // end of IIFE diff --git a/zaqar_ui/static/dashboard/project/queues/actions/create.workflow.service.js b/zaqar_ui/static/dashboard/project/queues/actions/create-queue.workflow.js similarity index 83% rename from zaqar_ui/static/dashboard/project/queues/actions/create.workflow.service.js rename to zaqar_ui/static/dashboard/project/queues/actions/create-queue.workflow.js index 0138275..940e8b0 100644 --- a/zaqar_ui/static/dashboard/project/queues/actions/create.workflow.service.js +++ b/zaqar_ui/static/dashboard/project/queues/actions/create-queue.workflow.js @@ -19,9 +19,9 @@ angular .module('horizon.dashboard.project.queues') - .factory('horizon.dashboard.project.queues.actions.createWorkflow', createWorkflow); + .factory('horizon.dashboard.project.queues.actions.createQueueWorkflow', createQueueWorkflow); - createWorkflow.$inject = [ + createQueueWorkflow.$inject = [ 'horizon.app.core.workflow.factory', 'horizon.dashboard.project.queues.basePath', 'horizon.framework.util.i18n.gettext' @@ -29,10 +29,10 @@ /** * @ngdoc factory - * @name horizon.dashboard.project.queues.actions.createWorkflow + * @name horizon.dashboard.project.queues.actions.createQueueWorkflow * @description A workflow for the create queue action. */ - function createWorkflow(workflowService, basePath, gettext) { + function createQueueWorkflow(workflowService, basePath, gettext) { var workflow = workflowService({ title: gettext('Create Queue'), diff --git a/zaqar_ui/static/dashboard/project/queues/actions/createSubscription.service.js b/zaqar_ui/static/dashboard/project/queues/actions/create-subscription.service.js similarity index 96% rename from zaqar_ui/static/dashboard/project/queues/actions/createSubscription.service.js rename to zaqar_ui/static/dashboard/project/queues/actions/create-subscription.service.js index 69b823d..98c5c1e 100644 --- a/zaqar_ui/static/dashboard/project/queues/actions/createSubscription.service.js +++ b/zaqar_ui/static/dashboard/project/queues/actions/create-subscription.service.js @@ -39,7 +39,7 @@ * @Description A service to open the subscriptions wizard. */ function createSubscriptionService( - $q, meta, policy, events, createWorkflow, zaqar, wizard, toast) { + $q, meta, policy, events, createSubWorkflow, zaqar, wizard, toast) { var message = { success: gettext('Subscription %s was successfully created.') @@ -78,7 +78,7 @@ model.queueName = queue.name; wizard.modal({ scope: scope, - workflow: createWorkflow, + workflow: createSubWorkflow, submit: submit }); } diff --git a/zaqar_ui/static/dashboard/project/queues/actions/createSubscription.workflow.js b/zaqar_ui/static/dashboard/project/queues/actions/create-subscription.workflow.js similarity index 100% rename from zaqar_ui/static/dashboard/project/queues/actions/createSubscription.workflow.js rename to zaqar_ui/static/dashboard/project/queues/actions/create-subscription.workflow.js diff --git a/zaqar_ui/static/dashboard/project/queues/actions/delete.service.js b/zaqar_ui/static/dashboard/project/queues/actions/delete-queue.service.js similarity index 91% rename from zaqar_ui/static/dashboard/project/queues/actions/delete.service.js rename to zaqar_ui/static/dashboard/project/queues/actions/delete-queue.service.js index ea5187a..380c9bd 100644 --- a/zaqar_ui/static/dashboard/project/queues/actions/delete.service.js +++ b/zaqar_ui/static/dashboard/project/queues/actions/delete-queue.service.js @@ -19,9 +19,9 @@ angular .module('horizon.dashboard.project.queues') - .factory('horizon.dashboard.project.queues.actions.deleteService', deleteService); + .factory('horizon.dashboard.project.queues.actions.deleteQueueService', deleteQueueService); - deleteService.$inject = [ + deleteQueueService.$inject = [ '$q', 'horizon.app.core.openstack-service-api.policy', 'horizon.app.core.openstack-service-api.zaqar', @@ -34,12 +34,13 @@ /** * @ngDoc factory - * @name horizon.dashboard.project.queues.actions.deleteService + * @name horizon.dashboard.project.queues.actions.deleteQueueService * @Description Brings up the delete queues confirmation modal dialog. * On submit, delete given queues. * On cancel, do nothing. */ - function deleteService($q, policy, zaqar, events, gettext, $qExtensions, deleteModal, toast) { + function deleteQueueService( + $q, policy, zaqar, events, gettext, $qExtensions, deleteModal, toast) { var scope, context; var service = { diff --git a/zaqar_ui/static/dashboard/project/queues/actions/update.service.js b/zaqar_ui/static/dashboard/project/queues/actions/update-queue.service.js similarity index 85% rename from zaqar_ui/static/dashboard/project/queues/actions/update.service.js rename to zaqar_ui/static/dashboard/project/queues/actions/update-queue.service.js index 3a50b13..469910f 100644 --- a/zaqar_ui/static/dashboard/project/queues/actions/update.service.js +++ b/zaqar_ui/static/dashboard/project/queues/actions/update-queue.service.js @@ -19,13 +19,13 @@ angular .module('horizon.dashboard.project.queues') - .factory('horizon.dashboard.project.queues.actions.updateService', updateService); + .factory('horizon.dashboard.project.queues.actions.updateQueueService', updateQueueService); - updateService.$inject = [ + updateQueueService.$inject = [ 'horizon.app.core.metadata.service', 'horizon.app.core.openstack-service-api.policy', 'horizon.dashboard.project.queues.events', - 'horizon.dashboard.project.queues.actions.updateWorkflow', + 'horizon.dashboard.project.queues.actions.updateQueueWorkflow', 'horizon.app.core.openstack-service-api.zaqar', 'horizon.framework.widgets.modal.wizard-modal.service', 'horizon.framework.widgets.toast.service' @@ -33,10 +33,10 @@ /** * @ngDoc factory - * @name horizon.dashboard.project.queues.actions.updateService + * @name horizon.dashboard.project.queues.actions.updateQueueService * @Description A service to open the queues wizard. */ - function updateService(meta, policy, events, updateWorkflow, zaqar, wizard, toast) { + function updateQueueService(meta, policy, events, updateQueueWorkflow, zaqar, wizard, toast) { var message = { success: gettext('Queue %s was successfully updated.') @@ -86,7 +86,7 @@ model.queue_name = queue.name; wizard.modal({ scope: scope, - workflow: updateWorkflow, + workflow: updateQueueWorkflow, submit: submit }); } @@ -104,5 +104,5 @@ scope.$emit(events.UPDATE_SUCCESS, response.data); } - } // end of updateService + } // end of updateQueueService })(); // end of IIFE diff --git a/zaqar_ui/static/dashboard/project/queues/actions/update.workflow.service.js b/zaqar_ui/static/dashboard/project/queues/actions/update-queue.workflow.js similarity index 71% rename from zaqar_ui/static/dashboard/project/queues/actions/update.workflow.service.js rename to zaqar_ui/static/dashboard/project/queues/actions/update-queue.workflow.js index 92a94da..67d0f3b 100644 --- a/zaqar_ui/static/dashboard/project/queues/actions/update.workflow.service.js +++ b/zaqar_ui/static/dashboard/project/queues/actions/update-queue.workflow.js @@ -19,22 +19,22 @@ angular .module('horizon.dashboard.project.queues') - .factory('horizon.dashboard.project.queues.actions.updateWorkflow', updateWorkflow); + .factory('horizon.dashboard.project.queues.actions.updateQueueWorkflow', updateQueueWorkflow); - updateWorkflow.$inject = [ - 'horizon.dashboard.project.queues.actions.createWorkflow', + updateQueueWorkflow.$inject = [ + 'horizon.dashboard.project.queues.actions.createQueueWorkflow', 'horizon.dashboard.project.queues.basePath', 'horizon.framework.util.i18n.gettext' ]; /** * @ngdoc factory - * @name horizon.dashboard.project.queues.actions.updateWorkflow + * @name horizon.dashboard.project.queues.actions.updateQueueWorkflow * @description A workflow for the update queue action. */ - function updateWorkflow(createWorkflow, basePath, gettext) { + function updateQueueWorkflow(createQueueWorkflow, basePath, gettext) { - var workflow = angular.copy(createWorkflow); + var workflow = angular.copy(createQueueWorkflow); workflow.title = gettext('Update Queue'); workflow.btnText = { finish: gettext('Update') }; diff --git a/zaqar_ui/static/dashboard/project/queues/table/table.controller.js b/zaqar_ui/static/dashboard/project/queues/table/queue.controller.js similarity index 90% rename from zaqar_ui/static/dashboard/project/queues/table/table.controller.js rename to zaqar_ui/static/dashboard/project/queues/table/queue.controller.js index e4d6105..561cbe9 100644 --- a/zaqar_ui/static/dashboard/project/queues/table/table.controller.js +++ b/zaqar_ui/static/dashboard/project/queues/table/queue.controller.js @@ -17,7 +17,7 @@ /** * @ngdoc overview - * @name queuesTableController + * @name queueController * @ngController * * @description @@ -25,9 +25,9 @@ */ angular .module('horizon.dashboard.project.queues') - .controller('horizon.dashboard.project.queues.tableController', queuesTableController); + .controller('horizon.dashboard.project.queues.table.queueController', queueController); - queuesTableController.$inject = [ + queueController.$inject = [ '$scope', 'horizon.app.core.openstack-service-api.zaqar', 'horizon.dashboard.project.queues.basePath', @@ -36,14 +36,14 @@ 'horizon.framework.conf.resource-type-registry.service', ]; - function queuesTableController($scope, zaqar, base, events, type, registry) { + function queueController($scope, zaqar, base, events, type, registry) { var ctrl = this; ctrl.queues = []; ctrl.queuesSrc = []; ctrl.resourceType = registry.getResourceType(type); - ctrl.subsTemplate = base + 'table/subscriptionTable.html'; + ctrl.subsTemplate = base + 'table/subscription.html'; init(); initScope(); diff --git a/zaqar_ui/static/dashboard/project/queues/table/table.html b/zaqar_ui/static/dashboard/project/queues/table/queue.html similarity index 97% rename from zaqar_ui/static/dashboard/project/queues/table/table.html rename to zaqar_ui/static/dashboard/project/queues/table/queue.html index 7c06bf4..42ef2e1 100644 --- a/zaqar_ui/static/dashboard/project/queues/table/table.html +++ b/zaqar_ui/static/dashboard/project/queues/table/queue.html @@ -1,6 +1,6 @@ - + ng-controller="horizon.dashboard.project.queues.table.subscriptionController as subCtrl"> diff --git a/zaqar_ui/static/dashboard/project/queues/table/table.controller.spec.js b/zaqar_ui/static/dashboard/project/queues/table/table.controller.spec.js deleted file mode 100644 index e69de29..0000000
Subscriber