diff options
Diffstat (limited to 'app/assets/javascripts/pages/projects/airflow/dags/index/index.js')
-rw-r--r-- | app/assets/javascripts/pages/projects/airflow/dags/index/index.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app/assets/javascripts/pages/projects/airflow/dags/index/index.js b/app/assets/javascripts/pages/projects/airflow/dags/index/index.js new file mode 100644 index 00000000000..1d7cf4a5b8e --- /dev/null +++ b/app/assets/javascripts/pages/projects/airflow/dags/index/index.js @@ -0,0 +1,27 @@ +import Vue from 'vue'; +import AirflowDags from '~/airflow/dags/components/dags.vue'; +import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; + +const initShowDags = () => { + const element = document.querySelector('#js-show-airflow-dags'); + if (!element) { + return null; + } + + const dags = JSON.parse(element.dataset.dags); + const pagination = convertObjectPropsToCamelCase(JSON.parse(element.dataset.pagination)); + + return new Vue({ + el: element, + render(h) { + return h(AirflowDags, { + props: { + dags, + pagination, + }, + }); + }, + }); +}; + +initShowDags(); |