Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-7859

Adapt ImportPlugin to receive the relevant dataservice when opened

    • Developer Tools
    • 2
    • Not Needed
    • Iteration Asteroid

      We will change all global modals to receive a reference to the relevant DataService when they are open. In this task, we will change the following plugin: 

      ImportPlugin

      Currently it receives the active DataService through their plugin interface. As the connection can change, we will remove the DataService reference from the plugin interface. These plugins will depend on the ConnectionsManager that will be used to retrieve the relevant DataService. Take the CreateViewPlugin for example, the plugin interface is as:

      { globalAppRegistry, dataService, logger, workspaces }: CreateViewServices  

      It will be changed to:

       { globalAppRegistry, connectionManager, logger, workspaces }: CreateViewServices 

      When the plugin listens to the open event, as in:

      globalAppRegistry.on('open-create-view', onOpenCreateView);  

      It will receive in the event payload the connection info related to the connection that requested the modal and will inject it into its store. Later, in the thunk actions, it will use the connectionsManager to use the relevant DataService.

            Assignee:
            himanshu.singh@mongodb.com Himanshu Singh
            Reporter:
            kevin.mas@mongodb.com Kevin Mas Ruiz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: