kuzzleio / kuzzle-admin-console

A SPA to administrate your Kuzzle: index and collection management, document creation, realtime subscription and permissions management
http://console.kuzzle.io
Apache License 2.0
61 stars 25 forks source link

Add import/export API actions #932

Closed berthieresteban closed 1 year ago

berthieresteban commented 3 years ago

What does this PR do ?

Add import/export features to API Actions view

Buttons import/export to left corner in sidebar export:

import:

Tests added:

How should this be manually tested?

Other changes

/

Boyscout

/

Screenshot from 2021-07-01 17-50-55

Screenshot from 2021-07-01 17-59-37

Screenshot from 2021-07-01 17-59-17

xbill82 commented 3 years ago

Er... What happened to the Netlify previews? 👀

xbill82 commented 3 years ago

I need to dive back into the code but, looking at the PR description, I find it weird to be able to export the API actions for all the environments, given that one cannot see other environments' actions in the list on the left sidebar. To me

What do you think @berthieresteban @Aschen @Njuelle ?

berthieresteban commented 3 years ago

I need to dive back into the code but, looking at the PR description, I find it weird to be able to export the API actions for all the environments, given that one cannot see other environments' actions in the list on the left sidebar. To me

  • Either API actions are cross-environment (i.e. all the actions are always visible no matter to which Kuzzle the AC is connected to) and therefore exportable
  • Actions are separated by environment, so one can only export the actions of the current environment (i.e. the current connection).

Your first point is convenient, the second is structured

IMHO Both have pro and cons

I don't think that it is a problem that actions displayed when see / import-export are different Maybe if the import export modal display an env selector with current env by default for example you might find it less weird ? Also, listing the pro/cons above let me think that a "global" actions folder accessible in each env could be a good feature to avoid action duplications

xbill82 commented 3 years ago

@berthieresteban I understand your point and it makes me think that actions could be not specific to an environment. Imagine you have three environments for the same Kuzzle app (which is the case for most of our users), then you are likely in the case of performing one same action for more than one environment, right? In this case, it is OK to go to the export menu and choose the actions from another environment and then re-import them, but... wouldn't it be more convenient to just access all the actions from the same view?

rolljee commented 1 year ago

Closing this, as this is now quite old. This should be reopened if this feature reach the roadmap