You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/12/24 06:28:16 UTC

[GitHub] asifdxtreme closed pull request #518: SCB-1070 Add 'TESTING' status in the UI

asifdxtreme closed pull request #518: SCB-1070 Add 'TESTING' status in the UI
URL: https://github.com/apache/servicecomb-service-center/pull/518
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/api-docs.html b/docs/api-docs.html
index 3f221c53..a269c343 100644
--- a/docs/api-docs.html
+++ b/docs/api-docs.html
@@ -1182,7 +1182,7 @@ <h3 class="field-label">Query parameters</h3>
     <div class="field-items">
       <div class="param">value (required)</div>
 
-      <div class="param-desc"><span class="param-type">Query Parameter</span> &mdash; 实例状态 UP在线OUTOFSERVICE摘机STARTING正在启动DOWN下线。 </div>
+      <div class="param-desc"><span class="param-type">Query Parameter</span> &mdash; 实例状态: UP在线,OUTOFSERVICE摘机,STARTING正在启动,DOWN下线,TESTING拨测状态。 </div>
     </div>  <!-- field-items -->
 
 
@@ -3578,7 +3578,7 @@ <h3><a name="MicroServiceInstance"><code>MicroServiceInstance</code> - </a> <a c
 <div class="param">serviceId (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> 微服务唯一标识,创建实例时,以url里面的为准,不用这里的serviceId。 </div>
 <div class="param">hostName </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span>  </div>
 <div class="param">endpoints (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">array[String]</a></span>  </div>
-<div class="param">status </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> 实例状态,UP|DOWN|STARTING|OUTOFSERVICE </div>
+<div class="param">status </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> 实例状态,UP|DOWN|STARTING|OUTOFSERVICE|TESTING </div>
 <div class="param">properties (optional)</div><div class="param-desc"><span class="param-type"><a href="#Properties">Properties</a></span>  </div>
 <div class="param">healthCheck (optional)</div><div class="param-desc"><span class="param-type"><a href="#HealthCheck">HealthCheck</a></span>  </div>
 <div class="param">environment </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> development|testing|acceptance|production </div>
@@ -3614,7 +3614,7 @@ <h3><a name="RegistMicroserviceInstance"><code>RegistMicroserviceInstance</code>
       <div class="param">instanceId (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> 实例ID,不填写会自动填充 </div>
 <div class="param">hostName </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> 机器的hostname </div>
 <div class="param">endpoints (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">array[String]</a></span>  </div>
-<div class="param">status </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> 实例状态,UP|DOWN|STARTING|OUTOFSERVICE </div>
+<div class="param">status </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> 实例状态,UP|DOWN|STARTING|OUTOFSERVICE|TESTING </div>
 <div class="param">properties (optional)</div><div class="param-desc"><span class="param-type"><a href="#Properties">Properties</a></span>  </div>
 <div class="param">healthCheck (optional)</div><div class="param-desc"><span class="param-type"><a href="#HealthCheck">HealthCheck</a></span>  </div>
 <div class="param">environment </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> development|testing|acceptance|production </div>
diff --git a/frontend/app/scripts/languages/locale-en.js b/frontend/app/scripts/languages/locale-en.js
index 27f43563..4fafa646 100644
--- a/frontend/app/scripts/languages/locale-en.js
+++ b/frontend/app/scripts/languages/locale-en.js
@@ -48,6 +48,7 @@ angular.module('serviceCenter')
         "down": "Down",
         "starting": "Starting",
         "outOfService": "Out Of Service",
+        "testing": "Testing",
         "dashboard": "Dashboard",
         "getSchema": "Get Schema",
         "error": "Error",
diff --git a/frontend/app/scripts/languages/locale-zh.js b/frontend/app/scripts/languages/locale-zh.js
index 4dd49846..f8d8f945 100644
--- a/frontend/app/scripts/languages/locale-zh.js
+++ b/frontend/app/scripts/languages/locale-zh.js
@@ -48,6 +48,7 @@ angular.module('serviceCenter')
         "down": "离线",
         "starting": "初始化",
         "outOfService": "暂停服务",
+        "testing": "拨测",
         "dashboard": "仪表板",
         "getSchema": "获取契约",
         "error": "错误",
diff --git a/frontend/app/scripts/modules/dashboard/controllers/dashboardCtrl.js b/frontend/app/scripts/modules/dashboard/controllers/dashboardCtrl.js
index ba2541ff..7f67b2d5 100644
--- a/frontend/app/scripts/modules/dashboard/controllers/dashboardCtrl.js
+++ b/frontend/app/scripts/modules/dashboard/controllers/dashboardCtrl.js
@@ -49,21 +49,27 @@ angular.module('serviceCenter.dashboard', [])
                 },
                 {
                     count: 0,
-                    title: "up",
+                    title: "testing",
                     percent: 0,
-                    status: "UP"
+                    status: "TESTING"
                 },
                 {
                     count: 0,
-                    title: "down",
+                    title: "up",
                     percent: 0,
-                    status: "DOWN"
+                    status: "UP"
                 },
                 {
                     count: 0,
                     title: "outOfService",
                     percent: 0,
                     status: "OUTOFSERVICE"
+                },
+                {
+                    count: 0,
+                    title: "down",
+                    percent: 0,
+                    status: "DOWN"
                 }
             ];
 
@@ -71,6 +77,7 @@ angular.module('serviceCenter.dashboard', [])
             $scope.stoppedServices = [];
             $scope.startingServices = [];
             $scope.outOfServiceServices = [];
+            $scope.testingServices = [];
 
             $scope.totalProviders = [];
             $scope.totalConsumers = [];
@@ -104,6 +111,9 @@ angular.module('serviceCenter.dashboard', [])
                                 if (instance.status == "OUTOFSERVICE") {
                                     $scope.outOfServiceServices.push(services);
                                 }
+                                if (instance.status == "TESTING") {
+                                    $scope.testingServices.push(services);
+                                }
                             });
                             $scope.dashboardInfo[1].count = $scope.dashboardInfo[1].count + services.instances.length;
                         }
