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

constants.js « custom_metrics « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cd2ac6d83906fd8bf1c9428e97ece8d39b8bf7b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
export const queryTypes = {
  business: 'business',
  response: 'response',
  system: 'system',
};

export const formDataValidator = (val) => {
  const fieldNames = Object.keys(val);
  const requiredFields = ['title', 'query', 'yLabel', 'unit', 'group', 'legend'];

  return requiredFields.every((name) => fieldNames.includes(name));
};