@spinnaker/kayenta 2026.3.1 → 2026.4.0
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/dist/index.js +77 -1
- package/dist/index.js.map +1 -1
- package/dist/kayenta/actions/creators.d.ts +0 -30
- package/dist/kayenta/actions/index.d.ts +0 -8
- package/dist/kayenta/canary.d.ts +2 -2
- package/dist/kayenta/canary.help.d.ts +1 -1
- package/dist/kayenta/components/canaryScore.d.ts +1 -1
- package/dist/kayenta/components/canaryScores.d.ts +2 -2
- package/dist/kayenta/domain/ICanaryConfig.d.ts +1 -1
- package/dist/kayenta/domain/IMetricConfigMode.d.ts +9 -0
- package/dist/kayenta/domain/index.d.ts +1 -0
- package/dist/kayenta/edit/changeMetricGroupModal.d.ts +3 -3
- package/dist/kayenta/edit/configDetail.d.ts +2 -2
- package/dist/kayenta/edit/configDetailActionButtons.d.ts +2 -2
- package/dist/kayenta/edit/configDetailHeader.d.ts +3 -3
- package/dist/kayenta/edit/configDetailLoadStates.d.ts +3 -3
- package/dist/kayenta/edit/configDetailLoader.d.ts +8 -3
- package/dist/kayenta/edit/configJsonModal.d.ts +5 -5
- package/dist/kayenta/edit/configList.d.ts +3 -3
- package/dist/kayenta/edit/copyConfigButton.d.ts +3 -3
- package/dist/kayenta/edit/createConfigButton.d.ts +3 -3
- package/dist/kayenta/edit/deleteModal.d.ts +3 -3
- package/dist/kayenta/edit/edit.d.ts +2 -2
- package/dist/kayenta/edit/editMetricEffectSizes.d.ts +3 -5
- package/dist/kayenta/edit/editMetricModal.d.ts +5 -7
- package/dist/kayenta/edit/editMetricModal.stories.d.ts +12 -0
- package/dist/kayenta/edit/editMetricValidation.d.ts +5 -0
- package/dist/kayenta/edit/footer.d.ts +2 -2
- package/dist/kayenta/edit/groupName.d.ts +2 -3
- package/dist/kayenta/edit/groupTabs.d.ts +3 -3
- package/dist/kayenta/edit/groupWeight.d.ts +2 -3
- package/dist/kayenta/edit/groupWeights.d.ts +3 -3
- package/dist/kayenta/edit/judgeSelect.d.ts +3 -3
- package/dist/kayenta/edit/metricConfigModeToggle.d.ts +7 -0
- package/dist/kayenta/edit/metricConfigurerDelegator.d.ts +3 -3
- package/dist/kayenta/edit/metricList.d.ts +3 -3
- package/dist/kayenta/edit/metricQueryTemplateEditor.d.ts +17 -0
- package/dist/kayenta/edit/metricStoreSelector.d.ts +2 -3
- package/dist/kayenta/edit/nameAndDescription.d.ts +2 -3
- package/dist/kayenta/edit/openConfigJsonModalButton.d.ts +3 -3
- package/dist/kayenta/edit/openDeleteModalButton.d.ts +3 -3
- package/dist/kayenta/edit/ownedBy.d.ts +2 -2
- package/dist/kayenta/edit/save.d.ts +2 -2
- package/dist/kayenta/edit/saveConfigButton.d.ts +3 -3
- package/dist/kayenta/edit/saveConfigError.d.ts +3 -3
- package/dist/kayenta/edit/scoring.d.ts +3 -3
- package/dist/kayenta/edit/selectConfig.d.ts +2 -2
- package/dist/kayenta/edit/templateProviderVariables.d.ts +24 -0
- package/dist/kayenta/edit/useMetricConfigMode.d.ts +32 -0
- package/dist/kayenta/edit/validationErrors.d.ts +2 -3
- package/dist/kayenta/layout/addNewButton.d.ts +2 -2
- package/dist/kayenta/layout/centeredDetail.d.ts +2 -2
- package/dist/kayenta/layout/deleteButton.d.ts +2 -2
- package/dist/kayenta/layout/disableable.d.ts +7 -27
- package/dist/kayenta/layout/formList.d.ts +2 -2
- package/dist/kayenta/layout/formRow.d.ts +1 -1
- package/dist/kayenta/layout/formattedDate.d.ts +2 -2
- package/dist/kayenta/layout/keyValueList.d.ts +2 -2
- package/dist/kayenta/layout/list.d.ts +2 -2
- package/dist/kayenta/layout/listDetail.d.ts +2 -2
- package/dist/kayenta/layout/radioChoice.d.ts +3 -2
- package/dist/kayenta/layout/styleguide.d.ts +2 -2
- package/dist/kayenta/layout/table/nativeTable.d.ts +2 -2
- package/dist/kayenta/layout/table/nativeTableHeader.d.ts +2 -2
- package/dist/kayenta/layout/table/table.d.ts +2 -2
- package/dist/kayenta/layout/table/tableHeader.d.ts +2 -2
- package/dist/kayenta/layout/tabs.d.ts +2 -2
- package/dist/kayenta/layout/titledSection.d.ts +2 -2
- package/dist/kayenta/layout/titledSubsection.d.ts +2 -2
- package/dist/kayenta/manualAnalysis/ManualAnalysisModal.d.ts +1 -1
- package/dist/kayenta/metricStore/atlas/atlasMetricConfigurer.d.ts +4 -3
- package/dist/kayenta/metricStore/clickhouse/metricConfigurer.d.ts +4 -6
- package/dist/kayenta/metricStore/datadog/metricConfigurer.d.ts +5 -3
- package/dist/kayenta/metricStore/datadog/metricTypeSelector.d.ts +4 -6
- package/dist/kayenta/metricStore/graphite/metricConfigurer.d.ts +5 -3
- package/dist/kayenta/metricStore/graphite/metricTypeSelector.d.ts +4 -6
- package/dist/kayenta/metricStore/index.d.ts +2 -0
- package/dist/kayenta/metricStore/influxdb/index.d.ts +1 -0
- package/dist/kayenta/metricStore/influxdb/metricConfigurer.d.ts +10 -0
- package/dist/kayenta/metricStore/metricStoreConfig.service.d.ts +1 -1
- package/dist/kayenta/metricStore/newrelic/metricConfigurer.d.ts +5 -3
- package/dist/kayenta/metricStore/prometheus/domain/IPrometheusCanaryMetricSetQueryConfig.d.ts +0 -5
- package/dist/kayenta/metricStore/prometheus/metricConfigurer.d.ts +4 -6
- package/dist/kayenta/metricStore/prometheus/metricTypeSelector.d.ts +2 -4
- package/dist/kayenta/metricStore/signalfx/metricConfigurer.d.ts +8 -3
- package/dist/kayenta/metricStore/stackdriver/metricConfigurer.d.ts +4 -3
- package/dist/kayenta/metricStore/stackdriver/metricTypeSelector.d.ts +3 -5
- package/dist/kayenta/metricStore/wavefront/index.d.ts +1 -0
- package/dist/kayenta/metricStore/wavefront/metricConfigurer.d.ts +10 -0
- package/dist/kayenta/middleware/actionInterceptor.d.ts +2 -1
- package/dist/kayenta/middleware/asyncDispatch.d.ts +2 -1
- package/dist/kayenta/middleware/epics.d.ts +3 -2
- package/dist/kayenta/reducers/selectedConfig.d.ts +0 -2
- package/dist/kayenta/reducers/signalFxMetricConfig.d.ts +1 -1
- package/dist/kayenta/report/detail/allMetricResultsHeader.d.ts +2 -2
- package/dist/kayenta/report/detail/clickableHeader.d.ts +2 -2
- package/dist/kayenta/report/detail/detail.d.ts +3 -3
- package/dist/kayenta/report/detail/detailLoader.d.ts +8 -3
- package/dist/kayenta/report/detail/graph/graph.d.ts +2 -3
- package/dist/kayenta/report/detail/graph/semiotic/boxplot.d.ts +1 -1
- package/dist/kayenta/report/detail/graph/semiotic/chartHeader.d.ts +2 -2
- package/dist/kayenta/report/detail/graph/semiotic/chartLegend.d.ts +2 -2
- package/dist/kayenta/report/detail/graph/semiotic/circleIcon.d.ts +2 -2
- package/dist/kayenta/report/detail/graph/semiotic/customAxisTickLabel.d.ts +2 -2
- package/dist/kayenta/report/detail/graph/semiotic/differenceArea.d.ts +1 -1
- package/dist/kayenta/report/detail/graph/semiotic/histogram.d.ts +1 -1
- package/dist/kayenta/report/detail/graph/semiotic/noValidDataSign.d.ts +2 -2
- package/dist/kayenta/report/detail/graph/semiotic/secondaryTSXAxis.d.ts +1 -1
- package/dist/kayenta/report/detail/graph/semiotic/semioticGraph.d.ts +1 -1
- package/dist/kayenta/report/detail/graph/semiotic/timeSeries.d.ts +1 -1
- package/dist/kayenta/report/detail/graph/semiotic/tooltip.d.ts +1 -1
- package/dist/kayenta/report/detail/graphTypeSelector.d.ts +2 -3
- package/dist/kayenta/report/detail/groupScores.d.ts +2 -3
- package/dist/kayenta/report/detail/header.d.ts +2 -3
- package/dist/kayenta/report/detail/headerArrow.d.ts +2 -2
- package/dist/kayenta/report/detail/loadStates.d.ts +2 -3
- package/dist/kayenta/report/detail/metricResultActions.d.ts +2 -3
- package/dist/kayenta/report/detail/metricResultClassification.d.ts +2 -2
- package/dist/kayenta/report/detail/metricResultDetail.d.ts +2 -2
- package/dist/kayenta/report/detail/metricResultDetailLayout.d.ts +2 -2
- package/dist/kayenta/report/detail/metricResultDeviation.d.ts +2 -2
- package/dist/kayenta/report/detail/metricResultStats.d.ts +2 -3
- package/dist/kayenta/report/detail/metricResults.d.ts +2 -3
- package/dist/kayenta/report/detail/metricResultsClassificationFilters.d.ts +2 -3
- package/dist/kayenta/report/detail/metricResultsList.d.ts +2 -3
- package/dist/kayenta/report/detail/metricSetPairLoadStates.d.ts +5 -6
- package/dist/kayenta/report/detail/multipleResultsTable.d.ts +7 -16
- package/dist/kayenta/report/detail/reportException.d.ts +2 -3
- package/dist/kayenta/report/detail/reportExplanation.d.ts +2 -3
- package/dist/kayenta/report/detail/reportMetadata.d.ts +2 -3
- package/dist/kayenta/report/detail/reportScores.d.ts +2 -3
- package/dist/kayenta/report/detail/score.d.ts +2 -2
- package/dist/kayenta/report/detail/sourceLinks.d.ts +2 -3
- package/dist/kayenta/report/list/configLink.d.ts +3 -5
- package/dist/kayenta/report/list/loadStates.d.ts +2 -3
- package/dist/kayenta/report/list/pipelineLink.d.ts +2 -2
- package/dist/kayenta/report/list/reportLink.d.ts +2 -4
- package/dist/kayenta/report/list/table.d.ts +2 -3
- package/dist/kayenta/report/report.d.ts +2 -2
- package/dist/kayenta/selectors/filterTemplatesSelectors.d.ts +3 -18
- package/dist/kayenta/selectors/index.d.ts +0 -6
- package/dist/kayenta/stages/kayentaStage/AnalysisType.d.ts +4 -4
- package/dist/kayenta/stages/kayentaStage/CanaryExecutionLabel.d.ts +2 -2
- package/dist/kayenta/stages/kayentaStage/ForAnalysisType.d.ts +1 -1
- package/dist/kayenta/stages/kayentaStage/KayentaCanaryStageConfig.d.ts +2 -2
- package/dist/kayenta/stages/kayentaStage/KayentaStageConfigSection.d.ts +1 -1
- package/dist/kayenta/stages/kayentaStage/KayentaStageExecutionDetails.d.ts +3 -3
- package/dist/kayenta/stages/kayentaStage/canaryRunSummaries.d.ts +2 -2
- package/dist/kayenta/stages/kayentaStage/kayentaStage.d.ts +1 -1
- package/dist/lazy-BajpuB6R.js +80 -0
- package/dist/lazy-BajpuB6R.js.map +1 -0
- package/dist/semioticGraph-DZKeA54O.js +25 -0
- package/dist/semioticGraph-DZKeA54O.js.map +1 -0
- package/package.json +13 -13
- package/dist/index-CgBbcrGU.js +0 -4
- package/dist/index-CgBbcrGU.js.map +0 -1
- package/dist/kayenta/edit/filterTemplateSelector.d.ts +0 -32
- package/dist/kayenta/edit/filterTemplatesValidation.d.ts +0 -28
- package/dist/kayenta/edit/inlineTemplateEditor.d.ts +0 -14
- package/dist/kayenta/metricStore/clickhouse/domain/IClickhouseCanaryMetricSetQueryConfig.d.ts +0 -5
- package/dist/kayenta/metricStore/prometheus/queryTypeSelectors.d.ts +0 -9
- package/dist/kayenta/reducers/editingTemplate.d.ts +0 -7
- package/dist/lazy-ChZv0_Cn.js +0 -4
- package/dist/lazy-ChZv0_Cn.js.map +0 -1
- package/dist/semioticGraph-Ch95n-5Z.js +0 -2
- package/dist/semioticGraph-Ch95n-5Z.js.map +0 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { ICanaryExecutionStatusResult } from '../../domain/ICanaryExecutionStatusResult';
|
|
2
3
|
interface IReportMetadata {
|
|
3
4
|
run: ICanaryExecutionStatusResult;
|
|
4
5
|
}
|
|
5
|
-
declare const _default: import("react-redux").
|
|
6
|
-
WrappedComponent: import("react-redux").Component<IReportMetadata>;
|
|
7
|
-
};
|
|
6
|
+
declare const _default: import("react-redux").ConnectedComponent<({ run }: IReportMetadata) => React.JSX.Element, import("react-redux").Omit<IReportMetadata, "run">>;
|
|
8
7
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { ICanaryJudgeGroupScore, ICanaryJudgeScore, ICanaryScoreThresholds } from '../../domain';
|
|
2
3
|
import './reportScores.less';
|
|
3
4
|
interface IReportScoresStateProps {
|
|
@@ -13,7 +14,5 @@ interface IReportScoreParentProps {
|
|
|
13
14
|
isExpanded: boolean;
|
|
14
15
|
toggleHeader: () => void;
|
|
15
16
|
}
|
|
16
|
-
declare const _default: import("react-redux").
|
|
17
|
-
WrappedComponent: import("react-redux").Component<IReportScoresStateProps & IReportScoresDispatchProps & IReportScoreParentProps>;
|
|
18
|
-
};
|
|
17
|
+
declare const _default: import("react-redux").ConnectedComponent<({ groups, isExpanded, selectedGroup, clearSelectedGroup, score, scoreThresholds, toggleHeader, }: IReportScoresStateProps & IReportScoresDispatchProps & IReportScoreParentProps) => React.JSX.Element, import("react-redux").Omit<IReportScoresStateProps & IReportScoresDispatchProps & IReportScoreParentProps, "selectedGroup" | "groups" | "score" | "scoreThresholds" | "clearSelectedGroup">>;
|
|
19
18
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import type { ICanaryJudgeScore } from '../../domain/ICanaryJudgeResult';
|
|
3
3
|
export interface ICanaryJudgeScoreProps {
|
|
4
4
|
score: ICanaryJudgeScore;
|
|
5
5
|
showClassification?: boolean;
|
|
6
6
|
inverse?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare const _default: ({ score, showClassification, inverse }: ICanaryJudgeScoreProps) => JSX.Element;
|
|
8
|
+
declare const _default: ({ score, showClassification, inverse }: ICanaryJudgeScoreProps) => React.JSX.Element;
|
|
9
9
|
export default _default;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
interface ISourceJsonStateProps {
|
|
2
3
|
reportUrl: string;
|
|
3
4
|
metricListUrl: string;
|
|
4
5
|
}
|
|
5
|
-
declare const _default: import("react-redux").
|
|
6
|
-
WrappedComponent: import("react-redux").Component<ISourceJsonStateProps>;
|
|
7
|
-
};
|
|
6
|
+
declare const _default: import("react-redux").ConnectedComponent<({ reportUrl, metricListUrl }: ISourceJsonStateProps) => React.JSX.Element, import("react-redux").Omit<ISourceJsonStateProps, "reportUrl" | "metricListUrl">>;
|
|
8
7
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
interface IConfigLinkOwnProps {
|
|
3
3
|
configName: string;
|
|
4
4
|
executionId: string;
|
|
@@ -7,8 +7,6 @@ interface IConfigLinkOwnProps {
|
|
|
7
7
|
interface IConfigLinkStateProps {
|
|
8
8
|
configId: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const ConfigLink: ({ configId, configName }: IConfigLinkOwnProps & IConfigLinkStateProps) => JSX.Element;
|
|
11
|
-
declare const _default: import("react-redux").
|
|
12
|
-
WrappedComponent: import("react-redux").Component<IConfigLinkOwnProps & IConfigLinkStateProps>;
|
|
13
|
-
};
|
|
10
|
+
export declare const ConfigLink: ({ configId, configName }: IConfigLinkOwnProps & IConfigLinkStateProps) => React.JSX.Element;
|
|
11
|
+
declare const _default: import("react-redux").ConnectedComponent<({ configId, configName }: IConfigLinkOwnProps & IConfigLinkStateProps) => React.JSX.Element, import("react-redux").Omit<IConfigLinkOwnProps & IConfigLinkStateProps, "application" | "configId" | "configName" | "executionId"> & IConfigLinkOwnProps>;
|
|
14
12
|
export default _default;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { AsyncRequestState } from '../../reducers/asyncRequest';
|
|
2
3
|
interface IExecutionListLoadStatesStateProps {
|
|
3
4
|
loadState: AsyncRequestState;
|
|
4
5
|
}
|
|
5
|
-
declare const _default: import("react-redux").
|
|
6
|
-
WrappedComponent: import("react-redux").Component<IExecutionListLoadStatesStateProps>;
|
|
7
|
-
};
|
|
6
|
+
declare const _default: import("react-redux").ConnectedComponent<({ loadState }: IExecutionListLoadStatesStateProps) => React.JSX.Element, import("react-redux").Omit<IExecutionListLoadStatesStateProps, "loadState">>;
|
|
8
7
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
interface IParentPipelineLinkProps {
|
|
3
3
|
parentPipelineExecutionId: string;
|
|
4
4
|
application: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const PipelineLink: ({ parentPipelineExecutionId, application }: IParentPipelineLinkProps) => JSX.Element;
|
|
6
|
+
export declare const PipelineLink: ({ parentPipelineExecutionId, application }: IParentPipelineLinkProps) => React.JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -8,8 +8,6 @@ interface IReportLinkOwnProps {
|
|
|
8
8
|
interface IReportLinkStateProps {
|
|
9
9
|
configId: string;
|
|
10
10
|
}
|
|
11
|
-
export declare const ReportLink: ({ configId, executionId, children }: IReportLinkOwnProps & IReportLinkStateProps) => JSX.Element;
|
|
12
|
-
declare const _default: import("react-redux").
|
|
13
|
-
WrappedComponent: import("react-redux").Component<IReportLinkOwnProps & IReportLinkStateProps>;
|
|
14
|
-
};
|
|
11
|
+
export declare const ReportLink: ({ configId, executionId, children }: IReportLinkOwnProps & IReportLinkStateProps) => React.JSX.Element;
|
|
12
|
+
declare const _default: import("react-redux").ConnectedComponent<({ configId, executionId, children }: IReportLinkOwnProps & IReportLinkStateProps) => React.JSX.Element, import("react-redux").Omit<IReportLinkOwnProps & IReportLinkStateProps, "children" | "application" | "configId" | "configName" | "executionId"> & IReportLinkOwnProps>;
|
|
15
13
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { Application } from '@spinnaker/core';
|
|
2
3
|
import type { ICanaryExecutionStatusResult, IKayentaAccount } from '../../domain';
|
|
3
4
|
import './executionList.less';
|
|
@@ -7,7 +8,5 @@ interface IExecutionListTableStateProps {
|
|
|
7
8
|
accounts: IKayentaAccount[];
|
|
8
9
|
executionsCount: number;
|
|
9
10
|
}
|
|
10
|
-
declare const _default: import("react-redux").
|
|
11
|
-
WrappedComponent: import("react-redux").Component<IExecutionListTableStateProps>;
|
|
12
|
-
};
|
|
11
|
+
declare const _default: import("react-redux").ConnectedComponent<({ executions, application, accounts, executionsCount }: IExecutionListTableStateProps) => React.JSX.Element, import("react-redux").Omit<IExecutionListTableStateProps, "application" | "executionsCount" | "executions" | "accounts">>;
|
|
13
12
|
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const _default: () => JSX.Element;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: () => React.JSX.Element;
|
|
3
3
|
export default _default;
|
|
@@ -1,20 +1,5 @@
|
|
|
1
1
|
import type { ICanaryState } from '../reducers';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export declare const queryTypeToTransformFunctions: {
|
|
7
|
-
[queryType: string]: ITemplateTransformFunctions;
|
|
8
|
-
};
|
|
9
|
-
export declare const queryTypeSelector: import("reselect").OutputSelector<ICanaryState, any, (res: import("..").ICanaryMetricConfig<any>) => any>;
|
|
10
|
-
export declare const transformInlineTemplateForDisplay: import("reselect").OutputSelector<ICanaryState, any, (res: any) => any>;
|
|
11
|
-
export declare const transformInlineTemplateForSave: import("reselect").OutputSelector<ICanaryState, any, (res: any) => any>;
|
|
12
|
-
export declare const selectedTemplateNameSelector: (state: ICanaryState) => string;
|
|
13
|
-
export declare const inlineTemplateValueSelector: import("reselect").OutputSelector<ICanaryState, string, (res1: any, res2: any) => string>;
|
|
14
|
-
export declare const editingTemplateValidationSelector: import("reselect").OutputSelector<ICanaryState, import("../edit/filterTemplatesValidation").ICanaryFilterTemplateValidationMessages, (res1: import("../reducers/editingTemplate").IEditingTemplateState, res2: {
|
|
15
|
-
[key: string]: string;
|
|
16
|
-
}, res3: import("..").ICanaryMetricConfig<any>[], res4: import("..").ICanaryMetricConfig<any>) => import("../edit/filterTemplatesValidation").ICanaryFilterTemplateValidationMessages>;
|
|
17
|
-
export declare const isFilterTemplateValidSelector: import("reselect").OutputSelector<ICanaryState, boolean, (res: import("../edit/filterTemplatesValidation").ICanaryFilterTemplateValidationMessages) => boolean>;
|
|
2
|
+
export declare const inlineTemplateValueSelector: (state: ICanaryState) => string;
|
|
3
|
+
export declare const transformInlineTemplateForDisplay: (_state: ICanaryState) => (template: string) => string;
|
|
4
|
+
export declare const transformInlineTemplateForSave: (_state: ICanaryState) => (template: string) => string;
|
|
18
5
|
export declare const isInlineTemplateValidSelector: import("reselect").OutputSelector<ICanaryState, boolean, (res: string) => boolean>;
|
|
19
|
-
export declare const useInlineTemplateEditorSelector: import("reselect").OutputSelector<ICanaryState, boolean, (res: any) => boolean>;
|
|
20
|
-
export declare const isTemplateValidSelector: import("reselect").OutputSelector<ICanaryState, boolean, (res1: boolean, res2: boolean, res3: boolean) => boolean>;
|
|
@@ -12,12 +12,6 @@ export declare const selectedMetricResultIdSelector: (state: ICanaryState) => st
|
|
|
12
12
|
export declare const selectedMetricResultSelector: import("reselect").OutputSelector<ICanaryState, import("../domain/ICanaryJudgeResult").ICanaryAnalysisResult, (res1: string, res2: import("../domain/ICanaryJudgeResult").ICanaryAnalysisResult[]) => import("../domain/ICanaryJudgeResult").ICanaryAnalysisResult>;
|
|
13
13
|
export declare const selectedMetricConfigSelector: import("reselect").OutputSelector<ICanaryState, ICanaryMetricConfig<any>, (res1: import("../domain/ICanaryJudgeResult").ICanaryAnalysisResult, res2: ICanaryConfig) => ICanaryMetricConfig<any>>;
|
|
14
14
|
export declare const selectedConfigSelector: (state: ICanaryState) => ICanaryConfig;
|
|
15
|
-
export declare const configTemplatesSelector: import("reselect").OutputSelector<ICanaryState, {
|
|
16
|
-
[key: string]: string;
|
|
17
|
-
}, (res: ICanaryConfig) => {
|
|
18
|
-
[key: string]: string;
|
|
19
|
-
}>;
|
|
20
|
-
export declare const editingTemplateSelector: (state: ICanaryState) => import("../reducers/editingTemplate").IEditingTemplateState;
|
|
21
15
|
export declare const resolveConfigIdFromExecutionId: (state: ICanaryState, executionId: string) => string;
|
|
22
16
|
export declare const editingMetricSelector: (state: ICanaryState) => ICanaryMetricConfig;
|
|
23
17
|
export declare const metricListSelector: (state: ICanaryState) => ICanaryMetricConfig[];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { KayentaAnalysisType } from '../../domain';
|
|
3
3
|
export interface IAnalysisTypeProps {
|
|
4
4
|
analysisTypes: KayentaAnalysisType[];
|
|
5
5
|
selectedType: KayentaAnalysisType;
|
|
6
6
|
onChange?: (type: KayentaAnalysisType) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare const AnalysisTypeWarning: () => JSX.Element;
|
|
8
|
+
export declare const AnalysisTypeWarning: () => React.JSX.Element;
|
|
9
9
|
export declare const AnalysisTypeRadioButton: ({ selectedType, analysisTypes, onChange, label, type, }: IAnalysisTypeProps & {
|
|
10
10
|
label: string;
|
|
11
11
|
type: KayentaAnalysisType;
|
|
12
|
-
}) => JSX.Element;
|
|
13
|
-
export declare const AnalysisType: (props: IAnalysisTypeProps) => JSX.Element;
|
|
12
|
+
}) => React.JSX.Element;
|
|
13
|
+
export declare const AnalysisType: (props: IAnalysisTypeProps) => React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import type { IExecutionStageSummary } from '@spinnaker/core';
|
|
3
3
|
export interface ICanaryExecutionLabelProps {
|
|
4
4
|
stage: IExecutionStageSummary;
|
|
5
5
|
}
|
|
6
|
-
export declare const CanaryExecutionLabel: ({ stage }: ICanaryExecutionLabelProps) => JSX.Element;
|
|
6
|
+
export declare const CanaryExecutionLabel: ({ stage }: ICanaryExecutionLabelProps) => React.JSX.Element;
|
|
@@ -5,4 +5,4 @@ export interface IForAnalysisTypeProps {
|
|
|
5
5
|
types: string;
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
}
|
|
8
|
-
export declare function ForAnalysisType({ stage, types, children }: IForAnalysisTypeProps): JSX.Element;
|
|
8
|
+
export declare function ForAnalysisType({ stage, types, children }: IForAnalysisTypeProps): React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { IStageConfigProps } from '@spinnaker/core';
|
|
3
3
|
import './kayentaStage.less';
|
|
4
|
-
export declare function KayentaCanaryStageConfig({ application, stage, updateStage }: IStageConfigProps): JSX.Element;
|
|
4
|
+
export declare function KayentaCanaryStageConfig({ application, stage, updateStage }: IStageConfigProps): React.JSX.Element;
|
|
@@ -4,4 +4,4 @@ export interface IKayentaStageConfigSectionProps {
|
|
|
4
4
|
header?: React.ReactNode;
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
}
|
|
7
|
-
export declare function KayentaStageConfigSection({ title, header, children }: IKayentaStageConfigSectionProps): JSX.Element;
|
|
7
|
+
export declare function KayentaStageConfigSection({ title, header, children }: IKayentaStageConfigSectionProps): React.JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { IExecutionDetailsSectionProps } from '@spinnaker/core';
|
|
3
3
|
import './kayentaStageExecutionDetails.less';
|
|
4
|
-
export declare function KayentaStageExecutionDetails(props: IExecutionDetailsSectionProps): JSX.Element;
|
|
4
|
+
export declare function KayentaStageExecutionDetails(props: IExecutionDetailsSectionProps): React.JSX.Element;
|
|
5
5
|
export declare namespace KayentaStageExecutionDetails {
|
|
6
6
|
var title: string;
|
|
7
7
|
}
|
|
8
|
-
export declare function KayentaStageExecutionConfigDetails(props: IExecutionDetailsSectionProps): JSX.Element;
|
|
8
|
+
export declare function KayentaStageExecutionConfigDetails(props: IExecutionDetailsSectionProps): React.JSX.Element;
|
|
9
9
|
export declare namespace KayentaStageExecutionConfigDetails {
|
|
10
10
|
var title: string;
|
|
11
11
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import type { IStage } from '@spinnaker/core';
|
|
3
3
|
import './canaryRunSummaries.less';
|
|
4
4
|
export interface ICanarySummariesProps {
|
|
@@ -10,4 +10,4 @@ export interface ICanaryRunColumn {
|
|
|
10
10
|
width: number;
|
|
11
11
|
getContent: (run: IStage, firstScopeName?: string) => JSX.Element;
|
|
12
12
|
}
|
|
13
|
-
export default function CanaryRunSummaries({ canaryRuns, firstScopeName }: ICanarySummariesProps): JSX.Element;
|
|
13
|
+
export default function CanaryRunSummaries({ canaryRuns, firstScopeName }: ICanarySummariesProps): React.JSX.Element;
|
|
@@ -19,7 +19,7 @@ export declare const kayentaCanaryStage: {
|
|
|
19
19
|
description: string;
|
|
20
20
|
key: string;
|
|
21
21
|
component: typeof KayentaCanaryStageConfig;
|
|
22
|
-
executionLabelComponent: ({ stage }: import("./CanaryExecutionLabel").ICanaryExecutionLabelProps) => JSX.Element;
|
|
22
|
+
executionLabelComponent: ({ stage }: import("./CanaryExecutionLabel").ICanaryExecutionLabelProps) => import("react").JSX.Element;
|
|
23
23
|
executionDetailsSections: (typeof KayentaStageExecutionDetails | typeof ExecutionDetailsTasks)[];
|
|
24
24
|
validators: ({
|
|
25
25
|
type: string;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import{UIView as e,UISref as t,useSref as a,useRouter as n}from"@uirouter/react";import*as l from"react";import{Suspense as r}from"react";import{Provider as c,connect as i}from"react-redux";import{createStore as s,applyMiddleware as o}from"redux";import{logger as m}from"redux-logger";import{COPY_SELECTED_CONFIG as u,g as d,a6 as p,CREATE_NEW_CONFIG as g,h as E,y as f,I as h,F as y,Z as b,o as v,af as N,a5 as C,a4 as S,q as w,t as x,s as k,m as T,z as I,Y as M,W as A,runSelector as R,B as D,Q as L,P as z,KayentaAccountType as $,U as F,V as G,T as q,E as O,O as P,M as j,SAVE_CONFIG_SUCCESS as _,LOAD_CONFIG_REQUEST as K,LOAD_CONFIG_SUCCESS as B,SAVE_CONFIG_REQUEST as W,DELETE_CONFIG_REQUEST as H,DELETE_CONFIG_SUCCESS as Y,LOAD_RUN_REQUEST as U,LOAD_METRIC_SET_PAIR_REQUEST as V,UPDATE_PROMETHEUS_METRIC_DESCRIPTOR_FILTER as J,UPDATE_STACKDRIVER_METRIC_DESCRIPTOR_FILTER as Z,UPDATE_GRAPHITE_METRIC_DESCRIPTOR_FILTER as Q,UPDATE_DATADOG_METRIC_DESCRIPTOR_FILTER as X,LOAD_METRICS_SERVICE_METADATA_REQUEST as ee,INITIALIZE as te,LOAD_KAYENTA_ACCOUNTS_REQUEST as ae,S as ne,rootReducer as le,b as re,ad as ce,ai as ie,al as se,D as oe,K as me,L as ue,A as de,$ as pe,c as ge,r as Ee,a0 as fe,DisableableButton as he,DISABLE_EDIT_CONFIG as ye,aj as be,FormRow as ve,R as Ne,DisableableInput as Ce,metricStoreConfigStore as Se,editingMetricValidationErrorsSelector as we,an as xe,am as ke,ar as Te,aq as Ie,ao as Me,x as Ae,w as Re,ap as De,a2 as Le,DisableableSelect as ze,j as $e,k as Fe,i as Ge,a1 as qe,v as Oe,f as Pe,N as je,a8 as _e,ag as Ke,ah as Be,DisableableTextarea as We,ak as He,e as Ye,J as Ue,d as Ve,n as Je,p as Ze,H as Qe,a3 as Xe,u as et,serializedCanaryConfigSelector as tt,C as at,ScoreClassificationLabel as nt,judgeResultSelector as lt,metricResultsSelector as rt,_ as ct,a7 as it,G as st,selectedMetricConfigSelector as ot,ae as mt,MetricClassificationLabel as ut,selectedMetricResultIdSelector as dt,a9 as pt,canaryExecutionRequestSelector as gt,serializedGroupWeightsSelector as Et,aa as ft,X as ht,resolveConfigIdFromExecutionId as yt,ac as bt,a as vt,CANARY_EXECUTION_NO_PIPELINE_STATUS as Nt,l as Ct,ab as St}from"./index.js";import{createEpicMiddleware as wt,combineEpics as xt}from"redux-observable";import{from as kt,of as Tt,forkJoin as It}from"rxjs";import{filter as Mt,concatMap as At,map as Rt,catchError as Dt,mapTo as Lt,debounceTime as zt}from"rxjs/operators";import{REST as $t,Spinner as Ft,timestamp as Gt,HelpField as qt,robotToHuman as Ot,noop as Pt,Tooltip as jt,UUIDGenerator as _t,SubmitButton as Kt,HoverablePopover as Bt,SETTINGS as Wt,CopyToClipboard as Ht,BreakString as Yt,ReactModal as Ut,ModalClose as Vt,TetheredSelect as Jt,MapEditor as Zt,relativeTime as Qt}from"@spinnaker/core";import{UIRouter as Xt}from"@uirouter/core";import{get as ea,values as ta,isNull as aa,cloneDeep as na,chain as la,isNumber as ra,uniq as ca,flatMap as ia,sortBy as sa,round as oa,isEqual as ma}from"lodash";import ua from"classnames";import{Modal as da}from"react-bootstrap";import{Formik as pa,Form as ga,Field as Ea}from"formik";const fa=({columns:e,className:t})=>/* @__PURE__ */l.createElement("div",{className:ua("horizontal",t)},e.map((e,t)=>/* @__PURE__ */l.createElement("div",{key:e.label||t,className:`flex-${e.width}`},!e.hide&&/* @__PURE__ */l.createElement("h6",{className:ua("heading-6","uppercase","color-text-primary",e.labelClassName)},e.label))));function ha({rows:e,columns:t,rowKey:a,tableBodyClassName:n,rowClassName:r,onRowClick:c,customRow:i,className:s,headerClassName:o}){const m=({row:e})=>/* @__PURE__ */l.createElement("li",{onClick:c?()=>c(e):null,className:ua({horizontal:!r,"table-row":!r},r&&r(e))},t.map((t,a)=>/* @__PURE__ */l.createElement("div",{key:t.label||a,className:`flex-${t.width}`},!t.hide&&t.getContent(e))));/* @__PURE__ */
|
|
2
|
+
return l.createElement("div",{className:s},/* @__PURE__ */l.createElement("ul",{className:ua(n,"list-group")},/* @__PURE__ */l.createElement(fa,{columns:t,className:ua("table-header","sticky-header",o)}),e.map(e=>i&&i(e)?/* @__PURE__ */l.createElement("div",{key:a(e)},i(e)):/* @__PURE__ */l.createElement(m,{key:a(e),row:e}))))}const ya=e=>t=>a=>{switch(a.type){case g:{const a=E(e.getState()),n=p({config:a});return t(n)}case u:{const a=d(e.getState()),n=p({config:a});return t(n)}default:return t(a)}},ba=e=>t=>a=>{let n=!1,l=[];const r=()=>{l.forEach(t=>e.dispatch(t)),l=[]},c=t({...a,asyncDispatch:e=>{l.push(e),n&&r()}});return n=!0,r(),c},va=(...e)=>t=>e.includes(t.type),Na=e=>e.pipe(Mt(va(K,_)),At(e=>kt(f(e.payload.id)).pipe(Rt(e=>h({config:e})),Dt(e=>Tt(y({error:e})))))),Ca=e=>e.pipe(Mt(va(B)),Rt(e=>p({config:e.payload.config}))),Sa=(e,t)=>e.pipe(Mt(va(H)),At(()=>kt(w(t.value.selectedConfig.config.id)).pipe(Lt(x()),Dt(e=>Tt(k({error:e})))))),wa=e=>e.pipe(Mt(va(U)),At(e=>kt(I(e.payload.configId,e.payload.runId)).pipe(Rt(e=>M({run:e})),Dt(e=>Tt(A({error:e})))))),xa=(e,t)=>e.pipe(Mt(va(V)),At(e=>{const a=R(t.value);return kt(D(a.metricSetPairListId,e.payload.pairId)).pipe(Rt(e=>L({metricSetPair:e})),Dt(e=>Tt(z({error:e}))))})),ka=e=>e.pipe(Mt(va(J)),Mt(e=>e.payload.filter&&e.payload.filter.length>2),zt(200),Rt(e=>F({filter:e.payload.filter,metricsAccountName:e.payload.metricsAccountName}))),Ta=(e,t)=>e.pipe(Mt(va(Z)),Mt(e=>e.payload.filter&&e.payload.filter.length>2),zt(200),Rt(e=>{const[a]=t.value.data.kayentaAccounts.data.filter(e=>e.supportedTypes.includes($.MetricsStore)&&"stackdriver"===e.metricsStoreType).map(e=>e.name);return F({filter:e.payload.filter,metricsAccountName:a})})),Ia=(e,t)=>e.pipe(Mt(va(Q)),Mt(e=>e.payload.filter&&e.payload.filter.length>2),zt(200),Rt(e=>{const[a]=t.value.data.kayentaAccounts.data.filter(e=>e.supportedTypes.includes($.MetricsStore)&&"graphite"===e.type).map(e=>e.name);return F({filter:e.payload.filter,metricsAccountName:a})})),Ma=(e,t)=>e.pipe(Mt(va(X)),Mt(e=>e.payload.filter&&e.payload.filter.length>2),zt(200),Rt(e=>{const[a]=t.value.data.kayentaAccounts.data.filter(e=>e.supportedTypes.includes($.MetricsStore)&&"datadog"===e.type).map(e=>e.name);return F({filter:e.payload.filter,metricsAccountName:a})})),Aa=e=>e.pipe(Mt(va(ee)),At(e=>{return kt((t=e.payload.filter,a=e.payload.metricsAccountName,Promise.resolve($t("/v2/canaries/metadata/metricsService").query({filter:t,metricsAccountName:a}).get()))).pipe(Rt(e=>G({data:e})),Dt(e=>Tt(q({error:e}))));var t,a})),Ra=e=>e.pipe(Mt(va(ae,te)),At(()=>kt(O()).pipe(Rt(e=>P({accounts:e})),Dt(e=>Tt(j({error:e})))))),Da=e=>xt(Na,Ca,(e=>(t,a)=>t.pipe(Mt(va(W)),At(()=>{const t=b(a.value);let n;return t.isNew?(delete t.isNew,n=v(t)):n=N(t),kt(n).pipe(At(({canaryConfigId:t})=>It(e.stateService.go("^.configDetail",{id:t,copy:!1,new:!1}),a.value.data.application.getDataSource("canaryConfigs").refresh(!0)).pipe(Lt(C({id:t})))),Dt(e=>Tt(S({error:e}))))})))(e),Sa,(e=>(t,a)=>t.pipe(Mt(va(Y)),At(()=>It(e.stateService.go("^.configDefault"),a.value.data.application.getDataSource("canaryConfigs").refresh(!0))),Lt(T())))(e),wa,xa,Ia,ka,Ta,Ma,Aa,Ra);let La;class za extends l.Component{constructor(e){super(e),this.store=La,this.initializeAppState(e.app)}componentWillReceiveProps(e){this.props.app.name!==e.app.name&&this.initializeAppState(e.app)}initializeAppState(e){this.store.dispatch({type:te,state:{data:{application:e,configSummaries:e.getDataSource("canaryConfigs").data,judges:e.getDataSource("canaryJudges").data}}})}render(){/* @__PURE__ */
|
|
3
|
+
return l.createElement(ne,{className:"kayenta-root vertical"},/* @__PURE__ */l.createElement(c,{store:this.store},/* @__PURE__ */l.createElement("div",{className:"vertical flex-1"},/* @__PURE__ */l.createElement(e,{wrap:!1,name:"canary"}))))}}class $a{onRequesting(e){return this.requesting=e,this}onFulfilled(e){return this.fulfilled=e,this}onFailed(e){return this.failed=e,this}build(){return({state:e})=>{switch(e){case de.Requesting:return this.requesting||/* @__PURE__ */l.createElement("div",{className:"horizontal center middle spinner-container"},/* @__PURE__ */l.createElement(Ft,null));case de.Fulfilled:return this.fulfilled;case de.Failed:return this.failed}}}}const Fa=i(function(e){return{disabled:ea(e.selectedConfig,"config.isNew")||e.app.disableConfigEdit||re.disableConfigEdit}})(function({disabled:e}){/* @__PURE__ */
|
|
4
|
+
return l.createElement(t,{to:"^.configDetail",params:{copy:!0}},/* @__PURE__ */l.createElement("button",{className:"passive",disabled:e},/* @__PURE__ */l.createElement("i",{className:"fa fa-copy"}),/* @__PURE__ */l.createElement("span",null,"Copy")))});const Ga=i(null,function(e){return{openConfigJsonModal:()=>e(pe())}})(function({openConfigJsonModal:e}){/* @__PURE__ */
|
|
5
|
+
return l.createElement("div",null,/* @__PURE__ */l.createElement("button",{className:"passive",onClick:e},/* @__PURE__ */l.createElement("i",{className:"far fa-file-code"}),/* @__PURE__ */l.createElement("span",null,"JSON")),/* @__PURE__ */l.createElement(ge,null))});const qa=i(function(e){return{show:e.app.deleteConfigModalOpen,selectedConfigName:e.selectedConfig.config?e.selectedConfig.config.name:null,deleteConfigState:e.selectedConfig.destroy.state,deleteConfigErrorMessage:e.selectedConfig.destroy.error}},function(e){return{closeDeleteConfigModal:()=>e(T()),deleteConfig:()=>e(Ee())}})(function({show:e,selectedConfigName:t,deleteConfigState:a,deleteConfigErrorMessage:n,closeDeleteConfigModal:r,deleteConfig:c}){/* @__PURE__ */
|
|
6
|
+
return l.createElement(da,{show:e,onHide:null},/* @__PURE__ */l.createElement(ne,null,/* @__PURE__ */l.createElement(da.Header,null,/* @__PURE__ */l.createElement(da.Title,null,"Really delete ",t,"?")),a===de.Failed&&/* @__PURE__ */l.createElement(da.Body,null,/* @__PURE__ */l.createElement("span",{className:ua("alert","alert-danger")},function(e){const t="The was an error deleting your config";return e?t+`: ${e}.`:t+"."}(n))),/* @__PURE__ */l.createElement(da.Footer,null,/* @__PURE__ */l.createElement("ul",{className:"list-inline pull-right"},/* @__PURE__ */l.createElement("li",null,/* @__PURE__ */l.createElement("button",{className:"passive",onClick:r},"Cancel")),/* @__PURE__ */l.createElement("li",null,/* @__PURE__ */l.createElement("button",{className:"primary",onClick:c},"Delete"))))))});const Oa=i(function(e){return{disabled:e.selectedConfig.config&&e.selectedConfig.config.isNew||re.disableConfigEdit}},function(e){return{openDeleteConfigModal:()=>e(fe())}})(function({openDeleteConfigModal:e,disabled:t}){/* @__PURE__ */
|
|
7
|
+
return l.createElement("div",null,/* @__PURE__ */l.createElement(he,{className:"passive",disabled:t||re.disableConfigEdit,onClick:e,disabledStateKeys:[ye]},
|
|
8
|
+
/* @__PURE__ */l.createElement("i",{className:"fa fa-trash"}),
|
|
9
|
+
/* @__PURE__ */l.createElement("span",null,"Delete")),/* @__PURE__ */l.createElement(qa,null))});function Pa(){/* @__PURE__ */
|
|
10
|
+
return l.createElement("ul",{className:"list-inline pull-right"},/* @__PURE__ */l.createElement("li",null,/* @__PURE__ */l.createElement(Ga,null)),/* @__PURE__ */l.createElement("li",null,/* @__PURE__ */l.createElement(Fa,null)),/* @__PURE__ */l.createElement("li",null,/* @__PURE__ */l.createElement(Oa,null)))}function ja({dateIso:e}){return e?/* @__PURE__ */l.createElement("span",null,Gt(new Date(e).getTime())):/* @__PURE__ */l.createElement("span",null,"N/A")}const _a=({owners:e})=>/* @__PURE__ */l.createElement("div",{className:"horizontal middle well-compact alert alert-warning config-detail-edit-warning"},/* @__PURE__ */l.createElement("i",{className:"fa fa-exclamation-triangle sp-margin-m-right"}),/* @__PURE__ */l.createElement("span",null,/* @__PURE__ */l.createElement("b",null,"Editing is disabled because this config is owned by"," ",e.length>1?`${e.length} other applications`:"another application",".")," ","To edit, view in ",(e=>{if(1===e.length)/* @__PURE__ */
|
|
11
|
+
return l.createElement(t,{to:".",params:{application:e[0]}},/* @__PURE__ */l.createElement("a",null,e[0]));{const a=e.length-1;return e.map((n,r)=>/* @__PURE__ */l.createElement(l.Fragment,{key:n},r===a?"or ":"",/* @__PURE__ */l.createElement(t,{to:".",params:{application:n}},/* @__PURE__ */l.createElement("a",null,n)),r<a&&2===e.length?" ":"",r<a&&e.length>2?", ":""))}})(e))),Ka=()=>/* @__PURE__ */l.createElement("div",{className:"horizontal middle well-compact alert alert-warning config-detail-edit-warning"},/* @__PURE__ */l.createElement("i",{className:"fa fa-exclamation-triangle sp-margin-m-right"}),/* @__PURE__ */l.createElement("span",null,/* @__PURE__ */l.createElement("b",null,"Canary config is locked and does not allow modification")));const Ba=i(function(e){return{selectedConfig:b(e),editingDisabled:e.app.disableConfigEdit,disableConfigEdit:re.disableConfigEdit}})(function({selectedConfig:e,editingDisabled:t,disableConfigEdit:a}){/* @__PURE__ */
|
|
12
|
+
return l.createElement("div",{className:"vertical"},/* @__PURE__ */l.createElement("div",{className:"horizontal config-detail-header"},/* @__PURE__ */l.createElement("div",{className:"flex-3"},/* @__PURE__ */l.createElement("h1",{className:"heading-1 color-text-primary"},e?e.name:"")),/* @__PURE__ */l.createElement("div",{className:"flex-1"},/* @__PURE__ */l.createElement("h5",{className:"heading-5"},/* @__PURE__ */l.createElement("strong",null,"Edited:")," ",/* @__PURE__ */l.createElement(ja,{dateIso:e?e.updatedTimestampIso:""}))),/* @__PURE__ */l.createElement("div",{className:"flex-2"},/* @__PURE__ */l.createElement(Pa,null))),e&&t&&!a&&/* @__PURE__ */l.createElement(_a,{owners:e.applications}),e&&a&&/* @__PURE__ */l.createElement(Ka,null))});const Wa=i(function(e){var t,a,n,l,r,c;return{metricId:e.selectedConfig.editingMetric.id,direction:null!=(n=null==(a=null==(t=e.selectedConfig.editingMetric.analysisConfigurations)?void 0:t.canary)?void 0:a.direction)?n:"either",disabled:e.app.disableConfigEdit||re.disableConfigEdit,effectSizes:null!=(c=null==(r=null==(l=e.selectedConfig.editingMetric.analysisConfigurations)?void 0:l.canary)?void 0:r.effectSize)?c:{}}},function(e){return{updateEffectSize:(t,a)=>e(be({id:t,value:a}))}})(function({effectSizes:e={},updateEffectSize:t,direction:a,metricId:n,disabled:r}){const[c,i]=l.useState(!!Object.keys(e).length),[s]=l.useState("cles"===e.measure),o=/* @__PURE__ */l.createElement("p",null,'Effect sizes should be used when your canary data produces a lot of metrics that flag as "high", but where you only want the test to fail if they are sufficiently larger or smaller than the control data.');if(!c&&r)return null;if(!c)/* @__PURE__ */
|
|
13
|
+
return l.createElement(ve,{label:"Effect Sizes"},o,/* @__PURE__ */l.createElement("button",{className:"passive",onClick:()=>i(!0)},"Configure effect sizes"));const m="cles"===e.measure,u=m?.5:1,{allowedIncrease:d=u,criticalIncrease:p=u,allowedDecrease:g=u,criticalDecrease:E=u,measure:f="meanRatio"}=e,h=a=>{t(n,{...e,measure:a.target.value})},y=(e,t)=>{const a=Number(t)/100;return e.endsWith("Increase")?1+a:1-a},b=(e,t)=>{const a=t.endsWith("Increase")?e-1:1-e;return Math.round(100*a)},v=/* @__PURE__ */l.createElement(l.Fragment,null,"CLES ",/* @__PURE__ */l.createElement(qt,{id:"canary.config.effectSize.cles"})),N=(a,r)=>/* @__PURE__ */l.createElement("div",{className:"form-group flex-1"},/* @__PURE__ */l.createElement("label",null,Ot(a)),/* @__PURE__ */l.createElement("div",{className:"row"},/* @__PURE__ */l.createElement("div",{className:"col-md-4"},/* @__PURE__ */l.createElement("div",{className:"input-group effect-size-wrapper"},/* @__PURE__ */l.createElement(Ce,{className:"form-control input-sm",type:"number",min:0,step:m?.01:1,onChange:l=>((a,l)=>{const r=m?Number(l):y(a,l),c={...e,[a]:r};r===u&&delete c[a],t(n,c)})(a,l.target.value),value:m?r:b(r,a),disabled:re.disableConfigEdit,disabledStateKeys:[ye]}),!m&&/* @__PURE__ */l.createElement("div",{className:"input-group-addon"},"%")))),r===u?/* @__PURE__ */l.createElement(qt,{expand:!0,content:"(will not affect metric evaluation)"}):null);/* @__PURE__ */
|
|
14
|
+
return l.createElement(ve,{label:"Effect Sizes"},o,/* @__PURE__ */l.createElement("div",{className:"vertical",style:{marginTop:"5px"}},s&&/* @__PURE__ */l.createElement("div",{className:"form-group vertical"},/* @__PURE__ */l.createElement("label",null,"Measurement Type"),/* @__PURE__ */l.createElement("div",null,/* @__PURE__ */l.createElement(Ne,{value:"meanRatio",label:"Mean (default)",name:"measure",current:f,action:h}),/* @__PURE__ */l.createElement(Ne,{value:"cles",label:v,name:"measure",current:f,action:h}))),/* @__PURE__ */l.createElement("label",{className:"sp-margin-m-top"},"Allowed Effects"),/* @__PURE__ */l.createElement("p",null,"If the canary surpasses the baseline by the supplied (non-zero) percentage, the ",/* @__PURE__ */l.createElement("em",null,"metric")," will fail."),/* @__PURE__ */l.createElement("div",{className:"horizontal"},"increase"!==a&&N("allowedDecrease",g),"decrease"!==a&&N("allowedIncrease",d)),/* @__PURE__ */l.createElement("label",{className:"sp-margin-m-top"},"Critical Effects"),/* @__PURE__ */l.createElement("p",null,"If the canary surpasses the baseline by the supplied (non-zero) percentage, the ",/* @__PURE__ */l.createElement("em",null,"entire analysis")," will fail with a score of 0."),/* @__PURE__ */l.createElement("div",{className:"horizontal"},"increase"!==a&&N("criticalDecrease",E),"decrease"!==a&&N("criticalIncrease",p))))});const Ha=i(function(e){return{editingMetric:e.selectedConfig.editingMetric}})(function({editingMetric:e}){const t=Se.getDelegate(e.query.type);if(t&&t.metricConfigurer){const e=t.metricConfigurer;/* @__PURE__ */
|
|
15
|
+
return l.createElement(e,null)}/* @__PURE__ */
|
|
16
|
+
return l.createElement("p",null,"Metric configuration has not been implemented for ",e.query.type,".")});const Ya=i(function(e){return{metric:e.selectedConfig.editingMetric,groups:e.selectedConfig.group.list.sort(),disableEdit:e.app.disableConfigEdit||re.disableConfigEdit,validationErrors:we(e)}},function(e){return{rename:t=>{e(Le({id:t.target.dataset.id,name:t.target.value}))},changeGroup:t=>{e(De({id:t.target.dataset.id,group:t.target.value}))},cancel:()=>{e(Re())},confirm:()=>{e(Ae())},updateDirection:({target:t})=>{e(Me({id:t.dataset.id,direction:t.value}))},updateNanStrategy:({target:t})=>{e(Ie({id:t.dataset.id,strategy:t.value}))},updateOutlierStrategy:({target:t})=>{e(Te({id:t.dataset.id,strategy:t.value}))},updateCriticality:({target:t})=>{e(ke({id:t.dataset.id,critical:Boolean(t.checked)}))},updateDataRequired:({target:t})=>{e(xe({id:t.dataset.id,mustHaveData:Boolean(t.checked)}))}}})(function({metric:e,rename:t,changeGroup:a,groups:n,confirm:r,cancel:c,updateDirection:i,updateNanStrategy:s,updateOutlierStrategy:o,updateCriticality:m,updateDataRequired:u,disableEdit:d,validationErrors:p}){var g,E,f,h,y,b,v,N,C,S,w,x,k,T,I,M,A,R;if(!e)return null;const D=null!=(f=null==(E=null==(g=e.analysisConfigurations)?void 0:g.canary)?void 0:E.direction)?f:"either",L=null!=(b=null==(y=null==(h=e.analysisConfigurations)?void 0:h.canary)?void 0:y.nanStrategy)?b:"default",z=null!=(S=null==(C=null==(N=null==(v=e.analysisConfigurations)?void 0:v.canary)?void 0:N.outliers)?void 0:C.strategy)?S:"default",$=null!=(k=null==(x=null==(w=e.analysisConfigurations)?void 0:w.canary)?void 0:x.critical)&&k,F=null!=(M=null==(I=null==(T=e.analysisConfigurations)?void 0:T.canary)?void 0:I.mustHaveData)&&M,G=d||re.disableConfigEdit?"Metric Details":"Configure Metric",q=d||re.disableConfigEdit||ta(p).some(e=>!aa(e)),O=e.groups.length?e.groups[0]:n[0];/* @__PURE__ */
|
|
17
|
+
return l.createElement(da,{bsSize:"large",show:!0,onHide:Pt,className:ua("kayenta-edit-metric-modal"),"aria-labelledby":"edit-metric-modal-title"},
|
|
18
|
+
/* @__PURE__ */l.createElement(ne,null,/* @__PURE__ */l.createElement(da.Header,null,/* @__PURE__ */l.createElement(da.Title,{id:"edit-metric-modal-title"},G)),/* @__PURE__ */l.createElement(da.Body,null,/* @__PURE__ */l.createElement(ve,{label:"Group",inputOnly:!0},e.groups.length>1&&/* @__PURE__ */l.createElement(Ce,{type:"text",value:e.groups,"data-id":e.id,onChange:a,disabled:re.disableConfigEdit,disabledStateKeys:[ye]}),e.groups.length<2&&/* @__PURE__ */l.createElement(ze,{value:O,onChange:a,className:"form-control input-sm",disabled:re.disableConfigEdit,disabledStateKeys:[ye]},n.map(e=>/* @__PURE__ */l.createElement("option",{key:e,value:e},e)))),/* @__PURE__ */l.createElement(ve,{label:"Name",error:null!=(R=null==(A=null==p?void 0:p.name)?void 0:A.message)?R:null,inputOnly:!0},/* @__PURE__ */l.createElement(Ce,{type:"text",value:e.name,"data-id":e.id,onChange:t,disabled:re.disableConfigEdit,disabledStateKeys:[ye]})),/* @__PURE__ */l.createElement(ve,{label:"Fail on"},/* @__PURE__ */l.createElement(Ne,{value:"increase",label:"Increase",name:"direction",current:D,action:i,metricId:e.id}),/* @__PURE__ */l.createElement(Ne,{value:"decrease",label:"Decrease",name:"direction",current:D,action:i,metricId:e.id}),/* @__PURE__ */l.createElement(Ne,{value:"either",label:"Either",name:"direction",current:D,action:i,metricId:e.id})),/* @__PURE__ */l.createElement(ve,{label:"Criticality",checkbox:!0},/* @__PURE__ */l.createElement("label",null,/* @__PURE__ */l.createElement(Ce,{type:"checkbox",name:"criticality","data-id":e.id,checked:$,onChange:m,disabled:re.disableConfigEdit,disabledStateKeys:[ye]}),"Fail the canary if this metric fails")),/* @__PURE__ */l.createElement(ve,{label:"Data Required",checkbox:!0},/* @__PURE__ */l.createElement("label",null,/* @__PURE__ */l.createElement(Ce,{type:"checkbox",name:"dataRequired","data-id":e.id,checked:F,onChange:u,disabled:re.disableConfigEdit,disabledStateKeys:[ye]}),"Fail the metric if data is missing")),/* @__PURE__ */l.createElement(ve,{label:"NaN Strategy",helpId:"canary.config.nanStrategy"},/* @__PURE__ */l.createElement(Ne,{value:"default",label:"Default (remove)",name:"nanStrategy",current:L,action:s,metricId:e.id}),/* @__PURE__ */l.createElement(Ne,{value:"replace",label:"Replace with zero",name:"nanStrategy",current:L,action:s,metricId:e.id}),/* @__PURE__ */l.createElement(Ne,{value:"remove",label:"Remove",name:"nanStrategy",current:L,action:s,metricId:e.id})),/* @__PURE__ */l.createElement(ve,{label:"Outlier Strategy",helpId:"canary.config.outlierStrategy"},/* @__PURE__ */l.createElement(Ne,{value:"default",label:"Default (keep)",name:"outlierStrategy",current:z,action:o,metricId:e.id}),/* @__PURE__ */l.createElement(Ne,{value:"remove",label:"Remove",name:"outlierStrategy",current:z,action:o,metricId:e.id}),/* @__PURE__ */l.createElement(Ne,{value:"keep",label:"Keep",name:"outlierStrategy",current:z,action:o,metricId:e.id})),/* @__PURE__ */l.createElement(Wa,null),/* @__PURE__ */l.createElement(Ha,null)),/* @__PURE__ */l.createElement(da.Footer,null,/* @__PURE__ */l.createElement("ul",{className:"list-inline pull-right"},/* @__PURE__ */l.createElement("li",null,/* @__PURE__ */l.createElement("button",{className:"passive",onClick:c},"Cancel")),/* @__PURE__ */l.createElement("li",null,/* @__PURE__ */l.createElement("button",{className:"primary",disabled:q,onClick:r},"OK"))))))});function Ua({title:e,children:t}){/* @__PURE__ */
|
|
19
|
+
return l.createElement("section",{className:"pod open titled-section"},/* @__PURE__ */l.createElement("div",{className:"header horizontal middle"},/* @__PURE__ */l.createElement("div",{className:"flex-1 heading-2 uppercase"},e)),/* @__PURE__ */l.createElement("div",{className:"contents vertical"},t))}const Va=i(function(e,{metric:t}){return{groups:e.selectedConfig.group.list.filter(e=>t.groups.length>1||!t.groups.includes(e)),toGroup:e.selectedConfig.changeMetricGroup.toGroup}},function(e,{metric:t}){return{select:t=>{e(Fe({group:t.target.value||null}))},clear:()=>{e($e({metricId:null}))},confirm:()=>{e($e({metricId:t.id}))}}})(function({groups:e,toGroup:t,confirm:a,clear:n,select:r}){/* @__PURE__ */
|
|
20
|
+
return l.createElement(da,{show:!0,onHide:Pt},/* @__PURE__ */l.createElement(ne,null,/* @__PURE__ */l.createElement(da.Header,null,/* @__PURE__ */l.createElement(da.Title,null,"Change Metric Group")),/* @__PURE__ */l.createElement(da.Body,null,/* @__PURE__ */l.createElement(ze,{value:t||"",onChange:r,className:"form-control input-sm",disabled:re.disableConfigEdit,disabledStateKeys:[ye]},
|
|
21
|
+
/* @__PURE__ */l.createElement("option",{value:""},"-- select group --"),e.map(e=>/* @__PURE__ */l.createElement("option",{key:e,value:e},e)))),/* @__PURE__ */l.createElement(da.Footer,null,/* @__PURE__ */l.createElement("ul",{className:"list-inline pull-right"},/* @__PURE__ */l.createElement("li",null,/* @__PURE__ */l.createElement("button",{className:"passive",onClick:n},"Cancel")),/* @__PURE__ */l.createElement("li",null,/* @__PURE__ */l.createElement("button",{className:"primary",disabled:!t,onClick:a},"OK"))))))});function Ja({metric:e}){var t,a,n,r;const c=null==(a=null==(t=e.analysisConfigurations)?void 0:t.canary)?void 0:a.direction,i=null==(r=null==(n=e.analysisConfigurations)?void 0:n.canary)?void 0:r.critical,s=i?"(critical — if this metric fails, the entire canary will fail)":"",o=ua("metric-fail-on-icon","fas","sp-margin-xs-right",{critical:i});return"decrease"===c?/* @__PURE__ */l.createElement(jt,{value:`decrease ${s}`},/* @__PURE__ */l.createElement("i",{className:`fa-caret-square-down ${o}`})):"increase"===c?/* @__PURE__ */l.createElement(jt,{value:`increase ${s}`},/* @__PURE__ */l.createElement("i",{className:`fa-caret-square-up ${o}`})):/* @__PURE__ */l.createElement(jt,{value:`increase OR decrease ${s}`},/* @__PURE__ */l.createElement("span",null,/* @__PURE__ */l.createElement("i",{className:`fa-caret-square-down ${o}`}),/* @__PURE__ */l.createElement("i",{className:`fa-caret-square-up ${o}`})))}const Za=i(function(e){const t=e.selectedConfig.group.selected,a=e.selectedConfig.metricList,n=t?e=>e.groups.includes(t):()=>!0;return{selectedGroup:t,groupList:e.selectedConfig.group.list,metrics:a.filter(n),showGroups:!t||a.filter(n).some(e=>e.groups.length>1),changingGroupMetric:e.selectedConfig.metricList.find(t=>t.id===e.selectedConfig.changeMetricGroup.metric),metricStore:e.selectedConfig.selectedStore,disableEdit:e.app.disableConfigEdit||re.disableConfigEdit}},function(e){return{addMetric:t=>{const a=t.target.dataset.group||t.target.dataset.default;e(Pe({metric:{id:"[new]",analysisConfigurations:{},name:"",query:{type:t.target.dataset.metricStore,serviceType:t.target.dataset.metricStore},groups:a?[a]:[],scopeName:"default",isNew:!0}}))},copyMetric:t=>{const a=na(t);a.id="[new]",a.isNew=!0,a.name="",e(Pe({metric:a}))},editMetric:t=>{e(Oe({id:t.target.dataset.id}))},removeMetric:t=>{e(qe({id:t.target.dataset.id}))},openChangeMetricGroupModal:t=>e(Ge({id:t.target.dataset.id}))}})(function({metrics:e,groupList:t,selectedGroup:a,showGroups:n,addMetric:r,editMetric:c,copyMetric:i,removeMetric:s,changingGroupMetric:o,openChangeMetricGroupModal:m,metricStore:u,disableEdit:d}){const p=[{label:"Metric Name",getContent:e=>/* @__PURE__ */l.createElement("span",null,e.name||"(new)")},{label:"Fail On",getContent:e=>/* @__PURE__ */l.createElement(Ja,{metric:e})},{label:"Groups",getContent:e=>/* @__PURE__ */l.createElement("span",null,e.groups.join(", ")),hide:()=>!n},{getContent:e=>/* @__PURE__ */l.createElement("div",{className:"horizontal pull-right metrics-action-buttons"},/* @__PURE__ */l.createElement("button",{className:"link","data-id":e.id,onClick:c},d||re.disableConfigEdit?"View":"Edit"),/* @__PURE__ */l.createElement("button",{className:"link","data-id":e.id,disabled:d||re.disableConfigEdit,onClick:m},"Move Group"),/* @__PURE__ */l.createElement("button",{className:"link","data-id":e.id,disabled:d||re.disableConfigEdit,onClick:()=>i(e)},"Copy"),/* @__PURE__ */l.createElement("button",{className:"link","data-id":e.id,disabled:d||re.disableConfigEdit,onClick:s},"Delete"))}];/* @__PURE__ */
|
|
22
|
+
return l.createElement(l.Fragment,null,/* @__PURE__ */l.createElement(je,{columns:p,rows:e,rowKey:e=>e.id,className:"header-white"}),!e.length&&a?/* @__PURE__ */l.createElement("p",null,"This group is empty! The group will be not be present the next time the config is loaded unless it is saved with at least one metric in it."):null,o&&/* @__PURE__ */l.createElement(Va,{metric:o}),/* @__PURE__ */l.createElement(he,{className:"passive self-left","data-group":a,"data-default":t[0],"data-metric-store":u,onClick:r,disabled:re.disableConfigEdit,disabledStateKeys:[ye]},"Add Metric"))});function Qa({children:e}){/* @__PURE__ */
|
|
23
|
+
return l.createElement("ul",{className:"list-group"},l.Children.map(e,e=>e&&/* @__PURE__ */l.createElement("li",{className:"list-unstyled"},/* @__PURE__ */l.createElement("form",{role:"form",className:"form-horizontal container-fluid"},/* @__PURE__ */l.createElement("div",{className:"col-md-12"},e)))))}const Xa=i(e=>({stores:la(e.data.kayentaAccounts.data).filter(e=>e.supportedTypes.includes($.MetricsStore)).map(e=>e.metricsStoreType||e.type).uniq().sort().valueOf(),selectedStore:e.selectedConfig.selectedStore}),e=>({select:t=>e(_e({store:t.target.value}))}))(({stores:e,selectedStore:t,select:a})=>e.length<2?null:/* @__PURE__ */l.createElement(ve,{label:"Metric Store",inputOnly:!0},/* @__PURE__ */l.createElement(ze,{value:t||"",onChange:a,className:"form-control input-sm",disabled:re.disableConfigEdit,disabledStateKeys:[ye]},e.map(e=>/* @__PURE__ */l.createElement("option",{key:e,value:e},e)))));const en=i(function(e){return e.selectedConfig.config?{name:e.selectedConfig.config.name,description:e.selectedConfig.config.description}:{name:"",description:""}},function(e){return{changeName:t=>{e(Be({name:t.target.value}))},changeDescription:t=>{e(Ke({description:t.target.value}))}}})(function({name:e,description:t,changeName:a,changeDescription:n}){/* @__PURE__ */
|
|
24
|
+
return l.createElement(Qa,null,/* @__PURE__ */l.createElement(ve,{label:"Configuration Name",inputOnly:!0},/* @__PURE__ */l.createElement(Ce,{type:"text",value:e,onChange:a,disabled:re.disableConfigEdit,disabledStateKeys:[ye]})),/* @__PURE__ */l.createElement(Xa,null),/* @__PURE__ */l.createElement(ve,{label:"Description",inputOnly:!0},/* @__PURE__ */l.createElement(We,{className:"form-control input-sm",value:t,onChange:n,disabled:re.disableConfigEdit,disabledStateKeys:[ye]})))});const tn=i(function(e,t){return{...t,config:b(e)}},function(e,{group:t}){return{handleInputChange:a=>{e(He({group:t,weight:a.target.value?parseInt(a.target.value,10):null}))}}})(function({group:e,config:t,handleInputChange:a}){const n=function(e){return ea(e,"classifier.groupWeights",{})}(t)[e];/* @__PURE__ */
|
|
25
|
+
return l.createElement(ve,{label:e,inputOnly:!0},/* @__PURE__ */l.createElement(Ce,{type:"number",value:ra(n)?n:"",onChange:a,min:0,max:100,disabled:re.disableConfigEdit,disabledStateKeys:[ye]}))});const an=i(function(e){const t=b(e),a=t?t.metrics:[];return{groups:ca(ia(a,e=>e.groups||[]))}})(function({groups:e}){const t=e.length>0;/* @__PURE__ */
|
|
26
|
+
return l.createElement("section",null,t?e.map(e=>/* @__PURE__ */l.createElement(tn,{key:e,group:e})):/* @__PURE__ */l.createElement("p",{key:"no-groups"},"You have not configured any grouped metrics."))});function nn({title:e,children:t,helpKey:a}){/* @__PURE__ */
|
|
27
|
+
return l.createElement("section",{className:"titled-subsection"},/* @__PURE__ */l.createElement("h5",{className:"heading-5"},e," ",a&&/* @__PURE__ */l.createElement(qt,{id:a})),/* @__PURE__ */l.createElement("hr",null),t)}const ln=i(function(e){return{renderJudgeSelect:e.selectedConfig.judge.renderState!==Ye.None}})(function({renderJudgeSelect:e}){/* @__PURE__ */
|
|
28
|
+
return l.createElement(Qa,null,e&&/* @__PURE__ */l.createElement(nn,{title:"Judge"},/* @__PURE__ */l.createElement(Ue,null)),/* @__PURE__ */l.createElement(nn,{title:"Metric Group Weights",helpKey:"canary.config.metricGroupWeights"},/* @__PURE__ */l.createElement(an,null)))});function rn(){/* @__PURE__ */
|
|
29
|
+
return l.createElement("section",{className:"config-detail"},/* @__PURE__ */l.createElement(Ba,null),/* @__PURE__ */l.createElement(Ua,{title:"Name and Description"},/* @__PURE__ */l.createElement(en,null)),/* @__PURE__ */l.createElement(Ua,{title:"Metrics"},/* @__PURE__ */l.createElement(Ve,null),/* @__PURE__ */l.createElement(Za,null),/* @__PURE__ */l.createElement(Ya,null)),/* @__PURE__ */l.createElement(Ua,{title:"Scoring"},/* @__PURE__ */l.createElement(ln,null)))}function cn({children:e}){/* @__PURE__ */
|
|
30
|
+
return l.createElement("div",{className:"row"},/* @__PURE__ */l.createElement("div",{className:"col-sm-offset-4"},e))}const sn=i(function(e){return{configLoadState:e.selectedConfig.load.state}})(function({configLoadState:e}){const t=(new $a).onFulfilled(/* @__PURE__ */l.createElement(rn,null)).onFailed(
|
|
31
|
+
/* @__PURE__ */l.createElement(cn,null,/* @__PURE__ */l.createElement("h3",{className:"heading-3"},"Could not load canary config."))).build();/* @__PURE__ */
|
|
32
|
+
return l.createElement(t,{state:e})});class on extends l.Component{constructor(e){const{configNameStream:t,loadConfig:a}=e;super(e),this.subscription=t.subscribe(a)}componentWillUnmount(){this.subscription.unsubscribe()}render(){/* @__PURE__ */
|
|
33
|
+
return l.createElement(sn,null)}}const mn=i(null,function(e){return{loadConfig:t=>{t.copy?e(Je()):t.new?e(Ze()):t.id&&e(Qe({id:t.id}))}}})(on);const un=i(function(e){return{disabled:e.selectedConfig.config&&e.selectedConfig.config.isNew||re.disableConfigEdit}})(function({disabled:e}){/* @__PURE__ */
|
|
34
|
+
return l.createElement(t,{to:".configDetail",params:{id:_t.generateUuid(),new:!0}},/* @__PURE__ */l.createElement("button",{className:"zombie text-left form-control",disabled:e},/* @__PURE__ */l.createElement("i",{className:"fa fa-plus-circle"}),/* @__PURE__ */l.createElement("span",null,"Add configuration")))}),dn=({owningApplications:e,currentApplication:t})=>{return e.length<2&&e.includes(t)?null:/* @__PURE__ */l.createElement("span",null,"Owned by: ",e.join(", ")," ",/* @__PURE__ */l.createElement(qt,{placement:"right",content:(a=e,0===a.length?null:1===a.length?`This config can only be edited from within the application <strong>${a[0]}.</strong>`:`This config can only be edited from within the following applications: <strong>${a.join(", ")}.</strong>`)}));var a};const pn=i(function(e){const t=e.selectedConfig.config?e.selectedConfig.config.id:null,a=e.data.application.name;return{selectedConfigId:t,configs:sa(e.data.configSummaries,"name"),application:a}})(function({configs:e,selectedConfigId:a,application:n}){/* @__PURE__ */
|
|
35
|
+
return l.createElement("section",{className:"config-list"},/* @__PURE__ */l.createElement("ul",{className:"tabs-vertical list-unstyled ",style:{wordBreak:"break-all"}},e.map(e=>/* @__PURE__ */l.createElement("li",{key:e.id,className:e.id===a?"selected":""},/* @__PURE__ */l.createElement(t,{to:".configDetail",params:{id:e.id,new:!1,copy:!1}},/* @__PURE__ */l.createElement("a",null,/* @__PURE__ */l.createElement("div",{className:"heading-4 color-text-primary"},e.name),/* @__PURE__ */l.createElement("div",{className:"body-small color-text-caption caption",style:{marginTop:"5px",marginBottom:"0"}},"Edited: ",/* @__PURE__ */l.createElement(ja,{dateIso:e.updatedTimestampIso}),/* @__PURE__ */l.createElement("br",null),/* @__PURE__ */l.createElement(dn,{owningApplications:e.applications,currentApplication:n}))))))),/* @__PURE__ */l.createElement(un,null))});function gn({children:e}){/* @__PURE__ */
|
|
36
|
+
return l.createElement("div",{className:ua("row","canary-footer")},e)}function En({className:e,list:t,listWidth:a=2,detail:n,detailWidth:r=10,listClass:c,detailClass:i}){/* @__PURE__ */
|
|
37
|
+
return l.createElement("div",{className:ua("list-detail","horizontal",e)},/* @__PURE__ */l.createElement("div",{className:ua(`col-md-${a}`,c)},t),/* @__PURE__ */l.createElement("div",{className:ua(`col-md-${r}`,i)},n))}function fn(){const t=/* @__PURE__ */l.createElement(pn,null),a={wrap:!1},n=/* @__PURE__ */l.createElement(e,{...a,name:"detail"});/* @__PURE__ */
|
|
38
|
+
return l.createElement("div",{className:"vertical flex-1"},/* @__PURE__ */l.createElement(En,{list:t,detail:n,className:"flex-1",detailClass:"vertical flex-1"}),/* @__PURE__ */l.createElement(gn,null,/* @__PURE__ */l.createElement(e,{...a,name:"footer"})))}const hn=i(function(e){const t=!!e.selectedConfig.validationErrors.length||re.disableConfigEdit;return{saveConfigState:e.selectedConfig.save.state,inSyncWithServer:e.selectedConfig.isInSyncWithServer,disable:t}},function(e){return{saveConfig:()=>{e(Xe())}}})(function({saveConfigState:e,inSyncWithServer:t,saveConfig:a,disable:n}){return t&&e!==de.Requesting?/* @__PURE__ */l.createElement("span",{className:"btn btn-link disabled"},/* @__PURE__ */l.createElement("i",{className:"far fa-check-circle"})," In sync with server"):/* @__PURE__ */l.createElement(Kt,{label:"Save Changes",onClick:a,isDisabled:n||re.disableConfigEdit,submitting:e===de.Requesting})});const yn=i(function(e){return{saveConfigState:e.selectedConfig.save.state,saveConfigErrorMessage:e.selectedConfig.save.error}},function(e){return{dismissError:()=>{e(et())}}})(function({saveConfigState:e,saveConfigErrorMessage:t,dismissError:a}){return e===de.Failed&&/* @__PURE__ */l.createElement("span",{className:ua("alert","alert-danger")},function(e){const t="There was an error saving your config";return e?t+`: ${e}.`:t+"."}(t),/* @__PURE__ */l.createElement("a",{className:ua("alert-dismiss","clickable"),onClick:a}," ","[dismiss]"))}),bn=i(e=>({errors:e.selectedConfig.validationErrors.map(e=>e.message)}))(({errors:e})=>{if(!e||!e.length)return null;const t=/* @__PURE__ */l.createElement("section",null,/* @__PURE__ */l.createElement("p",null,"The following errors may prevent this config from working properly:"),/* @__PURE__ */l.createElement("ul",null,e.map(e=>/* @__PURE__ */l.createElement("li",{key:e},e))));/* @__PURE__ */
|
|
39
|
+
return l.createElement(Bt,{placement:"left",template:t},/* @__PURE__ */l.createElement("button",{className:"btn btn-link"},/* @__PURE__ */l.createElement("i",{className:"fa fa-exclamation-triangle"})))});function vn(){/* @__PURE__ */
|
|
40
|
+
return l.createElement("div",{className:ua("col-sm-12","text-right")},/* @__PURE__ */l.createElement(bn,null),/* @__PURE__ */l.createElement(yn,null),/* @__PURE__ */l.createElement(hn,null))}function Nn(){/* @__PURE__ */
|
|
41
|
+
return l.createElement(cn,null,/* @__PURE__ */l.createElement("h3",{className:"heading-3"},"Click a configuration to edit."))}const Cn=e=>{const t=tt(e).id,a=R(e),n=a.id;let l=`${Wt.gateUrl}/v2/canaries/canary/${t}/${n}`;const r=a.storageAccountName||re.storageAccountName;return r&&(l+=`?storageAccountName=${r}`),l},Sn=e=>{const t=R(e),{metricSetPairListId:a}=t;if(!a)return null;let n=`${Wt.gateUrl}/v2/canaries/metricSetPairList/${a}`;const l=t.storageAccountName||re.storageAccountName;return l&&(n+=`?storageAccountName=${l}`),n},wn=i(e=>({reportUrl:Cn(e),metricListUrl:Sn(e)}))(({reportUrl:e,metricListUrl:t})=>/* @__PURE__ */l.createElement("ul",{className:"list-unstyled small"},/* @__PURE__ */l.createElement("li",null,/* @__PURE__ */l.createElement("a",{target:"_blank",href:e},"Report")),t&&/* @__PURE__ */l.createElement("li",null,/* @__PURE__ */l.createElement("p",null,/* @__PURE__ */l.createElement("a",{target:"_blank",href:t},"Metrics"))))),xn=({label:e,extraClass:t})=>/* @__PURE__ */l.createElement("label",{className:`label uppercase color-text-primary ${t}`},e),kn=i(e=>({run:e.selectedRun.run}))(({run:e})=>{const{thresholds:{marginal:t,pass:a}}=e.canaryExecutionRequest,n=(e=>{const t=e.canaryExecutionRequest,a=Object.values(t.scopes);if(a.length>1)return null;const{controlScope:{step:n,location:r,scope:c},experimentScope:{start:i,end:s,location:o,scope:m}}=a[0];return[{label:"baseline",entries:[{label:"scope",popover:!0,getContent:()=>/* @__PURE__ */l.createElement("p",{className:"kayenta-scope"},c)},{label:"location",getContent:()=>/* @__PURE__ */l.createElement("p",null,r)}]},{label:"canary",entries:[{label:"scope",popover:!0,getContent:()=>/* @__PURE__ */l.createElement("p",{className:"kayenta-scope"},m)},{label:"location",getContent:()=>/* @__PURE__ */l.createElement("p",null,o)}]},{label:"time",entries:[{label:"start",getContent:()=>/* @__PURE__ */l.createElement("p",null,/* @__PURE__ */l.createElement(ja,{dateIso:i}))},{label:"end",getContent:()=>/* @__PURE__ */l.createElement("p",null,/* @__PURE__ */l.createElement(ja,{dateIso:s}))},{label:"step",getContent:()=>{const e=n/60;/* @__PURE__ */
|
|
42
|
+
return l.createElement("p",null,e," min",1===e?"":"s")}}]}]})(e)||[];return n.push({label:"threshold",entries:[{label:"marginal",getContent:()=>/* @__PURE__ */l.createElement("p",null,t)},{label:"pass",getContent:()=>/* @__PURE__ */l.createElement("p",null,a)}]}),/* @__PURE__ */l.createElement("section",{className:"report-metadata"},n.map((e,t)=>/* @__PURE__ */l.createElement("div",{className:`group group-${e.label}`,key:e.label||t},/* @__PURE__ */l.createElement(xn,{label:e.label||"",extraClass:"label-lg"}),/* @__PURE__ */l.createElement("ul",{className:"list-unstyled"},e.entries.map(e=>/* @__PURE__ */l.createElement("li",{key:e.label||t},/* @__PURE__ */l.createElement(xn,{label:e.label}),e.popover?/* @__PURE__ */l.createElement(Bt,{template:e.getContent()},e.getContent()):/* @__PURE__ */l.createElement(l.Fragment,null,e.getContent())))))),/* @__PURE__ */l.createElement("div",{className:"group group-source",key:"source"},/* @__PURE__ */l.createElement(xn,{label:"Source",extraClass:"label-lgf"}),/* @__PURE__ */l.createElement(wn,null)))}),Tn=e=>e.classification===nt.Pass?{health:null,result:"success"}:e.classification===nt.Fail?{health:"unhealthy",result:null}:{health:null,result:null},In=({score:e,showClassification:t,inverse:a})=>/* @__PURE__ */l.createElement(at,{className:"score-report",score:oa(e.score,2),result:Tn(e).result,health:Tn(e).health,classification:t?e.classification:null,inverse:a}),Mn=i(e=>({id:tt(e).id,name:tt(e).name,score:lt(e).score}))(({id:e,name:a,score:n})=>/* @__PURE__ */l.createElement("section",{className:"horizontal report-header"},/* @__PURE__ */l.createElement("div",{className:"report-score-wrapper"},/* @__PURE__ */l.createElement(In,{score:n,showClassification:!0}),/* @__PURE__ */l.createElement("h1",{className:"heading-2 color-text-primary"},/* @__PURE__ */l.createElement(t,{to:"^.^.canaryConfig.configDetail",params:{id:e}},/* @__PURE__ */l.createElement("a",{className:"clickable color-text-primary"}," ",a)))),/* @__PURE__ */l.createElement(kn,null))),An=["semiotic"],Rn=i(e=>{const t=e.selectedRun.selectedMetric;return{pair:e.selectedRun.metricSetPair.pair,result:rt(e).find(e=>e.id===t),graphType:e.selectedRun.graphType}})(({pair:e,result:t,graphType:a})=>{const n=An.map(e=>ct.getDelegate(e)).filter(e=>!!e).find(e=>e.handlesGraphType(a));if(!n)/* @__PURE__ */
|
|
43
|
+
return l.createElement("h3",{className:"heading-3"},"Could not load graph.");const r=n.getGraph();/* @__PURE__ */
|
|
44
|
+
return l.createElement(r,{metricSetPair:e,result:t,type:a})}),Dn=i(e=>({selected:e.selectedRun.graphType}),e=>({selectGraphType:t=>e(it({type:t}))}))(({selected:e,selectGraphType:t})=>/* @__PURE__ */l.createElement("ul",{className:"list-inline graph-type-selector"},/* @__PURE__ */l.createElement("li",null,/* @__PURE__ */l.createElement("label",{className:"label uppercase color-text-primary",style:{paddingLeft:0}},"Graph:")),Object.values(st).map(a=>/* @__PURE__ */l.createElement("li",{style:e===a?{textDecoration:"underline"}:null,key:a,onClick:()=>t(a)},
|
|
45
|
+
/* @__PURE__ */l.createElement("a",{className:"small clickable"},a))))),Ln=i(e=>({metricConfig:ot(e),metricSetPair:e.selectedRun.metricSetPair.pair}))(({metricSetPair:e,metricConfig:t})=>{const a=(e=>{const{attributes:t,scopes:a,values:n,tags:l}=e,{atlasGraphBaseUrl:r}=re;let c="";Object.keys(l).length&&(c=` (${Object.keys(l).map(e=>`$${e}`).join("|")})`);const i=encodeURIComponent(t.control.baseURL),s=`${encodeURIComponent(t.experiment.query)},Canary${c},:legend,:freeze,${encodeURIComponent(t.control.query)},Baseline${c},:legend`,o=Math.min(a.control.startTimeMillis,a.experiment.startTimeMillis),m=a.control.startTimeMillis+n.control.length*a.control.stepMillis,u=a.experiment.startTimeMillis+n.experiment.length*a.experiment.stepMillis;return`${r}?backend=${i}&g.q=${s}&g.s=${o}&g.e=${Math.max(m,u)}&g.w=651&mode=png&axis=0`})(e),n=Se.getDelegate(t.query.type).queryFinder(t),r=[/* @__PURE__ */l.createElement("div",{className:"copy-button-container"},/* @__PURE__ */l.createElement(Ht,{displayText:!1,text:n,toolTip:null}),/* @__PURE__ */l.createElement("button",{className:"primary copy-button",key:"copy-link"},/* @__PURE__ */l.createElement("i",{className:"glyphicon glyphicon-copy copy-icon"}),"Copy metric query")),/* @__PURE__ */l.createElement("a",{href:a,target:"_blank"},/* @__PURE__ */l.createElement("button",{className:"primary"},/* @__PURE__ */l.createElement("i",{className:"fas fa-chart-line"}),"Explore more data in Atlas"))].map((e,t)=>/* @__PURE__ */l.createElement("li",{className:"action",key:t},e));/* @__PURE__ */
|
|
46
|
+
return l.createElement("div",{className:"metric-result-actions"},/* @__PURE__ */l.createElement("ul",{className:"actions-layout list-inline"},r))}),zn=(e,t,a)=>{const n=e.result.judgeResult.results.find(e=>e.id===t);return"experiment"===a?n.experimentMetadata.stats:"control"===a?n.controlMetadata.stats:null},$n=({row:e})=>e.getContent()?/* @__PURE__ */l.createElement("div",null,/* @__PURE__ */l.createElement("label",{className:"label uppercase color-text-primary"},e.label),e.getContent()):null,Fn=i(e=>({metricConfig:ot(e),metricSetPair:e.selectedRun.metricSetPair.pair,run:R(e),service:ot(e).query.type}))(({metricConfig:e,metricSetPair:t,run:a})=>{const n=[{getContent:e=>/* @__PURE__ */l.createElement("span",null,"control"===e?"Baseline":"Canary")},{label:"start",getContent:e=>/* @__PURE__ */l.createElement(ja,{dateIso:t.scopes[e].startTimeIso}),hide:()=>{const n=a.canaryExecutionRequest,l=n.scopes[e.scopeName].controlScope.start,r=t.scopes.control.startTimeIso,c=n.scopes[e.scopeName].experimentScope.start,i=t.scopes.experiment.startTimeIso;return l===r&&c===i}},{label:"count",getContent:e=>/* @__PURE__ */l.createElement("span",null,zn(a,t.id,e).count)},{label:"avg",getContent:e=>/* @__PURE__ */l.createElement("span",null,oa(zn(a,t.id,e).mean,3))},{label:"max",getContent:e=>/* @__PURE__ */l.createElement("span",null,oa(zn(a,t.id,e).max,3))},{label:"min",getContent:e=>/* @__PURE__ */l.createElement("span",null,oa(zn(a,t.id,e).min,3))}],r=[{label:"classification reason",getContent:()=>{const e=a.result.judgeResult.results.find(e=>e.id===t.id);return e.classificationReason?/* @__PURE__ */l.createElement("p",null,e.classificationReason):null}}];/* @__PURE__ */
|
|
47
|
+
return l.createElement("div",{className:"metric-stats vertical"},r.map(e=>/* @__PURE__ */l.createElement($n,{row:e,key:e.label})),/* @__PURE__ */l.createElement(je,{columns:n,rows:["control","experiment"],rowKey:e=>e}))}),Gn=()=>/* @__PURE__ */l.createElement("section",{className:"vertical flex-1 sp-padding-xl-bottom",style:{overflowY:"auto"}},/* @__PURE__ */l.createElement(Dn,null),/* @__PURE__ */l.createElement(Rn,null),/* @__PURE__ */l.createElement(Ln,null),/* @__PURE__ */l.createElement(Fn,null)),qn=i(e=>({state:e.selectedRun.metricSetPair.load}))(({state:e})=>{const t=(new $a).onFulfilled(/* @__PURE__ */l.createElement(Gn,null)).onFailed(/* @__PURE__ */l.createElement("h3",{className:"heading-3 text-center"},"Could not load metrics.")).build();/* @__PURE__ */
|
|
48
|
+
return l.createElement(t,{state:e})}),On=({result:e})=>e?/* @__PURE__ */l.createElement(qn,null):/* @__PURE__ */l.createElement("h3",{className:"heading-3 text-center"},"Select a metric result."),Pn=i(e=>({metricFilters:e.selectedRun.metricFilters}),(e,t)=>({toggle:t=>e(mt({classification:t})),...t}))(({results:e,metricFilters:t,toggle:a})=>{const n=[ut.Error,ut.High,ut.Low,ut.Nodata,ut.Pass].map(t=>({classification:t,count:e.filter(e=>e.classification===t).length})).filter(e=>e.count).map(e=>/* @__PURE__ */l.createElement("label",{key:e.classification},/* @__PURE__ */l.createElement("input",{type:"checkbox",checked:t.includes(e.classification),onChange:()=>a(e.classification)})," ",e.classification," (",e.count,")"," "));/* @__PURE__ */
|
|
49
|
+
return l.createElement("div",{className:"metric-filter-options horizontal center"},n)}),jn="var(--color-success)",_n="var(--color-danger)",Kn="var(--color-text-caption)",Bn="var(--color-warning)",Wn=e=>({[ut.High]:_n,[ut.Low]:_n,[ut.Error]:Bn,[ut.Nodata]:Kn,[ut.NodataFailMetric]:_n,[ut.Pass]:jn}[e]),Hn=(e,t)=>"number"!=typeof e.score?Bn:e.score>t.pass?jn:e.score>t.marginal?Kn:_n,Yn=e=>({backgroundColor:Wn(e)}),Un=({classification:e,className:t})=>/* @__PURE__ */l.createElement("div",{className:ua("pill","metric-result-classification",t),style:Yn(e)},/* @__PURE__ */l.createElement("span",{style:{color:"var(--color-text-on-dark)"}},e)),Vn=({ratio:e,className:t})=>e&&/* @__PURE__ */l.createElement("span",{className:t,style:{color:"var(--color-text-caption"}},(e=>"number"!=typeof e?"N/A":1===e?"0%":e<1?(100*(e-1)).toFixed(1)+"%":"+"+(100*(e-1)).toFixed(1)+"%")(e)),Jn=[{label:"metric name",getContent:({metricName:e})=>/* @__PURE__ */l.createElement(Yt,null,e),width:5},{label:"deviation",getContent:({results:e})=>e[0].resultMetadata&&/* @__PURE__ */l.createElement(Vn,{ratio:e[0].resultMetadata.ratio}),width:1},{label:"result",getContent:({results:e})=>/* @__PURE__ */l.createElement(Un,{classification:e[0].classification}),width:1}],Zn=i(e=>({selectedResult:dt(e)}),(e,t)=>({...t,select:t=>e(pt({metricId:t}))}))(({results:e,select:t,selectedResult:a})=>{let n=la(e).flatMap(e=>Object.keys(e.tags||{})).uniq().value().map(e=>({label:e,width:5,getContent:t=>/* @__PURE__ */l.createElement(Yt,null,t.tags[e])}));return n=n.concat([{width:1,getContent:({resultMetadata:e})=>e&&/* @__PURE__ */l.createElement(Vn,{ratio:e.ratio})},{width:1,getContent:({classification:e})=>/* @__PURE__ */l.createElement(Un,{classification:e})}]),/* @__PURE__ */l.createElement(ha,{rows:e,columns:n,className:"multiple-results-table",headerClassName:"sticky-header-2",rowClassName:e=>ua("horizontal",{selected:e.id===a}),rowKey:e=>Object.entries(e.tags||{}).map(([e,t])=>`${e}:${t}`).join(":"),onRowClick:e=>t(e.id)})}),Qn=e=>e.hasMultipleRows?/* @__PURE__ */l.createElement("li",{className:"horizontal multiple-results"},/* @__PURE__ */l.createElement("section",{className:"vertical flex-fill"},/* @__PURE__ */l.createElement("div",null,e.metricName),/* @__PURE__ */l.createElement(Zn,{results:e.results}))):null,Xn=i(e=>({selectedMetric:e.selectedRun.selectedMetric,metricFilters:e.selectedRun.metricFilters}),(e,t)=>({select:t=>e(pt({metricId:t})),...t}))(({results:e,select:t,selectedMetric:a,metricFilters:n})=>{const r=((e,t)=>{const a=e.reduce((e,t)=>(e.has(t.name)||e.set(t.name,0),e.set(t.name,e.get(t.name)+1),e),/* @__PURE__ */new Map),n=e.filter(e=>!t.length||t.includes(e.classification)).reduce((e,t)=>e.has(t.name)?e.set(t.name,{metricName:t.name,results:e.get(t.name).results.concat(t),hasMultipleRows:a.get(t.name)>1}):e.set(t.name,{metricName:t.name,results:[t],hasMultipleRows:a.get(t.name)>1}),
|
|
50
|
+
/* @__PURE__ */new Map);return Array.from(n.values())})(e,n);/* @__PURE__ */
|
|
51
|
+
return l.createElement("section",{className:"vertical metric-results-list flex-1"},/* @__PURE__ */l.createElement(Pn,{results:e}),/* @__PURE__ */l.createElement(ha,{rowKey:e=>e.metricName,tableBodyClassName:"list-unstyled tabs-vertical flex-1 sp-padding-xl-bottom",rowClassName:e=>ua("horizontal",{selected:e.results[0].id===a}),rows:r,columns:Jn,onRowClick:e=>t(e.results[0].id),className:"flex-1 vertical",customRow:Qn}))}),el=i(e=>{const{selectedRun:{selectedGroup:t,selectedMetric:a}}=e,n=lt(e),l=t?e=>e.groups.includes(t):()=>!0;return{metricResults:Object.values(n.results).filter(l),selectedMetricResult:Object.values(n.results).find(e=>e.id===a)}})(({metricResults:e,selectedMetricResult:t})=>{const a=/* @__PURE__ */l.createElement(Xn,{results:e}),n=/* @__PURE__ */l.createElement(On,{result:t});/* @__PURE__ */
|
|
52
|
+
return l.createElement(En,{list:a,listClass:"vertical",listWidth:5,detail:n,detailClass:"vertical",detailWidth:9,className:"metric-results flex-1"})}),tl=i(e=>({exception:e.selectedRun.run.exception}))(({exception:e})=>{const t=[];if(e.details){const{error:a,errors:n}=e.details;a&&t.push(a),(null==n?void 0:n.length)&&n.forEach(e=>t.push(e))}return t.length||t.push('No error message provided. Click the "Report" link to see more details.'),/* @__PURE__ */l.createElement(l.Fragment,null,/* @__PURE__ */l.createElement("h3",{className:"text-center"},"Canary report failed"),/* @__PURE__ */l.createElement("dl",null,/* @__PURE__ */l.createElement("dt",null,"Details"),/* @__PURE__ */l.createElement("dd",null,t.map((e,t)=>/* @__PURE__ */l.createElement("div",{key:t},/* @__PURE__ */l.createElement("code",null,e)))),/* @__PURE__ */l.createElement("dt",null,"Source"),/* @__PURE__ */l.createElement("dd",null,/* @__PURE__ */l.createElement(wn,null))))}),al=i(e=>({run:e.selectedRun.run}))(({run:e})=>{const t=(e=>{var t,a,n,l;return null!=(l=null==(n=null==(a=null==(t=null==e?void 0:e.result)?void 0:t.judgeResult)?void 0:a.score)?void 0:n.classificationReason)?l:null})(e);return t?/* @__PURE__ */l.createElement("section",null,/* @__PURE__ */l.createElement("div",{className:"report-explanation"},t)):null}),nl=({arrowColor:e,className:t})=>/* @__PURE__ */l.createElement("div",{className:ua("arrow-down",t),style:{borderTopColor:e}}),ll=({className:e,onClick:t,score:a,scoreThresholds:n})=>/* @__PURE__ */l.createElement("section",{className:e},/* @__PURE__ */l.createElement("div",{onClick:t,style:{backgroundColor:Hn(a,n)},className:ua("clickable","text-center","all-metric-results-header")},
|
|
53
|
+
/* @__PURE__ */l.createElement("h3",{className:"heading-3 label"},"ALL"),
|
|
54
|
+
/* @__PURE__ */l.createElement(nl,{className:"outer",arrowColor:"var(--color-titanium)"}),
|
|
55
|
+
/* @__PURE__ */l.createElement(nl,{className:"inner",arrowColor:Hn(a,n)}))),rl=({label:e,onClick:t,style:a,className:n})=>/* @__PURE__ */l.createElement("section",{style:a,onClick:t,className:ua("clickable","text-center","group-score",n)},/* @__PURE__ */l.createElement("h3",{className:"heading-3 uppercase label"},e),/* @__PURE__ */l.createElement(nl,{arrowColor:a.backgroundColor})),cl=i(e=>({selectedGroup:e.selectedRun.selectedGroup,groupWeights:Et(e),scoreThresholds:gt(e).thresholds}),(e,t)=>({select:t=>e(ft({group:t})),...t}))(({groups:e,groupWeights:t,scoreThresholds:a,className:n,select:r,selectedGroup:c})=>/* @__PURE__ */l.createElement("section",{className:ua("horizontal",n)},e.map(e=>/* @__PURE__ */l.createElement(rl,{key:e.name,style:{width:`${t[e.name]}%`,backgroundColor:Hn(e,a)},onClick:()=>r(e.name),label:e.name,className:ua("report-score",{active:e.name===c})})))),il=i(e=>({groups:sa(lt(e).groupScores,[t=>-Et(e)[t.name],"name"]),score:lt(e).score,scoreThresholds:e.selectedRun.run.canaryExecutionRequest.thresholds,selectedGroup:e.selectedRun.selectedGroup}),e=>({clearSelectedGroup:()=>e(ft({group:null}))}))(({groups:e,isExpanded:t,selectedGroup:a,clearSelectedGroup:n,score:r,scoreThresholds:c,toggleHeader:i})=>{const s={transform:t?"rotate(90deg)":"rotate(0deg)",transition:"all ease 0.15s"};/* @__PURE__ */
|
|
56
|
+
return l.createElement("section",{className:"horizontal report-scores"},/* @__PURE__ */l.createElement(ll,{onClick:n,score:r,scoreThresholds:c,className:ua("flex-1","report-score",{active:!a})}),/* @__PURE__ */l.createElement(cl,{groups:e,className:"flex-12"}),/* @__PURE__ */l.createElement("div",{className:"kayenta-overview-toggle horizontal middle",onClick:()=>i()},t?/* @__PURE__ */l.createElement("p",null,"hide details"):/* @__PURE__ */l.createElement("p",null,"show details"),/* @__PURE__ */l.createElement("span",{className:"glyphicon glyphicon-chevron-right",style:s})))});const sl=i(e=>({run:e.selectedRun.run}))(function({run:e}){var t,a;const[n,r]=l.useState(!0);return!(null==(a=null==(t=e.result)?void 0:t.judgeResult.results)?void 0:a.length)&&e.exception?/* @__PURE__ */l.createElement(tl,null):/* @__PURE__ */l.createElement(l.Fragment,null,/* @__PURE__ */l.createElement("div",{className:"vertical flex-1"},n&&/* @__PURE__ */l.createElement(Mn,null),/* @__PURE__ */l.createElement(al,null),/* @__PURE__ */l.createElement(il,{isExpanded:n,toggleHeader:()=>{r(!n)}}),/* @__PURE__ */l.createElement(el,null)))}),ol=i(e=>({loadState:e.selectedRun.load}))(({loadState:e})=>{const t=(new $a).onFulfilled(/* @__PURE__ */l.createElement(sl,null)).onFailed(
|
|
57
|
+
/* @__PURE__ */l.createElement(cn,null,/* @__PURE__ */l.createElement("h3",{className:"heading-3"},"Could not load canary report."))).build();/* @__PURE__ */
|
|
58
|
+
return l.createElement(t,{state:e})});class ml extends l.Component{constructor(e){super(e);const{resultIdStream:t,loadResult:a}=e;this.subscription=t.subscribe(a)}componentWillUnmount(){this.subscription.unsubscribe()}render(){/* @__PURE__ */
|
|
59
|
+
return l.createElement(ol,null)}}const ul=i(null,e=>({loadResult:t=>e(ht({configId:t.configId,runId:t.runId}))}))(ml),dl=i((e,t)=>({configId:yt(e,t.executionId),...t}))(({configId:e,configName:t})=>{const n=a("^.^.canaryConfig.configDetail",{id:e});/* @__PURE__ */
|
|
60
|
+
return l.createElement("a",{...n},t)}),pl={prometheus:[{label:"",value:""},{label:"gce_instance",value:"gce_instance"},{label:"aws_ec2_instance",value:"aws_ec2_instance"}],stackdriver:[{label:"gce_instance",value:"gce_instance"},{label:"aws_ec2_instance",value:"aws_ec2_instance"},{label:"gae_app",value:"gae_app"},{label:"k8s_container",value:"k8s_container"},{label:"k8s_pod",value:"k8s_pod"},{label:"k8s_node",value:"k8s_node"},{label:"gke_container",value:"gke_container"},{label:"https_lb_rule",value:"https_lb_rule"},{label:"global",value:"global"}]},gl=class e extends l.Component{constructor(e){var t;super(e),this.validate=e=>{const t={};let a,n;if(e.configId||(t.configId="You must choose a canary config"),e.startTime)try{a=new Date(e.startTime).getTime()}catch(c){t.startTime="Invalid start time. Time must be in ISO-8601 format, e.g. 2018-07-12T22:28:29Z"}else t.startTime="You must provide a start time";if(e.endTime)try{n=new Date(e.endTime).getTime()}catch(c){t.endTime="Invalid start time. Time must be in ISO-8601 format, e.g. 2018-07-12T22:28:29Z"}else t.endTime="You must provide an end time";a&&n&&n<=a&&(t.endTime="End time must be after start time"),e.step?parseInt(e.step,10)<1&&(t.step="Invalid step value"):t.step="You must provide a step value",e.baselineScope||(t.baselineScope="You must provide a baseline scope"),e.canaryScope||(t.canaryScope="You must provide a canary scope"),e.baselineLocation||(t.baselineLocation="You must provide a baseline location"),e.canaryLocation||(t.canaryLocation="You must provide a canary location");const l=parseInt(e.marginalThreshold,10),r=parseInt(e.passThreshold,10);return e.marginalThreshold?l>r?t.marginalThreshold="Marginal threshold must be greater than passing threshold":l<1&&(t.marginalThreshold="Marginal threshold must be positive"):t.marginalThreshold="You must provide a marginal score threshold",e.passThreshold?r>100&&(t.passThreshold="Passing threshold cannot be greater than 100"):t.passThreshold="You must provide a passing score threshold",e.metricsAccountName||(t.metricsAccountName="You must choose a metrics account"),e.storageAccountName||(t.storageAccountName="You must choose a storage account"),t},this.submit=(e,t)=>{const{configId:a,metricsAccountName:n,storageAccountName:l}=e,{application:r,accounts:c}=this.props,i=((e,t)=>{var a;const n=parseInt(e.step,10),l=parseInt(e.passThreshold,10),r=parseInt(e.marginalThreshold,10),c=t.find(({name:t})=>e.metricsAccountName===t),i={};e.resourceType&&(i.resourceType=e.resourceType),"atlas"!==c.type||(null==(a=e.extendedScopeParams)?void 0:a.type)||(i.type="cluster");const s={...e.extendedScopeParams,...i};return{scopes:{default:{controlScope:{scope:e.baselineScope,start:e.startTime,end:e.endTime,location:e.baselineLocation,step:n,extendedScopeParams:s},experimentScope:{scope:e.canaryScope,start:e.startTime,end:e.endTime,location:e.canaryLocation,step:n,extendedScopeParams:s}}},thresholds:{pass:l,marginal:r}}})(e,c);bt(a,i,{application:r.name,metricsAccountName:n,storageAccountName:l}).then(()=>{t.setSubmitting(!1),t.setStatus({succeeded:!0})}).catch(e=>{t.setSubmitting(!1),t.setStatus({succeeded:!1,error:e})})};const{initialValues:a,accounts:n}=e,l=n.find(({name:e})=>a.metricsAccountName===e),r=null!=(t=null==l?void 0:l.recommendedLocations)?t:[];this.state={showAllControlLocations:!r.includes(a.baselineLocation),showAllExperimentLocations:!r.includes(a.canaryLocation)}}static show(t){return Ut.show(e,t,{dialogClassName:"modal-lg"})}render(){const{dismissModal:e,title:t,application:a,accounts:n,initialValues:r}=this.props,{showAllControlLocations:c,showAllExperimentLocations:i}=this.state,s=a.getDataSource("canaryConfigs").data.slice().sort((e,t)=>e.name.localeCompare(t.name)),o=n.filter(({supportedTypes:e})=>e.includes($.MetricsStore)),m=n.filter(({supportedTypes:e})=>e.includes($.ObjectStore)),u=o.length>1||m.length>1;/* @__PURE__ */
|
|
61
|
+
return l.createElement(pa,{initialValues:{...r,metricsAccountName:ea(o[0],"name",""),storageAccountName:ea(m[0],"name","")},onSubmit:this.submit,validate:this.validate,isInitialValid:!!r.configId,render:({values:a,touched:n,isValid:d,isSubmitting:p,status:g,setFieldValue:E,setFieldTouched:f,errors:h})=>{if(!0===ea(g,"succeeded"))/* @__PURE__ */
|
|
62
|
+
return l.createElement(l.Fragment,null,/* @__PURE__ */l.createElement(Vt,{dismiss:e}),/* @__PURE__ */l.createElement(da.Header,null,/* @__PURE__ */l.createElement("h3",null,"Analysis Started")),/* @__PURE__ */l.createElement(da.Body,null,/* @__PURE__ */l.createElement("p",null,"Analysis started — check the list of reports in a few minutes to view results")),/* @__PURE__ */l.createElement(da.Footer,{className:"horizontal right"},/* @__PURE__ */l.createElement("button",{className:"btn btn-primary",onClick:e,type:"button"},"Got it")));const y=o.find(({name:e})=>a.metricsAccountName===e),b=m.find(({name:e})=>a.storageAccountName===e),v=ea(y,"recommendedLocations",[]),{canaryLocation:N,baselineLocation:C}=r,S=ea(y,"locations",[]);N&&!S.includes(N)&&S.push(N),C&&!S.includes(C)&&S.push(C);const w=v.length>0||S.length>0;/* @__PURE__ */
|
|
63
|
+
return l.createElement(ga,{className:"form-horizontal"},/* @__PURE__ */l.createElement(Vt,{dismiss:e}),/* @__PURE__ */l.createElement(da.Header,null,t&&/* @__PURE__ */l.createElement("h3",null,t)),/* @__PURE__ */l.createElement(da.Body,null,/* @__PURE__ */l.createElement("div",{className:"row"},/* @__PURE__ */l.createElement("div",{className:"col-md-12"},/* @__PURE__ */l.createElement("div",{className:"container-fluid form-horizontal"},/* @__PURE__ */l.createElement("h5",null,"Analysis Configuration"),/* @__PURE__ */l.createElement("div",{className:"horizontal-rule"}),/* @__PURE__ */l.createElement("div",{className:"form-group"},/* @__PURE__ */l.createElement("div",{className:"col-md-3 sm-label-right"},"Config Name"),/* @__PURE__ */l.createElement("div",{className:"col-md-7"},/* @__PURE__ */l.createElement(Jt,{value:a.configId,options:s.map(({id:e,name:t})=>({label:t,value:e})),onChange:e=>E("configId",e&&e.value||null)}))),/* @__PURE__ */l.createElement("div",{className:"form-group"},/* @__PURE__ */l.createElement("div",{className:"col-md-3 sm-label-right"},"Start Time ",/* @__PURE__ */l.createElement(qt,{id:"pipeline.config.canary.startTimeIso"})),/* @__PURE__ */l.createElement("div",{className:"col-md-7"},/* @__PURE__ */l.createElement(Nl,{errors:h,touched:n,name:"startTime"}))),/* @__PURE__ */l.createElement("div",{className:"form-group"},/* @__PURE__ */l.createElement("div",{className:"col-md-3 sm-label-right"},"End Time ",/* @__PURE__ */l.createElement(qt,{id:"pipeline.config.canary.endTimeIso"})),/* @__PURE__ */l.createElement("div",{className:"col-md-7"},/* @__PURE__ */l.createElement(Nl,{errors:h,touched:n,name:"endTime"}))),/* @__PURE__ */l.createElement("div",{className:"form-group"},/* @__PURE__ */l.createElement("div",{className:"col-md-3 sm-label-right"},"Step"),/* @__PURE__ */l.createElement("div",{className:"col-md-7"},/* @__PURE__ */l.createElement(Nl,{errors:h,touched:n,type:"number",style:{width:"60px",display:"inline-block"},name:"step"}),/* @__PURE__ */l.createElement("span",{className:"form-control-static"}," seconds"))),/* @__PURE__ */l.createElement("h5",null,"Baseline + Canary Pair"),/* @__PURE__ */l.createElement("div",{className:"horizontal-rule"}),/* @__PURE__ */l.createElement("div",{className:"form-group"},/* @__PURE__ */l.createElement("div",{className:"col-md-3 sm-label-right"},"Baseline ",/* @__PURE__ */l.createElement(qt,{id:"pipeline.config.canary.baselineGroup"})),/* @__PURE__ */l.createElement("div",{className:"col-md-7"},/* @__PURE__ */l.createElement(Nl,{name:"baselineScope",errors:h,touched:n}))),/* @__PURE__ */l.createElement("div",{className:"form-group"},/* @__PURE__ */l.createElement("div",{className:"col-md-3 sm-label-right"},"Baseline Location ",/* @__PURE__ */l.createElement(qt,{id:"pipeline.config.canary.baselineLocation"})),/* @__PURE__ */l.createElement("div",{className:"col-md-7"},/* @__PURE__ */l.createElement(yl,{hasLocationChoices:w,showAll:c,recommendedLocations:v,locations:S,value:a.baselineLocation,field:"baselineLocation",errors:h,touched:n,onChange:e=>{f("baselineLocation",!0),E("baselineLocation",e)},onShowAllChange:e=>this.setState({showAllControlLocations:e})}))),/* @__PURE__ */l.createElement("div",{className:"form-group"},/* @__PURE__ */l.createElement("div",{className:"col-md-3 sm-label-right"},"Canary ",/* @__PURE__ */l.createElement(qt,{id:"pipeline.config.canary.canaryGroup"})),/* @__PURE__ */l.createElement("div",{className:"col-md-7"},/* @__PURE__ */l.createElement(Nl,{errors:h,touched:n,name:"canaryScope"}))),/* @__PURE__ */l.createElement("div",{className:"form-group"},/* @__PURE__ */l.createElement("div",{className:"col-md-3 sm-label-right"},"Canary Location ",/* @__PURE__ */l.createElement(qt,{id:"pipeline.config.canary.canaryLocation"})),/* @__PURE__ */l.createElement("div",{className:"col-md-7"},/* @__PURE__ */l.createElement(yl,{hasLocationChoices:w,showAll:i,recommendedLocations:v,locations:S,value:a.canaryLocation,field:"canaryLocation",errors:h,touched:n,onChange:e=>{f("canaryLocation",!0),E("canaryLocation",e)},onShowAllChange:e=>this.setState({showAllExperimentLocations:e})}))),/* @__PURE__ */l.createElement("h5",null,"Metric Scope"),/* @__PURE__ */l.createElement("div",{className:"horizontal-rule"}),pl.hasOwnProperty(ea(y,"type"))&&/* @__PURE__ */l.createElement("div",{className:"form-group"},/* @__PURE__ */l.createElement("div",{className:"col-md-3 sm-label-right"},"Resource Type"),/* @__PURE__ */l.createElement("div",{className:"col-md-7"},/* @__PURE__ */l.createElement(Jt,{value:a.resourceType,options:pl[y.type],onChange:e=>E("resourceType",e&&e.value||"")}),/* @__PURE__ */l.createElement(vl,{field:"resourceType",errors:h,touched:n}))),/* @__PURE__ */l.createElement("div",{className:"form-group"},/* @__PURE__ */l.createElement("div",{className:"col-md-3 sm-label-right"},"Extended Params ",/* @__PURE__ */l.createElement(qt,{id:"pipeline.config.canary.extendedScopeParams"})),/* @__PURE__ */l.createElement("div",{className:"col-md-7"},/* @__PURE__ */l.createElement(Zt,{model:a.extendedScopeParams,onChange:e=>E("extendedScopeParams",e),hiddenKeys:["resourceType"]}))),/* @__PURE__ */l.createElement("h5",null,"Scoring Thresholds"),/* @__PURE__ */l.createElement("div",{className:"horizontal-rule"}),/* @__PURE__ */l.createElement(vt,{onChange:({unhealthyScore:e,successfulScore:t})=>{E("marginalThreshold",e),E("passThreshold",t)},successfulHelpFieldId:"pipeline.config.canary.passingScore",successfulLabel:"Pass ",successfulScore:a.passThreshold,unhealthyHelpFieldId:"pipeline.config.canary.marginalScore",unhealthyLabel:"Marginal ",unhealthyScore:a.marginalThreshold}),u&&/* @__PURE__ */l.createElement(bl,{metricsStores:o,selectedMetricsStore:y,objectStores:m,selectedObjectStore:b,onChange:E,errors:h,touched:n})))),ea(g,"error")&&/* @__PURE__ */l.createElement("div",{className:"row"},/* @__PURE__ */l.createElement("div",{className:"col-md-7 col-md-offset-3"},/* @__PURE__ */l.createElement("div",{className:"well-compact alert alert-danger"},/* @__PURE__ */l.createElement("b",null,"There was a problem starting your analysis:"),/* @__PURE__ */l.createElement("span",null,JSON.stringify(g.error.data)))))),/* @__PURE__ */l.createElement(da.Footer,{className:"horizontal right"},/* @__PURE__ */l.createElement("button",{className:"btn btn-default",onClick:e,type:"button"},"Cancel"),/* @__PURE__ */l.createElement(fl,{isValid:d,isSubmitting:p,errors:h})))}})}};gl.defaultProps={closeModal:Pt,dismissModal:Pt,initialValues:{configId:null,startTime:"",endTime:"",step:"",baselineScope:"",canaryScope:"",baselineLocation:"",canaryLocation:"",extendedScopeParams:{},resourceType:"",marginalThreshold:"",passThreshold:"",metricsAccountName:"",storageAccountName:""}};let El=gl;const fl=({errors:e,isValid:t,isSubmitting:a})=>{const n=/* @__PURE__ */l.createElement(Kt,{isDisabled:!t,submitting:a,isFormSubmit:!0,label:"Start analysis"}),r=Object.values(e).map((e,t)=>/* @__PURE__ */l.createElement("li",{key:t},e));if(t||!r.length)return n;/* @__PURE__ */
|
|
64
|
+
return l.createElement("div",{className:"sp-margin-s-left"},/* @__PURE__ */l.createElement(Bt,{Component:()=>/* @__PURE__ */l.createElement("div",null,"The following errors must be corrected before submitting:",/* @__PURE__ */l.createElement("ul",null,r))},n))},hl=(e,t,a)=>e?[...new Set(t.concat(a))]:t.length>0?t:a,yl=({hasLocationChoices:e,showAll:t,recommendedLocations:a,locations:n,value:r,onChange:c,onShowAllChange:i,errors:s,touched:o,field:m})=>{if(!e)/* @__PURE__ */
|
|
65
|
+
return l.createElement(Nl,{name:m,errors:s,touched:o});const u=hl(t,a,n).sort().map(e=>({label:e,value:e}));/* @__PURE__ */
|
|
66
|
+
return l.createElement(l.Fragment,null,/* @__PURE__ */l.createElement(Jt,{clearable:!1,value:r,options:u,onChange:e=>c(e&&e.value||"")}),/* @__PURE__ */l.createElement(vl,{field:m,errors:s,touched:o}),a.length>0&&n.length>0&&/* @__PURE__ */l.createElement("div",{className:"pull-right"},/* @__PURE__ */l.createElement("button",{type:"button",className:"link",onClick:()=>{i(!t),hl(!t,a,n).includes(r)||c("")}},t?"Only show recommended locations":"Show all locations")))},bl=({metricsStores:e,selectedMetricsStore:t,objectStores:a,selectedObjectStore:n,onChange:r,errors:c,touched:i})=>/* @__PURE__ */l.createElement(l.Fragment,null,/* @__PURE__ */l.createElement("h5",null,"Advanced Settings"),/* @__PURE__ */l.createElement("div",{className:"horizontal-rule"}),/* @__PURE__ */l.createElement("div",{className:"form-group"},/* @__PURE__ */l.createElement("div",{className:"col-md-3 sm-label-right"},"Metrics Account ",/* @__PURE__ */l.createElement(qt,{id:"pipeline.config.metricsAccount"})),/* @__PURE__ */l.createElement("div",{className:"col-md-7"},/* @__PURE__ */l.createElement(Jt,{clearable:!1,value:ea(t,"name"),options:e.map(({name:e})=>({label:e,value:e})),onChange:e=>r("metricsAccountName",e&&e.value||"")}),/* @__PURE__ */l.createElement(vl,{field:"metricsAccountName",errors:c,touched:i}))),/* @__PURE__ */l.createElement("div",{className:"form-group"},/* @__PURE__ */l.createElement("div",{className:"col-md-3 sm-label-right"},"Storage Account ",/* @__PURE__ */l.createElement(qt,{id:"pipeline.config.storageAccount"})),/* @__PURE__ */l.createElement("div",{className:"col-md-7"},/* @__PURE__ */l.createElement(Jt,{clearable:!1,value:ea(n,"name"),options:a.map(({name:e})=>({label:e,value:e})),onChange:e=>r("storageAccountName",e&&e.value||"")}),/* @__PURE__ */l.createElement(vl,{field:"storageAccountName",errors:c,touched:i})))),vl=({field:e,errors:t,touched:a})=>a[e]&&t[e]?/* @__PURE__ */l.createElement("div",{className:"error-message"},t[e]):null,Nl=e=>{const{errors:t,name:a,touched:n}=e;/* @__PURE__ */
|
|
67
|
+
return l.createElement(l.Fragment,null,/* @__PURE__ */l.createElement(Ea,{...e,className:"form-control input-sm",required:n[a],error:t[a]}),/* @__PURE__ */l.createElement(vl,{field:a,errors:t,touched:n}))},Cl=({parentPipelineExecutionId:e,application:t})=>{const n=a("home.applications.application.pipelines.executionDetails.execution",{application:t,executionId:e});/* @__PURE__ */
|
|
68
|
+
return l.createElement("a",{...n},"Pipeline")},Sl=i((e,t)=>({configId:yt(e,t.executionId),...t}))(({configId:e,executionId:t,children:n})=>{const r=a("^.reportDetail",{configId:e,runId:t});/* @__PURE__ */
|
|
69
|
+
return l.createElement("a",{...r},n)}),wl=(e,t)=>Object.keys(e).reduce((a,n)=>{const{controlScope:l,experimentScope:r}=e[n],c=((e,t)=>t.some(({query:t,scopeName:a})=>a===e&&"atlas"===t.type))(n,t);return c&&"global"===ea(l,"extendedScopeParams.dataset")?a.add("Global"):a.add(l.location),c&&"global"===ea(r,"extendedScopeParams.dataset")?a.add("Global"):a.add(r.location),a},/* @__PURE__ */new Set),xl=[{label:"Summary",getContent:e=>/* @__PURE__ */l.createElement("div",null,/* @__PURE__ */l.createElement(Sl,{configName:e.config.name,executionId:e.pipelineId,application:e.application},
|
|
70
|
+
/* @__PURE__ */l.createElement(In,{score:e.result.judgeResult.score,showClassification:!1,inverse:!0})," ",
|
|
71
|
+
/* @__PURE__ */l.createElement(ja,{dateIso:e.startTimeIso})),e.startTimeIso&&/* @__PURE__ */l.createElement("div",{className:"color-text-caption body-small"},Qt(new Date(e.startTimeIso).getTime())))},{label:"Locations",getContent:({canaryExecutionRequest:{scopes:e},config:{metrics:t}})=>{const a=[...wl(e,t)];/* @__PURE__ */
|
|
72
|
+
return l.createElement("div",{className:"vertical"},a.map(e=>/* @__PURE__ */l.createElement("span",{key:e},e)))}},{label:"Config",getContent:e=>/* @__PURE__ */l.createElement(dl,{configName:e.config.name,executionId:e.pipelineId,application:e.application})},{label:"Scopes",getContent:({canaryExecutionRequest:{scopes:e}})=>{const t=Object.keys(e).reduce((t,a)=>t.add(e[a].controlScope.scope),
|
|
73
|
+
/* @__PURE__ */new Set),a=Object.keys(e).reduce((t,a)=>t.add(e[a].experimentScope.scope),
|
|
74
|
+
/* @__PURE__ */new Set),n={maxWidth:"350px",wordBreak:"break-all"};return ma(t,a)?/* @__PURE__ */l.createElement("div",{className:"vertical",style:n},[...a].map(e=>/* @__PURE__ */l.createElement("span",{key:e},e))):/* @__PURE__ */l.createElement("div",{className:"vertical",style:n},/* @__PURE__ */l.createElement("span",{className:"heading-6 uppercase color-text-caption"},"Baseline"),[...t].map(e=>/* @__PURE__ */l.createElement("span",{key:e},e)),/* @__PURE__ */l.createElement("span",{className:"heading-6 uppercase color-text-caption",style:{marginTop:"5px"}},"Canary"),[...a].map(e=>/* @__PURE__ */l.createElement("span",{key:e},e)))}},{getContent:({parentPipelineExecutionId:e,application:t})=>e&&e!==Nt&&/* @__PURE__ */l.createElement(Cl,{parentPipelineExecutionId:e,application:t})}],kl=(e,t)=>re.manualAnalysisEnabled?xl.concat([{label:"Actions",getContent:a=>/* @__PURE__ */l.createElement(jt,{value:"Re-run analysis"},/* @__PURE__ */l.createElement("button",{className:"link",onClick:()=>Tl(a,e,t)},/* @__PURE__ */l.createElement("i",{className:"fas fa-redo-alt"})))}]):xl,Tl=(e,t,a)=>{var n;const{controlScope:l,experimentScope:r}=Object.values(e.canaryExecutionRequest.scopes)[0],c=`${null!=(n=l.step)?n:60}`;El.show({title:"Start Manual Analysis",application:t,accounts:a,initialValues:{configId:e.canaryConfigId,startTime:l.start,endTime:l.end,step:c,baselineScope:l.scope,canaryScope:r.scope,baselineLocation:l.location,canaryLocation:r.location,extendedScopeParams:l.extendedScopeParams,resourceType:l.resourceType,marginalThreshold:`${e.canaryExecutionRequest.thresholds.marginal}`,passThreshold:`${e.canaryExecutionRequest.thresholds.pass}`,metricsAccountName:e.metricsAccountName,storageAccountName:e.storageAccountName}})},Il=({executions:e,application:t,accounts:a})=>t.getDataSource("canaryExecutions").loaded?e&&e.length?/* @__PURE__ */l.createElement(je,{rows:e,className:"flex-1 execution-list-table",columns:kl(t,a),rowKey:e=>e.pipelineId}):/* @__PURE__ */l.createElement(cn,null,/* @__PURE__ */l.createElement("h3",{className:"heading-3"},"No canary execution history for this application.")):/* @__PURE__ */l.createElement(cn,null,/* @__PURE__ */l.createElement("div",{className:"horizontal center middle spinner-container"},/* @__PURE__ */l.createElement(Ft,null))),Ml=i(e=>({executions:Object.values(e.data.executions.data).filter(e=>e.result),application:e.data.application,accounts:e.data.kayentaAccounts.data,executionsCount:e.app.executionsCount}))(({executions:e,application:t,accounts:a,executionsCount:r})=>{var c;const{stateService:i}=n();l.useEffect(()=>{const e=t.getDataSource("canaryExecutions");return e.active||e.activate(),e.refresh(),()=>e.deactivate()},[t,r]);const s=null!=(c=re.executionsCountOptions)?c:[20,50,100,200];return s.includes(r)||(s.push(r),s.sort((e,t)=>e-t)),/* @__PURE__ */l.createElement("div",{className:"vertical execution-list-container"},/* @__PURE__ */l.createElement("div",{className:"horizontal space-between form-inline"},/* @__PURE__ */l.createElement("div",{className:"form-group"},s.length>1&&/* @__PURE__ */l.createElement(l.Fragment,null,/* @__PURE__ */l.createElement("span",{className:"sp-margin-s-right"},"Showing"),/* @__PURE__ */l.createElement("select",{className:"form-control input-sm",onChange:e=>((e,t)=>{t.go(".",{count:Number(e.target.value)})})(e,i)},s.map(e=>/* @__PURE__ */l.createElement("option",{selected:r===e,value:e},e))),/* @__PURE__ */l.createElement("span",{className:"sp-margin-s-left"},"most recent reports"))),re.manualAnalysisEnabled&&/* @__PURE__ */l.createElement("button",{style:{alignSelf:"flex-end",flexShrink:0},className:"primary",onClick:()=>((e,t)=>{El.show({title:"Start Manual Analysis",application:e,accounts:t})})(t,a)},
|
|
75
|
+
/* @__PURE__ */l.createElement("i",{className:"fa fa-play"})," Start Manual Analysis")),/* @__PURE__ */l.createElement(Il,{executions:e,application:t,accounts:a}))}),Al=i(e=>({loadState:e.data.executions.load}))(({loadState:e})=>{const t=(new $a).onFulfilled(/* @__PURE__ */l.createElement(Ml,null)).onFailed(
|
|
76
|
+
/* @__PURE__ */l.createElement(cn,null,/* @__PURE__ */l.createElement("h3",{className:"heading-3"},"Could not load canary execution history."))).build();/* @__PURE__ */
|
|
77
|
+
return l.createElement(t,{state:e})}),Rl=()=>/* @__PURE__ */l.createElement("div",{className:"vertical flex-1"},/* @__PURE__ */l.createElement(e,{wrap:!1,name:"detail"}));const Dl=l.lazy(()=>import(
|
|
78
|
+
/* webpackChunkName: "Lazy-KayentaGraphs" */
|
|
79
|
+
"./semioticGraph-DZKeA54O.js")),Ll=[st.TimeSeries,st.Histogram,st.BoxPlot];ct.register({name:"semiotic",handlesGraphType:e=>Ll.includes(e),getGraph:()=>e=>/* @__PURE__ */l.createElement(r,{fallback:/* @__PURE__ */l.createElement(Ft,null)},/* @__PURE__ */l.createElement(Dl,{...e}))});const zl={initializeStore:function(e){if(La)return;const t=wt(),a=[t,ya,ba];La=s(le,o(...re.reduxLogger?[...a,m]:a)),t.run(Da(e))},registerStates:function(e,t){var a,n,l;const r={name:"canaryConfig",url:"/config",views:{canary:{component:fn,$type:"react"}},children:[{name:"configDefault",url:"",views:{detail:{component:Nn,$type:"react"}}},{name:"configDetail",url:"/:id?copy&new",views:{detail:{component:mn,$type:"react"},footer:{component:vn,$type:"react"}},params:{copy:{type:"boolean",value:!1,squash:!0},new:{type:"boolean",value:!1,squash:!0}},resolve:[{token:"configNameStream",deps:[Xt],resolveFn:e=>e.globals.params$}]}],redirectTo:e=>e.to().name+".configDefault"},c={name:"reportDetail",url:"/:configId/:runId",views:{detail:{component:ul,$type:"react"}},resolve:[{token:"resultIdStream",deps:[Xt],resolveFn:e=>e.globals.params$}]},i={name:"reportDefault",url:"",views:{detail:{component:Al,$type:"react"}}},s={name:"report",url:"/report?count",views:{canary:{component:Rl,$type:"react"}},params:{count:{type:"int",value:null!=(l=null!=(n=re.defaultExecutionCount)?n:null==(a=re.executionsCountOptions)?void 0:a[0])?l:20,squash:!0}},children:[c,i],redirectTo:e=>e.to().name+".reportDefault"},o={abstract:!0,name:"canary",url:"/canary",views:{insight:{component:za,$type:"react"}},data:{pageTitleSection:{title:"Canary"}},children:[r,s]};t.addChildState(o)},registerTransitionHooks:function(e){e.transitionService.onBefore({},()=>{const e=La.getState();if(e.selectedConfig&&!e.selectedConfig.isInSyncWithServer&&!window.confirm("You have unsaved changes.\nAre you sure you want to navigate away from this page?"))return!1},{priority:10}),e.transitionService.onBefore({from:"**.configDetail.**",to:e=>!e.name.includes("configDetail")},()=>{La.dispatch(Ct())}),e.transitionService.onEnter({to:"**.configDetail.**"},()=>{window.onbeforeunload=()=>{const e=La.getState();return e.selectedConfig&&!e.selectedConfig.isInSyncWithServer||null}}),e.transitionService.onExit({from:"**.configDetail.**"},()=>{window.onbeforeunload=null}),e.transitionService.onSuccess({to:"**.report.**"},e=>{e.params("from").count!==e.params("to").count&&La.dispatch(St({count:e.params("to").count}))})},bridgeDataSource:function(){ce.afterConfigsLoaded=e=>{e===La.getState().data.application&&La.dispatch(ie({configSummaries:e.getDataSource("canaryConfigs").data}))},ce.afterJudgesLoaded=e=>{e===La.getState().data.application&&La.dispatch(se({judges:e.getDataSource("canaryJudges").data}))},ce.loadCanaryExecutions=(e,t)=>{const a=oe(e.name,t);return a.catch(e=>{La.dispatch(me({error:e}))}),a},ce.afterCanaryExecutionsLoaded=e=>{e===La.getState().data.application&&La.dispatch(ue({executions:e.getDataSource("canaryExecutions").data}))}}};function $l(e,t,a=zl){const{stateRegistry:n}=t;return a.initializeStore(t),n.get().filter(e=>e.name.match(/home.(project|applications).application.canary/)).sort((e,t)=>t.name.length-e.name.length).forEach(e=>n.deregister(e)),a.registerStates(t,e),a.registerTransitionHooks(t),a.bridgeDataSource(),{}}export{$l as lazyInitializeKayenta};
|
|
80
|
+
//# sourceMappingURL=lazy-BajpuB6R.js.map
|