You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/11/03 13:33:57 UTC

[GitHub] [apisix-dashboard] LiteSun opened a new pull request #666: fix: promethus incorrect value when update route

LiteSun opened a new pull request #666:
URL: https://github.com/apache/apisix-dashboard/pull/666


   Please answer these questions before submitting a pull request
   
   - Why submit this pull request?
   - [x] Bugfix
   - [ ] New feature provided
   - [ ] Improve performance
   
   - Related issues
   
   ___
   ### Bugfix
   - Description
    Put incorrect Prometheus value when update route. 
    resolved #627 
   
   - How to fix?
   
   ___
   ### New feature or improvement
   - Describe the details and related test reports.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #666: fix: promethus incorrect value when update route

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #666:
URL: https://github.com/apache/apisix-dashboard/pull/666#discussion_r515930685



##########
File path: frontend/src/pages/Route/transform.ts
##########
@@ -152,10 +152,6 @@ export const transformRouteData = (data: RouteModule.Body) => {
 
   const { plugins, script } = data;
 
-  if (plugins && plugins.prometheus) {
-    plugins.prometheus = { enabled: true };

Review comment:
       If we remove this line, and just enabled this plugin, then how about this plugin's status when we use Edit mode? Is it still enabled?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [apisix-dashboard] LiteSun commented on a change in pull request #666: fix: promethus incorrect value when update route

Posted by GitBox <gi...@apache.org>.
LiteSun commented on a change in pull request #666:
URL: https://github.com/apache/apisix-dashboard/pull/666#discussion_r516381892



##########
File path: frontend/src/pages/Route/transform.ts
##########
@@ -152,10 +152,6 @@ export const transformRouteData = (data: RouteModule.Body) => {
 
   const { plugins, script } = data;
 
-  if (plugins && plugins.prometheus) {
-    plugins.prometheus = { enabled: true };

Review comment:
       > If we remove this line, and just enabled this plugin, then how about this plugin's status when we use Edit mode? Is it still enabled?
   
   When we in Edit mode, API will return `plugins:{promethues:{}}`if we enabled it before and it works as expected.
   
   ![image](https://user-images.githubusercontent.com/31329157/97936301-10521400-1db6-11eb-9793-40611eeb9afa.png)
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [apisix-dashboard] juzhiyuan merged pull request #666: fix: promethus incorrect value when update route

Posted by GitBox <gi...@apache.org>.
juzhiyuan merged pull request #666:
URL: https://github.com/apache/apisix-dashboard/pull/666


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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