Merge pull request #618 from coollabsio/draft/nostalgic-allen
Draft/nostalgic allen
This commit is contained in:
commit
3f5108268d
@ -28,7 +28,7 @@ import {addToast} from '$lib/store';
|
||||
import BuildLog from './_BuildLog.svelte';
|
||||
import { get, post } from '$lib/api';
|
||||
import { t } from '$lib/translations';
|
||||
import { changeQueryParams, dateOptions, errorNotification } from '$lib/common';
|
||||
import { changeQueryParams, dateOptions, errorNotification, asyncSleep } from '$lib/common';
|
||||
import Tooltip from '$lib/components/Tooltip.svelte';
|
||||
|
||||
let buildId: any;
|
||||
@ -85,7 +85,7 @@ import {addToast} from '$lib/store';
|
||||
return changeQueryParams(buildId);
|
||||
}
|
||||
async function resetQueue() {
|
||||
const sure = confirm('It will reset all build queues for all applications. If something is queued, it will be canceled automatically. Are you sure? ');
|
||||
const sure = confirm('It will reset all build queues for all applications. If something is queued, it will be canceled automatically. Are you sure? ');
|
||||
if (sure) {
|
||||
|
||||
try {
|
||||
@ -94,6 +94,8 @@ import {addToast} from '$lib/store';
|
||||
message: 'Queue reset done.',
|
||||
type: 'success'
|
||||
});
|
||||
await asyncSleep(500)
|
||||
return window.location.reload()
|
||||
} catch (error) {
|
||||
return errorNotification(error);
|
||||
}
|
||||
@ -162,12 +164,8 @@ import {addToast} from '$lib/store';
|
||||
on:click={() => loadBuild(build.id)}
|
||||
class:rounded-tr={index === 0}
|
||||
class:rounded-br={index === builds.length - 1}
|
||||
class="flex cursor-pointer items-center justify-center border-l-2 py-4 no-underline transition-all duration-100 hover:bg-coolgray-400 hover:shadow-xl"
|
||||
class="flex cursor-pointer items-center justify-center py-4 no-underline transition-all duration-100 hover:bg-coolgray-400 hover:shadow-xl"
|
||||
class:bg-coolgray-400={buildId === build.id}
|
||||
class:border-red-500={build.status === 'failed'}
|
||||
class:border-orange-500={build.status === 'canceled'}
|
||||
class:border-green-500={build.status === 'success'}
|
||||
class:border-yellow-500={build.status === 'running'}
|
||||
>
|
||||
<div class="flex-col px-2 text-center min-w-[10rem]">
|
||||
<div class="text-sm font-bold">
|
||||
@ -176,6 +174,11 @@ import {addToast} from '$lib/store';
|
||||
<div class="text-xs">
|
||||
{build.type}
|
||||
</div>
|
||||
<div class="badge badge-sm text-xs text-white uppercase rounded bg-coolgray-300 border-none font-bold"
|
||||
class:text-red-500={build.status === 'failed'}
|
||||
class:text-orange-500={build.status === 'canceled'}
|
||||
class:text-green-500={build.status === 'success'}
|
||||
class:text-yellow-500={build.status === 'running'}>{build.status}</div>
|
||||
</div>
|
||||
|
||||
<div class="w-48 text-center text-xs">
|
||||
|
Loading…
x
Reference in New Issue
Block a user