-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add toolbar settings service provider
toolbar setting service provider is for fetching data based on which toolbar will be created. These data does not contain function calls to handle events so we have to bind specific function based on IDs of these toolbar items
- Loading branch information
Showing
8 changed files
with
227 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,108 @@ | ||
[ | ||
{ | ||
"title": "Configuration", | ||
"icon": "fa fa-cog fa-lg", | ||
"children": [ | ||
{ | ||
"id": "new_provider", | ||
"title": "Add a New Middleware Provider", | ||
"icon": "pficon pficon-add-circle-o fa-lg" | ||
}, | ||
{ | ||
"title": "Edit Selected Middleware Provider", | ||
"disabled": true, | ||
"icon": "pficon pficon-edit fa-lg" | ||
}, | ||
{ | ||
"title": "Remove Middleware Providers from the VMDB", | ||
"disabled": true, | ||
"icon": "pficon pficon-delete fa-lg" | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "Policy", | ||
"icon": "fa fa-shield fa-lg", | ||
"disabled": true, | ||
"children": [ | ||
{ | ||
"title": "Edit Tags", | ||
"disabled": true, | ||
"icon": "pficon pficon-edit fa-lg" | ||
} | ||
] | ||
} | ||
[ | ||
{ | ||
"id": "ems_middleware_vmdb_choice", | ||
"type": "buttonSelect", | ||
"img": "ems_middleware_vmdb_choice.png", | ||
"imgdis": "ems_middleware_vmdb_choice.png", | ||
"icon": "fa fa-cog fa-lg", | ||
"name": "ems_middleware_vmdb_choice", | ||
"hidden": false, | ||
"pressed": null, | ||
"onwhen": null, | ||
"data": null, | ||
"enabled": true, | ||
"title": "Configuration", | ||
"text": "Configuration", | ||
"items": [ | ||
{ | ||
"child_id": "ems_middleware_new", | ||
"id": "ems_middleware_vmdb_choice__ems_middleware_new", | ||
"type": "button", | ||
"img": "ems_middleware_new.png", | ||
"imgdis": "ems_middleware_new.png", | ||
"icon": "pficon pficon-add-circle-o fa-lg", | ||
"name": "ems_middleware_vmdb_choice__ems_middleware_new", | ||
"hidden": false, | ||
"pressed": null, | ||
"onwhen": null, | ||
"data": null, | ||
"enabled": true, | ||
"title": "Add a New Middleware Provider", | ||
"text": "Add a New Middleware Provider", | ||
"url": "/new" | ||
}, | ||
{ | ||
"child_id": "ems_middleware_edit", | ||
"id": "ems_middleware_vmdb_choice__ems_middleware_edit", | ||
"type": "button", | ||
"img": "ems_middleware_edit.png", | ||
"imgdis": "ems_middleware_edit.png", | ||
"icon": "pficon pficon-edit fa-lg", | ||
"name": "ems_middleware_vmdb_choice__ems_middleware_edit", | ||
"hidden": false, | ||
"pressed": null, | ||
"onwhen": "1", | ||
"data": null, | ||
"enabled": false, | ||
"title": "Select a single Middleware Provider to edit", | ||
"text": "Edit Selected Middleware Provider", | ||
"url_parms": "main_div" | ||
}, | ||
{ | ||
"child_id": "ems_middleware_delete", | ||
"id": "ems_middleware_vmdb_choice__ems_middleware_delete", | ||
"type": "button", | ||
"img": "ems_middleware_delete.png", | ||
"imgdis": "ems_middleware_delete.png", | ||
"icon": "pficon pficon-delete fa-lg", | ||
"name": "ems_middleware_vmdb_choice__ems_middleware_delete", | ||
"hidden": false, | ||
"pressed": null, | ||
"onwhen": "1+", | ||
"data": null, | ||
"enabled": false, | ||
"title": "Remove selected Middleware Providers from the VMDB", | ||
"text": "Remove Middleware Providers from the VMDB", | ||
"confirm": "Warning: The selected Middleware Providers and ALL of their components will be permanently removed from the Virtual Management Database. Are you sure you want to remove the selected Middleware Providers?", | ||
"url_parms": "main_div" | ||
} | ||
] | ||
}, | ||
{ | ||
"id": "ems_middleware_policy_choice", | ||
"type": "buttonSelect", | ||
"img": "ems_middleware_policy_choice.png", | ||
"imgdis": "ems_middleware_policy_choice.png", | ||
"icon": "fa fa-shield fa-lg", | ||
"name": "ems_middleware_policy_choice", | ||
"hidden": false, | ||
"pressed": null, | ||
"onwhen": "1+", | ||
"data": null, | ||
"enabled": false, | ||
"title": "Policy", | ||
"text": "Policy", | ||
"items": [ | ||
{ | ||
"child_id": "ems_middleware_tag", | ||
"id": "ems_middleware_policy_choice__ems_middleware_tag", | ||
"type": "button", | ||
"img": "ems_middleware_tag.png", | ||
"imgdis": "ems_middleware_tag.png", | ||
"icon": "pficon pficon-edit fa-lg", | ||
"name": "ems_middleware_policy_choice__ems_middleware_tag", | ||
"hidden": false, | ||
"pressed": null, | ||
"onwhen": "1+", | ||
"data": null, | ||
"enabled": false, | ||
"title": "Edit Tags for this Middleware Provider", | ||
"text": "Edit Tags", | ||
"url_parms": "main_div" | ||
} | ||
] | ||
} | ||
], | ||
null | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/// | ||
/// Copyright 2015-2016 Red Hat, Inc. and/or its affiliates | ||
/// and other contributors as indicated by the @author tags. | ||
/// | ||
/// 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. | ||
/// | ||
|
||
///<reference path="../tsd.d.ts"/> | ||
export default class ToolbarSettingsService { | ||
private $http: any; | ||
private MiQDataAccessService: any; | ||
public endpoints = { | ||
settings : '/toolbar_settings' | ||
}; | ||
|
||
public getSettings(isList = false) { | ||
return this.httpGet(this.MiQDataAccessService.getUrlPrefix() + this.endpoints.settings, {'is_list': isList}); | ||
} | ||
|
||
private httpGet(url: string, dataObject: any): any { | ||
return this.$http.get(url, {params: dataObject}) | ||
.then(dataResponse => dataResponse.data); | ||
} | ||
/*@ngInject*/ | ||
public $get($http: any, MiQDataAccessService: any): any { | ||
this.$http = $http; | ||
this.MiQDataAccessService = MiQDataAccessService; | ||
return { | ||
getSettings: (isList) => this.getSettings(isList) | ||
}; | ||
} | ||
} |