2019-07-17 20:02:58 +00:00
|
|
|
{{title "Allocation " model.name}}
|
2020-06-13 03:59:33 +00:00
|
|
|
<AllocationSubnav @allocation={{model}} />
|
2018-07-25 22:05:24 +00:00
|
|
|
<section class="section">
|
2019-05-17 00:43:12 +00:00
|
|
|
{{#if error}}
|
2019-05-21 00:19:24 +00:00
|
|
|
<div data-test-inline-error class="notification is-danger">
|
2019-05-17 00:43:12 +00:00
|
|
|
<div class="columns">
|
|
|
|
<div class="column">
|
2019-05-21 00:19:24 +00:00
|
|
|
<h3 data-test-inline-error-title class="title is-4">{{error.title}}</h3>
|
|
|
|
<p data-test-inline-error-body>{{error.description}}</p>
|
2019-05-17 00:43:12 +00:00
|
|
|
</div>
|
|
|
|
<div class="column is-centered is-minimum">
|
2020-07-09 17:30:11 +00:00
|
|
|
<button data-test-inline-error-close class="button is-danger" onclick={{action onDismiss}} type="button">Okay</button>
|
2019-05-17 00:43:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
2020-03-24 23:22:16 +00:00
|
|
|
<h1 data-test-title class="title with-headroom with-flex">
|
|
|
|
<div>
|
|
|
|
Allocation {{model.name}}
|
|
|
|
<span class="bumper-left tag {{model.statusClass}}">{{model.clientStatus}}</span>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
{{#if model.isRunning}}
|
|
|
|
<div class="two-step-button">
|
2020-06-01 19:03:56 +00:00
|
|
|
<Exec::OpenButton @job={{model.job}} @allocation={{model}} />
|
2020-03-24 23:22:16 +00:00
|
|
|
</div>
|
2020-06-01 19:03:56 +00:00
|
|
|
<TwoStepButton
|
2020-03-24 23:22:16 +00:00
|
|
|
data-test-stop
|
2020-06-01 19:03:56 +00:00
|
|
|
@alignRight={{true}}
|
|
|
|
@idleText="Stop"
|
|
|
|
@cancelText="Cancel"
|
|
|
|
@confirmText="Yes, Stop"
|
|
|
|
@confirmationMessage="Are you sure? This will reschedule the allocation on a different client."
|
|
|
|
@awaitingConfirmation={{stopAllocation.isRunning}}
|
|
|
|
@disabled={{or stopAllocation.isRunning restartAllocation.isRunning}}
|
|
|
|
@onConfirm={{perform stopAllocation}} />
|
|
|
|
<TwoStepButton
|
2020-03-24 23:22:16 +00:00
|
|
|
data-test-restart
|
2020-06-01 19:03:56 +00:00
|
|
|
@alignRight={{true}}
|
|
|
|
@idleText="Restart"
|
|
|
|
@cancelText="Cancel"
|
|
|
|
@confirmText="Yes, Restart"
|
|
|
|
@confirmationMessage="Are you sure? This will restart the allocation in-place."
|
|
|
|
@awaitingConfirmation={{restartAllocation.isRunning}}
|
|
|
|
@disabled={{or stopAllocation.isRunning restartAllocation.isRunning}}
|
|
|
|
@onConfirm={{perform restartAllocation}} />
|
2020-03-24 23:22:16 +00:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2018-07-25 22:05:24 +00:00
|
|
|
</h1>
|
2017-10-30 21:16:08 +00:00
|
|
|
|
2020-03-24 23:22:16 +00:00
|
|
|
<span class="tag is-hollow is-small is-alone no-text-transform">
|
|
|
|
{{model.id}}
|
2020-06-01 19:03:56 +00:00
|
|
|
<CopyButton @clipboardText={{model.id}} />
|
2020-03-24 23:22:16 +00:00
|
|
|
</span>
|
|
|
|
|
2018-07-25 22:05:24 +00:00
|
|
|
<div class="boxed-section is-small">
|
|
|
|
<div data-test-allocation-details class="boxed-section-body inline-definitions">
|
|
|
|
<span class="label">Allocation Details</span>
|
|
|
|
<span class="pair job-link"><span class="term">Job</span>
|
2020-06-01 19:03:56 +00:00
|
|
|
<LinkTo @route="jobs.job" @model={{model.job}} @query={{hash jobNamespace=model.job.namespace.id}} data-test-job-link>{{model.job.name}}</LinkTo>
|
2018-07-25 22:05:24 +00:00
|
|
|
</span>
|
|
|
|
<span class="pair node-link"><span class="term">Client</span>
|
2020-06-01 19:03:56 +00:00
|
|
|
<LinkTo @route="clients.client" @model={{model.node}} data-test-client-link>{{model.node.shortId}}</LinkTo>
|
2018-07-25 22:05:24 +00:00
|
|
|
</span>
|
2017-10-30 21:16:08 +00:00
|
|
|
</div>
|
2018-07-25 22:05:24 +00:00
|
|
|
</div>
|
2017-10-30 20:39:15 +00:00
|
|
|
|
2018-09-14 17:21:28 +00:00
|
|
|
<div class="boxed-section">
|
|
|
|
<div class="boxed-section-head is-hollow">
|
|
|
|
Resource Utilization
|
|
|
|
</div>
|
|
|
|
<div class="boxed-section-body">
|
2018-12-10 23:26:27 +00:00
|
|
|
{{#if model.isRunning}}
|
|
|
|
<div class="columns">
|
|
|
|
<div class="column">
|
2020-06-01 19:03:56 +00:00
|
|
|
<PrimaryMetric @resource={{model}} @metric="cpu" />
|
2018-12-10 23:26:27 +00:00
|
|
|
</div>
|
|
|
|
<div class="column">
|
2020-06-01 19:03:56 +00:00
|
|
|
<PrimaryMetric @resource={{model}} @metric="memory" />
|
2018-12-10 23:26:27 +00:00
|
|
|
</div>
|
2018-09-14 17:21:28 +00:00
|
|
|
</div>
|
2018-12-10 23:26:27 +00:00
|
|
|
{{else}}
|
2018-12-11 01:28:35 +00:00
|
|
|
<div data-test-resource-error class="empty-message">
|
|
|
|
<h3 data-test-resource-error-headline class="empty-message-headline">Allocation isn't running</h3>
|
2018-12-10 23:26:27 +00:00
|
|
|
<p class="empty-message-body">Only running allocations utilize resources.</p>
|
2018-09-14 17:21:28 +00:00
|
|
|
</div>
|
2018-12-10 23:26:27 +00:00
|
|
|
{{/if}}
|
2018-09-14 17:21:28 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2020-06-01 19:03:56 +00:00
|
|
|
<LifecycleChart @taskStates={{model.states}} />
|
2020-04-30 13:15:19 +00:00
|
|
|
|
2018-07-25 22:05:24 +00:00
|
|
|
<div class="boxed-section">
|
|
|
|
<div class="boxed-section-head">
|
|
|
|
Tasks
|
2017-10-31 04:02:40 +00:00
|
|
|
</div>
|
2018-11-10 01:13:08 +00:00
|
|
|
<div class="boxed-section-body {{if sortedStates.length "is-full-bleed"}}">
|
|
|
|
{{#if sortedStates.length}}
|
2020-06-01 19:03:56 +00:00
|
|
|
<ListTable
|
|
|
|
@source={{sortedStates}}
|
|
|
|
@sortProperty={{sortProperty}}
|
|
|
|
@sortDescending={{sortDescending}}
|
|
|
|
@class="is-striped" as |t|>
|
|
|
|
<t.head>
|
2018-11-10 01:13:08 +00:00
|
|
|
<th class="is-narrow"></th>
|
2020-06-01 19:03:56 +00:00
|
|
|
<t.sort-by @prop="name">Name</t.sort-by>
|
|
|
|
<t.sort-by @prop="state">State</t.sort-by>
|
2018-11-10 01:13:08 +00:00
|
|
|
<th>Last Event</th>
|
2020-06-01 19:03:56 +00:00
|
|
|
<t.sort-by @prop="events.lastObject.time">Time</t.sort-by>
|
2020-02-13 06:14:28 +00:00
|
|
|
<th>Volumes</th>
|
2018-11-10 01:13:08 +00:00
|
|
|
<th>Addresses</th>
|
|
|
|
<th>CPU</th>
|
|
|
|
<th>Memory</th>
|
2020-06-01 19:03:56 +00:00
|
|
|
</t.head>
|
|
|
|
<t.body as |row|>
|
|
|
|
<TaskRow
|
|
|
|
@data-test-task-row={{row.model.name}}
|
|
|
|
@task={{row.model}}
|
|
|
|
@onClick={{action "taskClick" row.model.allocation row.model}} />
|
|
|
|
</t.body>
|
|
|
|
</ListTable>
|
2018-11-10 01:13:08 +00:00
|
|
|
{{else}}
|
|
|
|
<div data-test-empty-tasks-list class="empty-message">
|
|
|
|
<h3 data-test-empty-tasks-list-headline class="empty-message-headline">No Tasks</h3>
|
|
|
|
<p data-test-empty-tasks-list-body class="empty-message-body">Allocations will not have tasks until they are in a running state.</p>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2018-07-25 22:05:24 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-05-03 19:31:25 +00:00
|
|
|
|
2019-09-04 14:39:56 +00:00
|
|
|
{{#if network.ports.length}}
|
|
|
|
<div class="boxed-section" data-test-allocation-ports>
|
|
|
|
<div class="boxed-section-head">
|
|
|
|
Ports
|
|
|
|
</div>
|
|
|
|
<div class="boxed-section-body is-full-bleed">
|
2020-06-01 19:03:56 +00:00
|
|
|
<ListTable @source={{network.ports}} as |t|>
|
|
|
|
<t.head>
|
2019-09-04 14:39:56 +00:00
|
|
|
<th class="is-2">Name</th>
|
|
|
|
<th class="is-1">Dynamic?</th>
|
|
|
|
<th>Host Address</th>
|
|
|
|
<th>Mapped Port</th>
|
2020-06-01 19:03:56 +00:00
|
|
|
</t.head>
|
|
|
|
<t.body as |row|>
|
2019-09-04 14:39:56 +00:00
|
|
|
<tr data-test-allocation-port>
|
|
|
|
<td data-test-allocation-port-name>{{row.model.name}}</td>
|
|
|
|
<td data-test-allocation-port-is-dynamic>{{if row.model.isDynamic "Yes" "No"}}</td>
|
|
|
|
<td data-test-allocation-port-address>
|
|
|
|
<a href="http://{{network.ip}}:{{row.model.port}}" target="_blank" rel="noopener noreferrer">{{network.ip}}:{{row.model.port}}</a>
|
|
|
|
</td>
|
|
|
|
<td data-test-allocation-port-to>{{row.model.to}}</td>
|
|
|
|
</tr>
|
2020-06-01 19:03:56 +00:00
|
|
|
</t.body>
|
|
|
|
</ListTable>
|
2019-09-04 14:39:56 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{#if services.length}}
|
|
|
|
<div class="boxed-section">
|
|
|
|
<div class="boxed-section-head">
|
|
|
|
Services
|
|
|
|
</div>
|
|
|
|
<div class="boxed-section-body is-full-bleed">
|
2020-06-01 19:03:56 +00:00
|
|
|
<ListTable @source={{services}} as |t|>
|
|
|
|
<t.head>
|
2019-09-04 14:39:56 +00:00
|
|
|
<th class="is-2">Name</th>
|
|
|
|
<th class="is-1">Port</th>
|
|
|
|
<td>Tags</td>
|
|
|
|
<td>Connect?</td>
|
|
|
|
<td>Upstreams</td>
|
2020-06-01 19:03:56 +00:00
|
|
|
</t.head>
|
|
|
|
<t.body as |row|>
|
2019-09-04 14:39:56 +00:00
|
|
|
<tr data-test-service>
|
|
|
|
<td data-test-service-name>{{row.model.name}}</td>
|
|
|
|
<td data-test-service-port>{{row.model.portLabel}}</td>
|
|
|
|
<td data-test-service-tags>{{join ", " row.model.tags}}</td>
|
|
|
|
<td data-test-service-connect>{{if row.model.connect "Yes" "No"}}</td>
|
|
|
|
<td data-test-service-upstreams>
|
|
|
|
{{#each row.model.connect.sidecarService.proxy.upstreams as |upstream|}}
|
|
|
|
{{upstream.destinationName}}:{{upstream.localBindPort}}
|
|
|
|
{{/each}}
|
|
|
|
</td>
|
|
|
|
</tr>
|
2020-06-01 19:03:56 +00:00
|
|
|
</t.body>
|
|
|
|
</ListTable>
|
2019-09-04 14:39:56 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
2018-07-25 22:05:24 +00:00
|
|
|
{{#if model.hasRescheduleEvents}}
|
|
|
|
<div class="boxed-section" data-test-reschedule-events>
|
|
|
|
<div class="boxed-section-head is-hollow">
|
|
|
|
Reschedule Events
|
|
|
|
</div>
|
|
|
|
<div class="boxed-section-body">
|
2020-06-01 19:03:56 +00:00
|
|
|
<RescheduleEventTimeline @allocation={{model}} />
|
2018-05-03 19:31:25 +00:00
|
|
|
</div>
|
2018-07-25 22:05:24 +00:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2019-04-17 23:17:48 +00:00
|
|
|
|
|
|
|
{{#if model.wasPreempted}}
|
|
|
|
<div class="boxed-section is-warning" data-test-was-preempted>
|
|
|
|
<div class="boxed-section-head">Preempted By</div>
|
|
|
|
<div class="boxed-section-body">
|
2020-07-09 17:30:11 +00:00
|
|
|
{{#if preempter}}
|
2019-04-17 23:17:48 +00:00
|
|
|
<div class="boxed-section is-small">
|
|
|
|
<div class="boxed-section-body inline-definitions">
|
|
|
|
<span class="pair">
|
|
|
|
<span data-test-allocation-status class="tag {{preempter.statusClass}}">
|
|
|
|
{{preempter.clientStatus}}
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<span class="pair">
|
2019-04-22 23:10:21 +00:00
|
|
|
<span class="term" data-test-allocation-name>{{preempter.name}}</span>
|
2020-06-01 19:03:56 +00:00
|
|
|
<LinkTo @route="allocations.allocation" @model={{preempter}} data-test-allocation-id>{{preempter.shortId}}</LinkTo>
|
2019-04-17 23:17:48 +00:00
|
|
|
</span>
|
|
|
|
<span class="pair job-link"><span class="term">Job</span>
|
2020-06-01 19:03:56 +00:00
|
|
|
<LinkTo @route="jobs.job" @model={{preempter.job}} @query={{hash jobNamespace=preempter.job.namespace.id}} data-test-job-link>{{preempter.job.name}}</LinkTo>
|
2019-04-17 23:17:48 +00:00
|
|
|
</span>
|
|
|
|
<span class="pair job-priority"><span class="term">Priority</span>
|
2019-04-22 23:10:21 +00:00
|
|
|
<span data-test-job-priority>{{preempter.job.priority}}</span>
|
2019-04-17 23:17:48 +00:00
|
|
|
</span>
|
|
|
|
<span class="pair node-link"><span class="term">Client</span>
|
2020-06-01 19:03:56 +00:00
|
|
|
<LinkTo @route="clients.client" @model={{preempter.node}} data-test-client-link>{{preempter.node.shortId}}</LinkTo>
|
2019-04-17 23:17:48 +00:00
|
|
|
</span>
|
|
|
|
<span class="pair"><span class="term">Reserved CPU</span>
|
2019-04-22 23:10:21 +00:00
|
|
|
<span data-test-allocation-cpu>{{preempter.resources.cpu}} MHz</span>
|
2019-04-17 23:17:48 +00:00
|
|
|
</span>
|
|
|
|
<span class="pair"><span class="term">Reserved Memory</span>
|
2019-04-22 23:10:21 +00:00
|
|
|
<span data-test-allocation-memory>{{preempter.resources.memory}} MiB</span>
|
2019-04-17 23:17:48 +00:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-07-09 17:30:11 +00:00
|
|
|
{{else}}
|
|
|
|
<div class="empty-message">
|
|
|
|
<h3 class="empty-message-headline">Allocation is gone</h3>
|
|
|
|
<p class="empty-message-body">This allocation has been stopped and garbage collected.</p>
|
|
|
|
</div>
|
2019-04-17 23:17:48 +00:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2019-04-17 23:34:25 +00:00
|
|
|
|
2019-04-22 23:10:21 +00:00
|
|
|
{{#if (and model.preemptedAllocations.isFulfilled model.preemptedAllocations.length)}}
|
2019-04-17 23:34:25 +00:00
|
|
|
<div class="boxed-section" data-test-preemptions>
|
|
|
|
<div class="boxed-section-head">Preempted Allocations</div>
|
|
|
|
<div class="boxed-section-body">
|
2020-06-01 19:03:56 +00:00
|
|
|
<ListTable
|
|
|
|
@source={{model.preemptedAllocations}}
|
|
|
|
@class="allocations is-isolated" as |t|>
|
|
|
|
<t.head>
|
2019-04-17 23:34:25 +00:00
|
|
|
<th class="is-narrow"></th>
|
|
|
|
<th>ID</th>
|
|
|
|
<th>Task Group</th>
|
|
|
|
<th>Created</th>
|
|
|
|
<th>Modified</th>
|
|
|
|
<th>Status</th>
|
|
|
|
<th>Version</th>
|
|
|
|
<th>Node</th>
|
|
|
|
<th>CPU</th>
|
|
|
|
<th>Memory</th>
|
2020-06-01 19:03:56 +00:00
|
|
|
</t.head>
|
|
|
|
<t.body as |row|>
|
|
|
|
<AllocationRow @allocation={{row.model}} @context="job" @data-test-allocation={{row.model.id}} />
|
|
|
|
</t.body>
|
|
|
|
</ListTable>
|
2019-04-17 23:34:25 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2018-07-25 22:05:24 +00:00
|
|
|
</section>
|