Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request help: let custom plugin show in dashboard #646

Closed
maplessssy opened this issue Oct 30, 2020 · 18 comments
Closed

request help: let custom plugin show in dashboard #646

maplessssy opened this issue Oct 30, 2020 · 18 comments
Assignees
Labels
backend bug Something isn't working
Milestone

Comments

@maplessssy
Copy link

Issue description

I have added a custom plugin, how to let the custom plugin show in dashboard?
image

image

thx for help.

Environment

  • apisix version (cmd: apisix version): 2.0
  • OS: mac os
@maplessssy
Copy link
Author

The plugin has been configured.
image

@spacewander spacewander transferred this issue from apache/apisix Oct 30, 2020
@juzhiyuan
Copy link
Member

Hi, please follow those steps to have a check first:

  1. Get all plugin list
$ curl $API_HOST/apisix/admin/plugins
  1. Check if your cgi-proxy plugin is included in that list.

Looking forward to your feedback.

@juzhiyuan juzhiyuan added this to the 2.1 milestone Oct 30, 2020
@juzhiyuan
Copy link
Member

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

@maplessssy
Copy link
Author

maplessssy commented Oct 30, 2020

@juzhiyuan here is output, seems like need a Authentication.
image

@juzhiyuan
Copy link
Member

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

image

@maplessssy
Copy link
Author

maplessssy commented Oct 30, 2020

@justinmclean not found my custom plugin.
image

{"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"}

@juzhiyuan
Copy link
Member

Ok then this issue is not because of frontend, let’s cc @nic-chen @membphis to have more discussions with you :)

@nic-chen
Copy link
Member

@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

@juzhiyuan
Copy link
Member

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.

@juzhiyuan juzhiyuan modified the milestones: 2.1, 2.0 Oct 30, 2020
@juzhiyuan juzhiyuan added documentation Improvements or additions to documentation enhancement New feature or request and removed checking labels Oct 30, 2020
@juzhiyuan juzhiyuan pinned this issue Nov 2, 2020
@idbeta
Copy link
Contributor

idbeta commented Nov 6, 2020

@thekingofworld We have reproduced this problem in the local environment, thank you for your feedback.

@juzhiyuan juzhiyuan added bug Something isn't working backend labels Nov 6, 2020
@membphis
Copy link
Member

membphis commented Nov 6, 2020

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

@membphis
Copy link
Member

membphis commented Nov 6, 2020

I was confused with those labels. Welcome to split them into multiple different issues for easy tracking and fix.

@juzhiyuan @idbeta

image

@juzhiyuan juzhiyuan removed documentation Improvements or additions to documentation enhancement New feature or request labels Nov 6, 2020
@idbeta
Copy link
Contributor

idbeta commented Nov 9, 2020

@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

@moonming
Copy link
Member

moonming commented Nov 9, 2020

@nic-chen is this a blocked issue?

@juzhiyuan
Copy link
Member

This issue is reported 3 times at least, so it's a blocked issue IMO.

@membphis
Copy link
Member

membphis commented Nov 9, 2020

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

@membphis
Copy link
Member

membphis commented Nov 9, 2020

@thekingofworld welcome to make a try too, wait for your response ^_^

@membphis membphis self-assigned this Nov 9, 2020
@nic-chen
Copy link
Member

fix by #676 #765

@juzhiyuan juzhiyuan unpinned this issue Nov 10, 2020
LiteSun added a commit that referenced this issue Nov 21, 2020
* Update CHANGELOG.md

* Update CHANGELOG.zh-CN.md

* Update CHANGELOG.md

* Update CHANGELOG.zh-CN.md

* Update CHANGELOG.md

* feat: update deploy docs

