summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/reports/store/state.js
diff options
context:
space:
mode:
authorFilipa Lacerda - 🌴🌴OOO back on July 30th🌴🌴 <filipa@gitlab.com>2018-07-23 16:54:48 +0000
committerPhil Hughes <me@iamphill.com>2018-07-23 16:54:48 +0000
commit2d56c8fdd71248b0c92d5f1b2096ea6b4852344b (patch)
tree3fa1326e1232a5338094ade5d10b43c744e09fd8 /app/assets/javascripts/reports/store/state.js
parent4636bebb6823d0bf69230edc4c20300d1978948f (diff)
downloadgitlab-ce-2d56c8fdd71248b0c92d5f1b2096ea6b4852344b.tar.gz
Adds Vuex store to handle the data for tests reports in MR widget
Diffstat (limited to 'app/assets/javascripts/reports/store/state.js')
-rw-r--r--app/assets/javascripts/reports/store/state.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/app/assets/javascripts/reports/store/state.js b/app/assets/javascripts/reports/store/state.js
new file mode 100644
index 00000000000..97f9d0a6859
--- /dev/null
+++ b/app/assets/javascripts/reports/store/state.js
@@ -0,0 +1,28 @@
+export default () => ({
+ endpoint: null,
+
+ isLoading: false,
+ hasError: false,
+
+ summary: {
+ total: 0,
+ resolved: 0,
+ failed: 0,
+ },
+
+ /**
+ * Each report will have the following format:
+ * {
+ * name: {String},
+ * summary: {
+ * total: {Number},
+ * resolved: {Number},
+ * failed: {Number},
+ * },
+ * new_failures: {Array.<Object>},
+ * resolved_failures: {Array.<Object>},
+ * existing_failures: {Array.<Object>},
+ * }
+ */
+ reports: [],
+});