debian-mirror-gitlab/app/assets/javascripts/grafana_integration/store/state.js
2019-12-26 22:10:19 +05:30

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,
});