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/registry/explorer/stores/mutations.js')
-rw-r--r--app/assets/javascripts/registry/explorer/stores/mutations.js54
1 files changed, 0 insertions, 54 deletions
diff --git a/app/assets/javascripts/registry/explorer/stores/mutations.js b/app/assets/javascripts/registry/explorer/stores/mutations.js
deleted file mode 100644
index 5bdb431ad2e..00000000000
--- a/app/assets/javascripts/registry/explorer/stores/mutations.js
+++ /dev/null
@@ -1,54 +0,0 @@
-import * as types from './mutation_types';
-import { parseIntPagination, normalizeHeaders, parseBoolean } from '~/lib/utils/common_utils';
-import { IMAGE_DELETE_SCHEDULED_STATUS, IMAGE_FAILED_DELETED_STATUS } from '../constants/index';
-
-export default {
- [types.SET_INITIAL_STATE](state, config) {
- state.config = {
- ...config,
- expirationPolicy: config.expirationPolicy ? JSON.parse(config.expirationPolicy) : undefined,
- isGroupPage: parseBoolean(config.isGroupPage),
- isAdmin: parseBoolean(config.isAdmin),
- };
- },
-
- [types.SET_IMAGES_LIST_SUCCESS](state, images) {
- state.images = images.map(i => ({
- ...i,
- status: undefined,
- deleting: i.status === IMAGE_DELETE_SCHEDULED_STATUS,
- failedDelete: i.status === IMAGE_FAILED_DELETED_STATUS,
- }));
- },
-
- [types.UPDATE_IMAGE](state, image) {
- const index = state.images.findIndex(i => i.id === image.id);
- state.images.splice(index, 1, { ...image });
- },
-
- [types.SET_TAGS_LIST_SUCCESS](state, tags) {
- state.tags = tags;
- },
-
- [types.SET_MAIN_LOADING](state, isLoading) {
- state.isLoading = isLoading;
- },
-
- [types.SET_SHOW_GARBAGE_COLLECTION_TIP](state, showGarbageCollectionTip) {
- state.showGarbageCollectionTip = showGarbageCollectionTip;
- },
-
- [types.SET_PAGINATION](state, headers) {
- const normalizedHeaders = normalizeHeaders(headers);
- state.pagination = parseIntPagination(normalizedHeaders);
- },
-
- [types.SET_TAGS_PAGINATION](state, headers) {
- const normalizedHeaders = normalizeHeaders(headers);
- state.tagsPagination = parseIntPagination(normalizedHeaders);
- },
-
- [types.SET_IMAGE_DETAILS](state, details) {
- state.imageDetails = details;
- },
-};