
This patch adds Update Queue action into item_actions. - show item action - show workflow (set "name" input as disabled) - load data into workflow - post data to REST API - treat result We need wait for following implementation in Zaqar API, so these things is not scope of this patch. - provide available metadata - remove existing metadata Change-Id: I21e05b49fa757ed7fb3459c0e87767df7c0926c6
84 lines
2.2 KiB
JavaScript
84 lines
2.2 KiB
JavaScript
/**
|
|
* Copyright 2016 IBM Corp.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
* not use this file except in compliance with the License. You may obtain
|
|
* a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
* License for the specific language governing permissions and limitations
|
|
* under the License.
|
|
*/
|
|
|
|
(function() {
|
|
'use strict';
|
|
|
|
/**
|
|
* @ngdoc overview
|
|
* @ngname horizon.dashboard.project.queues.actions
|
|
* @description Provides all of the actions for queues.
|
|
*/
|
|
angular.module('horizon.dashboard.project.queues.actions', [
|
|
'horizon.framework.conf',
|
|
'horizon.app.core'])
|
|
.run(registerActions);
|
|
|
|
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.resourceType'
|
|
];
|
|
|
|
function registerActions(
|
|
registry,
|
|
createService,
|
|
deleteService,
|
|
updateService,
|
|
resourceType
|
|
) {
|
|
|
|
var queueResourceType = registry.getResourceType(resourceType);
|
|
queueResourceType.itemActions
|
|
.append({
|
|
id: 'queuesItemUpdate',
|
|
service: updateService,
|
|
template: {
|
|
text: gettext('Update')
|
|
}
|
|
})
|
|
.append({
|
|
id: 'queuesItemDelete',
|
|
service: deleteService,
|
|
template: {
|
|
type: 'delete',
|
|
text: gettext('Delete')
|
|
}
|
|
});
|
|
|
|
queueResourceType.batchActions
|
|
.append({
|
|
id: 'queuesBatchCreate',
|
|
service: createService,
|
|
template: {
|
|
type: 'create',
|
|
text: gettext('Create Queues')
|
|
}
|
|
})
|
|
.append({
|
|
id: 'queuesBatchDelete',
|
|
service: deleteService,
|
|
template: {
|
|
type: 'delete-selected',
|
|
text: gettext('Delete Queues')
|
|
}
|
|
});
|
|
}
|
|
|
|
})();
|