debian-mirror-gitlab/app/assets/javascripts/grafana_integration/store/state.js

9 lines
371 B
JavaScript
Raw Normal View History

2019-12-26 22:10:19 +05:30
import { parseBoolean } from '~/lib/utils/common_utils';
export default (initialState = {}) => ({
operationsSettingsEndpoint: initialState.operationsSettingsEndpoint,
grafanaToken: initialState.grafanaIntegrationToken || '',
grafanaUrl: initialState.grafanaIntegrationUrl || '',
grafanaEnabled: parseBoolean(initialState.grafanaIntegrationEnabled) || false,
});