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
This commit is contained in:
Peter Piela 2017-01-01 17:37:45 -05:00
parent d55f5ff45f
commit dd2745f608
15 changed files with 44 additions and 44 deletions

View File

@ -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');
};
/**

View File

@ -209,7 +209,7 @@
<label class="btn btn-default"
ng-repeat="opt in selectOptions"
ng-model="property.inputValue"
btn-radio="opt">{$ opt $}</label>
uib-btn-radio="opt">{$ opt $}</label>
</div>
</div>
</div>

View File

@ -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) {

View File

@ -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) {

View File

@ -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() {

View File

@ -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);
}
}
})();

View File

@ -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 +

View File

@ -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);
}
/*

View File

@ -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");

View File

@ -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;

View File

@ -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);
};
}
})();

View File

@ -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);
});
}

View File

@ -7,7 +7,7 @@
ng-click="ctrl.refresh()">
<span translate>Refresh</span>
</button>
<action-list dropdown>
<action-list uib-dropdown>
<action button-type="split-button"
action-classes="'btn btn-default btn-sm'"
callback="ctrl.actions.powerOn"
@ -53,10 +53,10 @@
<div class="clearfix"></div>
<tabset>
<tab ng-repeat="section in ctrl.sections"
<uib-tabset>
<uib-tab ng-repeat="section in ctrl.sections"
heading="{$ section.heading $}">
<ng-include src="section.templateUrl"></ng-include>
</tab>
</tabset>
</uib-tab>
</uib-tabset>
</div>

View File

@ -25,7 +25,7 @@
<thead>
<tr>
<th colspan="4" class="action-col">
<action-list dropdown class="pull-right">
<action-list uib-dropdown class="pull-right">
<action button-type="split-button"
action-classes="'btn btn-default btn-sm'"
callback="ctrl.createPort">

View File

@ -29,7 +29,7 @@
</div>
</th>
<th class="action-col">
<action-list dropdown class="pull-right">
<action-list uib-dropdown class="pull-right">
<action button-type="split-button"
action-classes="'btn btn-default btn-sm'"
callback="table.actions.powerOnAll"
@ -133,7 +133,7 @@
<td class="rsp-p2">{$ node.ports.length $}</td>
<td class="rsp-p2">{$ node.driver $}</td>
<td class="actions_column">
<action-list dropdown>
<action-list uib-dropdown>
<action button-type="split-button"
action-classes="'btn btn-default btn-sm'"
callback="table.actions.powerOn"