-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: update sveltekit to 1.0.0-next.449
- Loading branch information
1 parent
1c4afd9
commit dcd9f8a
Showing
18 changed files
with
1,477 additions
and
1,177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v16.10.0 | ||
v16.17.0 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export const stopPipelineHandler = async (params) => { | ||
const { owner, repository, branch, build } = params | ||
const res = await fetch( | ||
`http://localhost:9200/api/v1/pipelines/${owner}/${repository}/${branch}/${build}`, | ||
{ | ||
method: 'PUT', | ||
} | ||
) | ||
const result = await res.json() | ||
|
||
// TODO: improve error handling (@rajatgupta24) | ||
if (result) { | ||
console.log('pipeline has successfully stopped') | ||
} else { | ||
console.log('some error occured, pipeline is not stopped') | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,6 @@ | |
} | ||
eventSource.onerror = (e) => { | ||
console.log('Connection error') | ||
console.log(e) | ||
} | ||
}) | ||
</script> | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { error } from '@sveltejs/kit' | ||
|
||
// Todo: move it to endpoints | ||
export const load = async({ fetch }) => { | ||
// ToDo: Use Axios | ||
const res = await fetch('http://localhost:9200/api/v1/pipelines') | ||
const pipelines = await res.json() | ||
|
||
if (res.ok) { | ||
return { | ||
pipelines, | ||
} | ||
} | ||
throw error(500, 'Could not fetch pipelines') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
web/src/routes/admin/pipelines/[org]/[repo]/[branch]/[build]/+page.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { error } from '@sveltejs/kit' | ||
// Todo: move it to endpoints | ||
export async function load({ fetch, params }) { | ||
// ToDo: Use Axios | ||
|
||
const { org, repo, branch, build } = params | ||
const res = await fetch( | ||
`http://localhost:9200/api/v1/pipelines/${org}/${repo}/${branch}/${build}` | ||
) | ||
|
||
const pipeline = await res.json() | ||
if (res.ok) { | ||
return { | ||
pipeline, | ||
org, | ||
repo, | ||
branch, | ||
build, | ||
} | ||
} | ||
throw error(500, 'Could not fetch pipelines') | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { error } from '@sveltejs/kit' | ||
|
||
// Todo: move it to endpoints | ||
export async function load({ fetch }) { | ||
// ToDo: Use Axios | ||
const res = await fetch('http://localhost:9200/api/v1/repositories') | ||
const repositories = await res.json() | ||
if (res.ok) { | ||
const repositoriesProcessed = repositories.map((k) => k.spec) | ||
return { | ||
repositoriesProcessed, | ||
} | ||
} | ||
throw error(500, 'Could not fetch repositories') | ||
} |
File renamed without changes.