request help: let custom plugin show in dashboard
Issue description
I have added a custom plugin, how to let the custom plugin show in dashboard?


thx for help.
Environment
- apisix version (cmd:
apisix version):2.0 - OS:
mac os
The plugin has been configured.

Hi, please follow those steps to have a check first:
- Get all plugin list
$ curl $API_HOST/apisix/admin/plugins
- Check if your
cgi-proxyplugin is included in that list.
Looking forward to your feedback.
BTW, please use the latest dashboard 2.0 RC2 to have a test.
https://github.com/apache/apisix-dashboard/blob/v2.0/docs/deploy.md
@juzhiyuan here is output, seems like need a Authentication.

OK then, this error is returned from 2.0 RC2 may be, let's visit the dashboard then check this API:

@justinmclean not found my custom plugin.

{"code":0,"message":"","data":["limit-count","kafka-logger","request-validation","referer-restriction","zipkin","example-plugin","request-id","node-status","grpc-transcode","wolf-rbac","basic-auth","syslog","consumer-restriction","cors","openid-connect","hmac-auth","udp-logger","proxy-cache","fault-injection","proxy-mirror","proxy-rewrite","key-auth","log-rotate","response-rewrite","prometheus","tcp-logger","http-logger","authz-keycloak","limit-conn","uri-blocker","skywalking","redirect","batch-requests","limit-req","jwt-auth","echo","ip-restriction"],"request_id":"26dc294c-6e4f-480d-8763-322b136f0553"}
Ok then this issue is not because of frontend, let’s cc @nic-chen @membphis to have more discussions with you :)
@thekingofworld
need to re-generate json schema for your custom plugin.
here is how to use the tool to generate json schema:
https://github.com/apache/apisix-dashboard/blob/v2.0/docs/develop.md#sync-jsonschema
Oh! That’s it!!! The Dashboard needs this tool to regenerate plugin schemas, this trick tip should be removed and improve this part in the future.
@thekingofworld We have reproduced this problem in the local environment, thank you for your feedback.
@thekingofworld We have reproduced this problem in the local environment, thank you for your feedback.
do you find an easier way to reproduce this issue? or as the reporter?
I was confused with those labels. Welcome to split them into multiple different issues for easy tracking and fix.
@juzhiyuan @idbeta

@thekingofworld We have reproduced this problem in the local environment, thank you for your feedback.
do you find an easier way to reproduce this issue? or as the reporter?
make a plugin with reference to example-plugin to reproduce the problem, update schema.json with schema-sync.sh and it will report an error
--2020-11-06 19:47:50-- https://github.com/apache/apisix/archive/2.0.zip
...
...
200 OK
...
...
Archive: 2.0.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of 2.0.zip or
2.0.zip.zip, and cannot find 2.0.zip.ZIP, period.
mv: rename ./apisix-2.0/apisix/* to ./api/build-tools/apisix/*: No such file or directory
lua: schema-sync.lua:89: module 'apisix.schema_def' not found:
no field package.preload['apisix.schema_def']
no file '/usr/local/share/lua/5.3/apisix/schema_def.lua'
no file '/usr/local/share/lua/5.3/apisix/schema_def/init.lua'
no file '/usr/local/lib/lua/5.3/apisix/schema_def.lua'
no file '/usr/local/lib/lua/5.3/apisix/schema_def/init.lua'
no file './apisix/schema_def.lua'
no file './apisix/schema_def/init.lua'
no file '/usr/local/lib/lua/5.3/apisix/schema_def.so'
no file '/usr/local/lib/lua/5.3/loadall.so'
no file './apisix/schema_def.so'
no file '/usr/local/lib/lua/5.3/apisix.so'
no file '/usr/local/lib/lua/5.3/loadall.so'
no file './apisix.so'
stack traceback:
[C]: in function 'require'
schema-sync.lua:89: in main chunk
[C]: in ?
sync success:
/Users/idbeta/1106/apisix-dashboard/api/conf/schema.json
@nic-chen is this a blocked issue?
This issue is reported 3 times at least, so it's a blocked issue IMO.
@idbeta please make a try with the latest branch v2.0, confirm if it works fine for you.
if it works fine, then we can close this issue.
@thekingofworld welcome to make a try too, wait for your response ^_^
fix by #676 #765