summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/operation_settings/index.js
blob: 1171f3ece9ffb35b47c0c84a49782265b224dff1 (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
import Vue from 'vue';
import ExternalDashboardForm from './components/external_dashboard.vue';

export default () => {
  /**
   * This check can be removed when we remove
   * the :grafana_dashboard_link feature flag
   */
  if (!gon.features.grafanaDashboardLink) {
    return null;
  }

  const el = document.querySelector('.js-operation-settings');

  return new Vue({
    el,
    render(createElement) {
      return createElement(ExternalDashboardForm, {
        props: {
          ...el.dataset,
          expanded: false,
        },
      });
    },
  });
};