From 4862c6103e3dcd28fd1e13833f99fef61d66c19f Mon Sep 17 00:00:00 2001 From: Simone Gotti Date: Fri, 17 May 2019 17:28:11 +0200 Subject: [PATCH] update runs.vue to be consistent with other components for user runs Don't use the "username" property but just the ownername when projectref is undefined like all the other components already do. --- src/components/runs.vue | 20 ++++++-------------- src/router.js | 2 +- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/components/runs.vue b/src/components/runs.vue index 08d8c59..cde4c38 100644 --- a/src/components/runs.vue +++ b/src/components/runs.vue @@ -5,21 +5,16 @@
- {{run.name}} - - {{run.name}} + + {{run.name}} +
{{run.annotations.message}}
Waiting Approval @@ -83,7 +78,6 @@ export default { props: { ownertype: String, ownername: String, - username: String, projectref: Array, query: String }, @@ -127,10 +121,8 @@ export default { clearInterval(this.polling); if (this.projectref !== undefined) { this.fetchProject(); - } else if (this.username !== undefined) { - this.fetchUser(); } else { - this.fetchRuns(); + this.fetchUser(); } this.pollData(); }, @@ -151,7 +143,7 @@ export default { this.fetchRuns(); }, async fetchUser() { - let { data, error } = await fetchUser(this.username); + let { data, error } = await fetchUser(this.ownername); if (error) { this.$store.dispatch("setError", error); return; diff --git a/src/router.js b/src/router.js index cc5f05a..10e081c 100644 --- a/src/router.js +++ b/src/router.js @@ -81,7 +81,7 @@ const router = new VueRouter({ path: "runs", name: "user local runs", component: runs, - props: (route) => ({ ownertype: "user", username: route.params.username }) + props: (route) => ({ ownertype: "user", ownername: route.params.username }) }, { path: "runs/:runid",