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

index.js « stores « registry « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 78b678812105f34309c48d9693b711027295f7d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import Vue from 'vue';
import Vuex from 'vuex';
import * as actions from './actions';
import * as getters from './getters';
import mutations from './mutations';

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    isLoading: false,
    endpoint: '', // initial endpoint to fetch the repos list
    /**
     * Each object in `repos` has the following strucure:
     * {
     *   name: String,
     *   isLoading: Boolean,
     *   tagsPath: String // endpoint to request the list
     *   destroyPath: String // endpoit to delete the repo
     *   list: Array // List of the registry images
     * }
     *
     * Each registry image inside `list` has the following structure:
     * {
     *   tag: String,
     *   revision: String
     *   shortRevision: String
     *   size: Number
     *   layers: Number
     *   createdAt: String
     *   destroyPath: String // endpoit to delete each image
     * }
     */
    repos: [],
  },
  actions,
  getters,
  mutations,
});