diff --git a/sentinel-dashboard/src/main/webapp/resources/app/scripts/controllers/gateway/api.js b/sentinel-dashboard/src/main/webapp/resources/app/scripts/controllers/gateway/api.js
index 8e66b113..ccf2497c 100644
--- a/sentinel-dashboard/src/main/webapp/resources/app/scripts/controllers/gateway/api.js
+++ b/sentinel-dashboard/src/main/webapp/resources/app/scripts/controllers/gateway/api.js
@@ -72,13 +72,13 @@ app.controller('GatewayApiCtl', ['$scope', '$stateParams', 'GatewayApiService',
$scope.editApi = function (api) {
$scope.currentApi = angular.copy(api);
$scope.gatewayApiDialog = {
- title: '编辑自定义API',
+ title: '编辑自定义 API',
type: 'edit',
confirmBtnText: '保存'
};
gatewayApiDialog = ngDialog.open({
template: '/app/views/dialog/gateway/api-dialog.html',
- width: 840,
+ width: 900,
overlay: true,
scope: $scope
});
@@ -94,13 +94,13 @@ app.controller('GatewayApiCtl', ['$scope', '$stateParams', 'GatewayApiService',
predicateItems: [{matchStrategy: 0, pattern: ''}]
};
$scope.gatewayApiDialog = {
- title: '新增自定义API',
+ title: '新增自定义 API',
type: 'add',
confirmBtnText: '新增'
};
gatewayApiDialog = ngDialog.open({
template: '/app/views/dialog/gateway/api-dialog.html',
- width: 840,
+ width: 900,
overlay: true,
scope: $scope
});
diff --git a/sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/sidebar/sidebar.html b/sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/sidebar/sidebar.html
index 623e889a..a7212629 100755
--- a/sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/sidebar/sidebar.html
+++ b/sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/sidebar/sidebar.html
@@ -19,7 +19,7 @@
{{entry.app}}
- ({{entry.heathyCount}}/{{entry.machines.length}})
+ ({{entry.healthyCount}}/{{entry.machines.length}})
@@ -29,12 +29,12 @@
实时监控
-
+
簇点链路
-
+
请求链路
@@ -44,16 +44,16 @@
-
+
- API管理
+ API 管理
-
+
流控规则
-
+
流控规则
@@ -62,7 +62,7 @@
降级规则
-
+
热点规则
@@ -70,11 +70,11 @@
系统规则
-
+
授权规则
-
+
集群流控
diff --git a/sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/sidebar/sidebar.js b/sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/sidebar/sidebar.js
index 64ed684b..7ef57401 100755
--- a/sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/sidebar/sidebar.js
+++ b/sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/sidebar/sidebar.js
@@ -1,9 +1,3 @@
-/**
- * @ngdoc directive
- * @name izzyposWebApp.directive:adminPosHeader
- * @description # adminPosHeader
- */
-
angular.module('sentinelDashboardApp')
.directive('sidebar', ['$location', '$stateParams', 'AppService', function () {
return {
@@ -20,20 +14,23 @@ angular.module('sentinelDashboardApp')
AppService.getApps().success(
function (data) {
if (data.code === 0) {
- var path = $location.path().split('/');
+ let path = $location.path().split('/');
let initHashApp = path[path.length - 1];
$scope.apps = data.data;
$scope.apps = $scope.apps.map(function (item) {
if (item.app === initHashApp) {
item.active = true;
}
- var heathyCount = 0;
- for (var i in item.machines) {
+ let healthyCount = 0;
+ for (let i in item.machines) {
if (item.machines[i].healthy) {
- heathyCount++;
+ healthyCount++;
}
}
- item.heathyCount = heathyCount;
+ item.healthyCount = healthyCount;
+ // Handle appType
+ item.isGateway = item.appType === 1 || item.appType === 11 || item.appType === 12;
+
if (item.shown) {
return item;
}
@@ -47,8 +44,8 @@ angular.module('sentinelDashboardApp')
let entry = angular.element($event.target).scope().entry;
entry.active = !entry.active;// toggle this clicked app bar
- $scope.apps.forEach(function (item) {// collapse other app bars
- if (item != entry) {
+ $scope.apps.forEach(function (item) { // collapse other app bars
+ if (item !== entry) {
item.active = false;
}
});
diff --git a/sentinel-dashboard/src/main/webapp/resources/app/views/dialog/gateway/api-dialog.html b/sentinel-dashboard/src/main/webapp/resources/app/views/dialog/gateway/api-dialog.html
index d58f48f9..fb0edb59 100644
--- a/sentinel-dashboard/src/main/webapp/resources/app/views/dialog/gateway/api-dialog.html
+++ b/sentinel-dashboard/src/main/webapp/resources/app/views/dialog/gateway/api-dialog.html
@@ -5,7 +5,7 @@