apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

Consumer Plugin List: Added but Disabled Plugin Display Distinction

Open matkocsis opened this issue 2 years ago • 3 comments

Issue description

There is no clean GUI distinction for a consumer plugin that is added but disabled on the plugin configuration page.

Because of Plugin application precedence a higher level disabled plugin (consumer) still "applies" ( the disabled status ) if it is added, and disables / ignores the same lower level (Route) plugin configuration.

Expected behavior

On the Configure Consumer / Plugin Config page clearly visible difference between plugins that are not part of the consumer configuration vs 'Enabled / Added' but 'Disabled' by the check-box

Possible solution would be to change the button label from "Enable" to "Edit (Disabled / Ignored)" for those plugins that are added but disabled to the consumer. So the 3 states would look like: Enable, Edit (Enabled), Edit(Disabled).

How to Reproduce

Step 1.

  • Route: configured with "basic-auth" + "limit-count" plugin.
  • Consumer: configured with "basic-auth" + "limit-count" plugin.

Result:

  • Rate limiting works, and the setting is applied from the consumer config as per documentation.
  • On the Configure Consumer / Plugin Config page we could see the 2 plugins active: basic-auth, limit-count.

Step 2.

  • Go to Configure Consumer / Plugin Config -> limit-count plugin -> 'Edit' -> Switch off 'Enabled'

Result: The plugin is still active, but disabled for this consumer, meaning there is no limit-count with that Auth (ignores the plugin from the Route). Takes precedence over the Route plugin, and gets it disabled / non-applied.

I assume this is also an expected behavior, but it is impossible to differentiate which plugins are added but disabled on the Plugin Config list.

Screenshots

No response

Environment

  • apisix version (cmd: apisix version):
  • OS (cmd: uname -a): Linux
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V):
  • etcd version, if have (cmd: run etcd --version):
  • apisix-dashboard version, if have: 2.11.0
  • Browser version, if have:

Additional context

No response

matkocsis avatar May 20 '22 15:05 matkocsis

Hi, @matkocsis The plugins on Consumer and Route are merged by priority (Consumer > Route), according to the description you provided, limit-count is disabled on Consumer but limit-count on Route is not effect , which is the expected behavior.

If you want limit-count on Route to take effect, you need to remove limit-count from Consumer, not disable it

Also at the moment you can't see its status on the plugin list, because there is not configured or disable share an enable button, you have to go to the details to find out

jwrookie avatar May 21 '22 05:05 jwrookie

Hello @jwrookie Yes I know this is the right behaviour for the gateway. My point in short is for the dashboard GUI, that there is no clear distinction in the Configure Consumer / Plugin List page between an added but disabled vs not added Plugin. This is 2 different behavior, with no UX distinction, very error prone, took me a while to figure it out!

matkocsis avatar May 21 '22 10:05 matkocsis

Yes, I agree with you that we should enhance it in the GUI We can discuss it in this issue https://github.com/apache/apisix-dashboard/issues/2354. Or send eamil to https://lists.apache.org/thread/lltjvf2bjj18og6no5lplwjry0z01pbd

Thank you for your outstanding contribution!

jwrookie avatar May 21 '22 11:05 jwrookie