![Shu Muto](/assets/img/avatar_default.png)
This patch adds host details view for admin. Change-Id: I99a7429f226bf62edea2f745e844c963099a48e8 Implements: blueprint add-host-panel
52 lines
1.5 KiB
JavaScript
52 lines
1.5 KiB
JavaScript
/**
|
|
* 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.container.hosts.details
|
|
*
|
|
* @description
|
|
* Provides details for host.
|
|
*/
|
|
angular.module('horizon.dashboard.container.hosts.details',
|
|
['horizon.framework.conf', 'horizon.app.core'])
|
|
.run(registerDetails);
|
|
|
|
registerDetails.$inject = [
|
|
'horizon.dashboard.container.hosts.basePath',
|
|
'horizon.dashboard.container.hosts.resourceType',
|
|
'horizon.dashboard.container.hosts.service',
|
|
'horizon.framework.conf.resource-type-registry.service'
|
|
];
|
|
|
|
function registerDetails(
|
|
basePath,
|
|
resourceType,
|
|
hostService,
|
|
registry
|
|
) {
|
|
registry.getResourceType(resourceType)
|
|
.setLoadFunction(hostService.getHostPromise)
|
|
.detailsViews
|
|
.append({
|
|
id: 'hostDetailsOverview',
|
|
name: gettext('Overview'),
|
|
template: basePath + 'details/overview.html'
|
|
});
|
|
}
|
|
})();
|