Skip to content

Commit

Permalink
dashboard: Update text of rule pages
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Zhao <[email protected]>
  • Loading branch information
sczyh30 committed Jul 5, 2021
1 parent 0b5f619 commit 270eab4
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ app.controller('DegradeCtl', ['$scope', '$stateParams', 'DegradeService', 'ngDia
$scope.editRule = function (rule) {
$scope.currentRule = angular.copy(rule);
$scope.degradeRuleDialog = {
title: '编辑降级规则',
title: '编辑熔断规则',
type: 'edit',
confirmBtnText: '保存'
};
Expand All @@ -71,7 +71,7 @@ app.controller('DegradeCtl', ['$scope', '$stateParams', 'DegradeService', 'ngDia
statIntervalMs: 1000,
};
$scope.degradeRuleDialog = {
title: '新增降级规则',
title: '新增熔断规则',
type: 'add',
confirmBtnText: '新增'
};
Expand Down Expand Up @@ -111,11 +111,11 @@ app.controller('DegradeCtl', ['$scope', '$stateParams', 'DegradeService', 'ngDia
$scope.deleteRule = function (rule) {
$scope.currentRule = rule;
$scope.confirmDialog = {
title: '删除降级规则',
title: '删除熔断规则',
type: 'delete_rule',
attentionTitle: '请确认是否删除如下降级规则',
attentionTitle: '请确认是否删除如下熔断规则',
attention: '资源名: ' + rule.resource +
', 降级模式: ' + parseDegradeMode(rule.grade) + ', 阈值: ' + rule.count,
', 熔断策略: ' + parseDegradeMode(rule.grade) + ', 阈值: ' + rule.count,
confirmBtnText: '删除',
};
confirmDialog = ngDialog.open({
Expand Down Expand Up @@ -173,7 +173,7 @@ app.controller('DegradeCtl', ['$scope', '$stateParams', 'DegradeService', 'ngDia
function queryAppMachines() {
MachineService.getAppMachines($scope.app).success(
function (data) {
if (data.code == 0) {
if (data.code === 0) {
// $scope.machines = data.data;
if (data.data) {
$scope.machines = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ app.controller('IdentityCtl', ['$scope', '$stateParams', 'IdentityService',
};

degradeRuleDialogScope.degradeRuleDialog = {
title: '新增降级规则',
title: '新增熔断规则',
type: 'add',
confirmBtnText: '新增',
saveAndContinueBtnText: '新增并继续添加'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

<li ui-sref-active="active">
<a ui-sref="dashboard.degrade({app: entry.app})">
<i class="glyphicon glyphicon-flash"></i>&nbsp;&nbsp;降级规则</a>
<i class="glyphicon glyphicon-flash"></i>&nbsp;&nbsp;熔断规则</a>
</li>
<li ui-sref-active="active" ng-if="!entry.isGateway">
<a ui-sref="dashboard.paramFlow({app: entry.app})">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</div>
<div class="col-md-6">
<button class="btn btn-default-inverse" style="float: right; margin-right: 10px;" ng-disabled="!macInputModel" ng-click="addNewRule()">
<i class="fa fa-plus"></i>&nbsp;&nbsp;新增降级规则</button>
<i class="fa fa-plus"></i>&nbsp;&nbsp;新增熔断规则</button>
</div>
</div>

Expand All @@ -15,7 +15,7 @@
<div class="col-md-12">
<div class="card">
<div class="inputs-header">
<span class="brand" style="font-size: 13px;">降级规则</span>
<span class="brand" style="font-size: 13px;">熔断规则</span>
<!--<button class="btn btn-danger" style="float: right;margin-right: 10px;height: 30px;font-size: 12px;" ng-click="disableAll()">全部禁用</button>-->
<button class="btn btn-primary" style="float: right; margin-right: 10px; height: 30px;font-size: 12px;" ng-click="getMachineRules()">刷新</button>
<input class="form-control witdh-200" placeholder="关键字" ng-model="searchKey">
Expand All @@ -34,7 +34,7 @@
资源名
</td>
<td style="width: 10%;">
降级策略
熔断策略
</td>
<td style="width: 10%;">
阈值
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div class="col-sm-4">
<div class="form-control highlight-border" align="center">
<input type="radio" name="grade" value="1" checked ng-model='currentRule.grade' />&nbsp;QPS&nbsp;&nbsp;
<input type="radio" name="grade" value="0" ng-model='currentRule.grade' />&nbsp;线程数
<input type="radio" name="grade" value="0" ng-model='currentRule.grade' />&nbsp;并发线程数
</div>
</div>
<div ng-if="!currentRule.clusterMode">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</td>
<td style="width: 7%;">通过QPS</td>
<td style="width: 7%;">拒绝QPS</td>
<td style="width: 5%;">线程数</td>
<td style="width: 5%;">并发数</td>
<td style="width: 6%;">平均RT</td>
<td style="width: 6%;">分钟通过</td>
<td style="width: 6%;">分钟拒绝</td>
Expand Down Expand Up @@ -73,7 +73,7 @@
<button class="btn btn-xs btn-default" type="button" ng-click="addNewFlowRule(resource.resource)" style="font-size: 12px; height:25px;">
<i class="fa fa-plus"></i>&nbsp;流控</button>
<button class="btn btn-xs btn-default" type="button" ng-click="addNewDegradeRule(resource.resource)" style="font-size: 12px; height:25px;">
<i class="fa fa-plus"></i>&nbsp;降级</button>
<i class="fa fa-plus"></i>&nbsp;熔断</button>
<button class="btn btn-xs btn-default" type="button" ng-click="addNewParamFlowRule(resource.resource)" style="font-size: 12px; height:25px;">
<i class="fa fa-plus"></i>&nbsp;热点</button>
<button class="btn btn-xs btn-default" type="button" ng-click="addNewAuthorityRule(resource.resource)" style="font-size: 12px; height:25px;">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<tr dir-paginate="rule in rules | filter : searchKey | itemsPerPage: rulesPageConfig.pageSize " current-page="rulesPageConfig.currentPageIndex"
pagination-id="entriesPagination">
<td style="word-wrap:break-word;word-break:break-all;">
<span ng-if="rule.highestSystemLoad >= 0">系统 load</span>
<span ng-if="rule.highestSystemLoad >= 0">系统 load(自适应)</span>
<span ng-if="rule.avgRt >= 0">平均 RT</span>
<span ng-if="rule.maxThread >= 0">并发数</span>
<span ng-if="rule.qps >= 0">入口 QPS</span>
Expand Down

0 comments on commit 270eab4

Please sign in to comment.