Skip to content

Commit

Permalink
fix(backend): don't die on no live URL
Browse files Browse the repository at this point in the history
  • Loading branch information
dr460nf1r3 committed Nov 24, 2024
1 parent ce4c74a commit cbeaa11
Show file tree
Hide file tree
Showing 4 changed files with 235 additions and 232 deletions.
34 changes: 18 additions & 16 deletions frontend/src/app/status/status.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,22 @@ <h3 class="pt-10 text-center text-xl font-bold text-mauve">Running pipelines</h3
</p>
@for (pipeline of pipelines; track pipeline) {
<a href="{{ pipeline.web_url }}">
<div
class="my-3 grid gap-x-0 grid-cols-3 border border-mauve bg-surface0 rounded-lg shadow-sm cursor-pointer"
>
<div class="place-self-auto rounded-xl border-mauve bg-surface0 p-4">
<h4 class="text-center text-xl text-mauve">Status</h4>
<p class="my-2 text-center text-maroon">{{ pipeline.status }} ↗</p>
</div>
<div class="place-self-auto border-mauve bg-surface0 p-4">
<h4 class="text-center text-xl text-mauve">Trigger</h4>
<p class="my-2 text-center text-rosewater">{{ pipeline.source }}</p>
</div>
<div class="place-self-auto rounded-xl rounded- border-mauve bg-surface0 p-4">
<h4 class="text-center text-xl text-mauve">Created at</h4>
<p class="my-2 text-center text-yellow">{{ pipeline.created_at | date: "medium" }}</p>
<div
class="my-3 grid gap-x-0 grid-cols-3 border border-mauve bg-surface0 rounded-lg shadow-sm cursor-pointer"
>
<div class="place-self-auto rounded-xl border-mauve bg-surface0 p-4">
<h4 class="text-center text-xl text-mauve">Status</h4>
<p class="my-2 text-center text-maroon">{{ pipeline.status }} ↗</p>
</div>
<div class="place-self-auto border-mauve bg-surface0 p-4">
<h4 class="text-center text-xl text-mauve">Trigger</h4>
<p class="my-2 text-center text-rosewater">{{ pipeline.source }}</p>
</div>
<div class="place-self-auto rounded-xl rounded- border-mauve bg-surface0 p-4">
<h4 class="text-center text-xl text-mauve">Created at</h4>
<p class="my-2 text-center text-yellow">{{ pipeline.created_at | date: "medium" }}</p>
</div>
</div>
</div>
</a>
}
</div>
Expand Down Expand Up @@ -141,7 +141,9 @@ <h4 class="text-center text-xl text-mauve">Packages</h4>
<p class="text-s text-center text-yellow">
@for (pkg of queue.packages; track pkg) {
{{ pkg }}
<a class="text-sky cursor-pointer" href="{{ queue.liveLogUrl![$index] }}"
<a
class="text-sky cursor-pointer"
href="{{ queue.liveLogUrl !== undefined ? queue.liveLogUrl![$index] : '' }}"
>class
{{
queue.build_class![$index] !== null
Expand Down
1 change: 1 addition & 0 deletions frontend/src/app/status/status.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class StatusComponent implements AfterViewInit {
startShortPolling(5000, async (): Promise<void> => {
await this.getQueueStats(true);
await this.getPipelines();
console.log(this.currentQueue);
});
}

Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "aur.chaotic.cx",
"version": "1.0.0",
"license": "LGPL-3.0-or-later",
"packageManager": "[email protected].0+sha512.856941ef22665d2f3e41c04e8d86ed757ef057fb2bc35011698bfa988ef5817cc1cdd28bb883e7f23f0568c75de5544d4750211d4276b9ba6d55369eb207a549",
"packageManager": "[email protected].2+sha512.f18a59ca3611002321af7681e6d49234cb3ece8496b05818be5b1081168ec21b8c3d28cbb4351e2fdec66ca95e6516faaf08b95b755013c88cf5174d5029865c",
"scripts": {
"build": "nx run-many --target=build --all",
"format": "nx format:write",
Expand Down Expand Up @@ -38,17 +38,17 @@
"@nestjs/cli": "^10.4.8",
"@nestjs/schematics": "^10.2.3",
"@nestjs/testing": "^10.4.8",
"@nx/angular": "20.0.12",
"@nx/esbuild": "20.0.12",
"@nx/eslint": "20.0.12",
"@nx/eslint-plugin": "20.0.12",
"@nx/jest": "20.0.12",
"@nx/js": "20.0.12",
"@nx/nest": "20.0.12",
"@nx/node": "20.0.12",
"@nx/web": "20.0.12",
"@nx/webpack": "20.0.12",
"@nx/workspace": "20.0.12",
"@nx/angular": "20.1.3",
"@nx/esbuild": "20.1.3",
"@nx/eslint": "20.1.3",
"@nx/eslint-plugin": "20.1.3",
"@nx/jest": "20.1.3",
"@nx/js": "20.1.3",
"@nx/nest": "20.1.3",
"@nx/node": "20.1.3",
"@nx/web": "20.1.3",
"@nx/webpack": "20.1.3",
"@nx/workspace": "20.1.3",
"@schematics/angular": "18.2.11",
"@swc-node/register": "~1.10.9",
"@swc/core": "~1.9.3",
Expand All @@ -74,7 +74,7 @@
"jest-preset-angular": "^14.3.3",
"lint-staged": "^15.2.10",
"local-cors-proxy": "^1.1.0",
"nx": "20.0.12",
"nx": "20.1.3",
"pino-pretty": "^11.3.0",
"prettier": "^3.3.3",
"run-script-webpack-plugin": "^0.2.0",
Expand Down
Loading

0 comments on commit cbeaa11

Please sign in to comment.