@spinnaker/kayenta 0.0.0-main-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +9 -0
- package/.eslintrc.js +1 -0
- package/.huskyrc +5 -0
- package/.lintstagedrc.json +4 -0
- package/.prettierignore +4 -0
- package/.prettierrc.js +1 -0
- package/LICENSE.txt +203 -0
- package/README.md +81 -0
- package/__mocks__/styleMock.js +1 -0
- package/__mocks__/version.json +4 -0
- package/babel.config.js +3 -0
- package/build/dist/index-70b2ac83.js +2 -0
- package/build/dist/index-70b2ac83.js.map +1 -0
- package/build/dist/index.d.ts +3 -0
- package/build/dist/index.d.ts.map +1 -0
- package/build/dist/index.js +2 -0
- package/build/dist/index.js.map +1 -0
- package/build/dist/kayenta/actions/creators.d.ts +402 -0
- package/build/dist/kayenta/actions/creators.d.ts.map +1 -0
- package/build/dist/kayenta/actions/index.d.ts +97 -0
- package/build/dist/kayenta/actions/index.d.ts.map +1 -0
- package/build/dist/kayenta/canary.d.ts +16 -0
- package/build/dist/kayenta/canary.d.ts.map +1 -0
- package/build/dist/kayenta/canary.dataSource.bridge.d.ts +2 -0
- package/build/dist/kayenta/canary.dataSource.bridge.d.ts.map +1 -0
- package/build/dist/kayenta/canary.dataSource.stub.d.ts +9 -0
- package/build/dist/kayenta/canary.dataSource.stub.d.ts.map +1 -0
- package/build/dist/kayenta/canary.help.d.ts +2 -0
- package/build/dist/kayenta/canary.help.d.ts.map +1 -0
- package/build/dist/kayenta/canary.settings.d.ts +24 -0
- package/build/dist/kayenta/canary.settings.d.ts.map +1 -0
- package/build/dist/kayenta/components/canaryScore.component.d.ts +2 -0
- package/build/dist/kayenta/components/canaryScore.component.d.ts.map +1 -0
- package/build/dist/kayenta/components/canaryScore.d.ts +23 -0
- package/build/dist/kayenta/components/canaryScore.d.ts.map +1 -0
- package/build/dist/kayenta/components/canaryScores.component.d.ts +2 -0
- package/build/dist/kayenta/components/canaryScores.component.d.ts.map +1 -0
- package/build/dist/kayenta/components/canaryScores.d.ts +21 -0
- package/build/dist/kayenta/components/canaryScores.d.ts.map +1 -0
- package/build/dist/kayenta/components/loadStates.d.ts +15 -0
- package/build/dist/kayenta/components/loadStates.d.ts.map +1 -0
- package/build/dist/kayenta/domain/ICanaryConfig.d.ts +56 -0
- package/build/dist/kayenta/domain/ICanaryConfig.d.ts.map +1 -0
- package/build/dist/kayenta/domain/ICanaryConfigSummary.d.ts +8 -0
- package/build/dist/kayenta/domain/ICanaryConfigSummary.d.ts.map +1 -0
- package/build/dist/kayenta/domain/ICanaryConfigUpdateResponse.d.ts +4 -0
- package/build/dist/kayenta/domain/ICanaryConfigUpdateResponse.d.ts.map +1 -0
- package/build/dist/kayenta/domain/ICanaryExecutionStatusResult.d.ts +69 -0
- package/build/dist/kayenta/domain/ICanaryExecutionStatusResult.d.ts.map +1 -0
- package/build/dist/kayenta/domain/ICanaryJudgeResult.d.ts +48 -0
- package/build/dist/kayenta/domain/ICanaryJudgeResult.d.ts.map +1 -0
- package/build/dist/kayenta/domain/ICanaryJudgeResultSummary.d.ts +6 -0
- package/build/dist/kayenta/domain/ICanaryJudgeResultSummary.d.ts.map +1 -0
- package/build/dist/kayenta/domain/ICanaryScoreThresholds.d.ts +5 -0
- package/build/dist/kayenta/domain/ICanaryScoreThresholds.d.ts.map +1 -0
- package/build/dist/kayenta/domain/IJudge.d.ts +5 -0
- package/build/dist/kayenta/domain/IJudge.d.ts.map +1 -0
- package/build/dist/kayenta/domain/IKayentaAccount.d.ts +14 -0
- package/build/dist/kayenta/domain/IKayentaAccount.d.ts.map +1 -0
- package/build/dist/kayenta/domain/IKayentaStageConfig.d.ts +58 -0
- package/build/dist/kayenta/domain/IKayentaStageConfig.d.ts.map +1 -0
- package/build/dist/kayenta/domain/IMetricSetPair.d.ts +27 -0
- package/build/dist/kayenta/domain/IMetricSetPair.d.ts.map +1 -0
- package/build/dist/kayenta/domain/IMetricsServiceMetadata.d.ts +3 -0
- package/build/dist/kayenta/domain/IMetricsServiceMetadata.d.ts.map +1 -0
- package/build/dist/kayenta/domain/ISetupCanaryStage.d.ts +11 -0
- package/build/dist/kayenta/domain/ISetupCanaryStage.d.ts.map +1 -0
- package/build/dist/kayenta/domain/MetricClassificationLabel.d.ts +8 -0
- package/build/dist/kayenta/domain/MetricClassificationLabel.d.ts.map +1 -0
- package/build/dist/kayenta/domain/ScoreClassificationLabel.d.ts +8 -0
- package/build/dist/kayenta/domain/ScoreClassificationLabel.d.ts.map +1 -0
- package/build/dist/kayenta/domain/index.d.ts +16 -0
- package/build/dist/kayenta/domain/index.d.ts.map +1 -0
- package/build/dist/kayenta/edit/changeMetricGroupModal.d.ts +18 -0
- package/build/dist/kayenta/edit/changeMetricGroupModal.d.ts.map +1 -0
- package/build/dist/kayenta/edit/configDetail.d.ts +2 -0
- package/build/dist/kayenta/edit/configDetail.d.ts.map +1 -0
- package/build/dist/kayenta/edit/configDetailActionButtons.d.ts +2 -0
- package/build/dist/kayenta/edit/configDetailActionButtons.d.ts.map +1 -0
- package/build/dist/kayenta/edit/configDetailHeader.d.ts +11 -0
- package/build/dist/kayenta/edit/configDetailHeader.d.ts.map +1 -0
- package/build/dist/kayenta/edit/configDetailLoadStates.d.ts +9 -0
- package/build/dist/kayenta/edit/configDetailLoadStates.d.ts.map +1 -0
- package/build/dist/kayenta/edit/configDetailLoader.d.ts +17 -0
- package/build/dist/kayenta/edit/configDetailLoader.d.ts.map +1 -0
- package/build/dist/kayenta/edit/configJsonModal.d.ts +28 -0
- package/build/dist/kayenta/edit/configJsonModal.d.ts.map +1 -0
- package/build/dist/kayenta/edit/configList.d.ts +12 -0
- package/build/dist/kayenta/edit/configList.d.ts.map +1 -0
- package/build/dist/kayenta/edit/copyConfigButton.d.ts +8 -0
- package/build/dist/kayenta/edit/copyConfigButton.d.ts.map +1 -0
- package/build/dist/kayenta/edit/createConfigButton.d.ts +8 -0
- package/build/dist/kayenta/edit/createConfigButton.d.ts.map +1 -0
- package/build/dist/kayenta/edit/deleteModal.d.ts +16 -0
- package/build/dist/kayenta/edit/deleteModal.d.ts.map +1 -0
- package/build/dist/kayenta/edit/edit.d.ts +2 -0
- package/build/dist/kayenta/edit/edit.d.ts.map +1 -0
- package/build/dist/kayenta/edit/editMetricEffectSizes.d.ts +16 -0
- package/build/dist/kayenta/edit/editMetricEffectSizes.d.ts.map +1 -0
- package/build/dist/kayenta/edit/editMetricModal.d.ts +25 -0
- package/build/dist/kayenta/edit/editMetricModal.d.ts.map +1 -0
- package/build/dist/kayenta/edit/editMetricValidation.d.ts +11 -0
- package/build/dist/kayenta/edit/editMetricValidation.d.ts.map +1 -0
- package/build/dist/kayenta/edit/editMetricValidation.spec.d.ts +2 -0
- package/build/dist/kayenta/edit/editMetricValidation.spec.d.ts.map +1 -0
- package/build/dist/kayenta/edit/filterTemplateSelector.d.ts +33 -0
- package/build/dist/kayenta/edit/filterTemplateSelector.d.ts.map +1 -0
- package/build/dist/kayenta/edit/filterTemplateSelector.spec.d.ts +2 -0
- package/build/dist/kayenta/edit/filterTemplateSelector.spec.d.ts.map +1 -0
- package/build/dist/kayenta/edit/filterTemplatesValidation.d.ts +29 -0
- package/build/dist/kayenta/edit/filterTemplatesValidation.d.ts.map +1 -0
- package/build/dist/kayenta/edit/filterTemplatesValidation.spec.d.ts +2 -0
- package/build/dist/kayenta/edit/filterTemplatesValidation.spec.d.ts.map +1 -0
- package/build/dist/kayenta/edit/footer.d.ts +6 -0
- package/build/dist/kayenta/edit/footer.d.ts.map +1 -0
- package/build/dist/kayenta/edit/groupName.d.ts +21 -0
- package/build/dist/kayenta/edit/groupName.d.ts.map +1 -0
- package/build/dist/kayenta/edit/groupTabs.d.ts +17 -0
- package/build/dist/kayenta/edit/groupTabs.d.ts.map +1 -0
- package/build/dist/kayenta/edit/groupWeight.d.ts +16 -0
- package/build/dist/kayenta/edit/groupWeight.d.ts.map +1 -0
- package/build/dist/kayenta/edit/groupWeights.d.ts +8 -0
- package/build/dist/kayenta/edit/groupWeights.d.ts.map +1 -0
- package/build/dist/kayenta/edit/inlineTemplateEditor.d.ts +14 -0
- package/build/dist/kayenta/edit/inlineTemplateEditor.d.ts.map +1 -0
- package/build/dist/kayenta/edit/inlineTemplateEditor.spec.d.ts +2 -0
- package/build/dist/kayenta/edit/inlineTemplateEditor.spec.d.ts.map +1 -0
- package/build/dist/kayenta/edit/judgeSelect.d.ts +19 -0
- package/build/dist/kayenta/edit/judgeSelect.d.ts.map +1 -0
- package/build/dist/kayenta/edit/metricConfigurerDelegator.d.ts +9 -0
- package/build/dist/kayenta/edit/metricConfigurerDelegator.d.ts.map +1 -0
- package/build/dist/kayenta/edit/metricList.d.ts +23 -0
- package/build/dist/kayenta/edit/metricList.d.ts.map +1 -0
- package/build/dist/kayenta/edit/metricStoreSelector.d.ts +12 -0
- package/build/dist/kayenta/edit/metricStoreSelector.d.ts.map +1 -0
- package/build/dist/kayenta/edit/nameAndDescription.d.ts +14 -0
- package/build/dist/kayenta/edit/nameAndDescription.d.ts.map +1 -0
- package/build/dist/kayenta/edit/openConfigJsonModalButton.d.ts +8 -0
- package/build/dist/kayenta/edit/openConfigJsonModalButton.d.ts.map +1 -0
- package/build/dist/kayenta/edit/openDeleteModalButton.d.ts +11 -0
- package/build/dist/kayenta/edit/openDeleteModalButton.d.ts.map +1 -0
- package/build/dist/kayenta/edit/ownedBy.d.ts +7 -0
- package/build/dist/kayenta/edit/ownedBy.d.ts.map +1 -0
- package/build/dist/kayenta/edit/save.d.ts +2 -0
- package/build/dist/kayenta/edit/save.d.ts.map +1 -0
- package/build/dist/kayenta/edit/saveConfigButton.d.ts +14 -0
- package/build/dist/kayenta/edit/saveConfigButton.d.ts.map +1 -0
- package/build/dist/kayenta/edit/saveConfigError.d.ts +13 -0
- package/build/dist/kayenta/edit/saveConfigError.d.ts.map +1 -0
- package/build/dist/kayenta/edit/scoring.d.ts +8 -0
- package/build/dist/kayenta/edit/scoring.d.ts.map +1 -0
- package/build/dist/kayenta/edit/selectConfig.d.ts +2 -0
- package/build/dist/kayenta/edit/selectConfig.d.ts.map +1 -0
- package/build/dist/kayenta/edit/validationErrors.d.ts +8 -0
- package/build/dist/kayenta/edit/validationErrors.d.ts.map +1 -0
- package/build/dist/kayenta/index.d.ts +7 -0
- package/build/dist/kayenta/index.d.ts.map +1 -0
- package/build/dist/kayenta/layout/addNewButton.d.ts +8 -0
- package/build/dist/kayenta/layout/addNewButton.d.ts.map +1 -0
- package/build/dist/kayenta/layout/centeredDetail.d.ts +5 -0
- package/build/dist/kayenta/layout/centeredDetail.d.ts.map +1 -0
- package/build/dist/kayenta/layout/deleteButton.d.ts +6 -0
- package/build/dist/kayenta/layout/deleteButton.d.ts.map +1 -0
- package/build/dist/kayenta/layout/disableable.d.ts +37 -0
- package/build/dist/kayenta/layout/disableable.d.ts.map +1 -0
- package/build/dist/kayenta/layout/formList.d.ts +5 -0
- package/build/dist/kayenta/layout/formList.d.ts.map +1 -0
- package/build/dist/kayenta/layout/formRow.d.ts +12 -0
- package/build/dist/kayenta/layout/formRow.d.ts.map +1 -0
- package/build/dist/kayenta/layout/formattedDate.d.ts +5 -0
- package/build/dist/kayenta/layout/formattedDate.d.ts.map +1 -0
- package/build/dist/kayenta/layout/index.d.ts +3 -0
- package/build/dist/kayenta/layout/index.d.ts.map +1 -0
- package/build/dist/kayenta/layout/keyValueList.d.ts +29 -0
- package/build/dist/kayenta/layout/keyValueList.d.ts.map +1 -0
- package/build/dist/kayenta/layout/list.d.ts +21 -0
- package/build/dist/kayenta/layout/list.d.ts.map +1 -0
- package/build/dist/kayenta/layout/list.spec.d.ts +2 -0
- package/build/dist/kayenta/layout/list.spec.d.ts.map +1 -0
- package/build/dist/kayenta/layout/listDetail.d.ts +11 -0
- package/build/dist/kayenta/layout/listDetail.d.ts.map +1 -0
- package/build/dist/kayenta/layout/radioChoice.d.ts +9 -0
- package/build/dist/kayenta/layout/radioChoice.d.ts.map +1 -0
- package/build/dist/kayenta/layout/styleguide.d.ts +9 -0
- package/build/dist/kayenta/layout/styleguide.d.ts.map +1 -0
- package/build/dist/kayenta/layout/table/index.d.ts +6 -0
- package/build/dist/kayenta/layout/table/index.d.ts.map +1 -0
- package/build/dist/kayenta/layout/table/nativeTable.d.ts +14 -0
- package/build/dist/kayenta/layout/table/nativeTable.d.ts.map +1 -0
- package/build/dist/kayenta/layout/table/nativeTableHeader.d.ts +8 -0
- package/build/dist/kayenta/layout/table/nativeTableHeader.d.ts.map +1 -0
- package/build/dist/kayenta/layout/table/table.d.ts +14 -0
- package/build/dist/kayenta/layout/table/table.d.ts.map +1 -0
- package/build/dist/kayenta/layout/table/tableColumn.d.ts +8 -0
- package/build/dist/kayenta/layout/table/tableColumn.d.ts.map +1 -0
- package/build/dist/kayenta/layout/table/tableHeader.d.ts +7 -0
- package/build/dist/kayenta/layout/table/tableHeader.d.ts.map +1 -0
- package/build/dist/kayenta/layout/tabs.d.ts +14 -0
- package/build/dist/kayenta/layout/tabs.d.ts.map +1 -0
- package/build/dist/kayenta/layout/titledSection.d.ts +7 -0
- package/build/dist/kayenta/layout/titledSection.d.ts.map +1 -0
- package/build/dist/kayenta/layout/titledSubsection.d.ts +8 -0
- package/build/dist/kayenta/layout/titledSubsection.d.ts.map +1 -0
- package/build/dist/kayenta/manualAnalysis/ManualAnalysisModal.d.ts +47 -0
- package/build/dist/kayenta/manualAnalysis/ManualAnalysisModal.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/atlas/atlasMetricConfigurer.d.ts +29 -0
- package/build/dist/kayenta/metricStore/atlas/atlasMetricConfigurer.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/atlas/index.d.ts +2 -0
- package/build/dist/kayenta/metricStore/atlas/index.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/datadog/domain/IDatadogMetricDescriptor.d.ts +5 -0
- package/build/dist/kayenta/metricStore/datadog/domain/IDatadogMetricDescriptor.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/datadog/index.d.ts +2 -0
- package/build/dist/kayenta/metricStore/datadog/index.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/datadog/metricConfigurer.d.ts +15 -0
- package/build/dist/kayenta/metricStore/datadog/metricConfigurer.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/datadog/metricTypeSelector.d.ts +29 -0
- package/build/dist/kayenta/metricStore/datadog/metricTypeSelector.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/datadog/metricTypeSelector.spec.d.ts +2 -0
- package/build/dist/kayenta/metricStore/datadog/metricTypeSelector.spec.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/graphite/domain/IGraphiteMetricDescriptor.d.ts +5 -0
- package/build/dist/kayenta/metricStore/graphite/domain/IGraphiteMetricDescriptor.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/graphite/index.d.ts +2 -0
- package/build/dist/kayenta/metricStore/graphite/index.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/graphite/metricConfigurer.d.ts +13 -0
- package/build/dist/kayenta/metricStore/graphite/metricConfigurer.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/graphite/metricTypeSelector.d.ts +29 -0
- package/build/dist/kayenta/metricStore/graphite/metricTypeSelector.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/index.d.ts +9 -0
- package/build/dist/kayenta/metricStore/index.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/metricStoreConfig.service.d.ts +11 -0
- package/build/dist/kayenta/metricStore/metricStoreConfig.service.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/newrelic/domain/INewRelicMetricDescriptor.d.ts +5 -0
- package/build/dist/kayenta/metricStore/newrelic/domain/INewRelicMetricDescriptor.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/newrelic/index.d.ts +2 -0
- package/build/dist/kayenta/metricStore/newrelic/index.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/newrelic/metricConfigurer.d.ts +13 -0
- package/build/dist/kayenta/metricStore/newrelic/metricConfigurer.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/prometheus/domain/IPrometheusCanaryMetricSetQueryConfig.d.ts +13 -0
- package/build/dist/kayenta/metricStore/prometheus/domain/IPrometheusCanaryMetricSetQueryConfig.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/prometheus/domain/IPrometheusMetricDescriptor.d.ts +5 -0
- package/build/dist/kayenta/metricStore/prometheus/domain/IPrometheusMetricDescriptor.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/prometheus/index.d.ts +2 -0
- package/build/dist/kayenta/metricStore/prometheus/index.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/prometheus/metricConfigurer.d.ts +21 -0
- package/build/dist/kayenta/metricStore/prometheus/metricConfigurer.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/prometheus/metricTypeSelector.d.ts +31 -0
- package/build/dist/kayenta/metricStore/prometheus/metricTypeSelector.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/prometheus/metricTypeSelector.spec.d.ts +2 -0
- package/build/dist/kayenta/metricStore/prometheus/metricTypeSelector.spec.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/prometheus/queryTypeSelectors.d.ts +10 -0
- package/build/dist/kayenta/metricStore/prometheus/queryTypeSelectors.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/prometheus/queryTypeSelectors.spec.d.ts +2 -0
- package/build/dist/kayenta/metricStore/prometheus/queryTypeSelectors.spec.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/signalfx/domain/ISignalFxCanaryMetricSetQueryConfig.d.ts +10 -0
- package/build/dist/kayenta/metricStore/signalfx/domain/ISignalFxCanaryMetricSetQueryConfig.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/signalfx/index.d.ts +2 -0
- package/build/dist/kayenta/metricStore/signalfx/index.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/signalfx/metricConfigurer.d.ts +28 -0
- package/build/dist/kayenta/metricStore/signalfx/metricConfigurer.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/stackdriver/domain/IStackdriverCanaryMetricSetQueryConfig.d.ts +9 -0
- package/build/dist/kayenta/metricStore/stackdriver/domain/IStackdriverCanaryMetricSetQueryConfig.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/stackdriver/domain/IStackdriverMetricDescriptor.d.ts +16 -0
- package/build/dist/kayenta/metricStore/stackdriver/domain/IStackdriverMetricDescriptor.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/stackdriver/index.d.ts +2 -0
- package/build/dist/kayenta/metricStore/stackdriver/index.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/stackdriver/metricConfigurer.d.ts +16 -0
- package/build/dist/kayenta/metricStore/stackdriver/metricConfigurer.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/stackdriver/metricTypeSelector.d.ts +35 -0
- package/build/dist/kayenta/metricStore/stackdriver/metricTypeSelector.d.ts.map +1 -0
- package/build/dist/kayenta/metricStore/stackdriver/metricTypeSelector.spec.d.ts +2 -0
- package/build/dist/kayenta/metricStore/stackdriver/metricTypeSelector.spec.d.ts.map +1 -0
- package/build/dist/kayenta/middleware/actionInterceptor.d.ts +3 -0
- package/build/dist/kayenta/middleware/actionInterceptor.d.ts.map +1 -0
- package/build/dist/kayenta/middleware/asyncDispatch.d.ts +3 -0
- package/build/dist/kayenta/middleware/asyncDispatch.d.ts.map +1 -0
- package/build/dist/kayenta/middleware/epics.d.ts +14 -0
- package/build/dist/kayenta/middleware/epics.d.ts.map +1 -0
- package/build/dist/kayenta/middleware/index.d.ts +4 -0
- package/build/dist/kayenta/middleware/index.d.ts.map +1 -0
- package/build/dist/kayenta/navigation/canary.states.d.ts +6 -0
- package/build/dist/kayenta/navigation/canary.states.d.ts.map +1 -0
- package/build/dist/kayenta/navigation/canary.states.stub.d.ts +4 -0
- package/build/dist/kayenta/navigation/canary.states.stub.d.ts.map +1 -0
- package/build/dist/kayenta/reducers/app.d.ts +11 -0
- package/build/dist/kayenta/reducers/app.d.ts.map +1 -0
- package/build/dist/kayenta/reducers/asyncRequest.d.ts +6 -0
- package/build/dist/kayenta/reducers/asyncRequest.d.ts.map +1 -0
- package/build/dist/kayenta/reducers/data.d.ts +30 -0
- package/build/dist/kayenta/reducers/data.d.ts.map +1 -0
- package/build/dist/kayenta/reducers/editingTemplate.d.ts +8 -0
- package/build/dist/kayenta/reducers/editingTemplate.d.ts.map +1 -0
- package/build/dist/kayenta/reducers/group.d.ts +11 -0
- package/build/dist/kayenta/reducers/group.d.ts.map +1 -0
- package/build/dist/kayenta/reducers/index.d.ts +13 -0
- package/build/dist/kayenta/reducers/index.d.ts.map +1 -0
- package/build/dist/kayenta/reducers/prometheusMetricConfig.d.ts +6 -0
- package/build/dist/kayenta/reducers/prometheusMetricConfig.d.ts.map +1 -0
- package/build/dist/kayenta/reducers/prometheusMetricConfig.spec.d.ts +2 -0
- package/build/dist/kayenta/reducers/prometheusMetricConfig.spec.d.ts.map +1 -0
- package/build/dist/kayenta/reducers/selectedConfig.d.ts +51 -0
- package/build/dist/kayenta/reducers/selectedConfig.d.ts.map +1 -0
- package/build/dist/kayenta/reducers/selectedConfig.spec.d.ts +2 -0
- package/build/dist/kayenta/reducers/selectedConfig.spec.d.ts.map +1 -0
- package/build/dist/kayenta/reducers/selectedRun.d.ts +20 -0
- package/build/dist/kayenta/reducers/selectedRun.d.ts.map +1 -0
- package/build/dist/kayenta/reducers/signalFxMetricConfig.d.ts +22 -0
- package/build/dist/kayenta/reducers/signalFxMetricConfig.d.ts.map +1 -0
- package/build/dist/kayenta/reducers/stackdriverMetricConfig.d.ts +6 -0
- package/build/dist/kayenta/reducers/stackdriverMetricConfig.d.ts.map +1 -0
- package/build/dist/kayenta/reducers/stackdriverMetricConfig.spec.d.ts +2 -0
- package/build/dist/kayenta/reducers/stackdriverMetricConfig.spec.d.ts.map +1 -0
- package/build/dist/kayenta/reducers/templates.spec.d.ts +2 -0
- package/build/dist/kayenta/reducers/templates.spec.d.ts.map +1 -0
- package/build/dist/kayenta/reducers/validators.d.ts +6 -0
- package/build/dist/kayenta/reducers/validators.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/allMetricResultsHeader.d.ts +10 -0
- package/build/dist/kayenta/report/detail/allMetricResultsHeader.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/clickableHeader.d.ts +11 -0
- package/build/dist/kayenta/report/detail/clickableHeader.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/colors.d.ts +5 -0
- package/build/dist/kayenta/report/detail/colors.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/detail.d.ts +10 -0
- package/build/dist/kayenta/report/detail/detail.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/detailLoader.d.ts +16 -0
- package/build/dist/kayenta/report/detail/detailLoader.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/graph.d.ts +13 -0
- package/build/dist/kayenta/report/detail/graph/graph.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/metricSetPairGraph.service.d.ts +19 -0
- package/build/dist/kayenta/report/detail/graph/metricSetPairGraph.service.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/boxplot.d.ts +19 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/boxplot.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/chartHeader.d.ts +6 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/chartHeader.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/chartLegend.d.ts +11 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/chartLegend.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/circleIcon.d.ts +6 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/circleIcon.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/config.d.ts +18 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/config.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/customAxisTickLabel.d.ts +6 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/customAxisTickLabel.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/differenceArea.d.ts +17 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/differenceArea.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/histogram.d.ts +19 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/histogram.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/index.d.ts +2 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/index.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/noValidDataSign.d.ts +4 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/noValidDataSign.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/secondaryTSXAxis.d.ts +15 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/secondaryTSXAxis.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/semiotic.service.d.ts +27 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/semiotic.service.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/semioticGraph.d.ts +8 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/semioticGraph.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/timeSeries.d.ts +31 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/timeSeries.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/tooltip.d.ts +13 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/tooltip.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/utils.d.ts +6 -0
- package/build/dist/kayenta/report/detail/graph/semiotic/utils.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/graphTypeSelector.d.ts +13 -0
- package/build/dist/kayenta/report/detail/graphTypeSelector.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/groupScores.d.ts +18 -0
- package/build/dist/kayenta/report/detail/groupScores.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/header.d.ts +12 -0
- package/build/dist/kayenta/report/detail/header.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/headerArrow.d.ts +7 -0
- package/build/dist/kayenta/report/detail/headerArrow.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/loadStates.d.ts +9 -0
- package/build/dist/kayenta/report/detail/loadStates.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/metricResultActions.d.ts +12 -0
- package/build/dist/kayenta/report/detail/metricResultActions.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/metricResultClassification.d.ts +8 -0
- package/build/dist/kayenta/report/detail/metricResultClassification.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/metricResultDetail.d.ts +7 -0
- package/build/dist/kayenta/report/detail/metricResultDetail.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/metricResultDetailLayout.d.ts +3 -0
- package/build/dist/kayenta/report/detail/metricResultDetailLayout.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/metricResultDeviation.d.ts +7 -0
- package/build/dist/kayenta/report/detail/metricResultDeviation.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/metricResultStats.d.ts +15 -0
- package/build/dist/kayenta/report/detail/metricResultStats.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/metricResults.d.ts +11 -0
- package/build/dist/kayenta/report/detail/metricResults.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/metricResultsClassificationFilters.d.ts +15 -0
- package/build/dist/kayenta/report/detail/metricResultsClassificationFilters.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/metricResultsColumns.d.ts +4 -0
- package/build/dist/kayenta/report/detail/metricResultsColumns.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/metricResultsList.d.ts +23 -0
- package/build/dist/kayenta/report/detail/metricResultsList.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/metricSetPairLoadStates.d.ts +10 -0
- package/build/dist/kayenta/report/detail/metricSetPairLoadStates.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/multipleResultsTable.d.ts +23 -0
- package/build/dist/kayenta/report/detail/multipleResultsTable.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/reportException.d.ts +10 -0
- package/build/dist/kayenta/report/detail/reportException.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/reportExplanation.d.ts +10 -0
- package/build/dist/kayenta/report/detail/reportExplanation.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/reportMetadata.d.ts +9 -0
- package/build/dist/kayenta/report/detail/reportMetadata.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/reportScores.d.ts +20 -0
- package/build/dist/kayenta/report/detail/reportScores.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/score.d.ts +9 -0
- package/build/dist/kayenta/report/detail/score.d.ts.map +1 -0
- package/build/dist/kayenta/report/detail/sourceLinks.d.ts +9 -0
- package/build/dist/kayenta/report/detail/sourceLinks.d.ts.map +1 -0
- package/build/dist/kayenta/report/list/configLink.d.ts +14 -0
- package/build/dist/kayenta/report/list/configLink.d.ts.map +1 -0
- package/build/dist/kayenta/report/list/loadStates.d.ts +9 -0
- package/build/dist/kayenta/report/list/loadStates.d.ts.map +1 -0
- package/build/dist/kayenta/report/list/pipelineLink.d.ts +7 -0
- package/build/dist/kayenta/report/list/pipelineLink.d.ts.map +1 -0
- package/build/dist/kayenta/report/list/reportLink.d.ts +16 -0
- package/build/dist/kayenta/report/list/reportLink.d.ts.map +1 -0
- package/build/dist/kayenta/report/list/table.d.ts +14 -0
- package/build/dist/kayenta/report/list/table.d.ts.map +1 -0
- package/build/dist/kayenta/report/report.d.ts +3 -0
- package/build/dist/kayenta/report/report.d.ts.map +1 -0
- package/build/dist/kayenta/selectors/filterTemplatesSelectors.d.ts +21 -0
- package/build/dist/kayenta/selectors/filterTemplatesSelectors.d.ts.map +1 -0
- package/build/dist/kayenta/selectors/index.d.ts +25 -0
- package/build/dist/kayenta/selectors/index.d.ts.map +1 -0
- package/build/dist/kayenta/service/canaryConfig.service.d.ts +13 -0
- package/build/dist/kayenta/service/canaryConfig.service.d.ts.map +1 -0
- package/build/dist/kayenta/service/canaryRun.service.d.ts +7 -0
- package/build/dist/kayenta/service/canaryRun.service.d.ts.map +1 -0
- package/build/dist/kayenta/service/delegateFactory.d.ts +9 -0
- package/build/dist/kayenta/service/delegateFactory.d.ts.map +1 -0
- package/build/dist/kayenta/service/metricsServiceMetadata.service.d.ts +3 -0
- package/build/dist/kayenta/service/metricsServiceMetadata.service.d.ts.map +1 -0
- package/build/dist/kayenta/stages/kayentaStage/AnalysisType.d.ts +13 -0
- package/build/dist/kayenta/stages/kayentaStage/AnalysisType.d.ts.map +1 -0
- package/build/dist/kayenta/stages/kayentaStage/AnalysisType.spec.d.ts +2 -0
- package/build/dist/kayenta/stages/kayentaStage/AnalysisType.spec.d.ts.map +1 -0
- package/build/dist/kayenta/stages/kayentaStage/CanaryExecutionLabel.d.ts +6 -0
- package/build/dist/kayenta/stages/kayentaStage/CanaryExecutionLabel.d.ts.map +1 -0
- package/build/dist/kayenta/stages/kayentaStage/analysisType.component.d.ts +2 -0
- package/build/dist/kayenta/stages/kayentaStage/analysisType.component.d.ts.map +1 -0
- package/build/dist/kayenta/stages/kayentaStage/canaryRunSummaries.component.d.ts +2 -0
- package/build/dist/kayenta/stages/kayentaStage/canaryRunSummaries.component.d.ts.map +1 -0
- package/build/dist/kayenta/stages/kayentaStage/canaryRunSummaries.d.ts +13 -0
- package/build/dist/kayenta/stages/kayentaStage/canaryRunSummaries.d.ts.map +1 -0
- package/build/dist/kayenta/stages/kayentaStage/forAnalysisType.component.d.ts +2 -0
- package/build/dist/kayenta/stages/kayentaStage/forAnalysisType.component.d.ts.map +1 -0
- package/build/dist/kayenta/stages/kayentaStage/kayentaStage.controller.d.ts +100 -0
- package/build/dist/kayenta/stages/kayentaStage/kayentaStage.controller.d.ts.map +1 -0
- package/build/dist/kayenta/stages/kayentaStage/kayentaStage.d.ts +29 -0
- package/build/dist/kayenta/stages/kayentaStage/kayentaStage.d.ts.map +1 -0
- package/build/dist/kayenta/stages/kayentaStage/kayentaStage.transformer.d.ts +12 -0
- package/build/dist/kayenta/stages/kayentaStage/kayentaStage.transformer.d.ts.map +1 -0
- package/build/dist/kayenta/stages/kayentaStage/kayentaStageConfigSection.component.d.ts +2 -0
- package/build/dist/kayenta/stages/kayentaStage/kayentaStageConfigSection.component.d.ts.map +1 -0
- package/build/dist/kayenta/stages/kayentaStage/kayentaStageExecutionDetails.controller.d.ts +3 -0
- package/build/dist/kayenta/stages/kayentaStage/kayentaStageExecutionDetails.controller.d.ts.map +1 -0
- package/build/dist/kayenta/stages/kayentaStage/stageTypes.d.ts +6 -0
- package/build/dist/kayenta/stages/kayentaStage/stageTypes.d.ts.map +1 -0
- package/build/dist/kayenta/utils/duration.d.ts +12 -0
- package/build/dist/kayenta/utils/duration.d.ts.map +1 -0
- package/build/dist/kayenta/utils/duration.spec.d.ts +2 -0
- package/build/dist/kayenta/utils/duration.spec.d.ts.map +1 -0
- package/build/dist/lazy-1f6a42b8.js +2 -0
- package/build/dist/lazy-1f6a42b8.js.map +1 -0
- package/build/dist/lazy.d.ts +6 -0
- package/build/dist/lazy.d.ts.map +1 -0
- package/build/dist/semioticGraph-d687462f.js +2 -0
- package/build/dist/semioticGraph-d687462f.js.map +1 -0
- package/build/dist/stub.d.ts +15 -0
- package/build/dist/stub.d.ts.map +1 -0
- package/build.gradle +67 -0
- package/build_scripts/checkLicenses.js +79 -0
- package/gradle.properties +0 -0
- package/jest.config.js +204 -0
- package/jest.setup.js +5 -0
- package/package.json +166 -0
- package/rollup-plugin-angularjs-template-loader.js +82 -0
- package/rollup.config.js +30 -0
- package/src/index.ts +2 -0
- package/src/kayenta/actions/creators.ts +157 -0
- package/src/kayenta/actions/index.ts +96 -0
- package/src/kayenta/canary.dataSource.bridge.ts +53 -0
- package/src/kayenta/canary.dataSource.stub.ts +64 -0
- package/src/kayenta/canary.help.ts +132 -0
- package/src/kayenta/canary.less +168 -0
- package/src/kayenta/canary.settings.ts +26 -0
- package/src/kayenta/canary.tsx +67 -0
- package/src/kayenta/components/canaryScore.component.less +77 -0
- package/src/kayenta/components/canaryScore.component.ts +12 -0
- package/src/kayenta/components/canaryScore.tsx +63 -0
- package/src/kayenta/components/canaryScores.component.ts +20 -0
- package/src/kayenta/components/canaryScores.less +22 -0
- package/src/kayenta/components/canaryScores.tsx +163 -0
- package/src/kayenta/components/loadStates.tsx +52 -0
- package/src/kayenta/domain/ICanaryConfig.ts +57 -0
- package/src/kayenta/domain/ICanaryConfigSummary.ts +7 -0
- package/src/kayenta/domain/ICanaryConfigUpdateResponse.ts +3 -0
- package/src/kayenta/domain/ICanaryExecutionStatusResult.ts +72 -0
- package/src/kayenta/domain/ICanaryJudgeResult.ts +51 -0
- package/src/kayenta/domain/ICanaryJudgeResultSummary.ts +5 -0
- package/src/kayenta/domain/ICanaryScoreThresholds.ts +4 -0
- package/src/kayenta/domain/IJudge.ts +5 -0
- package/src/kayenta/domain/IKayentaAccount.ts +14 -0
- package/src/kayenta/domain/IKayentaStageConfig.ts +58 -0
- package/src/kayenta/domain/IMetricSetPair.ts +17 -0
- package/src/kayenta/domain/IMetricsServiceMetadata.ts +2 -0
- package/src/kayenta/domain/ISetupCanaryStage.ts +11 -0
- package/src/kayenta/domain/MetricClassificationLabel.ts +7 -0
- package/src/kayenta/domain/ScoreClassificationLabel.ts +7 -0
- package/src/kayenta/domain/index.ts +15 -0
- package/src/kayenta/edit/changeMetricGroupModal.tsx +107 -0
- package/src/kayenta/edit/configDetail.tsx +31 -0
- package/src/kayenta/edit/configDetailActionButtons.tsx +24 -0
- package/src/kayenta/edit/configDetailHeader.tsx +104 -0
- package/src/kayenta/edit/configDetailLoadStates.tsx +36 -0
- package/src/kayenta/edit/configDetailLoader.tsx +60 -0
- package/src/kayenta/edit/configJson.less +42 -0
- package/src/kayenta/edit/configJsonModal.tsx +158 -0
- package/src/kayenta/edit/configList.less +7 -0
- package/src/kayenta/edit/configList.tsx +57 -0
- package/src/kayenta/edit/copyConfigButton.tsx +34 -0
- package/src/kayenta/edit/createConfigButton.tsx +34 -0
- package/src/kayenta/edit/deleteModal.tsx +87 -0
- package/src/kayenta/edit/edit.tsx +24 -0
- package/src/kayenta/edit/editMetricEffectSizes.tsx +186 -0
- package/src/kayenta/edit/editMetricModal.less +9 -0
- package/src/kayenta/edit/editMetricModal.tsx +245 -0
- package/src/kayenta/edit/editMetricValidation.spec.ts +63 -0
- package/src/kayenta/edit/editMetricValidation.ts +50 -0
- package/src/kayenta/edit/filterTemplateSelector.less +15 -0
- package/src/kayenta/edit/filterTemplateSelector.spec.tsx +106 -0
- package/src/kayenta/edit/filterTemplateSelector.tsx +194 -0
- package/src/kayenta/edit/filterTemplatesValidation.spec.ts +108 -0
- package/src/kayenta/edit/filterTemplatesValidation.ts +95 -0
- package/src/kayenta/edit/footer.less +30 -0
- package/src/kayenta/edit/footer.tsx +12 -0
- package/src/kayenta/edit/groupName.tsx +80 -0
- package/src/kayenta/edit/groupTabs.tsx +106 -0
- package/src/kayenta/edit/groupWeight.tsx +80 -0
- package/src/kayenta/edit/groupWeights.tsx +38 -0
- package/src/kayenta/edit/inlineTemplateEditor.spec.tsx +42 -0
- package/src/kayenta/edit/inlineTemplateEditor.tsx +61 -0
- package/src/kayenta/edit/judgeSelect.tsx +82 -0
- package/src/kayenta/edit/metricConfigurerDelegator.tsx +30 -0
- package/src/kayenta/edit/metricList.less +21 -0
- package/src/kayenta/edit/metricList.tsx +215 -0
- package/src/kayenta/edit/metricStoreSelector.tsx +66 -0
- package/src/kayenta/edit/nameAndDescription.tsx +90 -0
- package/src/kayenta/edit/openConfigJsonModalButton.tsx +33 -0
- package/src/kayenta/edit/openDeleteModalButton.tsx +50 -0
- package/src/kayenta/edit/ownedBy.tsx +34 -0
- package/src/kayenta/edit/save.tsx +19 -0
- package/src/kayenta/edit/saveConfigButton.tsx +65 -0
- package/src/kayenta/edit/saveConfigError.tsx +59 -0
- package/src/kayenta/edit/scoring.tsx +35 -0
- package/src/kayenta/edit/selectConfig.tsx +10 -0
- package/src/kayenta/edit/validationErrors.tsx +39 -0
- package/src/kayenta/index.ts +6 -0
- package/src/kayenta/layout/addNewButton.tsx +20 -0
- package/src/kayenta/layout/centeredDetail.tsx +13 -0
- package/src/kayenta/layout/deleteButton.tsx +11 -0
- package/src/kayenta/layout/disableable.tsx +87 -0
- package/src/kayenta/layout/formList.tsx +26 -0
- package/src/kayenta/layout/formRow.tsx +36 -0
- package/src/kayenta/layout/formattedDate.tsx +14 -0
- package/src/kayenta/layout/index.ts +2 -0
- package/src/kayenta/layout/keyValueList.less +20 -0
- package/src/kayenta/layout/keyValueList.tsx +114 -0
- package/src/kayenta/layout/list.less +9 -0
- package/src/kayenta/layout/list.spec.tsx +83 -0
- package/src/kayenta/layout/list.tsx +73 -0
- package/src/kayenta/layout/listDetail.tsx +33 -0
- package/src/kayenta/layout/radioChoice.tsx +29 -0
- package/src/kayenta/layout/styleguide.tsx +16 -0
- package/src/kayenta/layout/table/index.ts +5 -0
- package/src/kayenta/layout/table/nativeTable.tsx +51 -0
- package/src/kayenta/layout/table/nativeTableHeader.tsx +26 -0
- package/src/kayenta/layout/table/table.tsx +56 -0
- package/src/kayenta/layout/table/tableColumn.ts +7 -0
- package/src/kayenta/layout/table/tableHeader.tsx +23 -0
- package/src/kayenta/layout/tabs.tsx +26 -0
- package/src/kayenta/layout/titledSection.less +16 -0
- package/src/kayenta/layout/titledSection.tsx +20 -0
- package/src/kayenta/layout/titledSubsection.less +11 -0
- package/src/kayenta/layout/titledSubsection.tsx +22 -0
- package/src/kayenta/manualAnalysis/ManualAnalysisModal.tsx +716 -0
- package/src/kayenta/metricStore/atlas/atlasMetricConfigurer.tsx +130 -0
- package/src/kayenta/metricStore/atlas/index.ts +8 -0
- package/src/kayenta/metricStore/datadog/domain/IDatadogMetricDescriptor.ts +5 -0
- package/src/kayenta/metricStore/datadog/index.ts +8 -0
- package/src/kayenta/metricStore/datadog/metricConfigurer.tsx +90 -0
- package/src/kayenta/metricStore/datadog/metricTypeSelector.spec.tsx +59 -0
- package/src/kayenta/metricStore/datadog/metricTypeSelector.tsx +73 -0
- package/src/kayenta/metricStore/graphite/domain/IGraphiteMetricDescriptor.ts +5 -0
- package/src/kayenta/metricStore/graphite/index.ts +8 -0
- package/src/kayenta/metricStore/graphite/metricConfigurer.tsx +54 -0
- package/src/kayenta/metricStore/graphite/metricTypeSelector.tsx +80 -0
- package/src/kayenta/metricStore/graphite/typeahead.less +3 -0
- package/src/kayenta/metricStore/index.ts +8 -0
- package/src/kayenta/metricStore/metricStoreConfig.service.ts +12 -0
- package/src/kayenta/metricStore/newrelic/domain/INewRelicMetricDescriptor.ts +5 -0
- package/src/kayenta/metricStore/newrelic/index.ts +8 -0
- package/src/kayenta/metricStore/newrelic/metricConfigurer.tsx +58 -0
- package/src/kayenta/metricStore/prometheus/domain/IPrometheusCanaryMetricSetQueryConfig.ts +14 -0
- package/src/kayenta/metricStore/prometheus/domain/IPrometheusMetricDescriptor.ts +5 -0
- package/src/kayenta/metricStore/prometheus/index.ts +12 -0
- package/src/kayenta/metricStore/prometheus/metricConfigurer.tsx +157 -0
- package/src/kayenta/metricStore/prometheus/metricTypeSelector.less +5 -0
- package/src/kayenta/metricStore/prometheus/metricTypeSelector.spec.tsx +62 -0
- package/src/kayenta/metricStore/prometheus/metricTypeSelector.tsx +144 -0
- package/src/kayenta/metricStore/prometheus/queryTypeSelectors.spec.ts +61 -0
- package/src/kayenta/metricStore/prometheus/queryTypeSelectors.ts +38 -0
- package/src/kayenta/metricStore/signalfx/domain/ISignalFxCanaryMetricSetQueryConfig.ts +7 -0
- package/src/kayenta/metricStore/signalfx/index.ts +8 -0
- package/src/kayenta/metricStore/signalfx/metricConfigurer.less +10 -0
- package/src/kayenta/metricStore/signalfx/metricConfigurer.tsx +187 -0
- package/src/kayenta/metricStore/stackdriver/domain/IStackdriverCanaryMetricSetQueryConfig.ts +9 -0
- package/src/kayenta/metricStore/stackdriver/domain/IStackdriverMetricDescriptor.ts +17 -0
- package/src/kayenta/metricStore/stackdriver/index.ts +12 -0
- package/src/kayenta/metricStore/stackdriver/metricConfigurer.tsx +144 -0
- package/src/kayenta/metricStore/stackdriver/metricTypeSelector.spec.tsx +92 -0
- package/src/kayenta/metricStore/stackdriver/metricTypeSelector.tsx +113 -0
- package/src/kayenta/middleware/actionInterceptor.ts +29 -0
- package/src/kayenta/middleware/asyncDispatch.ts +37 -0
- package/src/kayenta/middleware/epics.ts +211 -0
- package/src/kayenta/middleware/index.ts +3 -0
- package/src/kayenta/navigation/canary.states.stub.ts +28 -0
- package/src/kayenta/navigation/canary.states.ts +182 -0
- package/src/kayenta/reducers/app.ts +56 -0
- package/src/kayenta/reducers/asyncRequest.ts +5 -0
- package/src/kayenta/reducers/data.ts +169 -0
- package/src/kayenta/reducers/editingTemplate.ts +54 -0
- package/src/kayenta/reducers/group.ts +82 -0
- package/src/kayenta/reducers/index.ts +245 -0
- package/src/kayenta/reducers/prometheusMetricConfig.spec.ts +33 -0
- package/src/kayenta/reducers/prometheusMetricConfig.ts +56 -0
- package/src/kayenta/reducers/selectedConfig.spec.ts +190 -0
- package/src/kayenta/reducers/selectedConfig.ts +549 -0
- package/src/kayenta/reducers/selectedRun.ts +101 -0
- package/src/kayenta/reducers/signalFxMetricConfig.ts +36 -0
- package/src/kayenta/reducers/stackdriverMetricConfig.spec.ts +33 -0
- package/src/kayenta/reducers/stackdriverMetricConfig.ts +41 -0
- package/src/kayenta/reducers/templates.spec.ts +192 -0
- package/src/kayenta/reducers/validators.ts +118 -0
- package/src/kayenta/report/detail/allMetricResultsHeader.tsx +32 -0
- package/src/kayenta/report/detail/clickableHeader.tsx +21 -0
- package/src/kayenta/report/detail/colors.ts +46 -0
- package/src/kayenta/report/detail/detail.less +16 -0
- package/src/kayenta/report/detail/detail.tsx +48 -0
- package/src/kayenta/report/detail/detailLoader.tsx +55 -0
- package/src/kayenta/report/detail/graph/graph.tsx +37 -0
- package/src/kayenta/report/detail/graph/metricSetPairGraph.service.ts +35 -0
- package/src/kayenta/report/detail/graph/semiotic/boxplot.less +45 -0
- package/src/kayenta/report/detail/graph/semiotic/boxplot.tsx +283 -0
- package/src/kayenta/report/detail/graph/semiotic/chartHeader.tsx +19 -0
- package/src/kayenta/report/detail/graph/semiotic/chartLegend.less +26 -0
- package/src/kayenta/report/detail/graph/semiotic/chartLegend.tsx +42 -0
- package/src/kayenta/report/detail/graph/semiotic/circleIcon.tsx +16 -0
- package/src/kayenta/report/detail/graph/semiotic/config.less +5 -0
- package/src/kayenta/report/detail/graph/semiotic/config.ts +38 -0
- package/src/kayenta/report/detail/graph/semiotic/customAxisTickLabel.tsx +17 -0
- package/src/kayenta/report/detail/graph/semiotic/declarations/labella.d.ts +16 -0
- package/src/kayenta/report/detail/graph/semiotic/declarations/react-container-dimensions.d.ts +3 -0
- package/src/kayenta/report/detail/graph/semiotic/declarations/semiotic.d.ts +160 -0
- package/src/kayenta/report/detail/graph/semiotic/differenceArea.less +17 -0
- package/src/kayenta/report/detail/graph/semiotic/differenceArea.tsx +186 -0
- package/src/kayenta/report/detail/graph/semiotic/histogram.less +22 -0
- package/src/kayenta/report/detail/graph/semiotic/histogram.tsx +251 -0
- package/src/kayenta/report/detail/graph/semiotic/index.tsx +19 -0
- package/src/kayenta/report/detail/graph/semiotic/noValidDataSign.less +5 -0
- package/src/kayenta/report/detail/graph/semiotic/noValidDataSign.tsx +10 -0
- package/src/kayenta/report/detail/graph/semiotic/secondaryTSXAxis.less +6 -0
- package/src/kayenta/report/detail/graph/semiotic/secondaryTSXAxis.tsx +58 -0
- package/src/kayenta/report/detail/graph/semiotic/semiotic.service.ts +32 -0
- package/src/kayenta/report/detail/graph/semiotic/semioticGraph.less +53 -0
- package/src/kayenta/report/detail/graph/semiotic/semioticGraph.tsx +49 -0
- package/src/kayenta/report/detail/graph/semiotic/timeSeries.less +42 -0
- package/src/kayenta/report/detail/graph/semiotic/timeSeries.tsx +473 -0
- package/src/kayenta/report/detail/graph/semiotic/tooltip.tsx +55 -0
- package/src/kayenta/report/detail/graph/semiotic/utils.ts +90 -0
- package/src/kayenta/report/detail/graphTypeSelector.less +4 -0
- package/src/kayenta/report/detail/graphTypeSelector.tsx +50 -0
- package/src/kayenta/report/detail/groupScores.tsx +68 -0
- package/src/kayenta/report/detail/header.less +70 -0
- package/src/kayenta/report/detail/header.tsx +39 -0
- package/src/kayenta/report/detail/headerArrow.tsx +13 -0
- package/src/kayenta/report/detail/loadStates.tsx +31 -0
- package/src/kayenta/report/detail/metricResultActions.less +29 -0
- package/src/kayenta/report/detail/metricResultActions.tsx +87 -0
- package/src/kayenta/report/detail/metricResultClassification.tsx +22 -0
- package/src/kayenta/report/detail/metricResultDetail.tsx +20 -0
- package/src/kayenta/report/detail/metricResultDetailLayout.tsx +19 -0
- package/src/kayenta/report/detail/metricResultDeviation.tsx +25 -0
- package/src/kayenta/report/detail/metricResultStats.less +9 -0
- package/src/kayenta/report/detail/metricResultStats.tsx +120 -0
- package/src/kayenta/report/detail/metricResults.less +12 -0
- package/src/kayenta/report/detail/metricResults.tsx +52 -0
- package/src/kayenta/report/detail/metricResultsClassificationFilters.tsx +65 -0
- package/src/kayenta/report/detail/metricResultsColumns.tsx +27 -0
- package/src/kayenta/report/detail/metricResultsList.less +44 -0
- package/src/kayenta/report/detail/metricResultsList.tsx +120 -0
- package/src/kayenta/report/detail/metricSetPairLoadStates.tsx +22 -0
- package/src/kayenta/report/detail/multipleResultsTable.tsx +81 -0
- package/src/kayenta/report/detail/reportException.tsx +57 -0
- package/src/kayenta/report/detail/reportExplanation.less +12 -0
- package/src/kayenta/report/detail/reportExplanation.tsx +32 -0
- package/src/kayenta/report/detail/reportMetadata.tsx +167 -0
- package/src/kayenta/report/detail/reportScores.less +47 -0
- package/src/kayenta/report/detail/reportScores.tsx +80 -0
- package/src/kayenta/report/detail/score.tsx +33 -0
- package/src/kayenta/report/detail/sourceLinks.tsx +69 -0
- package/src/kayenta/report/list/configLink.tsx +32 -0
- package/src/kayenta/report/list/executionList.less +7 -0
- package/src/kayenta/report/list/loadStates.tsx +32 -0
- package/src/kayenta/report/list/pipelineLink.tsx +15 -0
- package/src/kayenta/report/list/reportLink.tsx +33 -0
- package/src/kayenta/report/list/table.tsx +309 -0
- package/src/kayenta/report/report.tsx +11 -0
- package/src/kayenta/selectors/filterTemplatesSelectors.ts +87 -0
- package/src/kayenta/selectors/index.ts +62 -0
- package/src/kayenta/service/canaryConfig.service.ts +122 -0
- package/src/kayenta/service/canaryRun.service.ts +60 -0
- package/src/kayenta/service/delegateFactory.ts +24 -0
- package/src/kayenta/service/metricsServiceMetadata.service.ts +9 -0
- package/src/kayenta/stages/kayentaStage/AnalysisType.spec.tsx +47 -0
- package/src/kayenta/stages/kayentaStage/AnalysisType.tsx +49 -0
- package/src/kayenta/stages/kayentaStage/CanaryExecutionLabel.tsx +26 -0
- package/src/kayenta/stages/kayentaStage/analysisType.component.ts +12 -0
- package/src/kayenta/stages/kayentaStage/canaryRunSummaries.component.ts +12 -0
- package/src/kayenta/stages/kayentaStage/canaryRunSummaries.less +5 -0
- package/src/kayenta/stages/kayentaStage/canaryRunSummaries.tsx +136 -0
- package/src/kayenta/stages/kayentaStage/forAnalysisType.component.ts +45 -0
- package/src/kayenta/stages/kayentaStage/kayentaStage.controller.ts +789 -0
- package/src/kayenta/stages/kayentaStage/kayentaStage.html +528 -0
- package/src/kayenta/stages/kayentaStage/kayentaStage.less +5 -0
- package/src/kayenta/stages/kayentaStage/kayentaStage.transformer.ts +179 -0
- package/src/kayenta/stages/kayentaStage/kayentaStage.ts +221 -0
- package/src/kayenta/stages/kayentaStage/kayentaStageConfigSection.component.ts +21 -0
- package/src/kayenta/stages/kayentaStage/kayentaStageExecutionDetails.controller.ts +88 -0
- package/src/kayenta/stages/kayentaStage/kayentaStageExecutionDetails.html +114 -0
- package/src/kayenta/stages/kayentaStage/kayentaStageExecutionDetails.less +6 -0
- package/src/kayenta/stages/kayentaStage/stageTypes.ts +5 -0
- package/src/kayenta/utils/duration.spec.ts +69 -0
- package/src/kayenta/utils/duration.ts +48 -0
- package/src/lazy.ts +29 -0
- package/src/stub.ts +60 -0
- package/tsconfig.json +11 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ICanaryMetricSetQueryConfig } from 'kayenta/domain';
|
|
2
|
+
|
|
3
|
+
export interface IStackdriverCanaryMetricSetQueryConfig extends ICanaryMetricSetQueryConfig {
|
|
4
|
+
metricType: string;
|
|
5
|
+
resourceType: string;
|
|
6
|
+
crossSeriesReducer: string;
|
|
7
|
+
perSeriesAligner: string;
|
|
8
|
+
groupByFields: string[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IMetricsServiceMetadata } from 'kayenta/domain/IMetricsServiceMetadata';
|
|
2
|
+
|
|
3
|
+
export interface IStackdriverMetricDescriptor extends IMetricsServiceMetadata {
|
|
4
|
+
metricKind: string;
|
|
5
|
+
labels?: IStackdriverMetricDescriptorLabels[];
|
|
6
|
+
name: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
type: string;
|
|
9
|
+
description: string;
|
|
10
|
+
unit: string;
|
|
11
|
+
valueType: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface IStackdriverMetricDescriptorLabels {
|
|
15
|
+
description: string;
|
|
16
|
+
key: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ICanaryMetricConfig } from 'kayenta/domain/ICanaryConfig';
|
|
2
|
+
import { get } from 'lodash';
|
|
3
|
+
|
|
4
|
+
import StackdriverMetricConfigurer from './metricConfigurer';
|
|
5
|
+
import metricStoreConfigStore from '../metricStoreConfig.service';
|
|
6
|
+
|
|
7
|
+
metricStoreConfigStore.register({
|
|
8
|
+
name: 'stackdriver',
|
|
9
|
+
metricConfigurer: StackdriverMetricConfigurer,
|
|
10
|
+
queryFinder: (metric: ICanaryMetricConfig) => get(metric, 'query.metricType', ''),
|
|
11
|
+
useTemplates: true,
|
|
12
|
+
});
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import * as Creators from 'kayenta/actions/creators';
|
|
2
|
+
import { ICanaryMetricConfig } from 'kayenta/domain/ICanaryConfig';
|
|
3
|
+
import { DISABLE_EDIT_CONFIG, DisableableReactSelect } from 'kayenta/layout/disableable';
|
|
4
|
+
import FormRow from 'kayenta/layout/formRow';
|
|
5
|
+
import { IUpdateListPayload, List } from 'kayenta/layout/list';
|
|
6
|
+
import { ICanaryState } from 'kayenta/reducers';
|
|
7
|
+
import { get } from 'lodash';
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import { connect } from 'react-redux';
|
|
10
|
+
import { Option } from 'react-select';
|
|
11
|
+
import { Action } from 'redux';
|
|
12
|
+
|
|
13
|
+
import { IStackdriverCanaryMetricSetQueryConfig } from './domain/IStackdriverCanaryMetricSetQueryConfig';
|
|
14
|
+
import StackdriverMetricTypeSelector from './metricTypeSelector';
|
|
15
|
+
|
|
16
|
+
interface IStackdriverMetricConfigurerStateProps {
|
|
17
|
+
editingMetric: ICanaryMetricConfig;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface IStackdriverMetricConfigurerDispatchProps {
|
|
21
|
+
updateStackdriverQueryField: <T extends keyof IStackdriverCanaryMetricSetQueryConfig>(
|
|
22
|
+
field: keyof IStackdriverCanaryMetricSetQueryConfig,
|
|
23
|
+
value: Option<IStackdriverCanaryMetricSetQueryConfig[T]>,
|
|
24
|
+
) => void;
|
|
25
|
+
updateGroupBy: (payload: IUpdateListPayload) => void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// TODO(dpeach): externalize these values.
|
|
29
|
+
const RESOURCE_TYPES = [
|
|
30
|
+
'gce_instance',
|
|
31
|
+
'aws_ec2_instance',
|
|
32
|
+
'gae_app',
|
|
33
|
+
'k8s_container',
|
|
34
|
+
'k8s_pod',
|
|
35
|
+
'k8s_node',
|
|
36
|
+
'gke_container',
|
|
37
|
+
'https_lb_rule',
|
|
38
|
+
'global',
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
const CROSS_SERIES_REDUCERS = [
|
|
42
|
+
'REDUCE_NONE',
|
|
43
|
+
'REDUCE_MEAN',
|
|
44
|
+
'REDUCE_MIN',
|
|
45
|
+
'REDUCE_MAX',
|
|
46
|
+
'REDUCE_SUM',
|
|
47
|
+
'REDUCE_COUNT_TRUE',
|
|
48
|
+
'REDUCE_COUNT_FALSE',
|
|
49
|
+
'REDUCE_FRACTION_TRUE',
|
|
50
|
+
'REDUCE_PERCENTILE_99',
|
|
51
|
+
'REDUCE_PERCENTILE_95',
|
|
52
|
+
'REDUCE_PERCENTILE_50',
|
|
53
|
+
'REDUCE_PERCENTILE_05',
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
const PER_SERIES_ALIGNERS = [
|
|
57
|
+
'ALIGN_NONE',
|
|
58
|
+
'ALIGN_DELTA',
|
|
59
|
+
'ALIGN_RATE',
|
|
60
|
+
'ALIGN_INTERPOLATE',
|
|
61
|
+
'ALIGN_NEXT_OLDER',
|
|
62
|
+
'ALIGN_MIN',
|
|
63
|
+
'ALIGN_MAX',
|
|
64
|
+
'ALIGN_MEAN',
|
|
65
|
+
'ALIGN_COUNT',
|
|
66
|
+
'ALIGN_SUM',
|
|
67
|
+
'ALIGN_STDDEV',
|
|
68
|
+
'ALIGN_COUNT_TRUE',
|
|
69
|
+
'ALIGN_COUNT_FALSE',
|
|
70
|
+
'ALIGN_FRACTION_TRUE',
|
|
71
|
+
'ALIGN_PERCENTILE_99',
|
|
72
|
+
'ALIGN_PERCENTILE_95',
|
|
73
|
+
'ALIGN_PERCENTILE_50',
|
|
74
|
+
'ALIGN_PERCENTILE_05',
|
|
75
|
+
'ALIGN_PERCENT_CHANGE',
|
|
76
|
+
];
|
|
77
|
+
|
|
78
|
+
const STACKDRIVER_HELP_ID_PREFIX = 'stackdriver';
|
|
79
|
+
|
|
80
|
+
const toReactSelectOptions = (values: string[]): Array<Option<string>> =>
|
|
81
|
+
values.map((value) => ({ value, label: value }));
|
|
82
|
+
|
|
83
|
+
/*
|
|
84
|
+
* Component for configuring a Stackdriver metric.
|
|
85
|
+
* */
|
|
86
|
+
function StackdriverMetricConfigurer({
|
|
87
|
+
editingMetric,
|
|
88
|
+
updateGroupBy,
|
|
89
|
+
updateStackdriverQueryField,
|
|
90
|
+
}: IStackdriverMetricConfigurerStateProps & IStackdriverMetricConfigurerDispatchProps) {
|
|
91
|
+
return (
|
|
92
|
+
<>
|
|
93
|
+
<FormRow label="Resource Type" helpId={`${STACKDRIVER_HELP_ID_PREFIX}.resourceType`} inputOnly={true}>
|
|
94
|
+
<DisableableReactSelect
|
|
95
|
+
value={get(editingMetric, 'query.resourceType')}
|
|
96
|
+
options={toReactSelectOptions(RESOURCE_TYPES)}
|
|
97
|
+
onChange={(option: Option<string>) => updateStackdriverQueryField('resourceType', option)}
|
|
98
|
+
disabledStateKeys={[DISABLE_EDIT_CONFIG]}
|
|
99
|
+
/>
|
|
100
|
+
</FormRow>
|
|
101
|
+
<FormRow label="Metric Type" helpId={`${STACKDRIVER_HELP_ID_PREFIX}.metricType`} inputOnly={true}>
|
|
102
|
+
<StackdriverMetricTypeSelector
|
|
103
|
+
value={get(editingMetric, 'query.metricType', '')}
|
|
104
|
+
onChange={(option: Option<string>) => updateStackdriverQueryField('metricType', option)}
|
|
105
|
+
/>
|
|
106
|
+
</FormRow>
|
|
107
|
+
<FormRow label="Group By" helpId={`${STACKDRIVER_HELP_ID_PREFIX}.groupBy`}>
|
|
108
|
+
<List list={editingMetric.query.groupByFields || []} actionCreator={updateGroupBy} />
|
|
109
|
+
</FormRow>
|
|
110
|
+
<FormRow label="Aligner" helpId={`${STACKDRIVER_HELP_ID_PREFIX}.perSeriesAligner`} inputOnly={true}>
|
|
111
|
+
<DisableableReactSelect
|
|
112
|
+
value={get(editingMetric, 'query.perSeriesAligner')}
|
|
113
|
+
options={toReactSelectOptions(PER_SERIES_ALIGNERS)}
|
|
114
|
+
onChange={(option: Option<string>) => updateStackdriverQueryField('perSeriesAligner', option)}
|
|
115
|
+
disabledStateKeys={[DISABLE_EDIT_CONFIG]}
|
|
116
|
+
/>
|
|
117
|
+
</FormRow>
|
|
118
|
+
<FormRow label="Reducer" helpId={`${STACKDRIVER_HELP_ID_PREFIX}.crossSeriesReducer`} inputOnly={true}>
|
|
119
|
+
<DisableableReactSelect
|
|
120
|
+
value={get(editingMetric, 'query.crossSeriesReducer')}
|
|
121
|
+
options={toReactSelectOptions(CROSS_SERIES_REDUCERS)}
|
|
122
|
+
onChange={(option: Option<string>) => updateStackdriverQueryField('crossSeriesReducer', option)}
|
|
123
|
+
disabledStateKeys={[DISABLE_EDIT_CONFIG]}
|
|
124
|
+
/>
|
|
125
|
+
</FormRow>
|
|
126
|
+
</>
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function mapStateToProps(state: ICanaryState): IStackdriverMetricConfigurerStateProps {
|
|
131
|
+
return {
|
|
132
|
+
editingMetric: state.selectedConfig.editingMetric,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function mapDispatchToProps(dispatch: (action: Action & any) => void): IStackdriverMetricConfigurerDispatchProps {
|
|
137
|
+
return {
|
|
138
|
+
updateStackdriverQueryField: (field, option) =>
|
|
139
|
+
dispatch(Creators.updateStackdriverMetricResourceField({ field, value: option && option.value })),
|
|
140
|
+
updateGroupBy: (payload) => dispatch(Creators.updateStackdriverGroupBy(payload)),
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export default connect(mapStateToProps, mapDispatchToProps)(StackdriverMetricConfigurer);
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { mountWithState, mountWithStore } from 'enzyme-redux';
|
|
2
|
+
import * as Actions from 'kayenta/actions';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { connect } from 'react-redux';
|
|
5
|
+
import Select, { Option, ReactSelectProps } from 'react-select';
|
|
6
|
+
import { createMockStore } from 'redux-test-utils';
|
|
7
|
+
|
|
8
|
+
import { noop } from '@spinnaker/core';
|
|
9
|
+
|
|
10
|
+
import { mapDispatchToProps, StackdriverMetricTypeSelector } from './metricTypeSelector';
|
|
11
|
+
|
|
12
|
+
describe('<StackdriverMetricTypeSelector />', () => {
|
|
13
|
+
let Component: any;
|
|
14
|
+
let state: any;
|
|
15
|
+
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
state = {
|
|
18
|
+
descriptors: [
|
|
19
|
+
{
|
|
20
|
+
description: 'Delta count of disk read IO operations.',
|
|
21
|
+
metricKind: 'DELTA',
|
|
22
|
+
type: 'compute.googleapis.com/disk/read_ops_count',
|
|
23
|
+
name: 'projects/my-project/metricDescriptors/compute.googleapis.com/disk/read_ops_count',
|
|
24
|
+
unit: '1',
|
|
25
|
+
valueType: 'INT64',
|
|
26
|
+
displayName: 'Disk read operations',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
description: 'Delta count of throttled read operations',
|
|
30
|
+
metricKind: 'DELTA',
|
|
31
|
+
type: 'compute.googleapis.com/disk/throttled_read_ops_count',
|
|
32
|
+
name: 'projects/my-project/metricDescriptors/compute.googleapis.com/disk/throttled_read_ops_count',
|
|
33
|
+
unit: '1',
|
|
34
|
+
valueType: 'INT64',
|
|
35
|
+
displayName: 'Throttled read operations',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
loading: false,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
Component = connect(
|
|
42
|
+
(s, ownProps) => ({
|
|
43
|
+
...s,
|
|
44
|
+
...ownProps,
|
|
45
|
+
}),
|
|
46
|
+
mapDispatchToProps,
|
|
47
|
+
)(StackdriverMetricTypeSelector);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('builds options from input descriptors', () => {
|
|
51
|
+
const component = mountWithState(
|
|
52
|
+
<Component value="compute.googleapis.com/disk/read_ops_count" onChange={noop} />,
|
|
53
|
+
state,
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
const allProps: any = component.find(Select).first().props();
|
|
57
|
+
|
|
58
|
+
expect(allProps.options.map((o: Option) => o.value)).toEqual([
|
|
59
|
+
'compute.googleapis.com/disk/read_ops_count',
|
|
60
|
+
'compute.googleapis.com/disk/throttled_read_ops_count',
|
|
61
|
+
]);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it('queries for metric descriptors matching selected metric type on component mount', () => {
|
|
65
|
+
const store = createMockStore(state);
|
|
66
|
+
mountWithStore(<Component value="compute.googleapis.com/disk/read_ops_count" onChange={noop} />, store);
|
|
67
|
+
|
|
68
|
+
expect(
|
|
69
|
+
store.isActionDispatched({
|
|
70
|
+
type: Actions.UPDATE_STACKDRIVER_METRIC_DESCRIPTOR_FILTER,
|
|
71
|
+
payload: { filter: 'compute.googleapis.com/disk/read_ops_count' },
|
|
72
|
+
}),
|
|
73
|
+
).toEqual(true);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it('queries for metric descriptors on input change', () => {
|
|
77
|
+
const store = createMockStore(state);
|
|
78
|
+
const component = mountWithStore(
|
|
79
|
+
<Component value="compute.googleapis.com/disk/read_ops_count" onChange={noop} />,
|
|
80
|
+
store,
|
|
81
|
+
);
|
|
82
|
+
const allProps: ReactSelectProps = component.find(Select).props();
|
|
83
|
+
allProps.onInputChange('redis');
|
|
84
|
+
|
|
85
|
+
expect(
|
|
86
|
+
store.isActionDispatched({
|
|
87
|
+
type: Actions.UPDATE_STACKDRIVER_METRIC_DESCRIPTOR_FILTER,
|
|
88
|
+
payload: { filter: 'redis' },
|
|
89
|
+
}),
|
|
90
|
+
).toEqual(true);
|
|
91
|
+
});
|
|
92
|
+
});
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import * as Creators from 'kayenta/actions/creators';
|
|
2
|
+
import { DISABLE_EDIT_CONFIG, DisableableReactSelect } from 'kayenta/layout/disableable';
|
|
3
|
+
import { ICanaryState } from 'kayenta/reducers';
|
|
4
|
+
import { AsyncRequestState } from 'kayenta/reducers/asyncRequest';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { connect } from 'react-redux';
|
|
7
|
+
import { Option } from 'react-select';
|
|
8
|
+
import { Dispatch } from 'redux';
|
|
9
|
+
|
|
10
|
+
import { IStackdriverMetricDescriptor } from './domain/IStackdriverMetricDescriptor';
|
|
11
|
+
|
|
12
|
+
export interface IStackdriverMetricTypeSelectorDispatchProps {
|
|
13
|
+
load: (filter: string) => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface IStackdriverMetricTypeSelectorStateProps {
|
|
17
|
+
descriptors: IStackdriverMetricDescriptor[];
|
|
18
|
+
loading: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface IStackdriverMetricTypeSelectorOwnProps {
|
|
22
|
+
value: string;
|
|
23
|
+
onChange: (option: Option) => void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
type IStackdriverMetricTypeProps = IStackdriverMetricTypeSelectorDispatchProps &
|
|
27
|
+
IStackdriverMetricTypeSelectorStateProps &
|
|
28
|
+
IStackdriverMetricTypeSelectorOwnProps;
|
|
29
|
+
|
|
30
|
+
const MetricField = ({
|
|
31
|
+
descriptor,
|
|
32
|
+
field,
|
|
33
|
+
label,
|
|
34
|
+
}: {
|
|
35
|
+
descriptor: IStackdriverMetricDescriptor;
|
|
36
|
+
field: keyof IStackdriverMetricDescriptor;
|
|
37
|
+
label: string;
|
|
38
|
+
}) => {
|
|
39
|
+
if (!descriptor || !descriptor[field]) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
return (
|
|
43
|
+
<div>
|
|
44
|
+
<strong>{label}: </strong>
|
|
45
|
+
{descriptor[field]}
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export class StackdriverMetricTypeSelector extends React.Component<IStackdriverMetricTypeProps> {
|
|
51
|
+
public componentDidMount() {
|
|
52
|
+
this.props.load(this.props.value);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
public render() {
|
|
56
|
+
const { loading, load, descriptors, value, onChange } = this.props;
|
|
57
|
+
|
|
58
|
+
let options: Option[] = descriptors.map((d) => ({ label: d.type, value: d.type }));
|
|
59
|
+
if (value && options.every((o) => o.value !== value)) {
|
|
60
|
+
options = options.concat({ label: value, value });
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<DisableableReactSelect
|
|
65
|
+
isLoading={loading}
|
|
66
|
+
options={options}
|
|
67
|
+
onChange={onChange}
|
|
68
|
+
value={value}
|
|
69
|
+
optionRenderer={(option: Option<string>) => {
|
|
70
|
+
const descriptor = descriptors.find((d) => d.type === option.value);
|
|
71
|
+
if (!descriptor) {
|
|
72
|
+
return <span>{option.label}</span>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<>
|
|
77
|
+
<MetricField descriptor={descriptor} field="type" label="Metric" />
|
|
78
|
+
<MetricField descriptor={descriptor} field="description" label="Description" />
|
|
79
|
+
<MetricField descriptor={descriptor} field="unit" label="Unit" />
|
|
80
|
+
<MetricField descriptor={descriptor} field="metricKind" label="Kind" />
|
|
81
|
+
<MetricField descriptor={descriptor} field="valueType" label="Value type" />
|
|
82
|
+
</>
|
|
83
|
+
);
|
|
84
|
+
}}
|
|
85
|
+
placeholder={'Enter at least three characters to search.'}
|
|
86
|
+
onInputChange={(input) => {
|
|
87
|
+
load(input);
|
|
88
|
+
return input;
|
|
89
|
+
}}
|
|
90
|
+
disabledStateKeys={[DISABLE_EDIT_CONFIG]}
|
|
91
|
+
/>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export const mapStateToProps = (state: ICanaryState, ownProps: IStackdriverMetricTypeSelectorOwnProps) => {
|
|
97
|
+
const descriptors = state.data.metricsServiceMetadata.data as IStackdriverMetricDescriptor[];
|
|
98
|
+
return {
|
|
99
|
+
descriptors,
|
|
100
|
+
loading: state.data.metricsServiceMetadata.load === AsyncRequestState.Requesting,
|
|
101
|
+
...ownProps,
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export const mapDispatchToProps = (dispatch: Dispatch<ICanaryState>) => {
|
|
106
|
+
return {
|
|
107
|
+
load: (filter: string) => {
|
|
108
|
+
dispatch(Creators.updateStackdriverMetricDescriptorFilter({ filter }));
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export default connect(mapStateToProps, mapDispatchToProps)(StackdriverMetricTypeSelector);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as Creators from 'kayenta/actions/creators';
|
|
2
|
+
import * as Actions from 'kayenta/actions/index';
|
|
3
|
+
import { Action, Dispatch, Middleware, MiddlewareAPI } from 'redux';
|
|
4
|
+
|
|
5
|
+
import { ICanaryState } from '../reducers/index';
|
|
6
|
+
import { buildConfigCopy, buildNewConfig } from '../service/canaryConfig.service';
|
|
7
|
+
|
|
8
|
+
// TODO: replace the `any` generic passed to MiddlewareAPI with ICanaryState. The Redux typings here are wrong.
|
|
9
|
+
// Should be fixed in this PR: https://github.com/reactjs/redux/pull/2563
|
|
10
|
+
export const actionInterceptingMiddleware: Middleware = (store: MiddlewareAPI<any>) => (
|
|
11
|
+
next: Dispatch<ICanaryState>,
|
|
12
|
+
) => (action: Action & any) => {
|
|
13
|
+
switch (action.type) {
|
|
14
|
+
case Actions.CREATE_NEW_CONFIG: {
|
|
15
|
+
const newConfig = buildNewConfig(store.getState());
|
|
16
|
+
const newAction = Creators.selectConfig({ config: newConfig });
|
|
17
|
+
return next(newAction);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
case Actions.COPY_SELECTED_CONFIG: {
|
|
21
|
+
const copiedConfig = buildConfigCopy(store.getState());
|
|
22
|
+
const newAction = Creators.selectConfig({ config: copiedConfig });
|
|
23
|
+
return next(newAction);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
default:
|
|
27
|
+
return next(action);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Action, Dispatch, Middleware, MiddlewareAPI } from 'redux';
|
|
2
|
+
|
|
3
|
+
import { ICanaryState } from '../reducers/index';
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Middleware for scheduling actions from within reducers.
|
|
7
|
+
* Provides every action with an `asyncDispatch` method.
|
|
8
|
+
* Actions provided to `asyncDispatch` will run after all reducers have completed.
|
|
9
|
+
* TODO: type actions to include `asyncDispatch`.
|
|
10
|
+
* */
|
|
11
|
+
|
|
12
|
+
// TODO: replace the `any` generic passed to MiddlewareAPI with ICanaryState. The Redux typings here are wrong.
|
|
13
|
+
// Should be fixed in this PR: https://github.com/reactjs/redux/pull/2563
|
|
14
|
+
export const asyncDispatchMiddleware: Middleware = (store: MiddlewareAPI<any>) => (next: Dispatch<ICanaryState>) => (
|
|
15
|
+
action: Action & any,
|
|
16
|
+
) => {
|
|
17
|
+
let syncActivityFinished = false;
|
|
18
|
+
let actionQueue: Action[] = [];
|
|
19
|
+
|
|
20
|
+
const flushQueue = () => {
|
|
21
|
+
actionQueue.forEach((a) => store.dispatch(a));
|
|
22
|
+
actionQueue = [];
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const asyncDispatch = (a: Action & any) => {
|
|
26
|
+
actionQueue.push(a);
|
|
27
|
+
if (syncActivityFinished) {
|
|
28
|
+
flushQueue();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const nextAction = next({ ...action, asyncDispatch });
|
|
33
|
+
syncActivityFinished = true;
|
|
34
|
+
flushQueue();
|
|
35
|
+
|
|
36
|
+
return nextAction;
|
|
37
|
+
};
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import * as Actions from 'kayenta/actions';
|
|
2
|
+
import * as Creators from 'kayenta/actions/creators';
|
|
3
|
+
import { ICanaryConfigUpdateResponse, KayentaAccountType } from 'kayenta/domain';
|
|
4
|
+
import { ICanaryState } from 'kayenta/reducers';
|
|
5
|
+
import { runSelector } from 'kayenta/selectors';
|
|
6
|
+
import {
|
|
7
|
+
createCanaryConfig,
|
|
8
|
+
deleteCanaryConfig,
|
|
9
|
+
getCanaryConfigById,
|
|
10
|
+
listKayentaAccounts,
|
|
11
|
+
mapStateToConfig,
|
|
12
|
+
updateCanaryConfig,
|
|
13
|
+
} from 'kayenta/service/canaryConfig.service';
|
|
14
|
+
import { listMetricsServiceMetadata } from 'kayenta/service/metricsServiceMetadata.service';
|
|
15
|
+
import { Action, MiddlewareAPI } from 'redux';
|
|
16
|
+
import { combineEpics, createEpicMiddleware, EpicMiddleware } from 'redux-observable';
|
|
17
|
+
import { Observable } from 'rxjs/Observable';
|
|
18
|
+
import 'rxjs/add/observable/concat';
|
|
19
|
+
import 'rxjs/add/observable/forkJoin';
|
|
20
|
+
import 'rxjs/add/observable/fromPromise';
|
|
21
|
+
import 'rxjs/add/operator/catch';
|
|
22
|
+
import 'rxjs/add/operator/concatMap';
|
|
23
|
+
import 'rxjs/add/operator/debounceTime';
|
|
24
|
+
import 'rxjs/add/operator/filter';
|
|
25
|
+
import 'rxjs/add/operator/map';
|
|
26
|
+
import 'rxjs/add/operator/mapTo';
|
|
27
|
+
|
|
28
|
+
import { ReactInjector } from '@spinnaker/core';
|
|
29
|
+
|
|
30
|
+
import { getCanaryRun, getMetricSetPair } from '../service/canaryRun.service';
|
|
31
|
+
|
|
32
|
+
const typeMatches = (...actions: string[]) => (action: Action & any) => actions.includes(action.type);
|
|
33
|
+
|
|
34
|
+
const loadConfigEpic = (action$: Observable<Action & any>) =>
|
|
35
|
+
action$.filter(typeMatches(Actions.LOAD_CONFIG_REQUEST, Actions.SAVE_CONFIG_SUCCESS)).concatMap((action) =>
|
|
36
|
+
Observable.fromPromise(getCanaryConfigById(action.payload.id))
|
|
37
|
+
.map((config) => Creators.loadConfigSuccess({ config }))
|
|
38
|
+
.catch((error) => Observable.of(Creators.loadConfigFailure({ error }))),
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
const selectConfigEpic = (action$: Observable<Action & any>) =>
|
|
42
|
+
action$
|
|
43
|
+
.filter(typeMatches(Actions.LOAD_CONFIG_SUCCESS))
|
|
44
|
+
.map((action) => Creators.selectConfig({ config: action.payload.config }));
|
|
45
|
+
|
|
46
|
+
const saveConfigEpic = (action$: Observable<Action & any>, store: MiddlewareAPI<ICanaryState>) =>
|
|
47
|
+
action$.filter(typeMatches(Actions.SAVE_CONFIG_REQUEST)).concatMap(() => {
|
|
48
|
+
const config = mapStateToConfig(store.getState());
|
|
49
|
+
let saveAction: PromiseLike<ICanaryConfigUpdateResponse>;
|
|
50
|
+
if (config.isNew) {
|
|
51
|
+
delete config.isNew;
|
|
52
|
+
saveAction = createCanaryConfig(config);
|
|
53
|
+
} else {
|
|
54
|
+
saveAction = updateCanaryConfig(config);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return Observable.fromPromise(saveAction)
|
|
58
|
+
.concatMap(({ canaryConfigId }) =>
|
|
59
|
+
Observable.forkJoin(
|
|
60
|
+
ReactInjector.$state.go('^.configDetail', { id: canaryConfigId, copy: false, new: false }),
|
|
61
|
+
store.getState().data.application.getDataSource('canaryConfigs').refresh(true),
|
|
62
|
+
).mapTo(Creators.saveConfigSuccess({ id: canaryConfigId })),
|
|
63
|
+
)
|
|
64
|
+
.catch((error: Error) => Observable.of(Creators.saveConfigFailure({ error })));
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
const deleteConfigRequestEpic = (action$: Observable<Action & any>, store: MiddlewareAPI<ICanaryState>) =>
|
|
68
|
+
action$.filter(typeMatches(Actions.DELETE_CONFIG_REQUEST)).concatMap(() =>
|
|
69
|
+
Observable.fromPromise(deleteCanaryConfig(store.getState().selectedConfig.config.id))
|
|
70
|
+
.mapTo(Creators.deleteConfigSuccess())
|
|
71
|
+
.catch((error: Error) => Observable.of(Creators.deleteConfigFailure({ error }))),
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
const deleteConfigSuccessEpic = (action$: Observable<Action & any>, store: MiddlewareAPI<ICanaryState>) =>
|
|
75
|
+
action$
|
|
76
|
+
.filter(typeMatches(Actions.DELETE_CONFIG_SUCCESS))
|
|
77
|
+
.concatMap(() =>
|
|
78
|
+
Observable.forkJoin(
|
|
79
|
+
ReactInjector.$state.go('^.configDefault'),
|
|
80
|
+
// TODO: handle config summary load failure (in general, not just here).
|
|
81
|
+
store.getState().data.application.getDataSource('canaryConfigs').refresh(true),
|
|
82
|
+
),
|
|
83
|
+
)
|
|
84
|
+
.mapTo(Creators.closeDeleteConfigModal());
|
|
85
|
+
|
|
86
|
+
const loadCanaryRunRequestEpic = (action$: Observable<Action & any>) =>
|
|
87
|
+
action$.filter(typeMatches(Actions.LOAD_RUN_REQUEST)).concatMap((action) =>
|
|
88
|
+
Observable.fromPromise(getCanaryRun(action.payload.configId, action.payload.runId))
|
|
89
|
+
.map((run) => Creators.loadRunSuccess({ run }))
|
|
90
|
+
.catch((error: Error) => Observable.of(Creators.loadRunFailure({ error }))),
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
const loadMetricSetPairEpic = (action$: Observable<Action & any>, store: MiddlewareAPI<ICanaryState>) =>
|
|
94
|
+
action$.filter(typeMatches(Actions.LOAD_METRIC_SET_PAIR_REQUEST)).concatMap((action) => {
|
|
95
|
+
const run = runSelector(store.getState());
|
|
96
|
+
return Observable.fromPromise(getMetricSetPair(run.metricSetPairListId, action.payload.pairId))
|
|
97
|
+
.map((metricSetPair) => Creators.loadMetricSetPairSuccess({ metricSetPair }))
|
|
98
|
+
.catch((error: Error) => Observable.of(Creators.loadMetricSetPairFailure({ error })));
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
const updatePrometheusMetricDescriptionFilterEpic = (action$: Observable<Action & any>) =>
|
|
102
|
+
action$
|
|
103
|
+
.filter(typeMatches(Actions.UPDATE_PROMETHEUS_METRIC_DESCRIPTOR_FILTER))
|
|
104
|
+
.filter((action) => action.payload.filter && action.payload.filter.length > 2)
|
|
105
|
+
.debounceTime(200 /* milliseconds */)
|
|
106
|
+
.map((action) => {
|
|
107
|
+
return Creators.loadMetricsServiceMetadataRequest({
|
|
108
|
+
filter: action.payload.filter,
|
|
109
|
+
metricsAccountName: action.payload.metricsAccountName,
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
const updateStackdriverMetricDescriptionFilterEpic = (
|
|
114
|
+
action$: Observable<Action & any>,
|
|
115
|
+
store: MiddlewareAPI<ICanaryState>,
|
|
116
|
+
) =>
|
|
117
|
+
action$
|
|
118
|
+
.filter(typeMatches(Actions.UPDATE_STACKDRIVER_METRIC_DESCRIPTOR_FILTER))
|
|
119
|
+
.filter((action) => action.payload.filter && action.payload.filter.length > 2)
|
|
120
|
+
.debounceTime(200 /* milliseconds */)
|
|
121
|
+
.map((action) => {
|
|
122
|
+
const [metricsAccountName] = store
|
|
123
|
+
.getState()
|
|
124
|
+
.data.kayentaAccounts.data.filter(
|
|
125
|
+
(account) =>
|
|
126
|
+
account.supportedTypes.includes(KayentaAccountType.MetricsStore) &&
|
|
127
|
+
account.metricsStoreType === 'stackdriver',
|
|
128
|
+
)
|
|
129
|
+
.map((account) => account.name);
|
|
130
|
+
|
|
131
|
+
return Creators.loadMetricsServiceMetadataRequest({
|
|
132
|
+
filter: action.payload.filter,
|
|
133
|
+
metricsAccountName,
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
const updateGraphiteMetricDescriptionFilterEpic = (
|
|
138
|
+
action$: Observable<Action & any>,
|
|
139
|
+
store: MiddlewareAPI<ICanaryState>,
|
|
140
|
+
) =>
|
|
141
|
+
action$
|
|
142
|
+
.filter(typeMatches(Actions.UPDATE_GRAPHITE_METRIC_DESCRIPTOR_FILTER))
|
|
143
|
+
.filter((action) => action.payload.filter && action.payload.filter.length > 2)
|
|
144
|
+
.debounceTime(200 /* milliseconds */)
|
|
145
|
+
.map((action) => {
|
|
146
|
+
const [metricsAccountName] = store
|
|
147
|
+
.getState()
|
|
148
|
+
.data.kayentaAccounts.data.filter(
|
|
149
|
+
(account) => account.supportedTypes.includes(KayentaAccountType.MetricsStore) && account.type === 'graphite',
|
|
150
|
+
)
|
|
151
|
+
.map((account) => account.name);
|
|
152
|
+
|
|
153
|
+
return Creators.loadMetricsServiceMetadataRequest({
|
|
154
|
+
filter: action.payload.filter,
|
|
155
|
+
metricsAccountName,
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
const updateDatadogMetricDescriptionFilterEpic = (
|
|
160
|
+
action$: Observable<Action & any>,
|
|
161
|
+
store: MiddlewareAPI<ICanaryState>,
|
|
162
|
+
) =>
|
|
163
|
+
action$
|
|
164
|
+
.filter(typeMatches(Actions.UPDATE_DATADOG_METRIC_DESCRIPTOR_FILTER))
|
|
165
|
+
.filter((action) => action.payload.filter && action.payload.filter.length > 2)
|
|
166
|
+
.debounceTime(200 /* milliseconds */)
|
|
167
|
+
.map((action) => {
|
|
168
|
+
const [metricsAccountName] = store
|
|
169
|
+
.getState()
|
|
170
|
+
.data.kayentaAccounts.data.filter(
|
|
171
|
+
(account) => account.supportedTypes.includes(KayentaAccountType.MetricsStore) && account.type === 'datadog',
|
|
172
|
+
)
|
|
173
|
+
.map((account) => account.name);
|
|
174
|
+
|
|
175
|
+
return Creators.loadMetricsServiceMetadataRequest({
|
|
176
|
+
filter: action.payload.filter,
|
|
177
|
+
metricsAccountName,
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
const loadMetricsServiceMetadataEpic = (action$: Observable<Action & any>) =>
|
|
182
|
+
action$.filter(typeMatches(Actions.LOAD_METRICS_SERVICE_METADATA_REQUEST)).concatMap((action) => {
|
|
183
|
+
return Observable.fromPromise(listMetricsServiceMetadata(action.payload.filter, action.payload.metricsAccountName))
|
|
184
|
+
.map((data) => Creators.loadMetricsServiceMetadataSuccess({ data }))
|
|
185
|
+
.catch((error: Error) => Observable.of(Creators.loadMetricsServiceMetadataFailure({ error })));
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
const loadKayentaAccountsEpic = (action$: Observable<Action & any>) =>
|
|
189
|
+
action$.filter(typeMatches(Actions.LOAD_KAYENTA_ACCOUNTS_REQUEST, Actions.INITIALIZE)).concatMap(() =>
|
|
190
|
+
Observable.fromPromise(listKayentaAccounts())
|
|
191
|
+
.map((accounts) => Creators.loadKayentaAccountsSuccess({ accounts }))
|
|
192
|
+
.catch((error: Error) => Observable.of(Creators.loadKayentaAccountsFailure({ error }))),
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
const rootEpic = combineEpics(
|
|
196
|
+
loadConfigEpic,
|
|
197
|
+
selectConfigEpic,
|
|
198
|
+
saveConfigEpic,
|
|
199
|
+
deleteConfigRequestEpic,
|
|
200
|
+
deleteConfigSuccessEpic,
|
|
201
|
+
loadCanaryRunRequestEpic,
|
|
202
|
+
loadMetricSetPairEpic,
|
|
203
|
+
updateGraphiteMetricDescriptionFilterEpic,
|
|
204
|
+
updatePrometheusMetricDescriptionFilterEpic,
|
|
205
|
+
updateStackdriverMetricDescriptionFilterEpic,
|
|
206
|
+
updateDatadogMetricDescriptionFilterEpic,
|
|
207
|
+
loadMetricsServiceMetadataEpic,
|
|
208
|
+
loadKayentaAccountsEpic,
|
|
209
|
+
);
|
|
210
|
+
|
|
211
|
+
export const epicMiddleware: EpicMiddleware<Action & any, ICanaryState> = createEpicMiddleware(rootEpic);
|