Commit a3106957 authored by Filipa Lacerda's avatar Filipa Lacerda

Fixes Feature flag JS folder structure

parent 8d836d76
import Vue from 'vue';
import FeatureFlagsComponent from 'ee/feature_flags/components/feature_flags.vue';
import csrf from '~/lib/utils/csrf';
export default () =>
new Vue({
el: '#feature-flags-vue',
components: {
FeatureFlagsComponent,
},
data() {
return {
dataset: document.querySelector(this.$options.el).dataset,
};
},
render(createElement) {
return createElement('feature-flags-component', {
props: {
endpoint: this.dataset.endpoint,
errorStateSvgPath: this.dataset.errorStateSvgPath,
featureFlagsHelpPagePath: this.dataset.featureFlagsHelpPagePath,
csrfToken: csrf.token,
canUserConfigure: this.dataset.canUserAdminFeatureFlag,
newFeatureFlagPath: this.dataset.newFeatureFlagPath,
configureModalData: {
clientLibrariesHelpPath: this.dataset.clientLibrariesHelpPath,
featureFlagsHelpPagePath: this.dataset.featureFlagsHelpPagePath,
apiUrl: this.dataset.apiUrl,
instanceId: this.dataset.instanceId,
applicationName: this.dataset.applicationName,
},
},
});
},
});
import Vue from 'vue';
import FeatureFlagsComponent from 'ee/feature_flags/components/feature_flags.vue';
import csrf from '~/lib/utils/csrf';
document.addEventListener(
'DOMContentLoaded',
() =>
new Vue({
el: '#feature-flags-vue',
components: {
FeatureFlagsComponent,
},
data() {
return {
dataset: document.querySelector(this.$options.el).dataset,
};
},
render(createElement) {
return createElement('feature-flags-component', {
props: {
endpoint: this.dataset.endpoint,
errorStateSvgPath: this.dataset.errorStateSvgPath,
featureFlagsHelpPagePath: this.dataset.featureFlagsHelpPagePath,
csrfToken: csrf.token,
},
});
},
}),
);
import initFeatureFlags from 'ee/feature_flags';
document.addEventListener('DOMContentLoaded', initFeatureFlags);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment