summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/packages_and_registries/settings/project/registry_settings_cleanup_tags_bundle.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/packages_and_registries/settings/project/registry_settings_cleanup_tags_bundle.js')
-rw-r--r--app/assets/javascripts/packages_and_registries/settings/project/registry_settings_cleanup_tags_bundle.js41
1 files changed, 41 insertions, 0 deletions
diff --git a/app/assets/javascripts/packages_and_registries/settings/project/registry_settings_cleanup_tags_bundle.js b/app/assets/javascripts/packages_and_registries/settings/project/registry_settings_cleanup_tags_bundle.js
new file mode 100644
index 00000000000..b1401c448a1
--- /dev/null
+++ b/app/assets/javascripts/packages_and_registries/settings/project/registry_settings_cleanup_tags_bundle.js
@@ -0,0 +1,41 @@
+import { GlToast } from '@gitlab/ui';
+import Vue from 'vue';
+import { parseBoolean } from '~/lib/utils/common_utils';
+import Translate from '~/vue_shared/translate';
+import CleanupImageTags from './components/cleanup_image_tags.vue';
+import { apolloProvider } from './graphql/index';
+
+Vue.use(GlToast);
+Vue.use(Translate);
+
+export default () => {
+ const el = document.getElementById('js-registry-settings-cleanup-image-tags');
+ if (!el) {
+ return null;
+ }
+ const {
+ isAdmin,
+ enableHistoricEntries,
+ projectPath,
+ adminSettingsPath,
+ projectSettingsPath,
+ tagsRegexHelpPagePath,
+ helpPagePath,
+ } = el.dataset;
+ return new Vue({
+ el,
+ apolloProvider,
+ provide: {
+ isAdmin: parseBoolean(isAdmin),
+ enableHistoricEntries: parseBoolean(enableHistoricEntries),
+ projectPath,
+ adminSettingsPath,
+ projectSettingsPath,
+ tagsRegexHelpPagePath,
+ helpPagePath,
+ },
+ render(createElement) {
+ return createElement(CleanupImageTags, {});
+ },
+ });
+};