summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/registry/stores/index.js
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-10-05 13:12:08 +0200
committerDouwe Maan <douwe@selenight.nl>2017-10-05 13:12:08 +0200
commit5daa8fbc29ee2fc309602d24167a401563bc3b2c (patch)
treeb99d1b6c54435e2fe1c2565c87ab9a41c36a5cd2 /app/assets/javascripts/registry/stores/index.js
parente0fdcd19ec1973963452dde4384e071286f044b1 (diff)
parentde01353b166018a43ea92b38054b1267c3ba5cea (diff)
downloadgitlab-ce-5daa8fbc29ee2fc309602d24167a401563bc3b2c.tar.gz
Add changelog
Diffstat (limited to 'app/assets/javascripts/registry/stores/index.js')
-rw-r--r--app/assets/javascripts/registry/stores/index.js39
1 files changed, 39 insertions, 0 deletions
diff --git a/app/assets/javascripts/registry/stores/index.js b/app/assets/javascripts/registry/stores/index.js
new file mode 100644
index 00000000000..78b67881210
--- /dev/null
+++ b/app/assets/javascripts/registry/stores/index.js
@@ -0,0 +1,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,
+});