-
+
@@ -10,8 +13,11 @@ import { defineComponent } from 'vue';
export default defineComponent({
name: 'Panel',
- setup() {
- return {};
+ props: {
+ title: {
+ type: String,
+ default: '',
+ },
},
});
diff --git a/web/src/components/repo/build/BuildLogs.vue b/web/src/components/repo/build/BuildLog.vue
similarity index 99%
rename from web/src/components/repo/build/BuildLogs.vue
rename to web/src/components/repo/build/BuildLog.vue
index 5005bf097..580e40967 100644
--- a/web/src/components/repo/build/BuildLogs.vue
+++ b/web/src/components/repo/build/BuildLog.vue
@@ -28,7 +28,7 @@ import { Build, Repo } from '~/lib/api/types';
import { findProc } from '~/utils/helpers';
export default defineComponent({
- name: 'BuildLogs',
+ name: 'BuildLog',
components: {},
diff --git a/web/src/components/repo/build/BuildProcList.vue b/web/src/components/repo/build/BuildProcList.vue
new file mode 100644
index 000000000..10eafd8cf
--- /dev/null
+++ b/web/src/components/repo/build/BuildProcList.vue
@@ -0,0 +1,112 @@
+
+
+
+
+
+
+
{{ proc.name }}
+
+
+ {{ key }}
+ {{
+ value
+ }}
+
+
+
+
+
+
+
+
+
{{ job.name }}
+
+
+
+
+
+
+
diff --git a/web/src/components/repo/build/BuildProcs.vue b/web/src/components/repo/build/BuildProcs.vue
deleted file mode 100644
index cd1fb22da..000000000
--- a/web/src/components/repo/build/BuildProcs.vue
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
- Execution error
- {{ build.error }}
-
-
-
-
-
-
{{ proc.name }}
-
-
- {{ key }}
- {{
- value
- }}
-
-
-
-
-
-
-
-
-
{{ job.name }}
-
-
-
-
-
-
-
-
-
-
diff --git a/web/src/components/tabs/Tab.vue b/web/src/components/tabs/Tab.vue
index 128b9cf87..28a2a4aa5 100644
--- a/web/src/components/tabs/Tab.vue
+++ b/web/src/components/tabs/Tab.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/web/src/components/tabs/Tabs.vue b/web/src/components/tabs/Tabs.vue
index 1f63e9727..caeaa2f36 100644
--- a/web/src/components/tabs/Tabs.vue
+++ b/web/src/components/tabs/Tabs.vue
@@ -1,6 +1,6 @@
-
+
) => {
return undefined;
}
- const start = build.value.started_at || 0;
-
- if (start === 0) {
- return 0;
- }
+ const start = build.value.created_at || 0;
return start * 1000;
});
diff --git a/web/src/lib/api/index.ts b/web/src/lib/api/index.ts
index 164edf22e..26eb7d9e2 100644
--- a/web/src/lib/api/index.ts
+++ b/web/src/lib/api/index.ts
@@ -45,7 +45,7 @@ export default class WoodpeckerClient extends ApiClient {
return this._get(`/api/repos/${owner}/${repo}/builds?${query}`) as Promise
;
}
- getBuild(owner: string, repo: string, number: string | 'latest'): Promise {
+ getBuild(owner: string, repo: string, number: number | 'latest'): Promise {
return this._get(`/api/repos/${owner}/${repo}/builds/${number}`) as Promise;
}
diff --git a/web/src/router.ts b/web/src/router.ts
index 9f7315ce0..d8889e16c 100644
--- a/web/src/router.ts
+++ b/web/src/router.ts
@@ -48,10 +48,17 @@ const routes: RouteRecordRaw[] = [
props: (route) => ({ branch: route.params.branch }),
},
{
- path: 'build/:buildId/:procId?',
- name: 'repo-build',
- component: (): Component => import('~/views/repo/RepoBuild.vue'),
+ path: 'build/:buildId',
+ component: (): Component => import('~/views/repo/build/BuildWrapper.vue'),
props: true,
+ children: [
+ {
+ path: ':procId?',
+ name: 'repo-build',
+ component: (): Component => import('~/views/repo/build/Build.vue'),
+ props: true,
+ },
+ ],
},
{
path: 'settings',
diff --git a/web/src/store/builds.ts b/web/src/store/builds.ts
index ce77b557b..3b803171a 100644
--- a/web/src/store/builds.ts
+++ b/web/src/store/builds.ts
@@ -88,7 +88,7 @@ export default defineStore({
});
},
async loadBuild(owner: string, repo: string, buildNumber: number) {
- const build = await apiClient.getBuild(owner, repo, buildNumber.toString());
+ const build = await apiClient.getBuild(owner, repo, buildNumber);
this.setBuild(owner, repo, build);
},
async loadBuildFeed() {
diff --git a/web/src/views/repo/RepoBuild.vue b/web/src/views/repo/RepoBuild.vue
deleted file mode 100644
index 617f7217a..000000000
--- a/web/src/views/repo/RepoBuild.vue
+++ /dev/null
@@ -1,261 +0,0 @@
-
-
-
-
-
- Pipeline #{{ buildId }} - {{ message }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ since }}
-
-
-
- {{ duration }}
-
-
-
-
-
-
This pipeline is awaiting approval by some maintainer!
-
-
-
-
-
-
-
-
This pipeline has been declined!
-
-
-
-
-
-
-
diff --git a/web/src/views/repo/RepoWrapper.vue b/web/src/views/repo/RepoWrapper.vue
index 4af06e05a..c71eea54b 100644
--- a/web/src/views/repo/RepoWrapper.vue
+++ b/web/src/views/repo/RepoWrapper.vue
@@ -16,7 +16,7 @@
-
+
diff --git a/web/src/views/repo/build/Build.vue b/web/src/views/repo/build/Build.vue
new file mode 100644
index 000000000..5e3c541e2
--- /dev/null
+++ b/web/src/views/repo/build/Build.vue
@@ -0,0 +1,125 @@
+
+
+
+
+
This pipeline is awaiting approval by some maintainer!
+
+
+
+
+
+
+
+
This pipeline has been declined!
+
+
+
+
+ Execution error
+ {{ build.error }}
+
+
+
+
+
+
+
+
+
+
diff --git a/web/src/views/repo/build/BuildWrapper.vue b/web/src/views/repo/build/BuildWrapper.vue
new file mode 100644
index 000000000..17833cb66
--- /dev/null
+++ b/web/src/views/repo/build/BuildWrapper.vue
@@ -0,0 +1,219 @@
+
+
+
+
+
+
+
+ Pipeline #{{ buildId }} - {{ message }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ since }}
+
+
+
+ {{ duration }}
+
+
+
+
+
+
+
+
+
+