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

Adapt CreateNamespacePlugin to receive the relevant dataservice when opened

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • 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: 

      CreateNamespacePlugin

      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: