Add conductor UI to the result page of test scheduler
[bottlenecks.git] / test-scheduler / ui / src / components / conductor_ui.vue
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