You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "beginnerWJC (via GitHub)" <gi...@apache.org> on 2023/04/13 10:33:28 UTC

[GitHub] [apisix-dashboard] beginnerWJC opened a new issue, #2789: apisix-dashboard-3.0.0的导入功能,导入后缺少上游和插件部分

beginnerWJC opened a new issue, #2789:
URL: https://github.com/apache/apisix-dashboard/issues/2789

   ### Issue description
   
   apisix-dashboard-3.0.0的导入功能,导入后缺少上游和插件部分
   
   ### Expected behavior
   
   导出的路由json文件导入后可以直接使用,之前apisix-dashboard-2.13.0可以直接导出导入,3.0.0版本会缺少上游和插件部分
   
   ### How to Reproduce
   
   1.新建一个路由,json结构如下:
   `{
     "uri": "/security/v2/security/*",
     "name": "security-local",
     "methods": [
       "GET",
       "POST",
       "PUT",
       "DELETE"
     ],
     "plugins": {
       "ext-plugin-pre-req": {
         "_meta": {
           "disable": false
         },
         "conf": [
           {
             "name": "DefaultValidator",
             "value": ""
           }
         ]
       },
       "response-rewrite": {
         "_meta": {
           "disable": false
         },
         "status_code": 200,
         "vars": [
           "OR",
           [
             "status",
             "==",
             400
           ],
           [
             "status",
             "==",
             401
           ],
           [
             "status",
             "==",
             406
           ]
         ]
       }
     },
     "upstream": {
       "nodes": [
         {
           "host": "192.168.2.14",
           "port": 50003,
           "weight": 1
         }
       ],
       "timeout": {
         "connect": 6,
         "send": 6,
         "read": 6
       },
       "type": "roundrobin",
       "scheme": "http",
       "pass_host": "pass",
       "keepalive_pool": {
         "idle_timeout": 60,
         "requests": 1000,
         "size": 320
       }
     },
     "status": 1
   }`
   2.导出该路由,导出的json结构为:
   `{
     "components": {},
     "info": {
       "title": "RoutesExport",
       "version": "3.0.0"
     },
     "openapi": "3.0.0",
     "paths": {
       "/security/v2/security/{params}": {
         "delete": {
           "operationId": "security-localDELETE",
           "parameters": [{
             "description": "params in path",
             "in": "path",
             "name": "params",
             "required": true,
             "schema": {
               "type": "string"
             }
           }],
           "requestBody": {},
           "responses": {
             "default": {
               "description": ""
             }
           },
           "security": [],
           "x-apisix-enable_websocket": false,
           "x-apisix-id": "456091058716017577",
           "x-apisix-plugins": {
             "ext-plugin-pre-req": {
               "_meta": {
                 "disable": false
               },
               "conf": [{
                 "name": "DefaultValidator",
                 "value": ""
               }]
             },
             "response-rewrite": {
               "_meta": {
                 "disable": false
               },
               "status_code": 200,
               "vars": ["OR", ["status", "==", 400],
                 ["status", "==", 401],
                 ["status", "==", 406]
               ]
             }
           },
           "x-apisix-priority": 0,
           "x-apisix-status": 1,
           "x-apisix-upstream": {
             "nodes": [{
               "host": "192.168.2.14",
               "port": 50003,
               "weight": 1
             }],
             "timeout": {
               "connect": 6,
               "send": 6,
               "read": 6
             },
             "type": "roundrobin",
             "scheme": "http",
             "pass_host": "pass",
             "keepalive_pool": {
               "idle_timeout": 60,
               "requests": 1000,
               "size": 320
             }
           }
         },
         "get": {
           "operationId": "security-localGET",
           "parameters": [{
             "description": "params in path",
             "in": "path",
             "name": "params",
             "required": true,
             "schema": {
               "type": "string"
             }
           }],
           "requestBody": {},
           "responses": {
             "default": {
               "description": ""
             }
           },
           "security": [],
           "x-apisix-enable_websocket": false,
           "x-apisix-id": "456091058716017577",
           "x-apisix-plugins": {
             "ext-plugin-pre-req": {
               "_meta": {
                 "disable": false
               },
               "conf": [{
                 "name": "DefaultValidator",
                 "value": ""
               }]
             },
             "response-rewrite": {
               "_meta": {
                 "disable": false
               },
               "status_code": 200,
               "vars": ["OR", ["status", "==", 400],
                 ["status", "==", 401],
                 ["status", "==", 406]
               ]
             }
           },
           "x-apisix-priority": 0,
           "x-apisix-status": 1,
           "x-apisix-upstream": {
             "nodes": [{
               "host": "192.168.2.14",
               "port": 50003,
               "weight": 1
             }],
             "timeout": {
               "connect": 6,
               "send": 6,
               "read": 6
             },
             "type": "roundrobin",
             "scheme": "http",
             "pass_host": "pass",
             "keepalive_pool": {
               "idle_timeout": 60,
               "requests": 1000,
               "size": 320
             }
           }
         },
         "post": {
           "operationId": "security-localPOST",
           "parameters": [{
             "description": "params in path",
             "in": "path",
             "name": "params",
             "required": true,
             "schema": {
               "type": "string"
             }
           }],
           "requestBody": {},
           "responses": {
             "default": {
               "description": ""
             }
           },
           "security": [],
           "x-apisix-enable_websocket": false,
           "x-apisix-id": "456091058716017577",
           "x-apisix-plugins": {
             "ext-plugin-pre-req": {
               "_meta": {
                 "disable": false
               },
               "conf": [{
                 "name": "DefaultValidator",
                 "value": ""
               }]
             },
             "response-rewrite": {
               "_meta": {
                 "disable": false
               },
               "status_code": 200,
               "vars": ["OR", ["status", "==", 400],
                 ["status", "==", 401],
                 ["status", "==", 406]
               ]
             }
           },
           "x-apisix-priority": 0,
           "x-apisix-status": 1,
           "x-apisix-upstream": {
             "nodes": [{
               "host": "192.168.2.14",
               "port": 50003,
               "weight": 1
             }],
             "timeout": {
               "connect": 6,
               "send": 6,
               "read": 6
             },
             "type": "roundrobin",
             "scheme": "http",
             "pass_host": "pass",
             "keepalive_pool": {
               "idle_timeout": 60,
               "requests": 1000,
               "size": 320
             }
           }
         },
         "put": {
           "operationId": "security-localPUT",
           "parameters": [{
             "description": "params in path",
             "in": "path",
             "name": "params",
             "required": true,
             "schema": {
               "type": "string"
             }
           }],
           "requestBody": {},
           "responses": {
             "default": {
               "description": ""
             }
           },
           "security": [],
           "x-apisix-enable_websocket": false,
           "x-apisix-id": "456091058716017577",
           "x-apisix-plugins": {
             "ext-plugin-pre-req": {
               "_meta": {
                 "disable": false
               },
               "conf": [{
                 "name": "DefaultValidator",
                 "value": ""
               }]
             },
             "response-rewrite": {
               "_meta": {
                 "disable": false
               },
               "status_code": 200,
               "vars": ["OR", ["status", "==", 400],
                 ["status", "==", 401],
                 ["status", "==", 406]
               ]
             }
           },
           "x-apisix-priority": 0,
           "x-apisix-status": 1,
           "x-apisix-upstream": {
             "nodes": [{
               "host": "192.168.2.14",
               "port": 50003,
               "weight": 1
             }],
             "timeout": {
               "connect": 6,
               "send": 6,
               "read": 6
             },
             "type": "roundrobin",
             "scheme": "http",
             "pass_host": "pass",
             "keepalive_pool": {
               "idle_timeout": 60,
               "requests": 1000,
               "size": 320
             }
           }
         }
       }
     }
   }`
   3.使用导入功能导入后配置缺失:
   ![image](https://user-images.githubusercontent.com/37164104/231732476-5f7019d6-c761-4678-a66e-4e6e97143a45.png)
   
   ### Screenshots
   
   _No response_
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):3.2.0
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `etcd --version`):3.4.0
   - apisix-dashboard version, if have:3.0.0
   - Browser version, if have:
   
   
   ### Additional context
   
   _No response_


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] beginnerWJC commented on issue #2789: apisix-dashboard-3.0.0的导入功能,导入后缺少上游和插件部分

Posted by "beginnerWJC (via GitHub)" <gi...@apache.org>.
beginnerWJC commented on issue #2789:
URL: https://github.com/apache/apisix-dashboard/issues/2789#issuecomment-1735091489

   when can solve this problem 


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org