Commit c95129e4 authored by Phil Hughes's avatar Phil Hughes

Merge branch '9207-fix-folder-structure' into 'master'

Fixes Feature flag JS folder structure

Closes #9207

See merge request gitlab-org/gitlab-ee!9170
parents a6641434 a3106957
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