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

Adapt global modals to receive the relevant dataservice for their work when opened

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Developer Tools
    • 5
    • Not Needed

      1. We will change all global modals to receive a reference to the relevant DataService when they are open. We will need to change the following plugins to use the new interface:
      2. ImportPlugin
      3. ExportPlugin
      4. CreateViewPlugin
      5. CreateNamespacePlugin
      6. DropNamespacePlugin
      7. RenameCollectionPlugin

      These modals are reused across all tabs and connections. Currently they receive 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 ConnectionManager 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.

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

              Created:
              Updated:
              Resolved: