[ui] Actions service and flyout (#19084)

* 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
This commit is contained in:
Phil Renaud
2023-11-26 23:46:44 -05:00
committed by GitHub
parent cfbb2e8923
commit fb14c2b556
31 changed files with 1158 additions and 250 deletions

View File

@@ -13,6 +13,7 @@ import { inject as service } from '@ember/service';
@classic
export default class IndexController extends Controller {
@service nomadActions;
@service notifications;
@overridable(() => {
// { title, description }
return null;
@@ -42,18 +43,4 @@ export default class IndexController extends Controller {
this.nomadActions.hasActionPermissions
);
}
@task(function* (action, allocID) {
try {
const job = this.model.task.taskGroup.job;
yield job.runAction(action, allocID);
} catch (err) {
this.notifications.add({
title: `Error starting ${action.name}`,
message: err,
color: 'critical',
});
}
})
runAction;
}