mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
* Initial pass at a global actions instance queue * Action card with a bunch of functionality that needs to be pared back a bit * Happy little actions button * runAction performs updated to use actions service * Stop All and Clear Finished buttons * Keyboard service now passes element, so we can pseudo-click the actions dropdown * resizable sidebar code blocks * Contextual actions within task and job levels * runAction greatly consolidated * Pluralize action text * Peer grouping of flyout action intances * ShortIDs instead of full alloc IDs * Testfixes that previously depended on notifications * Stop and stop all for peered action instances * Job name in action instance card linkable * Componentized actions global button * scss consolidation * Clear and Stop buttons become mutually exclusive in an action card * Clean up action card title styles a bit * todo-bashing * stopAll and stopPeers separated and fixed up * Socket handling functions moved to the Actions service * Error handling on socket message * Smarter import * Documentation note: need alloc-exec and alloc-raw-exec for raw_exec jobs * Tests for flyout and dropdown actions * Docs link when in empty flyout/queue state and percy snapshot test for it
45 lines
1.7 KiB
Handlebars
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 @hasDivider={{true}} as |F|>
|
|
<F.Link::Standalone @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}}
|