more make web
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
@ -83,9 +83,6 @@ export class KerberosSourceViewPage extends AKElement {
|
|||||||
slot="page-overview"
|
slot="page-overview"
|
||||||
data-tab-title="${msg("Overview")}"
|
data-tab-title="${msg("Overview")}"
|
||||||
class="pf-c-page__main-section pf-m-no-padding-mobile"
|
class="pf-c-page__main-section pf-m-no-padding-mobile"
|
||||||
@activate=${() => {
|
|
||||||
this.load();
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<div slot="header" class="pf-c-banner pf-m-info">
|
<div slot="header" class="pf-c-banner pf-m-info">
|
||||||
${msg("Kerberos Source is in preview.")}
|
${msg("Kerberos Source is in preview.")}
|
||||||
|
@ -147,41 +147,22 @@ export class TaskList extends Table<Task> {
|
|||||||
</div>`;
|
</div>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
taskState(task: Task): TemplateResult {
|
|
||||||
return;
|
|
||||||
switch (task.aggregatedStatus) {
|
|
||||||
case TasksTasksListAggregatedStatusEnum.Queued:
|
|
||||||
return html`<ak-label color=${PFColor.Grey}>${msg("Waiting to run")}</ak-label>`;
|
|
||||||
case TasksTasksListAggregatedStatusEnum.Consumed:
|
|
||||||
return html`<ak-label color=${PFColor.Blue}>${msg("Running")}</ak-label>`;
|
|
||||||
case TasksTasksListAggregatedStatusEnum.Done:
|
|
||||||
case TasksTasksListAggregatedStatusEnum.Info:
|
|
||||||
return html`<ak-label color=${PFColor.Green}>${msg("Successful")}</ak-label>`;
|
|
||||||
case TasksTasksListAggregatedStatusEnum.Warning:
|
|
||||||
return html`<ak-label color=${PFColor.Orange}>${msg("Warning")}</ak-label>`;
|
|
||||||
case TasksTasksListAggregatedStatusEnum.Rejected:
|
|
||||||
case TasksTasksListAggregatedStatusEnum.Error:
|
|
||||||
return html`<ak-label color=${PFColor.Red}>${msg("Error")}</ak-label>`;
|
|
||||||
default:
|
|
||||||
return html`<ak-label color=${PFColor.Grey}>${msg("Unknown")}</ak-label>`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
row(item: Task): TemplateResult[] {
|
row(item: Task): TemplateResult[] {
|
||||||
return [
|
return [
|
||||||
html`<div>${item.actorName}</div>
|
html`<div>${item.actorName}</div>
|
||||||
<small>${item.uid.replace(new RegExp("^authentik."), "")}</small>`,
|
<small>${item.uid.replace(new RegExp("^authentik."), "")}</small>`,
|
||||||
html`${item.queueName}`,
|
html`${item.queueName}`,
|
||||||
html`<div>${formatElapsedTime(item.mtime || new Date())}</div>
|
html`<div>${formatElapsedTime(item.mtime || new Date())}</div>
|
||||||
<small>${item.mtime.toLocaleString()}</small>`,
|
<small>${item.mtime?.toLocaleString()}</small>`,
|
||||||
html`<ak-task-status .status=${item.aggregatedStatus}></ak-task-status>`,
|
html`<ak-task-status .status=${item.aggregatedStatus}></ak-task-status>`,
|
||||||
[TasksTasksListStateEnum.Rejected, TasksTasksListStateEnum.Done].includes(item.state)
|
item.state === TasksTasksListStateEnum.Rejected ||
|
||||||
|
item.state === TasksTasksListStateEnum.Done
|
||||||
? html`<ak-action-button
|
? html`<ak-action-button
|
||||||
class="pf-m-plain"
|
class="pf-m-plain"
|
||||||
.apiRequest=${() => {
|
.apiRequest=${() => {
|
||||||
return new TasksApi(DEFAULT_CONFIG)
|
return new TasksApi(DEFAULT_CONFIG)
|
||||||
.tasksTasksRetryCreate({
|
.tasksTasksRetryCreate({
|
||||||
messageId: item.messageId,
|
messageId: item.messageId ?? "",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.dispatchEvent(
|
this.dispatchEvent(
|
||||||
|
Reference in New Issue
Block a user