* feat: separate build and run to 2 scripts (#600)

* feat: separate build and run

* doc: update doc about build and run

* doc: update doc about build and run

* Update schema-sync.sh

* Update develop.md

* Update develop.zh-CN.md

Co-authored-by: 琚致远 <juzhiyuan@apache.org>

* feat: remove unused dist folder

* doc: add etcd api version tips (#604)

* doc: add etcd version tips(#602)

* Update README.md

* Update README.zh-CN.md

Co-authored-by: 琚致远 <juzhiyuan@apache.org>

* Update deploy.md

* Update deploy.zh-CN.md

* feat(docs): update deploy docs

* feat(doc): added tip in deploy

* feat(doc): update run part in deploy

* feat(doc): added FAQ about how to redeploy

* fix: 2.0 release issues (#606)

* fix: remove json schema generation  from ci

* fix: use json schema generated from APISIX v2.0

* fix: ant-design/ant-design/issues/27396

* fix: using relative path to read conf (#617)

* fix: using  relative path

* fix path

* fix path

* feat: support custom server host, port and DAG lib path (#625)

* feat: support custom server port and dag lib path

* test: custom host

* test: add test case

* fix bug

* test

* test

* test

* feat support config etcd endpoints

* Update conf.json

* Update conf.go

* Update test-api.yml

* Update deploy.md

* Update deploy.zh-CN.md

* Update deploy.md

* Update conf.json

Co-authored-by: 琚致远 <juzhiyuan@apache.org>

* feat(doc): update config file

* feat(doc): update Note

* feat(docs): update NOTE

* feat(doc): update ETCD endpoints

* Update deploy.md

* feat: refactor folders (#629)

* feat: refactor api & frontend

* feat: remove some actions

* feat: added - v2.0

* feat: added ignored files for checker

* feat: trigger ci

* feat: trigger CI

* feat: added conf.json

* fix: build dashboard

* feat: remove demo temp

* feat: update build.sh

* chore: improve issue template and vscode (#660)

* test: add e2e test for field hosts in `route` api (#612)

* feat: ETCD cluster and APISIX cluster for CI

* feat: add test cases

* feat: add upstream service in docker compose

* fix: comment

* test: add test cases

* fix: code format

* test: add ci

* fix ci

* fix ci

* fix ci

* fix: remove consumer test

* test: sleep for sync

* test: e2e as an independent subproject

* fix CI error

* test: run docker

* fix: remove json schema generate script in docker build

* fix: check host and hosts config together

* fix ci

* test: add test cases for `host` in route

* remove useless code

* fix: using relative path to read conf (#617)

* fix: using  relative path

* fix path

* fix path

* fix conf path

* fix ci error

* fix etcd ip

* fix: code format

* run backend e2e test ci on v2 branch

* fix: code format

* fix: code format

* fix: CI error

* test: remove deploy CI again

* remove useless codes

* fix: go fmt

* test: don't use `go fmt`

* fix: code format

* fix: var name

* fix lint

* fix CI error

* debug

* fix: docker container name

* fix CI error

* fix CI error

* test: add more test cases

* fix CI error

* chore: remove useless code

* fix: go fmt

* fix: refactor test code

* fix: check body

* fix small issue

* fix: update docker compose

* fix CI

* test

* test

* test: build image first

* test: revert subnet ip in docker compose

* fix by review

* fix: docker compose

* test: add test cases

* fix: remove useless code

* fix: code format

* test: code format

* feat: added e2e test for Login page (#619)

* feat: added Front-end e2e test YAML file

* feat: added login e2e test

* feat: update Login.e2e.js

* Update Login.e2e.js

* feat: added e2e readme

* feat: added licence

* feat: added  start-server-and-test package

* feat: update login test case

* Update frontend-e2e-test.yml

* feat: added logout test case

* Update frontend-e2e-test.yml

* feat: added login failed with empty input

* feat: update CI

* feat: update text

* feat: added public.js

* feat: change logout timeout

* feat: Added e2e test documentation link to development.md

* Update develop.md

* Update develop.zh-CN.md

* Update README.md

Co-authored-by: 琚致远 <juzhiyuan@apache.org>

* CI: collect golang unit test code coverage (#654)

* fix: promethus incorrect value when update route (#666)

* feat: deploy with Docker (#657)

* feat: added Docker

* feat: added License header

* feat: added line in docs

* Update test-docker.yml

* feat(doc): update docs

* feat: added extra line

* feat: added Go Proxy in Dockerfile

* feat: update Dockerfile

* chore: update docs

* fix: copy correct files

* feat: improve Dockerfile

* Revert "feat: improve Dockerfile"

This reverts commit c68a4c4.

* fix run fail

* feat: update docs

* fix: compatible with Golang conf

* Squashed commit of the following:

commit 94450bf
Author: litesun <7sunmiao@gmail.com>
Date:   Tue Nov 3 10:19:04 2020 +0800

    fix: promethus incorrect value when update route (#666)

commit de8bdbf
Author: nic-chen <33000667+nic-chen@users.noreply.github.com>
Date:   Tue Nov 3 07:50:29 2020 +0800

    CI: collect golang unit test code coverage (#654)

commit 722c0fd
Author: litesun <7sunmiao@gmail.com>
Date:   Tue Nov 3 00:03:06 2020 +0800

    feat: added e2e test for Login page (#619)

    * feat: added Front-end e2e test YAML file

    * feat: added login e2e test

    * feat: update Login.e2e.js

    * Update Login.e2e.js

    * feat: added e2e readme

    * feat: added licence

    * feat: added  start-server-and-test package

    * feat: update login test case

    * Update frontend-e2e-test.yml

    * feat: added logout test case

    * Update frontend-e2e-test.yml

    * feat: added login failed with empty input

    * feat: update CI

    * feat: update text

    * feat: added public.js

    * feat: change logout timeout

    * feat: Added e2e test documentation link to development.md

    * Update develop.md

    * Update develop.zh-CN.md

    * Update README.md

    Co-authored-by: 琚致远 <juzhiyuan@apache.org>

commit 915ce83
Author: nic-chen <33000667+nic-chen@users.noreply.github.com>
Date:   Mon Nov 2 21:13:34 2020 +0800

    test: add e2e test for field hosts in `route` api (#612)

    * feat: ETCD cluster and APISIX cluster for CI

    * feat: add test cases

    * feat: add upstream service in docker compose

    * fix: comment

    * test: add test cases

    * fix: code format

    * test: add ci

    * fix ci

    * fix ci

    * fix ci

    * fix: remove consumer test

    * test: sleep for sync

    * test: e2e as an independent subproject

    * fix CI error

    * test: run docker

    * fix: remove json schema generate script in docker build

    * fix: check host and hosts config together

    * fix ci

    * test: add test cases for `host` in route

    * remove useless code

    * fix: using relative path to read conf (#617)

    * fix: using  relative path

    * fix path

    * fix path

    * fix conf path

    * fix ci error

    * fix etcd ip

    * fix: code format

    * run backend e2e test ci on v2 branch

    * fix: code format

    * fix: code format

    * fix: CI error

    * test: remove deploy CI again

    * remove useless codes

    * fix: go fmt

    * test: don't use `go fmt`

    * fix: code format

    * fix: var name

    * fix lint

    * fix CI error

    * debug

    * fix: docker container name

    * fix CI error

    * fix CI error

    * test: add more test cases

    * fix CI error

    * chore: remove useless code

    * fix: go fmt

    * fix: refactor test code

    * fix: check body

    * fix small issue

    * fix: update docker compose

    * fix CI

    * test

    * test

    * test: build image first

    * test: revert subnet ip in docker compose

    * fix by review

    * fix: docker compose

    * test: add test cases

    * fix: remove useless code

    * fix: code format

    * test: code format

commit 94d0245
Author: 琚致远 <juzhiyuan@apache.org>
Date:   Mon Nov 2 13:17:42 2020 +0800

    chore: improve issue template and vscode (#660)

* Revert "Squashed commit of the following:"

This reverts commit 93d38ee.

* feat: remove output from ignore files

Co-authored-by: nic-chen <johz@163.com>

* feat: use web instead of frontend (#674)

* feat: use web instead of frontend

* feat: rename frontend to web

* feat: remove all frontend to web

* feat: support get plugin schema based on schema_type (#651)

* feat: support get plugin schema based on schema_type

* fix: ci errors

* fix: run error casued by api-breaker.lua

* fix: get schema_type from query and add some test

* fix: update schema.json file

* fix: update validate to support schematype

* fix: properties:{} validate failed

* fix: some code errors refer to the review

* test: add linter for manager api (#655)

* test: add go lint

* fix lint

* fix by review

* fix errors

* test: run lint on v2.0

* fix: text format

* fix: os check

* fix typo

* fix: fmt --> log

* fix log

* fix: unnecessary nil check around range for lint

* fix: trigger lint for push to branch v2.0

* feat: update plugin to 1.0.10

* fix: enable HTTPS setting unsuccessful in Route (#692)

* fix: wrong stepHeader after edit MatchingRules

* feat: disable plugin orchestration when select forcehttps

* feat: update Route transform

* feat: cache Front-end e2e CI node_modules (#696)

* chore: refactor `conf` of `manager api` (#693)

* feat: refactor conf

* fix default listen port

* fix build and run scripts

* fix: docs

* chore: remove useless file

* fix docker for test

* fix CI

* fix CI

* fix ci

* fix: `-c` conf dir  -->  `-p` work dir

* fix go test error

* fix conf

* fix: revert changes

* fix: remove useless comment

* fix: remove useless comment

* doc: add comment for config

* doc: todo

* fix: config format

* fix: if secret use default value, should generate a random string to replace it.

* fix comment style

* fix: change web dir in docker file

* doc: update comments

* fix:bug that dirty data exists after updating route and wrong mod for prod env (#704)

* fix: route bug, dirty data exists after updating

* fix mod for env

* fix mod for env

* fix error log

* fix error log

* chore: refactor error log for `manager api` (#689)

* chore: refactor log

* fix: custom log by conf

* feat: add error log

* fix default config

* fix CI fail

* fix: should not save log to file by default

* test: add test case

* test: add test case

* fix CI fail

* fix error

* fix CI

* fix error

* fix according to reviews

* test: more test cases

* fix error

* chore: use `/dev/stdout` as default log file path

* fix typo

* fix docker for logs dir

* fix CI fail

* fix: delete useless files

* fix: change file name

* bugfix: dashboard 2.0 failed to fetch ssl certificate not found  (#719)

* fix: set ssl status, since it's default 0

* add test cases

* test: add test cases

* fix: update test cases

* fix: test case fail

* test: remove hosts in hosts setting

* fix: according review

* fix: according review

* chore: add comment

* fix: update order (#744)

* feat(Consumer): use username instead of id (#742)

* feat(Consumer): use username instead of id

* feat: remove duplicated var

* chore: exit if any error and specify the download file name when download by `wget`. (#751)

fix #646

* fix: an error will occur if `pass_host` is set to `node` when creating upstream (#750)

* fix: bug #749

* fix: bug #749

* test: add test cases

* fix: CI

* fix: CI fail

* test: add e2e test cases for upstream (#738)

* fix: react warnings (#747)

* fix: update json schema (#754)

* chore: move the Dockerfile to `test` folder, because it was used for testing (#753)

* feat: convert uri to uris (#740)

* feat: deploy with docker (#701)

* feat: added deploy with docker CD

* feat: docker deploy test

* fix: CI

* fix: path of `config.yaml`

* fix: CI fail

* docs: update doc for docker deploy

* fix: typo

* fix: add EOF && trigger  CD

Co-authored-by: nic-chen <johz@163.com>
Co-authored-by: kv <gxthrj@163.com>

* fix: invalid values from the manager-api (#736)

* feat: return None when timestamp is invalid

* chore: added TODO

* docs: add makefile && modify  develop and deploy  docs (#729)

* docs: add makefile && modify  develop and deploy  docs

* docs: Make the makefile clearer

* docs: modify frontend to web

* doc: two blankline between commands

* doc: remove blanklien EOF

* docs: remove make run/stop in makefile

* docs: make readme readable

* docs: declear in readme

* docs: make readme readable

* docs: remove dependencies in readme

* docs: check english desc

* docs: style adjust

* docs: sync makefile desc

* docs: remove blank

* docs: style adjust

* docs: remove ENV=local in deploy

* fix: modify lint ci

* docs: unify go-lint

* docs: check all text

* docs: makefile Aligned

* docs: update style

* docs: add markdown code style

* docs: fix  syntax

* docs: remove Self-referencing

* docs: user guide

* docs: use header

* docs: style fix

* docs: add desc

* docs: modify 'pack' to 'package'

* docs: unify manager-api

* docs: mv Install to Installation

* docs: node to Node.js

* docs: source codes to Source Codes

* docs: Source Codes

* fix: mkdir -p ./output/logs in makefile build

* feat: support specifying APISIX path to generate json schema (#765)

* feat: support specifying APISIX path to generate json schema

* doc: update doc about schema sync

* fix: doc

* fix: errors

* fix: error according to test

* test

* no message

* test

* fix: remove debug

* test: add consumer e2e test (#735)

* add consumer e2e test
add public method "PartialBody"

* test: add end with EOL

* add test data plane to case 2
delete some useless code

* modify code style

* fix: makefile build error (#767)

* fix: used dashboard add consumer of jwt, would have an error when get the jwt token (#768)

* feat: update changelog (#771)

* Update CHANGELOG.md

* Update CHANGELOG.zh-CN.md

* docs: update change log

Co-authored-by: nic-chen <johz@163.com>

* fix: consumer schema for auth plugin (#770)

* fix: consumer schema for auth plugin

* fix: update by jsonschema

* fix: json schema

* fix: doc (#772)

* fix: doc (#774)

* feat: remove CD for PR

* fix: closed WatchResponse channel when cancel function is called (#779) (#795)

* ci: fix CI naming (#799)

* fix: make cli test more compatible (#798)

* test: fix e2e test unstable (#800)

* fix: double scroll bar in plugin page (#801)

* feat(docs): improve README & Deploy (#785)

* feat(doc): update README & deploy

* feat(docs): added FAQ

* fix: linkx

* feat(docs): update deploy with docker

* feat(docs): update FAQ

* feat: update README

* feat: update README

* feta: update README

* fix: link

* feat: update deploy with docker

* feat(docs): added tip for some users

* feat(doc): improve deploy with docker

* feat(docs): improve deploy with docker

* feat(doc): update run with docker

* feat(doc): improve deploy

* feat(doc): added more info

* feat(doc): added more info

* feat(doc): remove extra info

* feat: added more detailed

* fix: CI fail according `api/conf/conf.yaml ` is  changed.

* fix: revert changed

* feat(docs): improve English version

* feat(docs): use frontend instead, just like backend

* feat(docs): remove extra statements

* feat(docs): update typo

* feat(docs): remove startup with message

* feat: update CI's name

Co-authored-by: nic-chen <johz@163.com>

* feat: skip puppeteer chromium download when build (#808)

* feat(Makefile): update release-src (#816)

* ci: fix CI fail (#818)

* ci: fix CI fail

* ci: fix CI fail

* ci: fix CI fail

* test: add e2e test for config route with service_id or upstream_id (#810)

* test: add e2e test for config route with service_id or upstream_id

* test: fix route test

* test: fix route test

* test: fix route test

* test: fix route test format

* test: fix route test format

* test: fix test format

* test: add test on data plane

* test: fix test conflict

* feat: install signal handler for graceful shutdown (#737) (#796)

* Revert "test: add consumer e2e test (#735)" (#829)

This reverts commit c140f41.

* feat: add a hanlder unit test for upstream and remove init

* append license

* revert unreviewed pr (#841)

Co-authored-by: nic-chen <33000667+nic-chen@users.noreply.github.com>
Co-authored-by: 琚致远 <juzhiyuan@apache.org>
Co-authored-by: jiayx <jiayx@users.noreply.github.com>
Co-authored-by: nic-chen <johz@163.com>
Co-authored-by: liuxiran <belovedxixi@126.com>
Co-authored-by: YuanSheng Wang <membphis@gmail.com>
Co-authored-by: kv <gxthrj@163.com>
Co-authored-by: idbeta <idbeta@gmail.com>
Co-authored-by: Peter Zhu <starszcan@gmail.com>
Co-authored-by: EnableAsync <43645467+EnableAsync@users.noreply.github.com>
Co-authored-by: ShiningRush <277040271@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants