@spinnaker/kayenta 2026.3.2 → 2026.4.1
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,2 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import t from"react-container-dimensions";import{extent as a,histogram as i}from"d3-array";import{Node as n,Force as r}from"labella";import{OrdinalFrame as o,Annotation as s,Axis as l,XYFrame as c,MinimapXYFrame as m}from"semiotic";import p from"classnames";import{cu as h,S as d}from"./index-CgBbcrGU.js";import u from"react-tooltip";import{format as x}from"d3-format";import{scaleUtc as g,scaleLinear as y}from"d3-scale";import{DateTime as f}from"luxon";import{SETTINGS as b,timestamp as v}from"@spinnaker/core";import{curveStepAfter as E}from"d3-shape";import"lodash";import"@uirouter/react";import"class-autobind-decorator";import"react-dom";import"react-redux";import"redux-actions";import"react-bootstrap-typeahead";import"react-select";import"reselect";import"redux";import"brace/ext/searchbox";import"brace/mode/json";import"react-bootstrap";var M=({metric:t})=>e.createElement("div",{className:"chart-header"},e.createElement("h6",{className:"heading-6 color-text-primary"},e.createElement("span",{className:"uppercase prefix"},"metric name:"),e.createElement("span",null," ",t)));const k={colors:{baseline:"#52b3d9",canary:"#e26a6a",background:"#f8f8f8"},height:400,timeSeries:{minimapDataPointsThreshold:240,minimapHeight:40,axisTickLineHeight:4,axisTickLabelHeight:32,axisLabelHeight:16},dataGroupMap:{baseline:"control",canary:"experiment"}};h(".chart-legend {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n height: 24px;\n margin-top: 4px;\n}\n.chart-legend .legend-item {\n display: flex;\n align-items: center;\n margin: 0px 40px;\n font-size: 12px;\n}\n.chart-legend .clickable {\n cursor: pointer;\n}\n.chart-legend .deselected {\n opacity: 0.5;\n}\n.chart-legend .legend-icon {\n height: 12px;\n width: 40px;\n border-radius: 6px;\n margin-right: 8px;\n}\n");var N=t=>{const{onClickHandler:a,showGroup:i={baseline:!0,canary:!0},isClickable:n=!1}=t,r={backgroundColor:k.colors.baseline},o={backgroundColor:k.colors.canary},s=e=>a?()=>a(e):void 0,l=p("legend-item",{clickable:n}),c=p(l,{deselected:!i.canary}),m=p(l,{deselected:!i.baseline});return e.createElement("div",{className:"chart-legend"},e.createElement("div",{className:m,onClick:s("baseline")},e.createElement("div",{className:"legend-icon",style:r}),e.createElement("div",null,"Baseline")),e.createElement("div",{className:c,onClick:s("canary")},e.createElement("div",{className:"legend-icon",style:o}),e.createElement("div",null,"Canary")))},C=({group:t})=>{const a={color:k.colors[t],paddingRight:4};return e.createElement("i",{className:"fas fa-circle",style:a})};class S extends e.Component{componentDidUpdate(e){const t=this.tooltipTarget;e.content&&!this.props.content?u.hide(t):this.props.content&&u.show(t)}render(){const{x:t,y:a,content:i,id:n="tooltip"}=this.props,r={left:t||0,top:a||0,height:1,width:1,opacity:0,pointerEvents:"none",position:"absolute",zIndex:10};return e.createElement("div",{style:{pointerEvents:"none"}},e.createElement("div",{"data-tip":!0,"data-for":n,style:r,ref:e=>this.tooltipTarget=e}),e.createElement(u,{id:n,type:"light",border:!0},i||null))}}const H=e=>"number"!=typeof e||isNaN(e)?"N/A":Math.abs(e)>=Math.pow(10,25)?x("-.3~e")(e):x("-.3~s")(e),w=e=>{const t=b.feature.displayTimestampsInUserLocalTime?void 0:{zone:b.defaultTimeZone};return f.fromMillis(e,t)},D=e=>{const t=e[0],a=e[e.length-1],i=6e4*w(t).offset,n=t+i,r=a+i;return g().domain([new Date(n),new Date(r)]).ticks(6).map(e=>e.valueOf()-i)};h(".boxplot .tooltip-container .columns {\n display: flex;\n flex-direction: row;\n}\n.boxplot .tooltip-container .columns .column {\n padding: 10px;\n}\n.boxplot .tooltip-container .columns .column .header {\n font-weight: 600;\n padding-left: 0px;\n}\n.boxplot .boxplot-annotation text {\n fill: var(--color-text-primary);\n font-size: 12px;\n font-weight: 600;\n}\n.boxplot .boxplot-annotation .annotation-connector {\n display: none;\n}\n.boxplot .boxplot-annotation .note-line {\n display: none;\n}\n.boxplot .boxplot-chart .boxplot-summary g {\n opacity: 0.8;\n}\n.boxplot .boxplot-chart .boxplot-summary g:nth-child(1),\n.boxplot .boxplot-chart .boxplot-summary g:nth-child(2),\n.boxplot .boxplot-chart .boxplot-summary g:nth-child(3) {\n opacity: 0.3;\n}\n.boxplot .boxplot-chart g.pieces {\n shape-rendering: geometricprecision;\n}\n");class A extends e.Component{constructor(){super(...arguments),this.state={tooltip:null},this.margin={top:10,bottom:20,left:60,right:40},this.decorateData=(e,t)=>e.map(e=>({group:t,value:e,color:k.colors[t]})),this.generateChartData=()=>{const{metricSetPair:e}=this.props,t=this.decorateData(e.values.control,"baseline"),a=this.decorateData(e.values.experiment,"canary");return t.concat(a).filter(e=>"number"==typeof e.value)},this.createChartHoverHandler=()=>t=>{if(t&&"frame-hover"===t.type){const a=t.points,i={baseline:[],canary:[]};a.forEach(e=>{i[e.key].push({label:e.label,value:e.value})});const n=i.baseline.map(e=>e.label),r=[e.createElement("div",{className:"header",key:"summary"},"Summary"),...n.map(t=>e.createElement("div",{key:t},t))],o=[e.createElement("div",{className:"header",key:"baseline"},e.createElement(C,{group:"baseline"}),"Baseline"),i.baseline.map((t,a)=>e.createElement("div",{key:a},H(t.value)))],s=[e.createElement("div",{className:"header",key:"canary"},e.createElement(C,{group:"canary"}),"Canary"),i.canary.map((t,a)=>e.createElement("div",{key:a},H(t.value)))],l=e.createElement("div",{className:"tooltip-container"},e.createElement("div",{className:"columns"},e.createElement("div",{className:"column"},r),e.createElement("div",{className:"column"},o),e.createElement("div",{className:"column"},s)));this.setState({tooltip:{content:l,x:t.x+this.margin.left,y:t.y+this.margin.top}})}else this.setState({tooltip:null})},this.defineAnnotations=()=>["baseline","canary"].map(e=>({type:"summary-custom",group:e,summaryKeys:["q1area","median","q3area"]})),this.customAnnotationFunction=t=>{const{d:a,orFrameState:{pieceDataXY:i},categories:o}=t;if("summary-custom"===a.type){if(!o[a.group])return null;const t=i.filter(e=>e.key===a.group),l=o[a.group].width,c={median:"median",q1area:"25th %-ile",q3area:"75th %-ile"},m=(t,a)=>{const i=a.summaryPieceName,n=c[i],r={x:a.x,y:t,dx:l/2,dy:0,note:{label:`${n}: ${H(a.value)}`,wrap:100,lineType:"vertical",align:"middle",orientation:"topBottom",padding:10},className:"boxplot-annotation"};return e.createElement(s,{key:i,noteData:r})},p=a.summaryKeys.map(e=>{const a=t.find(t=>t.summaryPieceName===e);return a?new n(a.y,20,a):null}).map(e=>e),h={minPos:this.margin.top,maxPos:k.height-this.margin.bottom};return new r(h).nodes(p).compute().nodes().map(e=>m(e.currentPos,e.data))}return null},this.getChartProps=()=>{const{parentWidth:e}=this.props,t=this.generateChartData();return{size:[e,k.height],margin:this.margin,projection:"vertical",summaryType:"boxplot",oLabel:!1,oPadding:160,style:e=>({fill:e.color,fillOpacity:.7}),summaryStyle:e=>({fill:e.color,fillOpacity:.4,stroke:"#6a6a6a",strokeWidth:2}),pieceClass:e=>`piece ${e.group}`,type:{type:"swarm",r:3,iterations:50},rExtent:a(t.map(e=>e.value)),customHoverBehavior:this.createChartHoverHandler(),hoverAnnotation:!1,annotations:this.defineAnnotations(),summaryHoverAnnotation:[],data:t,oAccessor:e=>e.group,rAccessor:e=>e.value,svgAnnotationRules:this.customAnnotationFunction,summaryClass:"boxplot-summary",axis:{orient:"left",label:"metric value",tickFormat:e=>H(e)}}}}render(){const{metricSetPair:t}=this.props;return e.createElement("div",{className:"boxplot"},e.createElement(M,{metric:t.name}),e.createElement(N,null),e.createElement("div",{className:"graph-container"},e.createElement("div",{className:"boxplot-chart"},e.createElement(o,{...this.getChartProps()})),e.createElement(S,{...this.state.tooltip})))}}h(".histogram .graph-container {\n position: relative;\n}\n.histogram .graph-container .bar-annotation text {\n font-size: 12px;\n font-weight: 600;\n}\n.histogram .graph-container .bar-annotation .annotation-connector {\n display: none;\n}\n.histogram .graph-container .bar-annotation .note-line {\n display: none;\n}\n.histogram .graph-container g.ordinal-labels {\n stroke: var(--color-text-primary);\n font-size: 12px;\n font-weight: 200;\n}\n");class z extends e.Component{constructor(){super(...arguments),this.state={tooltip:null},this.margin={top:20,bottom:20,left:60,right:10},this.decorateData=(e,t)=>e.map(e=>({group:t,value:e})),this.generateChartData=()=>{const{metricSetPair:e}=this.props,t=this.decorateData(e.values.control,"baseline"),n=this.decorateData(e.values.experiment,"canary"),r=t.concat(n).filter(e=>"number"==typeof e.value),o=y().domain(a(r.map(e=>e.value))).nice().domain(),s=i().domain(o).value(e=>e.value)(r),l=[];return s.forEach(e=>{const{x0:t,x1:a}=e,i={group:"baseline",x0:t,x1:a,count:0},n={group:"canary",x0:t,x1:a,count:0};e.forEach(e=>"baseline"===e.group?i.count++:n.count++),l.push(i),l.push(n)}),l},this.createChartHoverHandler=t=>a=>{if(a&&"column-hover"===a.type){const i=Math.max(...t.map(e=>e.x1)),n=a.column.xyData,r=n[1].xy.x+this.margin.left,o=n[0].xy.height/2,s=n[1].xy.height/2,l=k.height-this.margin.bottom-Math.min(o,s),{x0:c,x1:m}=a.summary[0].data,p=a.summary.map(t=>{const{group:a,count:i}=t.data;return e.createElement("div",{key:a},e.createElement(C,{group:a}),e.createElement("span",null,` ${a} count: `),e.createElement("span",{style:{fontWeight:"bold"}},i))});let h=`For metric value more than / equal to ${H(c)} `;h+=m===i?`and less than / equal to ${H(m)}`:`and less than ${H(m)}`;const d=e.createElement("div",null,e.createElement("div",null,h),p);this.setState({tooltip:{content:d,x:r,y:l}})}else this.setState({tooltip:null})},this.defineAnnotations=e=>{const t=[];return e.forEach(e=>{e.count>0&&t.push({type:"bar-value-custom",...e})}),t},this.customAnnotationFunction=t=>{const{d:a,i:i,categories:n}=t;if("bar-value-custom"===a.type){const{x:t,y:r,width:o}=n[a.x1].xyData.find(e=>e.piece.data.group===a.group).xy,l={x:t+o/2,y:r,nx:t+o/2,ny:r-1,note:{label:`${a.count}`,wrap:100,align:"middle",orientation:"topBottom",padding:0,color:k.colors[a.group],lineType:"horizontal"},className:"bar-annotation"};return e.createElement(s,{key:i,noteData:l})}return null},this.getChartProps=()=>{const{parentWidth:t}=this.props,a=this.generateChartData();return{size:[t,k.height],margin:this.margin,projection:"vertical",type:"clusterbar",oLabel:t=>e.createElement("text",{textAnchor:"middle"},H(parseFloat(t))),oPadding:20,oAccessor:e=>e.x1,style:e=>({fill:k.colors[e.group],strokeWidth:1,stroke:k.colors.background,strokeOpacity:1}),customHoverBehavior:this.createChartHoverHandler(a),data:this.generateChartData(),axis:[{orient:"left",label:"measurement count",tickFormat:e=>0===e?null:Math.abs(e)}],rAccessor:e=>e.count,annotations:this.defineAnnotations(a),svgAnnotationRules:this.customAnnotationFunction,hoverAnnotation:[]}}}render(){const{metricSetPair:t}=this.props;return e.createElement("div",{className:"histogram"},e.createElement(M,{metric:t.name}),e.createElement(N,null),e.createElement("div",{className:"graph-container"},e.createElement("div",{className:"canary-chart"},e.createElement(o,{...this.getChartProps()})),e.createElement(S,{...this.state.tooltip})))}}h(".no-data-sign {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n");var T=()=>e.createElement("div",{style:{height:k.height},className:"no-data-sign"},"No Valid Data is Available for This Metric"),P=({millis:t})=>{const a=(e=>{const t=w(e);return 0===t.hour&&0===t.minute?[t.toFormat("HH:mm"),t.toFormat("MMM DD")]:[t.toFormat("HH:mm")]})(t).map((t,a)=>e.createElement("text",{textAnchor:"middle",className:"axis-label",key:a},t));return e.createElement("g",{className:"axis-label"},a)};h(".secondary-ts-x-axis {\n position: absolute;\n}\n.secondary-ts-x-axis g.axis-title.x.axis.bottom text {\n transform: translateY(-8px);\n}\n");class B extends e.Component{render(){const{margin:t,width:a,millisSet:i,axisLabel:n,bottomOffset:r}=this.props,{axisTickLineHeight:o,axisTickLabelHeight:s,axisLabelHeight:c}=k.timeSeries,m=[i[0],i[i.length-1]].map(e=>new Date(e)),p=s+o+(n?c:0),h=a-t.left-t.right,d=[0,h],u={bottom:r},x={transform:`translateX(${t.left}px)`};return e.createElement("svg",{className:"axis secondary-ts-x-axis",width:a,height:p,style:u},e.createElement("g",{className:"wrapper",style:x},e.createElement(l,{className:"x axis bottom canary-dual-axis",size:[h,o],scale:g().domain(m).range(d),orient:"bottom",label:"Canary",tickValues:D(i),tickFormat:t=>e.createElement(P,{millis:t})})))}}h(".difference-area {\n margin-top: 20px;\n}\n.difference-area .visualization-layer g.axis.x.bottom line.axis-baseline {\n stroke: none;\n}\n.difference-area .secondary-ts-x-axis g.axis.x.bottom line.axis-baseline {\n stroke: none;\n}\n");class L extends e.Component{constructor(){super(...arguments),this.margin={left:60,right:20,top:8},this.chartHeight=40,this.headerHeight=17,this.getChartData=()=>{const{metricSetPair:e}=this.props,{values:{experiment:t,control:a},scopes:i}=e,n=i.control.stepMillis,r=Math.max(t.length,a.length),o=Array(r).fill(0).map((e,r)=>{const o=t[r],s=a[r];return{timestamp:i.control.startTimeMillis+r*n,canary:o,baseline:s}}),s=o.map(e=>({timestampMillis:e.timestamp,value:0})),l=o.map(e=>({timestampMillis:e.timestamp,value:"number"==typeof e.canary&&"number"==typeof e.baseline?e.canary-e.baseline:0}));return{chartData:[{label:"difference",color:k.colors.canary,coordinates:l},{label:"baselineReference",color:k.colors.baseline,coordinates:s}]}},this.getSecondaryAxis=(t,a)=>{const{parentWidth:i}=this.props,n=a.map(e=>e+t);return e.createElement(B,{margin:{left:this.margin.left,right:this.margin.right,top:0,bottom:0},width:i,millisSet:n,axisLabel:"canary",bottomOffset:0})},this.getXAxisTotalHeight=e=>{const{axisTickLineHeight:t,axisTickLabelHeight:a,axisLabelHeight:i}=k.timeSeries;return e?2*(i+a)+t:a}}render(){const{metricSetPair:t,parentWidth:a,millisSetBaseline:i}=this.props,{scopes:n}=t,{chartData:r}=this.getChartData(),o=n.experiment.startTimeMillis-n.control.startTimeMillis,s=0!==o,l=this.getXAxisTotalHeight(s),m={lines:r,size:[a,this.chartHeight+l],margin:{...this.margin,bottom:l},lineType:{type:"area",interpolator:E},lineStyle:e=>"difference"===e.label?{fill:e.color,fillOpacity:.6}:{stroke:e.color,strokeOpacity:1,strokeWidth:2,strokeDasharray:5},xAccessor:e=>new Date(e.timestampMillis),yAccessor:"value",xScaleType:g(),axes:[{orient:"left",tickFormat:()=>"Δ = 0",tickValues:[0]},{orient:"bottom",tickValues:D(i),tickFormat:t=>e.createElement(P,{millis:t}),label:s?"Baseline":void 0,className:s?"baseline-dual-axis":""}],xExtent:[i[0],i[i.length-1]]};return e.createElement("div",{className:"difference-area"},e.createElement("div",{className:"chart-title",style:{height:this.headerHeight}},"Canary Value Differences from Baseline"),e.createElement(c,{...m}),s?this.getSecondaryAxis(o,i):null)}}h(".time-series .xyframe-matte {\n fill: var(--color-alabaster);\n}\n.time-series .zoom-icon {\n bottom: 10px;\n left: 30px;\n position: absolute;\n color: var(--color-dove-gray);\n}\n.time-series .tooltip-dual-axis-row {\n margin-bottom: 10px;\n}\n.time-series .tooltip-ts {\n font-weight: 600;\n}\n.time-series .axis-title.x.axis.bottom text {\n transform: translateY(-8px);\n}\n.time-series .canary-dual-axis .axis-label,\n.time-series .canary-dual-axis .axis-title text {\n fill: #e26a6a;\n}\n.time-series .baseline-dual-axis .axis-label,\n.time-series .baseline-dual-axis .axis-title text {\n fill: #52b3d9;\n}\n");class F extends e.Component{constructor(){super(...arguments),this.state={tooltip:null,userBrushExtent:null,showGroup:{baseline:!0,canary:!0},graphs:{line:null,differenceArea:null}},this.mainMinimapHeight=320,this.marginMain={top:10,left:60,right:20},this.marginMinimap={top:0,bottom:0,left:60,right:20},this.getChartData=(e,t)=>{const{maxDataCount:a}=e,{showGroup:i}=this.state,{dataGroupMap:n,colors:r}=k,{scopes:o,values:s}=t,{userBrushExtent:l}=this.state,c=i.canary&&!i.baseline,m=o.control.stepMillis,p=["baseline","canary"].map(e=>{const t=Array(a).fill(0).map((t,a)=>{const i=n[e];return{timestampMillisActual:o[i].startTimeMillis+a*m,timestampMillisNormalizedMain:c?o[n.canary].startTimeMillis+a*m:o[n.baseline].startTimeMillis+a*m,timestampMillisNormalizedMinimap:o[n.baseline].startTimeMillis+a*m,value:s[i][a]}});return{label:e,color:r[e],coordinates:t.filter(e=>"number"==typeof e.value),coordinatesUnfiltered:t}}),h=p[0].coordinatesUnfiltered.map(e=>e.timestampMillisNormalizedMinimap),d=(l?p[0].coordinatesUnfiltered.filter(e=>e.timestampMillisNormalizedMinimap>=l[0].valueOf()&&e.timestampMillisNormalizedMinimap<=l[1].valueOf()):p[0].coordinatesUnfiltered).map(e=>e.timestampMillisNormalizedMain);return{dataSets:p,millisSetNormalizedMain:d,millisSetNormalizedMinimap:h,xExtentNormalizedMain:[d[0],d[d.length-1]],xExtentNormalizedMinimap:[h[0],h[h.length-1]]}},this.createCommonChartProps=()=>({lineType:{type:"line",interpolator:E},lineStyle:e=>({stroke:e.color,strokeWidth:2,strokeOpacity:.8}),yAccessor:"value",xScaleType:g(),baseMarkProps:{transitionDuration:{default:200,fill:200}}}),this.createLineChartProps=(t,a,i)=>{const{axisTickLineHeight:n,axisTickLabelHeight:r,axisLabelHeight:o,minimapHeight:s}=k.timeSeries,{parentWidth:l}=this.props,{showGroup:c}=this.state,{shouldUseSecondaryXAxis:m,shouldDisplayMinimap:p}=a,{dataSets:h,xExtentNormalizedMain:d,xExtentNormalizedMinimap:u,millisSetNormalizedMain:x}=t,g=m?2*(r+o)+n:r,y={...i,lines:h.filter(e=>c[e.label]),hoverAnnotation:[{type:"x",disable:["connector","note"]},{type:"vertical-points",threshold:.1,r:()=>5}],customHoverBehavior:this.createChartHoverHandler(h,a),xExtent:d,axes:[{orient:"left",label:"metric value",tickFormat:e=>H(e)},{orient:"bottom",label:m?"Baseline":void 0,tickValues:D(x),tickFormat:t=>e.createElement(P,{millis:t}),className:m?"baseline-dual-axis":""}],margin:{...this.marginMain,bottom:g},matte:!0,size:[l,p?this.mainMinimapHeight-s:this.mainMinimapHeight],xAccessor:e=>new Date(e.timestampMillisNormalizedMain)};return p?{...y,minimap:{...i,lines:h,yBrushable:!1,brushEnd:this.onBrushEnd,size:[l,s],axes:[{orient:"left",tickFormat:()=>null},{orient:"bottom"}],margin:this.marginMinimap,xAccessor:e=>new Date(e.timestampMillisNormalizedMinimap),xExtent:u}}:y},this.createGraphs=()=>{const{metricSetPair:t,parentWidth:a}=this.props,{showGroup:i}=this.state,{minimapDataPointsThreshold:n,minimapHeight:r}=k.timeSeries,o=t.scopes.control.startTimeMillis,s=t.scopes.experiment.startTimeMillis,l=o===s,p={startTimeMillisOffset:s-o,maxDataCount:Math.max(t.values.control.length,t.values.experiment.length),shouldDisplayMinimap:t.values.control.length>n,shouldUseSecondaryXAxis:!l&&i.canary&&i.baseline},h=this.getChartData(p,t),d=this.createCommonChartProps(),u=this.createLineChartProps(h,p,d),x=e.createElement(e.Fragment,null,e.createElement("div",{className:"time-series-chart"},p.shouldDisplayMinimap?e.createElement(m,{...u}):e.createElement(c,{...u})),p.shouldUseSecondaryXAxis?e.createElement(B,{margin:{left:this.marginMain.left,right:this.marginMain.right,top:0,bottom:0},width:a,millisSet:h.millisSetNormalizedMain.map(e=>e+p.startTimeMillisOffset),axisLabel:"canary",bottomOffset:p.shouldDisplayMinimap?r:0}):null,p.shouldDisplayMinimap?e.createElement("div",{className:"zoom-icon"},e.createElement("i",{className:"fas fa-search-plus"})):null),g=i.baseline&&i.canary?e.createElement(L,{...this.props,millisSetBaseline:h.millisSetNormalizedMinimap}):null;this.setState({graphs:{line:x,differenceArea:g}})},this.onLegendClickHandler=e=>{const t=this.state.showGroup;this.setState({showGroup:{...t,[e]:!t[e]}})},this.createChartHoverHandler=(t,a)=>{const{shouldUseSecondaryXAxis:i}=a;return a=>{if(a&&a.timestampMillisNormalizedMain){const n=t.map(e=>{const t=e.coordinatesUnfiltered.find(e=>e.timestampMillisNormalizedMain===a.timestampMillisNormalizedMain);return{color:e.color,label:e.label,ts:t.timestampMillisActual,value:t.value}});let r=n.concat().sort((e,t)=>t.value-e.value).map(t=>{const a=i?e.createElement("div",{className:"tooltip-ts"},v(t.ts)):null;return e.createElement("div",{key:t.label,className:p({"tooltip-dual-axis-row":i})},a,e.createElement("div",{id:t.label},e.createElement(C,{group:t.label}),e.createElement("span",null,`${t.label}: `),e.createElement("span",null,H(t.value))))});if(2===n.length){const t=n[1].value-n[0].value;r=r.concat([e.createElement("div",{id:"diff",key:"diff",className:"tooltip-row"},e.createElement("span",null,"Canary - Baseline: "),e.createElement("span",null,H(t)))])}const o=e.createElement("div",null,i?null:e.createElement("div",{key:"ts",className:"tooltip-ts"},v(n[0].ts)),r);this.setState({tooltip:{content:o,x:a.voronoiX+this.marginMain.left,y:a.voronoiY+this.marginMain.top}})}else this.setState({tooltip:null})}},this.onBrushEnd=e=>{this.setState({userBrushExtent:e})}}componentDidMount(){this.createGraphs()}componentDidUpdate(e,t){const{metricSetPair:a,parentWidth:i}=this.props,{userBrushExtent:n,showGroup:r}=this.state;a===e.metricSetPair&&i===e.parentWidth&&n===t.userBrushExtent&&r===t.showGroup||this.createGraphs()}render(){const{metricSetPair:t}=this.props,{showGroup:a,tooltip:i}=this.state,{line:n,differenceArea:r}=this.state.graphs;return e.createElement("div",{className:"time-series"},e.createElement(M,{metric:t.name}),e.createElement(N,{showGroup:a,isClickable:!0,onClickHandler:this.onLegendClickHandler}),e.createElement("div",{className:"graph-container"},n,e.createElement(S,{...i})),r)}}h(".semiotic-graph {\n margin-bottom: 8px;\n}\n.semiotic-graph .visualization-layer {\n shape-rendering: crispedges;\n}\n.semiotic-graph .visualization-layer .background-graphics .axis-tick-lines {\n stroke: var(--color-dovegray);\n opacity: 0.1;\n}\n.semiotic-graph .visualization-layer .background-graphics .axis-title text {\n letter-spacing: 1.5px;\n}\n.semiotic-graph .axis {\n font-size: 12px;\n font-weight: 400;\n fill: var(--color-text-primary);\n}\n.semiotic-graph .axis .axis-title.left.y text {\n letter-spacing: 1.5px;\n}\n.semiotic-graph .axis .x.axis.bottom text.axis-label {\n transform: translateY(-10px);\n}\n.semiotic-graph .axis .x.axis.bottom text.axis-label:nth-child(2) {\n transform: translateY(5px);\n}\n.semiotic-graph .chart-header {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.semiotic-graph .chart-header .prefix {\n font-weight: 600;\n}\n.semiotic-graph .chart-title {\n display: flex;\n justify-content: center;\n flex-direction: row;\n font-size: 12px;\n}\n.semiotic-graph .graph-container {\n position: relative;\n}\n");class G extends e.Component{constructor(){super(...arguments),this.fetchChart=t=>{const{type:a,metricSetPair:{values:{control:i,experiment:n}}}=this.props,r={...this.props,parentWidth:t},o=e=>e.filter(e=>"number"==typeof e);if(0===o(i).length&&0===o(n).length)return e.createElement(T,null);switch(a){case d.TimeSeries:return e.createElement(F,{...r});case d.Histogram:return e.createElement(z,{...r});case d.BoxPlot:return e.createElement(A,{...r});default:return null}}}render(){return e.createElement("div",{className:"semiotic-graph"},e.createElement(t,null,({width:e})=>this.fetchChart(e)))}}export{G as default};
|
|
2
|
-
//# sourceMappingURL=semioticGraph-Ch95n-5Z.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semioticGraph-Ch95n-5Z.js","sources":["../src/kayenta/report/detail/graph/semiotic/chartHeader.tsx","../src/kayenta/report/detail/graph/semiotic/config.ts","../src/kayenta/report/detail/graph/semiotic/chartLegend.tsx","../src/kayenta/report/detail/graph/semiotic/circleIcon.tsx","../src/kayenta/report/detail/graph/semiotic/tooltip.tsx","../src/kayenta/report/detail/graph/semiotic/utils.ts","../src/kayenta/report/detail/graph/semiotic/boxplot.tsx","../src/kayenta/report/detail/graph/semiotic/histogram.tsx","../src/kayenta/report/detail/graph/semiotic/noValidDataSign.tsx","../src/kayenta/report/detail/graph/semiotic/customAxisTickLabel.tsx","../src/kayenta/report/detail/graph/semiotic/secondaryTSXAxis.tsx","../src/kayenta/report/detail/graph/semiotic/differenceArea.tsx","../src/kayenta/report/detail/graph/semiotic/timeSeries.tsx","../src/kayenta/report/detail/graph/semiotic/semioticGraph.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport interface IChartHeaderProps {\n metric: string;\n}\n\nexport default ({ metric }: IChartHeaderProps) => {\n return (\n <div className=\"chart-header\">\n <h6 className=\"heading-6 color-text-primary\">\n <span className=\"uppercase prefix\">metric name:</span>\n <span>\n \n {metric}\n </span>\n </h6>\n </div>\n );\n};\n","interface IColorConfig {\n [propName: string]: string;\n}\n\ninterface ITimeSeriesConfig {\n [propName: string]: any;\n}\n\ninterface IDataGroup {\n [group: string]: string;\n}\n\ninterface IVizConfig {\n readonly colors: IColorConfig;\n readonly height: number;\n readonly timeSeries: ITimeSeriesConfig;\n readonly dataGroupMap: IDataGroup;\n}\n\nexport const vizConfig: IVizConfig = {\n colors: {\n baseline: '#52b3d9',\n canary: '#e26a6a',\n background: '#f8f8f8',\n },\n height: 400,\n timeSeries: {\n minimapDataPointsThreshold: 240,\n minimapHeight: 40,\n axisTickLineHeight: 4,\n axisTickLabelHeight: 32,\n axisLabelHeight: 16,\n },\n dataGroupMap: {\n baseline: 'control',\n canary: 'experiment',\n },\n};\n","import classNames from 'classnames';\nimport * as React from 'react';\n\nimport { vizConfig } from './config';\n\nimport './chartLegend.less';\n\ninterface IChartLegendProps {\n isClickable?: boolean;\n onClickHandler?: (group: string) => void;\n showGroup?: { [group: string]: boolean };\n}\n\nexport default (props: IChartLegendProps) => {\n const { onClickHandler, showGroup = { baseline: true, canary: true }, isClickable = false } = props;\n\n const baselineIconStyle = {\n backgroundColor: vizConfig.colors.baseline,\n };\n\n const canaryIconStyle = {\n backgroundColor: vizConfig.colors.canary,\n };\n\n const handleClick = (group: string) => (onClickHandler ? () => onClickHandler(group) : undefined);\n\n const legendItemClass = classNames('legend-item', { clickable: isClickable });\n const legendItemClassCanary = classNames(legendItemClass, { deselected: !showGroup.canary });\n const legendItemClassBaseline = classNames(legendItemClass, { deselected: !showGroup.baseline });\n return (\n <div className=\"chart-legend\">\n <div className={legendItemClassBaseline} onClick={handleClick('baseline')}>\n <div className=\"legend-icon\" style={baselineIconStyle} />\n <div>Baseline</div>\n </div>\n <div className={legendItemClassCanary} onClick={handleClick('canary')}>\n <div className=\"legend-icon\" style={canaryIconStyle} />\n <div>Canary</div>\n </div>\n </div>\n );\n};\n","import * as React from 'react';\n\nimport { vizConfig } from './config';\n\nexport interface ICircleIconProps {\n group: string;\n}\n\n// simple component to show circle icons in tooltips\nexport default ({ group }: ICircleIconProps) => {\n const iconStyle = {\n color: vizConfig.colors[group],\n paddingRight: 4,\n };\n return <i className=\"fas fa-circle\" style={iconStyle} />;\n};\n","import * as React from 'react';\nimport ReactTooltip from 'react-tooltip';\n\nexport interface ITooltipProps {\n x?: number;\n y?: number;\n content?: JSX.Element;\n // unique ids are needed if we want to show multiple tooltip objects at once\n id?: string;\n}\n\n/*\n * Custom tooltip component to render on top of any svg component.\n * It creates an invisible pixel and uses react-tooltip library\n * to point to it.\n */\nexport default class Tooltip extends React.Component<ITooltipProps> {\n private tooltipTarget: HTMLDivElement;\n\n public componentDidUpdate(prevProps: ITooltipProps) {\n const target = this.tooltipTarget;\n if (prevProps.content && !this.props.content) {\n ReactTooltip.hide(target);\n } else if (this.props.content) {\n ReactTooltip.show(target);\n }\n }\n\n public render() {\n const { x, y, content, id = 'tooltip' } = this.props;\n const tooltipTargetStyle = {\n left: x ? x : 0,\n top: y ? y : 0,\n height: 1,\n width: 1,\n opacity: 0,\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 10,\n } as React.CSSProperties;\n\n const containerStyle = {\n pointerEvents: 'none',\n } as React.CSSProperties;\n\n return (\n <div style={containerStyle}>\n <div data-tip={true} data-for={id} style={tooltipTargetStyle} ref={(el) => (this.tooltipTarget = el)} />\n <ReactTooltip id={id} type=\"light\" border={true}>\n {content ? content : null}\n </ReactTooltip>\n </div>\n );\n }\n}\n","import { quantile } from 'd3-array';\nimport { format } from 'd3-format';\nimport { scaleUtc } from 'd3-scale';\nimport { DateTime } from 'luxon';\n\nimport { SETTINGS } from '@spinnaker/core';\n\nimport type { ISummaryStatistics } from './semiotic.service';\n\n/*\nFormatter for any metric values. If the value is not a valid number (typically NaN),\nwe want to display \"N/A\" to highlight that there was no valid measurement.\nElse, the format is made as close as possible to Atlas graph formats:\nSI notation is used when the exponent is between -24 and 24 (inclusive),\nand exponential notation otherwise. Both with 3 digits of precision\n*/\nexport const formatMetricValue = (value: any) => {\n if (typeof value !== 'number' || isNaN(value)) {\n return 'N/A';\n } else if (Math.abs(value) >= Math.pow(10, 25)) {\n return format('-.3~e')(value);\n } else {\n return format('-.3~s')(value);\n }\n};\n\nconst fromMillis = (millis: number) => {\n const luxonOpts = SETTINGS.feature.displayTimestampsInUserLocalTime ? undefined : { zone: SETTINGS.defaultTimeZone };\n return DateTime.fromMillis(millis, luxonOpts);\n};\n\n/*\nFormatter for timestamps. If the timestamp value is a date boundary (e.g. 04-01-2019 00:00:00),\nan additional date label is returned, otherwise only a single label showing hour & minute is returned\n*/\nexport const dateTimeTickFormatter = (d: number) => {\n const datetime = fromMillis(d);\n if (datetime.hour === 0 && datetime.minute === 0) {\n return [datetime.toFormat('HH:mm'), datetime.toFormat('MMM DD')];\n } else {\n return [datetime.toFormat('HH:mm')];\n }\n};\n\n// function to choose the ideal tick values on the x-axis of a timeseries\n// D3 has a smart tick generator, e.g. it'll tend to show midnight if the data crosses\n// date boundaries. This way we can label date change as date, and other ticks as HH:mm\nexport const calculateDateTimeTicks = (millisSet: number[]) => {\n const minMillis = millisSet[0];\n const maxMillis = millisSet[millisSet.length - 1];\n\n /*\n * since d3 scale doesn't support custom timezone, we have to:\n * 1)shift the UTC domain based on the tz,\n * 2)have d3 calculate the ideal tick values as usual, and\n * 3)shift back the result\n */\n const offsetMillis = fromMillis(minMillis).offset * 60000;\n const minMillisShifted = minMillis + offsetMillis;\n const maxMillisShifted = maxMillis + offsetMillis;\n const scale = scaleUtc().domain([new Date(minMillisShifted), new Date(maxMillisShifted)]);\n const ticks = scale.ticks(6).map((d: Date) => d.valueOf() - offsetMillis);\n return ticks;\n};\n\nexport const calculateSummaryStatistics = (values: number[]): ISummaryStatistics => {\n const output = {\n min: {\n value: quantile(values, 0.0),\n label: 'Minimum',\n },\n q1area: {\n value: quantile(values, 0.25),\n label: '25th %-ile',\n },\n median: {\n value: quantile(values, 0.5),\n label: 'Median',\n },\n q3area: {\n value: quantile(values, 0.75),\n label: '75th %-ile',\n },\n max: {\n value: quantile(values, 1.0),\n label: 'Maximum',\n },\n };\n return output;\n};\n","import { extent } from 'd3-array';\nimport { Force, Node } from 'labella';\nimport * as React from 'react';\nimport type { IAnnotationType, IOrFrameHoverArgs, IOrGroup, IOrSummaryPiece, ISemioticAnnotationArgs } from 'semiotic';\nimport { Annotation, OrdinalFrame } from 'semiotic';\n\nimport ChartHeader from './chartHeader';\nimport ChartLegend from './chartLegend';\nimport CircleIcon from './circleIcon';\nimport { vizConfig } from './config';\nimport type { IMargin, ISemioticChartProps, ITooltip } from './semiotic.service';\nimport Tooltip from './tooltip';\nimport * as utils from './utils';\n\nimport './boxplot.less';\n\ninterface IChartDataPoint {\n value: number;\n group: string;\n color: string;\n}\n\ninterface IHoverData {\n value: number;\n label: string;\n}\n\ninterface IHoverDataGroup {\n [group: string]: IHoverData[];\n}\n\ninterface IAnnotationData {\n group: string;\n summaryKeys: string[];\n type: string;\n}\n\ninterface IBoxPlotState {\n tooltip: ITooltip;\n}\n\nexport default class BoxPlot extends React.Component<ISemioticChartProps, IBoxPlotState> {\n public state: IBoxPlotState = {\n tooltip: null,\n };\n\n private margin: IMargin = {\n top: 10,\n bottom: 20,\n left: 60,\n right: 40,\n };\n\n private decorateData = (dataPoints: number[], group: string): IChartDataPoint[] => {\n return dataPoints.map((dp) => ({\n group,\n value: dp,\n color: vizConfig.colors[group],\n }));\n };\n\n private generateChartData = () => {\n const { metricSetPair } = this.props;\n const filterFunc = (v: IChartDataPoint) => typeof v.value === 'number';\n const baselineInput = this.decorateData(metricSetPair.values.control, 'baseline');\n const canaryInput = this.decorateData(metricSetPair.values.experiment, 'canary');\n const chartData = baselineInput.concat(canaryInput).filter(filterFunc);\n return chartData;\n };\n\n // Generate tooltip content that shows the summary statistics of a boxplot\n private createChartHoverHandler = () => {\n return (d: IOrFrameHoverArgs<IChartDataPoint> & IOrSummaryPiece): void => {\n if (d && d.type === 'frame-hover') {\n const points = d.points;\n const data: IHoverDataGroup = {\n baseline: [],\n canary: [],\n };\n\n points.forEach((p: IOrSummaryPiece) => {\n data[p.key].push({ label: p.label, value: p.value });\n });\n\n const summaryLabels = data.baseline.map((b: IHoverData) => b.label);\n const summaryKeysColumn = [\n <div className={'header'} key={'summary'}>\n Summary\n </div>,\n ...summaryLabels.map((label: string) => {\n return <div key={label}>{label}</div>;\n }),\n ];\n\n const baselineColumn = [\n <div className={'header'} key={'baseline'}>\n <CircleIcon group={'baseline'} />\n Baseline\n </div>,\n data.baseline.map((hd: IHoverData, i: number) => {\n return <div key={i}>{utils.formatMetricValue(hd.value)}</div>;\n }),\n ];\n\n const canaryColumn = [\n <div className=\"header\" key=\"canary\">\n <CircleIcon group=\"canary\" />\n Canary\n </div>,\n data.canary.map((hd: IHoverData, i: number) => {\n return <div key={i}>{utils.formatMetricValue(hd.value)}</div>;\n }),\n ];\n\n const tooltipContent = (\n <div className=\"tooltip-container\">\n <div className=\"columns\">\n <div className=\"column\">{summaryKeysColumn}</div>\n <div className=\"column\">{baselineColumn}</div>\n <div className=\"column\">{canaryColumn}</div>\n </div>\n </div>\n );\n\n this.setState({\n tooltip: {\n content: tooltipContent,\n x: d.x + this.margin.left,\n y: d.y + this.margin.top,\n },\n });\n } else {\n this.setState({ tooltip: null });\n }\n };\n };\n\n private defineAnnotations = () => {\n return ['baseline', 'canary'].map((g: string) => {\n return {\n type: 'summary-custom',\n group: g,\n summaryKeys: ['q1area', 'median', 'q3area'],\n };\n });\n };\n\n private customAnnotationFunction = (args: ISemioticAnnotationArgs<IAnnotationData, IOrGroup<IChartDataPoint>>) => {\n const {\n d,\n orFrameState: { pieceDataXY },\n categories,\n } = args;\n\n if (d.type === 'summary-custom') {\n // If no data exists for this group, don't return any annotation elements\n if (!categories[d.group]) {\n return null;\n }\n\n const summaryData = pieceDataXY.filter((sd: IOrSummaryPiece) => sd.key === d.group);\n const boxPlotWidth = categories[d.group].width;\n const statLabelMap: { [stat: string]: string } = {\n median: 'median',\n q1area: '25th %-ile',\n q3area: '75th %-ile',\n };\n const createNoteElement = (posY: number, dataPoint: IOrSummaryPiece) => {\n const name = dataPoint.summaryPieceName;\n const label = statLabelMap[name];\n const noteData = {\n x: dataPoint.x,\n y: posY,\n dx: boxPlotWidth / 2,\n dy: 0,\n note: {\n label: `${label}: ${utils.formatMetricValue(dataPoint.value)}`,\n wrap: 100,\n lineType: 'vertical',\n align: 'middle',\n orientation: 'topBottom',\n padding: 10,\n },\n className: 'boxplot-annotation',\n };\n return <Annotation key={name} noteData={noteData} />;\n };\n\n const nodes = d.summaryKeys\n .map((summaryKey: string) => {\n const pieceData = summaryData.find((sd: IOrSummaryPiece) => sd.summaryPieceName === summaryKey);\n return pieceData ? new Node<IOrSummaryPiece>(pieceData.y, 20, pieceData) : null;\n })\n .map((v: null | Node<IOrSummaryPiece>) => v) as Array<Node<IOrSummaryPiece>>;\n\n const forceOptions = {\n minPos: this.margin.top,\n maxPos: vizConfig.height - this.margin.bottom,\n };\n const annotations = new Force<IOrSummaryPiece>(forceOptions)\n .nodes(nodes)\n .compute()\n .nodes()\n .map((n: Node<IOrSummaryPiece>) => createNoteElement(n.currentPos, n.data));\n\n return annotations;\n } else {\n return null;\n }\n };\n\n private getChartProps = () => {\n const { parentWidth } = this.props;\n const chartData = this.generateChartData();\n\n return {\n size: [parentWidth, vizConfig.height],\n margin: this.margin,\n projection: 'vertical',\n summaryType: 'boxplot',\n oLabel: false,\n oPadding: 160,\n style: (d: IChartDataPoint) => {\n return {\n fill: d.color,\n fillOpacity: 0.7,\n };\n },\n summaryStyle: (d: IChartDataPoint) => {\n return {\n fill: d.color,\n fillOpacity: 0.4,\n stroke: '#6a6a6a',\n strokeWidth: 2,\n };\n },\n pieceClass: (d: IChartDataPoint) => `piece ${d.group}`,\n type: {\n type: 'swarm',\n r: 3,\n iterations: 50,\n },\n rExtent: extent(chartData.map((o) => o.value)),\n customHoverBehavior: this.createChartHoverHandler(),\n hoverAnnotation: false,\n annotations: this.defineAnnotations(),\n summaryHoverAnnotation: [] as IAnnotationType[],\n data: chartData,\n oAccessor: (d: IChartDataPoint) => d.group,\n rAccessor: (d: IChartDataPoint) => d.value,\n svgAnnotationRules: this.customAnnotationFunction,\n summaryClass: 'boxplot-summary',\n axis: {\n orient: 'left',\n label: 'metric value',\n tickFormat: (d: number) => utils.formatMetricValue(d),\n },\n };\n };\n\n public render() {\n const { metricSetPair } = this.props;\n return (\n <div className=\"boxplot\">\n <ChartHeader metric={metricSetPair.name} />\n <ChartLegend />\n <div className=\"graph-container\">\n <div className=\"boxplot-chart\">\n <OrdinalFrame {...this.getChartProps()} />\n </div>\n <Tooltip {...this.state.tooltip} />\n </div>\n </div>\n );\n }\n}\n","import { extent, histogram } from 'd3-array';\nimport { scaleLinear } from 'd3-scale';\nimport * as React from 'react';\nimport type {\n IAnnotationType,\n IOrFrameHoverArgs,\n IOrGroup,\n IOrPiece,\n IOrXyData,\n ISemioticAnnotationArgs,\n} from 'semiotic';\nimport { Annotation, OrdinalFrame } from 'semiotic';\n\nimport ChartHeader from './chartHeader';\nimport ChartLegend from './chartLegend';\nimport CircleIcon from './circleIcon';\nimport { vizConfig } from './config';\nimport type { IMargin, ISemioticChartProps, ITooltip } from './semiotic.service';\nimport Tooltip from './tooltip';\nimport * as utils from './utils';\n\nimport './histogram.less';\n\ninterface IInputDataPoint {\n value: number;\n group: string;\n}\n\ninterface IChartDataPoint {\n group: string;\n count: number;\n x0: number;\n x1: number;\n}\n\ninterface IAnnotationData extends IChartDataPoint {\n type: string;\n}\n\ninterface IHistogramState {\n tooltip: ITooltip;\n}\n\nexport default class Histogram extends React.Component<ISemioticChartProps, IHistogramState> {\n public state: IHistogramState = {\n tooltip: null,\n };\n\n private margin: IMargin = {\n top: 20,\n bottom: 20,\n left: 60,\n right: 10,\n };\n\n private decorateData = (dataPoints: number[], group: string): IInputDataPoint[] => {\n return dataPoints.map((dp) => ({\n group,\n value: dp,\n }));\n };\n\n /*\n * Semiotic actually supports histogram as a \"summary type\" out of the box, but the customization is\n * currently limited (e.g. it can't display the y-axis ticks & labels)\n * Hence we're manually generating histogram data using D3 and display it as\n * a grouped bar chart in semiotic\n */\n private generateChartData = () => {\n const { metricSetPair } = this.props;\n const filterFunc = (v: IInputDataPoint) => typeof v.value === 'number';\n const baselineInput = this.decorateData(metricSetPair.values.control, 'baseline');\n const canaryInput = this.decorateData(metricSetPair.values.experiment, 'canary');\n const combinedInput = baselineInput.concat(canaryInput).filter(filterFunc);\n\n const x = scaleLinear()\n .domain(extent(combinedInput.map((o) => o.value)))\n .nice();\n const domain = x.domain() as [number, number];\n\n // create histogram bins based on the combined data points\n const histogramData = histogram<IInputDataPoint, number>()\n .domain(domain)\n .value((d: IInputDataPoint) => d.value)(combinedInput);\n\n const chartData: IChartDataPoint[] = [];\n\n // Convert it to ordinal data format for bar chart in semiotic\n histogramData.forEach((h) => {\n const { x0, x1 } = h;\n const baselineBin = { group: 'baseline', x0, x1, count: 0 };\n const canaryBin = { group: 'canary', x0, x1, count: 0 };\n h.forEach((d) => (d.group === 'baseline' ? baselineBin.count++ : canaryBin.count++));\n chartData.push(baselineBin);\n chartData.push(canaryBin);\n });\n\n return chartData;\n };\n\n // Function factory to handle hover event\n private createChartHoverHandler = (chartData: IChartDataPoint[]) => {\n return (d: IOrFrameHoverArgs<IChartDataPoint>): void => {\n if (d && d.type === 'column-hover') {\n const x1Max: number = Math.max(...chartData.map((cd: IChartDataPoint) => cd.x1));\n const xyData = d.column.xyData;\n const x = xyData[1].xy.x + this.margin.left;\n const halfHeight1 = xyData[0].xy.height / 2;\n const halfHeight2 = xyData[1].xy.height / 2;\n const y = vizConfig.height - this.margin.bottom - Math.min(halfHeight1, halfHeight2);\n const { x0, x1 } = d.summary[0].data;\n const tooltipRows = d.summary.map((s: IOrPiece<IChartDataPoint>) => {\n const { group, count } = s.data;\n const valueStyle = {\n fontWeight: 'bold',\n } as React.CSSProperties;\n\n return (\n <div key={group}>\n <CircleIcon group={group} />\n <span>{` ${group} count: `}</span>\n <span style={valueStyle}>{count}</span>\n </div>\n );\n });\n\n let label = `For metric value more than / equal to ${utils.formatMetricValue(x0)} `;\n label +=\n x1 === x1Max\n ? `and less than / equal to ${utils.formatMetricValue(x1)}`\n : `and less than ${utils.formatMetricValue(x1)}`;\n\n const tooltipContent = (\n <div>\n <div>{label}</div>\n {tooltipRows}\n </div>\n );\n\n this.setState({\n tooltip: {\n content: tooltipContent,\n x,\n y,\n },\n });\n } else {\n this.setState({ tooltip: null });\n }\n };\n };\n\n // generate bar value annotations object\n private defineAnnotations = (chartData: IChartDataPoint[]) => {\n const annotations = [] as IAnnotationData[];\n chartData.forEach((d: IChartDataPoint) => {\n if (d.count > 0) {\n annotations.push({\n type: 'bar-value-custom',\n ...d,\n });\n }\n });\n return annotations;\n };\n\n // function to actually create the JSX elements based on the annotation object\n private customAnnotationFunction = (\n args: ISemioticAnnotationArgs<IAnnotationData, IOrGroup<IChartDataPoint>>,\n ): JSX.Element | null => {\n const { d, i, categories } = args;\n if (d.type === 'bar-value-custom') {\n const { x, y, width } = categories[d.x1].xyData.find(\n (c: IOrXyData<IChartDataPoint>) => c.piece.data.group === d.group,\n ).xy;\n const noteData = {\n x: x + width / 2,\n y,\n nx: x + width / 2,\n ny: y - 1,\n note: {\n label: `${d.count}`,\n wrap: 100,\n align: 'middle',\n orientation: 'topBottom',\n padding: 0,\n color: vizConfig.colors[d.group],\n lineType: 'horizontal',\n },\n className: `bar-annotation`,\n };\n return <Annotation key={i} noteData={noteData} />;\n } else {\n return null;\n }\n };\n\n private getChartProps = () => {\n const { parentWidth } = this.props;\n const chartData = this.generateChartData();\n\n return {\n size: [parentWidth, vizConfig.height],\n margin: this.margin,\n projection: 'vertical',\n type: 'clusterbar',\n oLabel: (v: string) => <text textAnchor=\"middle\">{utils.formatMetricValue(parseFloat(v))}</text>,\n oPadding: 20,\n oAccessor: (d: IChartDataPoint) => d.x1,\n style: (d: IChartDataPoint) => {\n return {\n fill: vizConfig.colors[d.group],\n strokeWidth: 1,\n stroke: vizConfig.colors.background,\n strokeOpacity: 1,\n };\n },\n customHoverBehavior: this.createChartHoverHandler(chartData),\n data: this.generateChartData(),\n axis: [\n {\n orient: 'left',\n label: 'measurement count',\n tickFormat: (d: number) => (d === 0 ? null : Math.abs(d)),\n },\n ],\n rAccessor: (d: IChartDataPoint) => d.count,\n annotations: this.defineAnnotations(chartData),\n svgAnnotationRules: this.customAnnotationFunction,\n hoverAnnotation: [] as IAnnotationType[],\n };\n };\n\n public render() {\n const { metricSetPair } = this.props;\n\n return (\n <div className=\"histogram\">\n <ChartHeader metric={metricSetPair.name} />\n <ChartLegend />\n <div className=\"graph-container\">\n <div className=\"canary-chart\">\n <OrdinalFrame {...this.getChartProps()} />\n </div>\n <Tooltip {...this.state.tooltip} />\n </div>\n </div>\n );\n }\n}\n","import * as React from 'react';\n\nimport { vizConfig } from './config';\nimport './noValidDataSign.less';\n\nexport default () => (\n <div style={{ height: vizConfig.height }} className=\"no-data-sign\">\n No Valid Data is Available for This Metric\n </div>\n);\n","import * as React from 'react';\n\nimport * as utils from './utils';\n\nexport interface ICustomAxisTickLabel {\n millis: number;\n}\n\n// custom labels as we want two label rows when showing date + hour at midnight\nexport default ({ millis }: ICustomAxisTickLabel) => {\n const text = utils.dateTimeTickFormatter(millis).map((s: string, i: number) => (\n <text textAnchor={'middle'} className={'axis-label'} key={i}>\n {s}\n </text>\n ));\n return <g className={'axis-label'}>{text}</g>;\n};\n","import { scaleUtc } from 'd3-scale';\nimport * as React from 'react';\nimport { Axis } from 'semiotic';\n\nimport { vizConfig } from './config';\nimport CustomAxisTickLabel from './customAxisTickLabel';\nimport type { IMargin } from './semiotic.service';\nimport * as utils from './utils';\n\nimport './secondaryTSXAxis.less';\n\ninterface ISecondaryTSXAxisProps {\n margin: IMargin;\n width: number;\n millisSet: number[];\n axisLabel?: string;\n bottomOffset: number;\n}\n\n/*\n * Secondary X Axis for Time Series Graph\n * Used when canary and baseline have different start time. We can overlay this axis component\n * on the main graph component\n */\nexport default class SecondaryTSXAxis extends React.Component<ISecondaryTSXAxisProps> {\n public render() {\n const { margin, width, millisSet, axisLabel, bottomOffset } = this.props;\n\n const { axisTickLineHeight, axisTickLabelHeight, axisLabelHeight } = vizConfig.timeSeries;\n\n const extent = [millisSet[0], millisSet[millisSet.length - 1]].map((ms: number) => new Date(ms));\n const totalAxisHeight = axisTickLabelHeight + axisTickLineHeight + (axisLabel ? axisLabelHeight : 0);\n const netWidth = width - margin.left - margin.right;\n const range = [0, netWidth];\n const containerStyle = {\n bottom: bottomOffset,\n };\n\n const svgWrapperStyle = {\n transform: `translateX(${margin.left}px)`,\n };\n return (\n <svg className=\"axis secondary-ts-x-axis\" width={width} height={totalAxisHeight} style={containerStyle}>\n <g className=\"wrapper\" style={svgWrapperStyle}>\n <Axis\n className=\"x axis bottom canary-dual-axis\"\n size={[netWidth, axisTickLineHeight]}\n scale={scaleUtc().domain(extent).range(range)}\n orient=\"bottom\"\n label=\"Canary\"\n tickValues={utils.calculateDateTimeTicks(millisSet)}\n tickFormat={(d: number) => <CustomAxisTickLabel millis={d} />}\n />\n </g>\n </svg>\n );\n }\n}\n","import { scaleUtc } from 'd3-scale';\nimport { curveStepAfter } from 'd3-shape';\nimport * as React from 'react';\nimport { XYFrame } from 'semiotic';\n\nimport { vizConfig } from './config';\nimport CustomAxisTickLabel from './customAxisTickLabel';\nimport SecondaryTSXAxis from './secondaryTSXAxis';\nimport type { IMargin, ISemioticChartProps } from './semiotic.service';\nimport * as utils from './utils';\n\nimport './differenceArea.less';\n\ninterface IDataPoint {\n timestampMillis: number;\n value: number;\n}\n\ninterface IChartDataSet {\n label: string;\n color: string;\n coordinates: IDataPoint[];\n}\n\ninterface IInterimDataSet {\n timestamp: number;\n canary: number | string;\n baseline: number | string;\n}\n\ninterface IDifferenceAreaProps extends ISemioticChartProps {\n millisSetBaseline: number[];\n}\n\n/*\n * Supplemental visualization in the time series view to highlight\n * Canary difference to baseline at any given timestamp\n */\nexport default class DifferenceArea extends React.Component<IDifferenceAreaProps> {\n private margin: IMargin = {\n left: 60,\n right: 20,\n top: 8,\n };\n\n private chartHeight = 40; // chart height not including axes height\n private headerHeight = 17;\n\n private getChartData = () => {\n const { metricSetPair } = this.props;\n const {\n values: { experiment, control },\n scopes,\n } = metricSetPair;\n\n const stepMillis = scopes.control.stepMillis;\n const maxDataPoints = Math.max(experiment.length, control.length);\n\n // Align data sets in case canary & baseline have different lengths and/or starting time\n const intDataSet: IInterimDataSet[] = Array(maxDataPoints)\n .fill(0)\n .map((_, i) => {\n const e = experiment[i];\n const c = control[i];\n return {\n timestamp: scopes.control.startTimeMillis + i * stepMillis,\n canary: e,\n baseline: c,\n };\n });\n\n const baselineReferenceDataPoints: IDataPoint[] = intDataSet.map((ds: IInterimDataSet) => ({\n timestampMillis: ds.timestamp,\n value: 0,\n }));\n\n const differenceDataPoints: IDataPoint[] = intDataSet.map((ds: IInterimDataSet) => ({\n timestampMillis: ds.timestamp,\n value: typeof ds.canary === 'number' && typeof ds.baseline === 'number' ? ds.canary - ds.baseline : 0,\n }));\n\n return {\n chartData: [\n {\n label: 'difference',\n color: vizConfig.colors.canary,\n coordinates: differenceDataPoints,\n },\n {\n label: 'baselineReference',\n color: vizConfig.colors.baseline,\n coordinates: baselineReferenceDataPoints,\n },\n ],\n };\n };\n\n private getSecondaryAxis = (millisOffset: number, millisSetBaseline: number[]) => {\n const { parentWidth } = this.props;\n const millisSetCanary = millisSetBaseline.map((ms: number) => ms + millisOffset);\n\n return (\n <SecondaryTSXAxis\n margin={{ left: this.margin.left, right: this.margin.right, top: 0, bottom: 0 }}\n width={parentWidth}\n millisSet={millisSetCanary}\n axisLabel={'canary'}\n bottomOffset={0}\n />\n );\n };\n\n private getXAxisTotalHeight = (shouldUseSecondaryXAxis: boolean) => {\n const { axisTickLineHeight, axisTickLabelHeight, axisLabelHeight } = vizConfig.timeSeries;\n\n return shouldUseSecondaryXAxis\n ? 2 * (axisLabelHeight + axisTickLabelHeight) + axisTickLineHeight\n : axisTickLabelHeight;\n };\n\n public render() {\n const { metricSetPair, parentWidth, millisSetBaseline } = this.props;\n\n /*\n * Generate the data needed for the graph components\n */\n const { scopes } = metricSetPair;\n const { chartData } = this.getChartData();\n const millisOffset = scopes.experiment.startTimeMillis - scopes.control.startTimeMillis;\n const shouldUseSecondaryXAxis = millisOffset !== 0;\n\n /*\n * Build the visualization components\n */\n const xAxisTotalHeight = this.getXAxisTotalHeight(shouldUseSecondaryXAxis);\n const computedConfig = {\n lines: chartData,\n size: [parentWidth, this.chartHeight + xAxisTotalHeight],\n margin: { ...this.margin, bottom: xAxisTotalHeight },\n lineType: {\n type: 'area',\n interpolator: curveStepAfter,\n },\n lineStyle: (ds: IChartDataSet) =>\n ds.label === 'difference'\n ? {\n fill: ds.color,\n fillOpacity: 0.6,\n }\n : {\n stroke: ds.color,\n strokeOpacity: 1,\n strokeWidth: 2,\n strokeDasharray: 5,\n },\n xAccessor: (d: IDataPoint) => new Date(d.timestampMillis),\n yAccessor: 'value',\n xScaleType: scaleUtc(),\n axes: [\n {\n orient: 'left',\n tickFormat: () => `\\u0394 = 0`, // Δ = 0\n tickValues: [0],\n },\n {\n orient: 'bottom',\n tickValues: utils.calculateDateTimeTicks(millisSetBaseline),\n tickFormat: (d: number) => <CustomAxisTickLabel millis={d} />,\n label: shouldUseSecondaryXAxis ? 'Baseline' : undefined,\n className: shouldUseSecondaryXAxis ? 'baseline-dual-axis' : '',\n },\n ],\n xExtent: [millisSetBaseline[0], millisSetBaseline[millisSetBaseline.length - 1]],\n };\n\n return (\n <div className=\"difference-area\">\n <div className=\"chart-title\" style={{ height: this.headerHeight }}>\n Canary Value Differences from Baseline\n </div>\n <XYFrame {...computedConfig} />\n {shouldUseSecondaryXAxis ? this.getSecondaryAxis(millisOffset, millisSetBaseline) : null}\n </div>\n );\n }\n}\n","import classNames from 'classnames';\nimport { scaleUtc } from 'd3-scale';\nimport { curveStepAfter } from 'd3-shape';\nimport * as React from 'react';\nimport type { IMinimapProps, IXYFrameHoverBaseArgs, IXYFrameProps } from 'semiotic';\nimport { MinimapXYFrame, XYFrame } from 'semiotic';\n\nimport { timestamp } from '@spinnaker/core';\n\nimport ChartHeader from './chartHeader';\nimport ChartLegend from './chartLegend';\nimport CircleIcon from './circleIcon';\nimport { vizConfig } from './config';\nimport CustomAxisTickLabel from './customAxisTickLabel';\nimport DifferenceArea from './differenceArea';\nimport type { IMetricSetPair } from '../../../../domain/IMetricSetPair';\nimport SecondaryTSXAxis from './secondaryTSXAxis';\nimport type { IMargin, ISemioticChartProps, ITooltip } from './semiotic.service';\nimport Tooltip from './tooltip';\nimport * as utils from './utils';\n\nimport './timeSeries.less';\n\ninterface IDataPoint {\n value: number | null;\n timestampMillisActual: number;\n timestampMillisNormalizedMain: number;\n timestampMillisNormalizedMinimap: number;\n}\n\ninterface IChartDataSet {\n color: string;\n label: string;\n coordinates: IDataPoint[];\n coordinatesUnfiltered: IDataPoint[];\n}\n\ninterface IChartData {\n dataSets: IChartDataSet[];\n xExtentNormalizedMinimap: number[];\n xExtentNormalizedMain: number[];\n millisSetNormalizedMain: number[];\n millisSetNormalizedMinimap: number[];\n}\n\ninterface ITimeSeriesState {\n tooltip: ITooltip;\n userBrushExtent: Date[] | null;\n showGroup: { [group: string]: boolean };\n graphs: { [graph: string]: JSX.Element };\n}\n\ninterface ITooltipDataPoint {\n color: string;\n label: string;\n value: number | undefined;\n ts: number;\n}\n\ninterface IDataSetsAttributes {\n startTimeMillisOffset: number;\n maxDataCount: number;\n shouldDisplayMinimap: boolean;\n shouldUseSecondaryXAxis: boolean;\n}\n\n/*There are 3 vizualisations inside this component:\n1. The main Timeseries chart\n2. The minimap chart for users to zoom/ pan the main timeseries. Only show this if there are many data points\n3. The difference chart that displays the diff between canary and baseline\n*/\nexport default class TimeSeries extends React.Component<ISemioticChartProps, ITimeSeriesState> {\n public state: ITimeSeriesState = {\n tooltip: null,\n userBrushExtent: null,\n showGroup: {\n baseline: true,\n canary: true,\n },\n graphs: {\n // a standalone timeseries chart if data points are few, otherwise it also includes a brushable/ zoomable minimap\n line: null,\n // graph that shows the delta between canary and baseline\n differenceArea: null,\n },\n };\n\n private mainMinimapHeight = 320; // total height of the main & minimap (if applicable)\n\n private marginMain: IMargin = {\n top: 10,\n left: 60,\n right: 20,\n };\n\n private marginMinimap: IMargin = {\n top: 0,\n bottom: 0,\n left: 60,\n right: 20,\n };\n\n public componentDidMount() {\n this.createGraphs();\n }\n\n // Only reconstruct the graph components when necessary\n public componentDidUpdate(prevProps: ISemioticChartProps, prevState: ITimeSeriesState) {\n const { metricSetPair, parentWidth } = this.props;\n const { userBrushExtent, showGroup } = this.state;\n if (\n metricSetPair !== prevProps.metricSetPair ||\n parentWidth !== prevProps.parentWidth ||\n userBrushExtent !== prevState.userBrushExtent ||\n showGroup !== prevState.showGroup\n ) {\n this.createGraphs();\n }\n }\n\n /*\n * Generate chart Data\n * In cases where the start Millis is different betwen canary and baseline, we want to:\n * 1) If data point count is different, extend the shorter dataset to match the longer one (i.e. match the x extent)\n * 2) normalize canary timestamp to match baseline timestamps (needed for the tooltip's\n * voronoi overlay logic in semiotic to work properly)\n */\n private getChartData = (dataSetsAttr: IDataSetsAttributes, metricSetPair: IMetricSetPair) => {\n const { maxDataCount } = dataSetsAttr;\n const { showGroup } = this.state;\n const { dataGroupMap, colors } = vizConfig;\n const { scopes, values } = metricSetPair;\n const { userBrushExtent } = this.state;\n const groups = ['baseline', 'canary'];\n const isOnlyCanarySelected = showGroup.canary && !showGroup.baseline;\n const stepMillis = scopes.control.stepMillis;\n\n /*\n * To support dual-axis, use 'normalized' ts supplied to semiotic for both canary and baseline.\n * We store the actual ts as 'actuals' (which can be different from the normalized ts for canary).\n */\n const dataSets: IChartDataSet[] = groups.map((g: string) => {\n const dataPoints: IDataPoint[] = Array(maxDataCount)\n .fill(0)\n .map((_, i: number) => {\n const name = dataGroupMap[g];\n const timestampMillisActual = scopes[name].startTimeMillis + i * stepMillis;\n\n // if only canary is selected, norm'd ts is based on canary's ts.\n const timestampMillisNormalizedMain = isOnlyCanarySelected\n ? scopes[dataGroupMap['canary']].startTimeMillis + i * stepMillis\n : scopes[dataGroupMap['baseline']].startTimeMillis + i * stepMillis;\n\n // minimap always shows both data sets, so norm'd ts is always based on baseline's ts\n const timestampMillisNormalizedMinimap = scopes[dataGroupMap['baseline']].startTimeMillis + i * stepMillis;\n\n return {\n timestampMillisActual, // original ts for this data point\n timestampMillisNormalizedMain,\n timestampMillisNormalizedMinimap,\n value: values[name][i],\n };\n });\n\n return {\n label: g,\n color: colors[g],\n coordinates: dataPoints.filter((d) => typeof d.value === 'number'),\n coordinatesUnfiltered: dataPoints,\n };\n });\n\n const millisSetNormalizedMinimap: number[] = dataSets[0].coordinatesUnfiltered.map(\n (c: any) => c.timestampMillisNormalizedMinimap,\n );\n\n const millisSetNormalizedMain: number[] = (!userBrushExtent\n ? dataSets[0].coordinatesUnfiltered\n : dataSets[0].coordinatesUnfiltered.filter((c: IDataPoint) => {\n return (\n c.timestampMillisNormalizedMinimap >= userBrushExtent[0].valueOf() &&\n c.timestampMillisNormalizedMinimap <= userBrushExtent[1].valueOf()\n );\n })\n ).map((c: IDataPoint) => c.timestampMillisNormalizedMain);\n\n return {\n dataSets,\n millisSetNormalizedMain,\n millisSetNormalizedMinimap,\n xExtentNormalizedMain: [millisSetNormalizedMain[0], millisSetNormalizedMain[millisSetNormalizedMain.length - 1]],\n xExtentNormalizedMinimap: [\n millisSetNormalizedMinimap[0],\n millisSetNormalizedMinimap[millisSetNormalizedMinimap.length - 1],\n ],\n };\n };\n\n // common chart props that are used for both the main XYFrame and Minimap (if applicable)\n private createCommonChartProps = () => {\n return {\n lineType: {\n type: 'line',\n interpolator: curveStepAfter,\n },\n lineStyle: (ds: IChartDataSet) => ({\n stroke: ds.color,\n strokeWidth: 2,\n strokeOpacity: 0.8,\n }),\n yAccessor: 'value',\n xScaleType: scaleUtc(),\n baseMarkProps: { transitionDuration: { default: 200, fill: 200 } },\n };\n };\n\n private createLineChartProps = (\n chartData: IChartData,\n dataSetsAttributes: IDataSetsAttributes,\n commonChartProps: IXYFrameProps<IChartDataSet, IDataPoint>,\n ) => {\n const { axisTickLineHeight, axisTickLabelHeight, axisLabelHeight, minimapHeight } = vizConfig.timeSeries;\n\n const { parentWidth } = this.props;\n const { showGroup } = this.state;\n\n const { shouldUseSecondaryXAxis, shouldDisplayMinimap } = dataSetsAttributes;\n const { dataSets, xExtentNormalizedMain, xExtentNormalizedMinimap, millisSetNormalizedMain } = chartData;\n\n // if secondary axis is needed, we need more bottom margin to fit both axes\n const totalXAxisHeight = shouldUseSecondaryXAxis\n ? 2 * (axisTickLabelHeight + axisLabelHeight) + axisTickLineHeight\n : axisTickLabelHeight;\n\n const lineChartProps = {\n ...commonChartProps,\n lines: dataSets.filter((ds: IChartDataSet) => showGroup[ds.label]), // only show selected groups\n hoverAnnotation: [\n {\n type: 'x',\n disable: ['connector', 'note'],\n },\n {\n type: 'vertical-points',\n threshold: 0.1,\n r: () => 5,\n },\n ],\n customHoverBehavior: this.createChartHoverHandler(dataSets, dataSetsAttributes),\n xExtent: xExtentNormalizedMain,\n axes: [\n {\n orient: 'left',\n label: 'metric value',\n tickFormat: (d: number) => utils.formatMetricValue(d),\n },\n {\n orient: 'bottom',\n label: shouldUseSecondaryXAxis ? 'Baseline' : undefined,\n tickValues: utils.calculateDateTimeTicks(millisSetNormalizedMain),\n tickFormat: (d: number) => <CustomAxisTickLabel millis={d} />,\n className: shouldUseSecondaryXAxis ? 'baseline-dual-axis' : '',\n },\n ],\n margin: { ...this.marginMain, bottom: totalXAxisHeight },\n matte: true,\n size: [parentWidth, shouldDisplayMinimap ? this.mainMinimapHeight - minimapHeight : this.mainMinimapHeight],\n xAccessor: (d: IDataPoint) => new Date(d.timestampMillisNormalizedMain),\n };\n\n if (shouldDisplayMinimap) {\n return {\n ...lineChartProps,\n minimap: {\n ...commonChartProps,\n lines: dataSets,\n yBrushable: false,\n brushEnd: this.onBrushEnd,\n size: [parentWidth, minimapHeight],\n axes: [\n {\n orient: 'left',\n tickFormat: (): void => null,\n },\n {\n orient: 'bottom',\n },\n ],\n margin: this.marginMinimap,\n xAccessor: (d: IDataPoint) => new Date(d.timestampMillisNormalizedMinimap),\n xExtent: xExtentNormalizedMinimap,\n } as IMinimapProps<IChartDataSet, IDataPoint>,\n };\n } else {\n return lineChartProps as IXYFrameProps<IChartDataSet, IDataPoint>;\n }\n };\n\n // construct the graph JSX components and store them as states\n private createGraphs = () => {\n const { metricSetPair, parentWidth } = this.props;\n const { showGroup } = this.state;\n const { minimapDataPointsThreshold, minimapHeight } = vizConfig.timeSeries;\n\n /*\n * Generate the data needed for the graph components\n */\n const baselineStartTimeMillis = metricSetPair.scopes.control.startTimeMillis;\n const canaryStartTimeMillis = metricSetPair.scopes.experiment.startTimeMillis;\n const isStartTimeMillisEqual = baselineStartTimeMillis === canaryStartTimeMillis;\n\n // Top level attributes to determine how data is formatted & which chart components to include\n const dataSetsAttributes = {\n startTimeMillisOffset: canaryStartTimeMillis - baselineStartTimeMillis,\n maxDataCount: Math.max(metricSetPair.values.control.length, metricSetPair.values.experiment.length),\n shouldDisplayMinimap: metricSetPair.values.control.length > minimapDataPointsThreshold,\n shouldUseSecondaryXAxis: !isStartTimeMillisEqual && showGroup.canary && showGroup.baseline,\n };\n\n const chartData = this.getChartData(dataSetsAttributes, metricSetPair);\n\n /*\n * Build the visualization components\n */\n const commonChartProps = this.createCommonChartProps();\n const lineChartProps = this.createLineChartProps(chartData, dataSetsAttributes, commonChartProps);\n\n const line = (\n <>\n <div className=\"time-series-chart\">\n {dataSetsAttributes.shouldDisplayMinimap ? (\n <MinimapXYFrame {...lineChartProps} />\n ) : (\n <XYFrame {...lineChartProps} />\n )}\n </div>\n {dataSetsAttributes.shouldUseSecondaryXAxis ? (\n <SecondaryTSXAxis\n margin={{ left: this.marginMain.left, right: this.marginMain.right, top: 0, bottom: 0 }}\n width={parentWidth}\n millisSet={chartData.millisSetNormalizedMain.map(\n (ms: number) => ms + dataSetsAttributes.startTimeMillisOffset,\n )}\n axisLabel=\"canary\"\n bottomOffset={dataSetsAttributes.shouldDisplayMinimap ? minimapHeight : 0}\n />\n ) : null}\n {dataSetsAttributes.shouldDisplayMinimap ? (\n <div className=\"zoom-icon\">\n <i className=\"fas fa-search-plus\" />\n </div>\n ) : null}\n </>\n );\n\n const differenceArea =\n showGroup.baseline && showGroup.canary ? (\n <DifferenceArea {...this.props} millisSetBaseline={chartData.millisSetNormalizedMinimap} />\n ) : null;\n\n this.setState({\n graphs: {\n line,\n differenceArea,\n },\n });\n };\n\n private onLegendClickHandler = (group: string) => {\n const showGroup = this.state.showGroup;\n this.setState({\n showGroup: { ...showGroup, [group]: !showGroup[group] },\n });\n };\n\n // function factory to create a custom hover handler function based on the datasets\n private createChartHoverHandler = (dataSets: IChartDataSet[], dataSetsAttr: IDataSetsAttributes) => {\n const { shouldUseSecondaryXAxis } = dataSetsAttr;\n return (d: (IXYFrameHoverBaseArgs<IDataPoint> & IDataPoint) | undefined) => {\n if (d && d.timestampMillisNormalizedMain) {\n const tooltipData = dataSets.map(\n (ds: IChartDataSet): ITooltipDataPoint => {\n const coord = ds.coordinatesUnfiltered.find(\n (c: IDataPoint) => c.timestampMillisNormalizedMain === d.timestampMillisNormalizedMain,\n );\n return {\n color: ds.color,\n label: ds.label,\n ts: coord.timestampMillisActual,\n value: coord.value,\n };\n },\n );\n\n let tooltipRows = tooltipData\n .concat()\n .sort((a: ITooltipDataPoint, b: ITooltipDataPoint) => b.value - a.value)\n .map((o: ITooltipDataPoint) => {\n // if there's a ts offset, timestamp should be displayed for each group\n const tsRow = shouldUseSecondaryXAxis ? <div className=\"tooltip-ts\">{timestamp(o.ts)}</div> : null;\n\n return (\n <div key={o.label} className={classNames({ 'tooltip-dual-axis-row': shouldUseSecondaryXAxis })}>\n {tsRow}\n <div id={o.label}>\n <CircleIcon group={o.label} />\n <span>{`${o.label}: `}</span>\n <span>{utils.formatMetricValue(o.value)}</span>\n </div>\n </div>\n );\n });\n\n if (tooltipData.length === 2) {\n const canaryMinusBaseline = tooltipData[1].value - tooltipData[0].value;\n tooltipRows = tooltipRows.concat([\n <div id=\"diff\" key=\"diff\" className=\"tooltip-row\">\n <span>Canary - Baseline: </span>\n <span>{utils.formatMetricValue(canaryMinusBaseline)}</span>\n </div>,\n ]);\n }\n\n const tooltipContent = (\n <div>\n {/* if no dual axes, display timestamp row at the top level */}\n {shouldUseSecondaryXAxis ? null : (\n <div key=\"ts\" className=\"tooltip-ts\">\n {timestamp(tooltipData[0].ts)}\n </div>\n )}\n {tooltipRows}\n </div>\n );\n this.setState({\n tooltip: {\n content: tooltipContent,\n x: d.voronoiX + this.marginMain.left,\n y: d.voronoiY + this.marginMain.top,\n },\n });\n } else {\n this.setState({ tooltip: null });\n }\n };\n };\n\n // Handle user brush action event from semiotic\n private onBrushEnd = (e: Date[]) => {\n this.setState({\n userBrushExtent: e,\n });\n };\n\n public render() {\n const { metricSetPair } = this.props;\n const { showGroup, tooltip } = this.state;\n const { line, differenceArea } = this.state.graphs;\n\n return (\n <div className=\"time-series\">\n <ChartHeader metric={metricSetPair.name} />\n <ChartLegend showGroup={showGroup} isClickable={true} onClickHandler={this.onLegendClickHandler} />\n <div className=\"graph-container\">\n {line}\n <Tooltip {...tooltip} />\n </div>\n {differenceArea}\n </div>\n );\n }\n}\n","import * as React from 'react';\nimport ContainerDimensions from 'react-container-dimensions';\n\nimport BoxPlot from './boxplot';\nimport Histogram from './histogram';\nimport type { IMetricSetPairGraphProps } from '../metricSetPairGraph.service';\nimport { GraphType } from '../metricSetPairGraph.service';\nimport NoValidDataSign from './noValidDataSign';\nimport TimeSeries from './timeSeries';\n\nimport './semioticGraph.less';\n\nexport default class SemioticGraph extends React.Component<IMetricSetPairGraphProps> {\n private fetchChart = (parentWidth: number) => {\n const {\n type,\n metricSetPair: {\n values: { control, experiment },\n },\n } = this.props;\n const chartProps = {\n ...this.props,\n parentWidth,\n };\n const filterInvalidValues = (data: number[]) => data.filter((v) => typeof v === 'number');\n\n if (filterInvalidValues(control).length === 0 && filterInvalidValues(experiment).length === 0) {\n return <NoValidDataSign />;\n }\n\n switch (type) {\n case GraphType.TimeSeries:\n return <TimeSeries {...chartProps} />;\n case GraphType.Histogram:\n return <Histogram {...chartProps} />;\n case GraphType.BoxPlot:\n return <BoxPlot {...chartProps} />;\n default:\n return null;\n }\n };\n\n public render() {\n return (\n <div className=\"semiotic-graph\">\n <ContainerDimensions>{({ width }: { width: number }) => this.fetchChart(width)}</ContainerDimensions>\n </div>\n );\n }\n}\n"],"names":["ChartHeader","metric","className","React","createElement","vizConfig","colors","baseline","canary","background","height","timeSeries","minimapDataPointsThreshold","minimapHeight","axisTickLineHeight","axisTickLabelHeight","axisLabelHeight","dataGroupMap","ChartLegend","props","onClickHandler","showGroup","isClickable","baselineIconStyle","backgroundColor","canaryIconStyle","handleClick","group","legendItemClass","classNames","clickable","legendItemClassCanary","deselected","legendItemClassBaseline","onClick","style","CircleIcon","iconStyle","color","paddingRight","Tooltip","Component","componentDidUpdate","prevProps","target","this","tooltipTarget","content","ReactTooltip","hide","show","render","x","y","id","tooltipTargetStyle","left","top","width","opacity","pointerEvents","position","zIndex","ref","el","type","border","formatMetricValue","value","isNaN","Math","abs","pow","format","fromMillis","millis","luxonOpts","SETTINGS","feature","displayTimestampsInUserLocalTime","zone","defaultTimeZone","DateTime","calculateDateTimeTicks","millisSet","minMillis","maxMillis","length","offsetMillis","offset","minMillisShifted","maxMillisShifted","scaleUtc","domain","Date","ticks","map","d","valueOf","BoxPlot","constructor","super","arguments","state","tooltip","margin","bottom","right","decorateData","dataPoints","dp","generateChartData","metricSetPair","baselineInput","values","control","canaryInput","experiment","concat","filter","v","createChartHoverHandler","points","data","forEach","p","key","push","label","summaryLabels","b","summaryKeysColumn","baselineColumn","hd","i","utils.formatMetricValue","canaryColumn","tooltipContent","setState","defineAnnotations","g","summaryKeys","customAnnotationFunction","args","orFrameState","pieceDataXY","categories","summaryData","sd","boxPlotWidth","statLabelMap","median","q1area","q3area","createNoteElement","posY","dataPoint","name","summaryPieceName","noteData","dx","dy","note","wrap","lineType","align","orientation","padding","Annotation","nodes","summaryKey","pieceData","find","Node","forceOptions","minPos","maxPos","Force","compute","n","currentPos","getChartProps","parentWidth","chartData","size","projection","summaryType","oLabel","oPadding","fill","fillOpacity","summaryStyle","stroke","strokeWidth","pieceClass","r","iterations","rExtent","extent","o","customHoverBehavior","hoverAnnotation","annotations","summaryHoverAnnotation","oAccessor","rAccessor","svgAnnotationRules","summaryClass","axis","orient","tickFormat","OrdinalFrame","Histogram","combinedInput","scaleLinear","nice","histogramData","histogram","h","x0","x1","baselineBin","count","canaryBin","x1Max","max","cd","xyData","column","xy","halfHeight1","halfHeight2","min","summary","tooltipRows","s","fontWeight","c","piece","nx","ny","textAnchor","parseFloat","strokeOpacity","NoValidDataSign","CustomAxisTickLabel","text","datetime","hour","minute","toFormat","utils.dateTimeTickFormatter","SecondaryTSXAxis","axisLabel","bottomOffset","ms","totalAxisHeight","netWidth","range","containerStyle","svgWrapperStyle","transform","Axis","scale","tickValues","utils.calculateDateTimeTicks","DifferenceArea","chartHeight","headerHeight","getChartData","scopes","stepMillis","maxDataPoints","intDataSet","Array","_","e","timestamp","startTimeMillis","baselineReferenceDataPoints","ds","timestampMillis","differenceDataPoints","coordinates","getSecondaryAxis","millisOffset","millisSetBaseline","millisSetCanary","getXAxisTotalHeight","shouldUseSecondaryXAxis","xAxisTotalHeight","computedConfig","lines","interpolator","curveStepAfter","lineStyle","strokeDasharray","xAccessor","yAccessor","xScaleType","axes","xExtent","XYFrame","TimeSeries","userBrushExtent","graphs","line","differenceArea","mainMinimapHeight","marginMain","marginMinimap","dataSetsAttr","maxDataCount","isOnlyCanarySelected","dataSets","timestampMillisActual","timestampMillisNormalizedMain","timestampMillisNormalizedMinimap","coordinatesUnfiltered","millisSetNormalizedMinimap","millisSetNormalizedMain","xExtentNormalizedMain","xExtentNormalizedMinimap","createCommonChartProps","baseMarkProps","transitionDuration","default","createLineChartProps","dataSetsAttributes","commonChartProps","shouldDisplayMinimap","totalXAxisHeight","lineChartProps","disable","threshold","matte","minimap","yBrushable","brushEnd","onBrushEnd","createGraphs","baselineStartTimeMillis","canaryStartTimeMillis","isStartTimeMillisEqual","startTimeMillisOffset","MinimapXYFrame","onLegendClickHandler","tooltipData","coord","ts","sort","a","tsRow","canaryMinusBaseline","voronoiX","voronoiY","componentDidMount","prevState","SemioticGraph","fetchChart","chartProps","filterInvalidValues","GraphType","ContainerDimensions"],"mappings":"02BAMA,IAAAA,EAAe,EAAGC,4BAEb,MAAA,CAAIC,UAAU,gBACbC,EAAAC,cAAC,KAAA,CAAGF,UAAU,gCACZC,EAAAC,cAAC,QAAKF,UAAU,oBAAmB,gBACnCC,EAAAC,cAAC,YAAK,IAEHH,KCMJ,MAAMI,EAAwB,CACnCC,OAAQ,CACNC,SAAU,UACVC,OAAQ,UACRC,WAAY,WAEdC,OAAQ,IACRC,WAAY,CACVC,2BAA4B,IAC5BC,cAAe,GACfC,mBAAoB,EACpBC,oBAAqB,GACrBC,gBAAiB,IAEnBC,aAAc,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