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 2021/02/23 06:49:35 UTC

[GitHub] [apisix-dashboard] LiteSun commented on issue #1399: support to show raw data for Route, Upstream, Service and so on

LiteSun commented on issue #1399:
URL: https://github.com/apache/apisix-dashboard/issues/1399#issuecomment-783952635


   ## Solutions design:
   On the page, in the list of route, service, consumer and upstream, add a view button. When the user clicks view, a Drawer will pop up on the right side, and the corresponding data will be displayed in the form of json in the Drawer.
   
   ![image](https://user-images.githubusercontent.com/31329157/108809901-cc914d80-75e4-11eb-9115-a4be803288b2.png)
   ![image](https://user-images.githubusercontent.com/31329157/108809910-d450f200-75e4-11eb-9913-97db3fc3fd93.png)
   
   The code editor uses codemirror, the same as the plugin editor;
   - documents: When clicked, it will jump to the corresponding document.
   - format: When clicked, it will format the current code.
   - copy: When clicked, the code will be copied to the clipboard for testing and debugging purposes.
   
   ## Discussion needed:
   If the user uses raw data for editing, the edited data is missing fields that the front-end depends on, which can cause the page to crash.
   For example, the following issue: https://github.com/apache/apisix-dashboard/issues/1234 
   
   Can we use jsonchema to verify that the data entered by the user is legitimate, just like we verify that the plugin is legitimate?
   
   @juzhiyuan @nic-chen @liuxiran 


----------------------------------------------------------------
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