summaryrefslogtreecommitdiffstats
path: root/test-scheduler/ui/src/components/conductor_ui.vue
blob: 686596bd42cef1da49e90a71a24e2b017b10bcc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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>