@spinnaker/kayenta 0.0.0-2025.1-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.
Files changed (289) hide show
  1. package/.editorconfig +9 -0
  2. package/.eslintrc.js +1 -0
  3. package/.huskyrc +5 -0
  4. package/.lintstagedrc.json +4 -0
  5. package/.prettierignore +4 -0
  6. package/.prettierrc.js +1 -0
  7. package/LICENSE.txt +203 -0
  8. package/README.md +81 -0
  9. package/__mocks__/styleMock.js +1 -0
  10. package/__mocks__/version.json +4 -0
  11. package/babel.config.js +3 -0
  12. package/build.gradle +67 -0
  13. package/build_scripts/checkLicenses.js +79 -0
  14. package/gradle.properties +0 -0
  15. package/jest.config.js +204 -0
  16. package/jest.setup.js +5 -0
  17. package/package.json +166 -0
  18. package/rollup-plugin-angularjs-template-loader.js +82 -0
  19. package/rollup.config.js +30 -0
  20. package/src/index.ts +2 -0
  21. package/src/kayenta/actions/creators.ts +163 -0
  22. package/src/kayenta/actions/index.ts +98 -0
  23. package/src/kayenta/canary.dataSource.bridge.ts +53 -0
  24. package/src/kayenta/canary.dataSource.stub.ts +64 -0
  25. package/src/kayenta/canary.help.ts +136 -0
  26. package/src/kayenta/canary.less +168 -0
  27. package/src/kayenta/canary.settings.ts +26 -0
  28. package/src/kayenta/canary.tsx +67 -0
  29. package/src/kayenta/components/canaryScore.component.less +77 -0
  30. package/src/kayenta/components/canaryScore.component.ts +12 -0
  31. package/src/kayenta/components/canaryScore.tsx +63 -0
  32. package/src/kayenta/components/canaryScores.component.ts +20 -0
  33. package/src/kayenta/components/canaryScores.less +22 -0
  34. package/src/kayenta/components/canaryScores.tsx +163 -0
  35. package/src/kayenta/components/loadStates.tsx +52 -0
  36. package/src/kayenta/domain/ICanaryConfig.ts +57 -0
  37. package/src/kayenta/domain/ICanaryConfigSummary.ts +7 -0
  38. package/src/kayenta/domain/ICanaryConfigUpdateResponse.ts +3 -0
  39. package/src/kayenta/domain/ICanaryExecutionStatusResult.ts +72 -0
  40. package/src/kayenta/domain/ICanaryJudgeResult.ts +51 -0
  41. package/src/kayenta/domain/ICanaryJudgeResultSummary.ts +5 -0
  42. package/src/kayenta/domain/ICanaryScoreThresholds.ts +4 -0
  43. package/src/kayenta/domain/IJudge.ts +5 -0
  44. package/src/kayenta/domain/IKayentaAccount.ts +14 -0
  45. package/src/kayenta/domain/IKayentaStageConfig.ts +58 -0
  46. package/src/kayenta/domain/IMetricSetPair.ts +17 -0
  47. package/src/kayenta/domain/IMetricsServiceMetadata.ts +2 -0
  48. package/src/kayenta/domain/ISetupCanaryStage.ts +11 -0
  49. package/src/kayenta/domain/MetricClassificationLabel.ts +8 -0
  50. package/src/kayenta/domain/ScoreClassificationLabel.ts +7 -0
  51. package/src/kayenta/domain/index.ts +15 -0
  52. package/src/kayenta/edit/changeMetricGroupModal.tsx +107 -0
  53. package/src/kayenta/edit/configDetail.tsx +31 -0
  54. package/src/kayenta/edit/configDetailActionButtons.tsx +24 -0
  55. package/src/kayenta/edit/configDetailHeader.tsx +104 -0
  56. package/src/kayenta/edit/configDetailLoadStates.tsx +36 -0
  57. package/src/kayenta/edit/configDetailLoader.tsx +60 -0
  58. package/src/kayenta/edit/configJson.less +42 -0
  59. package/src/kayenta/edit/configJsonModal.tsx +158 -0
  60. package/src/kayenta/edit/configList.less +7 -0
  61. package/src/kayenta/edit/configList.tsx +57 -0
  62. package/src/kayenta/edit/copyConfigButton.tsx +34 -0
  63. package/src/kayenta/edit/createConfigButton.tsx +34 -0
  64. package/src/kayenta/edit/deleteModal.tsx +87 -0
  65. package/src/kayenta/edit/edit.tsx +24 -0
  66. package/src/kayenta/edit/editMetricEffectSizes.tsx +186 -0
  67. package/src/kayenta/edit/editMetricModal.less +9 -0
  68. package/src/kayenta/edit/editMetricModal.spec.tsx +129 -0
  69. package/src/kayenta/edit/editMetricModal.tsx +294 -0
  70. package/src/kayenta/edit/editMetricValidation.spec.ts +63 -0
  71. package/src/kayenta/edit/editMetricValidation.ts +50 -0
  72. package/src/kayenta/edit/filterTemplateSelector.less +15 -0
  73. package/src/kayenta/edit/filterTemplateSelector.spec.tsx +106 -0
  74. package/src/kayenta/edit/filterTemplateSelector.tsx +194 -0
  75. package/src/kayenta/edit/filterTemplatesValidation.spec.ts +108 -0
  76. package/src/kayenta/edit/filterTemplatesValidation.ts +95 -0
  77. package/src/kayenta/edit/footer.less +30 -0
  78. package/src/kayenta/edit/footer.tsx +12 -0
  79. package/src/kayenta/edit/groupName.tsx +80 -0
  80. package/src/kayenta/edit/groupTabs.tsx +106 -0
  81. package/src/kayenta/edit/groupWeight.tsx +80 -0
  82. package/src/kayenta/edit/groupWeights.tsx +38 -0
  83. package/src/kayenta/edit/inlineTemplateEditor.spec.tsx +42 -0
  84. package/src/kayenta/edit/inlineTemplateEditor.tsx +61 -0
  85. package/src/kayenta/edit/judgeSelect.tsx +82 -0
  86. package/src/kayenta/edit/metricConfigurerDelegator.tsx +30 -0
  87. package/src/kayenta/edit/metricList.less +21 -0
  88. package/src/kayenta/edit/metricList.tsx +215 -0
  89. package/src/kayenta/edit/metricStoreSelector.tsx +66 -0
  90. package/src/kayenta/edit/nameAndDescription.tsx +90 -0
  91. package/src/kayenta/edit/openConfigJsonModalButton.tsx +33 -0
  92. package/src/kayenta/edit/openDeleteModalButton.tsx +50 -0
  93. package/src/kayenta/edit/ownedBy.tsx +34 -0
  94. package/src/kayenta/edit/save.tsx +19 -0
  95. package/src/kayenta/edit/saveConfigButton.tsx +65 -0
  96. package/src/kayenta/edit/saveConfigError.tsx +59 -0
  97. package/src/kayenta/edit/scoring.tsx +35 -0
  98. package/src/kayenta/edit/selectConfig.tsx +10 -0
  99. package/src/kayenta/edit/validationErrors.tsx +39 -0
  100. package/src/kayenta/index.ts +6 -0
  101. package/src/kayenta/layout/addNewButton.tsx +20 -0
  102. package/src/kayenta/layout/centeredDetail.tsx +13 -0
  103. package/src/kayenta/layout/deleteButton.tsx +11 -0
  104. package/src/kayenta/layout/disableable.tsx +87 -0
  105. package/src/kayenta/layout/formList.tsx +26 -0
  106. package/src/kayenta/layout/formRow.tsx +36 -0
  107. package/src/kayenta/layout/formattedDate.tsx +14 -0
  108. package/src/kayenta/layout/index.ts +2 -0
  109. package/src/kayenta/layout/keyValueList.less +20 -0
  110. package/src/kayenta/layout/keyValueList.tsx +114 -0
  111. package/src/kayenta/layout/list.less +9 -0
  112. package/src/kayenta/layout/list.spec.tsx +83 -0
  113. package/src/kayenta/layout/list.tsx +73 -0
  114. package/src/kayenta/layout/listDetail.tsx +33 -0
  115. package/src/kayenta/layout/radioChoice.tsx +29 -0
  116. package/src/kayenta/layout/styleguide.tsx +16 -0
  117. package/src/kayenta/layout/table/index.ts +5 -0
  118. package/src/kayenta/layout/table/nativeTable.tsx +51 -0
  119. package/src/kayenta/layout/table/nativeTableHeader.tsx +26 -0
  120. package/src/kayenta/layout/table/table.tsx +56 -0
  121. package/src/kayenta/layout/table/tableColumn.ts +7 -0
  122. package/src/kayenta/layout/table/tableHeader.tsx +23 -0
  123. package/src/kayenta/layout/tabs.tsx +26 -0
  124. package/src/kayenta/layout/titledSection.less +16 -0
  125. package/src/kayenta/layout/titledSection.tsx +20 -0
  126. package/src/kayenta/layout/titledSubsection.less +11 -0
  127. package/src/kayenta/layout/titledSubsection.tsx +22 -0
  128. package/src/kayenta/manualAnalysis/ManualAnalysisModal.tsx +716 -0
  129. package/src/kayenta/metricStore/atlas/atlasMetricConfigurer.tsx +130 -0
  130. package/src/kayenta/metricStore/atlas/index.ts +8 -0
  131. package/src/kayenta/metricStore/datadog/domain/IDatadogMetricDescriptor.ts +5 -0
  132. package/src/kayenta/metricStore/datadog/index.ts +9 -0
  133. package/src/kayenta/metricStore/datadog/metricConfigurer.tsx +90 -0
  134. package/src/kayenta/metricStore/datadog/metricTypeSelector.spec.tsx +59 -0
  135. package/src/kayenta/metricStore/datadog/metricTypeSelector.tsx +73 -0
  136. package/src/kayenta/metricStore/graphite/domain/IGraphiteMetricDescriptor.ts +5 -0
  137. package/src/kayenta/metricStore/graphite/index.ts +8 -0
  138. package/src/kayenta/metricStore/graphite/metricConfigurer.tsx +54 -0
  139. package/src/kayenta/metricStore/graphite/metricTypeSelector.tsx +80 -0
  140. package/src/kayenta/metricStore/graphite/typeahead.less +3 -0
  141. package/src/kayenta/metricStore/index.ts +8 -0
  142. package/src/kayenta/metricStore/metricStoreConfig.service.ts +12 -0
  143. package/src/kayenta/metricStore/newrelic/domain/INewRelicMetricDescriptor.ts +5 -0
  144. package/src/kayenta/metricStore/newrelic/index.ts +8 -0
  145. package/src/kayenta/metricStore/newrelic/metricConfigurer.tsx +58 -0
  146. package/src/kayenta/metricStore/prometheus/domain/IPrometheusCanaryMetricSetQueryConfig.ts +14 -0
  147. package/src/kayenta/metricStore/prometheus/domain/IPrometheusMetricDescriptor.ts +5 -0
  148. package/src/kayenta/metricStore/prometheus/index.ts +12 -0
  149. package/src/kayenta/metricStore/prometheus/metricConfigurer.tsx +157 -0
  150. package/src/kayenta/metricStore/prometheus/metricTypeSelector.less +5 -0
  151. package/src/kayenta/metricStore/prometheus/metricTypeSelector.spec.tsx +62 -0
  152. package/src/kayenta/metricStore/prometheus/metricTypeSelector.tsx +144 -0
  153. package/src/kayenta/metricStore/prometheus/queryTypeSelectors.spec.ts +61 -0
  154. package/src/kayenta/metricStore/prometheus/queryTypeSelectors.ts +38 -0
  155. package/src/kayenta/metricStore/signalfx/domain/ISignalFxCanaryMetricSetQueryConfig.ts +7 -0
  156. package/src/kayenta/metricStore/signalfx/index.ts +8 -0
  157. package/src/kayenta/metricStore/signalfx/metricConfigurer.less +10 -0
  158. package/src/kayenta/metricStore/signalfx/metricConfigurer.tsx +187 -0
  159. package/src/kayenta/metricStore/stackdriver/domain/IStackdriverCanaryMetricSetQueryConfig.ts +9 -0
  160. package/src/kayenta/metricStore/stackdriver/domain/IStackdriverMetricDescriptor.ts +17 -0
  161. package/src/kayenta/metricStore/stackdriver/index.ts +12 -0
  162. package/src/kayenta/metricStore/stackdriver/metricConfigurer.tsx +144 -0
  163. package/src/kayenta/metricStore/stackdriver/metricTypeSelector.spec.tsx +92 -0
  164. package/src/kayenta/metricStore/stackdriver/metricTypeSelector.tsx +113 -0
  165. package/src/kayenta/middleware/actionInterceptor.ts +29 -0
  166. package/src/kayenta/middleware/asyncDispatch.ts +37 -0
  167. package/src/kayenta/middleware/epics.ts +211 -0
  168. package/src/kayenta/middleware/index.ts +3 -0
  169. package/src/kayenta/navigation/canary.states.stub.ts +28 -0
  170. package/src/kayenta/navigation/canary.states.ts +182 -0
  171. package/src/kayenta/reducers/app.ts +56 -0
  172. package/src/kayenta/reducers/asyncRequest.ts +5 -0
  173. package/src/kayenta/reducers/data.ts +169 -0
  174. package/src/kayenta/reducers/editingTemplate.ts +54 -0
  175. package/src/kayenta/reducers/group.ts +82 -0
  176. package/src/kayenta/reducers/index.ts +245 -0
  177. package/src/kayenta/reducers/prometheusMetricConfig.spec.ts +33 -0
  178. package/src/kayenta/reducers/prometheusMetricConfig.ts +56 -0
  179. package/src/kayenta/reducers/selectedConfig.spec.ts +190 -0
  180. package/src/kayenta/reducers/selectedConfig.ts +566 -0
  181. package/src/kayenta/reducers/selectedRun.ts +101 -0
  182. package/src/kayenta/reducers/signalFxMetricConfig.ts +36 -0
  183. package/src/kayenta/reducers/stackdriverMetricConfig.spec.ts +33 -0
  184. package/src/kayenta/reducers/stackdriverMetricConfig.ts +41 -0
  185. package/src/kayenta/reducers/templates.spec.ts +192 -0
  186. package/src/kayenta/reducers/validators.ts +118 -0
  187. package/src/kayenta/report/detail/allMetricResultsHeader.tsx +32 -0
  188. package/src/kayenta/report/detail/clickableHeader.tsx +21 -0
  189. package/src/kayenta/report/detail/colors.ts +47 -0
  190. package/src/kayenta/report/detail/detail.less +16 -0
  191. package/src/kayenta/report/detail/detail.tsx +48 -0
  192. package/src/kayenta/report/detail/detailLoader.tsx +55 -0
  193. package/src/kayenta/report/detail/graph/graph.tsx +37 -0
  194. package/src/kayenta/report/detail/graph/metricSetPairGraph.service.ts +35 -0
  195. package/src/kayenta/report/detail/graph/semiotic/boxplot.less +45 -0
  196. package/src/kayenta/report/detail/graph/semiotic/boxplot.tsx +283 -0
  197. package/src/kayenta/report/detail/graph/semiotic/chartHeader.tsx +19 -0
  198. package/src/kayenta/report/detail/graph/semiotic/chartLegend.less +26 -0
  199. package/src/kayenta/report/detail/graph/semiotic/chartLegend.tsx +42 -0
  200. package/src/kayenta/report/detail/graph/semiotic/circleIcon.tsx +16 -0
  201. package/src/kayenta/report/detail/graph/semiotic/config.less +5 -0
  202. package/src/kayenta/report/detail/graph/semiotic/config.ts +38 -0
  203. package/src/kayenta/report/detail/graph/semiotic/customAxisTickLabel.tsx +17 -0
  204. package/src/kayenta/report/detail/graph/semiotic/declarations/labella.d.ts +16 -0
  205. package/src/kayenta/report/detail/graph/semiotic/declarations/react-container-dimensions.d.ts +3 -0
  206. package/src/kayenta/report/detail/graph/semiotic/declarations/semiotic.d.ts +160 -0
  207. package/src/kayenta/report/detail/graph/semiotic/differenceArea.less +17 -0
  208. package/src/kayenta/report/detail/graph/semiotic/differenceArea.tsx +186 -0
  209. package/src/kayenta/report/detail/graph/semiotic/histogram.less +22 -0
  210. package/src/kayenta/report/detail/graph/semiotic/histogram.tsx +251 -0
  211. package/src/kayenta/report/detail/graph/semiotic/index.tsx +19 -0
  212. package/src/kayenta/report/detail/graph/semiotic/noValidDataSign.less +5 -0
  213. package/src/kayenta/report/detail/graph/semiotic/noValidDataSign.tsx +10 -0
  214. package/src/kayenta/report/detail/graph/semiotic/secondaryTSXAxis.less +6 -0
  215. package/src/kayenta/report/detail/graph/semiotic/secondaryTSXAxis.tsx +58 -0
  216. package/src/kayenta/report/detail/graph/semiotic/semiotic.service.ts +32 -0
  217. package/src/kayenta/report/detail/graph/semiotic/semioticGraph.less +53 -0
  218. package/src/kayenta/report/detail/graph/semiotic/semioticGraph.tsx +49 -0
  219. package/src/kayenta/report/detail/graph/semiotic/timeSeries.less +42 -0
  220. package/src/kayenta/report/detail/graph/semiotic/timeSeries.tsx +473 -0
  221. package/src/kayenta/report/detail/graph/semiotic/tooltip.tsx +55 -0
  222. package/src/kayenta/report/detail/graph/semiotic/utils.ts +90 -0
  223. package/src/kayenta/report/detail/graphTypeSelector.less +4 -0
  224. package/src/kayenta/report/detail/graphTypeSelector.tsx +50 -0
  225. package/src/kayenta/report/detail/groupScores.tsx +68 -0
  226. package/src/kayenta/report/detail/header.less +70 -0
  227. package/src/kayenta/report/detail/header.tsx +39 -0
  228. package/src/kayenta/report/detail/headerArrow.tsx +13 -0
  229. package/src/kayenta/report/detail/loadStates.tsx +31 -0
  230. package/src/kayenta/report/detail/metricResultActions.less +29 -0
  231. package/src/kayenta/report/detail/metricResultActions.tsx +87 -0
  232. package/src/kayenta/report/detail/metricResultClassification.tsx +22 -0
  233. package/src/kayenta/report/detail/metricResultDetail.tsx +20 -0
  234. package/src/kayenta/report/detail/metricResultDetailLayout.tsx +19 -0
  235. package/src/kayenta/report/detail/metricResultDeviation.tsx +25 -0
  236. package/src/kayenta/report/detail/metricResultStats.less +9 -0
  237. package/src/kayenta/report/detail/metricResultStats.tsx +120 -0
  238. package/src/kayenta/report/detail/metricResults.less +12 -0
  239. package/src/kayenta/report/detail/metricResults.tsx +52 -0
  240. package/src/kayenta/report/detail/metricResultsClassificationFilters.tsx +65 -0
  241. package/src/kayenta/report/detail/metricResultsColumns.tsx +27 -0
  242. package/src/kayenta/report/detail/metricResultsList.less +44 -0
  243. package/src/kayenta/report/detail/metricResultsList.tsx +120 -0
  244. package/src/kayenta/report/detail/metricSetPairLoadStates.tsx +22 -0
  245. package/src/kayenta/report/detail/multipleResultsTable.tsx +81 -0
  246. package/src/kayenta/report/detail/reportException.tsx +57 -0
  247. package/src/kayenta/report/detail/reportExplanation.less +12 -0
  248. package/src/kayenta/report/detail/reportExplanation.tsx +32 -0
  249. package/src/kayenta/report/detail/reportMetadata.tsx +167 -0
  250. package/src/kayenta/report/detail/reportScores.less +47 -0
  251. package/src/kayenta/report/detail/reportScores.tsx +80 -0
  252. package/src/kayenta/report/detail/score.tsx +33 -0
  253. package/src/kayenta/report/detail/sourceLinks.tsx +69 -0
  254. package/src/kayenta/report/list/configLink.tsx +32 -0
  255. package/src/kayenta/report/list/executionList.less +7 -0
  256. package/src/kayenta/report/list/loadStates.tsx +32 -0
  257. package/src/kayenta/report/list/pipelineLink.tsx +15 -0
  258. package/src/kayenta/report/list/reportLink.tsx +33 -0
  259. package/src/kayenta/report/list/table.tsx +309 -0
  260. package/src/kayenta/report/report.tsx +11 -0
  261. package/src/kayenta/selectors/filterTemplatesSelectors.ts +87 -0
  262. package/src/kayenta/selectors/index.ts +62 -0
  263. package/src/kayenta/service/canaryConfig.service.ts +122 -0
  264. package/src/kayenta/service/canaryRun.service.ts +60 -0
  265. package/src/kayenta/service/delegateFactory.ts +24 -0
  266. package/src/kayenta/service/metricsServiceMetadata.service.ts +9 -0
  267. package/src/kayenta/stages/kayentaStage/AnalysisType.spec.tsx +47 -0
  268. package/src/kayenta/stages/kayentaStage/AnalysisType.tsx +49 -0
  269. package/src/kayenta/stages/kayentaStage/CanaryExecutionLabel.tsx +26 -0
  270. package/src/kayenta/stages/kayentaStage/analysisType.component.ts +12 -0
  271. package/src/kayenta/stages/kayentaStage/canaryRunSummaries.component.ts +12 -0
  272. package/src/kayenta/stages/kayentaStage/canaryRunSummaries.less +5 -0
  273. package/src/kayenta/stages/kayentaStage/canaryRunSummaries.tsx +136 -0
  274. package/src/kayenta/stages/kayentaStage/forAnalysisType.component.ts +45 -0
  275. package/src/kayenta/stages/kayentaStage/kayentaStage.controller.ts +789 -0
  276. package/src/kayenta/stages/kayentaStage/kayentaStage.html +528 -0
  277. package/src/kayenta/stages/kayentaStage/kayentaStage.less +5 -0
  278. package/src/kayenta/stages/kayentaStage/kayentaStage.transformer.ts +179 -0
  279. package/src/kayenta/stages/kayentaStage/kayentaStage.ts +221 -0
  280. package/src/kayenta/stages/kayentaStage/kayentaStageConfigSection.component.ts +21 -0
  281. package/src/kayenta/stages/kayentaStage/kayentaStageExecutionDetails.controller.ts +88 -0
  282. package/src/kayenta/stages/kayentaStage/kayentaStageExecutionDetails.html +114 -0
  283. package/src/kayenta/stages/kayentaStage/kayentaStageExecutionDetails.less +6 -0
  284. package/src/kayenta/stages/kayentaStage/stageTypes.ts +5 -0
  285. package/src/kayenta/utils/duration.spec.ts +69 -0
  286. package/src/kayenta/utils/duration.ts +48 -0
  287. package/src/lazy.ts +29 -0
  288. package/src/stub.ts +60 -0
  289. package/tsconfig.json +11 -0
