dashboard: Update text of rule pages

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
This commit is contained in:
Eric Zhao 2021-07-05 19:38:36 +08:00
parent 0b5f6196e5
commit 270eab47fe
7 changed files with 15 additions and 15 deletions

View File

@ -47,7 +47,7 @@ app.controller('DegradeCtl', ['$scope', '$stateParams', 'DegradeService', 'ngDia
$scope.editRule = function (rule) { $scope.editRule = function (rule) {
$scope.currentRule = angular.copy(rule); $scope.currentRule = angular.copy(rule);
$scope.degradeRuleDialog = { $scope.degradeRuleDialog = {
title: '编辑降级规则', title: '编辑熔断规则',
type: 'edit', type: 'edit',
confirmBtnText: '保存' confirmBtnText: '保存'
}; };
@ -71,7 +71,7 @@ app.controller('DegradeCtl', ['$scope', '$stateParams', 'DegradeService', 'ngDia
statIntervalMs: 1000, statIntervalMs: 1000,
}; };
$scope.degradeRuleDialog = { $scope.degradeRuleDialog = {
title: '新增降级规则', title: '新增熔断规则',
type: 'add', type: 'add',
confirmBtnText: '新增' confirmBtnText: '新增'
}; };
@ -111,11 +111,11 @@ app.controller('DegradeCtl', ['$scope', '$stateParams', 'DegradeService', 'ngDia
$scope.deleteRule = function (rule) { $scope.deleteRule = function (rule) {
$scope.currentRule = rule; $scope.currentRule = rule;
$scope.confirmDialog = { $scope.confirmDialog = {
title: '删除降级规则', title: '删除熔断规则',
type: 'delete_rule', type: 'delete_rule',
attentionTitle: '请确认是否删除如下降级规则', attentionTitle: '请确认是否删除如下熔断规则',
attention: '资源名: ' + rule.resource + attention: '资源名: ' + rule.resource +
', 降级模式: ' + parseDegradeMode(rule.grade) + ', 阈值: ' + rule.count, ', 熔断策略: ' + parseDegradeMode(rule.grade) + ', 阈值: ' + rule.count,
confirmBtnText: '删除', confirmBtnText: '删除',
}; };
confirmDialog = ngDialog.open({ confirmDialog = ngDialog.open({
@ -173,7 +173,7 @@ app.controller('DegradeCtl', ['$scope', '$stateParams', 'DegradeService', 'ngDia
function queryAppMachines() { function queryAppMachines() {
MachineService.getAppMachines($scope.app).success( MachineService.getAppMachines($scope.app).success(
function (data) { function (data) {
if (data.code == 0) { if (data.code === 0) {
// $scope.machines = data.data; // $scope.machines = data.data;
if (data.data) { if (data.data) {
$scope.machines = []; $scope.machines = [];

View File

@ -140,7 +140,7 @@ app.controller('IdentityCtl', ['$scope', '$stateParams', 'IdentityService',
}; };
degradeRuleDialogScope.degradeRuleDialog = { degradeRuleDialogScope.degradeRuleDialog = {
title: '新增降级规则', title: '新增熔断规则',
type: 'add', type: 'add',
confirmBtnText: '新增', confirmBtnText: '新增',
saveAndContinueBtnText: '新增并继续添加' saveAndContinueBtnText: '新增并继续添加'

View File

@ -60,7 +60,7 @@
<li ui-sref-active="active"> <li ui-sref-active="active">
<a ui-sref="dashboard.degrade({app: entry.app})"> <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>
<li ui-sref-active="active" ng-if="!entry.isGateway"> <li ui-sref-active="active" ng-if="!entry.isGateway">
<a ui-sref="dashboard.paramFlow({app: entry.app})"> <a ui-sref="dashboard.paramFlow({app: entry.app})">

View File

@ -4,7 +4,7 @@
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<button class="btn btn-default-inverse" style="float: right; margin-right: 10px;" ng-disabled="!macInputModel" ng-click="addNewRule()"> <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>
</div> </div>
@ -15,7 +15,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="card"> <div class="card">
<div class="inputs-header"> <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-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> <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"> <input class="form-control witdh-200" placeholder="关键字" ng-model="searchKey">
@ -34,7 +34,7 @@
资源名 资源名
</td> </td>
<td style="width: 10%;"> <td style="width: 10%;">
降级策略 熔断策略
</td> </td>
<td style="width: 10%;"> <td style="width: 10%;">
阈值 阈值

View File

@ -27,7 +27,7 @@
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-control highlight-border" align="center"> <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="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> </div>
<div ng-if="!currentRule.clusterMode"> <div ng-if="!currentRule.clusterMode">

View File

@ -43,7 +43,7 @@
</td> </td>
<td style="width: 7%;">通过QPS</td> <td style="width: 7%;">通过QPS</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%;">平均RT</td>
<td style="width: 6%;">分钟通过</td> <td style="width: 6%;">分钟通过</td>
<td style="width: 6%;">分钟拒绝</td> <td style="width: 6%;">分钟拒绝</td>
@ -73,7 +73,7 @@
<button class="btn btn-xs btn-default" type="button" ng-click="addNewFlowRule(resource.resource)" style="font-size: 12px; height:25px;"> <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> <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;"> <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;"> <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> <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;"> <button class="btn btn-xs btn-default" type="button" ng-click="addNewAuthorityRule(resource.resource)" style="font-size: 12px; height:25px;">

View File

@ -45,7 +45,7 @@
<tr dir-paginate="rule in rules | filter : searchKey | itemsPerPage: rulesPageConfig.pageSize " current-page="rulesPageConfig.currentPageIndex" <tr dir-paginate="rule in rules | filter : searchKey | itemsPerPage: rulesPageConfig.pageSize " current-page="rulesPageConfig.currentPageIndex"
pagination-id="entriesPagination"> pagination-id="entriesPagination">
<td style="word-wrap:break-word;word-break:break-all;"> <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.avgRt >= 0">平均 RT</span>
<span ng-if="rule.maxThread >= 0">并发数</span> <span ng-if="rule.maxThread >= 0">并发数</span>
<span ng-if="rule.qps >= 0">入口 QPS</span> <span ng-if="rule.qps >= 0">入口 QPS</span>