fix: Build log
This commit is contained in:
@@ -37,3 +37,9 @@ export function dashify(str: string, options?: any): string {
|
|||||||
.replace(/-{2,}/g, (m) => (options && options.condense ? '-' : m))
|
.replace(/-{2,}/g, (m) => (options && options.condense ? '-' : m))
|
||||||
.toLowerCase();
|
.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function changeQueryParams(buildId) {
|
||||||
|
const queryParams = new URLSearchParams(window.location.search);
|
||||||
|
queryParams.set('buildId', buildId);
|
||||||
|
return history.pushState(null, null, '?' + queryParams.toString());
|
||||||
|
}
|
||||||
|
@@ -88,7 +88,6 @@
|
|||||||
try {
|
try {
|
||||||
const { buildId } = await post(`/applications/${id}/deploy.json`, { ...application });
|
const { buildId } = await post(`/applications/${id}/deploy.json`, { ...application });
|
||||||
toast.push('Deployment queued.');
|
toast.push('Deployment queued.');
|
||||||
console.log($page.url);
|
|
||||||
if ($page.url.pathname.startsWith(`/applications/${id}/logs/build`)) {
|
if ($page.url.pathname.startsWith(`/applications/${id}/logs/build`)) {
|
||||||
return window.location.assign(`/applications/${id}/logs/build?buildId=${buildId}`);
|
return window.location.assign(`/applications/${id}/logs/build?buildId=${buildId}`);
|
||||||
} else {
|
} else {
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
import { dateOptions, getDomain } from '$lib/components/common';
|
import { changeQueryParams, dateOptions, getDomain } from '$lib/components/common';
|
||||||
|
|
||||||
import BuildLog from './_BuildLog.svelte';
|
import BuildLog from './_BuildLog.svelte';
|
||||||
import { get } from '$lib/api';
|
import { get } from '$lib/api';
|
||||||
@@ -79,11 +79,9 @@
|
|||||||
noMoreBuilds = true;
|
noMoreBuilds = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function loadBuild(build) {
|
function loadBuild(build) {
|
||||||
buildId = build;
|
buildId = build;
|
||||||
const queryParams = new URLSearchParams(window.location.search);
|
return changeQueryParams(buildId);
|
||||||
queryParams.set('buildId', buildId);
|
|
||||||
return history.pushState(null, null, '?' + queryParams.toString());
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user