diff --git a/src/components/runsummary.vue b/src/components/runsummary.vue index 419e81c..84dfdf8 100644 --- a/src/components/runsummary.vue +++ b/src/components/runsummary.vue @@ -7,21 +7,33 @@ >
{{ fetchRunError }}
- +
-
Tasks
+
+ Tasks -
    -
  • - -
  • -
+
+ + +
+
+ +

Setup Errors

@@ -42,11 +54,12 @@ import { fetchRun } from "@/util/data.js"; import { userDirectRunTaskLink, projectRunTaskLink } from "@/util/link.js"; import rundetail from "@/components/rundetail.vue"; -import task from "@/components/task.vue"; +import tasks from "@/components/tasks.vue"; +import tasksgraph from "@/components/tasksgraph.vue"; export default { name: "runsummary", - components: { rundetail, task }, + components: { rundetail, tasks, tasksgraph }, props: { ownertype: String, ownername: String, @@ -57,7 +70,15 @@ export default { return { fetchRunError: null, run: null, - polling: null + polling: null, + + taskWidth: 200, + taskHeight: 40, + taskXSpace: 60, + taskYSpace: 20, + hoverTask: null, + + tasksDisplay: "graph" }; }, methods: { @@ -95,18 +116,17 @@ export default { this.fetchRunError = null; this.run = data; - // sort tasks by level let tasks = this.run.tasks; - let sortedTasks = Object.keys(this.run.tasks) - .sort((a, b) => - tasks[a].level > tasks[b].level - ? 1 - : tasks[b].level > tasks[a].level - ? -1 - : 0 - ) - .map(k => this.run.tasks[k]); - this.run.sortedTasks = sortedTasks; + + // add additional properties to every task + for (let taskID in tasks) { + let task = tasks[taskID]; + task.link = this.runTaskLink(task); + task.parents = this.parents(task); + task.waiting_approval = this.run.tasks_waiting_approval.includes( + taskID + ); + } }, pollData() { this.polling = setInterval(() => { diff --git a/src/components/task.vue b/src/components/task.vue deleted file mode 100644 index c5335c3..0000000 --- a/src/components/task.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - - - diff --git a/src/components/tasks.vue b/src/components/tasks.vue new file mode 100644 index 0000000..600689e --- /dev/null +++ b/src/components/tasks.vue @@ -0,0 +1,99 @@ + + + \ No newline at end of file diff --git a/src/components/tasksgraph.vue b/src/components/tasksgraph.vue new file mode 100644 index 0000000..06c9082 --- /dev/null +++ b/src/components/tasksgraph.vue @@ -0,0 +1,378 @@ + + + \ No newline at end of file