fixes
This commit is contained in:
@@ -87,6 +87,9 @@ export async function removeContainer({
|
|||||||
await executeDockerCmd({ dockerId, command: `docker stop -t 0 ${id}` })
|
await executeDockerCmd({ dockerId, command: `docker stop -t 0 ${id}` })
|
||||||
await executeDockerCmd({ dockerId, command: `docker rm ${id}` })
|
await executeDockerCmd({ dockerId, command: `docker rm ${id}` })
|
||||||
}
|
}
|
||||||
|
if (JSON.parse(stdout).Status === 'exited') {
|
||||||
|
await executeDockerCmd({ dockerId, command: `docker rm ${id}` })
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
@@ -272,14 +272,13 @@
|
|||||||
>
|
>
|
||||||
{#if $status.application.overallStatus === 'degraded' && application.buildPack !== 'compose'}
|
{#if $status.application.overallStatus === 'degraded' && application.buildPack !== 'compose'}
|
||||||
<a
|
<a
|
||||||
id="applicationerror"
|
|
||||||
href={$isDeploymentEnabled ? `/applications/${id}/logs` : null}
|
href={$isDeploymentEnabled ? `/applications/${id}/logs` : null}
|
||||||
class="btn btn-error gap-2"
|
class="btn btn-sm text-sm gap-2"
|
||||||
sveltekit:prefetch
|
sveltekit:prefetch
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
class="w-6 h-6"
|
class="w-6 h-6 text-red-500"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
stroke-width="1.5"
|
stroke-width="1.5"
|
||||||
stroke="currentcolor"
|
stroke="currentcolor"
|
||||||
@@ -296,7 +295,6 @@
|
|||||||
</svg>
|
</svg>
|
||||||
Application Error
|
Application Error
|
||||||
</a>
|
</a>
|
||||||
<Tooltip triggeredBy="#applicationerror">Application exited with an error!</Tooltip>
|
|
||||||
{/if}
|
{/if}
|
||||||
{#if $status.application.initialLoading}
|
{#if $status.application.initialLoading}
|
||||||
<button class="btn btn-ghost btn-sm gap-2">
|
<button class="btn btn-ghost btn-sm gap-2">
|
||||||
@@ -364,7 +362,7 @@
|
|||||||
<path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" />
|
<path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" />
|
||||||
</svg> Restart
|
</svg> Restart
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
<button
|
<button
|
||||||
disabled={!$isDeploymentEnabled}
|
disabled={!$isDeploymentEnabled}
|
||||||
class="btn btn-sm gap-2"
|
class="btn btn-sm gap-2"
|
||||||
@@ -389,13 +387,32 @@
|
|||||||
|
|
||||||
Force Redeploy
|
Force Redeploy
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{:else if $isDeploymentEnabled && !$page.url.pathname.startsWith(`/applications/${id}/configuration/`)}
|
{:else if $isDeploymentEnabled && !$page.url.pathname.startsWith(`/applications/${id}/configuration/`)}
|
||||||
|
{#if $status.application.overallStatus === 'degraded'}
|
||||||
|
<button
|
||||||
|
on:click={stopApplication}
|
||||||
|
type="submit"
|
||||||
|
disabled={!$isDeploymentEnabled}
|
||||||
|
class="btn btn-sm btn-error gap-2"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
class="w-6 h-6 "
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
stroke-width="1.5"
|
||||||
|
stroke="currentColor"
|
||||||
|
fill="none"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
|
<rect x="6" y="5" width="4" height="14" rx="1" />
|
||||||
|
<rect x="14" y="5" width="4" height="14" rx="1" />
|
||||||
|
</svg> Stop
|
||||||
|
</button>
|
||||||
|
{/if}
|
||||||
<button
|
<button
|
||||||
class="btn btn-sm gap-2"
|
class="btn btn-sm gap-2"
|
||||||
class:btn-error={$status.application.overallStatus === 'degraded'}
|
|
||||||
class:btn-primary={$status.application.overallStatus !== 'degraded'}
|
class:btn-primary={$status.application.overallStatus !== 'degraded'}
|
||||||
disabled={!$isDeploymentEnabled}
|
disabled={!$isDeploymentEnabled}
|
||||||
on:click={() => handleDeploySubmit(false)}
|
on:click={() => handleDeploySubmit(false)}
|
||||||
@@ -431,9 +448,12 @@
|
|||||||
transform="rotate(-45 12 12)"
|
transform="rotate(-45 12 12)"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
{$status.application.overallStatus === 'degraded' ? 'Restart Degraded Stack' : 'Deploy'}
|
{$status.application.overallStatus === 'degraded'
|
||||||
|
? $status.application.statuses.length === 1
|
||||||
|
? 'Force Redeploy'
|
||||||
|
: 'Redeploy Stack'
|
||||||
|
: 'Deploy'}
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
{#if $location && $status.application.overallStatus === 'healthy'}
|
{#if $location && $status.application.overallStatus === 'healthy'}
|
||||||
|
@@ -102,10 +102,8 @@
|
|||||||
: {
|
: {
|
||||||
Authorization: `Bearer ${$appSession.tokens.gitlab}`
|
Authorization: `Bearer ${$appSession.tokens.gitlab}`
|
||||||
};
|
};
|
||||||
if (isPublicRepository) {
|
|
||||||
return;
|
const url = isPublicRepository ? `/projects/${projectId}/repository/tree` : `/v4/projects/${projectId}/repository/tree`;
|
||||||
}
|
|
||||||
const url = isPublicRepository ? `` : `/v4/projects/${projectId}/repository/tree`;
|
|
||||||
const files = await get(`${apiUrl}${url}`, {
|
const files = await get(`${apiUrl}${url}`, {
|
||||||
...headers
|
...headers
|
||||||
});
|
});
|
||||||
|
@@ -237,6 +237,7 @@
|
|||||||
(application.id && application.id.toLowerCase().includes($search.toLowerCase())) ||
|
(application.id && application.id.toLowerCase().includes($search.toLowerCase())) ||
|
||||||
(application.name && application.name.toLowerCase().includes($search.toLowerCase())) ||
|
(application.name && application.name.toLowerCase().includes($search.toLowerCase())) ||
|
||||||
(application.fqdn && application.fqdn.toLowerCase().includes($search.toLowerCase())) ||
|
(application.fqdn && application.fqdn.toLowerCase().includes($search.toLowerCase())) ||
|
||||||
|
(application.dockerComposeConfiguration && application.dockerComposeConfiguration.toLowerCase().includes($search.toLowerCase())) ||
|
||||||
(application.repository &&
|
(application.repository &&
|
||||||
application.repository.toLowerCase().includes($search.toLowerCase())) ||
|
application.repository.toLowerCase().includes($search.toLowerCase())) ||
|
||||||
(application.buildpack &&
|
(application.buildpack &&
|
||||||
|
Reference in New Issue
Block a user