iss #71 - Added text metrics editor.

This commit is contained in:
Alexander Zobnin
2015-08-18 20:39:01 +03:00
parent 5961978828
commit 9ec32b26e8
3 changed files with 50 additions and 33 deletions

View File

@@ -13,17 +13,7 @@ define([
$scope.init = function () {
$scope.targetLetters = targetLetters;
if ($scope.target.mode === 1) {
$scope.slaPropertyList = [
{name: "Status", property: "status"},
{name: "SLA", property: "sla"},
{name: "OK time", property: "okTime"},
{name: "Problem time", property: "problemTime"},
{name: "Down time", property: "downtimeTime"}
];
$scope.itserviceList = [{name: "test"}];
$scope.updateITServiceList();
} else {
if (!$scope.target.mode || $scope.target.mode === 0) {
$scope.downsampleFunctionList = [
{name: "avg", value: "avg"},
{name: "min", value: "min"},
@@ -34,12 +24,14 @@ define([
if (!$scope.target.downsampleFunction) {
$scope.target.downsampleFunction = $scope.downsampleFunctionList[0];
}
$scope.metric = {
hostGroupList: [],
hostList: [{name: '*', visible_name: 'All'}],
applicationList: [{name: '*', visible_name: 'All'}],
itemList: [{name: 'All'}]
};
if (!$scope.metric) {
$scope.metric = {
hostGroupList: [],
hostList: [{name: '*', visible_name: 'All'}],
applicationList: [{name: '*', visible_name: 'All'}],
itemList: [{name: 'All'}]
};
}
// Update host group, host, application and item lists
$scope.updateGroupList();
@@ -49,6 +41,17 @@ define([
setItemAlias();
}
else if ($scope.target.mode === 1) {
$scope.slaPropertyList = [
{name: "Status", property: "status"},
{name: "SLA", property: "sla"},
{name: "OK time", property: "okTime"},
{name: "Problem time", property: "problemTime"},
{name: "Down time", property: "downtimeTime"}
];
$scope.itserviceList = [{name: "test"}];
$scope.updateITServiceList();
}
$scope.target.errors = validateTarget($scope.target);
};