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