Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ app.controller('DegradeCtl', ['$scope', '$stateParams', 'DegradeService', 'ngDia
});
};

$scope.onGradeChange = function () {
$scope.currentRule.count = undefined;
$scope.currentRule.slowRatioThreshold = undefined;
};

$scope.saveRule = function () {
if (!DegradeService.checkRuleValid($scope.currentRule)) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
<label class="col-sm-2 control-label">熔断策略</label>
<div class="col-sm-9">
<div class="form-control highlight-border" align="center">
<input type="radio" name="grade" value="0" checked ng-model='currentRule.grade' title="慢调用比例(1.8.0+ 版本生效)" />&nbsp;慢调用比例&nbsp;&nbsp;
<input type="radio" name="grade" value="1" ng-model='currentRule.grade' title="异常比例" />&nbsp;异常比例&nbsp;&nbsp;
<input type="radio" name="grade" value="2" ng-model='currentRule.grade' title="异常数" />&nbsp;异常数
<input type="radio" name="grade" value="0" checked ng-model='currentRule.grade' ng-change="onGradeChange()" title="慢调用比例(1.8.0+ 版本生效)" />&nbsp;慢调用比例&nbsp;&nbsp;
<input type="radio" name="grade" value="1" ng-model='currentRule.grade' ng-change="onGradeChange()" title="异常比例" />&nbsp;异常比例&nbsp;&nbsp;
<input type="radio" name="grade" value="2" ng-model='currentRule.grade' ng-change="onGradeChange()" title="异常数" />&nbsp;异常数
</div>
</div>
</div>
Expand Down