## Plugin Configuration
---
package:
  name: catalog
  description: The catalog panel and associated widgets
services:
  route:
    forceMount: false
    routes:
      # Catalog Index
      # The catalog index is the view which lists additional catalog tools.
      - path: catalog
        view: catalogIndex

      - path: catalog/index
        view: catalogIndex

      # plain catalog/apps with optional tag goes to the app browser
      - path: catalog/apps/:-tag
        view: appsBrowser

      # App View
      # catalog/apps/NAMESPACE/ID and
      # catalog/apps/NAMESPACE/ID/TAG
      # lead to the app viewer
      - path: catalog/apps/:namespace/:id/:-tag
        view: appView

      # Module Browser and View
      - path: catalog/modules
        view: moduleBrowser

      - path: catalog/modules/:module_name
        view: moduleView

      - path: catalog/module/:module_name
        view: moduleView

      # Dynamic Services Catalog
      - path: catalog/services
        view: serviceCatalog

      # Functions browser and view
      - path: catalog/functions/:-tag
        view: functionBrowser

      - path: catalog/functions/:module/:function_id/:-ver
        view: functionView

      # Data Types Browser
      - path: catalog/datatypes
        view: datatypeBrowser

      # Developer Tools

      # Registration view

      # TODO: make sure it works.
      - path: catalog/register/:-registration_id
        view: catalogRegistration

      - path: catalog/stats
        view: catalogStats

      - path: catalog/status/:-module_names
        view: catalogStatus

      - path: catalog/admin
        view: catalogAdmin

      - path: catalog/queue
        view: catalogQueue

      # OLD ROUTES
      # Todo: do we still need these?
      # For now, let's just keep the root appcatalog. The rest of the routes
      # (see the old config.yml) are duplicates of most of the above, and i would bet
      # that the vast majority of links to them are generated right here in this
      # plugin.
      # Well, the narrative, at least uses appcatalog links.
      #
      # App Browser
      # The normal user home page for the catalog is the app browser
      # A variant of above (is the above even used?)

      - path: appcatalog/:-browse/:-tag
        view: appsBrowser

      - path: appcatalog/module/:-module_name
        view: moduleView

      - path: appcatalog/app/:namespace/:id/:-tag
        view: appView

      # Different from the 'catalog' version because the registration id is optional
      - path: appcatalog/register/:-registration_id
        view: catalogRegistration

      - path: appcatalog/status/:-module_names
        view: catalogStatus

      - path: appcatalog/service
        view: serviceCatalog

      - path: appcatalog/admin
        view: catalogAdmin

      - path: appcatalog/stats
        view: catalogStats
  menu:
    items:
      - name: catalog
        path: catalog/apps
        label: Catalog
        icon: book
