@@ -20,13 +20,13 @@ app.service('SystemService', ['$http', function ($http) { | |||||
ip: rule.ip, | ip: rule.ip, | ||||
port: rule.port | port: rule.port | ||||
}; | }; | ||||
if (rule.grade === 0) {// avgLoad | |||||
if (rule.grade == 0) {// avgLoad | |||||
param.avgLoad = rule.avgLoad; | param.avgLoad = rule.avgLoad; | ||||
} else if (rule.grade === 1) {// avgRt | |||||
} else if (rule.grade == 1) {// avgRt | |||||
param.avgRt = rule.avgRt; | param.avgRt = rule.avgRt; | ||||
} else if (rule.grade === 2) {// maxThread | |||||
} else if (rule.grade == 2) {// maxThread | |||||
param.maxThread = rule.maxThread; | param.maxThread = rule.maxThread; | ||||
} else if (rule.grade === 3) {// qps | |||||
} else if (rule.grade == 3) {// qps | |||||
param.qps = rule.qps; | param.qps = rule.qps; | ||||
} | } | ||||
@@ -41,13 +41,13 @@ app.service('SystemService', ['$http', function ($http) { | |||||
var param = { | var param = { | ||||
id: rule.id, | id: rule.id, | ||||
}; | }; | ||||
if (rule.grade === 0) {// avgLoad | |||||
if (rule.grade == 0) {// avgLoad | |||||
param.avgLoad = rule.avgLoad; | param.avgLoad = rule.avgLoad; | ||||
} else if (rule.grade === 1) {// avgRt | |||||
} else if (rule.grade == 1) {// avgRt | |||||
param.avgRt = rule.avgRt; | param.avgRt = rule.avgRt; | ||||
} else if (rule.grade === 2) {// maxThread | |||||
} else if (rule.grade == 2) {// maxThread | |||||
param.maxThread = rule.maxThread; | param.maxThread = rule.maxThread; | ||||
} else if (rule.grade === 3) {// qps | |||||
} else if (rule.grade == 3) {// qps | |||||
param.qps = rule.qps; | param.qps = rule.qps; | ||||
} | } | ||||
return $http({ | return $http({ | ||||
@@ -35,13 +35,13 @@ | |||||
<div class="form-group"> | <div class="form-group"> | ||||
<label class="col-sm-2 control-label">阈值</label> | <label class="col-sm-2 control-label">阈值</label> | ||||
<div class="col-sm-9"> | <div class="col-sm-9"> | ||||
<input type='number' class="form-control highlight-border" ng-model='currentRule.avgLoad' placeholder="阈值" ng-if="currentRule.grade == 0" | |||||
<input type='number' class="form-control highlight-border" ng-model='currentRule.avgLoad' placeholder="[0, ~)的小数" ng-if="currentRule.grade == 0" | |||||
/> | /> | ||||
<input type='number' class="form-control highlight-border" ng-model='currentRule.avgRt' placeholder="阈值" ng-if="currentRule.grade == 1" | |||||
<input type='number' class="form-control highlight-border" ng-model='currentRule.avgRt' placeholder="[0, ~)的整数" ng-if="currentRule.grade == 1" | |||||
/> | /> | ||||
<input type='number' class="form-control highlight-border" ng-model='currentRule.maxThread' placeholder="阈值" ng-if="currentRule.grade == 2" | |||||
<input type='number' class="form-control highlight-border" ng-model='currentRule.maxThread' placeholder="[0, ~)的整数" ng-if="currentRule.grade == 2" | |||||
/> | /> | ||||
<input type='number' class="form-control highlight-border" ng-model='currentRule.qps' placeholder="阈值" ng-if="currentRule.grade == 3" | |||||
<input type='number' class="form-control highlight-border" ng-model='currentRule.qps' placeholder="[0, ~)的小数" ng-if="currentRule.grade == 3" | |||||
/> | /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||