Remove templates service and host
Change-Id: I334b715891186abd0b82a123b47e7c05a3d50e7b
This commit is contained in:
parent
6b94e92be3
commit
e26236ac74
@ -18,8 +18,6 @@ angular.module('bansho', [
|
||||
'bansho.drupal.info',
|
||||
'bansho.view',
|
||||
'bansho.view.page',
|
||||
'bansho.view.host',
|
||||
'bansho.view.service',
|
||||
'bansho.view.config',
|
||||
'bansho.view.drupalDashboard',
|
||||
'bansho.view.drupal',
|
||||
|
@ -614,7 +614,7 @@
|
||||
]
|
||||
},
|
||||
"host": {
|
||||
"template": "host",
|
||||
"template": "page",
|
||||
"components": [
|
||||
{
|
||||
"type": "panel",
|
||||
@ -657,7 +657,7 @@
|
||||
]
|
||||
},
|
||||
"service": {
|
||||
"template": "service",
|
||||
"template": "page",
|
||||
"components": [
|
||||
{
|
||||
"type": "panel",
|
||||
|
@ -11,7 +11,7 @@ angular.module('bansho.host', ['bansho.datasource'])
|
||||
templateUrl: 'components/directive/host/host.html',
|
||||
controller: ['$scope', 'templateManager', 'surveilStatus', 'surveilConfig', 'iframeUrl',
|
||||
function ($scope, templateManager, surveilStatus, surveilConfig, iframeUrl) {
|
||||
var hostname = templateManager.getPageParam('hostname');
|
||||
var hostname = templateManager.getPageParam('host_name');
|
||||
|
||||
$scope.param = {
|
||||
host: {},
|
||||
|
@ -10,7 +10,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="service in param.host.services">
|
||||
<td><a href="#/view?view=service&host_name={{service.service_host_name}}&description={{service.service_service_description}}">{{service.service_service_description}}</a>
|
||||
<td><a href="#/view?view=service&host_name={{service.service_host_name}}&service_description={{service.service_service_description}}">{{service.service_service_description}}</a>
|
||||
<td>{{service.service_acknowledged ? "Yes" : "No"}}</td>
|
||||
<td bansho-service-state-icon state="service.service_state">
|
||||
<span class="data-table__data">{{service.service_state}}</span>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<dl class="problems__desclist" data-ng-repeat="service in host">
|
||||
<span data-ng-show="service.service_service_description">
|
||||
<dt class="problems__name" bansho-service-state-icon state="service.service_state">
|
||||
<a href="#/view?view=service&host_name={{key}}&description={{service.service_service_description}}">
|
||||
<a href="#/view?view=service&host_name={{key}}&service_description={{service.service_service_description}}">
|
||||
{{service.service_service_description}}
|
||||
</a>
|
||||
<small class="problems__duration">2 days, 8 hours</small>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<td class="data-table__service {{state}}" ng-controller="CellStatusServiceCheckCtrl">
|
||||
<dl class="data-table__data">
|
||||
<dt class="data-table__service__name">
|
||||
<a href="#/view?view=service&host_name={{entry.host_host_name}}&description={{entry.service_service_description}}">{{entry.service_service_description}}</a>
|
||||
<a href="#/view?view=service&host_name={{entry.host_host_name}}&service_description={{entry.service_service_description}}">{{entry.service_service_description}}</a>
|
||||
</dt>
|
||||
<dd class="data-table__service__summary">{{entry.service_plugin_output}}</dd>
|
||||
</dl>
|
||||
|
@ -124,9 +124,7 @@
|
||||
<script src="routing_view/routing_view.js"></script>
|
||||
<script src="templates/template.js"></script>
|
||||
<script src="templates/page/page.js"></script>
|
||||
<script src="templates/host/host.js"></script>
|
||||
<script src="templates/config/config.js"></script>
|
||||
<script src="templates/service/service.js"></script>
|
||||
<script src="templates/drupal_dashboard/drupal_dashboard.js"></script>
|
||||
<script src="templates/drupal/drupal.js"></script>
|
||||
<!-- endbuild -->
|
||||
|
@ -1,3 +0,0 @@
|
||||
<article ng-controller="HostViewCtrl">
|
||||
<bansho-components components="components"></bansho-components>
|
||||
</article>
|
@ -1,15 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('bansho.view.host', ['bansho.datasource'])
|
||||
|
||||
.controller('HostViewCtrl', ['$scope', '$routeParams', 'configManager', 'templateManager',
|
||||
function ($scope, $routeParams, configManager, templateManager) {
|
||||
var hostname = $routeParams.host_name;
|
||||
|
||||
$scope.components = configManager.getConfigData($scope.viewName).components;
|
||||
if (!hostname) {
|
||||
throw new Error("ERROR :'host_name' GET parameter must be set");
|
||||
} else {
|
||||
templateManager.setPageParam('hostname', hostname);
|
||||
}
|
||||
}]);
|
@ -1,9 +1,14 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('bansho.view.page', ['bansho.table', 'bansho.tactical'])
|
||||
.controller('PageCtrl', ['$scope', 'configManager', 'templateManager',
|
||||
function ($scope, configManager, templateManager) {
|
||||
.controller('PageCtrl', ['$scope', '$routeParams', 'configManager', 'templateManager',
|
||||
function ($scope, $routeParams, configManager, templateManager) {
|
||||
templateManager.setLayout($scope.viewName);
|
||||
|
||||
angular.forEach($routeParams, function (value, key) {
|
||||
templateManager.setPageParam(key, value);
|
||||
});
|
||||
|
||||
$scope.components = templateManager.getLayoutComponents();
|
||||
}])
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
<article ng-controller="ServiceViewCtrl">
|
||||
<bansho-components components="components"></bansho-components>
|
||||
</article>
|
@ -1,18 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
angular.module("bansho.view.service", [ "bansho.surveil" ])
|
||||
|
||||
.controller("ServiceViewCtrl", ['$scope', '$routeParams', 'configManager', 'templateManager',
|
||||
function ($scope, $routeParams, configManager, templateManager) {
|
||||
var host_name = $routeParams.host_name,
|
||||
service_description = $routeParams.description;
|
||||
|
||||
$scope.components = configManager.getConfigData($scope.viewName).components;
|
||||
|
||||
if (!host_name || !service_description) {
|
||||
throw new Error("ERROR :'host_name' and 'description' GET parameters must be set");
|
||||
} else {
|
||||
templateManager.setPageParam('host_name', host_name);
|
||||
templateManager.setPageParam('service_description', service_description);
|
||||
}
|
||||
}]);
|
@ -32,6 +32,10 @@ angular.module('bansho.view')
|
||||
pageParam[key] = value;
|
||||
},
|
||||
getPageParam: function (key) {
|
||||
if (pageParam[key] === undefined) {
|
||||
throw new Error("ERROR :'" + key + "' GET parameter must be set in url");
|
||||
}
|
||||
|
||||
return pageParam[key];
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user