@@ -138,14 +148,16 @@ angular.module('serviceCenter.dashboard', [])
                     });
 
                     $scope.instanceStat[0].percent = Math.round($scope.startingServices.length / $scope.dashboardInfo[1].count) * 100;
-                    $scope.instanceStat[1].percent = Math.round($scope.runningServices.length / $scope.dashboardInfo[1].count) * 100;
-                    $scope.instanceStat[2].percent = Math.round($scope.stoppedServices.length / $scope.dashboardInfo[1].count) * 100;
+                    $scope.instanceStat[1].percent = Math.round($scope.testingServices.length / $scope.dashboardInfo[1].count) * 100;
+                    $scope.instanceStat[2].percent = Math.round($scope.runningServices.length / $scope.dashboardInfo[1].count) * 100;
                     $scope.instanceStat[3].percent = Math.round($scope.outOfServiceServices.length / $scope.dashboardInfo[1].count) * 100;
+                    $scope.instanceStat[4].percent = Math.round($scope.stoppedServices.length / $scope.dashboardInfo[1].count) * 100;
 
                     $scope.instanceStat[0].count = $scope.startingServices.length;
-                    $scope.instanceStat[1].count = $scope.runningServices.length;
-                    $scope.instanceStat[2].count = $scope.stoppedServices.length;
+                    $scope.instanceStat[1].count = $scope.testingServices.length;
+                    $scope.instanceStat[2].count = $scope.runningServices.length;
                     $scope.instanceStat[3].count = $scope.outOfServiceServices.length;
+                    $scope.instanceStat[4].count = $scope.stoppedServices.length;
 
                     $scope.dashboardInfo[2].count = $scope.totalProviders.length;
                     $scope.dashboardInfo[3].count = $scope.totalConsumers.length;
diff --git a/frontend/app/scripts/modules/serviceCenter/controllers/servicesListCtrl.js b/frontend/app/scripts/modules/serviceCenter/controllers/servicesListCtrl.js
index 50e5f210..56edfe52 100644
--- a/frontend/app/scripts/modules/serviceCenter/controllers/servicesListCtrl.js
+++ b/frontend/app/scripts/modules/serviceCenter/controllers/servicesListCtrl.js
@@ -51,20 +51,24 @@ angular.module('serviceCenter.sc', [])
                     name: 'All Status'
                 },
                 {
-                    id: 'UP',
-                    name: 'Up'
+                    id: 'STARTING',
+                    name: 'Starting'
                 },
                 {
-                    id: 'DOWN',
-                    name: 'Down'
+                    id: 'TESTING',
+                    name: 'Testing'
                 },
                 {
-                    id: 'STARTING',
-                    name: 'Starting'
+                    id: 'UP',
+                    name: 'Up'
                 },
                 {
                     id: 'OUTOFSERVICE',
                     name: 'Out of service'
+                },
+                {
+                    id: 'DOWN',
+                    name: 'Down'
                 }
             ];
 
diff --git a/frontend/app/scripts/views/tableData.html b/frontend/app/scripts/views/tableData.html
index e811de52..6232760b 100644
--- a/frontend/app/scripts/views/tableData.html
+++ b/frontend/app/scripts/views/tableData.html
@@ -59,9 +59,10 @@
                             </span>
                         <span ng-if="key == 'status'">
                                 <div ng-if="value == 'UP'" class="serviceStatus up" ng-class="{'outofservice' : appData.instances == 0}">{{value}}</div>
-                                <div ng-if="value == 'DOWN'" class="serviceStatus down">{{value}}</div>
                                 <div ng-if="value == 'STARTING'" class="serviceStatus starting">{{value}}</div>
+                                <div ng-if="value == 'TESTING'" class="serviceStatus testing">{{value}}</div>
                                 <div ng-if="value == 'OUTOFSERVICE'" class="serviceStatus outofservice">{{value}}</div>
+                                <div ng-if="value == 'DOWN'" class="serviceStatus down">{{value}}</div>
                             </span>
                         <span ng-if="key == 'operation'">
                                 <md-button class="md-icon-button" ng-disabled="appData.instances != 0" ng-click="remove(appData.serviceId, appData.instances)" aria-label="{{ 'delete' | translate }}" title="{{ 'delete' | translate }}">
diff --git a/server/core/swagger/v4.yaml b/server/core/swagger/v4.yaml
index f70b63df..e029ec5d 100644
--- a/server/core/swagger/v4.yaml
+++ b/server/core/swagger/v4.yaml
@@ -1302,7 +1302,7 @@ paths:
           type: string
         - name: value
           in: query
-          description: 实例状态 UP在线OUTOFSERVICE摘机STARTING正在启动DOWN下线。
+          description: 实例状态: UP在线,OUTOFSERVICE摘机,STARTING正在启动,DOWN下线,TESTING拨测状态。
           required: true
           type: string
       tags:


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services