@@ -0,0 +1,98 @@
1
+ export const LOAD_CONFIG_REQUEST = 'load_config_request';
2
+ export const LOAD_CONFIG_SUCCESS = 'load_config_success';
3
+ export const LOAD_CONFIG_FAILURE = 'load_config_failure';
4
+ export const DELETE_CONFIG_REQUEST = 'delete_config_request';
5
+ export const DELETE_CONFIG_SUCCESS = 'delete_config_success';
6
+ export const DELETE_CONFIG_FAILURE = 'delete_config_failure';
7
+ export const SAVE_CONFIG_REQUEST = 'save_config_request';
8
+ export const SAVE_CONFIG_SUCCESS = 'save_config_success';
9
+ export const SAVE_CONFIG_FAILURE = 'save_config_failure';
10
+ export const DELETE_CONFIG_MODAL_OPEN = 'delete_config_modal_open';
11
+ export const DELETE_CONFIG_MODAL_CLOSE = 'delete_config_modal_close';
12
+ export const DISMISS_SAVE_CONFIG_ERROR = 'dismiss_save_config_error';
13
+ export const SET_EXECUTIONS_COUNT = 'set_executions_count';
14
+ export const INITIALIZE = 'initialize';
15
+ export const ADD_METRIC = 'add_metric';
16
+ export const RENAME_METRIC = 'rename_metric';
17
+ export const EDIT_METRIC_BEGIN = 'edit_metric_begin';
18
+ export const EDIT_METRIC_CONFIRM = 'edit_metric_modal_confirm';
19
+ export const EDIT_METRIC_CANCEL = 'edit_metric_modal_cancel';
20
+ export const UPDATE_METRIC_DIRECTION = 'update_metric_direction';
21
+ export const UPDATE_METRIC_NAN_STRATEGY = 'update_metric_nan_strategy';
22
+ export const UPDATE_METRIC_OUTLIER_STRATEGY = 'update_metric_outlier_strategy';
23
+ export const UPDATE_METRIC_CRITICALITY = 'update_metric_criticality';
24
+ export const UPDATE_METRIC_DATA_REQUIRED = 'update_metric_data_required';
25
+ export const UPDATE_EFFECT_SIZE = 'update_effect_size';
26
+ export const UPDATE_METRIC_GROUP = 'update_metric_group';
27
+ export const UPDATE_METRIC_SCOPE_NAME = 'update_metric_scope_name';
28
+ export const REMOVE_METRIC = 'remove_metric';
29
+ export const SELECT_CONFIG = 'select_config';
30
+ export const CLEAR_SELECTED_CONFIG = 'clear_selected_config';
31
+ export const UPDATE_CONFIG_SUMMARIES = 'update_config_summaries';
32
+ export const ADD_GROUP = 'add_group';
33
+ export const SELECT_GROUP = 'select_group';
34
+ export const UPDATE_CONFIG_NAME = 'update_config_name';
35
+ export const UPDATE_CONFIG_DESCRIPTION = 'update_config_description';
36
+ export const CONFIG_JSON_MODAL_OPEN = 'config_json_modal_open';
37
+ export const CONFIG_JSON_MODAL_CLOSE = 'config_json_modal_close';
38
+ export const SET_CONFIG_JSON = 'set_config_json';
39
+ export const UPDATE_PROMETHEUS_METRIC_TYPE = 'update_prometheus_metric_type';
40
+ export const UPDATE_PROMETHEUS_METRIC_QUERY_FIELD = 'update_prometheus_metric_query_field';
41
+ export const UPDATE_PROMETHEUS_LABEL_BINDINGS = 'update_prometheus_label_bindings';
42
+ export const UPDATE_PROMETHEUS_GROUP_BY_FIELDS = 'update_prometheus_group_by_fields';
43
+ export const UPDATE_STACKDRIVER_METRIC_TYPE = 'update_stackdriver_metric_type';
44
+ export const UPDATE_STACKDRIVER_METRIC_QUERY_FIELD = 'update_stackdriver_metric_query_field';
45
+ export const UPDATE_STACKDRIVER_GROUP_BY_FIELDS = 'update_stackdriver_group_by_fields';
46
+ export const UPDATE_JUDGES = 'update_judges';
47
+ export const SELECT_JUDGE_NAME = 'select_judge_name';
48
+ export const UPDATE_GROUP_WEIGHT = 'update_group_weight';
49
+ export const SET_CONFIG_JSON_MODAL_TAB_STATE = 'set_config_json_modal_tab_state';
50
+ export const UPDATE_ATLAS_QUERY = 'update_atlas_query';
51
+ export const UPDATE_DATADOG_METRIC_TYPE = 'update_datadog_metric_type';
52
+ export const UPDATE_DATADOG_METRIC_NAME = 'update_datadog_metric_name';
53
+ export const UPDATE_NEWRELIC_SELECT = 'update_newrelic_select';
54
+ export const COPY_SELECTED_CONFIG = 'copy_selected_config';
55
+ export const CREATE_NEW_CONFIG = 'create_new_config';
56
+ export const EDIT_GROUP_BEGIN = 'edit_group_name_begin';
57
+ export const EDIT_GROUP_CONFIRM = 'edit_group_name_confirm';
58
+ export const EDIT_GROUP_UPDATE = 'edit_group_name_update';
59
+ export const CHANGE_METRIC_GROUP = 'change_metric_group';
60
+ export const CHANGE_METRIC_GROUP_SELECT = 'change_metric_group_select';
61
+ export const CHANGE_METRIC_GROUP_CONFIRM = 'change_metric_group_confirm';
62
+ export const LOAD_RUN_REQUEST = 'load_run_request';
63
+ export const LOAD_RUN_SUCCESS = 'load_run_success';
64
+ export const LOAD_RUN_FAILURE = 'load_run_failure';
65
+ export const TOGGLE_METRIC_CLASSIFICATION_FILTER = 'toggle_metric_classification_filter';
66
+ export const SELECT_REPORT_METRIC_GROUP = 'select_result_metric_group';
67
+ export const SELECT_REPORT_METRIC = 'select_result_metric';
68
+ export const LOAD_METRIC_SET_PAIR_REQUEST = 'load_metric_set_pair_request';
69
+ export const LOAD_METRIC_SET_PAIR_SUCCESS = 'load_metric_set_pair_success';
70
+ export const LOAD_METRIC_SET_PAIR_FAILURE = 'load_metric_set_pair_failure';
71
+ export const ADD_TEMPLATE = 'add_template';
72
+ export const EDIT_TEMPLATE_BEGIN = 'edit_template_begin';
73
+ export const EDIT_TEMPLATE_CANCEL = 'edit_template_cancel';
74
+ export const EDIT_TEMPLATE_CONFIRM = 'edit_template_confirm';
75
+ export const EDIT_TEMPLATE_NAME = 'edit_template_name';
76
+ export const EDIT_TEMPLATE_VALUE = 'edit_template_value';
77
+ export const DELETE_TEMPLATE = 'delete_template';
78
+ export const SELECT_TEMPLATE = 'select_template';
79
+ export const EDIT_INLINE_TEMPLATE = 'edit_inline_template';
80
+ export const LOAD_METRICS_SERVICE_METADATA_REQUEST = 'load_metrics_service_metadata_request';
81
+ export const LOAD_METRICS_SERVICE_METADATA_SUCCESS = 'load_metrics_service_metadata_success';
82
+ export const LOAD_METRICS_SERVICE_METADATA_FAILURE = 'load_metrics_service_metadata_failure';
83
+ export const UPDATE_PROMETHEUS_METRIC_DESCRIPTOR_FILTER = 'update_prometheus_metric_descriptor_filter';
84
+ export const UPDATE_GRAPHITE_METRIC_DESCRIPTOR_FILTER = 'update_graphite_metric_descriptor_filter';
85
+ export const UPDATE_STACKDRIVER_METRIC_DESCRIPTOR_FILTER = 'update_stackdriver_metric_descriptor_filter';
86
+ export const UPDATE_DATADOG_METRIC_DESCRIPTOR_FILTER = 'update_datadog_metric_descriptor_filter';
87
+ export const LOAD_EXECUTIONS_REQUEST = 'load_executions_request';
88
+ export const LOAD_EXECUTIONS_SUCCESS = 'load_executions_success';
89
+ export const LOAD_EXECUTIONS_FAILURE = 'load_executions_failure';
90
+ export const SELECT_GRAPH_TYPE = 'select_graph_type';
91
+ export const LOAD_KAYENTA_ACCOUNTS_REQUEST = 'load_kayenta_accounts_request';
92
+ export const LOAD_KAYENTA_ACCOUNTS_SUCCESS = 'load_kayenta_accounts_success';
93
+ export const LOAD_KAYENTA_ACCOUNTS_FAILURE = 'load_kayenta_accounts_failure';
94
+ export const SELECT_METRIC_STORE = 'select_metric_store';
95
+ export const UPDATE_SIGNAL_FX_METRIC_NAME = 'update_signalfx_metric_name';
96
+ export const UPDATE_SIGNAL_FX_AGGREGATION_METHOD = 'update_signalfx_aggregation_method';
97
+ export const UPDATE_SIGNAL_FX_QUERY_PAIRS = 'update_signalfx_query_pairs';
98
+ export const UPDATE_GRAPHITE_METRIC_NAME = 'update_graphite_metric_name';
@@ -0,0 +1,53 @@
1
+ import { Application } from '@spinnaker/core';
2
+
3
+ import * as Creators from './actions/creators';
4
+ import { canaryStore } from './canary';
5
+ import { stub } from './canary.dataSource.stub';
6
+ import { ICanaryExecutionStatusResult } from './domain/ICanaryExecutionStatusResult';
7
+ import { ICanaryConfigSummary, IJudge } from './domain/index';
8
+ import { listCanaryExecutions } from './service/canaryRun.service';
9
+
10
+ export function bridgeKayentaDataSourceToReduxStore() {
11
+ stub.afterConfigsLoaded = (application: Application) => {
12
+ if (application !== canaryStore.getState().data.application) {
13
+ return;
14
+ }
15
+ canaryStore.dispatch(
16
+ Creators.updateConfigSummaries({
17
+ configSummaries: application.getDataSource('canaryConfigs').data as ICanaryConfigSummary[],
18
+ }),
19
+ );
20
+ };
21
+
22
+ stub.afterJudgesLoaded = (application: Application) => {
23
+ if (application !== canaryStore.getState().data.application) {
24
+ return;
25
+ }
26
+ canaryStore.dispatch(
27
+ Creators.updateJudges({
28
+ judges: application.getDataSource('canaryJudges').data as IJudge[],
29
+ }),
30
+ );
31
+ };
32
+
33
+ stub.loadCanaryExecutions = (application: Application) => {
34
+ const listExecutionsRequest = listCanaryExecutions(application.name);
35
+
36
+ listExecutionsRequest.catch((error) => {
37
+ canaryStore.dispatch(Creators.loadExecutionsFailure({ error }));
38
+ });
39
+
40
+ return listExecutionsRequest;
41
+ };
42
+
43
+ stub.afterCanaryExecutionsLoaded = (application: Application) => {
44
+ if (application !== canaryStore.getState().data.application) {
45
+ return;
46
+ }
47
+ canaryStore.dispatch(
48
+ Creators.loadExecutionsSuccess({
49
+ executions: application.getDataSource('canaryExecutions').data as ICanaryExecutionStatusResult[],
50
+ }),
51
+ );
52
+ };
53
+ }
@@ -0,0 +1,64 @@
1
+ import { CanarySettings } from 'kayenta/canary.settings';
2
+
3
+ import { Application, ApplicationDataSourceRegistry } from '@spinnaker/core';
4
+
5
+ import { getCanaryConfigSummaries, listJudges } from './service/canaryConfig.service';
6
+ import { listCanaryExecutions } from './service/canaryRun.service';
7
+
8
+ // When the lazy portion loads, it overwrites these stub with implementation that bridges data to the redux store
9
+ export const stub = {
10
+ loadCanaryExecutions: (application: Application) => listCanaryExecutions(application.name),
11
+ afterConfigsLoaded: (_application: Application): void => void 0,
12
+ afterJudgesLoaded: (_application: Application): void => void 0,
13
+ afterCanaryExecutionsLoaded: (_application: Application): void => void 0,
14
+ };
15
+
16
+ export function registerKayentaDataSourceStubs() {
17
+ const onLoad = (app: Application, data: any) => Promise.resolve(data);
18
+ const loadCanaryConfigs = (application: Application) => {
19
+ return CanarySettings.showAllConfigs ? getCanaryConfigSummaries() : getCanaryConfigSummaries(application.name);
20
+ };
21
+
22
+ ApplicationDataSourceRegistry.registerDataSource({
23
+ optIn: !CanarySettings.optInAll,
24
+ optional: true,
25
+ loader: loadCanaryConfigs,
26
+ onLoad,
27
+ afterLoad: (application) => stub.afterConfigsLoaded(application),
28
+ description: 'Canary analysis configuration and reporting',
29
+ key: 'canaryConfigs',
30
+ label: 'Canary',
31
+ defaultData: [],
32
+ });
33
+
34
+ ApplicationDataSourceRegistry.registerDataSource({
35
+ key: 'canaryJudges',
36
+ label: 'Canary Configs',
37
+ sref: '.canary.canaryConfig',
38
+ activeState: '**.canaryConfig.**',
39
+ category: 'delivery',
40
+ requiresDataSource: 'canaryConfigs',
41
+ loader: listJudges,
42
+ onLoad,
43
+ afterLoad: (application) => stub.afterJudgesLoaded(application),
44
+ lazy: true,
45
+ autoActivate: true,
46
+ defaultData: [],
47
+ iconName: 'spMenuCanaryConfig',
48
+ });
49
+
50
+ ApplicationDataSourceRegistry.registerDataSource({
51
+ key: 'canaryExecutions',
52
+ label: 'Canary Reports',
53
+ sref: '.canary.report',
54
+ activeState: '**.report.**',
55
+ category: 'delivery',
56
+ requiresDataSource: 'canaryConfigs',
57
+ loader: (application) => stub.loadCanaryExecutions(application),
58
+ onLoad,
59
+ afterLoad: (application) => stub.afterCanaryExecutionsLoaded(application),
60
+ lazy: true,
61
+ defaultData: [],
62
+ iconName: 'spMenuCanaryReport',
63
+ });
64
+ }
@@ -0,0 +1,136 @@
1
+ import { HelpContentsRegistry } from '@spinnaker/core';
2
+
3
+ const helpContents: { [key: string]: string } = {
4
+ 'pipeline.config.canary.analysisType': `
5
+ <p>
6
+ <strong>Real Time</strong> analysis will be performed
7
+ over a time interval beginning at the moment of execution.
8
+ <ul>
9
+ <li>
10
+ <strong>Automatic:</strong> Spinnaker will provision and clean up the baseline and canary server groups. Not all cloud providers support this mode.
11
+ </li>
12
+ <li>
13
+ <strong>Manual:</strong> You are responsible for provisioning and cleaning up the baseline and canary server groups.
14
+ </li>
15
+ </ul>
16
+ </p>
17
+ <p>
18
+ <strong>Retrospective</strong> analysis will be performed over an explicitly-specified time
19
+ interval (likely in the past). You are responsible for provisioning and cleaning up
20
+ the baseline and canary server groups.
21
+ </p>
22
+ `,
23
+ 'pipeline.config.canary.delayBeforeAnalysis':
24
+ '<p>The number of minutes until the first canary analysis measurement interval begins.</p>',
25
+ 'pipeline.config.canary.baselineAnalysisOffset':
26
+ '<p>The offset in minutes of baseline data collection from the beginning of canary analysis. Useful for comparing metrics pre-canary for relative comparison. This field accepts SpEL</p>',
27
+ 'pipeline.config.canary.canaryInterval': `
28
+ <p>The frequency at which a canary score is generated. The recommended interval is at least 30 minutes.</p>
29
+ <p>If an interval is not specified, or the specified interval is larger than the overall time range, there will be one canary run over the full time range.</p>`,
30
+ 'pipeline.config.canary.successfulScore':
31
+ '<p>The minimum score the canary must achieve to be considered successful.</p>',
32
+ 'pipeline.config.canary.unhealthyScore':
33
+ '<p>The lowest score the canary can attain before it is aborted and disabled as a failure.</p>',
34
+ 'pipeline.config.canary.baselineGroup':
35
+ '<p>The server group to treat as the <em>control</em> in the canary analysis.</p>',
36
+ 'pipeline.config.canary.baselineLocation':
37
+ '<p>The location (could be a region, a namespace, or something else) of the server group to treat as the <em>control</em> in the canary analysis.</p>',
38
+ 'pipeline.config.canary.canaryGroup':
39
+ '<p>The server group to treat as the <em>experiment</em> in the canary analysis.</p>',
40
+ 'pipeline.config.canary.canaryLocation':
41
+ '<p>The location (could be a region, a namespace, or something else) of the server group to treat as the <em>experiment</em> in the canary analysis.</p>',
42
+ 'pipeline.config.canary.startTimeIso':
43
+ '<p>The overall start time of the data points to be retrieved, specified as a UTC instant using <a target="_" href="https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ISO_INSTANT">ISO-8601 instant format.</a> For example, `2018-07-12T20:28:29Z`.</p>',
44
+ 'pipeline.config.canary.endTimeIso':
45
+ '<p>The overall end time of the data points to be retrieved, specified as a UTC instant using <a target="_" href="https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ISO_INSTANT">ISO-8601 instant format.</a> For example, `2018-07-12T22:28:29Z`.</p>',
46
+ 'pipeline.config.canary.extendedScopeParams': `
47
+ <p>Metric source specific parameters which may be used to further alter the canary scope.</p>
48
+ <p>Also used to provide variable bindings for use in the expansion of custom filter templates within the canary config.</p>`,
49
+ 'pipeline.config.canary.lookback':
50
+ '<p>With an analysis type of <strong>Growing</strong>, the entire duration of the canary will be considered during the analysis.</p><p>When choosing <strong>Sliding</strong>, the canary will use the most recent number of specified minutes for its analysis report (<b>useful for long running canaries that span multiple days</b>).</p>',
51
+ 'pipeline.config.canary.delayBeforeCleanup':
52
+ '<p>The total time after canary analysis ends before canary cluster cleanup begins. Allows for manual inspection of instances.</p>',
53
+ 'pipeline.config.canary.marginalScore': `
54
+ <p>A canary stage can include multiple canary runs.</p>
55
+ <p>If a given canary run score is less than or equal to the marginal threshold, the canary stage will fail immediately.</p>
56
+ <p>If the canary run score is greater than the marginal threshold, the canary stage will not fail and will execute the remaining downstream canary runs.</p>`,
57
+ 'pipeline.config.canary.passingScore':
58
+ '<p>When all canary runs in a stage have executed, a canary stage is considered a success if the final (that is, the latest) canary run score is greater than or equal to the pass threshold. Otherwise, it is a failure.</p>',
59
+ 'pipeline.config.canary.lifetime': `
60
+ <p>The total time for which data will be collected and analyzed during this stage.</p>
61
+ `,
62
+ 'pipeline.config.canary.legacySiteLocalRecipients':
63
+ '<p>Email addresses to be notified when a canary report completes, separated by commas.</p>',
64
+ 'pipeline.config.metricsAccount':
65
+ "<p>The account to be used to access the metric store defined in this stage's canary config.</p>",
66
+ 'pipeline.config.storageAccount':
67
+ '<p>The account to be used to access a storage service, which will be used to store artifacts generated by this stage.</p>',
68
+ 'canary.config.metricGroupWeights': `
69
+ <p>A canary score is the weighted sum of metric group scores.</p>
70
+ <p>Group weights must sum to 100.</p>
71
+ `,
72
+ 'canary.config.nanStrategy': `
73
+ <p>When there is no value for a metric at a given point in time, it can either be ignored or assumed to be zero. The right choice depends on what is being measured. For example, when measuring successful attempts (like health checks) replacing missing values with zero may be appropriate.</p>
74
+ <p>The default strategy for a given metric will be used if no strategy is selected.</p>
75
+ `,
76
+ 'canary.config.outlierStrategy': `
77
+ <p>When outliers are present in metric data, you can choose to either remove them or include them in the evaluation. The appropriate strategy depends on the metrics being assessed. For example, when measuring CPU or memory utilization, it might be appropriate to remove outliers that occur during startup times.</p>
78
+ <p>If no strategy is chosen, the default strategy for the metric will be implemented.</p>
79
+ `,
80
+ 'canary.config.filterTemplate': `
81
+ <p>Templates allow you to compose and parameterize advanced queries against your telemetry provider.</p>
82
+ <p>Parameterized queries are hydrated by values provided in the canary stage. The <strong>project</strong>, <strong>resourceType</strong>, </string><strong>scope</strong>, and <strong>location</strong> variable bindings are implicitly available.</p>
83
+ <p>For example, you can interpolate <strong>project</strong> using the following syntax: <strong>\${project}</strong>.</p>
84
+ `,
85
+ 'canary.config.signalFx.queryPairs': `
86
+ <p><strong>Query pairs are optional</strong></p>
87
+ <p>Can be dimensions, properties, or tags (Use tag as key for tags).</p>
88
+ <p>
89
+ Example: Given a metric with name <pre>'request.count'</pre> that gets reported with dimensions uri, and stats_code. </br>
90
+ If I added the following query pairs</br>
91
+ <pre>{
92
+ "uri": "v1/some-endpoint",
93
+ "status_code": "5*"
94
+ }</pre>
95
+ I could make a metric that tracks the number of server errors for endpoint <pre>/v1/some-endpoint</pre>
96
+ </p>
97
+ <p>These k,v pairs are used to construct filters for the compiled SignalFlow program. EX:<pre>data('request.count', filters=filter('uri', 'v1/some-endpoint') and filter('status_code', '5*') and filter('version', '1.0.0') and filter('environment', 'production')).sum(by=['version', 'environment']).publish()</pre>
98
+ Note that the version and environment would come from the canary scope and the sum method comes from the aggregation method.
99
+ </p>
100
+ `,
101
+ 'canary.config.signalFx.aggregationMethod': `
102
+ <p>This must be a method defined in the <a target="_blank" href="https://developers.signalfx.com/reference#signalflow-stream-methods-1">SignalFlow Stream Methods</a> that supports aggregation</p>
103
+ <p>These are methods such as min, max, sum, mean and are documented with supporting the <strong>'by'</strong> keyword, ex: <pre>sum(by=['version', 'environment'])</pre></p>
104
+ <p>Simply put the name of the method that should be used in this field such as sum, Kayenta will populate the by clauses using the canary scope filter keys</p>
105
+ <p>This method is used to construct the compiled SignalFlow program. EX:<pre>data('request.count', filters=filter('uri', 'v1/some-endpoint') and filter('status_code', '5*') and filter('version', '1.0.0') and filter('environment', 'production')).sum(by=['version', 'environment']).publish()</pre>
106
+ Note that the version and environment k,v pairs are sourced from the canary scope. The other k,v pairs come from the metric specific k,v pair list.
107
+ </p>
108
+ `,
109
+ 'canary.config.prometheus.queryType': `
110
+ <p>Select <strong>default</strong> to use options from the UI to configure your query.</p>
111
+ <p>Select <strong>PromQL</strong> to compose a custom PromQL query (see <a target="blank" href="https://prometheus.io/docs/prometheus/latest/querying/basics/">documentation</a>).</p>
112
+ `,
113
+ 'canary.config.effectSize.cles': `
114
+ <p>
115
+ The Common Language Effect Size (CLES) reports the probability that a value from one group will be greater than a
116
+ value from the other group.
117
+ </p>
118
+ <p>A value of 0.50 indicates that the two groups are stochastically equal.</p>
119
+ <p>A value of 1 indicates that the first group shows complete stochastic domination over the other group, and a
120
+ value of 0 indicates the complete stochastic domination by the second group.
121
+ </p>
122
+ <p>
123
+ <a href="https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test#Common_language_effect_size" target="_blank">Read more about CLES</a>.
124
+ </p>
125
+ `,
126
+ // These come (almost) verbatim from Stackdriver's Metric Explorer.
127
+ 'stackdriver.resourceType':
128
+ 'For Stackdriver, a set of time series is identified by a <strong>resource type</strong> and a metric type that has data from that resource type.',
129
+ 'stackdriver.metricType':
130
+ 'For Stackdriver, a set of time series is identified by a resource type and a <strong>metric type</strong> that has data from that resource type.',
131
+ 'stackdriver.groupBy': 'Group by resource or metric labels to reduce the number of time series.',
132
+ 'stackdriver.crossSeriesReducer': 'Use an algorithm to group multiple time series together.',
133
+ 'stackdriver.perSeriesAligner': 'Use an algorithm to align individual time series.',
134
+ };
135
+
136
+ Object.keys(helpContents).forEach((key) => HelpContentsRegistry.register(key, helpContents[key]));
@@ -0,0 +1,168 @@
1
+ .kayenta {
2
+ width: 100%;
3
+
4
+ button {
5
+ &[disabled] {
6
+ cursor: not-allowed;
7
+ opacity: 0.4;
8
+ }
9
+ }
10
+
11
+ &.kayenta-root {
12
+ overflow: hidden;
13
+ }
14
+
15
+ .spinner {
16
+ position: inherit;
17
+ }
18
+
19
+ .list-detail {
20
+ > .col-md-2,
21
+ .col-md-10 {
22
+ padding-left: 0;
23
+ padding-right: 0;
24
+ }
25
+ }
26
+
27
+ .config-list {
28
+ ul {
29
+ max-height: calc(~'70vh - 44px'); // i.e., minus the footer.
30
+ overflow: auto;
31
+ @media screen and (max-height: 1000px) {
32
+ max-height: 55vh;
33
+ }
34
+
35
+ @media screen and (max-height: 700px) {
36
+ max-height: 45vh;
37
+ }
38
+ }
39
+ }
40
+
41
+ .config-detail {
42
+ padding: 0 1rem 1rem;
43
+ margin-bottom: 40px;
44
+ overflow-y: auto;
45
+ .config-detail-header {
46
+ padding: 5px 15px 7px 0;
47
+ .heading-1 {
48
+ margin: 3px 0 0 0;
49
+ }
50
+ }
51
+
52
+ .config-detail-edit-warning {
53
+ padding: 12px;
54
+ margin-bottom: 12px;
55
+ i.fa {
56
+ color: var(--color-notice);
57
+ font-size: 32px;
58
+ }
59
+ }
60
+
61
+ .contents .native-table-header {
62
+ padding-top: 10px;
63
+ }
64
+ }
65
+
66
+ .group-tabs {
67
+ .fas.fa-pencil-alt {
68
+ padding-left: 1rem;
69
+ font-size: smaller;
70
+ &.disabled {
71
+ color: var(--color-accessory);
72
+ }
73
+ }
74
+
75
+ .tabs-basic {
76
+ input {
77
+ text-transform: none;
78
+ font-weight: normal;
79
+ }
80
+ }
81
+ }
82
+
83
+ .table-header {
84
+ &.sticky-header {
85
+ background-color: var(--color-alabaster);
86
+ }
87
+ h6 {
88
+ font-weight: 600;
89
+ }
90
+ }
91
+
92
+ .table-row {
93
+ > div,
94
+ > td {
95
+ padding: 0.8rem 0;
96
+ }
97
+
98
+ i {
99
+ &.fa,
100
+ &.far {
101
+ padding: 0 0.5rem;
102
+ cursor: pointer;
103
+ &.fa-edit,
104
+ &.fa-folder {
105
+ font-weight: 100;
106
+ }
107
+ &.fa-folder {
108
+ margin-top: 0.2rem;
109
+ }
110
+ &.fa-trash {
111
+ font-size: small;
112
+ margin-top: 0.1rem;
113
+ }
114
+ }
115
+ }
116
+
117
+ // This is the wrapper around the change metric group folder icon.
118
+ g {
119
+ margin-top: -0.25rem;
120
+ margin-right: 0.1rem;
121
+ }
122
+ }
123
+
124
+ .table-header,
125
+ .table-row {
126
+ border-bottom: 1px solid var(--color-divider);
127
+ h6 {
128
+ margin-bottom: 5px;
129
+ }
130
+ &.background-white {
131
+ background-color: var(--color-white);
132
+ }
133
+ &.selected {
134
+ background-color: var(--color-accent-g2);
135
+ }
136
+ }
137
+
138
+ // As of 9/31/2018 this must be applied to a <th> for sticky table headers to work (not a <tr>/<thead>)
139
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=702927
140
+ .native-table-header {
141
+ position: sticky;
142
+ top: 0;
143
+ background-color: var(--color-alabaster);
144
+ // Borders don't work w/ position: sticky in this case
145
+ box-shadow: 0 1px 0 var(--color-divider);
146
+ }
147
+
148
+ .metric-list {
149
+ top: -10px;
150
+ }
151
+
152
+ .header-transparent {
153
+ .native-table-header {
154
+ background-color: transparent;
155
+ }
156
+ }
157
+
158
+ .header-white {
159
+ .native-table-header {
160
+ background-color: white;
161
+ }
162
+ }
163
+
164
+ // Allow children of flex-1 with overflow of scroll or auto to scroll correctly in firefox
165
+ .flex-1 {
166
+ min-height: 0;
167
+ }
168
+ }
@@ -0,0 +1,26 @@
1
+ import { SETTINGS } from '@spinnaker/core';
2
+
3
+ export interface ICanarySettings {
4
+ showAllConfigs: boolean;
5
+ reduxLogger: boolean;
6
+ metricsAccountName: string;
7
+ storageAccountName: string;
8
+ defaultJudge: string;
9
+ metricStore: string;
10
+ stagesEnabled: boolean;
11
+ stageName: string;
12
+ executionsCountOptions: number[];
13
+ defaultExecutionCount: number;
14
+ stageDescription: string;
15
+ featureDisabled: boolean;
16
+ optInAll: boolean;
17
+ atlasWebComponentsUrl: string;
18
+ atlasWebComponentsPolyfillUrl: string;
19
+ atlasGraphBaseUrl: string;
20
+ templatesEnabled: boolean;
21
+ manualAnalysisEnabled: boolean;
22
+ disableConfigEdit: boolean;
23
+ legacySiteLocalFieldsEnabled: boolean; // legacy fields for backwards-compat with old systems, no long term support planned
24
+ }
25
+
26
+ export const CanarySettings: ICanarySettings = SETTINGS.canary || { featureDisabled: true };
@@ -0,0 +1,67 @@
1
+ import { UIView } from '@uirouter/react';
2
+ import * as React from 'react';
3
+ import { Provider, Store } from 'react-redux';
4
+ import { applyMiddleware, createStore } from 'redux';
5
+ import { logger } from 'redux-logger';
6
+
7
+ import { Application } from '@spinnaker/core';
8
+
9
+ import { INITIALIZE } from './actions';
10
+ import { CanarySettings } from './canary.settings';
11
+ import { ICanaryConfigSummary, IJudge } from './domain';
12
+ import Styleguide from './layout/styleguide';
13
+ import { actionInterceptingMiddleware, asyncDispatchMiddleware, epicMiddleware } from './middleware';
14
+ import { ICanaryState, rootReducer } from './reducers';
15
+
16
+ export interface ICanaryProps {
17
+ app: Application;
18
+ }
19
+
20
+ const middleware = [epicMiddleware, actionInterceptingMiddleware, asyncDispatchMiddleware];
21
+
22
+ export const canaryStore: Store<ICanaryState> = createStore<ICanaryState>(
23
+ rootReducer,
24
+ applyMiddleware(...(CanarySettings.reduxLogger ? [...middleware, logger] : middleware)),
25
+ );
26
+
27
+ export default class Canary extends React.Component<ICanaryProps> {
28
+ private readonly store: Store<ICanaryState>;
29
+
30
+ constructor(props: ICanaryProps) {
31
+ super(props);
32
+ this.store = canaryStore;
33
+ this.initializeAppState(props.app);
34
+ }
35
+
36
+ public componentWillReceiveProps(nextProps: ICanaryProps) {
37
+ if (this.props.app.name !== nextProps.app.name) {
38
+ this.initializeAppState(nextProps.app);
39
+ }
40
+ }
41
+
42
+ private initializeAppState(app: Application): void {
43
+ this.store.dispatch({
44
+ type: INITIALIZE,
45
+ state: {
46
+ data: {
47
+ application: app,
48
+ configSummaries: app.getDataSource('canaryConfigs').data as ICanaryConfigSummary[],
49
+ judges: app.getDataSource('canaryJudges').data as IJudge[],
50
+ },
51
+ },
52
+ });
53
+ }
54
+
55
+ public render() {
56
+ const noWrap = { wrap: false };
57
+ return (
58
+ <Styleguide className="kayenta-root vertical">
59
+ <Provider store={this.store}>
60
+ <div className="vertical flex-1">
61
+ <UIView {...noWrap} name="canary" />
62
+ </div>
63
+ </Provider>
64
+ </Styleguide>
65
+ );
66
+ }
67
+ }