From dd2745f6088fddee9bf1e059bf870f66fc5f938c Mon Sep 17 00:00:00 2001 From: Peter Piela Date: Sun, 1 Jan 2017 17:37:45 -0500 Subject: [PATCH] Changes required for updated Bootstrap version Horizon has updated its version of Bootstrap to 0.14.0 that introduced the uib prefix for all components. Change-Id: I05589d38b11a3b4e40e247dfcaf0fc02deccd1b6 --- .../admin/ironic/base-node/base-node.controller.js | 6 +++--- .../dashboard/admin/ironic/base-node/base-node.html | 2 +- .../admin/ironic/base-node/base-node.service.js | 4 ++-- .../dashboard/admin/ironic/base-node/base-node.spec.js | 2 +- .../admin/ironic/create-port/create-port.controller.js | 8 ++++---- .../admin/ironic/create-port/create-port.service.js | 6 +++--- .../admin/ironic/edit-node/edit-node.controller.js | 8 ++++---- .../admin/ironic/edit-node/edit-node.service.js | 6 +++--- .../admin/ironic/enroll-node/enroll-node.controller.js | 8 ++++---- .../admin/ironic/enroll-node/enroll-node.service.js | 6 +++--- .../admin/ironic/maintenance/maintenance.controller.js | 8 ++++---- .../admin/ironic/maintenance/maintenance.service.js | 8 ++++---- .../admin/ironic/node-details/node-details.html | 10 +++++----- .../ironic/node-details/sections/configuration.html | 2 +- .../dashboard/admin/ironic/node-list/node-list.html | 4 ++-- 15 files changed, 44 insertions(+), 44 deletions(-) diff --git a/ironic_ui/static/dashboard/admin/ironic/base-node/base-node.controller.js b/ironic_ui/static/dashboard/admin/ironic/base-node/base-node.controller.js index a02021b3..ef0b50e3 100644 --- a/ironic_ui/static/dashboard/admin/ironic/base-node/base-node.controller.js +++ b/ironic_ui/static/dashboard/admin/ironic/base-node/base-node.controller.js @@ -24,7 +24,7 @@ .controller('BaseNodeController', BaseNodeController); BaseNodeController.$inject = [ - '$modalInstance', + '$uibModalInstance', 'horizon.app.core.openstack-service-api.ironic', 'horizon.app.core.openstack-service-api.glance', 'horizon.dashboard.admin.ironic.base-node.service', @@ -33,7 +33,7 @@ 'ctrl' ]; - function BaseNodeController($modalInstance, + function BaseNodeController($uibModalInstance, ironic, glance, baseNodeService, @@ -260,7 +260,7 @@ * @return {void} */ ctrl.cancel = function() { - $modalInstance.dismiss('cancel'); + $uibModalInstance.dismiss('cancel'); }; /** diff --git a/ironic_ui/static/dashboard/admin/ironic/base-node/base-node.html b/ironic_ui/static/dashboard/admin/ironic/base-node/base-node.html index 7d1bc55c..8f021821 100644 --- a/ironic_ui/static/dashboard/admin/ironic/base-node/base-node.html +++ b/ironic_ui/static/dashboard/admin/ironic/base-node/base-node.html @@ -209,7 +209,7 @@ + uib-btn-radio="opt">{$ opt $} diff --git a/ironic_ui/static/dashboard/admin/ironic/base-node/base-node.service.js b/ironic_ui/static/dashboard/admin/ironic/base-node/base-node.service.js index 44298150..81a75565 100644 --- a/ironic_ui/static/dashboard/admin/ironic/base-node/base-node.service.js +++ b/ironic_ui/static/dashboard/admin/ironic/base-node/base-node.service.js @@ -51,13 +51,13 @@ baseNodeService); baseNodeService.$inject = [ - '$modal', + '$uibModal', '$log', 'horizon.dashboard.admin.ironic.validHostNamePattern', 'horizon.dashboard.admin.ironic.validUuidPattern' ]; - function baseNodeService($modal, + function baseNodeService($uibModal, $log, validHostNamePattern, validUuidPattern) { diff --git a/ironic_ui/static/dashboard/admin/ironic/base-node/base-node.spec.js b/ironic_ui/static/dashboard/admin/ironic/base-node/base-node.spec.js index d74b8ea9..f651fbb2 100644 --- a/ironic_ui/static/dashboard/admin/ironic/base-node/base-node.spec.js +++ b/ironic_ui/static/dashboard/admin/ironic/base-node/base-node.spec.js @@ -25,7 +25,7 @@ beforeEach(module('horizon.dashboard.admin.ironic')); beforeEach(module(function($provide) { - $provide.value('$modal', jasmine.createSpy()); + $provide.value('$uibModal', jasmine.createSpy()); })); beforeEach(inject(function($injector) { diff --git a/ironic_ui/static/dashboard/admin/ironic/create-port/create-port.controller.js b/ironic_ui/static/dashboard/admin/ironic/create-port/create-port.controller.js index 03c2dbfb..07606ab1 100644 --- a/ironic_ui/static/dashboard/admin/ironic/create-port/create-port.controller.js +++ b/ironic_ui/static/dashboard/admin/ironic/create-port/create-port.controller.js @@ -25,7 +25,7 @@ CreatePortController.$inject = [ '$rootScope', - '$modalInstance', + '$uibModalInstance', 'horizon.app.core.openstack-service-api.ironic', 'horizon.dashboard.admin.ironic.events', '$log', @@ -33,7 +33,7 @@ ]; function CreatePortController($rootScope, - $modalInstance, + $uibModalInstance, ironic, ironicEvents, $log, @@ -53,7 +53,7 @@ * @return {void} */ ctrl.cancel = function() { - $modalInstance.dismiss('cancel'); + $uibModalInstance.dismiss('cancel'); }; /** @@ -64,7 +64,7 @@ ctrl.createPort = function() { ironic.createPort(ctrl.port).then( function() { - $modalInstance.close(); + $uibModalInstance.close(); $rootScope.$emit(ironicEvents.CREATE_PORT_SUCCESS); }, function() { diff --git a/ironic_ui/static/dashboard/admin/ironic/create-port/create-port.service.js b/ironic_ui/static/dashboard/admin/ironic/create-port/create-port.service.js index f76645a9..01dfa282 100644 --- a/ironic_ui/static/dashboard/admin/ironic/create-port/create-port.service.js +++ b/ironic_ui/static/dashboard/admin/ironic/create-port/create-port.service.js @@ -22,11 +22,11 @@ createPortService); createPortService.$inject = [ - '$modal', + '$uibModal', 'horizon.dashboard.admin.ironic.basePath' ]; - function createPortService($modal, basePath) { + function createPortService($uibModal, basePath) { var service = { modal: modal }; @@ -43,7 +43,7 @@ }, templateUrl: basePath + '/create-port/create-port.html' }; - return $modal.open(options); + return $uibModal.open(options); } } })(); diff --git a/ironic_ui/static/dashboard/admin/ironic/edit-node/edit-node.controller.js b/ironic_ui/static/dashboard/admin/ironic/edit-node/edit-node.controller.js index 8230b7cf..10370f7e 100644 --- a/ironic_ui/static/dashboard/admin/ironic/edit-node/edit-node.controller.js +++ b/ironic_ui/static/dashboard/admin/ironic/edit-node/edit-node.controller.js @@ -26,7 +26,7 @@ EditNodeController.$inject = [ '$rootScope', '$controller', - '$modalInstance', + '$uibModalInstance', 'horizon.framework.widgets.toast.service', 'horizon.app.core.openstack-service-api.ironic', 'horizon.dashboard.admin.ironic.events', @@ -37,7 +37,7 @@ function EditNodeController($rootScope, $controller, - $modalInstance, + $uibModalInstance, toastService, ironic, ironicEvents, @@ -48,7 +48,7 @@ $controller('BaseNodeController', {ctrl: ctrl, - $modalInstance: $modalInstance}); + $uibModalInstance: $uibModalInstance}); ctrl.modalTitle = gettext("Edit Node"); ctrl.submitButtonTitle = gettext("Update Node"); @@ -130,7 +130,7 @@ } ctrl.submit = function() { - $modalInstance.close(); + $uibModalInstance.close(); angular.forEach(ctrl.driverProperties, function(property, name) { $log.debug(name + diff --git a/ironic_ui/static/dashboard/admin/ironic/edit-node/edit-node.service.js b/ironic_ui/static/dashboard/admin/ironic/edit-node/edit-node.service.js index aeee45bf..22471e85 100644 --- a/ironic_ui/static/dashboard/admin/ironic/edit-node/edit-node.service.js +++ b/ironic_ui/static/dashboard/admin/ironic/edit-node/edit-node.service.js @@ -22,12 +22,12 @@ editNodeService); editNodeService.$inject = [ - '$modal', + '$uibModal', 'horizon.dashboard.admin.ironic.basePath', '$log' ]; - function editNodeService($modal, basePath, $log) { + function editNodeService($uibModal, basePath, $log) { var service = { modal: modal, NodeUpdatePatch: NodeUpdatePatch @@ -44,7 +44,7 @@ }, templateUrl: basePath + '/base-node/base-node.html' }; - return $modal.open(options); + return $uibModal.open(options); } /* diff --git a/ironic_ui/static/dashboard/admin/ironic/enroll-node/enroll-node.controller.js b/ironic_ui/static/dashboard/admin/ironic/enroll-node/enroll-node.controller.js index cc1d23bf..577eec35 100644 --- a/ironic_ui/static/dashboard/admin/ironic/enroll-node/enroll-node.controller.js +++ b/ironic_ui/static/dashboard/admin/ironic/enroll-node/enroll-node.controller.js @@ -26,7 +26,7 @@ EnrollNodeController.$inject = [ '$rootScope', '$controller', - '$modalInstance', + '$uibModalInstance', 'horizon.app.core.openstack-service-api.ironic', 'horizon.dashboard.admin.ironic.events', '$log' @@ -34,7 +34,7 @@ function EnrollNodeController($rootScope, $controller, - $modalInstance, + $uibModalInstance, ironic, ironicEvents, $log) { @@ -42,7 +42,7 @@ $controller('BaseNodeController', {ctrl: ctrl, - $modalInstance: $modalInstance}); + $uibModalInstance: $uibModalInstance}); ctrl.modalTitle = gettext("Enroll Node"); ctrl.submitButtonTitle = ctrl.modalTitle; @@ -74,7 +74,7 @@ ironic.createNode(ctrl.node).then( function(response) { $log.info("create node response = " + JSON.stringify(response)); - $modalInstance.close(); + $uibModalInstance.close(); $rootScope.$emit(ironicEvents.ENROLL_NODE_SUCCESS); if (ctrl.moveNodeToManageableState) { $log.info("Setting node provision state"); diff --git a/ironic_ui/static/dashboard/admin/ironic/enroll-node/enroll-node.service.js b/ironic_ui/static/dashboard/admin/ironic/enroll-node/enroll-node.service.js index fd2a00ea..4e162e7d 100644 --- a/ironic_ui/static/dashboard/admin/ironic/enroll-node/enroll-node.service.js +++ b/ironic_ui/static/dashboard/admin/ironic/enroll-node/enroll-node.service.js @@ -22,11 +22,11 @@ enrollNodeService); enrollNodeService.$inject = [ - '$modal', + '$uibModal', 'horizon.dashboard.admin.ironic.basePath' ]; - function enrollNodeService($modal, basePath) { + function enrollNodeService($uibModal, basePath) { var service = { modal: modal }; @@ -37,7 +37,7 @@ backdrop: 'static', templateUrl: basePath + '/base-node/base-node.html' }; - return $modal.open(options); + return $uibModal.open(options); } return service; diff --git a/ironic_ui/static/dashboard/admin/ironic/maintenance/maintenance.controller.js b/ironic_ui/static/dashboard/admin/ironic/maintenance/maintenance.controller.js index 2a51eda0..e41a186a 100644 --- a/ironic_ui/static/dashboard/admin/ironic/maintenance/maintenance.controller.js +++ b/ironic_ui/static/dashboard/admin/ironic/maintenance/maintenance.controller.js @@ -31,18 +31,18 @@ .controller('MaintenanceController', MaintenanceController); MaintenanceController.$inject = [ - '$modalInstance' + '$uibModalInstance' ]; - function MaintenanceController($modalInstance) { + function MaintenanceController($uibModalInstance) { var ctrl = this; ctrl.cancel = function() { - $modalInstance.dismiss('cancel'); + $uibModalInstance.dismiss('cancel'); }; ctrl.putInMaintenanceMode = function(maintReason) { - $modalInstance.close(maintReason); + $uibModalInstance.close(maintReason); }; } })(); diff --git a/ironic_ui/static/dashboard/admin/ironic/maintenance/maintenance.service.js b/ironic_ui/static/dashboard/admin/ironic/maintenance/maintenance.service.js index 72256e2e..892ed63e 100644 --- a/ironic_ui/static/dashboard/admin/ironic/maintenance/maintenance.service.js +++ b/ironic_ui/static/dashboard/admin/ironic/maintenance/maintenance.service.js @@ -29,12 +29,12 @@ maintenanceService); maintenanceService.$inject = [ - '$modal', + '$uibModal', 'horizon.dashboard.admin.ironic.basePath', 'horizon.dashboard.admin.ironic.actions' ]; - function maintenanceService($modal, basePath, actions) { + function maintenanceService($uibModal, basePath, actions) { var service = { putNodeInMaintenanceMode: putNodeInMaintenanceMode, putNodesInMaintenanceMode: putNodesInMaintenanceMode, @@ -56,7 +56,7 @@ controller: "MaintenanceController as ctrl", templateUrl: basePath + '/maintenance/maintenance.html' }; - $modal.open(options).result.then(function(maintReason) { + $uibModal.open(options).result.then(function(maintReason) { actions.putNodeInMaintenanceMode(node, maintReason); }); } @@ -74,7 +74,7 @@ controller: "MaintenanceController as ctrl", templateUrl: basePath + '/maintenance/maintenance.html' }; - $modal.open(options).result.then(function(maintReason) { + $uibModal.open(options).result.then(function(maintReason) { actions.putAllInMaintenanceMode(nodes, maintReason); }); } diff --git a/ironic_ui/static/dashboard/admin/ironic/node-details/node-details.html b/ironic_ui/static/dashboard/admin/ironic/node-details/node-details.html index 473403ac..44b91a68 100644 --- a/ironic_ui/static/dashboard/admin/ironic/node-details/node-details.html +++ b/ironic_ui/static/dashboard/admin/ironic/node-details/node-details.html @@ -7,7 +7,7 @@ ng-click="ctrl.refresh()"> Refresh - + - - + - - + + diff --git a/ironic_ui/static/dashboard/admin/ironic/node-details/sections/configuration.html b/ironic_ui/static/dashboard/admin/ironic/node-details/sections/configuration.html index af9a6918..66164522 100644 --- a/ironic_ui/static/dashboard/admin/ironic/node-details/sections/configuration.html +++ b/ironic_ui/static/dashboard/admin/ironic/node-details/sections/configuration.html @@ -25,7 +25,7 @@ - + diff --git a/ironic_ui/static/dashboard/admin/ironic/node-list/node-list.html b/ironic_ui/static/dashboard/admin/ironic/node-list/node-list.html index 1732a2b5..11461df0 100644 --- a/ironic_ui/static/dashboard/admin/ironic/node-list/node-list.html +++ b/ironic_ui/static/dashboard/admin/ironic/node-list/node-list.html @@ -29,7 +29,7 @@ - + {$ node.ports.length $} {$ node.driver $} - +