gitlab-org--gitlab-foss/app/assets/javascripts/grafana_integration/store/state.js

8 lines
371 B
JavaScript

import { parseBoolean } from '~/lib/utils/common_utils';
export default (initialState = {}) => ({
operationsSettingsEndpoint: initialState.operationsSettingsEndpoint,
grafanaToken: initialState.grafanaIntegrationToken || '',
grafanaUrl: initialState.grafanaIntegrationUrl || '',
grafanaEnabled: parseBoolean(initialState.grafanaIntegrationEnabled) || false,
});