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

serverless_store.js « stores « serverless « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 774c15b5b1235185754a7f7039f583ba1b6220d2 (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
export default class ServerlessStore {
  constructor(knativeInstalled = false, clustersPath, helpPath) {
    this.state = {
      functions: [],
      hasFunctionData: true,
      loadingData: true,
      installed: knativeInstalled,
      clustersPath,
      helpPath,
    };
  }

  updateFunctionsFromServer(functions = []) {
    this.state.functions = functions;
  }

  updateLoadingState(loadingData) {
    this.state.loadingData = loadingData;
  }

  toggleNoFunctionData() {
    this.state.hasFunctionData = false;
  }
}