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

mutations.js « store « serverless « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 991f32a275d0352e03ae366a97ba83ca96b8cc6a (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
import * as types from './mutation_types';

export default {
  [types.REQUEST_FUNCTIONS_LOADING](state) {
    state.isLoading = true;
  },
  [types.RECEIVE_FUNCTIONS_SUCCESS](state, data) {
    state.functions = data;
    state.isLoading = false;
    state.hasFunctionData = true;
  },
  [types.RECEIVE_FUNCTIONS_NODATA_SUCCESS](state) {
    state.isLoading = false;
    state.hasFunctionData = false;
  },
  [types.RECEIVE_FUNCTIONS_ERROR](state, error) {
    state.error = error;
    state.hasFunctionData = false;
    state.isLoading = false;
  },
  [types.RECEIVE_METRICS_SUCCESS](state, data) {
    state.isLoading = false;
    state.hasPrometheusData = true;
    state.graphData = data;
  },
  [types.RECEIVE_METRICS_NODATA_SUCCESS](state) {
    state.isLoading = false;
    state.hasPrometheusData = false;
  },
  [types.RECEIVE_METRICS_ERROR](state, error) {
    state.hasPrometheusData = false;
    state.error = error;
  },
  [types.RECEIVE_METRICS_NO_PROMETHEUS](state) {
    state.hasPrometheusData = false;
    state.hasPrometheus = false;
  },
};