Add conductor UI to the result page of test scheduler 80/67680/1
authortjuyinkanglin <14_ykl@tongji.edu.cn>
Wed, 24 Apr 2019 07:09:06 +0000 (15:09 +0800)
committertjuyinkanglin <14_ykl@tongji.edu.cn>
Wed, 24 Apr 2019 07:25:43 +0000 (15:25 +0800)
Conductor UI is added to the result page of test scheduler so that users can see execution results of test cases.

Change-Id: I9d4f35bac88be17be4fadf2830ce5073bd9d3818
Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
test-scheduler/ui/src/components/conductor_ui.vue [new file with mode: 0644]
test-scheduler/ui/src/router/index.js

diff --git a/test-scheduler/ui/src/components/conductor_ui.vue b/test-scheduler/ui/src/components/conductor_ui.vue
new file mode 100644 (file)
index 0000000..686596b
--- /dev/null
@@ -0,0 +1,36 @@
+<template>
+  <div>
+    <iframe src='http://0.0.0.0:5000/#/workflow?q=&h=&workflowTypes=&status=&start=0' id="conductor-ui"></iframe>
+  </div>
+</template>
+
+<script>
+  export default {
+    data () {
+      return {
+      }
+    },
+    mounted () {
+      /**
+       * iframe adaptive display
+       */
+      function changeConductorUIfIframe () {
+        const conductorUI = document.getElementById('conductor-ui')
+        const deviceWidth = document.body.clientWidth
+        const deviceHeight = document.body.clientHeight
+        conductorUI.style.width = Number(deviceWidth) + 'px'
+        conductorUI.style.height = Number(deviceHeight) + 'px'
+      }
+
+      changeConductorUIfIframe()
+
+      window.onresize = function () {
+        changeConductorUIfIframe()
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>
\ No newline at end of file
index 7617edd..8d957f9 100644 (file)
@@ -5,6 +5,7 @@ import testcase from '@/components/testcase'
 import testcase_content from '@/components/testcase_content'
 import test_result from '@/components/test_result'
 import environment from '@/components/environment'
+import conductorUI from '@/components/conductor_ui'
 Vue.use(Router)
 
 const Report = {
@@ -35,7 +36,7 @@ export default new Router({
     {
       path: '/report',
       name: 'report',
-      component: Report
+      component: conductorUI
     },
     {
       path: '/environment',