Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/incidents/list.js')
-rw-r--r--app/assets/javascripts/incidents/list.js44
1 files changed, 44 insertions, 0 deletions
diff --git a/app/assets/javascripts/incidents/list.js b/app/assets/javascripts/incidents/list.js
new file mode 100644
index 00000000000..7505d07449c
--- /dev/null
+++ b/app/assets/javascripts/incidents/list.js
@@ -0,0 +1,44 @@
+import Vue from 'vue';
+import VueApollo from 'vue-apollo';
+import createDefaultClient from '~/lib/graphql';
+import IncidentsList from './components/incidents_list.vue';
+
+Vue.use(VueApollo);
+export default () => {
+ const selector = '#js-incidents';
+
+ const domEl = document.querySelector(selector);
+ const {
+ projectPath,
+ newIssuePath,
+ incidentTemplateName,
+ incidentType,
+ issuePath,
+ publishedAvailable,
+ emptyListSvgPath,
+ } = domEl.dataset;
+
+ const apolloProvider = new VueApollo({
+ defaultClient: createDefaultClient(),
+ });
+
+ return new Vue({
+ el: selector,
+ provide: {
+ projectPath,
+ incidentTemplateName,
+ incidentType,
+ newIssuePath,
+ issuePath,
+ publishedAvailable,
+ emptyListSvgPath,
+ },
+ apolloProvider,
+ components: {
+ IncidentsList,
+ },
+ render(createElement) {
+ return createElement('incidents-list');
+ },
+ });
+};