Resource Helpers

A special wrapper component, <manifold-resource-container>, can be used to create a special shared context for related resource components. Using this has the following advantages:

  • Requests will be consolidated so users experience shorter loading times
  • You don’t have to specify resource-label="my-resource" on all its children

To use this special context, you also have to use aliased components, as specified below:

<manifold-resource-container resource-label="my-resource">
  <!-- use any, or all, of the following components: -->

  <manifold-resource-credentials></manifold-resource-credentials>

  <manifold-resource-deprovision>Deprovision</manifold-resource-deprovision>

  <manifold-resource-plan></manifold-resource-plan>

  <manifold-resource-product></manifold-resource-product>

  <manifold-resource-rename>Rename</manifold-resource-rename>

  <manifold-resource-sso>Launch Dashboard</manifold-resource-sso>

  <manifold-resource-status></manifold-resource-status>
</manifold-resource-container>

All of the children of <manifold-resource-container> are special versions of existing components. These versions of components don’t require any attributes. They do emit all events, and accept all children of their aliases:

Original component Resource context version Events?
<manifold-credentials> <manifold-resource-credentials>
<manifold-data-deprovision-button> <manifold-resource-deprovision> Yes
<manifold-data-rename-button> <manifold-resource-rename> Yes
<manifold-data-sso-button> <manifold-resource-sso> Yes
<manifold-product-card> <manifold-resource-product> Yes
<manifold-plan> <manifold-resource-plan>
<manifold-resource-status> <manifold-resource-status>

For example: the <manifold-resource-sso> component will emit the same manifold-ssoButton-click, manifold-ssoButton-success, and manifold-ssoButton-error events as <manifold-data-sso-button>.

Refetch until valid

The refetch-until-valid property on the resource-container can be used to force the container to continually attempt to fetch the resource until it has found one and the status of that resource is available. This is useful for reloading the page until the resource has finished resizing or provisioning for example.

<manifold-resource-container resource-label="my-resource" refetch-until-valid>
  <manifold-resource-credentials></manifold-resource-credentials>
</manifold-resource-container>

Example

Rename SSO Deprovision