Files
nomad/ui/app/components/actions-flyout.hbs
Zack Moore 00b88bda74 Upgrade HDS dependency to 4.13 & migrate FlightIcon to Hds::Icon (#24305)
* upgraded to hds 4.13.0 and migrated FlightIcon instances to Hds::Icon

* updated test selectors

* fixing percy regression

* Vertically align flyout dismiss button and remove unused hasDivider prop
2024-10-30 10:17:07 -04:00

45 lines
1.7 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}
{{#if this.nomadActions.flyoutActive}}
<Hds::Flyout id="actions-flyout"
@onClose={{this.nomadActions.closeFlyout}} @size="large" as |Fly|
>
<Fly.Header>
<h3>
Actions
</h3>
{{#if this.contextualActions.length}}
<ActionsDropdown
@actions={{this.contextualActions}}
@allocation={{this.allocation}}
@context={{if this.task this.task this.job}}
/>
{{/if}}
{{#if this.nomadActions.runningActions.length}}
<Hds::Button @text="Stop All" @color="critical" @size="medium" {{on "click" this.nomadActions.stopAll}} />
{{/if}}
{{#if this.nomadActions.finishedActions.length}}
<Hds::Button data-test-clear-finished-actions @text="Clear Finished Actions" @color="secondary" @size="medium" {{on "click" this.nomadActions.clearFinishedActions}} />
{{/if}}
</Fly.Header>
<Fly.Body>
<ul class="actions-queue">
{{#each this.actionInstances as |instance|}}
<ActionCard @instance={{instance}} />
{{else}}
<Hds::ApplicationState as |A|>
<A.Header @title="No actions in queue" />
<A.Body @text="Your actions have been manually cleared. To run more, head to a Job or Task page with actions in its Jobspec, and an Actions dropdown will automatically populate." />
<A.Footer as |F|>
<F.LinkStandalone @icon="docs-link" @text="Learn more about Actions" @href="https://developer.hashicorp.com/nomad/docs/job-specification/action" @iconPosition="trailing" />
</A.Footer>
</Hds::ApplicationState>
{{/each}}
</ul>
</Fly.Body>
</Hds::Flyout>
{{/if}}