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


   Please answer these questions before submitting a pull request
   
   - Why submit this pull request?
   - [ ] Bug fix
   - [ ] New feature provided
   - [ ] Improve performance
   
   - Related issues
   **fix issue: #417  in frontend**
   ___
   ### Bugfix
   - Description
   
   - How to fix?
   
   The modification of the front end consists of two aspects:
   1. add enable_websocket to upstream module,so that user can control with 
manage upstream.
   
   1. in route module, websocket also changes with its upstream, if use a 
upstream already exited, websocket is disabled, the value is the same with its 
upstream enable_websocket value; if use a manually upstream, websocket can be 
edit, and it will pass in upstream object.
   
   
   * UI changed like this
     *  create/edit upstream
   ![2020-08-29 
16-22-25屏幕截图](https://user-images.githubusercontent.com/2561857/91632530-fee63780-ea13-11ea-8cfc-88d52bc7cd82.png)
   ![2020-08-29 
16-24-08屏幕截图](https://user-images.githubusercontent.com/2561857/91632554-19b8ac00-ea14-11ea-9eb0-89121fc2f2a1.png)
     * create/edit route with upstream already exited
   ![2020-08-29 
16-25-55屏幕截图](https://user-images.githubusercontent.com/2561857/91632589-61d7ce80-ea14-11ea-8472-0c5ecf326235.png)
     * create/edit route with manually upstream
   ![2020-08-29 
16-40-47屏幕截图](https://user-images.githubusercontent.com/2561857/91632865-6ef5bd00-ea16-11ea-8d73-bf7f29913836.png)
   
   
   
   ### New feature or improvement
   - Describe the details and related test reports.
   
   the modify idea come from :
   
   1. https://github.com/apache/apisix/blob/master/doc/admin-api.md#upstream
   enable_websocket come from upstream, so UI should enable to modify this key;
   
   1. the manage-api now has some logic that could not be understood, like
   
https://github.com/apache/apisix-dashboard/blob/master/api/service/route.go#L480
   
https://github.com/apache/apisix-dashboard/blob/master/api/service/route.go#L193
   
   1. this update is only modifiy the logic in frontend, even if not change the 
manage-api, It can still work fine
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to