diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-20 04:49:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-20 04:49:55 +0000 |
commit | ab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb (patch) | |
tree | 7a900833aad3ccc685712c6c2a7d87576d54f427 /web/gui/v1/static/js/main.e248095a.chunk.js.map | |
parent | Adding upstream version 1.40.1. (diff) | |
download | netdata-ab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb.tar.xz netdata-ab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb.zip |
Adding upstream version 1.41.0.upstream/1.41.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | web/gui/v1/static/js/main.e248095a.chunk.js.map | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/web/gui/v1/static/js/main.e248095a.chunk.js.map b/web/gui/v1/static/js/main.e248095a.chunk.js.map new file mode 100644 index 000000000..d8ee7a728 --- /dev/null +++ b/web/gui/v1/static/js/main.e248095a.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["utils/units-conversion.ts","components/button/button.tsx","domains/chart/components/toolbox-button.tsx","domains/chart/components/resize-handler.tsx","domains/global/actions.ts","hooks/use-user-node-access.ts","utils/index.ts","utils/name-2-id.ts","domains/global/reducer.ts","components/icon.tsx","domains/chart/reducer.ts","domains/chart/utils/transformDataAttributes.ts","domains/chart/actions.ts","components/header/constants.js","main.js","domains/global/constants.ts","components/header/ACLK/use-cloud-connection-status.tsx","components/header/ACLK/cloud-connection-status-modal.tsx","components/header/ACLK/cloud-connection-status.tsx","utils/utils.ts","vendor/d3pie-0.2.1-netdata-3.js","components/header/ACLK/index.ts","utils/server-detection.ts","domains/chart/selectors.ts","utils/date-time.js","domains/dashboard/actions.ts","domains/chart/constants.ts","domains/chart/utils/seconds4human.ts","../public/lib/dygraph-c91c859.min.js","domains/chart/utils/legend-utils.ts","domains/dashboard/reducer.ts","store/root-reducer.ts","utils/api.ts","utils/netdata-sdk/axios-instance.ts","utils/netdata-sdk/metrics-stream.ts","utils/fill-missing-data.ts","components/ui-notification/styled.ts","components/ui-notification/ui-notification.tsx","components/notifications/styled.tsx","components/notifications/notifications.tsx","domains/dashboard/utils/parse-url.ts","domains/chart/sagas.ts","components/space-panel/settings.ts","domains/global/alarms-sagas.ts","domains/global/utils.ts","domains/global/sagas.ts","domains/dashboard/sagas.ts","store/root-saga.ts","store/store.ts","domains/chart/utils/jquery-loader.ts","utils/css-loader.ts","domains/chart/utils/chartLibrariesSettings.ts","domains/chart/utils/get-chart-url-options.ts","utils/biggest-interval-number.ts","domains/chart/components/loader.tsx","domains/chart/utils/get-pan-and-zoom-step.ts","utils/safe-equal-check.ts","domains/chart/utils/formatters.ts","utils/color-hex-2-rgb.ts","domains/chart/components/chart-legend-bottom.styled.ts","domains/chart/components/legendText.js","domains/chart/components/chart-legend-right.tsx","domains/chart/components/chart-legend-bottom.tsx","domains/chart/components/chart-legend.tsx","domains/chart/components/legend-toolbox.tsx","domains/chart/components/lib-charts/dygraph/utils.ts","domains/chart/hooks/use-proceeded-chart.ts","domains/chart/hooks/useDygraphBadge.js","domains/chart/components/lib-charts/proceeded-chart-disclaimer.tsx","domains/chart/components/lib-charts/alarmBadge.js","domains/chart/components/lib-charts/dygraph-chart.tsx","utils/debounce.ts","domains/chart/components/lib-charts/easy-pie-chart.tsx","domains/chart/components/lib-charts/gauge-chart.tsx","domains/chart/utils/color-luminance.ts","domains/chart/components/lib-charts/sparkline-chart.tsx","domains/chart/utils/d3-loader.ts","domains/chart/utils/google-visualization-loader.ts","domains/chart/components/lib-charts/d3pie-chart.tsx","domains/chart/components/lib-charts/peity-chart.tsx","domains/chart/components/lib-charts/google-chart.tsx","domains/chart/components/lib-charts/text-only.tsx","domains/chart/components/lib-charts/group-box-chart/utilities.ts","domains/chart/components/lib-charts/group-box-chart/events.ts","domains/chart/components/lib-charts/group-box-chart/drawBoxes.ts","domains/chart/components/lib-charts/group-box-chart/getAlign.ts","domains/chart/components/lib-charts/group-box-chart/groupBox.tsx","domains/chart/components/lib-charts/group-box-chart/groupBoxes.tsx","domains/chart/components/lib-charts/group-box-chart/legend.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/getLabel.ts","domains/chart/components/lib-charts/group-box-chart/kubernetes/separator.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/header.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/tabs.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/section.tsx","domains/chart/utils/get-portal-node-styles.ts","hooks/use-common-intersection.ts","domains/chart/components/invisible-searchable-text.tsx","domains/chart/components/disable-out-of-view.tsx","domains/chart/components/chart-container/chart-container.tsx","domains/dashboard/utils/netdata-dashboard.ts","domains/chart/components/lib-charts/group-box-chart/kubernetes/chartOverview.tsx","domains/dashboard/components/migration-modal/use-migration-modal.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/chart.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/item.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/dateSection.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/metrics.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/context.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/list.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/popover.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/index.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/transform.ts","domains/chart/components/abstract-chart.tsx","hooks/use-show-value-outside.ts","domains/chart/components/chart.tsx","domains/chart/components/chart-dropdown/styled.ts","domains/chart/components/chart-dropdown/chart-dropdown.tsx","domains/chart/components/chart-spinner/styled.ts","domains/chart/components/chart-spinner/chart-spinner.tsx","domains/chart/components/chart-with-loader/styled.ts","styles/z-index.js","domains/chart/components/chart-with-loader/chart-with-loader.tsx","domains/chart/hooks/use-fetch-new-data-clock.ts","domains/chart/utils/get-chart-pixels-per-point.ts","domains/dashboard/selectors.ts","domains/chart/components/snapshot-loader.tsx","domains/chart/components/portals.tsx","hooks/use-http.ts","domains/dashboard/components/modal-portal.tsx","domains/dashboard/components/print-modal/print-modal.tsx","domains/dashboard/components/sidebar-social-media/styled.ts","domains/dashboard/components/sidebar-social-media/sidebar-social-media.tsx","domains/dashboard/components/sidebar-social-media-portal/sidebar-social-media-portal.tsx","components/notifications-container/notifications-container.tsx","components/header/item.js","components/header/node/index.js","components/tooltips/customTooltip.js","components/tooltips/getContent.js","components/tooltips/index.js","components/header/options/index.js","components/app-header/components/versionControl/index.js","components/header/version.js","hooks/useToggle/index.js","hooks/useLocalStorage/index.js","components/mdx-components/dropdown/styled.js","components/date-picker/styled.js","components/mdx-components/dropdown/dropdown.js","components/date-picker/timePeriod.js","components/date-picker/utils.js","components/date-picker/timePeriods.js","components/date-picker/customTimePeriod.js","components/datePicker/datePickerLib.js","components/datePicker/styled.js","components/date-picker/datePickerInput.js","components/date-picker/useLocaleDate.js","components/date-picker/useConvertedDate.js","components/date-picker/datePickerWrapper.js","components/date-picker/periodIndication.js","components/date-picker/accessorElement/utils.js","components/date-picker/accessorElement/container.js","components/date-picker/accessorElement/dateBox.js","components/date-picker/accessorElement/durationBox.js","components/date-picker/accessorElement/index.js","components/date-picker/datePickerDrop.js","components/date-picker/reduxDatePickerContainer.js","components/header/globalControls/container.js","components/header/globalControls/playPausePill/styledPill.js","components/header/globalControls/playPausePill/index.js","components/menus/item.js","components/menus/list.js","components/header/globalControls/playOptions/playOptionsTooltip.js","components/menus/styled.js","components/header/globalControls/playOptions/index.js","components/header/globalControls/index.js","components/header/pill/styled.js","components/header/pill/index.js","components/header/alarms.js","components/header/news/index.js","components/header/timezone/dropdown.js","components/header/timezone/search/searchInput.js","components/header/timezone/search/index.js","components/header/timezone/container.js","components/header/timezone/wrapper.js","components/header/timezone/offsetItem.js","components/header/timezone/timezones.js","components/header/timezone/utils.js","components/header/timezone/index.js","components/auth/signIn/iframe.js","components/auth/signIn/useCheckSignInStatus.js","components/header/signIn/index.js","components/discover-cloud/cloudTab.js","components/discover-cloud/discoverCloudModal.js","components/discover-cloud/contents.js","components/discover-cloud/discoverCloudDrop.js","components/discover-cloud/discoverCloud.js","components/header/index.js","components/sidebar/spaces/expandButton.js","components/auth/signOut/index.js","components/sidebar/spaces/userSettings.js","components/sidebar/spaces/spacesSkeleton.js","components/sidebar/spaces/spacesIframe.js","components/sidebar/spaces/index.js","domains/dashboard/utils/sorting.ts","components/sidebar/space/nodes.js","components/sidebar/space/replicatedNodes/anchor.js","components/sidebar/space/replicatedNodes/node.js","components/sidebar/space/replicatedNodes/index.js","components/sidebar/space/spacePanelIframe.js","components/sidebar/space/prompts/signIn/promptContent.js","components/sidebar/space/prompts/signIn/index.js","components/sidebar/space/prompts/offline/noNetwork.js","components/sidebar/space/prompts/offline/index.js","components/sidebar/space/visitedNodes/styled.js","components/sidebar/space/visitedNodes/index.js","utils/truncateMiddle/index.js","components/sidebar/space/index.js","components/sidebar/index.js","components/layout/index.js","utils/map-theme.ts","domains/dashboard/components/migration-modal/migration-modal.js","domains/dashboard/components/migration-manager/migration-manager.tsx","App.tsx","hooks/use-registry.ts","hooks/use-alarms.ts","hooks/use-info.ts","domains/dashboard/hooks/use-charts-metadata.ts","domains/dashboard/hooks/useAlarmFromUrl.js","index.tsx","components/auth/signIn/index.js","utils/hash-utils.ts","utils/post-message.ts","utils/env.ts","domains/dashboard/constants.ts","store/redux-separate-context.ts","utils/is-demo.ts","domains/global/selectors.ts","components/anchor/index.tsx","utils/createRequestAction.ts","domains/global/options.ts"],"names":["currentTemperatureSetting","currentSecondsAsTimeSetting","zeropad","x","seconds2time","seconds","maxTimeUnit","secondsReturn","Math","abs","days","floor","hours","minutes","daysString","hoursString","minutesString","secondsString","toFixed","scalableUnits","pps","Kpps","Mpps","bytes","kilobytes","megabytes","gigabytes","terabytes","Hz","kHz","MHz","GHz","THz","PHz","EHz","ZHz","B","KiB","MiB","GiB","TiB","PiB","KB","MB","GB","TB","PB","EB","EiB","twoFixed","multiplier","value","convertibleUnits","Celsius","Fahrenheit","check","convert","celsius","fahrenheit","milliseconds","microseconds","max","identity","unitsConversionCreator","keys","latest","globalReset","this","get","uuid","min","units","desiredUnits","commonUnitsName","switchUnitsCallback","temperatureSetting","secondsAsTimeSetting","undefined","newConvertFunction","tunits","tdivider","scalableUnitsGroup","Object","forEach","unit","unitDivider","commonUnitsKey","t","divider","commonUnits","console","log","toString","Button","React","ref","children","className","rest","type","classNames","ToolboxButton","iconType","onClick","onDoubleClick","onMouseDown","onTouchStart","popoverContent","popoverTitle","buttonRef","useRef","showHelp","useSelector","selectShowHelp","useEffect","current","window","$","popover","container","animation","html","trigger","placement","delay","show","NETDATA","options","show_help_delay_show_ms","hide","show_help_delay_hide_ms","title","content","LOCALSTORAGE_HEIGHT_KEY_PREFIX","ResizeHandler","chartContainerElement","chartUuid","heightId","isLegendOnBottom","useState","clientHeight","resizeHeight","setResizeHeight","dispatch","useDispatch","setResizeHeightAction","id","handleResize","useCallback","event","preventDefault","intialHeight","eventStartHeight","touches","clientY","setHeight","currentHeight","nextHeight","style","height","heightForPersistance","LEGEND_BOTTOM_SINGLE_LINE_HEIGHT","localStorage","setItem","onMouseMove","e","onTouchMove","document","addEventListener","onTouchEnd","removeEventListener","onMouseEnd","stopPropagation","requestCommonColorsAction","createAction","storeKey","setCommonMinAction","setCommonMaxAction","setGlobalSelectionAction","setGlobalPanAndZoomAction","resetGlobalPanAndZoomAction","setDefaultAfterAction","resetDefaultAfterAction","setGlobalChartUnderlayAction","centerAroundHighlightAction","clearHighlightAction","windowFocusChangeAction","fetchHelloAction","createRequestAction","updatePersonUrlsAction","accessRegistrySuccessAction","startAlarmsAction","fetchAllAlarmsAction","updateActiveAlarmsAction","setOptionAction","resetOptionsAction","loadSnapshotAction","chartsMetadataRequestSuccess","setSpacePanelStatusAction","setSpacePanelTransitionEndAction","setAlarmAction","resetRegistry","setGlobalPauseAction","resetGlobalPauseAction","setUTCOffset","setUserNodeAccess","useRequestRefreshOfAccessMessage","sendToChildIframe","SIGN_IN_IFRAME_ID","payload","useUserNodeAccessMessage","useListenToPostMessage","message","name2id","s","replace","initialState","commonColorsKeys","commonMin","commonMax","currentSelectionMasterId","globalPanAndZoom","defaultAfter","isMainJs","getInitialAfterFromWindow","globalChartUnderlay","hoveredX","hasWindowFocus","hasFocus","globalPause","spacePanelIsActive","spacePanelTransitionEndIsActive","registry","cloudBaseURL","hasFetchedInfo","hasFetchedHello","isHelloCallError","hostname","isCloudEnabled","isCloudAvailable","isAgentClaimed","isACLKAvailable","hasStartedInfo","isFetchingHello","fullInfoPayload","machineGuid","personGuid","registryMachines","registryMachinesArray","registryServer","snapshot","alarms","activeAlarms","hasStartedAlarms","alarm","chartsMetadata","isFetching","isFetchingError","data","optionsMergedWithLocalStorage","userNodeAccess","globalReducer","createReducer","getKeyForCommonColorsState","colorsAttribute","commonColorsAttribute","chartContext","hasCustomColors","length","hasLastOnly","array","last","createCommonColorsKeysSubstate","custom","split","init","shouldCopyTheme","assigned","available","themes","colors","on","state","dimensionNames","keyName","subState","currentlyAssignedNr","requestedDimensionsAssigned","mergeAll","filter","dimensionName","map","i","commonMinKey","charts","currentExtreme","values","commonMaxKey","isActive","after","before","masterID","warn","highlightMargin","resetPanAndZoom","hasFocusNow","forcePlay","stop_updates_when_focus_is_lost","utcOffset","request","success","failure","CLOUD_BASE_URL_DISABLED","fetchInfoAction","key","clearLocalStorage","getOptionsMergedWithLocalStorage","parsedData","dataKey","uncompressed","uncompress","JSON","parse","reduce","acc","obj","typeToClassName","left","reset","right","zoomIn","zoomOut","resize","lineChart","areaChart","noChart","loading","noData","Icon","initialSingleState","chartData","chartId","chartMetadata","chartPanAndZoom","fetchDataParams","isRemotelyControlled","viewRange","isFetchingData","isFetchDataFailure","isFetchDetailsFailure","isFetchingDetails","snapshotDataIsFetching","snapshotDataIsError","snapshotData","chartReducer","getSubstate","fetchDataAction","chart","fetchDataCancelAction","substate","useNewKeysOnlyIfDifferent","fetchDataForSnapshotAction","snapshotExportResetAction","pick","fetchChartAction","setChartPanAndZoomAction","shouldForceTimeRange","resetChartPanAndZoomAction","SYNC_PAN_AND_ZOOM","assoc","clearChartStateAction","omit","getDataAttribute","element","defaultValue","hasAttribute","getAttribute","test","getAttributesStatic","node","mapObjIndexed","attribute","getDataAttributeBoolean","host","httpMethod","chartLibrary","chartDefaults","library","width","legend","legendPosition","unitsCommon","unitsDesired","aggrMethod","labels","postGroupBy","postAggregationMethod","dimensionsAggrMethod","aggrGroups","selectedChart","filteredRows","groupBy","nodeIDs","commonColors","decimalDigits","dimensions","selectedDimensions","forceTimeWindow","appendOptions","gtime","method","overrideOptions","pixelsPerPoint","points","hideResizeHandler","detectResize","dygraphType","dygraphValueRange","dygraphTheme","dygraphSmooth","dygraphColors","dygraphRightGap","dygraphShowRangeSelector","dygraphShowRoller","dygraphTitle","dygraphTitleHeight","dygraphLegend","dygraphLabelsDiv","dygraphLabelsSeparateLine","dygraphIncludeZero","dygraphShowZeroValues","dygraphShowLabelsOnHighLight","dygraphHideOverlayOnMouseOut","dygraphXRangePad","dygraphYRangePad","dygraphYLabelWidth","dygraphStrokeWidth","dygraphStrokePattern","dygraphDrawPoints","dygraphDrawGapEdgePoints","dygraphConnectSeparatedPoints","dygraphPointSize","dygraphStepPlot","dygraphStrokeBorderColor","dygraphStrokeBorderWidth","dygraphFillGraph","dygraphFillAlpha","dygraphStackedGraph","dygraphStackedGraphNanFill","dygraphAxisLabelFontSize","dygraphAxisLineColor","dygraphAxisLineWidth","dygraphDrawGrid","dygraphGridLinePattern","dygraphGridLineWidth","dygraphGridLineColor","dygraphMaxNumberWidth","dygraphSigFigs","dygraphDigitsAfterDecimal","dygraphHighlighCircleSize","dygraphHighlightSeriesOpts","dygraphHighlightSeriesBackgroundAlpha","dygraphXPixelsPerLabel","dygraphXAxisLabelWidth","dygraphDrawXAxis","dygraphYPixelsPerLabel","dygraphYAxisLabelWidth","dygraphDrawYAxis","dygraphDrawAxis","easyPieChartMinValue","easyPieChartMaxValue","easyPieChartBarColor","easyPieChartTrackColor","easyPieChartScaleColor","easyPieChartScaleLength","easyPieChartLineCap","easyPieChartLineWidth","easyPieChartTrackWidth","easyPieChartSize","easyPieChartRotate","easyPieChartAnimate","easyPieChartEasing","gaugeMinValue","gaugeMaxValue","gaugePointerColor","gaugeStrokeColor","gaugeStartColor","gaugeStopColor","gaugeGenerateGradient","sparklineType","sparklineLineColor","sparklineFillColor","sparklineChartRangeMin","sparklineChartRangeMax","sparklineComposite","sparklineEnableTagOptions","sparklineTagOptionPrefix","sparklineTagValuesAttribute","sparklineDisableHiddenCheck","sparklineDefaultPixelsPerValue","sparklineSpotColor","sparklineMinSpotColor","sparklineMaxSpotColor","sparklineSpotRadius","sparklineValueSpots","sparklineHighlightSpotColor","sparklineHighlightLineColor","sparklineLineWidth","sparklineNormalRangeMin","sparklineNormalRangeMax","sparklineDrawNormalOnTop","sparklineXvalues","sparklineChartRangeClip","sparklineChartRangeMinX","sparklineChartRangeMaxX","sparklineDisableInteraction","sparklineDisableTooltips","sparklineOnHover","sparklineDisableHighlight","sparklineHighlightLighten","sparklineHighlightColor","sparklineTooltipContainer","sparklineTooltipClassname","sparklineTooltipFormat","sparklineTooltipPrefix","sparklineTooltipSuffix","sparklineTooltipSkipNull","sparklineTooltipValueLookups","sparklineTooltipFormatFieldlist","sparklineTooltipFormatFieldlistKey","sparklineNumberFormatter","sparklineNumberDigitGroupSep","sparklineNumberDecimalMark","sparklineNumberDigitGroupCount","sparklineAnimatedZooms","d3pieTitle","d3pieSubtitle","d3pieFooter","d3pieTitleColor","d3pieTitleFontsize","d3pieTitleFontweight","d3pieTitleFont","d3PieSubtitleColor","d3PieSubtitleFontsize","d3PieSubtitleFontweight","d3PieSubtitleFont","d3PieFooterColor","d3PieFooterFontsize","d3PieFooterFontweight","d3PieFooterFont","d3PieFooterLocation","d3PiePieinnerradius","d3PiePieouterradius","d3PieSortorder","d3PieSmallsegmentgroupingEnabled","d3PieSmallsegmentgroupingValue","d3PieSmallsegmentgroupingValuetype","d3PieSmallsegmentgroupingLabel","d3PieSmallsegmentgroupingColor","d3PieLabelsOuterFormat","d3PieLabelsOuterHidewhenlessthanpercentage","d3PieLabelsOuterPiedistance","d3PieLabelsInnerFormat","d3PieLabelsInnerHidewhenlessthanpercentage","d3PieLabelsMainLabelColor","d3PieLabelsMainLabelFont","d3PieLabelsMainLabelFontsize","d3PieLabelsMainLabelFontweight","d3PieLabelsPercentageColor","d3PieLabelsPercentageFont","d3PieLabelsPercentageFontsize","d3PieLabelsPercentageFontweight","d3PieLabelsValueColor","d3PieLabelsValueFont","d3PieLabelsValueFontsize","d3PieLabelsValueFontweight","d3PieLabelsLinesEnabled","d3PieLabelsLinesStyle","d3PieLabelsLinesColor","d3PieLabelsTruncationEnabled","d3PieLabelsTruncationTruncatelength","d3PieMiscColorsSegmentstroke","d3PieMiscGradientEnabled","d3PieMiscColorsPercentage","d3PieMiscGradientColor","d3PieCssprefix","peityStrokeWidth","textOnlyDecimalPlaces","textOnlyPrefix","textOnlySuffix","getAttributes","attributesStatic","showValueOf","showValueOfAttribues","Array","from","attributes","name","startsWith","merged","isEmpty","getAttributesDynamic","defaultAttributes","initialLegendRight","localeDateString","localeTimeString","updateLocaleFunctions","newLocaleDateString","newLocaleTimeString","netdataShowAlarms","netdataRegistry","netdataServer","netdataServerStatic","netdataCheckXSS","reduxStore","escapeUserInputHTML","setOption","getFromRegistry","prop","selectRegistry","getState","verifyURL","urlOptions","hash","theme","help","mode","update_always","pan_and_zoom","server","getHashParam","highlight","highlight_after","highlight_before","nowelcome","show_alarms","family","utc","hasProperty","property","genHash","forReload","parseHash","variables","location","len","p","decodeURIComponent","booleans","numeric","parseInt","origin","pathname","welcome","Date","now","hashUpdate","history","replaceState","netdataPanAndZoomCallback","status","netdataSnapshotData","updateUtcParam","netdataHighlightCallback","round","d1","d2","getElementById","innerHTML","seconds4human","tooltip","clearHighlight","showHighlight","localStorageTested","localStorageTest","Storage","removeItem","loadLocalStorage","ret","getItem","error","saveLocalStorage","getTheme","def","setTheme","netdataTheme","updateTheme","netdataShowHelp","naturalSortChunkify","j","tz","y","n","charAt","charCodeAt","m","naturalSortCompare","a","b","aa","toLowerCase","bb","c","Number","d","saveTextToClient","filename","blob","Blob","url","URL","createObjectURL","link","createElement","setAttribute","el","appendChild","setTimeout","removeChild","revokeObjectURL","click","saveObjectToClient","stringify","netdataURL","indexOf","substring","netdataReload","reload","gotoHostedModalHandler","gotoServerValidateRemaining","gotoServerMiddleClick","gotoServerStop","gotoServerValidateUrl","guid","penalty","finalURL","registryHello","machine_guid","open","modal","gotoServerModalHandler","checked","alternateUrls","count","registrySearch","urls","switchRegistryModalHandler","notifyForSwitchRegistry","newPersonGuid","ajax","encodeURIComponent","serverDefault","async","cache","headers","xhrFields","withCredentials","done","xss","checkAlways","fail","deleteRegistryGuid","deleteRegistryUrl","deleteRegistryModalHandler","notifyForDeleteRegistry","responseEl","registryDelete","result","menus","submenu_names","version","release_channel","hosts","duration","update_every","chartsPerRow","chartsHeight","total","prioritySort","priority","sortObjectByPriority","object","idx","sorted","hasOwnProperty","push","sort","scrollToId","offset","animate","scrollTop","top","customDashboard","menu","submenu","context","netdataDashboard","sparklines_registry","os","sparkline","prefix","dimension","suffix","gaugeChart","anyAttribute","attr","menuTitle","menu_pattern","slice","menuIcon","menuInfo","menuHeight","submenuTitle","submenuInfo","submenuHeight","relative","contextInfo","contextValueRange","valueRange","contextHeight","contextDecimalDigits","enrichChartData","parts","tmp","match","endsWith","lastIndexOf","headMain","head","generateHeadCharts","hcharts","hi","hlen","renderPage","div","pcent_width","sidebar","mainhead","main","hasChartsOnBottom","chartAdditionalHeight","menuid","icon","info","shtml","mhead","sub","submenus","si","slen","submenuid","chtml","ci","clen","chartHeight","chartCommonMax","isMemoryModeDbEngine","memory_mode","dimensions_count","toLocaleString","charts_count","alarms_count","printPage","finalizePage","renderChartsAndMenu","menu_key","handleLoadJs","promise","callback","catch","alert","then","loadClipboard","clipboard","loadBootstrapTable","Promise","all","loadBootstrapSlider","slider","default","Slider","loadLzString","loadPako","pako","alarmsUpdateModal","active","footer","alarm_families","count_active","count_all","families","families_sort","charts_by_name","arr","unshift","families_sorted","fc","active_family_added","alarm_to_html","enableTooltipsAndPopovers","alarm_family_show","$accordion","target","bootstrapTable","pagination","pageSize","showPaginationSwitch","search","searchTimeOut","searchAlign","showColumns","showExport","exportDataType","exportOptions","fileName","onClickRow","row","scrollToChartAfterHidingModal","when","rowStyle","classes","showFooter","showHeader","showRefresh","showToggle","sortable","silentSort","columns","field","valign","titleTooltip","formatter","index","timestamp4human","align","switchable","visible","alarmid4human","negative_suffix","space","timestamp","toLocaleDateString","toLocaleTimeString","full","has_alarm","crit","badge_url","action_buttons","recipient","last_status_change","lookup_after","lookup_dimensions","lookup_method","lookup_before","lookup_options","alarm_lookup_explain","calc","green","red","warn_repeat_every","crit_repeat_every","delay_up_duration","delay_down_duration","delay_multiplier","delay_max_duration","exec","source","initializeDynamicDashboardWithData","timezone","clipboardCopy","text","writeText","clipboardCopyBadgeEmbed","initializeConfig","custom_info","loadDashboardInfo","memoizeWith","dataType","loadCustomDashboardInfo","always","extend","initializeChartsAndCustomInfo","chartRegistry","downloadAll","initializeDynamicDashboard","newReduxStore","netdataPrepCallback","innerText","versionLog","msg","versionsMatch","v1","v2","s1","s2","n1","n2","getGithubLatestVersion","channel","tag_name","checkForUpdateByVersion","force","sha2","showPageFooter","display","parseDom","jsonStringifyFn","jsonParseFn","str","eval","xssModalDisableXss","enabled","enabled_for_data","xssModalKeepXss","notifyForUpdate","sha1","save","printPreflight","screen","snapshotOptions","bytes_per_chart","compressionDefault","compressions","bytes_per_point_memory","bytes_per_point_disk","compress","compressed_length","btoa","deflate","to","inflate","atob","LZString","compressToUTF16","decompressFromUTF16","compressToBase64","decompressFromBase64","compressToEncodedURIComponent","decompressFromEncodedURIComponent","loadSnapshotModalLog","tmpSnapshotData","loadSnapshotPreflightFile","file","string","fr","FileReader","onload","date_after","after_ms","date_before","before_ms","charts_ok","charts_failed","compression","data_size","netdata_version","data_points","duration_ms","snapshot_version","comments","removeClass","addClass","readAsText","loadSnapshotPreflightEmpty","loadSnapshot","highlight_after_ms","highlight_before_ms","loadSnapshotDragAndDropInitialized","loadSnapshotDragAndDropSetup","originalEvent","dataTransfer","files","item","loadSnapshotPreflight","saveSnapshotStop","saveSnapshotCancel","stopSnapshotModeAction","saveSnapshotModalInitialized","saveSnapshotModalSetup","saveSnapshotModalInit","find","focus","saveSnapshotModalLog","saveSnapshotModalShowExpectedSize","saveSnapshotViewDuration","saveSnapshotSelectedSecondsPerPoint","sizemb","saveSnapshotCompression","memmb","saveSnapshotSetCompression","saveSnapshotSlider","browser_timezone","reduxState","selectDefaultAfter","start_ms","selectGlobalPanAndZoom","Boolean","start_date","yyyymmddhhssmm","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","view","destroy","ticks","step","scale","saveSnapshot","eltxt","saveData","update_every_ms","pack_api1_v1_chart_data","chartDataUniqueID","cstr","clearPanAndZoom","startSnapshotModeAction","dataPoints","saveSnapshotRestore","css","size","chartUpdated","chartsCount","selectAmountOfCharts","chartsOk","selectAmountOfSnapshotsFetched","chartsFailed","selectAmountOfSnapshotsFailed","pcent","Intl","DateTimeFormat","resolvedOptions","timeZone","getOption","option","createSelectOption","dashboardSettingsSetup","update_options_modal","sync_option","self","bootstrapToggle","units_sync_option","temp_sync_option","change","CHART_DIV_ID_PREFIX","CHART_DIV_OFFSET","scrollDashboardTo","chartElement","offsetTop","querySelector","modalHiddenCallback","animated","alarmDate","alarmStatus","includes","runOnceOnDashboardLastRun","runOnceOnDashboardWithjQuery","body","scrollspy","scrollPos","modal_depth","modal_shown","netdata_paused_on_modal","scrollspyOffset","scrollY","overflow","position","pauseCallback","pause","unpause","affix","bottom","removeAttr","Ps","initialize","wheelSpeed","wheelPropagation","swipePropagation","minScrollbarLength","maxScrollbarLength","useBothWheelAxes","suppressScrollX","suppressScrollY","scrollXMarginOffset","scrollYMarginOffset","fn","shorten","settings","config","showChars","minHideChars","ellipsesText","moreText","lessText","onLess","onscroll","onMore","errMsg","off","$this","hasClass","parent","prev","each","substr","inTag","bag","countChars","openTags","tagName","r","shift","isDemo","onresizeCallback","update","resetDashboardOptions","selected_server_timezone","isProperTimezone","userSetServerTimezone","timezoneOption","netdataCallback","showSignInModal","explicitlySignIn","explicitlySignInAction","MASKED_DATA","INFO_POLLING_FREQUENCY","alarmStatuses","useCloudConnectionStatus","userStatus","nodeStatus","date","useMemo","header","strong","bullets","rel","href","CTA1","makeCloudConnectionStatusInfo","CloudConnectionStatusModal","closeModal","onRefresh","isCTA1Disabled","handleClickedCTA1","background","margin","onClose","padding","column","gap","as","bullet","data-testid","utmParameters","campaign","data-ga","disabled","textTransform","label","Text","sx","fontWeight","lineHeight","CloudConnectionStatus","selectUserNodeAccess","cloudEnabled","selectIsCloudEnabled","isModalOpen","setModalOpen","cloudConnectionStatusInfo","nodeLiveness","documentElement","openModal","flavour","isTimestamp","NETDATA_REGISTRY_SERVER","MS_IN_SECOND","getIframeSrc","path","utmUrlSuffix","getBoundingClientRect","obj1","obj2","equals","callAll","fns","arg","define","_uniqueIDCounter","defaultSettings","color","fontSize","font","subtitle","titleSubtitlePadding","canvasHeight","canvasWidth","pieInnerRadius","pieOuterRadius","sortOrder","ignoreSmallSegments","valueType","smallSegmentGrouping","outer","format","hideWhenLessThanPercentage","pieDistance","inner","mainLabel","percentage","decimalPlaces","lines","truncation","truncateLength","effects","load","effect","speed","pullOutSegmentOnClick","highlightSegmentOnMouseover","highlightLuminosity","tooltips","placeholderParser","styles","fadeInSpeed","backgroundColor","backgroundOpacity","borderRadius","misc","segments","segmentStroke","gradient","canvasPadding","pieCenterOffset","cssPrefix","callbacks","onMouseoverSegment","onMouseoutSegment","onClickSegment","validate","pie","d3","HTMLElement","SVGElement","helpers","isArray","isNaN","addSVGSpace","svg","select","append","shuffleArray","tmpVal","randomIndex","currentIndex","random","processObj","is","getDimensions","w","h","getBBox","rectIntersect","r1","r2","getColorShade","hex","lum","String","newHex","initSegmentColors","finalColors","applySmallSegmentGrouping","totalSize","math","getTotalPieSize","newData","groupedData","totalGroupedData","isGrouped","showPoint","isFunction","functionToCheck","call","o","prototype","src","copy","copyIsArray","clone","arguments","deep","hasOwn","class2type","jQuery","isWindow","isNumeric","parseFloat","isFinite","isPlainObject","nodeType","constructor","toRadians","degrees","PI","toDegrees","radians","computePieRadius","textComponents","headerHeight","exists","innerRadius","percent","outerRadius","smallestDimension","pieDistanceSpace","sortPieData","getPieTranslateCenter","pieCenter","calculatePieCenter","hasTopTitle","hasTopSubtitle","headerOffset","footerOffset","rotate","xm","ym","cos","sin","translate","rads","pointIsInArc","pt","ptData","d3Arc","theta1","startAngle","theta2","endAngle","dist","angle","atan2","add","section","sectionDisplayType","include","getIncludes","outerLabel","insert","labelGroup","__labels","selectAll","enter","formatterContext","part","positionLabelElements","dims","computeLabelLinePositions","lineCoordGroups","computeLinePosition","x2","y2","x3","y3","getSegmentAngle","midpoint","originCoords","heightOffset","outerLabelGroupData","quarter","startOfLabelX","startOfLabel","addLabelLines","lineGroup","lineFunction","line","curve","curveBasis","positionLabelGroups","pieCenterCopy","newCoords","xOffset","yOffset","val","addMainLabel","addValue","addPercentage","computeOuterLabelCoords","getIdealOuterLabelPositions","resolveOuterLabelCollisions","checkConflict","currIndex","direction","curr","currIndexHemisphere","hs","nextIndex","currLabelGroup","examinedLabelGroup","labelHeights","center","lineLength","heightChange","isLabelHidden","adjustLabelPos","lastCorrectlyPositionedLabel","xDiff","yDiff","newXPos","newYPos","sqrt","labelGroupNode","labelGroupDims","originalX","originalY","hemisphere","effectMap","easeLinear","easeBounce","easeSin","easeElastic","easeBack","easeQuad","easeCircle","easeExp","create","pieChartElement","arc","addGradients","grads","addSegmentEventHandlers","merge","segment","currentEl","isExpanded","onSegmentEvent","closeSegment","openSegment","segColor","tt","showTooltip","moveTooltip","hideTooltip","func","expanded","isOpeningSegment","maybeCloseOpenSegment","transition","ease","centroid","pullOutSize","currentlyOpenSegment","getCentroid","bbox","opts","fullValue","compounded","currValue","offscreenCoord","addTitle","__title","positionTitle","headerLocation","addSubtitle","__subtitle","positionSubtitle","getHeaderHeight","addFooter","__footer","positionFooter","footerLocation","footerWidth","totalTitleHeight","footerPlusPadding","addTooltips","caption","replacePlaceholders","currentTooltip","mouseCoords","mouse","parentNode","replacements","placeholder","d3pie","_setupData","_init","recreate","redraw","getOpenSegment","updateProp","propKey","oldVal","oldValue","dp","_getPercentage","totalPercentage","relativeAmount","currentScript","isTestingEnv","getDefaultServer","isDevelopmentEnv","RegExp","getPathFromScriptSource","cond","T","getElementsByTagName","alwaysEndWithSlash","pipe","concat","serverStatic","selectChartsState","selectSingleChartState","createSelector","_","chartsState","selectChartData","chartState","selectChartMetadataFromExplicitCall","selectChartMetadata","selectChartMetadataFromChartsCall","metadataFromAll","metadataFromSingleCall","selectIsFetchingDetails","makeSelectChartMetadataRequest","selectChartViewRange","selectChartIsFetchingData","selectChartFetchDataParams","selectResizeHeight","selectChartPanAndZoom","selectAmountOfFetchedCharts","some","hasCompletedFetching","selectNameOfAnyFetchingChart","isSupportingDateTimeFormat","navigator","language","narrowToDate","localeDateStringNative","localeTimeStringNative","xAxisTimeStringNative","localeMatcher","formatMatcher","weekday","year","month","day","dateFormat","locale","long","isTime","secs","hourCycle","dateStyle","timeStyle","getOptions","getTimezone","useDateTime","selectTimezoneSetting","selectUTCOffsetSetting","xAxisTimeString","xAxisDateString","showSignInModalAction","isSignedInAction","setOfflineAction","fallbackUpdateTimeInterval","panAndZoomDelay","totalSeconds","defaultOptions","hour","minute","second","and","strings","pop","join","module","exports","require","l","Error","code","u","1","v","g","f","run","clearTimeout","fun","nextTick","apply","browser","env","argv","versions","addListener","once","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","umask","2","defineProperty","__esModule","extractSeries","rollingAverage","3","pow","4","5","onPointsCreated_","y_top","NaN","y_bottom","yval_minus","yval_plus","getExtremeYValues","onLineEvaluated","calcYNormal_","6","X","Y","EXTRAS","seriesToPoints","xval","yval","canvasx","canvasy","7","8","9","dygraph_","layout","elementContext","height_","width_","isCanvasSupported","area","getPlotArea","canvas_ctx_","beginPath","rect","clip","hidden_ctx_","clear","clearRect","render","_updatePoints","_renderLineChart","_getIteratorPredicate","_predicateThatSkipsEmptyPoints","_drawStyledLine","dygraph","getBooleanOption","setName","isArrayLike","createIterator","drawingContext","setLineDash","_drawSeries","_drawPointsOnLine","restore","strokeStyle","lineWidth","array_","end_","predicate_","start_","moveTo","lineTo","nextIdx_","next","hasNext","peek","stroke","setNames","colorsMap_","strokeWidth","axis","axisPropertiesForSeries","plotArea","seriesIndex","seriesCount","singleSeriesName","allSeriesPoints","_Plotters","linePlotter","_linePlotter","fillPlotter","_fillPlotter","errorPlotter","_errorPlotter","getNumericOption","Circles","DEFAULT","toRGB_","fillStyle","closePath","fill","_fastCanvasProxy","splice","_count","getLabels","visibility","getColors","A","minyval","yscale","O","D","E","L","S","P","C","M","FORCE_FAST_PROXY","N","F","isOK","k","y_stacked","10","highlightCircleSize","highlightSeriesOpts","highlightSeriesBackgroundAlpha","highlightSeriesBackgroundColor","labelsSeparateLines","labelsShowZeroValues","labelsKMB","labelsKMG2","showLabelsOnHighlight","digitsAfterDecimal","maxNumberWidth","sigFigs","strokeBorderWidth","strokeBorderColor","axisTickSize","axisLabelFontSize","rightGap","showRoller","xValueParser","delimiter","sigma","errorBars","fractions","wilsonInterval","customBars","fillGraph","fillAlpha","connectSeparatedPoints","stackedGraph","stackedGraphNaNFill","hideOverlayOnMouseOut","stepPlot","xRangePad","yRangePad","drawAxesAtZero","titleHeight","xLabelHeight","yLabelWidth","axisLineColor","axisLineWidth","gridLineWidth","axisLabelWidth","gridLineColor","interactionModel","defaultModel","animatedZooms","showRangeSelector","rangeSelectorHeight","rangeSelectorPlotStrokeColor","rangeSelectorPlotFillGradientColor","rangeSelectorPlotFillColor","rangeSelectorBackgroundStrokeColor","rangeSelectorBackgroundLineWidth","rangeSelectorPlotLineWidth","rangeSelectorForegroundStrokeColor","rangeSelectorForegroundLineWidth","rangeSelectorAlpha","showInRangeSelector","plotter","plugins","axes","pixelsPerLabel","axisLabelFormatter","dateAxisLabelFormatter","valueFormatter","dateValueFormatter","drawGrid","drawAxis","independentTicks","ticker","dateTicker","numberValueFormatter","numberAxisLabelFormatter","numericTicks","11","draw","date_graph","setSelection","getSelection","layout_","12","dragEndX","dragGetX_","dragEndY","dragGetY_","dragStartX","dragStartY","lastx_","treatMouseOpAsClick","regionWidth","regionHeight","isPanning","xAxisRange","getOptionForAxis","initialLeftmostDate","log10","dateRange","xUnitsPerPixel","plotter_","xAxisExtremes","toDomXCoord","toDataXCoord","boundedDates","axes_","extremeRange","toDomYCoord","toDataYCoord","boundedValues","is2DPan","yAxisRange","attributes_","getForAxis","initialTopValue","dragValueRange","unitsPerPixel","dateWindow_","LOG_SCALE","drawGraph_","endPan","maybeTreatMouseOpAsClick","startZoom","isZooming","zoomMoved","moveZoom","dragDirection","VERTICAL","HORIZONTAL","drawZoomRect_","prevDragDirection","prevEndX","prevEndY","getFunctionOption","MAX_VALUE","selPoints_","cancelable","point","cascadeEvents_","pts","endZoom","clearZoomRect_","getArea","doZoomX_","cancelNextDblclick","doZoomY_","startTouch","startTimeForDoubleTapMs","pageX","pageY","dataX","dataY","initialTouches","initialPinchCenter","touchDirections","initialRange","moveTouch","yAxisRanges","endTouch","changedTouches","getTime","doubleTapX","screenX","doubleTapY","screenY","resetZoom","findPos","canvas_","offsetWidth","offsetHeight","mousedown","button","initializeMouseDown","altKey","shiftKey","startPan","movePan","addAndTrackEvent","removeEvent","willDestroyContextMyself","touchstart","touchmove","touchend","dblclick","nonInteractiveModel_","mouseup","dragIsPanInteractionModel","mousemove","13","annotations","yAxes_","xTicks_","yTicks_","addDataset","area_","computePlotArea","chart_div","graphDiv","reserveSpaceLeft","reserveSpaceRight","reserveSpaceTop","reserveSpaceBottom","chartRect","setAnnotations","setXTicks","setYAxes","evaluate","_xAxis","_evaluateLimits","_evaluateLineCharts","_evaluateLineTicks","_evaluateAnnotations","minval","maxval","xlogrange","xlogscale","computedValueRange","maxyval","yrange","ylogrange","ylogscale","calcXNormal_","getForSeries","yval_stacked","dataHandler_","xticks","label_v","toPercentXCoord","pos","has_tick","yticks","toPercentYCoord","series","annotated_points","annotation","removeAllDatasets","setPointsLengths","setPointsOffsets","14","_process","15","xAxis_","series_","global_","attrs_","user_","user_attrs_","labels_","highlightSeries_","reparseSeries","AXIS_STRING_MAPPINGS_","y1","Y1","Y2","axisToIndex_","yAxis","getGlobalUser_","getGlobalDefault_","getHighlightSeries","numAxes","axisForSeries","axisOptions","seriesForAxis","seriesNames","16","numericLinearTicks","binarySearch","tickValue","pixel_coord","reverse","ceil","MILLISECONDLY","TWO_MILLISECONDLY","FIVE_MILLISECONDLY","TEN_MILLISECONDLY","FIFTY_MILLISECONDLY","HUNDRED_MILLISECONDLY","FIVE_HUNDRED_MILLISECONDLY","SECONDLY","TWO_SECONDLY","FIVE_SECONDLY","TEN_SECONDLY","THIRTY_SECONDLY","MINUTELY","TWO_MINUTELY","FIVE_MINUTELY","TEN_MINUTELY","THIRTY_MINUTELY","HOURLY","TWO_HOURLY","SIX_HOURLY","DAILY","TWO_DAILY","WEEKLY","MONTHLY","QUARTERLY","BIANNUAL","ANNUAL","DECADAL","CENTENNIAL","NUM_GRANULARITIES","Granularity","datefield","spacing","DateAccessorsUTC","DateAccessorsLocal","getMilliseconds","getDay","makeDate","getDateAxis","17","toExponential","toPrecision","nt","rt","ot","st","cancelEvent","cancelBubble","cancel","returnValue","hsvToRGB","pageXOffset","scrollLeft","pageYOffset","px","py","isValidPoint","floatFormat","hmsString_","dateString_","round_","dateParser","dateStrToMillis","updateDeep","Node","nodeName","isDateLike","createCanvas","getContextPixelRatio","devicePixelRatio","webkitBackingStorePixelRatio","mozBackingStorePixelRatio","msBackingStorePixelRatio","oBackingStorePixelRatio","backingStorePixelRatio","Iterator","repeatAndCleanup","et","isPixelChangingOptionList","at","detectLineDelimiter","isNodeContainedBy","getComputedStyle","getContext","parseFloat_","G","lt","W","LN_TEN","U","logRangeFraction","DOTTED_LINE","DASHED_LINE","DOT_DASH_LINE","addEvent","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","getUTCDay","UTC","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","requestAnimFrame","annotationClickHandler","annotationDblClickHandler","annotationMouseOutHandler","annotationMouseOverHandler","clickCallback","drawCallback","drawHighlightPointCallback","drawPoints","drawPointCallback","highlightCallback","labelsDiv","panEdgeFraction","pixelsPerYLabel","pointClickCallback","pointSize","underlayCallback","unhighlightCallback","zoomCallback","it","18","Symbol","iterator","return","TypeError","R","H","Z","q","Q","__init__","NAME","VERSION","DEFAULT_ROLL_PERIOD","DEFAULT_WIDTH","DEFAULT_HEIGHT","ANIMATION_STEPS","ANIMATION_DURATION","Plotters","addedAnnotationCSS","is_initial_draw_","readyFns_","copyUserAttrs_","maindiv_","file_","rollPeriod_","rollPeriod","previousVerticalX_","fractions_","dateWindow","annotations_","clientWidth","boundaryIds_","setIndexByName_","datasetIndex_","registeredEvents_","eventListeners_","createInterface_","plugins_","PLUGINS","plugin","activate","events","pluginOptions","createDragInterface_","defaultPrevented","propagationStopped","getPluginInstance_","isZoomed","attr_","getStringOption","optionsViewForAxis_","numRows","rawData_","yAxisExtremes","gatherDatasets_","rolledSeries_","extremes","computeYAxisRanges_","toDomCoords","toDataCoords","numColumns","getValue","textAlign","hidden_","createPlotKitCanvas_","resizeElements_","mouseEventElement_","createMouseEventElement_","mouseMoveHandler_","mouseMove_","mouseOutHandler_","fromElement","relatedTarget","toElement","mouseOut_","resizeHandler_","removeTrackedEvents_","hasChildNodes","firstChild","setColors_","colors_","getPropertiesForSeries","createRollInterface_","roller_","onchange","adjustRoll","tarp","cover","draggingDate","draggingValue","uncover","fillRect","currentZoomRectArgs_","doZoomXDates_","doAnimatedZoom","zoomAnimationFunction","clearSelection","eventToDomCoords","offsetX","offsetY","findClosestRow","findClosestPoint","seriesName","findStackedPoint","getLeftBoundary_","isSeriesLocked","lastRow_","highlightSet_","animateSelection_","fadeLevel","animateId","updateSelection_","selectedRow","selectedX","selectedPoints","lockedSet_","loadedEvent_","parseCSV_","cascadeDataDidUpdateEvent_","predraw_","addXTicks_","getHandlerClass_","computeYAxes_","drawingTimeMs_","PointType","stackPoints_","boundaryIds","renderGraph_","canvas","readyFired_","detectTypeFromString_","setXAxisOptions_","parseArray_","parseDataTable_","getNumberOfColumns","getNumberOfRows","getColumnType","getColumnLabel","shortText","fromCharCode","getColumnRange","XMLHttpRequest","ActiveXObject","onreadystatechange","readyState","responseText","send","updateOptions","resize_lock","setVisibility","indexFromSetName","getRowForX","ready","elem","GVizChart","defaultInteractionModel","nonInteractiveModel","Plugins","Legend","Axes","Annotations","ChartLabels","Grid","RangeSelector","DataHandlers","DefaultHandler","BarsHandler","CustomBarsHandler","DefaultFractionHandler","ErrorBarsHandler","FractionsBarsHandler","19","tarps","zIndex","20","clearChart","didDrawChart","detachLabels","tickHeight","cssClass","createTextNode","attachAtBottom","borderColor","tickColor","tickWidth","21","xlabels_","ylabels_","willDrawChart","22","title_div_","xlabel_div_","ylabel_div_","y2label_div_","detachLabels_","23","24","legend_div_","is_generated_div_","one_em_width_","deselect","predraw","generateLegendHTML","dashHTML","labelHTML","isVisible","xHTML","yHTML","isHighlighted","defaultFormatter","25","hasTouchInterface_","TouchEvent","isMobileDevice_","appVersion","interfaceCreated_","getOption_","reserveSpace_","renderStaticLayer_","renderInteractiveLayer_","bgcanvas_","fgcanvas_","leftZoomHandle_","rightZoomHandle_","setDefaultOption_","createCanvases_","createZoomHandles_","initInteraction_","addToGraph_","graphDiv_","removeFromGraph_","updateVisibility_","resize_","drawStaticLayer_","isChangingRange_","placeZoomHandles_","drawInteractiveLayer_","canvasRect_","bgcanvas_ctx_","fgcanvas_ctx_","cursor","Image","cloneNode","leftHandlePos","rightHandlePos","clientX","srcElement","getZoomHandleStatus_","targetTouches","opera","drawMiniPlot_","computeCombinedSeriesAndLimits_","yMax","yMin","createLinearGradient","addColorStop","MIN_VALUE","legendPluginModuleString","withContext","legendResolutionTooltip","collected","viewed","view_update_every","getNewSelectedDimensions","newSelectedDimensions","allDimensions","clickedDimensionName","isModifierKeyPressed","enabledDimensions","isCurrentlySelected","isSnapshotMode","snapshotCharts","snapshotDataPoints","isSignedIn","offline","dashboardReducer","combineReducers","globalKey","chartKey","dashboardKey","axiosInstance","axios","Pragma","getFetchStream","concurrentCallsLimit","fetch$","Subject","resetFetch$","handler","mergeMap","params","onErrorCallback","onSuccessCallback","cancelTokenSource","timeout","cancelToken","token","tap","responseData","catchError","empty","startWith","switchMap","subscribe","fillMissingData","nrOfPointsToFill","viewUpdateEvery","firstAddedTimestamp","emptyPoint","tail","nulls","addPointsDygraph","emptyArray","transformResults","shouldRevertFlip","dataResult","pointData","sum","Container","styled","getSizeBy","SideContent","ContentContainer","HeaderText","getColor","ContentText","TextSmall","UINotification","props","leftContent","rightContent","renderContent","createUINotification","NodeIconContainer","NotificationLink","toastOptions","toast","POSITION","BOTTOM_RIGHT","autoClose","pauseOnFocusLoss","showCloudInstallationProblemNotification","notificationComponent","showCloudConnectionProblemNotification","uiNotification","defaultUrlOptions","alarm_unique_id","alarm_id","alarm_event_id","alarm_when","parseQueryPair","isInvalidPair","isPrintMode","mapIndexed","mergeRight","parseUrl","watchFetchDataResponseChannel","fetchDataSaga","fetchChartSaga","fetchInfoSaga","chartSagas","CONCURRENT_CALLS_LIMIT_METRICS","fetchDataResponseChannel","take","action","start","end","put","constructCompatibleKey","IS_FLIP_RESPECTED_IN_COMPOSITE_CHARTS","getGroupByValues","fetchMetrics$","group","selectSnapshot","dimensionsWithUrlOptions","matchingKey","snapshotKey","agentOptionsOriginal","hasFlip","agentOptions","shouldAddFakeFlip","groupValues","axiosOptions","agent_options","post_aggregation_methods","aggregations","valueOf","fillMissingPoints","transformedResults","postAggregated","post_aggregated_data","fetchForSnapshot$","resetFetchForSnapshot$","fetchDataForSnapshotSaga","aggr_method","node_ids","stopSnapshotModeSaga","response","poll","wasCloudAvailable","wasACLKAvailable","takeEvery","spawn","sidePanelTransitionTimeInSeconds","getLog","notifyAll","alarmsLoop","startAlarms","fetchAllAlarmsSaga","alarmsSagas","ALARMS_INITIALIZATION_DELAY","ALARMS_UPDATE_EVERY","ALARMS_MS_BETWEEN_NOTIFICATIONS","areNotificationsAvailable","notificationCallback","netdataAlarmsNotifCallback","firstNotificationId","lastNotificationId","scrollToAlarm","chartID","scrollToChart","requestPermissions","Notification","permission","requestPermission","hasGivenNotificationPermissions","lastNotificationIdArg","getNotification","entry","firstNotificationIdArg","updated","valueString","value_string","tag","interaction","unique_id","old_status","no_clear_notification","notificationTitle","notificationOptions","requireInteraction","notificationHandler","alarmLogs","logsSorted","sortBy","newLogs","notifications","onclick","netdataAlarmsRemember","what","latest_alarm_log_unique_id","allAlarms","allowedReferrerDomains","isAllowedReferrer","referrer","watchWindowFocusChannel","waitForFullInfoPayload","injectPosthog","fetchHelloSaga","spacePanelSaga","globalSagas","windowFocusChannel","listenToWindowFocus","posthog","selectFullInfoPayload","__SV","_i","api_host","insertBefore","people","loaded","identify","shouldMaskReferrer","register","$ip","$current_url","$pathname","$host","$initial_referring_domain","$initial_referrer","$referring_domain","$referrer","event_source","netdata_machine_guid","netdata_person_id","netdata_buildinfo","netdata_release_channel","mirrored_host_count","mirrored_hosts","alarms_normal","normal","alarms_warning","warning","alarms_critical","critical","host_os_name","os_name","host_os_id","os_id","host_os_id_like","os_id_like","host_os_version","os_version","host_os_version_id","os_version_id","host_os_detection","os_detection","system_cores_total","cores_total","system_total_disk_space","total_disk_space","system_cpu_freq","cpu_freq","system_ram_total","ram_total","system_kernel_name","kernel_name","system_kernel_version","kernel_version","system_architecture","architecture","system_virtualization","virtualization","system_virt_detection","virt_detection","system_container","system_container_detection","container_detection","container_os_name","container_os_id","container_os_id_like","container_os_version","container_os_version_id","host_collectors_count","collectors","host_cloud_enabled","host_cloud_available","host_agent_claimed","host_aclk_available","host_aclk_implementation","host_allmetrics_json_used","host_allmetrics_prometheus_used","host_allmetrics_shell_used","host_charts_count","host_dashboard_used","host_metrics_count","host_notification_methods","config_memory_mode","config_exporting_enabled","config_exporting_connectors","config_hosts_available","config_https_enabled","config_multidb_disk_quota","config_page_cache_size","config_stream_enabled","config_web_enabled","host_is_parent","host_labels","_is_parent","mirrored_hosts_reachable","mirrored_hosts_status","reachable","mirrored_hosts_unreachable","host_collectors","host_is_k8s_node","is_k8s_node","accessRegistry","maxRedirects","machine","isRedirect","returnData","person_guid","parsePersonUrls","personUrls","lastTimestamp","accesses","existingObj","isNewer","extended","uniq","helloCallUrl","cloud_base_url","isUsingGlobalRegistry","accessRegistryResponse","anonymous_statistics","constructOptionStorageKey","setOptionSaga","showSignInSaga","mainJsSagas","LOCAL_STORAGE_NEEDS_SYNC","setGlobalChartUnderlaySaga","hashParams","getHashParams","setHashParams","clearHighlightSaga","removeHashParams","signInLinkHref","rootSaga","sagaMiddleware","createSagaMiddleware","store","createStore","rootReducer","compose","applyMiddleware","configureStore","loadCss","resolve","reject","fileRef","onerror","isDygraphSparkline","chartLibrariesSettings","hasToolboxPanAndZoom","xssRegexIgnore","isLogScale","hasLegend","trackColors","containerClass","peity","google","easypiechart","aspectRatio","gauge","textonly","groupbox","getChartURLOptions","shouldEliminateZeroDimensions","BIGGEST_INTERVAL_NUMBER","Loader","containerNode","hasEmptyData","screenHeight","lost","paddingTop","getPanAndZoomStep","ctrlKey","pan_and_zoom_factor","pan_and_zoom_factor_multiplier_control","pan_and_zoom_factor_multiplier_shift","pan_and_zoom_factor_multiplier_alt","safeEqualCheck","formattersFixed","formattersZeroBased","fastNumberFormat","NumberFormat","useGrouping","minimumFractionDigits","maximumFractionDigits","getLegendFormatValue","convertUnits","intlNumberFormat","valueDecimalDetail","dmin","dmax","convertedValue","useFormatters","selectTemperatureSetting","selectSecondsAsTimeSetting","setConvertUnits","setMin","setMax","unitsCurrent","setUnitsCurrent","decimals","setDecimals","setIntlNumberFormat","legendFormatValue","legendFormatValueRef","updateLegendFormatValueRef","newConvertUnits","newIntlNumberFormat","newDecimalDigits","legendFormatValueDecimalsFromMinMax","newMin","newMax","switchedUnits","newDecimals","convertedMin","convertedMax","delta","defaultColor","LegendContainer","LegendFirstRow","LegendSecondRow","LegendUnit","DateTimeSeparator","span","LegendItems","DimensionItem","isDisabled","DimensionItemToolboxPlaceholder","DimensionIcon","DimensionLabel","DimensionValue","ToolboxContainer","emptyObject","selector","dimension_names","LegendText","ChartLegendRight","hoveredRow","onDimensionClick","showLatestOnBlur","viewBefore","dimensionIds","dimension_ids","showUndefined","legendDate","colorFillOpacity","chart_type","scrollbarRef","dimensionId","rgb","hexFull","colorHex2Rgb","isSelected","hoveredValueArray","view_latest_values","role","tabIndex","ChartTimeframe","ChartLegendBottom","legendToolbox","resizeHandler","ChartLegend","setSelectedDimensions","LegendToolbox","onToolboxLeftClick","onToolboxRightClick","onToolboxZoomInClick","onToolboxZoomOutClick","getDataForFakeStacked","dimensionsVisibility","currentMin","currentMax","getDygraphChartType","chartSettings","dygraphRequestedType","dygraphChartType","getBackgroundColor","Color","transformColors","mix","getDygraphFillAlpha","isFakeStacked","color_fill_opacity_fake_stacked","color_fill_opacity_stacked","color_fill_opacity_area","useProceededChart","chartRef","propsRef","useToggle","proceeded","toggleProceeded","updatePosition","distance","first_entry","hasProceeded","defaultPositionTo","topMargin","ProceededChartDisclaimer","forwardRef","backgroundColorMap","WARNING","CRITICAL","CLEAR","borderColorMap","getBorderColor","textColorMap","Badge","border","getInitialDygraphOptions","hiddenLabelsElementId","orderedColors","setMinMax","shouldSmoothPlot","isSparkline","grid","includeZero","ylabel","smoothPlotter","strokePattern","drawGapEdgePoints","gridLinePattern","logscale","Dygraph","toTimeString","DygraphChart","chartElementClassName","chartElementId","onUpdateChartPanAndZoom","immediatelyDispatchPanAndZoom","setGlobalChartUnderlay","setHoveredX","viewAfter","selectGlobalChartUnderlay","selectedAlarm","selectAlarm","updateChartPanOrZoom","shouldNotExceedAvailableRange","dygraphInstance","latestIsUserAction","isMouseDown","dygraphHighlightAfter","dygraphLastTouchMove","dygraphLastTouchPageX","dygraphLastTouchEnd","isSyncPanAndZoom","selectSyncPanAndZoom","resetGlobalPanAndZoom","isRendered","toggleIsRendered","positionTo","useDygraphBadge","isAlarmBadgeVisible","alarmBadgeRef","updateAlarmBadge","isProceeded","precededChartRef","updatePrecededPosition","useLayoutEffect","selectSmoothPlot","dygraphOptionsStatic","dygraphOptions","newHoveredX","xRange","last_entry","isInRangeOfAvailableData","minDate","maxDate","currentAlarm","alarmPosition","fillColor","globalAlphaCache","globalAlpha","bottomLeft","topRight","isOutsideReasonableViewport","metaKey","sortedRange","wheel","normalDef","wheelDelta","deltaY","detail","layerX","offsetLeft","xPct","axisAfterOffset","offsetToPercentage","zoomInPercentage","bias","afterAxis","beforeAxis","increment","updatedAfter","updatedBefore","zoom","dygraphPlotter","pct","double_click_speed","instance","useUpdateEffect","selectSpacePanelTransitionEndIsActive","forceDateWindow","hasChangedDuration","hasScrolledToTheFutureDuringPlayMode","optionsDateWindow","selectGlobalSelectionMaster","commonMinState","selectCommonMin","commonMaxState","selectCommonMax","shouldUseCommonMin","shouldUseCommonMax","shouldUpdate","newExtremes","useUnmount","resizeObserver","useMount","hasOmitedFirstCallback","callbackDebounced","waitFor","args","debounce","ResizeObserver","observe","disconnect","EasyPieChart","chartWidth","chartInstance","setChartInstance","valueIndex","safeMinMax","_min","_max","isMinOverride","isMaxOverride","getPercentFromValueMinMax","easypiechart_track","easypiechart_scale","newChartInstance","EasyPie","barColor","trackColor","scaleColor","scaleLength","lineCap","trackWidth","easing","shouldUseAnimation","enableAnimation","disableAnimation","valueFontSize","valuetop","titleFontSize","titletop","unitFontSize","unitTop","isSetByUser","GaugeChart","chartCanvasElement","minAttribute","maxAttribute","safeMin","safeMax","_pcent","gauge_pointer","gauge_stroke","radiusScale","pointer","limitMax","limitMin","colorStart","colorStop","strokeColor","generateGradient","gradientType","highDpiSupport","Gauge","setOptions","minValue","maxValue","animationSpeed","set","valueTop","minMaxFontSize","normalizeHex","colorLuminance","hexNormalized","splitEvery","nr","convertToTimestamp","number","SparklineChart","viewAfterForCurrentData","viewBeforeForCurrentData","$chartElement","set$chartElement","sparklineOptions","requestedAfter","requestedBefore","currentDuration","requestedDuration","widthRatio","paddingLeftPercentage","getForceTimeWindowCorrection","defaultFillColor","fill_luminance","chartTitle","emptyStringIfDisable","sparklineInitOptions","lineColor","chartRangeMin","chartRangeMax","composite","enableTagOptions","tagOptionPrefix","tagValuesAttribute","disableHiddenCheck","defaultPixelsPerValue","spotColor","minSpotColor","maxSpotColor","spotRadius","valueSpots","highlightSpotColor","highlightLineColor","normalRangeMin","normalRangeMax","drawNormalOnTop","xvalues","chartRangeClip","chartRangeMinX","chartRangeMaxX","disableInteraction","disableTooltips","disableHighlight","highlightLighten","highlightColor","tooltipContainer","tooltipClassname","tooltipChartTitle","tooltipFormat","tooltipPrefix","tooltipSuffix","tooltipSkipNull","tooltipValueLookups","tooltipFormatFieldlist","tooltipFormatFieldlistKey","numberFormatter","numberDigitGroupSep","numberDecimalMark","numberDigitGroupCount","onLeave","onChange","sparklines","getCurrentRegionFields","bind","unbind","paddingLeft","fetchPromise","emptyContent","getDateRange","dt","dtString","time","t1","t2","D3pieChart","d3pieInstance","setD3pieInstance","d3pieOptions","safeContent","defaultTitle","other","mainlabel","segment_stroke","gradient_color","initialD3pieOptions","tooltip_bg","tooltip_fg","newD3pieInstance","isHoveredButNoData","slot","PeityChart","peityOptions","$element","peityInitOptions","foreground","updatedOptions","GoogleChart","googleChartInstance","hasApiBeenLoaded","setHasApiBeenLoaded","script","firstScript","packages","googleOptions","dataTable","visualization","DataTable","chartType","areaOpacity","Map","initialGoogleOptions","hAxis","viewWindowMode","slantedText","textStyle","gridlines","vAxis","chartArea","focusTarget","pointsVisible","titlePosition","titleTextStyle","isHtml","ignoreBounds","curveType","isStacked","googleInstance","AreaChart","LineChart","TextOnly","precision","textContent","defaultAspectRatio","getCellBoxSize","cellSize","getRows","getColumns","rows","getXPosition","getYPosition","getFullWidth","getFullHeight","getOffsetPosition","onMouseenter","onMouseout","cellPadding","hoveredIndex","getEvent","cellBoxSize","mouseout","nextHoveredIndex","getWidth","getCanvasAttributes","defaultColorRange","makeGetColor","colorRange","scaleLinear","domain","extent","range","innerHeight","aligns","GroupBox","renderTooltip","dataRef","canvasRef","boxesRef","hover","setHover","dropHoverRef","boxHoverRef","timeoutId","close","deactivateBox","closeDrop","currentHover","cellStroke","activeBox","activateBox","clearEvents","drawBox","registerEvents","strokeRect","drawBoxes","onMouseEnter","onMouseLeave","getAlign","Title","Label","Flex","attrs","TextMicro","GroupBoxWrapper","groupIndex","renderGroupPopover","renderBoxPopover","maxWidth","boxPopover","boxAlign","groupPopover","alignItems","plain","isOpen","popoverRef","GroupBoxes","flexWrap","vertical","flex","LinearColorScaleBar","k8s_cluster_id","k8s_node_name","k8s_namespace","k8s_controller_kind","k8s_controller_name","k8s_pod_name","k8s_container_name","labelIds","word","toUpperCase","Separator","Header","wordBreak","TabButton","neutral","themeType","Tabs","ExpandButton","makeFlex","Section","onExpand","noBorder","side","justifyContent","getPortalNodeStyles","shouldAddSpecialHeight","heightFromLocalStorage","heightID","persitedHeight","getHeightFromLocalStorage","heightOverriden","chartDefaultsMinWidth","min_width","minWidth","globalIntersectionOptions","root","rootMargin","threshold","globalIntersectionObserver","globalObserver","IntersectionObserver","entries","isIntersecting","unsubscribe","elementToUnsubscribe","createGlobalIntersectionObserver","InvisibleSearchableText","opacity","shouldCleanChartStateAlways","DisableOutOfView","portalNode","hasPortalNodeBeenStyled","setHasPortalNodeBeenStyled","isShowingAlarmOnChart","forEachObjIndexed","styleName","setProperty","destroyOnHide","selectDestroyOnHide","clonedChildrenRef","isVisibleIntersection","setIsVisible","isVisibleRef","newIsVisible","useCommonIntersection","debounceTime","selectIsAsyncOnScroll","shouldHideDebounced","setShouldHideDebounced","useDebounce","shouldHide","previousIsVisibleIntersection","newClonedChildren","child","cloned","clonedCanvases","querySelectorAll","oldCanvas","newCanvas","drawImage","cloneWithCanvas","clonedChildrenContainer","nodeElement","ChartContainer","dropdownMenu","renderCustomElementForDygraph","onAttributesChange","externalChartMetadata","sectionTitle","MigrationModalPromos","aggrMethods","avg","ChartValueContainer","memo","displayedIndex","aggregation","getAggregation","ChartValue","dangerouslySetInnerHTML","__html","groupLabel","postGroupLabel","relatedIndex","useContext","ThemeContext","chartContainerRef","setDisplayedIndex","setDisplayedIndexThrottled","throttle","repaint","relatedCharts","relatedChartAttributes","chartAttributes","chartLabels","ExternalButton","alignSelf","Item","secondary","DateItem","DateSection","Metrics","LabelsSection","labelId","items","onItemClick","getLabel","sliced","expandable","onNodeClick","ids","predefinedLabelIds","getLabelIds","StyledButton","List","onBack","horizontal","TabsContainer","Popover","setView","isLabelView","Kubernetes","labelValues","postGroupValues","postGroupData","groupValue","indexes","boxes","labelsAcc","groupData","groupChartLabels","groupLabels","Set","accChartLabels","transform","groupBoxData","groupedBoxesData","groupedBox","AbstractChart","showValueAttributesNodes","userElementId","chartSettingCallOptions","isFlipped","dimensionIndex","useShowValueOutside","Chart","viewRangeForCurrentData","themeContext","unitsScalingMethod","selectUnitsScalingMethod","shouldDisplayToolbox","legend_toolbox","shouldDisplayResizeHandler","resize_charts","allDimensionNames","dimensionNamesFromMetadata","additionalDimensionNamesFromData","localHoveredX","setLocalHoveredX","isSyncSelection","selectSyncSelection","handleSetHoveredX","noMaster","globalHoveredX","selectGlobalSelection","netdataFirst","netdataLast","fixedMinDuration","setGlobalPanAndZoomDebounced","useDebouncedCallback","newGlobalPanAndZoom","flush","handleUpdateChartPanAndZoom","shouldFlushImmediately","minDuration","currentDuraton","afterForced","beforeForced","first","wantedDuration","doCallback","tolerance","movement","handleToolBoxPanAndZoom","newAfter","newBefore","handleToolboxLeftClick","handleToolboxRightClick","timeWindow","handleToolboxZoomInClick","panAndZoomStep","handleToolboxZoomOutClick","selectAssignedColors","createSelectAssignedColors","__","isTimeVisible","DropdownItem","DropdownItemLabel","DotsBtn","ChartDropdown","setIsOpen","handleClose","circleAnimation","keyframes","SpinnerContainer","Circle","Circle2","Circle3","ChartSpinner","spaceBetween","ChartDropdownContainer","dimensionsAggrMethodMap","ChartWithLoader","selectChartMetadataRequest","actualChartMetadata","panAndZoom","isPanAndZoomMaster","areCriteriaMet","preferedIntervalTime","selectHasWindowFocus","stopUpdatesWhenFocusIsLost","selectStopUpdatesWhenFocusIsLost","selectGlobalPause","shouldBeUpdating","shouldFetch","setShouldFetch","shouldFetchImmediatelyAfterFocus","setShouldFetchImmediatelyAfterFocus","intervalTime","useInterval","useFetchNewDataClock","panAndZoomThrottled","useThrottle","initialBefore","liveModeAfter","boundingClientRect","isShowingSnapshot","selectShouldEliminateZeroDimensions","shouldUsePanAndZoomPadding","selectPanAndZoomDataPadding","CancelToken","shouldShowSpinnerDebounced","setShouldShowSpinnerDebounced","shouldShowSpinner","newViewRange","forceDataPoints","force_data_points","pointsMultiplier","requestedPadding","pixelsPerPointAttribute","pixelsPerPointSetting","pixels_per_point","getChartPixelsPerPoint","correctedPoints","firstEntry","nowInSeconds","afterAbsolute","beforeAbsolute","requestedRange","availableRange","getCorrectedPoints","externalSelectedDimensions","customElementForDygraph","selectDashboardDomain","selectIsSnapshotMode","selectSnapshotOptions","SnapshotLoader","SnapshotLoaderContainer","Portals","nodes","attributesMapped","createPortal","useHttp","shouldMakeCall","isExternal","setIsFetching","isError","setIsError","setData","modalRoot","ModalPortal","PrintModal","printModalElement","amountOfCharts","amountOfFetchedCharts","nameOfAnyFetchingChart","print","progressBarText","aria-labelledby","data-keyboard","data-backdrop","data-dismiss","aria-label","aria-hidden","aria-valuenow","aria-valuemin","aria-valuemax","SocialMediaContainer","FirstRow","GithubCopy","GithubCopyLine","SocialMediaLink","GithubStarQuestion","GithubIcon","TwitterIcon","FacebookIcon","SecondRow","SecondRowText","SidebarSocialMedia","SidebarSocialMediaPortal","NotificationsContainer","closeButton","hasBorder","hostNameSelector","global","truncate","tooltipBackground","CustomTooltip","isBasic","getContent","contentNode","Tooltip","getTooltipContent","Options","data-toggle","data-target","VersionControl","currentVersion","isStableReleaseChannel","releaseChannel","githubVersion","gcsVersionResponse","mediaLink","mediaLinkResponse","latestVersion","transformGcsVersionResponse","isNewVersionAvailable","small","versionSelector","Version","initialValue","setToggle","toggle","toggleOn","toggleOff","getValueFromStorage","useLocalStorage","setValue","RootContainer","DropdownContainer","Menu","ListContainer","OpenerIcon","noMargin","PickerBox","StyledTimePeriod","StyledCustomTimePeriod","StyledDropdown","renderTitle","onMenuToggle","anchorCorner","renderOpener","maxHeight","DropdownIcon","CustomInput","input","StyledDrop","Drop","StyledHR","hr","period","resolution","setTimeRange","tagging","dateResolutions","resolutionsMapping","MINUTE","HOUR","months","getCustomTimePeriod","parseInputPeriod","timeCorrection","customRange","getUnixTime","focusTaggingMap","startDate","endDate","timePeriods","getDateWithOffset","formattedDate","isMatch","splitOffset","mathSign","absoluteNumber","firstPart","padStart","padEnd","formatOffset","TimePeriods","handleTimePeriodChange","selectedDate","CustomTimePeriod","getInputValue","inputValue","setInputValue","isDropdownOpen","toggleDropdown","onBlur","currentValue","currentTarget","isValidInput","isInteger","timePeriod","isValid","onChangeResolution","newResolution","dateResolution","DatePicker","selected","selectsStart","selectsEnd","startOpen","inline","selectsRange","monthsShown","showPopperArrow","calendarContainer","StyledDateInput","StyledCalendar","getRgbColor","DatePickerInput","onDatesChange","onFocus","placeholderText","setFormattedValue","parsedDate","useLocaleDate","convertTimestampToDate","getLocaleDate","toDate","useConvertedDates","DatePickerWrapper","setStartDate","setEndDate","onInputFocus","convertedStartDate","convertedEndDate","setValidStartDate","setPreviousValue","isBefore","setValidEndDate","dates","startDateWithOffset","endDateWithOffset","startDateTimestamp","endDateTimestamp","grow","PeriodIndication","convertedStart","convertedEnd","formattedStartDate","formattedEndDate","formatDates","formatDistanceStrict","getTimePeriod","whiteSpace","resolutionMap","SECONDS","getDuration","moment","diff","getGranularDuration","showSeconds","getResolution","DateBox","isPlaying","isSameDate","DurationBox","PickerAccessorElement","isPickerOpen","setRangeValues","timeframe","setTimeframe","getStartDate","getEndDate","useDashboardSelector","isSame","getIsSameDate","DatePickerDrop","initialStartDate","initialEndDate","setResolution","focusedInput","setFocusedInput","setDates","clearChanges","togglePicker","focusTagging","getFocusTagging","isValidTimePeriod","isApplyDisabled","consistentDefaultValue","isClearDisabled","pickerDrop","canHideTarget","onEsc","onClickOutside","eventCategory","eventAction","eventLabel","eventValue","dataLayer","eventData","reportEvent","ReduxDatePickerContainer","dashboardDispatch","useDashboardDispatch","isGlobalPanAndZoom","pickedValues","getHoverColor","StyledPill","Pill","PlayPausePill","isForcePlaying","getIcon","PanelRowContainer","MenuItem","Wrapper","testid","actions","basis","DefaultListHeader","H4","SectionHandle","toggleOpen","ItemsList","PlayOptionsTooltip","bacgkround","MenuButton","Dropdown","MemoizedPlayOptions","GlobalControls","hollowColors","hollow","pillProps","Alarms","selectActiveAlarms","News","app","upToDate","SearchInput","TextInput","Search","inputRef","metaShrinked","OffsetItem","onSelect","timezones","abbr","getDefaultTimezone","memoized","timeZoneName","normalizedOffset","parsedOffset","normalizeOffset","digitizedOffset","digitizeOffset","timezoneList","byId","Timezone","selectedTimezone","selectedOffset","timezoneHash","zones","IframeContainer","Iframe","signedIn","rendered","setRendered","signInMsg","lsValue","removeLsValue","selectCloudBaseUrl","nameParam","originParam","signInIframeUrl","onLoad","useCheckSignInStatus","hasSignedInBefore","setHasSignedInBefore","onMessage","isNew","SignIn","isRegistry","onSignIn","CloudTab","showBorderLeft","onActivate","fixed","closable","TITLE","TabsContentText","TabsContent","Home","image","nodeView","Overview","Nodes","Dashboards","Alerts","Anomalies","video","Pricing","Privacy","DiscoverCloudDrop","parentRef","closeDropdown","handleGoToCloud","backdrop","marginLeft","frameBorder","allow","allowFullScreen","InnerPositioner","DiscoverCloud","setIsModalOpen","selectedModalContent","setSelectedModalContent","dropDownParentRef","handleOpenModal","selectedContentId","SignOut","SignInItem","isSignedInSelector","dashboard","UserSettings","menuItems","separator","DarkTheme","SpacesSkeleton","Fragment","SpacesIframe","Spaces","getNodeUrl","baseUrl","getNodes","hostsStatus","base","decodeURI","getBaseUrl","replicatedNodes","Anchor","StyledIcon","ReplicatedNodes","listOpen","setListOpen","toggleListOpen","iconLeft","SpacePanelIframe","spacePanelMessage","promptContent","signIn","signUp","SignInPrompt","NoNetwork","viewBox","xmlns","fillRule","clipRule","OfflinePrompt","NodesContainer","ListItem","TrashIcon","NodeUrl","TextNano","withComponent","NodeName","handle","metaIcon","maxLength","spanLength","truncateMiddle","VisitedNodes","sortedMachines","machinesArray","replicatedNodesSelector","visitedNodesSelector","visitedNodes","globalRegistry","selectIsUsingGlobalRegistry","switchIdentity","persist","pointerEvents","setLsValue","selectSpacePanelIsActive","Layout","printMode","mapTheme","slate","white","DefaultTheme","MigrationModal","migrationModalPromoInfo","setUserPrefrence","savePromoRemindMeSelection","migrationModalPromo","requestRefreshOfAccess","isRememberChoiceChecked","setIsRememberChoiceChecked","toPath","userPreference","handleClickedCTA2","CTA2","tickBoxOption","makeUTMParameters","modalPromo","utmParametersToString","migrationmodalInfo","PROMO_SIGN_UP_CLOUD","preferenceID","PROMO_SIGN_IN_CLOUD","PROMO_IVNITED_TO_SPACE","PROMO_CLAIM_NODE","PROMO_TO_USE_NEW_DASHBAORD","FALLBACK_TO_AGENT","NO_INFO_FALLBACK_TO_AGENT","modalStatusWithPromoFunctions","userSavedPreference","nodeClaimedStatus","useMigrationModal","modalStatus","MigrationManager","cloudUrl","selectSignInUrl","term","linkToCoud","redirectURI","hasPromoSelectionSaved","isPromoEligibleForShow","showModalTimer","goToCloud","FakeMargin","Box","App","useStore","refreshHelper","setRefreshHelper","haveDOMReadyForParsing","loadOverlay","shouldUseRegistry","useRegistry","shouldUseAlarms","selectHasStartedAlarms","useAlarms","shouldUseInfo","useInfo","hasFetchDependencies","setHasFetchDependencies","bootstrap_css","dashboard_css","useChartsMetadata","selectHasFetchedInfo","selectTheme","alarmWhen","alarmTime","alarmChart","alarmValue","useAlarmFromUrl","ReactDOM","isRegistrySelector","offlineSelector","signInUrl","fragmentParamsSeparatorRegEx","param","makeHashFromObject","allParams","allParamsResult","mergeDeepLeft","excludedParams","filteredParams","getFilteredHash","htmlIframeElement","iframeElement","contentWindow","postMessage","messageType","defaultState","lastMessage","setLastMessage","handleMessage","resetMesssage","process","useSelectorOriginal","useDispatchOriginal","getIsDemo","selectGlobal","globalState","selectOptions","optionName","selectChartsMetadata","allMetadata","BaseAnchor","Component","assign","meta","INITIAL_OPTIONS","netdataNoBootstrap","optionsFromLocalStorage","localStorageKeyToOption","parsed","getItemFromLocalStorage","overridenOptions"],"mappings":";gIAAA,oEAAO,IA4LHA,EACAC,EA7LSC,EAAU,SAACC,GACtB,OAAIA,GAAK,IAAMA,EAAI,GACX,IAAN,OAAWA,GAEP,GAAN,OAAUA,IAuBNC,EAAe,SAACC,EAAiBC,GACrC,IAAIC,EAAgBC,KAAKC,IAAIJ,GAEvBK,EAAuB,SAAhBJ,EAAyBE,KAAKG,MAAMJ,EAAgB,OAAS,EAC1EA,GAAwB,MAAPG,EAEjB,IAAME,EACY,SAAhBN,GAA0C,UAAhBA,EAA0BE,KAAKG,MAAMJ,EAAgB,MAAQ,EACzFA,GAAyB,KAARK,EAEjB,IAAMC,EAAUL,KAAKG,MAAMJ,EAAgB,IAC3CA,GAA2B,GAAVM,EAEjB,IAAMC,EAA6B,SAAhBR,EAAA,UAA4BI,EAA5B,MAAuC,GACpDK,EAA8B,SAAhBT,GAA0C,UAAhBA,EAA1B,UAAuDJ,EAAQU,GAA/D,KAA2E,GACzFI,EAAa,UAAMd,EAAQW,GAAd,KACfI,EAAgBf,EAAQK,EAAcW,QAAQ,IAElD,MA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C,GAAD,CAAU1uG,MAAO,EAAGjjB,QAASA,EAAS8vH,QAASA,IAC7C,kBAAC,IAAD,CAAMzlF,MAAM,QAAQvrB,GACpB,kBAAC,IAAD,CAAMurB,MAAM,WAAW2hF,WAAW,UAAlC,OACOnhG,KCZA+mG,GAAY,CACvB,CACEh1H,MAAO,yBACPi1H,KAAM,MACN17F,KAAM,+BACN7U,IAAK,CAAC,eAER,CACE1kB,MAAO,SACPi1H,KAAM,IACN17F,KAAM,gCACN7U,IAAK,CAAC,aAAc,iBAAkB,eAAgB,sBAExD,CACE1kB,MAAO,yBACPi1H,KAAM,MACN17F,KAAM,SACN7U,IAAK,CACH,aACA,mBACA,mBACA,oBACA,mBAGJ,CACE1kB,MAAO,wBACPi1H,KAAM,OACN17F,KAAM,SACN7U,IAAK,CACH,oBACA,iBACA,eACA,gBACA,oBAGJ,CACE1kB,MAAO,iCACPi1H,KAAM,MACN17F,KAAM,kBACN7U,IAAK,CAAC,yBAER,CACE1kB,MAAO,wBACPi1H,KAAM,MACN17F,KAAM,6BACN7U,IAAK,CACH,iBACA,sBACA,kBACA,oBACA,qBACA,YAGJ,CACE1kB,MAAO,4BACPi1H,KAAM,OACN17F,KAAM,UACN7U,IAAK,CACH,kBACA,uBACA,qBACA,kBACA,cAGJ,CACE1kB,MAAO,kCACPi1H,KAAM,MACN17F,KAAM,8BACN7U,IAAK,CAAC,oBAAqB,qBAE7B,CACE1kB,MAAO,yBACPi1H,KAAM,MACN17F,KAAM,8BACN7U,IAAK,CACH,gBACA,wBACA,iBACA,mBACA,iBACA,kBACA,sBACA,YAGJ,CACE1kB,MAAO,gCACPi1H,KAAM,OACN17F,KAAM,kBACN7U,IAAK,CACH,iBACA,qBACA,sBACA,oBACA,kBACA,sBACA,YACA,sBAGJ,CACE1kB,MAAO,wBACPi1H,KAAM,MACN17F,KAAM,6BACN7U,IAAK,CACH,kBACA,uBACA,4BACA,oBACA,oBACA,8BACA,8BACA,iCACA,sBACA,uBACA,mBACA,mBACA,YAGJ,CACE1kB,MAAO,iCACPi1H,KAAM,MACN17F,KAAM,sCACN7U,IAAK,CACH,yBACA,iBACA,iBACA,sBACA,sBAGJ,CACE1kB,MAAO,+BACPi1H,KAAM,OACN17F,KAAM,eACN7U,IAAK,CAAC,iBAAkB,0BAE1B,CACE1kB,MAAO,2BACPi1H,KAAM,OACN17F,KAAM,sBACN7U,IAAK,CACH,iBACA,iBACA,wBACA,mBACA,oBACA,kBACA,eACA,iBACA,qBACA,cAGJ,CACE1kB,MAAO,wBACPi1H,KAAM,MACN17F,KAAM,6BACN7U,IAAK,CACH,kBACA,iBACA,6BACA,4BACA,0BACA,kBACA,8BACA,qBACA,mBACA,iBACA,mBACA,kBACA,sBACA,yBACA,sBACA,kBACA,YAGJ,CACE1kB,MAAO,2BACPi1H,KAAM,OACN17F,KAAM,iBACN7U,IAAK,CAAC,0BAA2B,wBAAyB,yBAE5D,CACE1kB,MAAO,0BACPi1H,KAAM,MACN17F,KAAM,UACN7U,IAAK,CAAC,oBAER,CACE1kB,MAAO,yBACPi1H,KAAM,MACN17F,KAAM,WACN7U,IAAK,CAAC,qBAER,CACE1kB,MAAO,yBACPi1H,KAAM,MACN17F,KAAM,yBACN7U,IAAK,CACH,oBACA,oBACA,kBACA,kBACA,gBACA,qBAGJ,CACE1kB,MAAO,kCACPi1H,KAAM,OACN17F,KAAM,SACN7U,IAAK,CAAC,uBAAwB,mBAEhC,CACE1kB,MAAO,2BACPi1H,KAAM,OACN17F,KAAM,uCACN7U,IAAK,CACH,mBACA,kBACA,gBACA,mBACA,uBACA,oBACA,kBACA,mBACA,qBACA,kBACA,qBACA,iBACA,qBACA,iBACA,wBACA,iBACA,kBACA,qBACA,qBACA,wBACA,sBACA,sBACA,wBACA,wBACA,mBACA,mBACA,oBACA,qBACA,kBACA,cAGJ,CACE1kB,MAAO,2BACPi1H,KAAM,OACN17F,KAAM,WACN7U,IAAK,CAAC,mBAAoB,sBAE5B,CACE1kB,MAAO,6BACPi1H,KAAM,MACN17F,KAAM,eACN7U,IAAK,CAAC,qBAER,CACE1kB,MAAO,iCACPi1H,KAAM,QACN17F,KAAM,WACN7U,IAAK,CAAC,sBAER,CACE1kB,MAAO,0BACPi1H,KAAM,MACN17F,KAAM,eACN7U,IAAK,CACH,6BACA,iCACA,0BACA,6BACA,6BACA,4BACA,4BACA,uBACA,oBACA,kBACA,gBACA,oBAGJ,CACE1kB,MAAO,2BACPi1H,KAAM,OACN17F,KAAM,qBACN7U,IAAK,CACH,oBACA,gBACA,kBACA,oBACA,iBACA,qBACA,iBACA,mBACA,qBACA,mBACA,cAGJ,CACE1kB,MAAO,0BACPi1H,KAAM,MACN17F,KAAM,YACN7U,IAAK,CAAC,oBAER,CACE1kB,MAAO,2BACPi1H,KAAM,MACN17F,KAAM,aACN7U,IAAK,CAAC,uBAER,CACE1kB,MAAO,sBACPi1H,KAAM,MACN17F,KAAM,WACN7U,IAAK,CAAC,kBAER,CACE1kB,MAAO,SACPi1H,KAAM,IACN17F,KAAM,gCACN7U,IAAK,CAAC,kBAAmB,yBAA0B,cAErD,CACE1kB,MAAO,6BACPi1H,KAAM,MACN17F,KAAM,qBACN7U,IAAK,IAEP,CACE1kB,MAAO,uBACPi1H,KAAM,MACN17F,KAAM,SACN7U,IAAK,CAAC,uBAAwB,oBAEhC,CACE1kB,MAAO,2BACPi1H,KAAM,OACN17F,KAAM,iBACN7U,IAAK,CAAC,sBAAuB,cAE/B,CACE1kB,MAAO,wBACPi1H,KAAM,MACN17F,KAAM,aACN7U,IAAK,CAAC,oBAAqB,oBAE7B,CACE1kB,MAAO,MACPi1H,KAAM,MACN17F,KAAM,6BACN7U,IAAK,CAAC,uBAAwB,YAEhC,CACE1kB,MAAO,oBACPi1H,KAAM,MACN17F,KAAM,oBACN7U,IAAK,CAAC,qBAAsB,kBAAmB,gBAAiB,kBAElE,CACE1kB,MAAO,oBACPi1H,KAAM,MACN17F,KAAM,iBACN7U,IAAK,CACH,kBACA,kBACA,mBACA,gBACA,kBAGJ,CACE1kB,MAAO,0BACPi1H,KAAM,MACN17F,KAAM,sBACN7U,IAAK,CACH,iBACA,eACA,gBACA,gBACA,gBACA,iBACA,eACA,kBACA,cACA,kBACA,oBACA,qBACA,kBACA,qBACA,uBAGJ,CACE1kB,MAAO,0BACPi1H,KAAM,OACN17F,KAAM,mDACN7U,IAAK,CACH,sBACA,mBACA,iBACA,gBACA,kBACA,mBACA,oBACA,eACA,gBACA,cACA,cACA,oBACA,mBACA,eACA,iBACA,gBACA,kBAGJ,CACE1kB,MAAO,+BACPi1H,KAAM,OACN17F,KAAM,oDACN7U,IAAK,CACH,kBACA,oBACA,kBACA,mBACA,mBACA,gBACA,kBAGJ,CACE1kB,MAAO,wBACPi1H,KAAM,MACN17F,KAAM,sCACN7U,IAAK,CAAC,eAAgB,kBAAmB,oBAAqB,gBAAiB,iBAEjF,CACE1kB,MAAO,iCACPi1H,KAAM,OACN17F,KAAM,mCACN7U,IAAK,CAAC,kBAAmB,gBAAiB,gBAAiB,kBAE7D,CACE1kB,MAAO,kCACPi1H,KAAM,QACN17F,KAAM,sBACN7U,IAAK,CACH,iBACA,gBACA,qBACA,gBACA,kBACA,eACA,oBACA,gBACA,gBACA,kBACA,gBACA,oBACA,eACA,cAGJ,CACE1kB,MAAO,wBACPi1H,KAAM,MACN17F,KAAM,WACN7U,IAAK,CAAC,oBAER,CACE1kB,MAAO,oBACPi1H,KAAM,MACN17F,KAAM,oBACN7U,IAAK,CAAC,eAAgB,gBAAiB,mBAAoB,oBAE7D,CACE1kB,MAAO,4BACPi1H,KAAM,OACN17F,KAAM,SACN7U,IAAK,CAAC,gBAER,CACE1kB,MAAO,sBACPi1H,KAAM,MACN17F,KAAM,QACN7U,IAAK,CAAC,iBAER,CACE1kB,MAAO,sBACPi1H,KAAM,MACN17F,KAAM,WACN7U,IAAK,CAAC,kBAER,CACE1kB,MAAO,0BACPi1H,KAAM,OACN17F,KAAM,YACN7U,IAAK,CACH,eACA,gBACA,mBACA,kBACA,kBACA,cACA,mBACA,iBACA,cACA,eACA,iBACA,kBACA,iBACA,sBAGJ,CACE1kB,MAAO,6BACPi1H,KAAM,OACN17F,KAAM,mBACN7U,IAAK,CACH,kBACA,mBACA,kBACA,gBACA,sBACA,gBACA,oBACA,gBACA,gBACA,gBACA,iBACA,cAGJ,CACE1kB,MAAO,oBACPi1H,KAAM,MACN17F,KAAM,gDACN7U,IAAK,CACH,kBACA,cACA,mBACA,cACA,eACA,iBACA,kBACA,iBACA,sBAGJ,CACE1kB,MAAO,uBACPi1H,KAAM,MACN17F,KAAM,WACN7U,IAAK,CAAC,oBAER,CACE1kB,MAAO,uBACPi1H,KAAM,MACN17F,KAAM,YACN7U,IAAK,CAAC,mBAER,CACE1kB,MAAO,sBACPi1H,KAAM,MACN17F,KAAM,UACN7U,IAAK,CAAC,mBAER,CACE1kB,MAAO,uBACPi1H,KAAM,MACN17F,KAAM,QACN7U,IAAK,CAAC,eAER,CACE1kB,MAAO,uBACPi1H,KAAM,MACN17F,KAAM,UACN7U,IAAK,CAAC,iBAER,CACE1kB,MAAO,4BACPi1H,KAAM,MACN17F,KAAM,cACN7U,IAAK,CAAC,uBAER,CACE1kB,MAAO,qBACPi1H,KAAM,MACN17F,KAAM,iBACN7U,IAAK,CAAC,YAAa,eAAgB,cAAe,aAAc,gBAElE,CACE1kB,MAAO,0BACPi1H,KAAM,OACN17F,KAAM,UACN7U,IAAK,CACH,qBACA,gBACA,uBACA,kBACA,cACA,iBACA,kBACA,mBACA,iBACA,mBACA,YACA,sBACA,gBACA,mBAGJ,CACE1kB,MAAO,uBACPi1H,KAAM,MACN17F,KAAM,2CACN7U,IAAK,CAAC,eAAgB,gBAAiB,oBAAqB,mBAAoB,iBAElF,CACE1kB,MAAO,cACPi1H,KAAM,OACN17F,KAAM,6BACN7U,IAAK,CAAC,mBAAoB,gBAAiB,qBAE7C,CACE1kB,MAAO,qBACPi1H,KAAM,MACN17F,KAAM,SACN7U,IAAK,CAAC,gBAER,CACE1kB,MAAO,wBACPi1H,KAAM,MACN17F,KAAM,oBACN7U,IAAK,CAAC,aAAc,cAAe,cAErC,CACE1kB,MAAO,2BACPi1H,KAAM,MACN17F,KAAM,OACN7U,IAAK,CAAC,cAER,CACE1kB,MAAO,0BACPi1H,KAAM,MACN17F,KAAM,aACN7U,IAAK,CAAC,cAAe,mBAAoB,mBAE3C,CACE1kB,MAAO,yBACPi1H,KAAM,MACN17F,KAAM,UACN7U,IAAK,CAAC,iBAER,CACE1kB,MAAO,yBACPi1H,KAAM,MACN17F,KAAM,UACN7U,IAAK,CAAC,iBAER,CACE1kB,MAAO,4BACPi1H,KAAM,MACN17F,KAAM,QACN7U,IAAK,CAAC,eAER,CACE1kB,MAAO,0BACPi1H,KAAM,OACN17F,KAAM,qBACN7U,IAAK,CACH,oBACA,aACA,cACA,gBACA,gBACA,YACA,iBACA,gBACA,YACA,mBACA,oBAGJ,CACE1kB,MAAO,qBACPi1H,KAAM,OACN17F,KAAM,gBACN7U,IAAK,CAAC,uBAER,CACE1kB,MAAO,yBACPi1H,KAAM,MACN17F,KAAM,qBACN7U,IAAK,CAAC,iBAER,CACE1kB,MAAO,sBACPi1H,KAAM,MACN17F,KAAM,sCACN7U,IAAK,CAAC,iBAER,CACE1kB,MAAO,0BACPi1H,KAAM,OACN17F,KAAM,sBACN7U,IAAK,CAAC,iBAER,CACE1kB,MAAO,sBACPi1H,KAAM,MACN17F,KAAM,YACN7U,IAAK,CAAC,mBAER,CACE1kB,MAAO,6BACPi1H,KAAM,OACN17F,KAAM,sBACN7U,IAAK,CACH,oBACA,cACA,eACA,iBACA,cACA,YACA,kBAGJ,CACE1kB,MAAO,2BACPi1H,KAAM,MACN17F,KAAM,QACN7U,IAAK,CAAC,aAAc,iBAEtB,CACE1kB,MAAO,wBACPi1H,KAAM,MACN17F,KAAM,mBACN7U,IAAK,CAAC,eAAgB,iBAExB,CACE1kB,MAAO,wBACPi1H,KAAM,OACN17F,KAAM,0BACN7U,IAAK,CACH,mBACA,eACA,Y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/FgC,iBA+F5BqJ,GAAgCvQ,EAC3BA,GAGTuC,QAAQC,IAAR,wCAA6C+N,EAA7C,qBAEAxJ,aAAakgB,WAAW1W,GACjB,MAET,OAAOq0H,EAO6BC,CAAwBt0H,OAEzDzB,QAAO,SAAAykC,GAAC,OAA4B,OAAxBxxC,OAAOsN,OAAOkkC,GAAG,MAE1BuxF,EAAmBj2H,YAAS61H,GAClC,OAAOrmD,YAAWmmD,EAAiBM,IAGxB93H,EAAgCyD,IAChC+R,EAAqBxV,EAA6B,aAElDwD,EAAoB,WACNzO,OAAOlB,KAAKkG,cACpB/E,SAAQ,SAAAuO,IACnBA,EAAI4R,WAAWjd,MAAmCqL,EAAI4R,WAAW,cACnEpb,aAAakgB,WAAW1W,S","file":"static/js/main.e248095a.chunk.js","sourcesContent":["export const zeropad = (x: string | number) => {\n if (x > -10 && x < 10) {\n return `0${x}`\n }\n return `${x}`\n}\n\ninterface ScalableUnits {\n [unitGroupName: string]: {\n [unitName: string]: number\n }\n}\n\nexport const leaveAtLeast1Decimal = (number: number) => {\n const decimalPortion = `${number}`.split(\".\")[1]\n if (decimalPortion && decimalPortion.length > 1) {\n return `${number}`\n }\n\n let tms = number * 10\n const integer = Math.floor(tms / 10)\n\n tms -= integer * 10\n return `${integer}.${tms}`\n}\n\ntype TimeUnit = \"MINUTES\" | \"HOURS\" | \"DAYS\"\nconst seconds2time = (seconds: number, maxTimeUnit: TimeUnit) => {\n let secondsReturn = Math.abs(seconds)\n\n const days = maxTimeUnit === \"DAYS\" ? Math.floor(secondsReturn / 86400) : 0\n secondsReturn -= days * 86400\n\n const hours =\n maxTimeUnit === \"DAYS\" || maxTimeUnit === \"HOURS\" ? Math.floor(secondsReturn / 3600) : 0\n secondsReturn -= hours * 3600\n\n const minutes = Math.floor(secondsReturn / 60)\n secondsReturn -= minutes * 60\n\n const daysString = maxTimeUnit === \"DAYS\" ? `${days}d:` : \"\"\n const hoursString = maxTimeUnit === \"DAYS\" || maxTimeUnit === \"HOURS\" ? `${zeropad(hours)}:` : \"\"\n const minutesString = `${zeropad(minutes)}:`\n let secondsString = zeropad(secondsReturn.toFixed(2))\n\n return `${daysString}${hoursString}${minutesString}${secondsString}`\n}\n\nconst scalableUnits: ScalableUnits = {\n \"packets/s\": {\n pps: 1,\n Kpps: 1000,\n Mpps: 1000000,\n },\n pps: {\n pps: 1,\n Kpps: 1000,\n Mpps: 1000000,\n },\n \"kilobits/s\": {\n \"bits/s\": 1 / 1000,\n \"kilobits/s\": 1,\n \"megabits/s\": 1000,\n \"gigabits/s\": 1000000,\n \"terabits/s\": 1000000000,\n },\n \"bytes/s\": {\n \"bytes/s\": 1,\n \"kilobytes/s\": 1024,\n \"megabytes/s\": 1024 * 1024,\n \"gigabytes/s\": 1024 * 1024 * 1024,\n \"terabytes/s\": 1024 * 1024 * 1024 * 1024,\n },\n \"kilobytes/s\": {\n \"bytes/s\": 1 / 1024,\n \"kilobytes/s\": 1,\n \"megabytes/s\": 1024,\n \"gigabytes/s\": 1024 * 1024,\n \"terabytes/s\": 1024 * 1024 * 1024,\n },\n \"B/s\": {\n \"B/s\": 1,\n \"KiB/s\": 1024,\n \"MiB/s\": 1024 * 1024,\n \"GiB/s\": 1024 * 1024 * 1024,\n \"TiB/s\": 1024 * 1024 * 1024 * 1024,\n },\n \"KB/s\": {\n \"B/s\": 1 / 1024,\n \"KB/s\": 1,\n \"MB/s\": 1024,\n \"GB/s\": 1024 * 1024,\n \"TB/s\": 1024 * 1024 * 1024,\n },\n \"KiB/s\": {\n \"B/s\": 1 / 1024,\n \"KiB/s\": 1,\n \"MiB/s\": 1024,\n \"GiB/s\": 1024 * 1024,\n \"TiB/s\": 1024 * 1024 * 1024,\n },\n bytes: {\n bytes: 1,\n kilobytes: 1024,\n megabytes: 1024 * 1024,\n gigabytes: 1024 * 1024 * 1024,\n terabytes: 1024 * 1024 * 1024 * 1024,\n },\n Hz: {\n Hz: 1,\n kHz: 10 ** 3,\n MHz: 10 ** 6,\n GHz: 10 ** 9,\n THz: 10 ** 12,\n PHz: 10 ** 15,\n EHz: 10 ** 18,\n ZHz: 10 ** 21,\n },\n B: {\n B: 1,\n KiB: 1024,\n MiB: 1024 * 1024,\n GiB: 1024 * 1024 * 1024,\n TiB: 1024 * 1024 * 1024 * 1024,\n PiB: 1024 * 1024 * 1024 * 1024 * 1024,\n },\n KB: {\n B: 1 / 1024,\n KB: 1,\n MB: 1024,\n GB: 1024 * 1024,\n TB: 1024 * 1024 * 1024,\n },\n KiB: {\n B: 1 / 1024,\n KiB: 1,\n MiB: 1024,\n GiB: 1024 * 1024,\n TiB: 1024 * 1024 * 1024,\n },\n MB: {\n B: 1 / (1024 * 1024),\n KB: 1 / 1024,\n MB: 1,\n GB: 1024,\n TB: 1024 * 1024,\n PB: 1024 * 1024 * 1024,\n },\n MiB: {\n B: 1 / (1024 * 1024),\n KiB: 1 / 1024,\n MiB: 1,\n GiB: 1024,\n TiB: 1024 * 1024,\n PiB: 1024 * 1024 * 1024,\n },\n GB: {\n B: 1 / (1024 * 1024 * 1024),\n KB: 1 / (1024 * 1024),\n MB: 1 / 1024,\n GB: 1,\n TB: 1024,\n PB: 1024 * 1024,\n EB: 1024 * 1024 * 1024,\n },\n GiB: {\n B: 1 / (1024 * 1024 * 1024),\n KiB: 1 / (1024 * 1024),\n MiB: 1 / 1024,\n GiB: 1,\n TiB: 1024,\n PiB: 1024 * 1024,\n EiB: 1024 * 1024 * 1024,\n },\n /*\n 'milliseconds': {\n 'seconds': 1000\n },\n 'seconds': {\n 'milliseconds': 0.001,\n 'seconds': 1,\n 'minutes': 60,\n 'hours': 3600,\n 'days': 86400\n }\n */\n}\n\nlet currentTemperatureSetting: \"celsius\" | \"fahrenheit\"\nlet currentSecondsAsTimeSetting: boolean\ninterface ConvertibleUnits {\n [unitIn: string]: {\n [unitOut: string]: {\n check: ((number: number) => boolean) | (() => boolean)\n convert: (number: number) => number | string\n }\n }\n}\n\nconst twoFixed =\n (multiplier: number = 1) =>\n (value: number) =>\n (value * multiplier).toFixed(2)\n\nconst convertibleUnits: ConvertibleUnits = {\n Celsius: {\n Fahrenheit: {\n check() {\n return currentTemperatureSetting === \"fahrenheit\"\n },\n convert(value: number) {\n return (value * 9) / 5 + 32\n },\n },\n },\n celsius: {\n fahrenheit: {\n check() {\n return currentTemperatureSetting === \"fahrenheit\"\n },\n convert(value: number) {\n return (value * 9) / 5 + 32\n },\n },\n },\n milliseconds: {\n microseconds: {\n check: (max: number) => max < 1,\n convert: twoFixed(1000),\n },\n milliseconds: {\n check: (max: number) => max >= 1 && max < 1000,\n convert: twoFixed(),\n },\n seconds: {\n check: (max: number) => max >= 1000 && max < 60000,\n convert: twoFixed(0.001),\n },\n \"MM:SS.ms\": {\n check: (max: number) => currentSecondsAsTimeSetting && max >= 60000 && max < 3600_000,\n convert: (value: number) => seconds2time(value / 1000, \"MINUTES\"),\n },\n \"HH:MM:SS.ms\": {\n check: (max: number) => currentSecondsAsTimeSetting && max >= 3600_000 && max < 86_400_000,\n convert: (value: number) => seconds2time(value / 1000, \"HOURS\"),\n },\n \"dHH:MM:SS.ms\": {\n check: (max: number) => currentSecondsAsTimeSetting && max >= 86_400_000,\n convert: (value: number) => seconds2time(value / 1000, \"DAYS\"),\n },\n },\n\n seconds: {\n microseconds: {\n check: (max: number) => max < 0.001,\n convert: twoFixed(1000_000),\n },\n milliseconds: {\n check: (max: number) => max >= 0.001 && max < 1,\n convert: twoFixed(1000),\n },\n seconds: {\n check: (max: number) => max >= 1 && max < 60,\n convert: twoFixed(1),\n },\n \"MM:SS.ms\": {\n check: (max: number) => currentSecondsAsTimeSetting && max >= 60 && max < 3600,\n convert: (value: number) => seconds2time(value, \"MINUTES\"),\n },\n \"HH:MM:SS.ms\": {\n check: (max: number) => currentSecondsAsTimeSetting && max >= 3600 && max < 86_400,\n convert: (value: number) => seconds2time(value, \"HOURS\"),\n },\n \"dHH:MM:SS.ms\": {\n check: (max: number) => currentSecondsAsTimeSetting && max >= 86_400,\n convert: (value: number) => seconds2time(value, \"DAYS\"),\n },\n },\n}\n\nconst identity = (value: number) => value\n\ninterface Keys {\n [commonUnitsKey: string]: {\n [uuid: string]: {\n divider: number\n units: string\n }\n }\n}\ninterface Latest {\n [commonUnitsKey: string]: {\n divider: number\n units: string\n }\n}\nexport const unitsConversionCreator = {\n // todo lift the state\n keys: {} as Keys, // keys for data-common-units\n latest: {} as Latest, // latest selected units for data-common-units\n\n globalReset() {\n this.keys = {}\n this.latest = {}\n },\n\n // get a function that converts the units\n // + every time units are switched call the callback\n get(\n uuid: string,\n min: number,\n max: number,\n units: string | undefined,\n desiredUnits: undefined | null | string,\n commonUnitsName: string | null | undefined,\n switchUnitsCallback: (units: string) => void,\n temperatureSetting: \"celsius\" | \"fahrenheit\",\n secondsAsTimeSetting: boolean\n ) {\n // validate the parameters\n if (typeof units === \"undefined\") {\n // eslint-disable-next-line no-param-reassign\n units = \"undefined\"\n }\n\n // it will be removed when we'll lift the state to redux\n currentTemperatureSetting = temperatureSetting\n currentSecondsAsTimeSetting = secondsAsTimeSetting\n\n // check if we support units conversion\n if (typeof scalableUnits[units] === \"undefined\"\n && typeof convertibleUnits[units] === \"undefined\"\n ) {\n // we can't convert these units\n // console.log('DEBUG: ' + uuid.toString() + ' can\\'t convert units: ' + units.toString());\n return (value: number) => value\n }\n\n // check if the caller wants the original units\n if (desiredUnits === undefined || desiredUnits === null || desiredUnits === \"original\"\n || desiredUnits === units\n ) {\n // console.log('DEBUG: ' + uuid.toString() + ' original units wanted');\n switchUnitsCallback(units)\n return identity\n }\n\n // now we know we can convert the units\n // and the caller wants some kind of conversion\n\n let tunits = null\n let tdivider = 0\n\n if (typeof scalableUnits[units] !== \"undefined\") {\n // units that can be scaled\n // we decide a divider\n\n if (desiredUnits === \"auto\") {\n // the caller wants to auto-scale the units\n\n // find the absolute maximum value that is rendered on the chart\n // based on this we decide the scale\n /* eslint-disable no-param-reassign */\n min = Math.abs(min)\n max = Math.abs(max)\n if (min > max) {\n max = min\n }\n /* eslint-enable no-param-reassign */\n\n const scalableUnitsGroup = scalableUnits[units]\n Object.keys(scalableUnitsGroup).forEach((unit) => {\n const unitDivider = scalableUnitsGroup[unit]\n if (unitDivider <= max && unitDivider > tdivider) {\n tunits = unit\n tdivider = unitDivider\n }\n })\n\n if (tunits === null || tdivider <= 0) {\n // we couldn't find auto-scaling candidate for unit\n switchUnitsCallback(units)\n return identity\n }\n\n if (typeof commonUnitsName === \"string\") {\n // the caller wants several charts to have the same units\n // data-common-units\n\n const commonUnitsKey = `${commonUnitsName}-${units}`\n\n // add our divider into the list of keys\n let t = this.keys[commonUnitsKey]\n if (typeof t === \"undefined\") {\n this.keys[commonUnitsKey] = {}\n t = this.keys[commonUnitsKey]\n }\n t[uuid] = {\n units: tunits,\n divider: tdivider,\n }\n\n // find the max divider of all charts\n let commonUnits = t[uuid]\n // todo remove imperative forEach\n Object.keys(t).forEach((x) => {\n if (t[x].divider > commonUnits.divider) {\n commonUnits = t[x]\n }\n })\n\n // save our common_max to the latest keys\n const latest = {\n units: commonUnits.units,\n divider: commonUnits.divider,\n }\n this.latest[commonUnitsKey] = latest\n\n tunits = latest.units\n tdivider = latest.divider\n\n // apply it to this chart\n switchUnitsCallback(tunits)\n return (value: number) => {\n if (tdivider !== latest.divider) {\n // another chart switched our common units\n // we should switch them too\n tunits = latest.units\n tdivider = latest.divider\n switchUnitsCallback(tunits)\n }\n\n return value / tdivider\n }\n }\n // the caller did not give data-common-units\n // this chart auto-scales independently of all others\n\n switchUnitsCallback(tunits)\n return (value: number) => value / tdivider\n }\n // the caller wants specific units\n\n if (typeof scalableUnits[units][desiredUnits] !== \"undefined\") {\n // all good, set the new units\n tdivider = scalableUnits[units][desiredUnits]\n switchUnitsCallback(desiredUnits)\n return (value: number) => value / tdivider\n }\n // oops! switch back to original units\n // eslint-disable-next-line no-console\n console.log(`Units conversion from ${units.toString()} to ${desiredUnits.toString()}\n is not supported.`)\n\n switchUnitsCallback(units)\n return identity\n } if (typeof convertibleUnits[units] !== \"undefined\") {\n // units that can be converted\n if (desiredUnits === \"auto\") {\n let newConvertFunction: ((number: number) => number | string) | undefined\n Object.keys(convertibleUnits[units]).forEach((x) => {\n if (newConvertFunction) { return }\n if (convertibleUnits[(units as string)][x].check(max)) {\n // converting\n switchUnitsCallback(x)\n newConvertFunction = convertibleUnits[(units as string)][x].convert\n }\n })\n if (newConvertFunction) {\n return newConvertFunction\n }\n\n // none checked ok (no conversion available)\n switchUnitsCallback(units)\n return identity\n } if (typeof convertibleUnits[units][desiredUnits] !== \"undefined\") {\n switchUnitsCallback(desiredUnits)\n return convertibleUnits[units][desiredUnits].convert\n }\n // eslint-disable-next-line no-console\n console.log(`Units conversion from ${units.toString()} to ${desiredUnits.toString()}\n is not supported.`)\n switchUnitsCallback(units)\n return identity\n }\n // hm... did we forget to implement the new type?\n // eslint-disable-next-line no-console\n console.log(`Unmatched unit conversion method for units ${units.toString()}`)\n switchUnitsCallback(units)\n return identity\n },\n}\n","import * as React from \"react\"\nimport classNames from \"classnames\"\n\nimport \"./button.css\"\n\ntype Props = React.ButtonHTMLAttributes<HTMLButtonElement>\nexport const Button = React.forwardRef(({\n children,\n className,\n ...rest\n}: Props, ref: React.Ref<HTMLButtonElement>) => (\n <button\n {...rest} // eslint-disable-line react/jsx-props-no-spreading\n type=\"button\"\n className={classNames(\"netdata-reset-button\", className)}\n ref={ref}\n >\n {children}\n </button>\n))\n","import React, { useRef, useEffect } from \"react\"\nimport classNames from \"classnames\"\n\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectShowHelp } from \"domains/global/selectors\"\nimport { Icon, IconType } from \"components/icon\"\nimport { Button } from \"components/button\"\n\ntype ClickCallback = (event: React.MouseEvent) => void\ninterface ToolboxButtonProps {\n className?: string\n iconType: IconType\n onClick?: ClickCallback\n onDoubleClick?: (event: React.MouseEvent) => void\n onMouseDown?: (event: React.MouseEvent) => void\n onTouchStart?: (event: React.TouchEvent) => void\n popoverContent: string\n popoverTitle: string\n}\nexport const ToolboxButton = ({\n className,\n iconType,\n onClick,\n onDoubleClick,\n onMouseDown,\n onTouchStart,\n popoverContent,\n popoverTitle,\n}: ToolboxButtonProps) => {\n const buttonRef = useRef(null)\n const showHelp = useSelector(selectShowHelp)\n useEffect(() => {\n if (buttonRef.current && showHelp) {\n window.$(buttonRef.current).popover({\n container: \"body\",\n animation: false,\n html: true,\n trigger: \"hover\",\n placement: \"bottom\",\n delay: {\n show: window.NETDATA.options.current.show_help_delay_show_ms,\n hide: window.NETDATA.options.current.show_help_delay_hide_ms,\n },\n title: popoverTitle,\n content: popoverContent,\n })\n }\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n return (\n <Button\n className={classNames(className)}\n onClick={onClick}\n onDoubleClick={onDoubleClick}\n onMouseDown={onMouseDown}\n onTouchStart={onTouchStart}\n ref={buttonRef}\n >\n <Icon iconType={iconType} />\n </Button>\n )\n}\n","import React, { useState, useCallback, useEffect } from \"react\"\nimport { ToolboxButton } from \"domains/chart/components/toolbox-button\"\nimport { setResizeHeightAction } from \"domains/chart/actions\"\nimport { LEGEND_BOTTOM_SINGLE_LINE_HEIGHT } from \"domains/chart/utils/legend-utils\"\nimport { useDispatch } from \"store/redux-separate-context\"\n\nexport const LOCALSTORAGE_HEIGHT_KEY_PREFIX = \"chart_height.\"\n\ninterface Props {\n chartContainerElement: HTMLElement\n chartUuid: string\n heightId: string | undefined\n isLegendOnBottom: boolean\n}\n\nexport const ResizeHandler = ({\n chartContainerElement, chartUuid, heightId, isLegendOnBottom,\n}: Props) => {\n const [resizeHeight, setResizeHeight] = useState(() => chartContainerElement.clientHeight)\n const dispatch = useDispatch()\n\n useEffect(() => {\n // todo when attributes.id are present, hook height to localStorage\n if (resizeHeight >= 70) {\n dispatch(\n setResizeHeightAction({\n id: chartUuid,\n resizeHeight,\n }),\n )\n }\n }, [resizeHeight, chartUuid, heightId, dispatch])\n\n const handleResize = useCallback(\n (event) => {\n event.preventDefault()\n const intialHeight = chartContainerElement.clientHeight\n const eventStartHeight = event.type === \"touchstart\"\n ? event.touches[0].clientY\n : event.clientY\n\n const setHeight = (currentHeight: number) => {\n const nextHeight = intialHeight + currentHeight - eventStartHeight\n // eslint-disable-next-line no-param-reassign\n chartContainerElement.style.height = `${nextHeight.toString()}px`\n setResizeHeight(nextHeight)\n if (heightId) {\n const heightForPersistance = isLegendOnBottom\n ? (nextHeight - LEGEND_BOTTOM_SINGLE_LINE_HEIGHT)\n : nextHeight\n localStorage.setItem(\n `${LOCALSTORAGE_HEIGHT_KEY_PREFIX}${heightId}`,\n `${heightForPersistance}`,\n )\n }\n }\n\n const onMouseMove = (e: MouseEvent) => setHeight(e.clientY)\n const onTouchMove = (e: TouchEvent) => setHeight(e.touches[0].clientY)\n\n const onMouseEnd = () => {\n document.removeEventListener(\"mousemove\", onMouseMove)\n document.removeEventListener(\"mouseup\", onMouseEnd)\n }\n\n const onTouchEnd = () => {\n document.removeEventListener(\"touchmove\", onTouchMove)\n document.removeEventListener(\"touchend\", onTouchEnd)\n }\n\n if (event.type === \"touchstart\") {\n document.addEventListener(\"touchmove\", onTouchMove)\n document.addEventListener(\"touchend\", onTouchEnd)\n } else {\n document.addEventListener(\"mousemove\", onMouseMove)\n document.addEventListener(\"mouseup\", onMouseEnd)\n }\n },\n [chartContainerElement.clientHeight, chartContainerElement.style.height, heightId,\n isLegendOnBottom],\n )\n\n return (\n <ToolboxButton\n className=\"netdata-legend-resize-handler\"\n onDoubleClick={(event: React.MouseEvent) => {\n event.preventDefault()\n event.stopPropagation()\n }}\n onMouseDown={handleResize}\n onTouchStart={handleResize}\n iconType=\"resize\"\n popoverTitle=\"Chart Resize\"\n popoverContent=\"Drag this point with your mouse or your finger (on touch devices), to resize\n the chart vertically. You can also <b>double click it</b> or <b>double tap it</b> to reset\n between 2 states: the default and the one that fits all the values.<br/><small>Help\n can be disabled from the settings.</small>\"\n />\n )\n}\n","import { createAction } from \"redux-act\"\n\nimport { createRequestAction } from \"utils/createRequestAction\"\nimport { RegistryMachine } from \"domains/global/sagas\"\nimport { storeKey } from \"./constants\"\nimport { ActiveAlarms, ChartsMetadata, Snapshot, Alarm, UserNodeAccessMessage } from \"./types\"\n\ninterface RequestCommonColors {\n chartContext: string\n chartUuid: string\n colorsAttribute: string | undefined\n commonColorsAttribute: string | undefined\n dimensionNames: string[]\n}\nexport const requestCommonColorsAction = createAction<RequestCommonColors>(\n `${storeKey}/globalRequestCommonColors`\n)\n\ninterface SetCommonMinAction {\n chartUuid: string\n commonMinKey: string\n value: number\n}\nexport const setCommonMinAction = createAction<SetCommonMinAction>(`${storeKey}/setCommonMin`)\n\ninterface SetCommonMaxAction {\n chartUuid: string\n commonMaxKey: string\n value: number\n}\nexport const setCommonMaxAction = createAction<SetCommonMaxAction>(`${storeKey}/setCommonMax`)\n\ninterface SetGlobalSelectionAction {\n chartUuid: string | null\n hoveredX: number\n}\nexport const setGlobalSelectionAction = createAction<SetGlobalSelectionAction>(\n `${storeKey}/setGlobalSelection`\n)\n\nexport interface SetGlobalPanAndZoomAction {\n after: number\n before: number\n masterID?: string\n shouldForceTimeRange?: boolean\n}\nexport const setGlobalPanAndZoomAction = createAction<SetGlobalPanAndZoomAction>(\n `${storeKey}/setGlobalPanAndZoom`\n)\n\nexport const resetGlobalPanAndZoomAction = createAction(`${storeKey}/resetGlobalPanAndZoomAction`)\n\nexport interface SetDefaultAfterAction {\n after: number\n}\nexport const setDefaultAfterAction = createAction<SetDefaultAfterAction>(\n `${storeKey}/setDefaultAfterAction`\n)\n\nexport const resetDefaultAfterAction = createAction(`${storeKey}/resetDefaultAfterAction`)\n\nexport interface SetGlobalChartUnderlayAction {\n after: number\n before: number\n masterID: string\n}\nexport const setGlobalChartUnderlayAction = createAction<SetGlobalChartUnderlayAction>(\n `${storeKey}/setGlobalChartUnderlay`\n)\n\nexport const centerAroundHighlightAction = createAction(`${storeKey}/centerAroundHighlightAction`)\nexport const clearHighlightAction = createAction(`${storeKey}/clearHighlightAction`)\n\ninterface WindowFocusChangeAction {\n hasWindowFocus: boolean\n}\nexport const windowFocusChangeAction = createAction<WindowFocusChangeAction>(\n `${storeKey}/windowFocusChangeAction`\n)\n\nexport interface FetchHelloPayload {\n serverDefault: string\n}\n/* eslint-disable camelcase */\nexport interface HelloResponse {\n action: \"hello\"\n anonymous_statistics: boolean\n cloud_base_url: string\n hostname: string\n machine_guid: string\n registry: string\n status: string\n}\n/* eslint-enable camelcase */\n\nexport const fetchHelloAction = createRequestAction<\n FetchHelloPayload,\n { cloudBaseURL: string; hostname: string; isCloudEnabled: boolean; machineGuid: string }\n>(`${storeKey}/fetchHelloAction`)\n\ninterface UpdatePersonUrlsAction {\n personGuid: string\n registryMachines: { [key: string]: RegistryMachine }\n registryMachinesArray: RegistryMachine[]\n}\nexport const updatePersonUrlsAction = createAction<UpdatePersonUrlsAction>(\n `${storeKey}/updatePersonUrlsAction`\n)\n\nexport interface AccessRegistrySuccessAction {\n registryServer: string\n}\nexport const accessRegistrySuccessAction = createAction<AccessRegistrySuccessAction>(\n `${storeKey}/accessRegistrySuccessAction`\n)\n\nexport interface StartAlarmsPayload {\n serverDefault: string\n}\nexport const startAlarmsAction = createAction<StartAlarmsPayload>(`${storeKey}/startAlarmsAction`)\n\nexport const fetchAllAlarmsAction = createRequestAction(`${storeKey}/fetchAllAlarmsAction`)\n\nexport interface UpdateActiveAlarmAction {\n activeAlarms: ActiveAlarms\n}\nexport const updateActiveAlarmsAction = createAction<UpdateActiveAlarmAction>(\n `${storeKey}/updateActiveAlarmsAction`\n)\n\nexport interface SetOptionAction {\n key: string\n value: unknown\n}\nexport const setOptionAction = createAction<SetOptionAction>(`${storeKey}/setOptionAction`)\n\nexport const resetOptionsAction = createAction(`${storeKey}/resetOptions`)\n\nexport const loadSnapshotAction = createAction<{ snapshot: Snapshot }>(\n `${storeKey}/loadSnapshotAction`\n)\n\nexport const chartsMetadataRequestSuccess = createAction<{ data: ChartsMetadata }>(\n `${storeKey}/chartsMetadataRequestSuccess`\n)\n\nexport interface SetSpacePanelStatusActionPayload {\n isActive: boolean\n}\nexport const setSpacePanelStatusAction = createAction<SetSpacePanelStatusActionPayload>(\n `${storeKey}/setSpacePanelStatusAction`\n)\n\nexport interface SetSpacePanelTransitionEndPayload {\n isActive: boolean\n}\nexport const setSpacePanelTransitionEndAction = createAction<SetSpacePanelTransitionEndPayload>(\n `${storeKey}/setSpacePanelStatusAction`\n)\n\nexport const setAlarmAction = createAction<{ alarm: Alarm }>(`${storeKey}/setAlarmAction`)\n\nexport const resetRegistry = createAction(`${storeKey}/resetRegistry`)\n\nexport const setGlobalPauseAction = createAction(`${storeKey}/setGlobalPauseAction`)\nexport const resetGlobalPauseAction = createAction<{ forcePlay?: boolean }>(\n `${storeKey}/resetGlobalPauseAction`\n)\nexport const setUTCOffset = createAction<{ utcOffset?: number | string }>(\n `${storeKey}/setUTCOffset`\n)\n\nexport const setUserNodeAccess = createAction<{ message: UserNodeAccessMessage }>(\n `${storeKey}/setUserNodeAccess`\n)\n","import { useCallback } from \"react\"\nimport { useDispatch } from \"react-redux\"\nimport { sendToChildIframe, useListenToPostMessage } from \"utils/post-message\"\nimport { setUserNodeAccess } from \"domains/global/actions\"\nimport { UserNodeAccessMessage } from \"domains/global/types\"\nimport { SIGN_IN_IFRAME_ID } from \"components/header/constants\"\n\nconst useUserNodeAccessMessage = () => {\n const dispatch = useDispatch()\n useListenToPostMessage<UserNodeAccessMessage>(\"user-node-access\", message => {\n dispatch(setUserNodeAccess({ message }))\n })\n}\n\nexport const useRequestRefreshOfAccessMessage = () => {\n return useCallback(() => {\n sendToChildIframe(SIGN_IN_IFRAME_ID, { type: \"request-refresh-access\", payload: true })\n }, [])\n}\n\nexport default useUserNodeAccessMessage\n","export * from \"./utils\"\n","export const name2id = (s: string) => s\n .replace(/ /g, \"_\")\n .replace(/:/g, \"_\")\n .replace(/\\(/g, \"_\")\n .replace(/\\)/g, \"_\")\n .replace(/\\./g, \"_\")\n .replace(/\\//g, \"_\")\n","import { init, last, mergeAll } from \"ramda\"\nimport { createReducer } from \"redux-act\"\n\nimport { getInitialAfterFromWindow } from \"utils/utils\"\nimport { isMainJs } from \"utils/env\"\nimport { RegistryMachine } from \"domains/global/sagas\"\nimport { Alarm, ActiveAlarms, Snapshot, ChartsMetadata } from \"domains/global/types\"\nimport { fetchInfoAction } from \"domains/chart/actions\"\nimport { InfoPayload } from \"./__mocks__/info-mock\"\nimport {\n requestCommonColorsAction,\n setGlobalChartUnderlayAction,\n setGlobalSelectionAction,\n setGlobalPanAndZoomAction,\n centerAroundHighlightAction,\n clearHighlightAction,\n resetGlobalPanAndZoomAction,\n setDefaultAfterAction,\n windowFocusChangeAction,\n fetchHelloAction,\n updatePersonUrlsAction,\n startAlarmsAction,\n updateActiveAlarmsAction,\n setOptionAction,\n loadSnapshotAction,\n chartsMetadataRequestSuccess,\n setCommonMaxAction,\n setCommonMinAction,\n resetOptionsAction,\n setSpacePanelStatusAction,\n setSpacePanelTransitionEndAction,\n resetRegistry,\n accessRegistrySuccessAction,\n resetDefaultAfterAction,\n setAlarmAction,\n setGlobalPauseAction,\n resetGlobalPauseAction,\n setUTCOffset,\n setUserNodeAccess,\n} from \"./actions\"\nimport {\n Options,\n optionsMergedWithLocalStorage,\n getOptionsMergedWithLocalStorage,\n clearLocalStorage,\n} from \"./options\"\nimport { CLOUD_BASE_URL_DISABLED } from \"./constants\"\nimport { UserNodeAccessMessage } from \"./types\"\n\ninterface CommonMinMax {\n [commonKey: string]: {\n charts: {\n [chartUuid: string]: number\n }\n currentExtreme: number\n }\n}\n\nexport type StateT = {\n commonColorsKeys: {\n [key: string]: {\n // key can be uuid, chart's context or commonColors attribute\n assigned: {\n // name-value of dimensions and their colors\n [dimensionName: string]: string\n }\n available: string[] // an array of colors available to be used\n custom: string[] // the array of colors defined by the user\n charts: {} // the charts linked to this todo remove\n copyTheme: boolean\n }\n }\n commonMin: CommonMinMax\n commonMax: CommonMinMax\n currentSelectionMasterId: string | null\n globalPanAndZoom: null | {\n after: number // timestamp in ms\n before: number // timestamp in ms\n masterID?: string\n shouldForceTimeRange?: boolean\n }\n defaultAfter: number\n globalChartUnderlay: null | {\n after: number\n before: number\n masterID: string\n }\n hoveredX: number | null\n hasWindowFocus: boolean\n globalPause: boolean\n\n spacePanelIsActive: boolean\n spacePanelTransitionEndIsActive: boolean\n\n registry: {\n cloudBaseURL: string | null\n hasFetchedHello: boolean\n isHelloCallError: boolean | null\n hasFetchedInfo: boolean\n hostname: string\n isCloudEnabled: boolean | null\n isCloudAvailable: boolean | null\n isAgentClaimed: boolean | null\n isACLKAvailable: boolean | null\n hasStartedInfo: boolean\n fullInfoPayload: InfoPayload | null\n isFetchingHello: boolean\n machineGuid: string | null\n personGuid: string | null\n registryMachines: { [key: string]: RegistryMachine } | null\n registryMachinesArray: RegistryMachine[] | null\n registryServer: string | null\n }\n\n chartsMetadata: {\n isFetching: boolean\n isFetchingError: boolean\n data: null | ChartsMetadata\n }\n\n alarms: {\n activeAlarms: null | ActiveAlarms\n hasStartedAlarms: boolean\n }\n alarm: null | Alarm\n\n snapshot: Snapshot | null\n options: Options\n userNodeAccess: UserNodeAccessMessage\n}\n\nexport const initialDefaultAfter = isMainJs ? getInitialAfterFromWindow() : -900\n\nexport const initialState: StateT = {\n commonColorsKeys: {},\n commonMin: {},\n commonMax: {},\n currentSelectionMasterId: null,\n globalPanAndZoom: null,\n // todo for dashboard calculate it based on width and window.NETDATA.chartDefaults.after\n defaultAfter: initialDefaultAfter,\n globalChartUnderlay: null,\n hoveredX: null,\n hasWindowFocus: document.hasFocus(),\n globalPause: false,\n spacePanelIsActive: false, // set to true only for testing layout\n // the same as property above, just updated after transition ends\n spacePanelTransitionEndIsActive: false,\n\n registry: {\n cloudBaseURL: null,\n hasFetchedInfo: false,\n hasFetchedHello: false,\n isHelloCallError: null,\n hostname: \"unknown\",\n isCloudEnabled: null,\n isCloudAvailable: null,\n isAgentClaimed: null,\n isACLKAvailable: null,\n hasStartedInfo: false,\n isFetchingHello: false,\n fullInfoPayload: null,\n machineGuid: null,\n personGuid: null,\n registryMachines: null,\n registryMachinesArray: null,\n registryServer: null,\n },\n\n snapshot: null,\n alarms: {\n activeAlarms: null,\n hasStartedAlarms: false,\n },\n alarm: null,\n\n chartsMetadata: {\n isFetching: false,\n isFetchingError: false,\n data: null,\n },\n\n options: optionsMergedWithLocalStorage,\n userNodeAccess: null,\n}\n\nexport const globalReducer = createReducer<StateT>({}, initialState)\n\nexport interface GetKeyArguments {\n colorsAttribute: string | undefined\n commonColorsAttribute: string | undefined\n chartUuid: string\n chartContext: string\n}\nexport const getKeyForCommonColorsState = ({\n colorsAttribute,\n commonColorsAttribute,\n chartUuid,\n chartContext,\n}: GetKeyArguments) => {\n const hasCustomColors = typeof colorsAttribute === \"string\" && colorsAttribute.length > 0\n\n // when there's commonColors attribute, share the state between all charts with that attribute\n // if not, when there are custom colors, make each chart independent\n // if not, share the same state between charts with the same context\n return commonColorsAttribute || (hasCustomColors ? chartUuid : chartContext)\n}\n\nconst hasLastOnly = (array: string[]) => last(array) === \"ONLY\"\nconst removeLastOnly = (array: string[]) => (hasLastOnly(array) ? init(array) : array)\nconst createCommonColorsKeysSubstate = (\n colorsAttribute: string | undefined,\n hasCustomColors: boolean\n) => {\n const custom = hasCustomColors ? removeLastOnly((colorsAttribute as string).split(\" \")) : []\n const shouldCopyTheme = hasCustomColors\n ? // disable copyTheme when there's \"ONLY\" keyword in \"data-colors\" attribute\n !hasLastOnly((colorsAttribute as string).split(\" \"))\n : true\n const available = [\n ...custom,\n ...(shouldCopyTheme || custom.length === 0 ? window.NETDATA.themes.current.colors : []),\n ]\n return {\n assigned: {},\n available,\n custom,\n }\n}\n\nglobalReducer.on(\n requestCommonColorsAction,\n //@ts-ignore\n (state, { chartContext, chartUuid, colorsAttribute, commonColorsAttribute, dimensionNames }) => {\n const keyName = getKeyForCommonColorsState({\n colorsAttribute,\n commonColorsAttribute,\n chartUuid,\n chartContext,\n })\n\n const hasCustomColors = typeof colorsAttribute === \"string\" && colorsAttribute.length > 0\n const subState =\n state.commonColorsKeys[keyName] ||\n createCommonColorsKeysSubstate(colorsAttribute, hasCustomColors)\n\n const currentlyAssignedNr = Object.keys(subState.assigned).length\n const requestedDimensionsAssigned = mergeAll(\n dimensionNames\n // dont assign already assigned dimensions\n .filter(dimensionName => !subState.assigned[dimensionName])\n .map((dimensionName, i) => ({\n [dimensionName]:\n subState.available[(i + currentlyAssignedNr) % subState.available.length],\n }))\n )\n const assigned = {\n ...subState.assigned,\n ...requestedDimensionsAssigned,\n }\n\n return {\n ...state,\n commonColorsKeys: {\n ...state.commonColorsKeys,\n [keyName]: {\n ...subState,\n assigned,\n },\n },\n }\n }\n)\n\nglobalReducer.on(setCommonMinAction, (state, { chartUuid, commonMinKey, value }) => {\n const charts = {\n ...state.commonMin[commonMinKey]?.charts,\n [chartUuid]: value,\n }\n const currentExtreme = Math.min(...Object.values(charts))\n\n return {\n ...state,\n commonMin: {\n ...state.commonMin,\n [commonMinKey]: {\n charts,\n currentExtreme,\n },\n },\n }\n})\n\nglobalReducer.on(setCommonMaxAction, (state, { chartUuid, commonMaxKey, value }) => {\n const charts = {\n ...state.commonMax[commonMaxKey]?.charts,\n [chartUuid]: value,\n }\n const currentExtreme = Math.max(...Object.values(charts))\n\n return {\n ...state,\n commonMax: {\n ...state.commonMax,\n [commonMaxKey]: {\n charts,\n currentExtreme,\n },\n },\n }\n})\n\nglobalReducer.on(setSpacePanelStatusAction, (state, { isActive }) => ({\n ...state,\n spacePanelIsActive: isActive,\n}))\n\nglobalReducer.on(setSpacePanelTransitionEndAction, (state, { isActive }) => ({\n ...state,\n spacePanelTransitionEndIsActive: isActive,\n}))\n\nglobalReducer.on(setGlobalSelectionAction, (state, { chartUuid, hoveredX }) => ({\n ...state,\n hoveredX,\n currentSelectionMasterId: chartUuid,\n}))\n\nglobalReducer.on(setGlobalPanAndZoomAction, (state, payload) => ({\n ...state,\n globalPanAndZoom: payload,\n}))\n\nglobalReducer.on(resetGlobalPanAndZoomAction, state => ({\n ...state,\n globalPanAndZoom: initialState.globalPanAndZoom,\n hoveredX: initialState.hoveredX, // need to reset this also on mobile\n}))\n\nglobalReducer.on(setDefaultAfterAction, (state, { after }) => ({\n ...state,\n defaultAfter: after,\n}))\n\nglobalReducer.on(resetDefaultAfterAction, state => ({\n ...state,\n defaultAfter: initialState.defaultAfter,\n}))\n\nglobalReducer.on(setGlobalChartUnderlayAction, (state, { after, before, masterID }) => ({\n ...state,\n globalChartUnderlay: {\n after,\n before,\n masterID,\n },\n}))\n\nglobalReducer.on(centerAroundHighlightAction, state => {\n if (!state.globalChartUnderlay) {\n // eslint-disable-next-line no-console\n console.warn(\"Cannot center around empty selection\")\n return state\n }\n const { after, before } = state.globalChartUnderlay\n const highlightMargin = (before - after) / 2\n return {\n ...state,\n globalPanAndZoom: {\n after: after - highlightMargin,\n before: before + highlightMargin,\n },\n }\n})\n\nglobalReducer.on(\n clearHighlightAction,\n (state, { resetPanAndZoom = true }: { resetPanAndZoom?: boolean } = {}) => ({\n ...state,\n globalChartUnderlay: initialState.globalChartUnderlay,\n ...(resetPanAndZoom ? { globalPanAndZoom: initialState.globalPanAndZoom } : {}),\n })\n)\n\nglobalReducer.on(windowFocusChangeAction, (state, { hasWindowFocus }) => {\n // make additional check, because it's possible to get hasWindowFocus === false\n // message from iframe, after main window makes the state change (race condition)\n const hasFocusNow = document.hasFocus()\n return {\n ...state,\n hasWindowFocus: hasFocusNow || hasWindowFocus,\n }\n})\n\nglobalReducer.on(setGlobalPauseAction, state => ({ ...state, globalPause: true }))\nglobalReducer.on(resetGlobalPauseAction, (state, { forcePlay }) => ({\n ...state,\n globalPause: initialState.globalPause,\n globalPanAndZoom: initialState.globalPanAndZoom,\n hoveredX: initialState.hoveredX,\n options: { ...state.options, stop_updates_when_focus_is_lost: !forcePlay },\n}))\n\nglobalReducer.on(setUTCOffset, (state, { utcOffset }) => ({\n ...state,\n options: { ...state.options, utcOffset },\n}))\n\nglobalReducer.on(fetchHelloAction.request, state => ({\n ...state,\n registry: {\n ...state.registry,\n isFetchingHello: true,\n },\n}))\n\nglobalReducer.on(fetchHelloAction.success, (state, { cloudBaseURL, hostname, machineGuid }) => ({\n ...state,\n registry: {\n ...state.registry,\n cloudBaseURL,\n isFetchingHello: false,\n hasFetchedHello: true,\n hostname,\n machineGuid,\n },\n}))\nglobalReducer.on(fetchHelloAction.failure, state => ({\n ...state,\n registry: {\n ...state.registry,\n cloudBaseURL: CLOUD_BASE_URL_DISABLED,\n isFetchingHello: false,\n isHelloCallError: true,\n },\n}))\nglobalReducer.on(accessRegistrySuccessAction, (state, { registryServer }) => ({\n ...state,\n registry: {\n ...state.registry,\n registryServer,\n },\n}))\n\nglobalReducer.on(resetRegistry, state => ({\n ...state,\n registry: {\n ...state.registry,\n hasFetchedHello: initialState.registry.hasFetchedHello,\n },\n}))\n\nglobalReducer.on(fetchInfoAction, state => ({\n ...state,\n registry: {\n ...state.registry,\n hasStartedInfo: true,\n },\n}))\nglobalReducer.on(\n fetchInfoAction.success,\n (\n state,\n { isCloudAvailable, isCloudEnabled, isAgentClaimed, isACLKAvailable, fullInfoPayload }\n ) => ({\n ...state,\n registry: {\n ...state.registry,\n hasFetchedInfo: true,\n isCloudAvailable,\n isCloudEnabled,\n isAgentClaimed,\n isACLKAvailable,\n fullInfoPayload,\n },\n })\n)\n\nglobalReducer.on(fetchInfoAction.failure, state => ({\n ...state,\n registry: {\n ...state.registry,\n isCloudAvailable: false,\n isCloudEnabled: false,\n isAgentClaimed: false,\n isACLKAvailable: false,\n },\n}))\n\nglobalReducer.on(\n updatePersonUrlsAction,\n (state, { personGuid, registryMachines, registryMachinesArray }) => ({\n ...state,\n registry: {\n ...state.registry,\n personGuid,\n registryMachines,\n registryMachinesArray,\n },\n })\n)\n\nglobalReducer.on(startAlarmsAction, state => ({\n ...state,\n alarms: {\n ...state.alarms,\n hasStartedAlarms: true,\n },\n}))\n\nglobalReducer.on(updateActiveAlarmsAction, (state, { activeAlarms }) => ({\n ...state,\n alarms: {\n ...state.alarms,\n activeAlarms,\n },\n}))\n\nglobalReducer.on(setOptionAction, (state, { key, value }) => ({\n ...state,\n options: {\n ...state.options,\n [key]: value,\n },\n}))\n\nglobalReducer.on(resetOptionsAction, state => {\n clearLocalStorage()\n return {\n ...state,\n options: getOptionsMergedWithLocalStorage(),\n }\n})\n\nglobalReducer.on(loadSnapshotAction, (state, { snapshot }) => {\n const parsedData = Object.keys(snapshot.data)\n .map(dataKey => {\n let uncompressed\n try {\n // @ts-ignore\n uncompressed = snapshot.uncompress(snapshot.data[dataKey])\n\n // repeat old logging\n if (uncompressed === null) {\n // eslint-disable-next-line no-console\n console.warn(`uncompressed snapshot data for key ${dataKey} is null`)\n return null\n }\n\n if (typeof uncompressed === \"undefined\") {\n // eslint-disable-next-line no-console\n console.warn(`uncompressed snapshot data for key ${dataKey} is undefined`)\n return null\n }\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn(`decompression of snapshot data for key ${dataKey} failed`, e)\n uncompressed = null\n }\n\n if (typeof uncompressed !== \"string\") {\n // eslint-disable-next-line no-console\n console.warn(`uncompressed snapshot data for key ${dataKey} is not string`)\n return {}\n }\n\n let data\n try {\n data = JSON.parse(uncompressed)\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn(`parsing snapshot data for key ${dataKey} failed`)\n return {}\n }\n\n return { [dataKey]: data }\n })\n .reduce((acc, obj) => ({ ...acc, ...obj }), {})\n\n return {\n ...state,\n snapshot: {\n ...snapshot,\n data: parsedData as { [key: string]: unknown },\n },\n }\n})\n\nglobalReducer.on(setAlarmAction, (state, { alarm }) => ({\n ...state,\n alarm,\n}))\n\nglobalReducer.on(chartsMetadataRequestSuccess, (state, { data }) => ({\n ...state,\n chartsMetadata: {\n ...state.chartsMetadata,\n data,\n },\n}))\n\nglobalReducer.on(setUserNodeAccess, (state, { message }) => ({ ...state, userNodeAccess: message }))\n","import React from \"react\"\nimport classNames from \"classnames\"\n\n// todo add supoort for window.netdataIcons\nexport type IconType = \"left\" | \"reset\" | \"right\" | \"zoomIn\" | \"zoomOut\" | \"resize\" | \"lineChart\"\n | \"areaChart\" | \"noChart\" | \"loading\" | \"noData\"\nconst typeToClassName = (iconType: IconType) => ({\n left: \"fa-backward\",\n reset: \"fa-play\",\n right: \"fa-forward\",\n zoomIn: \"fa-plus\",\n zoomOut: \"fa-minus\",\n resize: \"fa-sort\",\n lineChart: \"fa-chart-line\",\n areaChart: \"fa-chart-area\",\n noChart: \"fa-chart-area\",\n loading: \"fa-sync-alt\",\n noData: \"fa-exclamation-triangle\",\n} as {[key in IconType]: string})[iconType]\n\ninterface Props {\n iconType: IconType\n}\nexport const Icon = ({ iconType }: Props) => (\n <i className={classNames(\"fas\", typeToClassName(iconType))} />\n)\n","import {\n map, omit, assoc, pick,\n} from \"ramda\"\nimport { createReducer } from \"redux-act\"\n\nimport { setOptionAction } from \"domains/global/actions\"\nimport { SYNC_PAN_AND_ZOOM } from \"domains/global/options\"\nimport { useNewKeysOnlyIfDifferent } from \"utils/utils\"\n\nimport {\n fetchDataAction,\n fetchChartAction,\n setResizeHeightAction,\n clearChartStateAction,\n fetchDataForSnapshotAction,\n snapshotExportResetAction,\n setChartPanAndZoomAction,\n resetChartPanAndZoomAction,\n fetchDataCancelAction,\n} from \"./actions\"\nimport { ChartState } from \"./chart-types\"\n\nexport type StateT = {\n [chartID: string]: ChartState\n}\n\nexport const initialState = {\n}\nexport const initialSingleState = {\n chartData: null,\n chartId: null,\n chartMetadata: null,\n chartPanAndZoom: null,\n fetchDataParams: {\n isRemotelyControlled: false,\n viewRange: null,\n },\n isFetchingData: false,\n isFetchDataFailure: false,\n isFetchDetailsFailure: false,\n isFetchingDetails: false,\n resizeHeight: null,\n\n snapshotDataIsFetching: false,\n snapshotDataIsError: false,\n snapshotData: null,\n viewRange: null,\n}\n\nexport const chartReducer = createReducer<StateT>(\n {},\n initialState,\n)\n\nexport const getSubstate = (state: StateT, id: string) => state[id] || initialSingleState\n\nchartReducer.on(fetchDataAction.request, (state, { chart, fetchDataParams, id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n chartId: chart,\n isFetchingData: true,\n viewRange: fetchDataParams.viewRange,\n },\n}))\n\nchartReducer.on(fetchDataCancelAction, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n isFetchingData: false,\n },\n}))\n\nchartReducer.on(fetchDataAction.failure, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n isFetchingData: false,\n isFetchDataFailure: true,\n },\n}))\n\nchartReducer.on(fetchDataAction.success, (state, { id, chartData, fetchDataParams }) => {\n const substate = getSubstate(state, id)\n return {\n ...state,\n [id]: {\n ...substate,\n chartData: useNewKeysOnlyIfDifferent([\"dimension_names\"], substate.chartData, chartData!),\n fetchDataParams,\n isFetchingData: false,\n isFetchDataFailure: false,\n viewRange: fetchDataParams.viewRange,\n },\n }\n})\n\n\nchartReducer.on(fetchDataForSnapshotAction.request, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n snapshotDataIsFetching: true,\n },\n}))\n\nchartReducer.on(fetchDataForSnapshotAction.failure, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n snapshotDataIsFetching: false,\n snapshotDataIsError: true,\n },\n}))\n\nchartReducer.on(fetchDataForSnapshotAction.success, (state, { id, snapshotData }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n snapshotDataIsFetching: false,\n snapshotDataIsError: false,\n snapshotData,\n },\n}))\n\nchartReducer.on(snapshotExportResetAction, (state) => map((substate) => ({\n ...substate,\n ...pick([\"snapshotDataIsFetching\", \"snapshotDataIsError\", \"snapshotData\"], initialSingleState),\n}), state))\n\n\nchartReducer.on(fetchChartAction.request, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n isFetchingDetails: true,\n },\n}))\n\nchartReducer.on(fetchChartAction.failure, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n isFetchDetailsFailure: true,\n },\n}))\n\nchartReducer.on(fetchChartAction.success, (state, { id, chartMetadata }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n chartMetadata,\n isFetchingDetails: false,\n isFetchDetailsFailure: false,\n },\n}))\n\n// todo handle errors without creating a loop\n// chartReducer.on(fetchChartAction.failure, (state, { id }) => ({\n// ...state,\n// [id]: {\n// ...getSubstate(state, id),\n// isFetchingDetails: false,\n// },\n// }))\n\nchartReducer.on(setResizeHeightAction, (state, { id, resizeHeight }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n resizeHeight,\n },\n}))\n\nchartReducer.on(setChartPanAndZoomAction, (state, {\n after, before, id, shouldForceTimeRange,\n}) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n chartPanAndZoom: { after, before, shouldForceTimeRange },\n },\n}))\n\nchartReducer.on(resetChartPanAndZoomAction, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n chartPanAndZoom: initialSingleState.chartPanAndZoom,\n },\n}))\n\nchartReducer.on(setOptionAction, (state, { key, value }) => {\n // clear chartPanAndZoom, when SYNC_PAN_AND_ZOOM flag is turned on\n if (key === SYNC_PAN_AND_ZOOM && value === true) {\n return map(\n assoc(\"chartPanAndZoom\", initialSingleState.chartPanAndZoom),\n state,\n )\n }\n return state\n})\n\nchartReducer.on(clearChartStateAction, (state, { id }) => omit([id], state))\n","import { mapObjIndexed, mergeAll, isEmpty } from \"ramda\"\nimport { Method } from \"axios\"\nimport { initialLegendRight } from \"domains/global/options\"\nimport { ChartLibraryName } from \"./chartLibrariesSettings\"\n\ntype OutputValue = string | boolean | number | null | undefined | any[]\n// almost the same as in old dashboard to ensure readers that it works the same way\nconst getDataAttribute = (element: Element, key: string, defaultValue?: OutputValue) => {\n const dataKey = `data-${key}`\n if (element.hasAttribute(dataKey)) {\n // we know it's not null because of hasAttribute()\n const data = element.getAttribute(dataKey) as string\n\n if (data === \"true\") {\n return true\n }\n if (data === \"false\") {\n return false\n }\n if (data === \"null\") {\n return null\n }\n\n // Only convert to a number if it doesn't change the string\n if (data === `${+data}`) {\n return +data\n }\n\n if (/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/.test(data)) {\n return JSON.parse(data)\n }\n\n return data\n }\n // if no default is passed, then it's undefined and can be replaced with default value later\n // it is recommended to do it in props destructuring assignment phase, ie.:\n // const Chart = ({ dygraphPointsize = 1 }) => ....\n return defaultValue\n}\n\nconst getDataAttributeBoolean = (element: Element, key: string, defaultValue?: boolean) => {\n const value = getDataAttribute(element, key, defaultValue)\n\n if (value === true || value === false) { // gmosx: Love this :)\n return value\n }\n\n if (typeof (value) === \"string\") {\n if (value === \"yes\" || value === \"on\") {\n return true\n }\n\n if (value === \"\" || value === \"no\" || value === \"off\" || value === \"null\") {\n return false\n }\n\n return defaultValue\n }\n\n if (typeof (value) === \"number\") {\n return value !== 0\n }\n\n return defaultValue\n}\n\ninterface BaseAttributeConfig {\n key: string\n defaultValue?: OutputValue\n}\ninterface BooleanAttributeConfig extends BaseAttributeConfig {\n type: \"boolean\"\n defaultValue?: boolean\n}\ntype AttributeConfig = BaseAttributeConfig | BooleanAttributeConfig\n\nexport interface StaticAttributes {\n id: string\n host?: string | undefined\n httpMethod?: Method\n title?: string\n chartLibrary: ChartLibraryName\n width: number | string | null\n height?: number | string | null\n after?: number\n before?: number\n legend?: boolean\n legendPosition?: \"bottom\" | \"right\"\n units?: string\n unitsCommon?: string\n unitsDesired?: string\n aggrMethod?: string\n labels?: {[key: string]: string}\n postGroupBy?: string\n dimensionsAggrMethod?: string\n postAggregationMethod?: string\n aggrGroups?: string[]\n selectedChart?: string\n filteredRows?: string[] | null\n groupBy?: string\n nodeIDs?: string[]\n colors?: string\n commonColors?: string\n decimalDigits?: number\n dimensions?: string\n selectedDimensions?: string[]\n forceTimeWindow?: boolean\n\n appendOptions?: string | undefined\n gtime?: number\n method?: string\n overrideOptions?: string\n pixelsPerPoint?: number\n points?: number\n heightId?: string\n hideResizeHandler?: boolean\n detectResize?: boolean\n commonMin?: string\n commonMax?: string\n\n dygraphType?: string\n dygraphValueRange?: any[]\n dygraphTheme?: string\n dygraphSmooth?: boolean\n dygraphColors?: string[]\n dygraphRightGap?: number\n dygraphShowRangeSelector?: boolean\n dygraphShowRoller?: boolean\n dygraphTitle?: string\n dygraphTitleHeight?: number\n dygraphLegend?: \"always\" | \"follow\" | \"onmouseover\" | \"never\"\n dygraphLabelsDiv?: string\n dygraphLabelsSeparateLine?: boolean\n dygraphIncludeZero?: boolean\n dygraphShowZeroValues?: boolean\n dygraphShowLabelsOnHighLight?: boolean\n dygraphHideOverlayOnMouseOut?: boolean\n dygraphXRangePad?: number\n dygraphYRangePad?: number\n dygraphYLabelWidth?: number\n dygraphStrokeWidth?: number\n dygraphStrokePattern?: number[]\n dygraphDrawPoints?: boolean\n dygraphDrawGapEdgePoints?: boolean\n dygraphConnectSeparatedPoints?: boolean\n dygraphPointSize?: number\n dygraphStepPlot?: boolean\n dygraphStrokeBorderColor?: string\n dygraphStrokeBorderWidth?: number\n dygraphFillGraph?: boolean\n dygraphFillAlpha?: number\n dygraphStackedGraph?: boolean\n dygraphStackedGraphNanFill?: string\n dygraphAxisLabelFontSize?: number\n dygraphAxisLineColor?: string\n dygraphAxisLineWidth?: number\n dygraphDrawGrid?: boolean\n dygraphGridLinePattern?: number[]\n dygraphGridLineWidth?: number\n dygraphGridLineColor?: string\n dygraphMaxNumberWidth?: number\n dygraphSigFigs?: number\n dygraphDigitsAfterDecimal?: number\n dygraphHighlighCircleSize?: number\n dygraphHighlightSeriesOpts?: {[options: string]: number}\n dygraphHighlightSeriesBackgroundAlpha?: number\n dygraphXPixelsPerLabel?: number\n dygraphXAxisLabelWidth?: number\n dygraphDrawXAxis?: boolean\n dygraphYPixelsPerLabel?: number\n dygraphYAxisLabelWidth?: number\n dygraphDrawYAxis?: boolean\n dygraphDrawAxis?: boolean\n\n easyPieChartMinValue?: number\n easyPieChartMaxValue?: number\n easyPieChartBarColor?: string\n easyPieChartTrackColor?: string\n easyPieChartScaleColor?: string,\n easyPieChartScaleLength?: number,\n easyPieChartLineCap?: string,\n easyPieChartLineWidth?: string,\n easyPieChartTrackWidth?: string,\n easyPieChartSize?: string,\n easyPieChartRotate?: number,\n easyPieChartAnimate?: string,\n easyPieChartEasing?: string,\n\n gaugeMinValue?: number,\n gaugeMaxValue?: number,\n gaugePointerColor?: string,\n gaugeStrokeColor?: string,\n gaugeStartColor?: string,\n gaugeStopColor?: string,\n gaugeGenerateGradient?: boolean | string[],\n\n sparklineType?: string,\n sparklineLineColor?: string,\n sparklineFillColor?: string,\n sparklineChartRangeMin?: string,\n sparklineChartRangeMax?: string,\n sparklineComposite?: string,\n sparklineEnableTagOptions?: string,\n sparklineTagOptionPrefix?: string,\n sparklineTagValuesAttribute?: string,\n sparklineDisableHiddenCheck?: string,\n sparklineDefaultPixelsPerValue?: string,\n sparklineSpotColor?: string,\n sparklineMinSpotColor?: string,\n sparklineMaxSpotColor?: string,\n sparklineSpotRadius?: string,\n sparklineValueSpots?: string,\n sparklineHighlightSpotColor?: string,\n sparklineHighlightLineColor?: string,\n sparklineLineWidth?: string,\n sparklineNormalRangeMin?: string,\n sparklineNormalRangeMax?: string,\n sparklineDrawNormalOnTop?: string,\n sparklineXvalues?: string,\n sparklineChartRangeClip?: string,\n sparklineChartRangeMinX?: string,\n sparklineChartRangeMaxX?: string,\n sparklineDisableInteraction?: boolean,\n sparklineDisableTooltips?: boolean,\n sparklineOnHover?: Function,\n sparklineDisableHighlight?: boolean,\n sparklineHighlightLighten?: string,\n sparklineHighlightColor?: string,\n sparklineTooltipContainer?: string,\n sparklineTooltipClassname?: string,\n sparklineTooltipFormat?: string,\n sparklineTooltipPrefix?: string,\n sparklineTooltipSuffix?: string,\n sparklineTooltipSkipNull?: boolean,\n sparklineTooltipValueLookups?: string,\n sparklineTooltipFormatFieldlist?: string,\n sparklineTooltipFormatFieldlistKey?: string,\n sparklineNumberFormatter?: (d: number) => string,\n sparklineNumberDigitGroupSep?: string,\n sparklineNumberDecimalMark?: string,\n sparklineNumberDigitGroupCount?: string,\n sparklineAnimatedZooms?: boolean,\n\n\n d3pieTitle?: string,\n d3pieSubtitle?: string,\n d3pieFooter?: string,\n d3pieTitleColor?: string,\n d3pieTitleFontsize?: string,\n d3pieTitleFontweight?: string,\n d3pieTitleFont?: string,\n d3PieSubtitleColor?: string,\n d3PieSubtitleFontsize?: string,\n d3PieSubtitleFontweight?: string,\n d3PieSubtitleFont?: string,\n d3PieFooterColor?: string,\n d3PieFooterFontsize?: string,\n d3PieFooterFontweight?: string,\n d3PieFooterFont?: string,\n d3PieFooterLocation?: string,\n d3PiePieinnerradius?: string,\n d3PiePieouterradius?: string,\n d3PieSortorder?: string,\n d3PieSmallsegmentgroupingEnabled?: boolean,\n d3PieSmallsegmentgroupingValue?: string,\n d3PieSmallsegmentgroupingValuetype?: string,\n d3PieSmallsegmentgroupingLabel?: string,\n d3PieSmallsegmentgroupingColor?: string,\n d3PieLabelsOuterFormat?: string,\n d3PieLabelsOuterHidewhenlessthanpercentage?: string,\n d3PieLabelsOuterPiedistance?: string,\n d3PieLabelsInnerFormat?: string,\n d3PieLabelsInnerHidewhenlessthanpercentage?: string,\n d3PieLabelsMainLabelColor?: string,\n d3PieLabelsMainLabelFont?: string,\n d3PieLabelsMainLabelFontsize?: string,\n d3PieLabelsMainLabelFontweight?: string,\n d3PieLabelsPercentageColor?: string,\n d3PieLabelsPercentageFont?: string,\n d3PieLabelsPercentageFontsize?: string,\n d3PieLabelsPercentageFontweight?: string,\n d3PieLabelsValueColor?: string,\n d3PieLabelsValueFont?: string,\n d3PieLabelsValueFontsize?: string,\n d3PieLabelsValueFontweight?: string,\n d3PieLabelsLinesEnabled?: boolean,\n d3PieLabelsLinesStyle?: string,\n d3PieLabelsLinesColor?: string,\n d3PieLabelsTruncationEnabled?: boolean,\n d3PieLabelsTruncationTruncatelength?: string,\n d3PieMiscColorsSegmentstroke?: string,\n d3PieMiscGradientEnabled?: boolean,\n d3PieMiscColorsPercentage?: string,\n d3PieMiscGradientColor?: string,\n d3PieCssprefix?: string,\n\n peityStrokeWidth?: number,\n\n textOnlyDecimalPlaces?: number,\n textOnlyPrefix?: string,\n textOnlySuffix?: string,\n}\n\nexport interface Attributes extends StaticAttributes {\n // changed structure compared to original dashboard.js (not flat list, but dynamic objects stored\n // in \"showValueOf\" property\n showValueOf?: { [key: string]: string }\n}\n\nexport interface ChartsAttributes {\n [chartID:string]: Attributes\n}\n\nexport type AttributePropKeys = keyof StaticAttributes\n\ntype AttributesMap = {\n [key in AttributePropKeys]: AttributeConfig\n}\n\n// needs to be a getter so all window.NETDATA settings are set\nconst getAttributesMap = (): AttributesMap => ({\n // all properties that don't have `defaultValue` should be \"| undefined\" in Attributes interface\n // todo try to write above rule in TS\n id: { key: \"netdata\" },\n host: { key: \"host\" },\n httpMethod: { key: \"http-method\" },\n title: { key: \"title\" },\n chartLibrary: { key: \"chart-library\", defaultValue: window.NETDATA.chartDefaults.library },\n width: { key: \"width\", defaultValue: window.NETDATA.chartDefaults.width },\n height: { key: \"height\", defaultValue: window.NETDATA.chartDefaults.height },\n // todo use chartDefaults for static custom dashboards\n // after: { key: \"after\", defaultValue: window.NETDATA.chartDefaults.after },\n after: { key: \"after\" },\n before: { key: \"before\", defaultValue: window.NETDATA.chartDefaults.before },\n legend: { key: \"legend\", type: \"boolean\", defaultValue: true },\n legendPosition: { key: \"legend-position\" },\n units: { key: \"units\" },\n unitsCommon: { key: \"common-units\" },\n unitsDesired: { key: \"desired-units\" },\n aggrMethod: { key: \"aggr-method\" },\n labels: { key: \"labels\" },\n postGroupBy: { key: \"post-group-by\" },\n postAggregationMethod: { key: \"post-aggregation-method\" },\n dimensionsAggrMethod: { key: \"dimensions-aggr-method\" },\n aggrGroups: { key: \"aggrGroups\" },\n selectedChart: { key: \"selected-chart\" },\n filteredRows: { key: \"filtered-rows\" },\n groupBy: { key: \"group-by\" },\n nodeIDs: { key: \"node-ids\" },\n colors: { key: \"colors\" },\n commonColors: { key: \"common-colors\" },\n decimalDigits: { key: \"decimal-digits\" },\n dimensions: { key: \"dimensions\" },\n selectedDimensions: { key: \"selected-dimensions\" },\n forceTimeWindow: { key: \"force-time-window\" },\n\n appendOptions: { key: \"append-options\" },\n gtime: { key: \"gtime\" },\n method: { key: \"method\" },\n overrideOptions: { key: \"override-options\" },\n pixelsPerPoint: { key: \"pixels-per-point\" },\n points: { key: \"points\" },\n heightId: { key: \"id\" },\n hideResizeHandler: { key: \"hide-resize-handler\" },\n detectResize: { key: \"detect-resize\" },\n commonMin: { key: \"common-min\" },\n commonMax: { key: \"common-max\" },\n\n // let's not put the default values here, because they will also be needed by the main Agent page\n // and the Cloud App\n dygraphType: { key: \"dygraph-type\" },\n dygraphValueRange: { key: \"dygraph-valuerange\" },\n dygraphTheme: { key: \"dygraph-theme\" },\n dygraphSmooth: { key: \"dygraph-smooth\", type: \"boolean\" },\n dygraphColors: { key: \"dygraph-colors\" }, // not working in original dashboard\n dygraphRightGap: { key: \"dygraph-rightgap\" },\n dygraphShowRangeSelector: { key: \"dygraph-showrangeselector\", type: \"boolean\" },\n dygraphShowRoller: { key: \"dygraph-showroller\", type: \"boolean\" },\n dygraphTitle: { key: \"dygraph-title\" },\n dygraphTitleHeight: { key: \"dygraph-titleheight\" },\n dygraphLegend: { key: \"dygraph-legend\" },\n dygraphLabelsDiv: { key: \"dygraph-labelsdiv\" },\n dygraphLabelsSeparateLine: { key: \"dygraph-labelsseparatelines\", type: \"boolean\" },\n dygraphIncludeZero: { key: \"dygraph-includezero\", type: \"boolean\" },\n dygraphShowZeroValues: { key: \"dygraph-labelsshowzerovalues\", type: \"boolean\" },\n dygraphShowLabelsOnHighLight: { key: \"dygraph-showlabelsonhighlight\", type: \"boolean\" },\n dygraphHideOverlayOnMouseOut: { key: \"dygraph-hideoverlayonmouseout\", type: \"boolean\" },\n dygraphXRangePad: { key: \"dygraph-xrangepad\" },\n dygraphYRangePad: { key: \"dygraph-yrangepad\" },\n dygraphYLabelWidth: { key: \"dygraph-ylabelwidth\" },\n dygraphStrokeWidth: { key: \"dygraph-strokewidth\" },\n dygraphStrokePattern: { key: \"dygraph-strokepattern\" },\n dygraphDrawPoints: { key: \"dygraph-drawpoints\", type: \"boolean\" },\n dygraphDrawGapEdgePoints: { key: \"dygraph-drawgapedgepoints\", type: \"boolean\" },\n dygraphConnectSeparatedPoints: { key: \"dygraph-connectseparatedpoints\", type: \"boolean\" },\n dygraphPointSize: { key: \"dygraph-pointsize\" },\n dygraphStepPlot: { key: \"dygraph-stepplot\", type: \"boolean\" },\n dygraphStrokeBorderColor: { key: \"dygraph-strokebordercolor\" },\n dygraphStrokeBorderWidth: { key: \"dygraph-strokeborderwidth\" },\n // it was not boolean in the old app, but that was most likely a bug\n dygraphFillGraph: { key: \"dygraph-fillgraph\", type: \"boolean\" },\n dygraphFillAlpha: { key: \"dygraph-fillalpha\" },\n // also originally not set as boolean\n dygraphStackedGraph: { key: \"dygraph-stackedgraph\", type: \"boolean\" },\n dygraphStackedGraphNanFill: { key: \"dygraph-stackedgraphnanfill\" },\n dygraphAxisLabelFontSize: { key: \"dygraph-axislabelfontsize\" },\n dygraphAxisLineColor: { key: \"dygraph-axislinecolor\" },\n dygraphAxisLineWidth: { key: \"dygraph-axislinewidth\" },\n dygraphDrawGrid: { key: \"dygraph-drawgrid\", type: \"boolean\" },\n dygraphGridLinePattern: { key: \"dygraph-gridlinepattern\" },\n dygraphGridLineWidth: { key: \"dygraph-gridlinewidth\" },\n dygraphGridLineColor: { key: \"dygraph-gridlinecolor\" },\n dygraphMaxNumberWidth: { key: \"dygraph-maxnumberwidth\" },\n dygraphSigFigs: { key: \"dygraph-sigfigs\" },\n dygraphDigitsAfterDecimal: { key: \"dygraph-digitsafterdecimal\" },\n // dygraphValueFormatter: { key: \"dygraph-valueformatter\" },\n dygraphHighlighCircleSize: { key: \"dygraph-highlightcirclesize\" },\n dygraphHighlightSeriesOpts: { key: \"dygraph-highlightseriesopts\" },\n dygraphHighlightSeriesBackgroundAlpha: { key: \"dygraph-highlightseriesbackgroundalpha\" },\n // dygraphPointClickCallback: { key: \"dygraph-pointclickcallback\" },\n dygraphXPixelsPerLabel: { key: \"dygraph-xpixelsperlabel\" },\n dygraphXAxisLabelWidth: { key: \"dygraph-xaxislabelwidth\" },\n dygraphDrawXAxis: { key: \"dygraph-drawxaxis\", type: \"boolean\" },\n dygraphYPixelsPerLabel: { key: \"dygraph-ypixelsperlabel\" },\n dygraphYAxisLabelWidth: { key: \"dygraph-yaxislabelwidth\" },\n dygraphDrawYAxis: { key: \"dygraph-drawyaxis\", type: \"boolean\" },\n dygraphDrawAxis: { key: \"dygraph-drawaxis\", type: \"boolean\" },\n\n easyPieChartMinValue: { key: \"easypiechart-min-value\" },\n easyPieChartMaxValue: { key: \"easypiechart-max-value\" },\n easyPieChartBarColor: { key: \"easypiechart-barcolor\" },\n easyPieChartTrackColor: { key: \"easypiechart-trackcolor\" },\n easyPieChartScaleColor: { key: \"easypiechart-scalecolor\" },\n easyPieChartScaleLength: { key: \"easypiechart-scalelength\" },\n easyPieChartLineCap: { key: \"easypiechart-linecap\" },\n easyPieChartLineWidth: { key: \"easypiechart-linewidth\" },\n easyPieChartTrackWidth: { key: \"easypiechart-trackwidth\" },\n easyPieChartSize: { key: \"easypiechart-size\" },\n easyPieChartRotate: { key: \"easypiechart-rotate\" },\n easyPieChartAnimate: { key: \"easypiechart-animate\" },\n easyPieChartEasing: { key: \"easypiechart-easing\" },\n\n gaugeMinValue: { key: \"gauge-min-value\" },\n gaugeMaxValue: { key: \"gauge-max-value\" },\n gaugePointerColor: { key: \"gauge-pointer-color\" },\n gaugeStrokeColor: { key: \"gauge-stroke-color\" },\n gaugeStartColor: { key: \"gauge-start-color\" },\n gaugeStopColor: { key: \"gauge-stop-color\" },\n gaugeGenerateGradient: { key: \"gauge-generate-gradient\" },\n\n sparklineType: { key: \"sparkline-type\" },\n sparklineLineColor: { key: \"sparkline-linecolor\" },\n sparklineFillColor: { key: \"sparkline-fillcolor\" },\n sparklineChartRangeMin: { key: \"sparkline-chartrangemin\" },\n sparklineChartRangeMax: { key: \"sparkline-chartrangemax\" },\n sparklineComposite: { key: \"sparkline-composite\" },\n sparklineEnableTagOptions: { key: \"sparkline-enabletagoptions\" },\n sparklineTagOptionPrefix: { key: \"sparkline-tagoptionprefix\" },\n sparklineTagValuesAttribute: { key: \"sparkline-tagvaluesattribute\" },\n sparklineDisableHiddenCheck: { key: \"sparkline-disablehiddencheck\" },\n sparklineDefaultPixelsPerValue: { key: \"sparkline-defaultpixelspervalue\" },\n sparklineSpotColor: { key: \"sparkline-spotcolor\" },\n sparklineMinSpotColor: { key: \"sparkline-minspotcolor\" },\n sparklineMaxSpotColor: { key: \"sparkline-maxspotcolor\" },\n sparklineSpotRadius: { key: \"sparkline-spotradius\" },\n sparklineValueSpots: { key: \"sparkline-valuespots\" },\n sparklineHighlightSpotColor: { key: \"sparkline-highlightspotcolor\" },\n sparklineHighlightLineColor: { key: \"sparkline-highlightlinecolor\" },\n sparklineLineWidth: { key: \"sparkline-linewidth\" },\n sparklineNormalRangeMin: { key: \"sparkline-normalrangemin\" },\n sparklineNormalRangeMax: { key: \"sparkline-normalrangemax\" },\n sparklineDrawNormalOnTop: { key: \"sparkline-drawnormalontop\" },\n sparklineXvalues: { key: \"sparkline-xvalues\" },\n sparklineChartRangeClip: { key: \"sparkline-chartrangeclip\" },\n sparklineChartRangeMinX: { key: \"sparkline-chartrangeminx\" },\n sparklineChartRangeMaxX: { key: \"sparkline-chartrangemaxx\" },\n sparklineDisableInteraction: { key: \"sparkline-disableinteraction\", type: \"boolean\" },\n sparklineDisableTooltips: { key: \"sparkline-disabletooltips\", type: \"boolean\" },\n sparklineOnHover: { key: \"sparkline-on-hover\" },\n sparklineDisableHighlight: { key: \"sparkline-disablehighlight\", type: \"boolean\" },\n sparklineHighlightLighten: { key: \"sparkline-highlightlighten\" },\n sparklineHighlightColor: { key: \"sparkline-highlightcolor\" },\n sparklineTooltipContainer: { key: \"sparkline-tooltipcontainer\" },\n sparklineTooltipClassname: { key: \"sparkline-tooltipclassname\" },\n sparklineTooltipFormat: { key: \"sparkline-tooltipformat\" },\n sparklineTooltipPrefix: { key: \"sparkline-tooltipprefix\" },\n sparklineTooltipSuffix: { key: \"sparkline-tooltipsuffix\" },\n sparklineTooltipSkipNull: { key: \"sparkline-tooltipskipnull\", type: \"boolean\" },\n sparklineTooltipValueLookups: { key: \"sparkline-tooltipvaluelookups\" },\n sparklineTooltipFormatFieldlist: { key: \"sparkline-tooltipformatfieldlist\" },\n sparklineTooltipFormatFieldlistKey: { key: \"sparkline-tooltipformatfieldlistkey\" },\n sparklineNumberFormatter: { key: \"sparkline-numberformatter\" },\n sparklineNumberDigitGroupSep: { key: \"sparkline-numberdigitgroupsep\" },\n sparklineNumberDecimalMark: { key: \"sparkline-numberdecimalmark\" },\n sparklineNumberDigitGroupCount: { key: \"sparkline-numberdigitgroupcount\" },\n sparklineAnimatedZooms: { key: \"sparkline-animatedzooms\", type: \"boolean\" },\n\n d3pieTitle: { key: \"d3pie-title\" },\n d3pieSubtitle: { key: \"d3pie-subtitle\" },\n d3pieFooter: { key: \"d3pie-footer\" },\n d3pieTitleColor: { key: \"d3pie-title-color\" },\n d3pieTitleFontsize: { key: \"d3pie-title-fontsize\" },\n d3pieTitleFontweight: { key: \"d3pie-title-fontweight\" },\n d3pieTitleFont: { key: \"d3pie-title-font\" },\n d3PieSubtitleColor: { key: \"d3pie-subtitle-color\" },\n d3PieSubtitleFontsize: { key: \"d3pie-subtitle-fontsize\" },\n d3PieSubtitleFontweight: { key: \"d3pie-subtitle-fontweight\" },\n d3PieSubtitleFont: { key: \"d3pie-subtitle-font\" },\n d3PieFooterColor: { key: \"d3pie-footer-color\" },\n d3PieFooterFontsize: { key: \"d3pie-footer-fontsize\" },\n d3PieFooterFontweight: { key: \"d3pie-footer-fontweight\" },\n d3PieFooterFont: { key: \"d3pie-footer-font\" },\n d3PieFooterLocation: { key: \"d3pie-footer-location\" },\n d3PiePieinnerradius: { key: \"d3pie-pieinnerradius\" },\n d3PiePieouterradius: { key: \"d3pie-pieouterradius\" },\n d3PieSortorder: { key: \"d3pie-sortorder\" },\n d3PieSmallsegmentgroupingEnabled: { key: \"d3pie-smallsegmentgrouping-enabled\", type: \"boolean\" },\n d3PieSmallsegmentgroupingValue: { key: \"d3pie-smallsegmentgrouping-value\" },\n d3PieSmallsegmentgroupingValuetype: { key: \"d3pie-smallsegmentgrouping-valuetype\" },\n d3PieSmallsegmentgroupingLabel: { key: \"d3pie-smallsegmentgrouping-label\" },\n d3PieSmallsegmentgroupingColor: { key: \"d3pie-smallsegmentgrouping-color\" },\n d3PieLabelsOuterFormat: { key: \"d3pie-labels-outer-format\" },\n d3PieLabelsOuterHidewhenlessthanpercentage: {\n key: \"d3pie-labels-outer-hidewhenlessthanpercentage\",\n },\n d3PieLabelsOuterPiedistance: { key: \"d3pie-labels-outer-piedistance\" },\n d3PieLabelsInnerFormat: { key: \"d3pie-labels-inner-format\" },\n d3PieLabelsInnerHidewhenlessthanpercentage: {\n key: \"d3pie-labels-inner-hidewhenlessthanpercentage\",\n },\n d3PieLabelsMainLabelColor: { key: \"d3pie-labels-mainLabel-color\" },\n d3PieLabelsMainLabelFont: { key: \"d3pie-labels-mainLabel-font\" },\n d3PieLabelsMainLabelFontsize: { key: \"d3pie-labels-mainLabel-fontsize\" },\n d3PieLabelsMainLabelFontweight: { key: \"d3pie-labels-mainLabel-fontweight\" },\n d3PieLabelsPercentageColor: { key: \"d3pie-labels-percentage-color\" },\n d3PieLabelsPercentageFont: { key: \"d3pie-labels-percentage-font\" },\n d3PieLabelsPercentageFontsize: { key: \"d3pie-labels-percentage-fontsize\" },\n d3PieLabelsPercentageFontweight: { key: \"d3pie-labels-percentage-fontweight\" },\n d3PieLabelsValueColor: { key: \"d3pie-labels-value-color\" },\n d3PieLabelsValueFont: { key: \"d3pie-labels-value-font\" },\n d3PieLabelsValueFontsize: { key: \"d3pie-labels-value-fontsize\" },\n d3PieLabelsValueFontweight: { key: \"d3pie-labels-value-fontweight\" },\n d3PieLabelsLinesEnabled: { key: \"d3pie-labels-lines-enabled\", type: \"boolean\" },\n d3PieLabelsLinesStyle: { key: \"d3pie-labels-lines-style\" },\n d3PieLabelsLinesColor: { key: \"d3pie-labels-lines-color\" },\n d3PieLabelsTruncationEnabled: { key: \"d3pie-labels-truncation-enabled\", type: \"boolean\" },\n d3PieLabelsTruncationTruncatelength: { key: \"d3pie-labels-truncation-truncatelength\" },\n d3PieMiscColorsSegmentstroke: { key: \"d3pie-misc-colors-segmentstroke\" },\n d3PieMiscGradientEnabled: { key: \"d3pie-misc-gradient-enabled\", type: \"boolean\" },\n d3PieMiscColorsPercentage: { key: \"d3pie-misc-colors-percentage\" },\n d3PieMiscGradientColor: { key: \"d3pie-misc-gradient-color\" },\n d3PieCssprefix: { key: \"d3pie-cssprefix\" },\n\n peityStrokeWidth: { key: \"peity-strokewidth\" },\n\n textOnlyDecimalPlaces: { key: \"textonly-decimal-places\" },\n textOnlyPrefix: { key: \"textonly-prefix\" },\n textOnlySuffix: { key: \"textonly-suffix\" },\n})\n\nexport const getAttributesStatic = (node: Element): Attributes => mapObjIndexed(\n (attribute: AttributeConfig) => (\n (attribute as BooleanAttributeConfig).type === \"boolean\"\n ? getDataAttributeBoolean(\n node,\n attribute.key,\n attribute.defaultValue as BooleanAttributeConfig[\"defaultValue\"],\n ) : getDataAttribute(node, attribute.key, attribute.defaultValue)\n ),\n getAttributesMap(),\n) as Attributes // need to override because of broken Ramda typings\n\nexport const getAttributesDynamic = (node: Element) => {\n const showValueOfAttribues = Array.from(node.attributes)\n .filter((attribute) => attribute.name.startsWith(\"data-show-value-of\"))\n .map((attribute) => ({\n [attribute.name.replace(\"data-\", \"\")]: attribute.value,\n }))\n const merged = mergeAll(showValueOfAttribues)\n return isEmpty(merged) ? undefined : merged\n}\n\nexport const getAttributes = (node: Element): Attributes => {\n const attributesStatic = getAttributesStatic(node)\n const showValueOf = getAttributesDynamic(node)\n return { ...attributesStatic, showValueOf }\n}\n\nexport const defaultAttributes: Partial<Attributes> = {\n legendPosition: initialLegendRight ? \"right\" : \"bottom\",\n}\n","import { createAction } from \"redux-act\"\nimport { CancelTokenSource, Method } from \"axios\"\n\nimport { createRequestAction } from \"utils/createRequestAction\"\nimport { InfoPayload } from \"domains/global/__mocks__/info-mock\"\n\nimport { storeKey } from \"./constants\"\nimport { ChartData, ChartMetadata } from \"./chart-types\"\n\nexport interface UpdateChartDataAction {\n chartData: ChartData\n id: string\n}\nexport const updateChartDataAction = createAction<UpdateChartDataAction>(\n `${storeKey}/updateChartData`,\n)\n\nexport interface UpdateChartMetadataAction {\n chartMetadata: ChartMetadata\n id: string\n}\nexport const updateChartMetadataAction = createAction<UpdateChartMetadataAction>(\n `${storeKey}/updateChartMetadata`,\n)\n\nexport interface FetchDataParams {\n fillMissingPoints?: number\n isRemotelyControlled: boolean\n viewRange: [number, number]\n}\nexport interface FetchDataUrlParams {\n host: string\n chart: string\n context: string\n format: string\n points: number\n group: string\n gtime: number\n options: string\n after: number | null\n before?: number | null\n dimensions?: string\n labels?: {[key: string]: string}\n postGroupBy?: string\n postAggregationMethod?: string\n aggrMethod?: string\n aggrGroups?: string[]\n dimensionsAggrMethod?: string\n nodeIDs?: string[]\n httpMethod?: Method\n groupBy?: string\n}\nexport interface FetchDataPayload extends FetchDataUrlParams {\n id: string,\n fetchDataParams: FetchDataParams\n cancelTokenSource: CancelTokenSource\n}\n\nexport const fetchDataAction = createRequestAction<\n FetchDataPayload,\n { id: string, chartData: ChartData, fetchDataParams: FetchDataParams }\n>(`${storeKey}/fetchDataAction`)\n\n\nexport interface FetchDataCancelAction { id: string }\nexport const fetchDataCancelAction = createAction<FetchDataCancelAction>(\n `${storeKey}/fetchDataCancelAction`,\n)\n\nexport interface FetchDataForSnapshotPayload extends FetchDataUrlParams {\n chartLibrary: string\n id: string\n}\nexport const fetchDataForSnapshotAction = createRequestAction<\n FetchDataForSnapshotPayload,\n { id: string, snapshotData: ChartData }\n>(`${storeKey}/fetchDataForSnapshotAction`)\n\nexport const snapshotExportResetAction = createRequestAction(\n `${storeKey}/snapshotExportResetAction`,\n)\n\nexport interface FetchChartPayload {\n chart: string\n id: string\n host: string\n nodeIDs?: string[]\n}\n\nexport const fetchChartAction = createRequestAction<\n FetchChartPayload,\n { chartMetadata: ChartMetadata, id: string }\n>(`${storeKey}/fetchChartAction`)\n\n\nexport interface SetResizeHeightAction {\n id: string\n resizeHeight: number\n}\nexport const setResizeHeightAction = createAction<SetResizeHeightAction>(\n `${storeKey}/setResizeHeight`,\n)\n\nexport interface SetChartPanAndZoomAction {\n id: string\n after: number\n before: number\n shouldForceTimeRange?: boolean\n}\nexport const setChartPanAndZoomAction = createAction<SetChartPanAndZoomAction>(\n `${storeKey}/setChartPanAndZoom`,\n)\n\nexport const resetChartPanAndZoomAction = createAction<{ id: string }>(\n `${storeKey}/resetChartPanAndZoomAction`,\n)\n\nexport const clearChartStateAction = createAction<{ id: string }>(\n `${storeKey}/clearChartStateAction`,\n)\n\nexport interface FetchInfoPayload {\n poll?: boolean\n}\nexport interface FetchInfoSuccessPayload {\n isCloudAvailable: boolean\n isCloudEnabled: boolean\n isAgentClaimed: boolean\n isACLKAvailable: boolean\n fullInfoPayload: InfoPayload\n}\nexport const fetchInfoAction = createRequestAction<\n FetchInfoPayload,\n FetchInfoSuccessPayload\n>(`${storeKey}/fetchInfoAction`)\n","export const SIGN_IN_IFRAME_ID = \"sign_in_iframe\"\n","/* eslint-disable */\n// Main JavaScript file for the Netdata GUI.\n\n// Codacy declarations\n/* global NETDATA */\n\nimport { identity, memoizeWith } from \"ramda\"\nimport {\n centerAroundHighlightAction,\n chartsMetadataRequestSuccess,\n clearHighlightAction,\n fetchAllAlarmsAction,\n loadSnapshotAction,\n resetGlobalPanAndZoomAction,\n resetOptionsAction,\n resetRegistry,\n setDefaultAfterAction,\n setGlobalChartUnderlayAction,\n setGlobalPanAndZoomAction,\n setOptionAction,\n} from './domains/global/actions';\nimport {\n createSelectOption,\n selectDefaultAfter,\n selectGlobalPanAndZoom,\n selectRegistry,\n} from \"./domains/global/selectors\"\nimport { seconds4human } from './domains/chart/utils/seconds4human';\nimport { zeropad } from './utils/units-conversion';\nimport {\n explicitlySignInAction,\n startSnapshotModeAction,\n stopSnapshotModeAction,\n} from './domains/dashboard/actions';\nimport { snapshotExportResetAction } from './domains/chart/actions';\nimport {\n selectAmountOfCharts,\n selectAmountOfSnapshotsFailed,\n selectAmountOfSnapshotsFetched,\n} from './domains/chart/selectors';\nimport { serverDefault } from './utils/server-detection';\nimport { name2id } from './utils/name-2-id';\nimport { isProperTimezone } from './utils/date-time';\nimport { NETDATA_REGISTRY_SERVER } from './utils';\nimport { getHashParam } from 'utils/hash-utils';\nimport { isDemo } from \"./utils/is-demo\"\nimport { LEGEND_BOTTOM_SINGLE_LINE_HEIGHT } from './domains/chart/utils/legend-utils';\nimport { defaultAttributes } from './domains/chart/utils/transformDataAttributes';\n\n// this is temporary, hook will be used after the full main.js refactor\nlet localeDateString, localeTimeString\nexport const updateLocaleFunctions = ({\n localeDateString: newLocaleDateString,\n localeTimeString: newLocaleTimeString,\n}) => {\n localeDateString = newLocaleDateString\n localeTimeString = newLocaleTimeString\n}\n\n// enable alarms checking and notifications\nvar netdataShowAlarms = true;\n\n// enable registry updates\nvar netdataRegistry = true;\n\n// forward definition only - not used here\nvar netdataServer = undefined;\nvar netdataServerStatic = undefined;\nvar netdataCheckXSS = undefined;\n\nlet reduxStore\n\nfunction escapeUserInputHTML(s) {\n return s.toString()\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"')\n .replace(/#/g, '#')\n .replace(/'/g, ''')\n .replace(/\\(/g, '(')\n .replace(/\\)/g, ')')\n .replace(/\\//g, '/');\n}\n\nconst setOption = (key, value) => {\n reduxStore.dispatch(setOptionAction({\n key,\n value,\n }))\n}\n\n// temporary function that will be removed after full main.js migration to react\nconst getFromRegistry = (prop) => {\n const registry = selectRegistry(reduxStore.getState())\n return registry?.[prop]\n}\n\nfunction verifyURL(s) {\n if (typeof (s) === 'string' && (s.startsWith('http://') || s.startsWith('https://'))) {\n return s\n .replace(/'/g, '%22')\n .replace(/\"/g, '%27')\n .replace(/\\)/g, '%28')\n .replace(/\\(/g, '%29');\n }\n\n console.log('invalid URL detected:');\n console.log(s);\n return 'javascript:alert(\"invalid url\");';\n}\n\n// --------------------------------------------------------------------\n// urlOptions\n\nwindow.urlOptions = {\n hash: '#',\n theme: null,\n help: null,\n mode: 'live', // 'live', 'print'\n update_always: false,\n pan_and_zoom: false,\n server: null,\n after: getHashParam('after') ?? 0,\n before: getHashParam('before') ?? 0,\n highlight: false,\n highlight_after: 0,\n highlight_before: 0,\n nowelcome: false,\n show_alarms: false,\n chart: null,\n family: null,\n alarm: null,\n utc: null,\n\n hasProperty: function (property) {\n // console.log('checking property ' + property + ' of type ' + typeof(this[property]));\n return typeof this[property] !== 'undefined';\n },\n\n genHash: function (forReload) {\n var hash = urlOptions.hash;\n\n hash += ';after=' + urlOptions.after.toString() +\n ';before=' + urlOptions.before.toString();\n\n if (urlOptions.highlight === true) {\n hash += ';highlight_after=' + urlOptions.highlight_after.toString() +\n ';highlight_before=' + urlOptions.highlight_before.toString();\n }\n\n if (urlOptions.theme !== null) {\n hash += ';theme=' + urlOptions.theme.toString();\n }\n\n if (urlOptions.help !== null) {\n hash += ';help=' + urlOptions.help.toString();\n }\n\n if (urlOptions.update_always === true) {\n hash += ';update_always=true';\n }\n\n if (forReload === true && urlOptions.server !== null) {\n hash += ';server=' + urlOptions.server.toString();\n }\n\n if (urlOptions.mode !== 'live') {\n hash += ';mode=' + urlOptions.mode;\n }\n\n if (urlOptions.utc !== null) {\n hash += ';utc=' + urlOptions.utc;\n }\n\n return hash;\n },\n\n parseHash: function () {\n var variables = document.location.hash.split(';');\n var len = variables.length;\n while (len--) {\n if (len !== 0) {\n var p = variables[len].split('=');\n if (urlOptions.hasProperty(p[0]) && typeof p[1] !== 'undefined') {\n urlOptions[p[0]] = decodeURIComponent(p[1]);\n }\n } else {\n if (variables[len].length > 0) {\n urlOptions.hash = variables[len];\n }\n }\n }\n\n var booleans = ['nowelcome', 'show_alarms', 'update_always'];\n len = booleans.length;\n while (len--) {\n if (urlOptions[booleans[len]] === 'true' || urlOptions[booleans[len]] === true || urlOptions[booleans[len]] === '1' || urlOptions[booleans[len]] === 1) {\n urlOptions[booleans[len]] = true;\n } else {\n urlOptions[booleans[len]] = false;\n }\n }\n\n var numeric = ['after', 'before', 'highlight_after', 'highlight_before'];\n len = numeric.length;\n while (len--) {\n if (typeof urlOptions[numeric[len]] === 'string') {\n try {\n urlOptions[numeric[len]] = parseInt(urlOptions[numeric[len]]);\n }\n catch (e) {\n console.log('failed to parse URL hash parameter ' + numeric[len]);\n urlOptions[numeric[len]] = 0;\n }\n }\n }\n\n if (urlOptions.server !== null && urlOptions.server !== '') {\n netdataServerStatic = document.location.origin.toString() + document.location.pathname.toString();\n netdataServer = urlOptions.server;\n netdataCheckXSS = true;\n } else {\n urlOptions.server = null;\n }\n\n if (urlOptions.before > 0 && urlOptions.after > 0) {\n urlOptions.pan_and_zoom = true;\n urlOptions.nowelcome = true;\n } else {\n urlOptions.pan_and_zoom = false;\n }\n\n if (urlOptions.highlight_before > 0 && urlOptions.highlight_after > 0) {\n urlOptions.highlight = true;\n } else {\n urlOptions.highlight = false;\n }\n\n switch (urlOptions.mode) {\n case 'print':\n urlOptions.theme = 'white';\n urlOptions.welcome = false;\n urlOptions.help = false;\n urlOptions.show_alarms = false;\n\n if (urlOptions.pan_and_zoom === false) {\n urlOptions.pan_and_zoom = true;\n urlOptions.before = Date.now();\n const fallbackAfter = -600000\n const defaultAfter = urlOptions.after ? urlOptions.after * 1000 : fallbackAfter\n urlOptions.after = urlOptions.before + defaultAfter;\n }\n\n netdataShowAlarms = false;\n netdataRegistry = false;\n break;\n\n case 'live':\n default:\n urlOptions.mode = 'live';\n break;\n }\n\n // console.log(urlOptions);\n },\n\n hashUpdate: function () {\n history.replaceState(null, '', urlOptions.genHash(true));\n },\n\n netdataPanAndZoomCallback: function (status, after, before) {\n if (netdataSnapshotData === null) {\n urlOptions.pan_and_zoom = status;\n urlOptions.after = after;\n urlOptions.before = before;\n }\n },\n\n updateUtcParam: function (utc) {\n if (!utc) return\n urlOptions.utc = utc\n urlOptions.hashUpdate();\n },\n\n netdataHighlightCallback: function (status, after, before) {\n if (status === true && (after === null || before === null || after <= 0 || before <= 0 || after >= before)) {\n status = false;\n after = 0;\n before = 0;\n }\n\n if (window.netdataSnapshotData === null) {\n urlOptions.highlight = status;\n } else {\n urlOptions.highlight = false;\n }\n\n urlOptions.highlight_after = Math.round(after);\n urlOptions.highlight_before = Math.round(before);\n urlOptions.hashUpdate();\n\n if (status === true && after > 0 && before > 0 && after < before) {\n var d1 = localeDateString(after);\n var d2 = localeDateString(before);\n if (d1 === d2) {\n d2 = '';\n }\n document.getElementById('navbar-highlight-content').innerHTML =\n '<span class=\"navbar-highlight-bar highlight-tooltip\" onclick=\"urlOptions.showHighlight();\" title=\"restore the highlighted view\" data-toggle=\"tooltip\" data-placement=\"bottom\">'\n + 'highlighted time-frame'\n + ' <b>' + d1 + ' <code>' + localeTimeString(after) + '</code></b> to '\n + ' <b>' + d2 + ' <code>' + localeTimeString(before) + '</code></b>, '\n + 'duration <b>' + seconds4human(Math.round((before - after) / 1000)) + '</b>'\n + '</span>'\n + '<span class=\"navbar-highlight-button-right highlight-tooltip\" onclick=\"urlOptions.clearHighlight();\" title=\"clear the highlighted time-frame\" data-toggle=\"tooltip\" data-placement=\"bottom\"><i class=\"fas fa-times\"></i></span>';\n\n $('.navbar-highlight').show();\n $('.navbar-highlight').width(\"80%\");\n $('.highlight-tooltip').tooltip({\n html: true,\n delay: { show: 500, hide: 0 },\n container: 'body'\n });\n } else {\n $('.navbar-highlight').hide();\n $('.navbar-highlight').width(\"100%\");\n }\n },\n\n clearHighlight: function () {\n reduxStore.dispatch(clearHighlightAction())\n },\n\n showHighlight: function () {\n reduxStore.dispatch(centerAroundHighlightAction())\n }\n};\n\nurlOptions.parseHash();\n\n// --------------------------------------------------------------------\n// check options that should be processed before loading netdata.js\n\nvar localStorageTested = -1;\n\nfunction localStorageTest() {\n if (localStorageTested !== -1) {\n return localStorageTested;\n }\n\n if (typeof Storage !== \"undefined\" && typeof localStorage === 'object') {\n var test = 'test';\n try {\n localStorage.setItem(test, test);\n localStorage.removeItem(test);\n localStorageTested = true;\n }\n catch (e) {\n console.log(e);\n localStorageTested = false;\n }\n } else {\n localStorageTested = false;\n }\n\n return localStorageTested;\n}\n\nfunction loadLocalStorage(name) {\n var ret = null;\n\n try {\n if (localStorageTest() === true) {\n ret = localStorage.getItem(name);\n } else {\n console.log('localStorage is not available');\n }\n }\n catch (error) {\n console.log(error);\n return null;\n }\n\n if (typeof ret === 'undefined' || ret === null) {\n return null;\n }\n\n // console.log('loaded: ' + name.toString() + ' = ' + ret.toString());\n\n return ret;\n}\n\nfunction saveLocalStorage(name, value) {\n // console.log('saving: ' + name.toString() + ' = ' + value.toString());\n try {\n if (localStorageTest() === true) {\n localStorage.setItem(name, value.toString());\n return true;\n }\n }\n catch (error) {\n console.log(error);\n }\n\n return false;\n}\n\nfunction getTheme(def) {\n if (urlOptions.mode === 'print') {\n return 'white';\n }\n\n var ret = loadLocalStorage('netdataTheme');\n if (typeof ret === 'undefined' || ret === null || ret === 'undefined') {\n return def;\n } else {\n return ret;\n }\n}\n\nfunction setTheme(theme) {\n if (urlOptions.mode === 'print') {\n return false;\n }\n\n if (theme === netdataTheme) {\n return false;\n }\n return saveLocalStorage('netdataTheme', theme);\n}\n\nwindow.netdataTheme = getTheme('slate');\n// this is of course temporary, will be fixed during complete main.js rewrite\nNETDATA.updateTheme()\nvar netdataShowHelp = true;\n\nif (urlOptions.theme !== null) {\n setTheme(urlOptions.theme);\n netdataTheme = urlOptions.theme;\n window.NETDATA.updateTheme()\n} else {\n urlOptions.theme = netdataTheme;\n}\n\nif (urlOptions.help !== null) {\n saveLocalStorage('options.show_help', urlOptions.help);\n netdataShowHelp = urlOptions.help;\n} else {\n urlOptions.help = loadLocalStorage('options.show_help');\n}\n\n// --------------------------------------------------------------------\n// natural sorting\n// http://www.davekoelle.com/files/alphanum.js - LGPL\n\nfunction naturalSortChunkify(t) {\n var tz = [];\n var x = 0, y = -1, n = 0, i, j;\n\n while (i = (j = t.charAt(x++)).charCodeAt(0)) {\n var m = (i >= 48 && i <= 57);\n if (m !== n) {\n tz[++y] = \"\";\n n = m;\n }\n tz[y] += j;\n }\n\n return tz;\n}\n\nfunction naturalSortCompare(a, b) {\n var aa = naturalSortChunkify(a.toLowerCase());\n var bb = naturalSortChunkify(b.toLowerCase());\n\n for (var x = 0; aa[x] && bb[x]; x++) {\n if (aa[x] !== bb[x]) {\n var c = Number(aa[x]), d = Number(bb[x]);\n if (c.toString() === aa[x] && d.toString() === bb[x]) {\n return c - d;\n } else {\n return (aa[x] > bb[x]) ? 1 : -1;\n }\n }\n }\n\n return aa.length - bb.length;\n}\n\n// --------------------------------------------------------------------\n// saving files to client\n\nfunction saveTextToClient(data, filename) {\n var blob = new Blob([data], {\n type: 'application/octet-stream'\n });\n\n var url = URL.createObjectURL(blob);\n var link = document.createElement('a');\n link.setAttribute('href', url);\n link.setAttribute('download', filename);\n\n var el = document.getElementById('hiddenDownloadLinks');\n el.innerHTML = '';\n el.appendChild(link);\n\n setTimeout(function () {\n el.removeChild(link);\n URL.revokeObjectURL(url);\n }, 60);\n\n link.click();\n}\n\nfunction saveObjectToClient(data, filename) {\n saveTextToClient(JSON.stringify(data), filename);\n}\n\nfunction netdataURL(url, forReload) {\n if (typeof url === 'undefined')\n // url = document.location.toString();\n {\n url = '';\n }\n\n if (url.indexOf('#') !== -1) {\n url = url.substring(0, url.indexOf('#'));\n }\n\n var hash = urlOptions.genHash(forReload);\n\n // console.log('netdataURL: ' + url + hash);\n\n return url + hash;\n}\n\nfunction netdataReload(url) {\n document.location = verifyURL(netdataURL(url, true));\n\n // since we play with hash\n // this is needed to reload the page\n location.reload();\n}\n\nwindow.gotoHostedModalHandler = (url) => {\n document.location = verifyURL(url + urlOptions.genHash());\n return false;\n}\n\nvar gotoServerValidateRemaining = 0;\nvar gotoServerMiddleClick = false;\nvar gotoServerStop = false;\n\nfunction gotoServerValidateUrl(id, guid, url) {\n var penalty = 0;\n var error = 'failed';\n\n if (document.location.toString().startsWith('http://') && url.toString().startsWith('https://'))\n // we penalize https only if the current url is http\n // to allow the user walk through all its servers.\n {\n penalty = 500;\n } else if (document.location.toString().startsWith('https://') && url.toString().startsWith('http://')) {\n error = 'can\\'t check';\n }\n\n var finalURL = netdataURL(url);\n\n setTimeout(function () {\n document.getElementById('gotoServerList').innerHTML += '<tr><td style=\"padding-left: 20px;\"><a href=\"' + verifyURL(finalURL) + '\" target=\"_blank\">' + escapeUserInputHTML(url) + '</a></td><td style=\"padding-left: 30px;\"><code id=\"' + guid + '-' + id + '-status\">checking...</code></td></tr>';\n\n NETDATA.registryHello(url, function (data) {\n if (typeof data !== 'undefined' && data !== null && typeof data.machine_guid === 'string' && data.machine_guid === guid) {\n // console.log('OK ' + id + ' URL: ' + url);\n document.getElementById(guid + '-' + id + '-status').innerHTML = \"OK\";\n\n if (!gotoServerStop) {\n gotoServerStop = true;\n\n if (gotoServerMiddleClick) {\n window.open(verifyURL(finalURL), '_blank');\n gotoServerMiddleClick = false;\n const registryMachines = getFromRegistry(\"registryMachines\");\n document.getElementById('gotoServerResponse').innerHTML = '<b>Opening new window to ' + registryMachines[guid].name + '<br/><a href=\"' + verifyURL(finalURL) + '\">' + escapeUserInputHTML(url) + '</a></b><br/>(check your pop-up blocker if it fails)';\n } else {\n document.getElementById('gotoServerResponse').innerHTML += 'found it! It is at:<br/><small>' + escapeUserInputHTML(url) + '</small>';\n document.location = verifyURL(finalURL);\n $('#gotoServerModal').modal('hide');\n }\n }\n } else {\n if (typeof data !== 'undefined' && data !== null && typeof data.machine_guid === 'string' && data.machine_guid !== guid) {\n error = 'wrong machine';\n }\n\n document.getElementById(guid + '-' + id + '-status').innerHTML = error;\n gotoServerValidateRemaining--;\n if (gotoServerValidateRemaining <= 0) {\n gotoServerMiddleClick = false;\n document.getElementById('gotoServerResponse').innerHTML = '<b>Sorry! I cannot find any operational URL for this server</b>';\n }\n }\n });\n }, (id * 50) + penalty);\n}\n\nwindow.gotoServerModalHandler = function gotoServerModalHandler(guid) {\n // console.log('goto server: ' + guid);\n\n gotoServerStop = false;\n var checked = {};\n const registryMachines = getFromRegistry(\"registryMachines\");\n var len = registryMachines[guid].alternateUrls.length;\n var count = 0;\n\n document.getElementById('gotoServerResponse').innerHTML = '';\n document.getElementById('gotoServerList').innerHTML = '';\n document.getElementById('gotoServerName').innerHTML = registryMachines[guid].name;\n $('#gotoServerModal').modal('show');\n\n gotoServerValidateRemaining = len;\n while (len--) {\n var url = registryMachines[guid].alternateUrls[len];\n checked[url] = true;\n gotoServerValidateUrl(count++, guid, url);\n }\n\n // When the registry is enabled, if the user's known URLs are not working\n // we consult the registry to get additional URLs.\n setTimeout(function () {\n if (gotoServerStop === false) {\n document.getElementById('gotoServerResponse').innerHTML = '<b>Added all the known URLs for this machine.</b>';\n NETDATA.registrySearch(guid, getFromRegistry, function (data) {\n // console.log(data);\n len = data.urls.length;\n while (len--) {\n var url = data.urls[len][1];\n // console.log(url);\n if (typeof checked[url] === 'undefined') {\n gotoServerValidateRemaining++;\n checked[url] = true;\n gotoServerValidateUrl(count++, guid, url);\n }\n }\n });\n }\n }, 2000);\n\n return false;\n}\n\nwindow.switchRegistryModalHandler = () => {\n document.getElementById('switchRegistryPersonGUID').value = getFromRegistry(\"personGuid\");\n document.getElementById('switchRegistryURL').innerHTML = getFromRegistry(\"registryServer\");\n document.getElementById('switchRegistryResponse').innerHTML = '';\n $('#switchRegistryModal').modal('show');\n};\n\nwindow.notifyForSwitchRegistry = () => {\n // it's just old code, with minimal changes\n const newPersonGuid = document.getElementById('switchRegistryPersonGUID').value;\n\n if (newPersonGuid !== '' && newPersonGuid.length === 36) {\n\n $.ajax({\n url: getFromRegistry(\"registryServer\") + '/api/v1/registry?action=switch&machine='\n + getFromRegistry(\"machineGuid\") + '&name='\n + encodeURIComponent(getFromRegistry(\"hostname\")) + '&url='\n + encodeURIComponent(serverDefault) + '&to=' + newPersonGuid,\n async: true,\n cache: false,\n headers: {\n 'Cache-Control': 'no-cache, no-store',\n 'Pragma': 'no-cache'\n },\n xhrFields: {withCredentials: true} // required for the cookie\n })\n .done(function (data) {\n data = NETDATA.xss.checkAlways('/api/v1/registry?action=switch', data);\n\n if (typeof data.status !== 'string' || data.status !== 'ok') {\n // NETDATA.error(413, NETDATA.registry.server + ' responded with: ' + JSON.stringify(data));\n console.warn(\"Netdata registry server send invalid response to SWITCH\", data)\n data = null;\n }\n\n $('#switchRegistryModal').modal('hide');\n })\n .fail(function () {\n // NETDATA.error(414, NETDATA.registry.server);\n console.warn(\"Netdata registry SWITCH failed\")\n document.getElementById('switchRegistryResponse').innerHTML = \"<b>Sorry! The registry rejected your request.</b>\";\n });\n } else {\n document.getElementById('switchRegistryResponse').innerHTML = \"<b>The ID you have entered is not a GUID.</b>\";\n }\n};\n\nvar deleteRegistryGuid = null;\nvar deleteRegistryUrl = null;\n\nwindow.deleteRegistryModalHandler = (guid, name, url) => {\n deleteRegistryGuid = guid;\n deleteRegistryUrl = url;\n\n document.getElementById('deleteRegistryServerName').innerHTML = name;\n document.getElementById('deleteRegistryServerName2').innerHTML = name;\n document.getElementById('deleteRegistryServerURL').innerHTML = url;\n document.getElementById('deleteRegistryResponse').innerHTML = '';\n\n $('#deleteRegistryModal').modal('show');\n}\n\nwindow.notifyForDeleteRegistry = () => {\n const responseEl = document.getElementById('deleteRegistryResponse');\n\n if (deleteRegistryUrl) {\n NETDATA.registryDelete(getFromRegistry, serverDefault, deleteRegistryUrl, function (result) {\n if (result !== null) {\n deleteRegistryUrl = null;\n $('#deleteRegistryModal').modal('hide');\n reduxStore.dispatch(resetRegistry())\n } else {\n responseEl.innerHTML = \"<b>Sorry, this command was rejected by the registry server!</b>\";\n }\n });\n }\n}\n\nvar options = {\n menus: {},\n submenu_names: {},\n data: null,\n hostname: 'netdata_server', // will be overwritten by the netdata server\n version: 'unknown',\n release_channel: 'unknown',\n hosts: [],\n\n duration: 0, // the default duration of the charts\n update_every: 1,\n\n chartsPerRow: 0,\n // chartsMinWidth: 1450,\n chartsHeight: 180,\n};\n\nfunction chartsPerRow(total) {\n void (total);\n\n if (options.chartsPerRow === 0) {\n return 1;\n //var width = Math.floor(total / options.chartsMinWidth);\n //if(width === 0) width = 1;\n //return width;\n } else {\n return options.chartsPerRow;\n }\n}\n\nfunction prioritySort(a, b) {\n if (a.priority < b.priority) {\n return -1;\n }\n if (a.priority > b.priority) {\n return 1;\n }\n return naturalSortCompare(a.name, b.name);\n}\n\nfunction sortObjectByPriority(object) {\n var idx = {};\n var sorted = [];\n\n for (var i in object) {\n if (!object.hasOwnProperty(i)) {\n continue;\n }\n\n if (typeof idx[i] === 'undefined') {\n idx[i] = object[i];\n sorted.push(i);\n }\n }\n\n sorted.sort(function (a, b) {\n if (idx[a].priority < idx[b].priority) {\n return -1;\n }\n if (idx[a].priority > idx[b].priority) {\n return 1;\n }\n return naturalSortCompare(a, b);\n });\n\n return sorted;\n}\n\n// ----------------------------------------------------------------------------\n// scroll to a section, without changing the browser history\n\nwindow.scrollToId = (hash) => {\n if (hash && hash !== '' && document.getElementById(hash) !== null) {\n var offset = $('#' + hash).offset();\n if (typeof offset !== 'undefined') {\n //console.log('scrolling to ' + hash + ' at ' + offset.top.toString());\n $('html, body').animate({ scrollTop: offset.top - 30 }, 0);\n }\n }\n\n // we must return false to prevent the default action\n return false;\n}\n\n// ----------------------------------------------------------------------------\n\n// user editable information\nwindow.customDashboard = {\n menu: {},\n submenu: {},\n context: {}\n};\n\n// netdata standard information\nconst netdataDashboard = {\n sparklines_registry: {},\n os: 'unknown',\n\n menu: {},\n submenu: {},\n context: {},\n\n // generate a sparkline\n // used in the documentation\n sparkline: function (prefix, chart, dimension, units, suffix) {\n if (options.data === null || typeof options.data.charts === 'undefined') {\n return '';\n }\n\n if (typeof options.data.charts[chart] === 'undefined') {\n return '';\n }\n\n if (typeof options.data.charts[chart].dimensions === 'undefined') {\n return '';\n }\n\n if (typeof options.data.charts[chart].dimensions[dimension] === 'undefined') {\n return '';\n }\n\n var key = chart + '.' + dimension;\n\n if (typeof units === 'undefined') {\n units = '';\n }\n\n if (typeof this.sparklines_registry[key] === 'undefined') {\n this.sparklines_registry[key] = { count: 1 };\n } else {\n this.sparklines_registry[key].count++;\n }\n\n key = key + '.' + this.sparklines_registry[key].count;\n\n return prefix + '<div class=\"netdata-container\" data-netdata=\"' + chart + '\" data-width=\"25%\" data-height=\"15px\" data-chart-library=\"dygraph\" data-dygraph-theme=\"sparkline\" data-dimensions=\"' + dimension + '\" data-show-value-of-' + dimension + '-at=\"' + key + '\"></div> (<span id=\"' + key + '\" style=\"display: inline-block; min-width: 50px; text-align: right;\">X</span>' + units + ')' + suffix;\n },\n\n gaugeChart: function (title, width, dimensions, colors) {\n if (typeof colors === 'undefined') {\n colors = '';\n }\n\n if (typeof dimensions === 'undefined') {\n dimensions = '';\n }\n\n return '<div class=\"netdata-container\" data-netdata=\"CHART_UNIQUE_ID\"'\n + ' data-dimensions=\"' + dimensions + '\"'\n + ' data-chart-library=\"gauge\"'\n + ' data-gauge-adjust=\"width\"'\n + ' data-title=\"' + title + '\"'\n + ' data-width=\"' + width + '\"'\n + ' data-points=\"CHART_DURATION\"'\n + ' data-colors=\"' + colors + '\"'\n + ' role=\"application\"></div>';\n },\n\n anyAttribute: function (obj, attr, key, def) {\n if (typeof (obj[key]) !== 'undefined') {\n var x = obj[key][attr];\n\n if (typeof (x) === 'undefined') {\n return def;\n }\n\n if (typeof (x) === 'function') {\n return x(netdataDashboard.os);\n }\n\n return x;\n }\n\n return def;\n },\n\n menuTitle: function (chart) {\n if (typeof chart.menu_pattern !== 'undefined') {\n return (this.anyAttribute(this.menu, 'title', chart.menu_pattern, chart.menu_pattern).toString()\n + ' ' + chart.type.slice(-(chart.type.length - chart.menu_pattern.length - 1)).toString()).replace(/_/g, ' ');\n }\n\n return (this.anyAttribute(this.menu, 'title', chart.menu, chart.menu)).toString().replace(/_/g, ' ');\n },\n\n menuIcon: function (chart) {\n if (typeof chart.menu_pattern !== 'undefined') {\n return this.anyAttribute(this.menu, 'icon', chart.menu_pattern, '<i class=\"fas fa-puzzle-piece\"></i>').toString();\n }\n\n return this.anyAttribute(this.menu, 'icon', chart.menu, '<i class=\"fas fa-puzzle-piece\"></i>');\n },\n\n menuInfo: function (chart) {\n if (typeof chart.menu_pattern !== 'undefined') {\n return this.anyAttribute(this.menu, 'info', chart.menu_pattern, null);\n }\n\n return this.anyAttribute(this.menu, 'info', chart.menu, null);\n },\n\n menuHeight: function (chart) {\n if (typeof chart.menu_pattern !== 'undefined') {\n return this.anyAttribute(this.menu, 'height', chart.menu_pattern, 1.0);\n }\n\n return this.anyAttribute(this.menu, 'height', chart.menu, 1.0);\n },\n\n submenuTitle: function (menu, submenu) {\n var key = menu + '.' + submenu;\n // console.log(key);\n var title = this.anyAttribute(this.submenu, 'title', key, submenu).toString().replace(/_/g, ' ');\n if (title.length > 28) {\n var a = title.substring(0, 13);\n var b = title.substring(title.length - 12, title.length);\n return a + '...' + b;\n }\n return title;\n },\n\n submenuInfo: function (menu, submenu) {\n var key = menu + '.' + submenu;\n return this.anyAttribute(this.submenu, 'info', key, null);\n },\n\n submenuHeight: function (menu, submenu, relative) {\n var key = menu + '.' + submenu;\n return this.anyAttribute(this.submenu, 'height', key, 1.0) * relative;\n },\n\n contextInfo: function (id) {\n var x = this.anyAttribute(this.context, 'info', id, null);\n\n if (x !== null) {\n return '<div class=\"shorten dashboard-context-info netdata-chart-alignment\" role=\"document\">' + x + '</div>';\n } else {\n return '';\n }\n },\n\n contextValueRange: function (id) {\n if (typeof this.context[id] !== 'undefined' && typeof this.context[id].valueRange !== 'undefined') {\n return this.context[id].valueRange;\n } else {\n return '[null, null]';\n }\n },\n\n contextHeight: function (id, def) {\n if (typeof this.context[id] !== 'undefined' && typeof this.context[id].height !== 'undefined') {\n return def * this.context[id].height;\n } else {\n return def;\n }\n },\n\n contextDecimalDigits: function (id, def) {\n if (typeof this.context[id] !== 'undefined' && typeof this.context[id].decimalDigits !== 'undefined') {\n return this.context[id].decimalDigits;\n } else {\n return def;\n }\n }\n};\nwindow.netdataDashboard = netdataDashboard // share with dashboard_info.js :/\n\n// ----------------------------------------------------------------------------\n\n// enrich the data structure returned by netdata\n// to reflect our menu system and content\n// TODO: this is a shame - we should fix charts naming (issue #807)\nfunction enrichChartData(chart) {\n var parts = chart.type.split('_');\n var tmp = parts[0];\n\n switch (tmp) {\n case 'ap':\n case 'net':\n case 'disk':\n case 'powersupply':\n chart.menu = tmp;\n break;\n\n case 'apache':\n chart.menu = chart.type;\n if (parts.length > 2 && parts[1] === 'cache') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'bind':\n chart.menu = chart.type;\n if (parts.length > 2 && parts[1] === 'rndc') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'cgroup':\n chart.menu = chart.type;\n if (chart.id.match(/.*[\\._\\/-:]qemu[\\._\\/-:]*/) || chart.id.match(/.*[\\._\\/-:]kvm[\\._\\/-:]*/)) {\n chart.menu_pattern = 'cgqemu';\n } else {\n chart.menu_pattern = 'cgroup';\n }\n break;\n\n case 'go':\n chart.menu = chart.type;\n if (parts.length > 2 && parts[1] === 'expvar') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'mount':\n if (parts.length > 2) {\n chart.menu = tmp + '_' + parts[1];\n }\n else {\n chart.menu = tmp;\n }\n break;\n\n case 'isc':\n chart.menu = chart.type;\n if (parts.length > 2 && parts[1] === 'dhcpd') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'ovpn':\n chart.menu = chart.type;\n if (parts.length > 3 && parts[1] === 'status' && parts[2] === 'log') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'smartd':\n case 'web':\n chart.menu = chart.type;\n if (parts.length > 2 && parts[1] === 'log') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'dnsmasq':\n chart.menu = chart.type;\n if (parts.length == 2 && parts[1] === 'dhcp') {\n chart.menu = tmp + '_' + parts[1];\n } else if (parts.length > 2 && parts[1] === 'dhcp') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'anomaly':\n if (parts.length >= 2 && parts[1].startsWith('detection')) {\n chart.menu = tmp + '_detection';\n }\n break;\n\n case 'tc':\n chart.menu = tmp;\n\n // find a name for this device from fireqos info\n // we strip '_(in|out)' or '(in|out)_'\n if (chart.context === 'tc.qos' && (typeof options.submenu_names[chart.family] === 'undefined' || options.submenu_names[chart.family] === chart.family)) {\n var n = chart.name.split('.')[1];\n if (n.endsWith('_in')) {\n options.submenu_names[chart.family] = n.slice(0, n.lastIndexOf('_in'));\n } else if (n.endsWith('_out')) {\n options.submenu_names[chart.family] = n.slice(0, n.lastIndexOf('_out'));\n } else if (n.startsWith('in_')) {\n options.submenu_names[chart.family] = n.slice(3, n.length);\n } else if (n.startsWith('out_')) {\n options.submenu_names[chart.family] = n.slice(4, n.length);\n } else {\n options.submenu_names[chart.family] = n;\n }\n }\n\n // increase the priority of IFB devices\n // to have inbound appear before outbound\n if (chart.id.match(/.*-ifb$/)) {\n chart.priority--;\n }\n\n break;\n\n default:\n chart.menu = chart.type;\n if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n }\n\n chart.submenu = chart.family;\n}\n\n// ----------------------------------------------------------------------------\n\nfunction headMain(os, charts, duration) {\n void (os);\n\n if (urlOptions.mode === 'print') {\n return '';\n }\n\n var head = '';\n\n if (typeof charts['system.swap'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.swap\"'\n + ' data-dimensions=\"used\"'\n + ' data-append-options=\"percentage\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Used Swap\"'\n + ' data-units=\"%\"'\n + ' data-easypiechart-max-value=\"100\"'\n + ' data-width=\"9%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-colors=\"#DD4400\"'\n + ' role=\"application\"></div>';\n }\n\n if (typeof charts['system.io'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.io\"'\n + ' data-dimensions=\"in\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Disk Read\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.io.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.io\"'\n + ' data-dimensions=\"out\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Disk Write\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.io.mainhead\"'\n + ' role=\"application\"></div>';\n }\n else if (typeof charts['system.pgpgio'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.pgpgio\"'\n + ' data-dimensions=\"in\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Disk Read\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.pgpgio.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.pgpgio\"'\n + ' data-dimensions=\"out\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Disk Write\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.pgpgio.mainhead\"'\n + ' role=\"application\"></div>';\n }\n\n if (typeof charts['system.cpu'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.cpu\"'\n + ' data-chart-library=\"gauge\"'\n + ' data-title=\"CPU\"'\n + ' data-units=\"%\"'\n + ' data-gauge-max-value=\"100\"'\n + ' data-width=\"20%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-colors=\"' + NETDATA.colors[12] + '\"'\n + ' role=\"application\"></div>';\n }\n\n if (typeof charts['system.net'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.net\"'\n + ' data-dimensions=\"received\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Net Inbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.net.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.net\"'\n + ' data-dimensions=\"sent\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Net Outbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.net.mainhead\"'\n + ' role=\"application\"></div>';\n }\n else if (typeof charts['system.ip'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ip\"'\n + ' data-dimensions=\"received\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IP Inbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ip.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ip\"'\n + ' data-dimensions=\"sent\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IP Outbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ip.mainhead\"'\n + ' role=\"application\"></div>';\n }\n else if (typeof charts['system.ipv4'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ipv4\"'\n + ' data-dimensions=\"received\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IPv4 Inbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ipv4.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ipv4\"'\n + ' data-dimensions=\"sent\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IPv4 Outbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ipv4.mainhead\"'\n + ' role=\"application\"></div>';\n }\n else if (typeof charts['system.ipv6'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ipv6\"'\n + ' data-dimensions=\"received\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IPv6 Inbound\"'\n + ' data-units=\"kbps\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ipv6.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ipv6\"'\n + ' data-dimensions=\"sent\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IPv6 Outbound\"'\n + ' data-units=\"kbps\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ipv6.mainhead\"'\n + ' role=\"application\"></div>';\n }\n\n if (typeof charts['system.ram'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ram\"'\n + ' data-dimensions=\"used|buffers|active|wired\"' // active and wired are FreeBSD stats\n + ' data-append-options=\"percentage\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Used RAM\"'\n + ' data-units=\"%\"'\n + ' data-easypiechart-max-value=\"100\"'\n + ' data-width=\"9%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-colors=\"' + NETDATA.colors[7] + '\"'\n + ' role=\"application\"></div>';\n }\n\n return head;\n}\n\nfunction generateHeadCharts(type, chart, duration) {\n if (urlOptions.mode === 'print') {\n return '';\n }\n\n var head = '';\n var hcharts = netdataDashboard.anyAttribute(netdataDashboard.context, type, chart.context, []);\n if (hcharts.length > 0) {\n var hi = 0, hlen = hcharts.length;\n while (hi < hlen) {\n if (typeof hcharts[hi] === 'function') {\n head += hcharts[hi](netdataDashboard.os, chart.id).replace(/CHART_DURATION/g, duration.toString()).replace(/CHART_UNIQUE_ID/g, chart.id);\n } else {\n head += hcharts[hi].replace(/CHART_DURATION/g, duration.toString()).replace(/CHART_UNIQUE_ID/g, chart.id);\n }\n hi++;\n }\n }\n return head;\n}\n\nfunction renderPage(menus, data) {\n var div = document.getElementById('charts_div');\n var pcent_width = Math.floor(100 / chartsPerRow($(div).width()));\n\n // find the proper duration for per-second updates\n var duration = Math.round(($(div).width() * pcent_width / 100 * data.update_every / 3) / 60) * 60;\n options.duration = duration; // probably obsolete/not needed\n options.update_every = data.update_every;\n\n var html = '';\n var sidebar = '<ul class=\"nav dashboard-sidenav\" data-spy=\"affix\" id=\"sidebar_ul\">';\n var mainhead = headMain(netdataDashboard.os, data.charts, duration);\n\n // sort the menus\n var main = sortObjectByPriority(menus);\n var i = 0, len = main.length;\n\n // todo hook to options\n const hasChartsOnBottom = defaultAttributes.legendPosition === \"bottom\"\n const chartAdditionalHeight = hasChartsOnBottom ? LEGEND_BOTTOM_SINGLE_LINE_HEIGHT : 0\n while (i < len) {\n var menu = main[i++];\n\n // generate an entry at the main menu\n\n var menuid = NETDATA.name2id('menu_' + menu);\n sidebar += '<li class=\"\"><a href=\"#' + menuid + '\" onClick=\"return scrollToId(\\'' + menuid + '\\');\">' + menus[menu].icon + ' ' + menus[menu].title + '</a><ul class=\"nav\">';\n html += '<div role=\"section\" class=\"dashboard-section\"><div role=\"sectionhead\"><h1 id=\"' + menuid + '\" role=\"heading\">' + menus[menu].icon + ' ' + menus[menu].title + '</h1></div><div role=\"section\" class=\"dashboard-subsection\">';\n\n if (menus[menu].info !== null) {\n html += menus[menu].info;\n }\n\n // console.log(' >> ' + menu + ' (' + menus[menu].priority + '): ' + menus[menu].title);\n\n var shtml = '';\n var mhead = '<div class=\"netdata-chart-row\">' + mainhead;\n mainhead = '';\n\n // sort the submenus of this menu\n var sub = sortObjectByPriority(menus[menu].submenus);\n var si = 0, slen = sub.length;\n while (si < slen) {\n var submenu = sub[si++];\n\n // generate an entry at the submenu\n var submenuid = NETDATA.name2id('menu_' + menu + '_submenu_' + submenu);\n sidebar += '<li class><a href=\"#' + submenuid + '\" onClick=\"return scrollToId(\\'' + submenuid + '\\');\">' + menus[menu].submenus[submenu].title + '</a></li>';\n shtml += '<div role=\"section\" class=\"dashboard-section-container\" id=\"' + submenuid + '\"><h2 id=\"' + submenuid + '\" class=\"netdata-chart-alignment\" role=\"heading\">' + menus[menu].submenus[submenu].title + '</h2>';\n\n if (menus[menu].submenus[submenu].info !== null) {\n shtml += '<div class=\"dashboard-submenu-info netdata-chart-alignment\" role=\"document\">' + menus[menu].submenus[submenu].info + '</div>';\n }\n\n var head = '<div class=\"netdata-chart-row\">';\n var chtml = '';\n\n // console.log(' \\------- ' + submenu + ' (' + menus[menu].submenus[submenu].priority + '): ' + menus[menu].submenus[submenu].title);\n\n // sort the charts in this submenu of this menu\n menus[menu].submenus[submenu].charts.sort(prioritySort);\n var ci = 0, clen = menus[menu].submenus[submenu].charts.length;\n while (ci < clen) {\n var chart = menus[menu].submenus[submenu].charts[ci++];\n\n // generate the submenu heading charts\n mhead += generateHeadCharts('mainheads', chart, duration);\n head += generateHeadCharts('heads', chart, duration);\n\n function chartCommonMin(family, context, units) {\n var x = netdataDashboard.anyAttribute(netdataDashboard.context, 'commonMin', context, undefined);\n if (typeof x !== 'undefined') {\n return ' data-common-min=\"' + family + '/' + context + '/' + units + '\"';\n } else {\n return '';\n }\n }\n\n function chartCommonMax(family, context, units) {\n var x = netdataDashboard.anyAttribute(netdataDashboard.context, 'commonMax', context, undefined);\n if (typeof x !== 'undefined') {\n return ' data-common-max=\"' + family + '/' + context + '/' + units + '\"';\n } else {\n return '';\n }\n }\n\n // generate the chart\n if (urlOptions.mode === 'print') {\n chtml += '<div role=\"row\" class=\"dashboard-print-row\">';\n }\n\n const chartHeight = netdataDashboard.contextHeight(chart.context, options.chartsHeight)\n + chartAdditionalHeight;\n\n chtml += '<div class=\"netdata-chartblock-container\" style=\"width: ' + pcent_width.toString() + '%;\">' + netdataDashboard.contextInfo(chart.context) + '<div class=\"netdata-container\" id=\"chart_' + NETDATA.name2id(chart.id) + '\" data-netdata=\"' + chart.id + '\"'\n + ' data-width=\"100%\"'\n + ' data-height=\"' + chartHeight.toString() + 'px\"'\n + ' data-dygraph-valuerange=\"' + netdataDashboard.contextValueRange(chart.context) + '\"'\n + ' data-id=\"' + NETDATA.name2id(options.hostname + '/' + chart.id) + '\"'\n + ' data-colors=\"' + netdataDashboard.anyAttribute(netdataDashboard.context, 'colors', chart.context, '') + '\"'\n + ' data-decimal-digits=\"' + netdataDashboard.contextDecimalDigits(chart.context, -1) + '\"'\n + (hasChartsOnBottom ? ' data-legend-position=\"bottom\"' : '')\n + chartCommonMin(chart.family, chart.context, chart.units)\n + chartCommonMax(chart.family, chart.context, chart.units)\n + ' role=\"application\"></div></div>';\n\n if (urlOptions.mode === 'print') {\n chtml += '</div>';\n }\n }\n\n head += '</div>';\n shtml += head + chtml + '</div>';\n }\n\n mhead += '</div>';\n sidebar += '</ul></li>';\n html += mhead + shtml + '</div></div><hr role=\"separator\"/>';\n }\n\n const isMemoryModeDbEngine = data.memory_mode === \"dbengine\";\n\n sidebar += '<li class=\"\" style=\"padding-top:15px;\"><a href=\"https://learn.netdata.cloud/docs/agent/collectors/quickstart/\" target=\"_blank\"><i class=\"fas fa-plus\"></i> Add more charts</a></li>';\n sidebar += '<li class=\"\"><a href=\"https://learn.netdata.cloud/docs/agent/health/quickstart/\" target=\"_blank\"><i class=\"fas fa-plus\"></i> Add more alarms</a></li>';\n sidebar += '<li class=\"\" style=\"margin:20px;color:#666;\"><small>Every ' +\n ((data.update_every === 1) ? 'second' : data.update_every.toString() + ' seconds') + ', ' +\n 'Netdata collects <strong>' + data.dimensions_count.toLocaleString() + '</strong> metrics on ' +\n data.hostname.toString() + ', presents them in <strong>' +\n data.charts_count.toLocaleString() + '</strong> charts' +\n (isMemoryModeDbEngine ? '' : ',') + // oxford comma\n ' and monitors them with <strong>' +\n data.alarms_count.toLocaleString() + '</strong> alarms.';\n\n if (!isMemoryModeDbEngine) {\n sidebar += '<br /> <br />Get more history by ' +\n '<a href=\"https://learn.netdata.cloud/guides/longer-metrics-storage#using-the-round-robin-database\" target=_blank>configuring Netdata\\'s <strong>history</strong></a> or switching to the <a href=\"https://learn.netdata.cloud/docs/agent/database/engine\" target=_blank>database engine.</a>';\n }\n\n sidebar += '<br/> <br/><strong>netdata</strong><br/>' + data.version.toString() + '</small>';\n\n sidebar += '</li>'\n\n sidebar += '<li id=\"sidebar-end-portal-container\"></li>'\n\n\n sidebar += '</ul>';\n div.innerHTML = html;\n document.getElementById('sidebar').innerHTML = sidebar;\n\n if (urlOptions.highlight === true) {\n reduxStore.dispatch(setGlobalChartUnderlayAction({\n after: urlOptions.highlight_after,\n before: urlOptions.highlight_before,\n }))\n }\n\n if (urlOptions.mode === 'print') {\n printPage();\n } else {\n finalizePage();\n }\n}\n\nfunction renderChartsAndMenu(data) {\n options.menus = {};\n options.submenu_names = {};\n\n var menus = options.menus;\n var charts = data.charts;\n var m, menu_key;\n\n for (var c in charts) {\n if (!charts.hasOwnProperty(c)) {\n continue;\n }\n\n var chart = charts[c];\n enrichChartData(chart);\n m = chart.menu;\n\n // create the menu\n if (typeof menus[m] === 'undefined') {\n menus[m] = {\n menu_pattern: chart.menu_pattern,\n priority: chart.priority,\n submenus: {},\n title: netdataDashboard.menuTitle(chart),\n icon: netdataDashboard.menuIcon(chart),\n info: netdataDashboard.menuInfo(chart),\n height: netdataDashboard.menuHeight(chart) * options.chartsHeight\n };\n } else {\n if (typeof (menus[m].menu_pattern) === 'undefined') {\n menus[m].menu_pattern = chart.menu_pattern;\n }\n\n if (chart.priority < menus[m].priority) {\n menus[m].priority = chart.priority;\n }\n }\n\n menu_key = (typeof (menus[m].menu_pattern) !== 'undefined') ? menus[m].menu_pattern : m;\n\n // create the submenu\n if (typeof menus[m].submenus[chart.submenu] === 'undefined') {\n menus[m].submenus[chart.submenu] = {\n priority: chart.priority,\n charts: [],\n title: null,\n info: netdataDashboard.submenuInfo(menu_key, chart.submenu),\n height: netdataDashboard.submenuHeight(menu_key, chart.submenu, menus[m].height)\n };\n } else {\n if (chart.priority < menus[m].submenus[chart.submenu].priority) {\n menus[m].submenus[chart.submenu].priority = chart.priority;\n }\n }\n\n // index the chart in the menu/submenu\n menus[m].submenus[chart.submenu].charts.push(chart);\n }\n\n // propagate the descriptive subname given to QoS\n // to all the other submenus with the same name\n for (var m in menus) {\n if (!menus.hasOwnProperty(m)) {\n continue;\n }\n\n for (var s in menus[m].submenus) {\n if (!menus[m].submenus.hasOwnProperty(s)) {\n continue;\n }\n\n // set the family using a name\n if (typeof options.submenu_names[s] !== 'undefined') {\n menus[m].submenus[s].title = s + ' (' + options.submenu_names[s] + ')';\n } else {\n menu_key = (typeof (menus[m].menu_pattern) !== 'undefined') ? menus[m].menu_pattern : m;\n menus[m].submenus[s].title = netdataDashboard.submenuTitle(menu_key, s);\n }\n }\n }\n\n renderPage(menus, data);\n}\n\n// ----------------------------------------------------------------------------\n\nexport const handleLoadJs = (promise, library, callback) => promise\n .catch((e) => {\n console.warn('error', e);\n alert(`Cannot load required JS library: ${library}`)\n })\n .then(() => {\n callback()\n })\n\n\nfunction loadClipboard(callback) {\n handleLoadJs(\n import(\"clipboard-polyfill\").then((clipboard) => {\n window.clipboard = clipboard\n }),\n \"clipboard-polyfill\",\n callback,\n )\n}\n\nfunction loadBootstrapTable(callback) {\n handleLoadJs(\n Promise.all([\n import(\"bootstrap-table\").then(() => (\n import('bootstrap-table/dist/extensions/export/bootstrap-table-export.min')\n )),\n import(\"tableexport.jquery.plugin\")\n ]),\n \"bootstrap-table\",\n callback,\n )\n}\n\nfunction loadBootstrapSlider(callback) {\n handleLoadJs(\n Promise.all([\n import(\"bootstrap-slider\").then(({ default: slider }) => {\n window.Slider = slider\n }),\n import(\"bootstrap-slider/dist/css/bootstrap-slider.min.css\"),\n ]),\n \"bootstrap-slider\",\n callback,\n )\n}\n\nfunction loadLzString(callback) {\n handleLoadJs(import(\"lz-string\"), \"lz-string\", callback)\n}\n\nfunction loadPako(callback) {\n handleLoadJs(\n import(\"pako\").then(({ default: pako }) => {\n window.pako = pako\n }),\n \"pako\",\n callback,\n )\n}\n\n// ----------------------------------------------------------------------------\n\nwindow.clipboardCopy = text => {\n clipboard.writeText(text);\n};\n\nwindow.clipboardCopyBadgeEmbed = url => {\n clipboard.writeText('<embed src=\"' + url + '\" type=\"image/svg+xml\" height=\"20\"/>');\n};\n\n// ----------------------------------------------------------------------------\n\nfunction alarmsUpdateModal() {\n var active = '<h3>Raised Alarms</h3><table class=\"table\">';\n var all = '<h3>All Running Alarms</h3><div class=\"panel-group\" id=\"alarms_all_accordion\" role=\"tablist\" aria-multiselectable=\"true\">';\n var footer = '<hr/><a href=\"https://github.com/netdata/netdata/tree/master/web/api/badges#netdata-badges\" target=\"_blank\">netdata badges</a> refresh automatically. Their color indicates the state of the alarm: <span style=\"color: #e05d44\"><b> red </b></span> is critical, <span style=\"color:#fe7d37\"><b> orange </b></span> is warning, <span style=\"color: #4c1\"><b> bright green </b></span> is ok, <span style=\"color: #9f9f9f\"><b> light grey </b></span> is undefined (i.e. no data or no status), <span style=\"color: #000\"><b> black </b></span> is not initialized. You can copy and paste their URLs to embed them in any web page.<br/>netdata can send notifications for these alarms. Check <a href=\"https://github.com/netdata/netdata/blob/master/health/notifications/health_alarm_notify.conf\" target=\"_blank\">this configuration file</a> for more information.';\n\n loadClipboard(function () {\n });\n\n\n const callback = (data) => {\n options.alarm_families = [];\n\n if (data === null) {\n document.getElementById('alarms_active').innerHTML =\n document.getElementById('alarms_all').innerHTML =\n document.getElementById('alarms_log').innerHTML =\n 'failed to load alarm data!';\n return;\n }\n\n function alarmid4human(id) {\n if (id === 0) {\n return '-';\n }\n\n return id.toString();\n }\n\n function timestamp4human(timestamp, space) {\n if (timestamp === 0) {\n return '-';\n }\n\n if (typeof space === 'undefined') {\n space = ' ';\n }\n\n var t = new Date(timestamp * 1000);\n\n // commented out to always have date+time, to have consistent exports\n // var now = new Date();\n\n // if (t.toDateString() === now.toDateString()) {\n // return t.toLocaleTimeString();\n // }\n\n return t.toLocaleDateString() + space + t.toLocaleTimeString();\n }\n\n function alarm_lookup_explain(alarm, chart) {\n var dimensions = ' of all values ';\n\n if (chart.dimensions.length > 1) {\n dimensions = ' of the sum of all dimensions ';\n }\n\n if (typeof alarm.lookup_dimensions !== 'undefined') {\n var d = alarm.lookup_dimensions.replace(/|/g, ',');\n var x = d.split(',');\n if (x.length > 1) {\n dimensions = 'of the sum of dimensions <code>' + alarm.lookup_dimensions + '</code> ';\n } else {\n dimensions = 'of all values of dimension <code>' + alarm.lookup_dimensions + '</code> ';\n }\n }\n\n return '<code>' + alarm.lookup_method + '</code> '\n + dimensions + ', of chart <code>' + alarm.chart + '</code>'\n + ', starting <code>' + seconds4human(alarm.lookup_after + alarm.lookup_before, { space: ' ' }) + '</code> and up to <code>' + seconds4human(alarm.lookup_before, { space: ' ' }) + '</code>'\n + ((alarm.lookup_options) ? (', with options <code>' + alarm.lookup_options.replace(/ /g, ', ') + '</code>') : '')\n + '.';\n }\n\n function alarm_to_html(alarm, full) {\n var chart = options.data.charts[alarm.chart];\n if (typeof (chart) === 'undefined') {\n chart = options.data.charts_by_name[alarm.chart];\n if (typeof (chart) === 'undefined') {\n // this means the charts loaded are incomplete\n // probably netdata was restarted and more alarms\n // are now available.\n console.log('Cannot find chart ' + alarm.chart + ', you probably need to refresh the page.');\n return '';\n }\n }\n\n var has_alarm = (typeof alarm.warn !== 'undefined' || typeof alarm.crit !== 'undefined');\n var badge_url = `${serverDefault}/api/v1/badge.svg?chart=${alarm.chart}&alarm=${alarm.name}&refresh=auto`;\n\n var action_buttons = '<br/> <br/>role: <b>' + alarm.recipient + '</b><br/> <br/>'\n + '<div class=\"action-button ripple\" title=\"click to scroll the dashboard to the chart of this alarm\" data-toggle=\"tooltip\" data-placement=\"bottom\" onClick=\"scrollToChartAfterHidingModal(\\'' + alarm.chart + '\\', ' + alarm.last_status_change * 1000 + ', \\'' + alarm.status + '\\'); $(\\'#alarmsModal\\').modal(\\'hide\\'); return false;\"><i class=\"fab fa-periscope\"></i></div>'\n + '<div class=\"action-button ripple\" title=\"click to copy to the clipboard the URL of this badge\" data-toggle=\"tooltip\" data-placement=\"bottom\" onClick=\"clipboardCopy(\\'' + badge_url + '\\'); return false;\"><i class=\"far fa-copy\"></i></div>'\n + '<div class=\"action-button ripple\" title=\"click to copy to the clipboard an auto-refreshing <code>embed</code> html element for this badge\" data-toggle=\"tooltip\" data-placement=\"bottom\" onClick=\"clipboardCopyBadgeEmbed(\\'' + badge_url + '\\'); return false;\"><i class=\"fas fa-copy\"></i></div>';\n\n var html = '<tr><td class=\"text-center\" style=\"vertical-align: middle; word-break: break-word;\" width=\"40%\"><b>' + alarm.chart + '</b><br/> <br/><embed src=\"' + badge_url + '\" type=\"image/svg+xml\" height=\"20\"/><br/> <br/><span style=\"font-size: 18px;\">' + alarm.info + '</span>' + action_buttons + '</td>'\n + '<td><table class=\"table\">'\n + ((typeof alarm.warn !== 'undefined') ? ('<tr><td width=\"10%\" style=\"text-align:right\">warning when</td><td><span style=\"font-family: monospace; color:#fe7d37; font-weight: bold;\">' + alarm.warn + '</span></td></tr>') : '')\n + ((typeof alarm.crit !== 'undefined') ? ('<tr><td width=\"10%\" style=\"text-align:right\">critical when</td><td><span style=\"font-family: monospace; color: #e05d44; font-weight: bold;\">' + alarm.crit + '</span></td></tr>') : '');\n\n if (full === true) {\n var units = chart.units;\n if (units === '%') {\n units = '%';\n }\n\n html += ((typeof alarm.lookup_after !== 'undefined') ? ('<tr><td width=\"10%\" style=\"text-align:right\">db lookup</td><td>' + alarm_lookup_explain(alarm, chart) + '</td></tr>') : '')\n + ((typeof alarm.calc !== 'undefined') ? ('<tr><td width=\"10%\" style=\"text-align:right\">calculation</td><td><span style=\"font-family: monospace;\">' + alarm.calc + '</span></td></tr>') : '')\n + ((chart.green !== null) ? ('<tr><td width=\"10%\" style=\"text-align:right\">green threshold</td><td><code>' + chart.green + ' ' + units + '</code></td></tr>') : '')\n + ((chart.red !== null) ? ('<tr><td width=\"10%\" style=\"text-align:right\">red threshold</td><td><code>' + chart.red + ' ' + units + '</code></td></tr>') : '');\n }\n\n if (alarm.warn_repeat_every > 0) {\n html += '<tr><td width=\"10%\" style=\"text-align:right\">repeat warning</td><td>' + seconds4human(alarm.warn_repeat_every) + '</td></tr>';\n }\n\n if (alarm.crit_repeat_every > 0) {\n html += '<tr><td width=\"10%\" style=\"text-align:right\">repeat critical</td><td>' + seconds4human(alarm.crit_repeat_every) + '</td></tr>';\n }\n\n var delay = '';\n if ((alarm.delay_up_duration > 0 || alarm.delay_down_duration > 0) && alarm.delay_multiplier !== 0 && alarm.delay_max_duration > 0) {\n if (alarm.delay_up_duration === alarm.delay_down_duration) {\n delay += '<small><br/>hysteresis ' + seconds4human(alarm.delay_up_duration, {\n space: ' ',\n negative_suffix: ''\n });\n } else {\n delay = '<small><br/>hysteresis ';\n if (alarm.delay_up_duration > 0) {\n delay += 'on escalation <code>' + seconds4human(alarm.delay_up_duration, {\n space: ' ',\n negative_suffix: ''\n }) + '</code>, ';\n }\n if (alarm.delay_down_duration > 0) {\n delay += 'on recovery <code>' + seconds4human(alarm.delay_down_duration, {\n space: ' ',\n negative_suffix: ''\n }) + '</code>, ';\n }\n }\n if (alarm.delay_multiplier !== 1.0) {\n delay += 'multiplied by <code>' + alarm.delay_multiplier.toString() + '</code>';\n delay += ', up to <code>' + seconds4human(alarm.delay_max_duration, {\n space: ' ',\n negative_suffix: ''\n }) + '</code>';\n }\n delay += '</small>';\n }\n\n html += '<tr><td width=\"10%\" style=\"text-align:right\">check every</td><td>' + seconds4human(alarm.update_every, {\n space: ' ',\n negative_suffix: ''\n }) + '</td></tr>'\n + ((has_alarm === true) ? ('<tr><td width=\"10%\" style=\"text-align:right\">execute</td><td><span style=\"font-family: monospace;\">' + alarm.exec + '</span>' + delay + '</td></tr>') : '')\n + '<tr><td width=\"10%\" style=\"text-align:right\">source</td><td><span style=\"font-family: monospace; word-break: break-word;\">' + alarm.source + '</span></td></tr>'\n + '</table></td></tr>';\n\n return html;\n }\n\n function alarm_family_show(id) {\n var html = '<table class=\"table\">';\n var family = options.alarm_families[id];\n var len = family.arr.length;\n while (len--) {\n var alarm = family.arr[len];\n html += alarm_to_html(alarm, true);\n }\n html += '</table>';\n\n $('#alarm_all_' + id.toString()).html(html);\n enableTooltipsAndPopovers();\n }\n\n // find the proper family of each alarm\n var x, family, alarm;\n var count_active = 0;\n var count_all = 0;\n var families = {};\n var families_sort = [];\n for (x in data.alarms) {\n if (!data.alarms.hasOwnProperty(x)) {\n continue;\n }\n\n alarm = data.alarms[x];\n family = alarm.family;\n\n // find the chart\n var chart = options.data.charts[alarm.chart];\n if (typeof chart === 'undefined') {\n chart = options.data.charts_by_name[alarm.chart];\n }\n\n // not found - this should never happen!\n if (typeof chart === 'undefined') {\n console.log('WARNING: alarm ' + x + ' is linked to chart ' + alarm.chart + ', which is not found in the list of chart got from the server.');\n chart = { priority: 9999999 };\n }\n else if (typeof chart.menu !== 'undefined' && typeof chart.submenu !== 'undefined')\n // the family based on the chart\n {\n family = chart.menu + ' - ' + chart.submenu;\n }\n\n if (typeof families[family] === 'undefined') {\n families[family] = {\n name: family,\n arr: [],\n priority: chart.priority\n };\n\n families_sort.push(families[family]);\n }\n\n if (chart.priority < families[family].priority) {\n families[family].priority = chart.priority;\n }\n\n families[family].arr.unshift(alarm);\n }\n\n // sort the families, like the dashboard menu does\n var families_sorted = families_sort.sort(function (a, b) {\n if (a.priority < b.priority) {\n return -1;\n }\n if (a.priority > b.priority) {\n return 1;\n }\n return naturalSortCompare(a.name, b.name);\n });\n\n var i = 0;\n var fc = 0;\n var len = families_sorted.length;\n while (len--) {\n family = families_sorted[i++].name;\n var active_family_added = false;\n\n var expanded = 'false';\n var collapsed = 'class=\"collapsed\"';\n var cin = '';\n\n // uncomment if first family needs to be expanded by default\n // var expanded = 'true';\n // var collapsed = '';\n // var cin = 'in';\n\n if (fc !== 0) {\n all += \"</table></div></div></div>\";\n\n // uncomment if first family needs to be expanded by default\n // expanded = 'false';\n // collapsed = 'class=\"collapsed\"';\n // cin = '';\n }\n\n all += '<div class=\"panel panel-default\"><div class=\"panel-heading\" role=\"tab\" id=\"alarm_all_heading_' + fc.toString() + '\"><h4 class=\"panel-title\"><a ' + collapsed + ' role=\"button\" data-toggle=\"collapse\" data-parent=\"#alarms_all_accordion\" href=\"#alarm_all_' + fc.toString() + '\" aria-expanded=\"' + expanded + '\" aria-controls=\"alarm_all_' + fc.toString() + '\">' + family.toString() + '</a></h4></div><div id=\"alarm_all_' + fc.toString() + '\" class=\"panel-collapse collapse ' + cin + '\" role=\"tabpanel\" aria-labelledby=\"alarm_all_heading_' + fc.toString() + '\" data-alarm-id=\"' + fc.toString() + '\"><div class=\"panel-body\" id=\"alarm_all_body_' + fc.toString() + '\">';\n\n options.alarm_families[fc] = families[family];\n\n fc++;\n\n var arr = families[family].arr;\n var c = arr.length;\n while (c--) {\n alarm = arr[c];\n if (alarm.status === 'WARNING' || alarm.status === 'CRITICAL') {\n if (!active_family_added) {\n active_family_added = true;\n active += '<tr><th class=\"text-center\" colspan=\"2\"><h4>' + family + '</h4></th></tr>';\n }\n count_active++;\n active += alarm_to_html(alarm, true);\n }\n\n count_all++;\n }\n }\n active += \"</table>\";\n if (families_sorted.length > 0) {\n all += \"</div></div></div>\";\n }\n all += \"</div>\";\n\n if (!count_active) {\n active += '<div style=\"width:100%; height: 100px; text-align: center;\"><span style=\"font-size: 50px;\"><i class=\"fas fa-thumbs-up\"></i></span><br/>Everything is normal. No raised alarms.</div>';\n } else {\n active += footer;\n }\n\n if (!count_all) {\n all += \"<h4>No alarms are running in this system.</h4>\";\n } else {\n all += footer;\n }\n\n document.getElementById('alarms_active').innerHTML = active;\n document.getElementById('alarms_all').innerHTML = all;\n enableTooltipsAndPopovers();\n\n if (families_sorted.length > 0) {\n alarm_family_show(0);\n }\n\n // register bootstrap events\n var $accordion = $('#alarms_all_accordion');\n $accordion.on('show.bs.collapse', function (d) {\n var target = $(d.target);\n var id = $(target).data('alarm-id');\n alarm_family_show(id);\n });\n $accordion.on('hidden.bs.collapse', function (d) {\n var target = $(d.target);\n var id = $(target).data('alarm-id');\n $('#alarm_all_' + id.toString()).html('');\n });\n\n document.getElementById('alarms_log').innerHTML = '<h3>Alarm Log</h3><table id=\"alarms_log_table\"></table>';\n\n loadBootstrapTable(function () {\n $('#alarms_log_table').bootstrapTable({\n url: `${serverDefault}/api/v1/alarm_log?all`,\n cache: false,\n pagination: true,\n pageSize: 10,\n showPaginationSwitch: false,\n search: true,\n searchTimeOut: 300,\n searchAlign: 'left',\n showColumns: true,\n showExport: true,\n exportDataType: 'all',\n exportOptions: {\n fileName: 'netdata_alarm_log'\n },\n onClickRow: function (row) {\n scrollToChartAfterHidingModal(row.chart, row.when * 1000, row.status);\n $('#alarmsModal').modal('hide');\n return false;\n },\n rowStyle: function (row) {\n switch (row.status) {\n case 'CRITICAL':\n return { classes: 'danger' };\n break;\n case 'WARNING':\n return { classes: 'warning' };\n break;\n case 'UNDEFINED':\n return { classes: 'info' };\n break;\n case 'CLEAR':\n return { classes: 'success' };\n break;\n }\n return {};\n },\n showFooter: false,\n showHeader: true,\n showRefresh: true,\n showToggle: false,\n sortable: true,\n silentSort: false,\n columns: [\n {\n field: 'when',\n title: 'Event Date',\n valign: 'middle',\n titleTooltip: 'The date and time the even took place',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return timestamp4human(value, ' ');\n },\n align: 'center',\n switchable: false,\n sortable: true\n },\n {\n field: 'hostname',\n title: 'Host',\n valign: 'middle',\n titleTooltip: 'The host that generated this event',\n align: 'center',\n visible: false,\n sortable: true\n },\n {\n field: 'unique_id',\n title: 'Unique ID',\n titleTooltip: 'The host unique ID for this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return alarmid4human(value);\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'alarm_id',\n title: 'Alarm ID',\n titleTooltip: 'The ID of the alarm that generated this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return alarmid4human(value);\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'alarm_event_id',\n title: 'Alarm Event ID',\n titleTooltip: 'The incremental ID of this event for the given alarm',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return alarmid4human(value);\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'chart',\n title: 'Chart',\n titleTooltip: 'The chart the alarm is attached to',\n align: 'center',\n valign: 'middle',\n switchable: false,\n sortable: true\n },\n {\n field: 'family',\n title: 'Family',\n titleTooltip: 'The family of the chart the alarm is attached to',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'name',\n title: 'Alarm',\n titleTooltip: 'The alarm name that generated this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return value.toString().replace(/_/g, ' ');\n },\n align: 'center',\n valign: 'middle',\n switchable: false,\n sortable: true\n },\n {\n field: 'value_string',\n title: 'Friendly Value',\n titleTooltip: 'The value of the alarm, that triggered this event',\n align: 'right',\n valign: 'middle',\n sortable: true\n },\n {\n field: 'old_value_string',\n title: 'Friendly Old Value',\n titleTooltip: 'The value of the alarm, just before this event',\n align: 'right',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'old_value',\n title: 'Old Value',\n titleTooltip: 'The value of the alarm, just before this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return ((value !== null) ? Math.round(value * 100) / 100 : 'NaN').toString();\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'value',\n title: 'Value',\n titleTooltip: 'The value of the alarm, that triggered this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return ((value !== null) ? Math.round(value * 100) / 100 : 'NaN').toString();\n },\n align: 'right',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'units',\n title: 'Units',\n titleTooltip: 'The units of the value of the alarm',\n align: 'left',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'old_status',\n title: 'Old Status',\n titleTooltip: 'The status of the alarm, just before this event',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'status',\n title: 'Status',\n titleTooltip: 'The status of the alarm, that was set due to this event',\n align: 'center',\n valign: 'middle',\n switchable: false,\n sortable: true\n },\n {\n field: 'duration',\n title: 'Last Duration',\n titleTooltip: 'The duration the alarm was at its previous state, just before this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return seconds4human(value, { negative_suffix: '', space: ' ', now: 'no time' });\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'non_clear_duration',\n title: 'Raised Duration',\n titleTooltip: 'The duration the alarm was raised, just before this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return seconds4human(value, { negative_suffix: '', space: ' ', now: 'no time' });\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'recipient',\n title: 'Recipient',\n titleTooltip: 'The recipient of this event',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'processed',\n title: 'Processed Status',\n titleTooltip: 'True when this event is processed',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n\n if (value === true) {\n return 'DONE';\n } else {\n return 'PENDING';\n }\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'updated',\n title: 'Updated Status',\n titleTooltip: 'True when this event has been updated by another event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n\n if (value === true) {\n return 'UPDATED';\n } else {\n return 'CURRENT';\n }\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'updated_by_id',\n title: 'Updated By ID',\n titleTooltip: 'The unique ID of the event that obsoleted this one',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return alarmid4human(value);\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'updates_id',\n title: 'Updates ID',\n titleTooltip: 'The unique ID of the event obsoleted because of this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return alarmid4human(value);\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'exec',\n title: 'Script',\n titleTooltip: 'The script to handle the event notification',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'exec_run',\n title: 'Script Run At',\n titleTooltip: 'The date and time the script has been ran',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return timestamp4human(value, ' ');\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'exec_code',\n title: 'Script Return Value',\n titleTooltip: 'The return code of the script',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n\n if (value === 0) {\n return 'OK (returned 0)';\n } else {\n return 'FAILED (with code ' + value.toString() + ')';\n }\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'delay',\n title: 'Script Delay',\n titleTooltip: 'The hysteresis of the notification',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n\n return seconds4human(value, { negative_suffix: '', space: ' ', now: 'no time' });\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'delay_up_to_timestamp',\n title: 'Script Delay Run At',\n titleTooltip: 'The date and time the script should be run, after hysteresis',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return timestamp4human(value, ' ');\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'info',\n title: 'Description',\n titleTooltip: 'A short description of the alarm',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'source',\n title: 'Alarm Source',\n titleTooltip: 'The source of configuration of the alarm',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n }\n ]\n });\n // console.log($('#alarms_log_table').bootstrapTable('getOptions'));\n });\n }\n\n reduxStore.dispatch(fetchAllAlarmsAction.request({\n callback,\n serverDefault,\n }))\n}\n\nfunction initializeDynamicDashboardWithData(data) {\n if (data !== null) {\n options.hostname = data.hostname;\n options.data = data;\n options.version = data.version;\n options.release_channel = data.release_channel;\n options.timezone = data.timezone;\n netdataDashboard.os = data.os;\n\n if (typeof data.hosts !== 'undefined') {\n options.hosts = data.hosts;\n }\n\n // update the dashboard hostname\n document.getElementById('netdataVersion').innerHTML = options.version;\n\n // update the dashboard title\n document.title = options.hostname + ' netdata dashboard';\n\n // create a chart_by_name index\n data.charts_by_name = {};\n var charts = data.charts;\n var x;\n for (x in charts) {\n if (!charts.hasOwnProperty(x)) {\n continue;\n }\n\n var chart = charts[x];\n data.charts_by_name[chart.name] = chart;\n }\n\n // render all charts\n renderChartsAndMenu(data);\n }\n}\n\n// an object to keep initialization configuration\n// needed due to the async nature of the XSS modal\nvar initializeConfig = {\n url: null,\n custom_info: true,\n};\n\n// will be removed when we'll transform dashboard_info.js into DSL\n// memoize so it's fetched only once\nconst loadDashboardInfo = memoizeWith(identity, () => (\n $.ajax({\n url: `${serverDefault}dashboard_info.js`,\n cache: true,\n dataType: 'script',\n xhrFields: { withCredentials: true }, // required for the cookie\n })\n .fail(function () {\n alert(`Cannot load required JS library: dashboard_info.js`);\n })\n))\n\nfunction loadCustomDashboardInfo(url, callback) {\n $.ajax({\n url,\n cache: true,\n dataType: \"script\",\n xhrFields: { withCredentials: true } // required for the cookie\n })\n .fail(function () {\n alert(`Cannot load required JS library: ${url}`);\n })\n .always(function () {\n $.extend(true, netdataDashboard, customDashboard);\n callback();\n })\n}\n\nfunction initializeChartsAndCustomInfo() {\n loadDashboardInfo().then(() => {\n // download all the charts the server knows\n NETDATA.chartRegistry.downloadAll(initializeConfig.url, function (data) {\n if (data !== null) {\n reduxStore.dispatch(chartsMetadataRequestSuccess({ data }))\n if (initializeConfig.custom_info === true && typeof data.custom_info !== 'undefined' && data.custom_info !== \"\" && window.netdataSnapshotData === null) {\n //console.log('loading custom dashboard decorations from server ' + initializeConfig.url);\n loadCustomDashboardInfo(serverDefault + data.custom_info, function () {\n initializeDynamicDashboardWithData(data);\n });\n } else {\n //console.log('not loading custom dashboard decorations from server ' + initializeConfig.url);\n initializeDynamicDashboardWithData(data);\n }\n }\n });\n })\n}\n\nwindow.xssModalDisableXss = () => {\n //console.log('disabling xss checks');\n NETDATA.xss.enabled = false;\n NETDATA.xss.enabled_for_data = false;\n initializeConfig.custom_info = true;\n initializeChartsAndCustomInfo();\n return false;\n};\n\n\nwindow.xssModalKeepXss = () => {\n //console.log('keeping xss checks');\n NETDATA.xss.enabled = true;\n NETDATA.xss.enabled_for_data = true;\n initializeConfig.custom_info = false;\n initializeChartsAndCustomInfo();\n return false;\n};\n\nfunction initializeDynamicDashboard(newReduxStore) {\n if (newReduxStore) {\n reduxStore = newReduxStore\n\n netdataPrepCallback()\n\n initializeConfig.url = serverDefault;\n }\n\n if (typeof netdataCheckXSS !== 'undefined' && netdataCheckXSS === true) {\n //$(\"#loadOverlay\").css(\"display\",\"none\");\n document.getElementById('netdataXssModalServer').innerText = initializeConfig.url;\n $('#xssModal').modal('show');\n } else {\n initializeChartsAndCustomInfo();\n }\n}\n\n// ----------------------------------------------------------------------------\n\nfunction versionLog(msg) {\n document.getElementById('versionCheckLog').innerHTML = msg;\n}\n\n// New way of checking for updates, based only on versions\n\nfunction versionsMatch(v1, v2) {\n if (v1 == v2) {\n return true;\n } else {\n let s1 = v1.split('.');\n let s2 = v2.split('.');\n // Check major version\n let n1 = parseInt(s1[0].substring(1, 2), 10);\n let n2 = parseInt(s2[0].substring(1, 2), 10);\n if (n1 < n2) return false;\n else if (n1 > n2) return true;\n\n // Check minor version\n n1 = parseInt(s1[1], 10);\n n2 = parseInt(s2[1], 10);\n if (n1 < n2) return false;\n else if (n1 > n2) return true;\n\n // Split patch: format could be e.g. 0-22-nightly\n s1 = s1[2].split('-');\n s2 = s2[2].split('-');\n\n n1 = parseInt(s1[0], 10);\n n2 = parseInt(s2[0], 10);\n if (n1 < n2) return false;\n else if (n1 > n2) return true;\n\n n1 = (s1.length > 1) ? parseInt(s1[1], 10) : 0;\n n2 = (s2.length > 1) ? parseInt(s2[1], 10) : 0;\n if (n1 < n2) return false;\n else return true;\n }\n}\n\nfunction getGithubLatestVersion(callback, channel) {\n versionLog('Downloading latest version id from github...');\n let url\n\n if (channel === 'stable') {\n url = 'https://api.github.com/repos/netdata/netdata/releases/latest'\n } else {\n url = 'https://api.github.com/repos/netdata/netdata-nightlies/releases/latest'\n }\n\n $.ajax({\n url: url,\n async: true,\n cache: false\n })\n .done(function (data) {\n data = data.tag_name.replace(/(\\r\\n|\\n|\\r| |\\t)/gm, \"\");\n versionLog('Latest stable version from github is ' + data);\n callback(data);\n })\n .fail(function () {\n versionLog('Failed to download the latest stable version id from github!');\n callback(null);\n });\n}\n\nfunction checkForUpdateByVersion(force, callback) {\n getGithubLatestVersion(function (sha2) {\n callback(options.version, sha2);\n }, options.release_channel);\n return null;\n}\n\nwindow.notifyForUpdate = (force) => {\n versionLog('<p>checking for updates...</p>');\n\n var now = Date.now();\n\n if (typeof force === 'undefined' || force !== true) {\n var last = loadLocalStorage('last_update_check');\n\n if (typeof last === 'string') {\n last = parseInt(last);\n } else {\n last = 0;\n }\n\n if (now - last < 3600000 * 8) {\n // no need to check it - too soon\n return;\n }\n }\n\n checkForUpdateByVersion(force, function (sha1, sha2) {\n var save = false;\n\n if (sha1 === null) {\n save = false;\n versionLog('<p><big>Failed to get your netdata version!</big></p><p>You can always get the latest netdata from <a href=\"https://github.com/netdata/netdata\" target=\"_blank\">its github page</a>.</p>');\n } else if (sha2 === null) {\n save = false;\n versionLog('<p><big>Failed to get the latest netdata version.</big></p><p>You can always get the latest netdata from <a href=\"https://github.com/netdata/netdata\" target=\"_blank\">its github page</a>.</p>');\n } else if (versionsMatch(sha1, sha2)) {\n save = true;\n versionLog('<p><big>You already have the latest netdata!</big></p><p>No update yet?<br/>We probably need some motivation to keep going on!</p><p>If you haven\\'t already, <a href=\"https://github.com/netdata/netdata\" target=\"_blank\">give netdata a <b><i class=\"fas fa-star\"></i></b> at its github page</a>.</p>');\n } else {\n save = true;\n var compare = 'https://learn.netdata.cloud/docs/agent/changelog/';\n versionLog('<p><big><strong>New version of netdata available!</strong></big></p><p>Latest version: <b><code>' + sha2 + '</code></b></p><p><a href=\"' + compare + '\" target=\"_blank\">Click here for the changes log</a> and<br/><a href=\"https://github.com/netdata/netdata/tree/master/packaging/installer/UPDATE.md\" target=\"_blank\">click here for directions on updating</a> your netdata installation.</p><p>We suggest to review the changes log for new features you may be interested, or important bug fixes you may need.<br/>Keeping your netdata updated is generally a good idea.</p>');\n }\n\n if (save) {\n saveLocalStorage('last_update_check', now.toString());\n }\n });\n}\n\n// ----------------------------------------------------------------------------\n// printing dashboards\n\nfunction showPageFooter() {\n document.getElementById('footer').style.display = 'block';\n}\n\nwindow.printPreflight = () => {\n var url = document.location.origin.toString() + document.location.pathname.toString() + document.location.search.toString() + urlOptions.genHash() + ';mode=print';\n var width = 990;\n var height = screen.height * 90 / 100;\n //console.log(url);\n //console.log(document.location);\n window.open(url, '', 'width=' + width.toString() + ',height=' + height.toString() + ',menubar=no,toolbar=no,personalbar=no,location=no,resizable=no,scrollbars=yes,status=no,chrome=yes,centerscreen=yes,attention=yes,dialog=yes');\n $('#printPreflightModal').modal('hide');\n}\n\nfunction printPage() {\n window.NETDATA.parseDom();\n\n if (urlOptions.after < 0) {\n reduxStore.dispatch(setDefaultAfterAction({ after: urlOptions.after }))\n } else if (urlOptions.pan_and_zoom === true) {\n reduxStore.dispatch(setGlobalPanAndZoomAction({\n after: urlOptions.after,\n before: urlOptions.before,\n }))\n }\n showPageFooter(); // todo after full rewrite the footer should show when charts are loaded\n}\n\n// --------------------------------------------------------------------\n\nfunction jsonStringifyFn(obj) {\n return JSON.stringify(obj, function (key, value) {\n return (typeof value === 'function') ? value.toString() : value;\n });\n}\n\nfunction jsonParseFn(str) {\n return JSON.parse(str, function (key, value) {\n if (typeof value != 'string') {\n return value;\n }\n return (value.substring(0, 8) == 'function') ? eval('(' + value + ')') : value;\n });\n}\n\n// --------------------------------------------------------------------\n\nvar snapshotOptions = {\n bytes_per_chart: 2048,\n compressionDefault: 'pako.deflate.base64',\n\n compressions: {\n 'none': {\n bytes_per_point_memory: 5.2,\n bytes_per_point_disk: 5.6,\n\n compress: function (s) {\n return s;\n },\n\n compressed_length: function (s) {\n return s.length;\n },\n\n uncompress: function (s) {\n return s;\n }\n },\n\n 'pako.deflate.base64': {\n bytes_per_point_memory: 1.8,\n bytes_per_point_disk: 1.9,\n\n compress: function (s) {\n return btoa(pako.deflate(s, { to: 'string' }));\n },\n\n compressed_length: function (s) {\n return s.length;\n },\n\n uncompress: function (s) {\n return pako.inflate(atob(s), { to: 'string' });\n }\n },\n\n 'pako.deflate': {\n bytes_per_point_memory: 1.4,\n bytes_per_point_disk: 3.2,\n\n compress: function (s) {\n return pako.deflate(s, { to: 'string' });\n },\n\n compressed_length: function (s) {\n return s.length;\n },\n\n uncompress: function (s) {\n return pako.inflate(s, { to: 'string' });\n }\n },\n\n 'lzstring.utf16': {\n bytes_per_point_memory: 1.7,\n bytes_per_point_disk: 2.6,\n\n compress: function (s) {\n return LZString.compressToUTF16(s);\n },\n\n compressed_length: function (s) {\n return s.length * 2;\n },\n\n uncompress: function (s) {\n return LZString.decompressFromUTF16(s);\n }\n },\n\n 'lzstring.base64': {\n bytes_per_point_memory: 2.1,\n bytes_per_point_disk: 2.3,\n\n compress: function (s) {\n return LZString.compressToBase64(s);\n },\n\n compressed_length: function (s) {\n return s.length;\n },\n\n uncompress: function (s) {\n return LZString.decompressFromBase64(s);\n }\n },\n\n 'lzstring.uri': {\n bytes_per_point_memory: 2.1,\n bytes_per_point_disk: 2.3,\n\n compress: function (s) {\n return LZString.compressToEncodedURIComponent(s);\n },\n\n compressed_length: function (s) {\n return s.length;\n },\n\n uncompress: function (s) {\n return LZString.decompressFromEncodedURIComponent(s);\n }\n }\n }\n};\n\n// --------------------------------------------------------------------\n// loading snapshots\n\nfunction loadSnapshotModalLog(priority, msg) {\n document.getElementById('loadSnapshotStatus').className = \"alert alert-\" + priority;\n document.getElementById('loadSnapshotStatus').innerHTML = msg;\n}\n\nvar tmpSnapshotData = null;\n\nwindow.loadSnapshot = () => {\n $('#loadSnapshotImport').addClass('disabled');\n\n if (tmpSnapshotData === null) {\n loadSnapshotPreflightEmpty();\n loadSnapshotModalLog('danger', 'no data have been loaded');\n return;\n }\n\n loadPako(function () {\n loadLzString(function () {\n loadSnapshotModalLog('info', 'Please wait, activating snapshot...');\n $('#loadSnapshotModal').modal('hide');\n\n netdataShowAlarms = false;\n netdataRegistry = false;\n netdataServer = tmpSnapshotData.server;\n\n document.getElementById('charts_div').innerHTML = '';\n document.getElementById('sidebar').innerHTML = '';\n\n if (typeof tmpSnapshotData.hash !== 'undefined') {\n urlOptions.hash = tmpSnapshotData.hash;\n } else {\n urlOptions.hash = '#';\n }\n\n if (typeof tmpSnapshotData.info !== 'undefined') {\n var info = jsonParseFn(tmpSnapshotData.info);\n if (typeof info.menu !== 'undefined') {\n netdataDashboard.menu = info.menu;\n }\n\n if (typeof info.submenu !== 'undefined') {\n netdataDashboard.submenu = info.submenu;\n }\n\n if (typeof info.context !== 'undefined') {\n netdataDashboard.context = info.context;\n }\n }\n\n if (typeof tmpSnapshotData.compression !== 'string') {\n tmpSnapshotData.compression = 'none';\n }\n\n if (typeof snapshotOptions.compressions[tmpSnapshotData.compression] === 'undefined') {\n alert('unknown compression method: ' + tmpSnapshotData.compression);\n tmpSnapshotData.compression = 'none';\n }\n\n tmpSnapshotData.uncompress = snapshotOptions.compressions[tmpSnapshotData.compression].uncompress;\n\n window.NETDATA.parseDom()\n reduxStore.dispatch(loadSnapshotAction({\n snapshot: tmpSnapshotData,\n }))\n\n window.netdataSnapshotData = tmpSnapshotData;\n\n urlOptions.after = tmpSnapshotData.after_ms;\n urlOptions.before = tmpSnapshotData.before_ms;\n\n if (typeof tmpSnapshotData.highlight_after_ms !== 'undefined'\n && tmpSnapshotData.highlight_after_ms !== null\n && tmpSnapshotData.highlight_after_ms > 0\n && typeof tmpSnapshotData.highlight_before_ms !== 'undefined'\n && tmpSnapshotData.highlight_before_ms !== null\n && tmpSnapshotData.highlight_before_ms > 0\n ) {\n urlOptions.highlight_after = tmpSnapshotData.highlight_after_ms;\n urlOptions.highlight_before = tmpSnapshotData.highlight_before_ms;\n urlOptions.highlight = true;\n } else {\n urlOptions.highlight_after = 0;\n urlOptions.highlight_before = 0;\n urlOptions.highlight = false;\n }\n\n netdataCheckXSS = false; // disable the modal - this does not affect XSS checks, since dashboard.js is already loaded\n NETDATA.xss.enabled = true; // we should not do any remote requests, but if we do, check them\n NETDATA.xss.enabled_for_data = true; // check also snapshot data - that have been excluded from the initial check, due to compression\n loadSnapshotPreflightEmpty();\n initializeDynamicDashboard();\n });\n });\n};\n\nfunction loadSnapshotPreflightFile(file) {\n var filename = NETDATA.xss.string(file.name);\n var fr = new FileReader();\n fr.onload = function (e) {\n document.getElementById('loadSnapshotFilename').innerHTML = filename;\n var result = null;\n try {\n result = NETDATA.xss.checkAlways('snapshot', JSON.parse(e.target.result), /^(snapshot\\.info|snapshot\\.data)$/);\n\n //console.log(result);\n var date_after = new Date(result.after_ms);\n var date_before = new Date(result.before_ms);\n\n if (typeof result.charts_ok === 'undefined') {\n result.charts_ok = 'unknown';\n }\n\n if (typeof result.charts_failed === 'undefined') {\n result.charts_failed = 0;\n }\n\n if (typeof result.compression === 'undefined') {\n result.compression = 'none';\n }\n\n if (typeof result.data_size === 'undefined') {\n result.data_size = 0;\n }\n\n document.getElementById('loadSnapshotFilename').innerHTML = '<code>' + filename + '</code>';\n document.getElementById('loadSnapshotHostname').innerHTML = '<b>' + result.hostname + '</b>, netdata version: <b>' + result.netdata_version.toString() + '</b>';\n document.getElementById('loadSnapshotURL').innerHTML = result.url;\n document.getElementById('loadSnapshotCharts').innerHTML = result.charts.charts_count.toString() + ' charts, ' + result.charts.dimensions_count.toString() + ' dimensions, ' + result.data_points.toString() + ' points per dimension, ' + Math.round(result.duration_ms / result.data_points).toString() + ' ms per point';\n document.getElementById('loadSnapshotInfo').innerHTML = 'version: <b>' + result.snapshot_version.toString() + '</b>, includes <b>' + result.charts_ok.toString() + '</b> unique chart data queries ' + ((result.charts_failed > 0) ? ('<b>' + result.charts_failed.toString() + '</b> failed') : '').toString() + ', compressed with <code>' + result.compression.toString() + '</code>, data size ' + (Math.round(result.data_size * 100 / 1024 / 1024) / 100).toString() + ' MB';\n document.getElementById('loadSnapshotTimeRange').innerHTML = '<b>' + localeDateString(date_after) + ' ' + localeTimeString(date_after) + '</b> to <b>' + localeDateString(date_before) + ' ' + localeTimeString(date_before) + '</b>';\n document.getElementById('loadSnapshotComments').innerHTML = ((result.comments) ? result.comments : '').toString();\n loadSnapshotModalLog('success', 'File loaded, click <b>Import</b> to render it!');\n $('#loadSnapshotImport').removeClass('disabled');\n\n tmpSnapshotData = result;\n }\n catch (e) {\n console.log(e);\n document.getElementById('loadSnapshotStatus').className = \"alert alert-danger\";\n document.getElementById('loadSnapshotStatus').innerHTML = \"Failed to parse this file!\";\n $('#loadSnapshotImport').addClass('disabled');\n }\n }\n\n //console.log(file);\n fr.readAsText(file);\n};\n\nfunction loadSnapshotPreflightEmpty() {\n document.getElementById('loadSnapshotFilename').innerHTML = '';\n document.getElementById('loadSnapshotHostname').innerHTML = '';\n document.getElementById('loadSnapshotURL').innerHTML = '';\n document.getElementById('loadSnapshotCharts').innerHTML = '';\n document.getElementById('loadSnapshotInfo').innerHTML = '';\n document.getElementById('loadSnapshotTimeRange').innerHTML = '';\n document.getElementById('loadSnapshotComments').innerHTML = '';\n loadSnapshotModalLog('success', 'Browse for a snapshot file (or drag it and drop it here), then click <b>Import</b> to render it.');\n $('#loadSnapshotImport').addClass('disabled');\n};\n\nvar loadSnapshotDragAndDropInitialized = false;\n\nfunction loadSnapshotDragAndDropSetup() {\n if (loadSnapshotDragAndDropInitialized === false) {\n loadSnapshotDragAndDropInitialized = true;\n $('#loadSnapshotDragAndDrop')\n .on('drag dragstart dragend dragover dragenter dragleave drop', function (e) {\n e.preventDefault();\n e.stopPropagation();\n })\n .on('drop', function (e) {\n if (e.originalEvent.dataTransfer.files.length) {\n loadSnapshotPreflightFile(e.originalEvent.dataTransfer.files.item(0));\n } else {\n loadSnapshotPreflightEmpty();\n loadSnapshotModalLog('danger', 'No file selected');\n }\n });\n }\n};\n\nwindow.loadSnapshotPreflight = () => {\n var files = document.getElementById('loadSnapshotSelectFiles').files;\n if (!files.length) {\n loadSnapshotPreflightEmpty();\n loadSnapshotModalLog('danger', 'No file selected');\n return;\n }\n\n loadSnapshotModalLog('info', 'Loading file...');\n\n loadSnapshotPreflightFile(files.item(0));\n}\n\n// --------------------------------------------------------------------\n// saving snapshots\n\nvar saveSnapshotStop = false;\n\nfunction saveSnapshotCancel() {\n reduxStore.dispatch(stopSnapshotModeAction())\n saveSnapshotStop = true;\n}\n\nvar saveSnapshotModalInitialized = false;\n\nfunction saveSnapshotModalSetup() {\n if (saveSnapshotModalInitialized === false) {\n saveSnapshotModalInitialized = true;\n $('#saveSnapshotModal')\n .on('hide.bs.modal', saveSnapshotCancel)\n .on('show.bs.modal', saveSnapshotModalInit)\n .on('shown.bs.modal', function () {\n $('#saveSnapshotResolutionSlider').find(\".slider-handle:first\").attr(\"tabindex\", 1);\n document.getElementById('saveSnapshotComments').focus();\n });\n }\n};\n\nfunction saveSnapshotModalLog(priority, msg) {\n document.getElementById('saveSnapshotStatus').className = \"alert alert-\" + priority;\n document.getElementById('saveSnapshotStatus').innerHTML = msg;\n}\n\nfunction saveSnapshotModalShowExpectedSize() {\n var points = Math.round(saveSnapshotViewDuration / saveSnapshotSelectedSecondsPerPoint);\n var priority = 'info';\n var msg = 'A moderate snapshot.';\n\n var sizemb = Math.round(\n (options.data.charts_count * snapshotOptions.bytes_per_chart\n + options.data.dimensions_count * points * snapshotOptions.compressions[saveSnapshotCompression].bytes_per_point_disk)\n * 10 / 1024 / 1024) / 10;\n\n var memmb = Math.round(\n (options.data.charts_count * snapshotOptions.bytes_per_chart\n + options.data.dimensions_count * points * snapshotOptions.compressions[saveSnapshotCompression].bytes_per_point_memory)\n * 10 / 1024 / 1024) / 10;\n\n if (sizemb < 10) {\n priority = 'success';\n msg = 'A nice small snapshot!';\n }\n if (sizemb > 50) {\n priority = 'warning';\n msg = 'Will stress your browser...';\n }\n if (sizemb > 100) {\n priority = 'danger';\n msg = 'Hm... good luck...';\n }\n\n saveSnapshotModalLog(priority, 'The snapshot will have ' + points.toString() + ' points per dimension. Expected size on disk ' + sizemb + ' MB, at browser memory ' + memmb + ' MB.<br/>' + msg);\n}\n\nvar saveSnapshotCompression = snapshotOptions.compressionDefault;\n\nfunction saveSnapshotSetCompression(name) {\n saveSnapshotCompression = name;\n document.getElementById('saveSnapshotCompressionName').innerHTML = saveSnapshotCompression;\n saveSnapshotModalShowExpectedSize();\n}\n\nvar saveSnapshotSlider = null;\nvar saveSnapshotSelectedSecondsPerPoint = 1;\nvar saveSnapshotViewDuration = 1;\n\nfunction saveSnapshotModalInit() {\n $('#saveSnapshotModalProgressSection').hide();\n $('#saveSnapshotResolutionRadio').show();\n saveSnapshotModalLog('info', 'Select resolution and click <b>Save</b>');\n $('#saveSnapshotExport').removeClass('disabled');\n\n loadBootstrapSlider(function () {\n const reduxState = reduxStore.getState()\n saveSnapshotViewDuration = - selectDefaultAfter(reduxState)\n var start_ms = Math.round(Date.now() - saveSnapshotViewDuration * 1000);\n const globalPanAndZoom = selectGlobalPanAndZoom(reduxState)\n\n if (Boolean(globalPanAndZoom)) {\n saveSnapshotViewDuration = Math.round((globalPanAndZoom.before - globalPanAndZoom.after) / 1000);\n start_ms = globalPanAndZoom.after;\n }\n\n var start_date = new Date(start_ms);\n var yyyymmddhhssmm = start_date.getFullYear() + zeropad(start_date.getMonth() + 1) + zeropad(start_date.getDate()) + '-' + zeropad(start_date.getHours()) + zeropad(start_date.getMinutes()) + zeropad(start_date.getSeconds());\n\n document.getElementById('saveSnapshotFilename').value = 'netdata-' + options.hostname.toString() + '-' + yyyymmddhhssmm.toString() + '-' + saveSnapshotViewDuration.toString() + '.snapshot';\n saveSnapshotSetCompression(saveSnapshotCompression);\n\n var min = options.update_every;\n var max = Math.round(saveSnapshotViewDuration / 100);\n\n if (Boolean(globalPanAndZoom)) {\n max = Math.round(saveSnapshotViewDuration / 50);\n }\n\n var view = Math.round(saveSnapshotViewDuration / Math.round($(document.getElementById('charts_div')).width() / 2));\n\n if (max < 10) {\n max = 10;\n }\n if (max < min) {\n max = min;\n }\n if (view < min) {\n view = min;\n }\n if (view > max) {\n view = max;\n }\n\n if (saveSnapshotSlider !== null) {\n saveSnapshotSlider.destroy();\n }\n\n saveSnapshotSlider = new Slider('#saveSnapshotResolutionSlider', {\n ticks: [min, view, max],\n min: min,\n max: max,\n step: options.update_every,\n value: view,\n scale: (max > 100) ? 'logarithmic' : 'linear',\n tooltip: 'always',\n formatter: function (value) {\n if (value < 1) {\n value = 1;\n }\n\n if (value < options.data.update_every) {\n value = options.data.update_every;\n }\n\n saveSnapshotSelectedSecondsPerPoint = value;\n saveSnapshotModalShowExpectedSize();\n\n var seconds = ' seconds ';\n if (value === 1) {\n seconds = ' second ';\n }\n\n return value + seconds + 'per point' + ((value === options.data.update_every) ? ', server default' : '').toString();\n }\n });\n });\n}\n\nwindow.saveSnapshot = () => {\n loadPako(function () {\n loadLzString(function () {\n saveSnapshotStop = false;\n $('#saveSnapshotModalProgressSection').show();\n $('#saveSnapshotResolutionRadio').hide();\n $('#saveSnapshotExport').addClass('disabled');\n\n var filename = document.getElementById('saveSnapshotFilename').value;\n // console.log(filename);\n saveSnapshotModalLog('info', 'Generating snapshot as <code>' + filename.toString() + '</code>');\n\n\n var el = document.getElementById('saveSnapshotModalProgressBar');\n var eltxt = document.getElementById('saveSnapshotModalProgressBarText');\n\n options.data.charts_by_name = null;\n const reduxState = reduxStore.getState()\n const defaultAfter = selectDefaultAfter(reduxState)\n\n var saveData = {\n hostname: options.hostname,\n server: serverDefault,\n netdata_version: options.data.version,\n snapshot_version: 1,\n after_ms: Date.now() + defaultAfter * 1000,\n before_ms: Date.now(),\n highlight_after_ms: urlOptions.highlight_after,\n highlight_before_ms: urlOptions.highlight_before,\n duration_ms: options.duration * 1000,\n update_every_ms: options.update_every * 1000,\n data_points: 0,\n url: ((urlOptions.server !== null) ? urlOptions.server : document.location.origin.toString() + document.location.pathname.toString() + document.location.search.toString()).toString(),\n comments: document.getElementById('saveSnapshotComments').value.toString(),\n hash: urlOptions.hash,\n charts: options.data,\n info: jsonStringifyFn({\n menu: netdataDashboard.menu,\n submenu: netdataDashboard.submenu,\n context: netdataDashboard.context\n }),\n charts_ok: 0,\n charts_failed: 0,\n compression: saveSnapshotCompression,\n data_size: 0,\n data: {}\n };\n\n if (typeof snapshotOptions.compressions[saveData.compression] === 'undefined') {\n alert('unknown compression method: ' + saveData.compression);\n saveData.compression = 'none';\n }\n\n var compress = snapshotOptions.compressions[saveData.compression].compress;\n var compressed_length = snapshotOptions.compressions[saveData.compression].compressed_length;\n\n function pack_api1_v1_chart_data({ data, chartDataUniqueID }) {\n if (data === null) {\n return 0\n }\n\n var str = JSON.stringify(data);\n\n var cstr = compress(str);\n saveData.data[chartDataUniqueID] = cstr;\n return compressed_length(cstr);\n }\n\n const globalPanAndZoom = selectGlobalPanAndZoom(reduxState)\n var clearPanAndZoom = false;\n if (!globalPanAndZoom) {\n reduxStore.dispatch(setGlobalPanAndZoomAction({\n after: saveData.after_ms,\n before: saveData.before_ms,\n }))\n clearPanAndZoom = true;\n } else {\n saveData.after_ms = globalPanAndZoom.after\n saveData.before_ms = globalPanAndZoom.before\n }\n\n\n saveData.duration_ms = saveData.before_ms - saveData.after_ms;\n saveData.data_points = Math.round((saveData.before_ms - saveData.after_ms) / (saveSnapshotSelectedSecondsPerPoint * 1000));\n saveSnapshotModalLog('info', 'Generating snapshot with ' + saveData.data_points.toString() + ' data points per dimension...');\n\n reduxStore.dispatch(startSnapshotModeAction({\n charts: saveData.charts,\n dataPoints: saveData.data_points,\n }))\n\n\n window.saveSnapshotRestore = () => {\n $('#saveSnapshotModal').modal('hide');\n\n $(el).css('width', '0%').attr('aria-valuenow', 0);\n eltxt.innerText = '0%';\n\n reduxStore.dispatch(stopSnapshotModeAction())\n reduxStore.dispatch(snapshotExportResetAction())\n if (clearPanAndZoom) {\n // clear that afterwards\n reduxStore.dispatch(resetGlobalPanAndZoomAction())\n }\n\n $('#saveSnapshotExport').removeClass('disabled');\n }\n\n var size = 0;\n var info = ' Resolution: <b>' + saveSnapshotSelectedSecondsPerPoint.toString() + ((saveSnapshotSelectedSecondsPerPoint === 1) ? ' second ' : ' seconds ').toString() + 'per point</b>.';\n\n window.chartUpdated = ({ chart, chartDataUniqueID, data }) => {\n if (saveSnapshotStop === true) {\n saveSnapshotModalLog('info', 'Cancelled!');\n saveSnapshotRestore()\n }\n const state = reduxStore.getState()\n const chartsCount = selectAmountOfCharts(state)\n const chartsOk = selectAmountOfSnapshotsFetched(state) // hook\n const chartsFailed = selectAmountOfSnapshotsFailed(state)\n\n const pcent = ((chartsOk + chartsFailed) / chartsCount) * 100\n $(el).css('width', pcent + '%').attr('aria-valuenow', pcent);\n eltxt.innerText = Math.round(pcent).toString() + '%, ' + (chart || data.id)\n\n size += pack_api1_v1_chart_data({ data, chartDataUniqueID })\n\n saveSnapshotModalLog((chartsFailed) ? 'danger' : 'info', 'Generated snapshot data size <b>' + (Math.round(size * 100 / 1024 / 1024) / 100).toString() + ' MB</b>. ' + ((chartsFailed) ? (chartsFailed.toString() + ' charts have failed to be downloaded') : '').toString() + info);\n\n window.saveData = saveData\n // better not to use equality against pcent in case of floating point errors\n if (chartsOk + chartsFailed === chartsCount) {\n saveData.charts_ok = chartsOk\n saveData.charts_failed = chartsFailed\n saveData.data_size = size\n\n saveObjectToClient(saveData, filename)\n if (chartsFailed > 0) {\n alert(`${chartsFailed} failed to be downloaded`);\n }\n saveSnapshotRestore()\n saveData = null\n }\n }\n\n // called for every chart\n function update_chart(idx) {\n if (saveSnapshotStop === true) {\n saveSnapshotModalLog('info', 'Cancelled!');\n saveSnapshotRestore();\n return;\n }\n\n var state = NETDATA.options.targets[--idx];\n\n var pcent = (NETDATA.options.targets.length - idx) * 100 / NETDATA.options.targets.length;\n $(el).css('width', pcent + '%').attr('aria-valuenow', pcent);\n eltxt.innerText = Math.round(pcent).toString() + '%, ' + state.id;\n\n setTimeout(function () {\n charts_count++;\n state.isVisible(true);\n state.current.force_after_ms = saveData.after_ms;\n state.current.force_before_ms = saveData.before_ms;\n\n state.updateChart(function (status, reason) {\n state.current.force_after_ms = null;\n state.current.force_before_ms = null;\n\n if (status === true) {\n charts_ok++;\n // state.log('ok');\n size += pack_api1_v1_chart_data(state);\n } else {\n charts_failed++;\n state.log('failed to be updated: ' + reason);\n }\n\n saveSnapshotModalLog((charts_failed) ? 'danger' : 'info', 'Generated snapshot data size <b>' + (Math.round(size * 100 / 1024 / 1024) / 100).toString() + ' MB</b>. ' + ((charts_failed) ? (charts_failed.toString() + ' charts have failed to be downloaded') : '').toString() + info);\n\n if (idx > 0) {\n update_chart(idx);\n } else {\n saveData.charts_ok = charts_ok;\n saveData.charts_failed = charts_failed;\n saveData.data_size = size;\n // console.log(saveData.compression + ': ' + (size / (options.data.dimensions_count * Math.round(saveSnapshotViewDuration / saveSnapshotSelectedSecondsPerPoint))).toString());\n\n // save it\n // console.log(saveData);\n saveObjectToClient(saveData, filename);\n\n if (charts_failed > 0) {\n alert(charts_failed.toString() + ' failed to be downloaded');\n }\n\n saveSnapshotRestore();\n saveData = null;\n }\n })\n }, 0);\n }\n\n });\n });\n}\n\n// --------------------------------------------------------------------\n// activate netdata on the page\nlet browser_timezone\ntry {\n browser_timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n} catch (e) {\n console.log('failed to detect browser timezone: ' + e.toString());\n browser_timezone = 'cannot-detect-it';\n}\n\nconst getOption = (option) => {\n const state = reduxStore.getState()\n return createSelectOption(option)(state)\n}\n\n\nfunction dashboardSettingsSetup() {\n var update_options_modal = function () {\n var sync_option = function (option) {\n var self = $('#' + option);\n\n if (self.prop('checked') !== getOption(option)) {\n // console.log('switching ' + option.toString());\n self.bootstrapToggle(getOption(option) ? 'on' : 'off');\n }\n };\n\n var theme_sync_option = function (option) {\n var self = $('#' + option);\n\n self.bootstrapToggle(netdataTheme === 'slate' ? 'on' : 'off');\n };\n var units_sync_option = function (option) {\n var self = $('#' + option);\n\n if (self.prop('checked') !== (getOption('units') === 'auto')) {\n self.bootstrapToggle(getOption('units') === 'auto' ? 'on' : 'off');\n }\n\n if (self.prop('checked') === true) {\n $('#settingsLocaleTempRow').show();\n $('#settingsLocaleTimeRow').show();\n } else {\n $('#settingsLocaleTempRow').hide();\n $('#settingsLocaleTimeRow').hide();\n }\n };\n var temp_sync_option = function (option) {\n var self = $('#' + option);\n\n if (self.prop('checked') !== (getOption('temperature') === 'celsius')) {\n self.bootstrapToggle(getOption('temperature') === 'celsius' ? 'on' : 'off');\n }\n };\n\n sync_option('stop_updates_when_focus_is_lost');\n sync_option('eliminate_zero_dimensions');\n sync_option('destroy_on_hide');\n sync_option('async_on_scroll');\n\n sync_option('parallel_refresher');\n sync_option('concurrent_refreshes');\n sync_option('sync_selection');\n\n sync_option('legend_right');\n theme_sync_option('netdata_theme_control');\n sync_option('show_help');\n sync_option('pan_and_zoom_data_padding');\n sync_option('smooth_plot');\n\n units_sync_option('units_conversion');\n temp_sync_option('units_temp');\n sync_option('seconds_as_time');\n\n if (getOption('parallel_refresher') === false) {\n $('#concurrent_refreshes_row').hide();\n } else {\n $('#concurrent_refreshes_row').show();\n }\n };\n\n update_options_modal();\n\n // handle options changes\n $('#eliminate_zero_dimensions').change(function () {\n setOption('eliminate_zero_dimensions', $(this).prop('checked'));\n });\n $('#destroy_on_hide').change(function () {\n setOption('destroy_on_hide', $(this).prop('checked'));\n });\n $('#async_on_scroll').change(function () {\n setOption('async_on_scroll', $(this).prop('checked'));\n });\n $('#parallel_refresher').change(function () {\n setOption('parallel_refresher', $(this).prop('checked'));\n });\n $('#concurrent_refreshes').change(function () {\n setOption('concurrent_refreshes', $(this).prop('checked'));\n });\n $('#sync_selection').change(function () {\n setOption('sync_selection', $(this).prop('checked'));\n netdataReload();\n });\n $('#stop_updates_when_focus_is_lost').change(function () {\n urlOptions.update_always = !$(this).prop('checked');\n urlOptions.hashUpdate();\n\n setOption('stop_updates_when_focus_is_lost', !urlOptions.update_always);\n });\n $('#smooth_plot').change(function () {\n setOption('smooth_plot', $(this).prop('checked'));\n });\n $('#pan_and_zoom_data_padding').change(function () {\n setOption('pan_and_zoom_data_padding', $(this).prop('checked'));\n });\n $('#seconds_as_time').change(function () {\n setOption('seconds_as_time', $(this).prop('checked'));\n });\n\n $('#units_conversion').change(function () {\n setOption('units', $(this).prop('checked') ? 'auto' : 'original');\n update_options_modal()\n });\n $('#units_temp').change(function () {\n setOption('temperature', $(this).prop('checked') ? 'celsius' : 'fahrenheit');\n });\n\n $('#legend_right').change(function () {\n setOption('legend_right', $(this).prop('checked'));\n // reloading for now, it's much easier than rebuilding charts bootstraping in main.js\n netdataReload();\n });\n\n $('#show_help').change(function () {\n urlOptions.help = $(this).prop('checked');\n urlOptions.hashUpdate();\n\n setOption('show_help', urlOptions.help);\n netdataReload();\n });\n\n // this has to be the last\n // it reloads the page\n $('#netdata_theme_control').change(function () {\n urlOptions.theme = $(this).prop('checked') ? 'slate' : 'white';\n urlOptions.hashUpdate();\n\n if (setTheme(urlOptions.theme)) {\n netdataReload();\n }\n });\n}\n\nconst CHART_DIV_ID_PREFIX = 'chart_'\nconst CHART_DIV_OFFSET = -50\n\nfunction scrollDashboardTo() {\n if (window.netdataSnapshotData !== null && typeof window.netdataSnapshotData.hash !== 'undefined') {\n scrollToId(window.netdataSnapshotData.hash.replace('#', ''));\n } else {\n // check if we have to jump to a specific section\n scrollToId(urlOptions.hash.replace('#', ''));\n if (urlOptions.chart !== null) {\n const chartElement = document.getElementById(`${CHART_DIV_ID_PREFIX}${name2id(urlOptions.chart)}`)\n if (chartElement) {\n const offset = chartElement.offsetTop + CHART_DIV_OFFSET;\n document.querySelector(\"html\").scrollTop = offset\n }\n }\n }\n}\n\nvar modalHiddenCallback = null;\n\nwindow.scrollToChartAfterHidingModal = (chart, alarmDate, alarmStatus) => {\n modalHiddenCallback = function () {\n\n if (typeof chart === 'string') {\n const chartElement = document.getElementById(`${CHART_DIV_ID_PREFIX}${name2id(chart)}`)\n if (chartElement) {\n const offset = chartElement.offsetTop + CHART_DIV_OFFSET;\n document.querySelector(\"html\").scrollTop = offset\n }\n }\n\n if (['WARNING', 'CRITICAL'].includes(alarmStatus)) {\n const twoMinutes = 2 * 60 * 1000\n reduxStore.dispatch(setGlobalPanAndZoomAction({\n after: alarmDate - twoMinutes,\n before: alarmDate + twoMinutes,\n }))\n }\n };\n}\n\n// ----------------------------------------------------------------------------\n\nfunction enableTooltipsAndPopovers() {\n $('[data-toggle=\"tooltip\"]').tooltip({\n animated: 'fade',\n trigger: 'hover',\n html: true,\n delay: { show: 500, hide: 0 },\n container: 'body'\n });\n $('[data-toggle=\"popover\"]').popover();\n}\n\n// ----------------------------------------------------------------------------\n\nvar runOnceOnDashboardLastRun = 0;\n\nfunction runOnceOnDashboardWithjQuery() {\n if (runOnceOnDashboardLastRun !== 0) {\n scrollDashboardTo();\n\n // restore the scrollspy at the proper position\n $(document.body).scrollspy('refresh');\n $(document.body).scrollspy('process');\n\n return;\n }\n\n runOnceOnDashboardLastRun = Date.now();\n\n // ------------------------------------------------------------------------\n // bootstrap modals\n\n // prevent bootstrap modals from scrolling the page\n // maintains the current scroll position\n // https://stackoverflow.com/a/34754029/4525767\n\n var scrollPos = 0;\n var modal_depth = 0; // how many modals are currently open\n var modal_shown = false; // set to true, if a modal is shown\n var netdata_paused_on_modal = false; // set to true, if the modal paused netdata\n var scrollspyOffset = $(window).height() / 3; // will be updated below - the offset of scrollspy to select an item\n\n $('.modal')\n .on('show.bs.modal', function () {\n if (modal_depth === 0) {\n scrollPos = window.scrollY;\n\n $('body').css({\n overflow: 'hidden',\n position: 'fixed',\n top: -scrollPos\n });\n\n modal_shown = true;\n\n if (NETDATA.options.pauseCallback === null) {\n NETDATA.pause(function () {\n });\n netdata_paused_on_modal = true;\n } else {\n netdata_paused_on_modal = false;\n }\n }\n\n modal_depth++;\n //console.log(urlOptions.after);\n\n })\n .on('hide.bs.modal', function () {\n\n modal_depth--;\n\n if (modal_depth <= 0) {\n modal_depth = 0;\n\n $('body')\n .css({\n overflow: '',\n position: '',\n top: ''\n });\n\n // scroll to the position we had open before the modal\n $('html, body')\n .animate({ scrollTop: scrollPos }, 0);\n\n // unpause netdata, if we paused it\n if (netdata_paused_on_modal === true) {\n NETDATA.unpause();\n netdata_paused_on_modal = false;\n }\n\n // restore the scrollspy at the proper position\n $(document.body).scrollspy('process');\n }\n //console.log(urlOptions.after);\n })\n .on('hidden.bs.modal', function () {\n if (modal_depth === 0) {\n modal_shown = false;\n }\n\n if (typeof modalHiddenCallback === 'function') {\n modalHiddenCallback();\n }\n\n modalHiddenCallback = null;\n //console.log(urlOptions.after);\n });\n\n // ------------------------------------------------------------------------\n // sidebar / affix\n\n $('#sidebar')\n .affix({\n offset: {\n top: 0,\n bottom: 0\n }\n })\n .on('affixed.bs.affix', function () {\n // fix scrolling of very long affix lists\n // http://stackoverflow.com/questions/21691585/bootstrap-3-1-0-affix-too-long\n\n $(this).removeAttr('style');\n })\n .on('affix-top.bs.affix', function () {\n // fix bootstrap affix click bug\n // https://stackoverflow.com/a/37847981/4525767\n\n if (modal_shown) {\n return false;\n }\n })\n .on('activate.bs.scrollspy', function (e) {\n // change the URL based on the current position of the screen\n\n if (modal_shown === false) {\n var el = $(e.target);\n var hash = el.find('a').attr('href');\n if (typeof hash === 'string' && hash.substring(0, 1) === '#' && urlOptions.hash.startsWith(hash + '_submenu_') === false) {\n urlOptions.hash = hash;\n urlOptions.hashUpdate();\n }\n }\n });\n\n Ps.initialize(document.getElementById('sidebar'), {\n wheelSpeed: 0.5,\n wheelPropagation: true,\n swipePropagation: true,\n minScrollbarLength: null,\n maxScrollbarLength: null,\n useBothWheelAxes: false,\n suppressScrollX: true,\n suppressScrollY: false,\n scrollXMarginOffset: 0,\n scrollYMarginOffset: 0,\n theme: 'default'\n });\n\n // ------------------------------------------------------------------------\n // scrollspy\n\n if (scrollspyOffset > 250) {\n scrollspyOffset = 250;\n }\n if (scrollspyOffset < 75) {\n scrollspyOffset = 75;\n }\n document.body.setAttribute('data-offset', scrollspyOffset);\n\n // scroll the dashboard, before activating the scrollspy, so that our\n // hash will not be updated before we got the chance to scroll to it\n scrollDashboardTo();\n\n $(document.body).scrollspy({\n target: '#sidebar',\n offset: scrollspyOffset // controls the diff of the <hX> element to the top, to select it\n });\n\n // ------------------------------------------------------------------------\n // my-netdata menu\n\n $('#deleteRegistryModal')\n .on('hidden.bs.modal', function () {\n deleteRegistryGuid = null;\n });\n\n // ------------------------------------------------------------------------\n // update modal\n\n $('#updateModal')\n .on('show.bs.modal', function () {\n versionLog('checking, please wait...');\n })\n .on('shown.bs.modal', function () {\n notifyForUpdate(true);\n });\n\n // ------------------------------------------------------------------------\n // alarms modal\n\n $('#alarmsModal')\n .on('shown.bs.modal', function () {\n alarmsUpdateModal();\n })\n .on('hidden.bs.modal', function () {\n document.getElementById('alarms_active').innerHTML =\n document.getElementById('alarms_all').innerHTML =\n document.getElementById('alarms_log').innerHTML =\n 'loading...';\n });\n\n // ------------------------------------------------------------------------\n\n dashboardSettingsSetup();\n loadSnapshotDragAndDropSetup();\n saveSnapshotModalSetup();\n showPageFooter();\n\n // ------------------------------------------------------------------------\n // https://github.com/viralpatel/jquery.shorten/blob/master/src/jquery.shorten.js\n\n $.fn.shorten = function (settings) {\n \"use strict\";\n\n var config = {\n showChars: 750,\n minHideChars: 10,\n ellipsesText: \"...\",\n moreText: '<i class=\"fas fa-expand\"></i> show more information',\n lessText: '<i class=\"fas fa-compress\"></i> show less information',\n onLess: function () {\n NETDATA.onscroll();\n },\n onMore: function () {\n NETDATA.onscroll();\n },\n errMsg: null,\n force: false\n };\n\n if (settings) {\n $.extend(config, settings);\n }\n\n if ($(this).data('jquery.shorten') && !config.force) {\n return false;\n }\n $(this).data('jquery.shorten', true);\n\n $(document).off(\"click\", '.morelink');\n\n $(document).on({\n click: function () {\n\n var $this = $(this);\n if ($this.hasClass('less')) {\n $this.removeClass('less');\n $this.html(config.moreText);\n $this.parent().prev().animate({ 'height': '0' + '%' }, 0, function () {\n $this.parent().prev().prev().show();\n }).hide(0, function () {\n config.onLess();\n });\n } else {\n $this.addClass('less');\n $this.html(config.lessText);\n $this.parent().prev().animate({ 'height': '100' + '%' }, 0, function () {\n $this.parent().prev().prev().hide();\n }).show(0, function () {\n config.onMore();\n });\n }\n return false;\n }\n }, '.morelink');\n\n return this.each(function () {\n var $this = $(this);\n\n var content = $this.html();\n var contentlen = $this.text().length;\n if (contentlen > config.showChars + config.minHideChars) {\n var c = content.substr(0, config.showChars);\n if (c.indexOf('<') >= 0) // If there's HTML don't want to cut it\n {\n var inTag = false; // I'm in a tag?\n var bag = ''; // Put the characters to be shown here\n var countChars = 0; // Current bag size\n var openTags = []; // Stack for opened tags, so I can close them later\n var tagName = null;\n\n for (var i = 0, r = 0; r <= config.showChars; i++) {\n if (content[i] === '<' && !inTag) {\n inTag = true;\n\n // This could be \"tag\" or \"/tag\"\n tagName = content.substring(i + 1, content.indexOf('>', i));\n\n // If its a closing tag\n if (tagName[0] === '/') {\n\n if (tagName !== ('/' + openTags[0])) {\n config.errMsg = 'ERROR en HTML: the top of the stack should be the tag that closes';\n } else {\n openTags.shift(); // Pops the last tag from the open tag stack (the tag is closed in the retult HTML!)\n }\n\n } else {\n // There are some nasty tags that don't have a close tag like <br/>\n if (tagName.toLowerCase() !== 'br') {\n openTags.unshift(tagName); // Add to start the name of the tag that opens\n }\n }\n }\n\n if (inTag && content[i] === '>') {\n inTag = false;\n }\n\n if (inTag) {\n bag += content.charAt(i);\n } else {\n // Add tag name chars to the result\n r++;\n if (countChars <= config.showChars) {\n bag += content.charAt(i); // Fix to ie 7 not allowing you to reference string characters using the []\n countChars++;\n } else {\n // Now I have the characters needed\n if (openTags.length > 0) {\n // I have unclosed tags\n\n for (var j = 0; j < openTags.length; j++) {\n bag += '</' + openTags[j] + '>'; // Close all tags that were opened\n\n // You could shift the tag from the stack to check if you end with an empty stack, that means you have closed all open tags\n }\n break;\n }\n }\n }\n }\n c = $('<div/>').html(bag + '<span class=\"ellip\">' + config.ellipsesText + '</span>').html();\n } else {\n c += config.ellipsesText;\n }\n\n var html = '<div class=\"shortcontent\">' + c +\n '</div><div class=\"allcontent\">' + content +\n '</div><span><a href=\"javascript://nop/\" class=\"morelink\">' + config.moreText + '</a></span>';\n\n $this.html(html);\n $this.find(\".allcontent\").hide(); // Hide all text\n $('.shortcontent p:last', $this).css('margin-bottom', 0); //Remove bottom margin on last paragraph as it's likely shortened\n }\n });\n };\n}\n\nfunction finalizePage() {\n if (urlOptions.after < 0) {\n reduxStore.dispatch(setDefaultAfterAction({ after: urlOptions.after }))\n } else if (urlOptions.pan_and_zoom === true) {\n reduxStore.dispatch(setGlobalPanAndZoomAction({\n after: urlOptions.after,\n before: urlOptions.before,\n }))\n }\n\n // resize all charts - without starting the background thread\n // this has to be done while NETDATA is paused\n // if we omit this, the affix menu will be wrong, since all\n // the Dom elements are initially zero-sized\n NETDATA.parseDom();\n\n // let it run (update the charts)\n NETDATA.unpause();\n\n runOnceOnDashboardWithjQuery();\n $(\".shorten\").shorten();\n enableTooltipsAndPopovers();\n\n if (!isDemo) {\n notifyForUpdate();\n }\n\n if (urlOptions.show_alarms === true) {\n setTimeout(function () {\n $('#alarmsModal').modal('show');\n }, 1000);\n }\n\n NETDATA.onresizeCallback = function () {\n Ps.update(document.getElementById('sidebar'));\n };\n NETDATA.onresizeCallback();\n\n if (window.netdataSnapshotData !== null) {\n reduxStore.dispatch(setGlobalPanAndZoomAction({\n after: window.netdataSnapshotData.after_ms,\n before: window.netdataSnapshotData.before_ms,\n }))\n }\n}\n\nwindow.resetDashboardOptions = () => {\n reduxStore.dispatch(resetOptionsAction())\n\n // it's dirty, but this will be rewritten anyway\n urlOptions.update_always = false;\n urlOptions.help = false;\n urlOptions.theme = \"slate\";\n urlOptions.hashUpdate();\n\n netdataReload()\n}\n\n// callback to add the dashboard info to the\n// parallel javascript downloader in netdata\nexport const netdataPrepCallback = () => {\n if (isDemo) {\n document.getElementById('masthead').style.display = 'block';\n } else {\n if (urlOptions.update_always === true) {\n setOption('stop_updates_when_focus_is_lost', !urlOptions.update_always);\n }\n }\n};\n\nwindow.selected_server_timezone = function (timezone, status) {\n // clear the error\n document.getElementById('timezone_error_message').innerHTML = '';\n\n if (typeof status === 'undefined') {\n // the user selected a timezone from the menu\n\n setOption('user_set_server_timezone', timezone);\n\n if (!isProperTimezone(timezone)) {\n setOption(\"timezone\", \"default\")\n\n if (!$('#local_timezone').prop('checked')) {\n $('#local_timezone').bootstrapToggle('on');\n }\n\n document.getElementById('timezone_error_message').innerHTML = 'Ooops! That timezone was not accepted by your browser. Please open a github issue to help us fix it.';\n setOption('user_set_server_timezone', options.timezone);\n } else {\n if ($('#local_timezone').prop('checked')) {\n $('#local_timezone').bootstrapToggle('off');\n }\n setOption(\"timezone\", timezone)\n }\n } else if (status === true) {\n // the user wants the browser default timezone to be activated\n setOption(\"timezone\", \"default\")\n } else {\n // the user wants the server default timezone to be activated\n\n let userSetServerTimezone = getOption(\"user_set_server_timezone\")\n if (userSetServerTimezone === 'default') {\n setOption(\"user_set_server_timezone\", options.timezone) // timezone from /charts endpoint\n userSetServerTimezone = options.timezone\n }\n\n if (!isProperTimezone(userSetServerTimezone)) {\n setOption(\"timezone\", \"default\");\n\n if (!$('#local_timezone').prop('checked')) {\n $('#local_timezone').bootstrapToggle('on');\n }\n\n document.getElementById('timezone_error_message').innerHTML = 'Sorry. The timezone \"' + timezone.toString() + '\" is not accepted by your browser. Please select one from the list.';\n setOption('user_set_server_timezone', options.timezone);\n } else {\n setOption(\"timezone\", userSetServerTimezone)\n }\n }\n\n const timezoneOption = getOption(\"timezone\")\n document.getElementById('current_timezone').innerText = (timezoneOption === 'default') ? 'unset, using browser default' : timezoneOption;\n return false;\n};\n\nexport var netdataCallback = initializeDynamicDashboard;\n\nwindow.showSignInModal = function() {\n document.getElementById(\"sim-registry\").innerHTML = getFromRegistry(\"registryServer\");\n $(\"#signInModal\").modal(\"show\");\n}\n\nwindow.explicitlySignIn = () => {\n $(\"#signInModal\").modal(\"hide\");\n reduxStore.dispatch(explicitlySignInAction())\n};\n","import { AlarmStatus } from \"domains/global/types\"\n\nexport const storeKey = \"global\"\n\nexport const TEMPORARY_MAIN_JS_TIMEOUT = 1000\n\nexport const MASKED_DATA = \"***\"\n\nexport const NOTIFICATIONS_TIMEOUT = 5000\n\nexport const INFO_POLLING_FREQUENCY = 5000\n\nexport const CLOUD_BASE_URL_DISABLED = \"CLOUD_BASE_URL_DISABLED\"\n\nexport const alarmStatuses: AlarmStatus[] = [\"WARNING\", \"ERROR\", \"REMOVED\", \"UNDEFINED\", \"UNINITIALIZED\", \"CLEAR\", \"CRITICAL\"]\n","import React, { useMemo } from \"react\"\nimport { CloudConnectionProps, ConnectionModalStatusContent } from \"./types\"\nimport Anchor from \"@/src/components/anchor\"\n\nimport { Text } from \"@netdata/netdata-ui\"\n\nexport const makeCloudConnectionStatusInfo = ({\n nodeStatus,\n userStatus,\n date,\n}: CloudConnectionProps): ConnectionModalStatusContent => ({\n title: \"Netdata Cloud connection status\",\n text: {\n header: () => {\n return (\n <Text>\n This node is currently{\" \"}\n <Text strong>{nodeStatus === \"LIVE\" ? \"Connected\" : \"Not Connected\"}</Text> to Netdata\n Cloud\n </Text>\n )\n },\n bullets:\n nodeStatus === \"NOT_LIVE\"\n ? [\n // `The node lost its Netdata Cloud connection at ${date}`,\n () => (\n <Text>\n To troubleshoot Netdata Cloud connection issues, please follow{\" \"}\n <Anchor\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href=\"https://learn.netdata.cloud/docs/agent/claim#troubleshooting\"\n >\n this guide\n </Anchor>\n .\n </Text>\n ),\n ]\n : [],\n footer: () => (\n <Text>\n You are{\" \"}\n <Text strong>\n {userStatus === \"LOGGED_IN\"\n ? \"Logged In\"\n : userStatus === \"EXPIRED_LOGIN\"\n ? \"Logged out\"\n : \"Not signed-up\"}\n </Text>{\" \"}\n to Netdata Cloud\n </Text>\n ),\n },\n CTA1: {\n text: \"Take me to Netdata Cloud\",\n },\n})\n\nconst useCloudConnectionStatus = ({ userStatus, nodeStatus, date }: CloudConnectionProps) => {\n const cloudConnectionStatusInfo = useMemo<ConnectionModalStatusContent>(() => {\n return makeCloudConnectionStatusInfo({ userStatus, nodeStatus, date })\n }, [userStatus, nodeStatus, date])\n\n return cloudConnectionStatusInfo\n}\n\nexport default useCloudConnectionStatus\n","import React, { useCallback } from \"react\"\nimport GoToCloud from \"components/auth/signIn\"\n\nimport {\n Modal,\n ModalContent,\n ModalBody,\n ModalFooter,\n ModalHeader,\n Text,\n Flex,\n H3,\n Button,\n Box,\n ModalCloseButton,\n} from \"@netdata/netdata-ui\"\n\nimport { ConnectionModalStatusContent } from \"./types\"\n\nconst campaign = \"agent_nudge_to_cloud\"\n\nexport type CloudConnectionStatusModalProps = ConnectionModalStatusContent & {\n closeModal: () => void\n onRefresh?: () => void\n isCTA1Disabled: boolean\n}\n\nconst CloudConnectionStatusModal = ({\n title,\n text,\n CTA1,\n closeModal,\n onRefresh,\n isCTA1Disabled,\n}: CloudConnectionStatusModalProps) => {\n const handleClickedCTA1 = useCallback(\n ({ link }: { link: string }) => {\n closeModal()\n window.location.href = link\n },\n [closeModal]\n )\n\n return (\n <Modal>\n <ModalContent width={180} background=\"modalBackground\">\n <ModalHeader>\n <H3 margin={[0]}>{title}</H3>\n <ModalCloseButton onClose={closeModal} />\n </ModalHeader>\n <ModalBody>\n <Flex padding={[0, 0, 4, 0]} column gap={3}>\n {text.header({})}\n {text.bullets.length > 0 && (\n <Flex column gap={3}>\n <Flex column gap={1} as={\"ul\"}>\n {text.bullets.map((bullet, index) => {\n if (typeof bullet === \"function\") {\n return <li key={index}> {bullet()}</li>\n }\n return (\n <li key={bullet}>\n <Text>{bullet}</Text>\n </li>\n )\n })}\n </Flex>\n </Flex>\n )}\n {text.footer()}\n </Flex>\n </ModalBody>\n <ModalFooter>\n <Box data-testid=\"cta1\" margin={[0, 2, 0, 0]} width={{ min: 40 }}>\n <GoToCloud utmParameters={{ content: \"connection_to_cloud\", campaign }}>\n {({ link }) => (\n <Button\n data-ga={`connection-to-cloud::click-ct1::ad`}\n disabled={isCTA1Disabled}\n textTransform=\"none\"\n data-testid=\"cta1-button\"\n onClick={() => handleClickedCTA1({ link })}\n width=\"100%\"\n label={CTA1.text}\n />\n )}\n </GoToCloud>\n </Box>\n <Box\n data-ga={`connection-to-cloud::click-check-now::ad`}\n onClick={onRefresh}\n height={10}\n className=\"btn btn-default\"\n data-testid=\"cta2-button\"\n width={{ min: 40 }}\n >\n <Box as={Text} sx={{ fontWeight: \"500\", lineHeight: \"25px\" }}>\n Check Now\n </Box>\n </Box>\n </ModalFooter>\n </ModalContent>\n </Modal>\n )\n}\n\nexport default CloudConnectionStatusModal\n","import React, { useState, useCallback, useEffect } from \"react\"\nimport useCloudConnectionStatus from \"./use-cloud-connection-status\"\nimport CloudConnectionStatusModal from \"./cloud-connection-status-modal\"\n\nimport { Pill, Flex } from \"@netdata/netdata-ui\"\nimport { useSelector } from \"react-redux\"\nimport { useRequestRefreshOfAccessMessage } from \"hooks/use-user-node-access\"\nimport { selectUserNodeAccess } from \"domains/global/selectors\"\nimport { PromoProps } from \"@/src/domains/dashboard/components/migration-modal\"\nimport { selectIsCloudEnabled } from \"domains/global/selectors\"\n\nconst CloudConnectionStatus = () => {\n const userNodeAccess = useSelector(selectUserNodeAccess) as PromoProps\n const cloudEnabled = useSelector(selectIsCloudEnabled)\n\n const [isModalOpen, setModalOpen] = useState(false)\n const cloudConnectionStatusInfo = useCloudConnectionStatus({\n userStatus: userNodeAccess?.userStatus || \"UNKNOWN\",\n nodeStatus: userNodeAccess?.nodeLiveness || \"NOT_LIVE\",\n date: \"\",\n })\n\n useEffect(() => {\n if (isModalOpen) {\n document.documentElement.style.overflow = \"hidden\"\n } else {\n document.documentElement.style.overflow = \"auto\"\n }\n }, [isModalOpen])\n\n const openModal = useCallback(() => {\n setModalOpen(true)\n }, [])\n\n const closeModal = useCallback(() => {\n setModalOpen(false)\n }, [])\n\n const onRefresh = useRequestRefreshOfAccessMessage()\n\n if (!cloudEnabled) return null\n\n return (\n <Flex column>\n <Pill\n data-ga={`connection-to-cloud::click-pill::ad`}\n data-testid=\"header-connection-to-cloud-button\"\n onClick={openModal}\n flavour=\"neutral\"\n >\n Connection to Cloud\n </Pill>\n {isModalOpen && (\n <CloudConnectionStatusModal\n {...cloudConnectionStatusInfo}\n isCTA1Disabled={userNodeAccess?.nodeLiveness !== \"LIVE\"}\n closeModal={closeModal}\n onRefresh={onRefresh}\n />\n )}\n </Flex>\n )\n}\n\nexport default CloudConnectionStatus\n","import { equals } from \"ramda\"\n\n// we use numbers to specify time. it can be either a timestamp (ms), or a relative value in seconds\n// which is always 0 or less (0 is now, -300 is -5 minutes)\n\nexport const isTimestamp = (x: number) => x > 0\n\nexport const NETDATA_REGISTRY_SERVER = \"https://registry.my-netdata.io\"\n\nexport const MS_IN_SECOND = 1000\nexport const NODE_VIEW_DYGRAPH_TITLE_HEIGHT = 30\nexport const DEFAULT_DASHBOARD_DURATION = 5 * 60\n\nexport const getIframeSrc = (cloudBaseURL: string, path: string) => `${cloudBaseURL}/sso/v2/${path}`\nexport const utmUrlSuffix = \"&utm_source=agent&utm_medium=web\"\n\nexport const getInitialAfterFromWindow = () => {\n const div = document.getElementById(\"charts_div\")\n if (!div) {\n // eslint-disable-next-line no-console\n console.error(\"Couldn't find '.charts_div' element to calculate width\")\n return -900\n }\n // based on https://github.com/netdata/dashboard/blob/7a7b538b00f1c5a4e1550f69cb5333212bb68f95/src/main.js#L1753\n // eslint-disable-next-line max-len\n // var duration = Math.round(($(div).width() * pcent_width / 100 * data.update_every / 3) / 60) * 60;\n return -Math.round(div.getBoundingClientRect().width / 3 / 60) * 60\n}\n\nexport const SPACE_PANEL_STATE = \"space-panel-state\"\n\nexport const useNewKeysOnlyIfDifferent = <T extends {}>(\n keys: (keyof T)[],\n obj1: T | null,\n obj2: T\n): T => {\n if (!obj1) {\n return obj2\n }\n return keys.reduce<T>(\n (acc, key) => ({\n ...acc,\n [key]: equals(obj1[key], obj2![key]) ? obj1[key] : obj2[key],\n }),\n obj2\n )\n}\n\nexport type AnyFunction<T = any> = (...args: T[]) => any\n\nexport type FunctionArguments<T extends Function> = T extends (...args: infer R) => any ? R : never\n\nexport function callAll<T extends AnyFunction>(...fns: (T | undefined)[]) {\n return function mergedFn(arg: FunctionArguments<T>[0]) {\n fns.forEach(fn => {\n fn?.(arg)\n })\n }\n}\n","/* eslint-disable */\n/*!\n * d3pie\n * @author Ben Keen\n * @version 0.1.9\n * @date June 17th, 2015\n * @repo http://github.com/benkeen/d3pie\n * SPDX-License-Identifier: MIT\n */\n\n// UMD pattern from https://github.com/umdjs/umd/blob/master/returnExports.js\n(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module\n define([], factory);\n } else if (typeof exports === 'object') {\n // Node. Does not work with strict CommonJS, but only CommonJS-like environments that support module.exports,\n // like Node\n module.exports = factory();\n } else {\n // browser globals (root is window)\n root.d3pie = factory(root);\n }\n}(this, function() {\n\n var _scriptName = \"d3pie\";\n var _version = \"0.2.1\";\n\n // used to uniquely generate IDs and classes, ensuring no conflict between multiple pies on the same page\n var _uniqueIDCounter = 0;\n\n\n // this section includes all helper libs on the d3pie object. They're populated via grunt-template. Note: to keep\n // the syntax highlighting from getting all messed up, I commented out each line. That REQUIRES each of the files\n // to have an empty first line. Crumby, yes, but acceptable.\n //// --------- _default-settings.js -----------/**\n/**\n * Contains the out-the-box settings for the script. Any of these settings that aren't explicitly overridden for the\n * d3pie instance will inherit from these. This is also included on the main website for use in the generation script.\n */\nvar defaultSettings = {\n header: {\n title: {\n text: \"\",\n color: \"#333333\",\n fontSize: 18,\n fontWeight: \"bold\",\n font: \"arial\"\n },\n subtitle: {\n text: \"\",\n color: \"#666666\",\n fontSize: 14,\n fontWeight: \"bold\",\n font: \"arial\"\n },\n location: \"top-center\",\n titleSubtitlePadding: 8\n },\n footer: {\n text: \t \"\",\n color: \"#666666\",\n fontSize: 14,\n fontWeight: \"bold\",\n font: \"arial\",\n location: \"left\"\n },\n size: {\n canvasHeight: 500,\n canvasWidth: 500,\n pieInnerRadius: \"0%\",\n pieOuterRadius: null\n },\n data: {\n sortOrder: \"none\",\n ignoreSmallSegments: {\n enabled: false,\n valueType: \"percentage\",\n value: null\n },\n smallSegmentGrouping: {\n enabled: false,\n value: 1,\n valueType: \"percentage\",\n label: \"Other\",\n color: \"#cccccc\"\n },\n content: []\n },\n labels: {\n outer: {\n format: \"label\",\n hideWhenLessThanPercentage: null,\n pieDistance: 30\n },\n inner: {\n format: \"percentage\",\n hideWhenLessThanPercentage: null\n },\n mainLabel: {\n color: \"#333333\",\n font: \"arial\",\n fontWeight: \"normal\",\n fontSize: 10\n },\n percentage: {\n color: \"#dddddd\",\n font: \"arial\",\n fontWeight: \"bold\",\n fontSize: 10,\n decimalPlaces: 0\n },\n value: {\n color: \"#cccc44\",\n fontWeight: \"bold\",\n font: \"arial\",\n fontSize: 10\n },\n lines: {\n enabled: true,\n style: \"curved\",\n color: \"segment\"\n },\n truncation: {\n enabled: false,\n truncateLength: 30\n },\n formatter: null\n },\n effects: {\n load: {\n effect: \"none\", // \"default\", commented in the code\n speed: 1000\n },\n pullOutSegmentOnClick: {\n effect: \"none\", // \"bounce\", commented in the code\n speed: 300,\n size: 10\n },\n highlightSegmentOnMouseover: false,\n highlightLuminosity: -0.2\n },\n tooltips: {\n enabled: false,\n type: \"placeholder\", // caption|placeholder\n string: \"\",\n placeholderParser: null,\n styles: {\n fadeInSpeed: 250,\n backgroundColor: \"#000000\",\n backgroundOpacity: 0.5,\n color: \"#efefef\",\n borderRadius: 2,\n font: \"arial\",\n fontWeight: \"bold\",\n fontSize: 10,\n padding: 4\n }\n },\n misc: {\n colors: {\n background: null,\n segments: [\n \"#2484c1\", \"#65a620\", \"#7b6888\", \"#a05d56\", \"#961a1a\", \"#d8d23a\", \"#e98125\", \"#d0743c\", \"#635222\", \"#6ada6a\",\n \"#0c6197\", \"#7d9058\", \"#207f33\", \"#44b9b0\", \"#bca44a\", \"#e4a14b\", \"#a3acb2\", \"#8cc3e9\", \"#69a6f9\", \"#5b388f\",\n \"#546e91\", \"#8bde95\", \"#d2ab58\", \"#273c71\", \"#98bf6e\", \"#4daa4b\", \"#98abc5\", \"#cc1010\", \"#31383b\", \"#006391\",\n \"#c2643f\", \"#b0a474\", \"#a5a39c\", \"#a9c2bc\", \"#22af8c\", \"#7fcecf\", \"#987ac6\", \"#3d3b87\", \"#b77b1c\", \"#c9c2b6\",\n \"#807ece\", \"#8db27c\", \"#be66a2\", \"#9ed3c6\", \"#00644b\", \"#005064\", \"#77979f\", \"#77e079\", \"#9c73ab\", \"#1f79a7\"\n ],\n segmentStroke: \"#ffffff\"\n },\n gradient: {\n enabled: false,\n percentage: 95,\n color: \"#000000\"\n },\n canvasPadding: {\n top: 5,\n right: 5,\n bottom: 5,\n left: 5\n },\n pieCenterOffset: {\n x: 0,\n y: 0\n },\n cssPrefix: null\n },\n callbacks: {\n onload: null,\n onMouseoverSegment: null,\n onMouseoutSegment: null,\n onClickSegment: null\n }\n};\n\n //// --------- validate.js -----------\nvar validate = {\n\n // called whenever a new pie chart is created\n initialCheck: function(pie) {\n var cssPrefix = pie.cssPrefix;\n var element = pie.element;\n var options = pie.options;\n\n // confirm d3 is available [check minimum version]\n if (!window.d3 || !window.d3.hasOwnProperty(\"version\")) {\n console.error(\"d3pie error: d3 is not available\");\n return false;\n }\n\n // confirm element is either a DOM element or a valid string for a DOM element\n if (!(element instanceof HTMLElement || element instanceof SVGElement)) {\n console.error(\"d3pie error: the first d3pie() param must be a valid DOM element (not jQuery) or a ID string.\");\n return false;\n }\n\n // confirm the CSS prefix is valid. It has to start with a-Z and contain nothing but a-Z0-9_-\n if (!(/[a-zA-Z][a-zA-Z0-9_-]*$/.test(cssPrefix))) {\n console.error(\"d3pie error: invalid options.misc.cssPrefix\");\n return false;\n }\n\n // confirm some data has been supplied\n if (!helpers.isArray(options.data.content)) {\n console.error(\"d3pie error: invalid config structure: missing data.content property.\");\n return false;\n }\n if (options.data.content.length === 0) {\n console.error(\"d3pie error: no data supplied.\");\n return false;\n }\n\n // clear out any invalid data. Each data row needs a valid positive number and a label\n var data = [];\n for (var i=0; i<options.data.content.length; i++) {\n if (typeof options.data.content[i].value !== \"number\" || isNaN(options.data.content[i].value)) {\n console.log(\"not valid: \", options.data.content[i]);\n continue;\n }\n if (options.data.content[i].value <= 0) {\n console.log(\"not valid - should have positive value: \", options.data.content[i]);\n continue;\n }\n data.push(options.data.content[i]);\n }\n pie.options.data.content = data;\n\n // labels.outer.hideWhenLessThanPercentage - 1-100\n // labels.inner.hideWhenLessThanPercentage - 1-100\n\n return true;\n }\n};\n\n //// --------- helpers.js -----------\nvar helpers = {\n\n // creates the SVG element\n addSVGSpace: function(pie) {\n var element = pie.element;\n var canvasWidth = pie.options.size.canvasWidth;\n var canvasHeight = pie.options.size.canvasHeight;\n var backgroundColor = pie.options.misc.colors.background;\n\n var svg = d3.select(element).append(\"svg:svg\")\n .attr(\"width\", canvasWidth)\n .attr(\"height\", canvasHeight);\n\n if (backgroundColor !== \"transparent\") {\n svg.style(\"background-color\", function() { return backgroundColor; });\n }\n\n return svg;\n },\n\n shuffleArray: function(array) {\n var currentIndex = array.length, tmpVal, randomIndex;\n\n while (0 !== currentIndex) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n\n // and swap it with the current element\n tmpVal = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = tmpVal;\n }\n return array;\n },\n\n processObj: function(obj, is, value) {\n if (typeof is === 'string') {\n return helpers.processObj(obj, is.split('.'), value);\n } else if (is.length === 1 && value !== undefined) {\n obj[is[0]] = value;\n return obj[is[0]];\n } else if (is.length === 0) {\n return obj;\n } else {\n return helpers.processObj(obj[is[0]], is.slice(1), value);\n }\n },\n\n getDimensions: function(el) {\n if(typeof el === 'string')\n el = document.getElementById(el);\n\n var w = 0, h = 0;\n if (el) {\n var dimensions = el.getBBox();\n w = dimensions.width;\n h = dimensions.height;\n }\n else {\n console.log(\"error: getDimensions() \" + id + \" not found.\");\n }\n\n return { w: w, h: h };\n },\n\n /**\n * This is based on the SVG coordinate system, where top-left is 0,0 and bottom right is n-n.\n * @param r1\n * @param r2\n * @returns {boolean}\n */\n rectIntersect: function(r1, r2) {\n var returnVal = (\n // r2.left > r1.right\n (r2.x > (r1.x + r1.w)) ||\n\n // r2.right < r1.left\n ((r2.x + r2.w) < r1.x) ||\n\n // r2.top < r1.bottom\n ((r2.y + r2.h) < r1.y) ||\n\n // r2.bottom > r1.top\n (r2.y > (r1.y + r1.h))\n );\n\n return !returnVal;\n },\n\n /**\n * Returns a lighter/darker shade of a hex value, based on a luminance value passed.\n * @param hex a hex color value such as “#abc” or “#123456″ (the hash is optional)\n * @param lum the luminosity factor: -0.1 is 10% darker, 0.2 is 20% lighter, etc.\n * @returns {string}\n */\n getColorShade: function(hex, lum) {\n\n // validate hex string\n hex = String(hex).replace(/[^0-9a-f]/gi, '');\n if (hex.length < 6) {\n hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];\n }\n lum = lum || 0;\n\n // convert to decimal and change luminosity\n var newHex = \"#\";\n for (var i=0; i<3; i++) {\n var c = parseInt(hex.substr(i * 2, 2), 16);\n c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);\n newHex += (\"00\" + c).substr(c.length);\n }\n\n return newHex;\n },\n\n /**\n * Users can choose to specify segment colors in three ways (in order of precedence):\n * \t1. include a \"color\" attribute for each row in data.content\n * \t2. include a misc.colors.segments property which contains an array of hex codes\n * \t3. specify nothing at all and rely on this lib provide some reasonable defaults\n *\n * This function sees what's included and populates this.options.colors with whatever's required\n * for this pie chart.\n * @param data\n */\n initSegmentColors: function(pie) {\n var data = pie.options.data.content;\n var colors = pie.options.misc.colors.segments;\n\n // TODO this needs a ton of error handling\n\n var finalColors = [];\n for (var i=0; i<data.length; i++) {\n if (data[i].hasOwnProperty(\"color\")) {\n finalColors.push(data[i].color);\n } else {\n finalColors.push(colors[i]);\n }\n }\n\n return finalColors;\n },\n\n applySmallSegmentGrouping: function(data, smallSegmentGrouping) {\n var totalSize;\n if (smallSegmentGrouping.valueType === \"percentage\") {\n totalSize = math.getTotalPieSize(data);\n }\n\n // loop through each data item\n var newData = [];\n var groupedData = [];\n var totalGroupedData = 0;\n for (var i=0; i<data.length; i++) {\n if (smallSegmentGrouping.valueType === \"percentage\") {\n var dataPercent = (data[i].value / totalSize) * 100;\n if (dataPercent <= smallSegmentGrouping.value) {\n groupedData.push(data[i]);\n totalGroupedData += data[i].value;\n continue;\n }\n data[i].isGrouped = false;\n newData.push(data[i]);\n } else {\n if (data[i].value <= smallSegmentGrouping.value) {\n groupedData.push(data[i]);\n totalGroupedData += data[i].value;\n continue;\n }\n data[i].isGrouped = false;\n newData.push(data[i]);\n }\n }\n\n // we're done! See if there's any small segment groups to add\n if (groupedData.length) {\n newData.push({\n color: smallSegmentGrouping.color,\n label: smallSegmentGrouping.label,\n value: totalGroupedData,\n isGrouped: true,\n groupedData: groupedData\n });\n }\n\n return newData;\n },\n\n // for debugging\n showPoint: function(svg, x, y) {\n svg.append(\"circle\").attr(\"cx\", x).attr(\"cy\", y).attr(\"r\", 2).style(\"fill\", \"black\");\n },\n\n isFunction: function(functionToCheck) {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n },\n\n isArray: function(o) {\n return Object.prototype.toString.call(o) === '[object Array]';\n }\n};\n\n\n// taken from jQuery\nvar extend = function() {\n var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {},\n i = 1,\n length = arguments.length,\n deep = false,\n toString = Object.prototype.toString,\n hasOwn = Object.prototype.hasOwnProperty,\n class2type = {\n \"[object Boolean]\": \"boolean\",\n \"[object Number]\": \"number\",\n \"[object String]\": \"string\",\n \"[object Function]\": \"function\",\n \"[object Array]\": \"array\",\n \"[object Date]\": \"date\",\n \"[object RegExp]\": \"regexp\",\n \"[object Object]\": \"object\"\n },\n\n jQuery = {\n isFunction: function (obj) {\n return jQuery.type(obj) === \"function\";\n },\n isArray: Array.isArray ||\n function (obj) {\n return jQuery.type(obj) === \"array\";\n },\n isWindow: function (obj) {\n return obj !== null && obj === obj.window;\n },\n isNumeric: function (obj) {\n return !isNaN(parseFloat(obj)) && isFinite(obj);\n },\n type: function (obj) {\n return obj === null ? String(obj) : class2type[toString.call(obj)] || \"object\";\n },\n isPlainObject: function (obj) {\n if (!obj || jQuery.type(obj) !== \"object\" || obj.nodeType) {\n return false;\n }\n try {\n if (obj.constructor && !hasOwn.call(obj, \"constructor\") && !hasOwn.call(obj.constructor.prototype, \"isPrototypeOf\")) {\n return false;\n }\n } catch (e) {\n return false;\n }\n var key;\n for (key in obj) {}\n return key === undefined || hasOwn.call(obj, key);\n }\n };\n if (typeof target === \"boolean\") {\n deep = target;\n target = arguments[1] || {};\n i = 2;\n }\n if (typeof target !== \"object\" && !jQuery.isFunction(target)) {\n target = {};\n }\n if (length === i) {\n target = this;\n --i;\n }\n for (i; i < length; i++) {\n if ((options = arguments[i]) !== null) {\n for (name in options) {\n src = target[name];\n copy = options[name];\n if (target === copy) {\n continue;\n }\n if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)))) {\n if (copyIsArray) {\n copyIsArray = false;\n clone = src && jQuery.isArray(src) ? src : [];\n } else {\n clone = src && jQuery.isPlainObject(src) ? src : {};\n }\n // WARNING: RECURSION\n target[name] = extend(deep, clone, copy);\n } else if (copy !== undefined) {\n target[name] = copy;\n }\n }\n }\n }\n return target;\n};\n //// --------- math.js -----------\nvar math = {\n\n toRadians: function(degrees) {\n return degrees * (Math.PI / 180);\n },\n\n toDegrees: function(radians) {\n return radians * (180 / Math.PI);\n },\n\n computePieRadius: function(pie) {\n var size = pie.options.size;\n var canvasPadding = pie.options.misc.canvasPadding;\n\n // outer radius is either specified (e.g. through the generator), or omitted altogether\n // and calculated based on the canvas dimensions. Right now the estimated version isn't great - it should\n // be possible to calculate it to precisely generate the maximum sized pie, but it's fussy as heck. Something\n // for the next release.\n\n // first, calculate the default _outerRadius\n var w = size.canvasWidth - canvasPadding.left - canvasPadding.right;\n var h = size.canvasHeight - canvasPadding.top - canvasPadding.bottom;\n\n // now factor in the footer, title & subtitle\n if (pie.options.header.location !== \"pie-center\") {\n h -= pie.textComponents.headerHeight;\n }\n\n if (pie.textComponents.footer.exists) {\n h -= pie.textComponents.footer.h;\n }\n\n // for really teeny pies, h may be < 0. Adjust it back\n h = (h < 0) ? 0 : h;\n\n var outerRadius = ((w < h) ? w : h) / 3;\n var innerRadius, percent;\n\n // if the user specified something, use that instead\n if (size.pieOuterRadius !== null) {\n if (/%/.test(size.pieOuterRadius)) {\n percent = parseInt(size.pieOuterRadius.replace(/[\\D]/, \"\"), 10);\n percent = (percent > 99) ? 99 : percent;\n percent = (percent < 0) ? 0 : percent;\n\n var smallestDimension = (w < h) ? w : h;\n\n // now factor in the label line size\n if (pie.options.labels.outer.format !== \"none\") {\n var pieDistanceSpace = parseInt(pie.options.labels.outer.pieDistance, 10) * 2;\n if (smallestDimension - pieDistanceSpace > 0) {\n smallestDimension -= pieDistanceSpace;\n }\n }\n\n outerRadius = Math.floor((smallestDimension / 100) * percent) / 2;\n } else {\n outerRadius = parseInt(size.pieOuterRadius, 10);\n }\n }\n\n // inner radius\n if (/%/.test(size.pieInnerRadius)) {\n percent = parseInt(size.pieInnerRadius.replace(/[\\D]/, \"\"), 10);\n percent = (percent > 99) ? 99 : percent;\n percent = (percent < 0) ? 0 : percent;\n innerRadius = Math.floor((outerRadius / 100) * percent);\n } else {\n innerRadius = parseInt(size.pieInnerRadius, 10);\n }\n\n pie.innerRadius = innerRadius;\n pie.outerRadius = outerRadius;\n },\n\n getTotalPieSize: function(data) {\n var totalSize = 0;\n for (var i=0; i<data.length; i++) {\n totalSize += data[i].value;\n }\n return totalSize;\n },\n\n sortPieData: function(pie) {\n var data = pie.options.data.content;\n var sortOrder = pie.options.data.sortOrder;\n\n switch (sortOrder) {\n case \"none\":\n // do nothing\n break;\n case \"random\":\n data = helpers.shuffleArray(data);\n break;\n case \"value-asc\":\n data.sort(function(a, b) { return (a.value < b.value) ? -1 : 1; });\n break;\n case \"value-desc\":\n data.sort(function(a, b) { return (a.value < b.value) ? 1 : -1; });\n break;\n case \"label-asc\":\n data.sort(function(a, b) { return (a.label.toLowerCase() > b.label.toLowerCase()) ? 1 : -1; });\n break;\n case \"label-desc\":\n data.sort(function(a, b) { return (a.label.toLowerCase() < b.label.toLowerCase()) ? 1 : -1; });\n break;\n }\n\n return data;\n },\n\n // var pieCenter = math.getPieCenter();\n getPieTranslateCenter: function(pieCenter) {\n return \"translate(\" + pieCenter.x + \",\" + pieCenter.y + \")\";\n },\n\n /**\n * Used to determine where on the canvas the center of the pie chart should be. It takes into account the\n * height and position of the title, subtitle and footer, and the various paddings.\n * @private\n */\n calculatePieCenter: function(pie) {\n var pieCenterOffset = pie.options.misc.pieCenterOffset;\n var hasTopTitle = (pie.textComponents.title.exists && pie.options.header.location !== \"pie-center\");\n var hasTopSubtitle = (pie.textComponents.subtitle.exists && pie.options.header.location !== \"pie-center\");\n\n var headerOffset = pie.options.misc.canvasPadding.top;\n if (hasTopTitle && hasTopSubtitle) {\n headerOffset += pie.textComponents.title.h + pie.options.header.titleSubtitlePadding + pie.textComponents.subtitle.h;\n } else if (hasTopTitle) {\n headerOffset += pie.textComponents.title.h;\n } else if (hasTopSubtitle) {\n headerOffset += pie.textComponents.subtitle.h;\n }\n\n var footerOffset = 0;\n if (pie.textComponents.footer.exists) {\n footerOffset = pie.textComponents.footer.h + pie.options.misc.canvasPadding.bottom;\n }\n\n var x = ((pie.options.size.canvasWidth - pie.options.misc.canvasPadding.left - pie.options.misc.canvasPadding.right) / 2) + pie.options.misc.canvasPadding.left;\n var y = ((pie.options.size.canvasHeight - footerOffset - headerOffset) / 2) + headerOffset;\n\n x += pieCenterOffset.x;\n y += pieCenterOffset.y;\n\n pie.pieCenter = { x: x, y: y };\n },\n\n\n /**\n * Rotates a point (x, y) around an axis (xm, ym) by degrees (a).\n * @param x\n * @param y\n * @param xm\n * @param ym\n * @param a angle in degrees\n * @returns {Array}\n */\n rotate: function(x, y, xm, ym, a) {\n\n a = a * Math.PI / 180; // convert to radians\n\n var cos = Math.cos,\n sin = Math.sin,\n // subtract midpoints, so that midpoint is translated to origin and add it in the end again\n xr = (x - xm) * cos(a) - (y - ym) * sin(a) + xm,\n yr = (x - xm) * sin(a) + (y - ym) * cos(a) + ym;\n\n return { x: xr, y: yr };\n },\n\n /**\n * Translates a point x, y by distance d, and by angle a.\n * @param x\n * @param y\n * @param dist\n * @param a angle in degrees\n */\n translate: function(x, y, d, a) {\n var rads = math.toRadians(a);\n return {\n x: x + d * Math.sin(rads),\n y: y - d * Math.cos(rads)\n };\n },\n\n // from: http://stackoverflow.com/questions/19792552/d3-put-arc-labels-in-a-pie-chart-if-there-is-enough-space\n pointIsInArc: function(pt, ptData, d3Arc) {\n // Center of the arc is assumed to be 0,0\n // (pt.x, pt.y) are assumed to be relative to the center\n var r1 = d3Arc.innerRadius()(ptData), // Note: Using the innerRadius\n r2 = d3Arc.outerRadius()(ptData),\n theta1 = d3Arc.startAngle()(ptData),\n theta2 = d3Arc.endAngle()(ptData);\n\n var dist = pt.x * pt.x + pt.y * pt.y,\n angle = Math.atan2(pt.x, -pt.y); // Note: different coordinate system\n\n angle = (angle < 0) ? (angle + Math.PI * 2) : angle;\n\n return (r1 * r1 <= dist) && (dist <= r2 * r2) &&\n (theta1 <= angle) && (angle <= theta2);\n }\n};\n\n //// --------- labels.js -----------\nvar labels = {\n\n /**\n * Adds the labels to the pie chart, but doesn't position them. There are two locations for the\n * labels: inside (center) of the segments, or outside the segments on the edge.\n * @param section \"inner\" or \"outer\"\n * @param sectionDisplayType \"percentage\", \"value\", \"label\", \"label-value1\", etc.\n * @param pie\n */\n add: function(pie, section, sectionDisplayType) {\n var include = labels.getIncludes(sectionDisplayType);\n var settings = pie.options.labels;\n\n // group the label groups (label, percentage, value) into a single element for simpler positioning\n var outerLabel = pie.svg.insert(\"g\", \".\" + pie.cssPrefix + \"labels-\" + section)\n .attr(\"class\", pie.cssPrefix + \"labels-\" + section);\n\n var labelGroup = pie.__labels[section] = outerLabel.selectAll(\".\" + pie.cssPrefix + \"labelGroup-\" + section)\n .data(pie.options.data.content)\n .enter()\n .append(\"g\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"labelGroup\" + i + \"-\" + section; })\n .attr(\"data-index\", function(d, i) { return i; })\n .attr(\"class\", pie.cssPrefix + \"labelGroup-\" + section)\n .style(\"opacity\", 0);\n\n var formatterContext = { section: section, sectionDisplayType: sectionDisplayType };\n\n // 1. Add the main label\n if (include.mainLabel) {\n labelGroup.append(\"text\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"segmentMainLabel\" + i + \"-\" + section; })\n .attr(\"class\", pie.cssPrefix + \"segmentMainLabel-\" + section)\n .text(function(d, i) {\n var str = d.label;\n\n // if a custom formatter has been defined, pass it the raw label string - it can do whatever it wants with it.\n // we only apply truncation if it's not defined\n if (settings.formatter) {\n formatterContext.index = i;\n formatterContext.part = 'mainLabel';\n formatterContext.value = d.value;\n formatterContext.label = str;\n str = settings.formatter(formatterContext);\n } else if (settings.truncation.enabled && d.label.length > settings.truncation.truncateLength) {\n str = d.label.substring(0, settings.truncation.truncateLength) + \"...\";\n }\n return str;\n })\n .style(\"font-size\", settings.mainLabel.fontSize + \"px\")\n .style(\"font-family\", settings.mainLabel.font)\n .style(\"font-weight\", settings.mainLabel.fontWeight)\n .style(\"fill\", function(d, i) {\n return (settings.mainLabel.color === \"segment\") ? pie.options.colors[i] : settings.mainLabel.color;\n });\n }\n\n // 2. Add the percentage label\n if (include.percentage) {\n labelGroup.append(\"text\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"segmentPercentage\" + i + \"-\" + section; })\n .attr(\"class\", pie.cssPrefix + \"segmentPercentage-\" + section)\n .text(function(d, i) {\n var percentage = d.percentage;\n if (settings.formatter) {\n formatterContext.index = i;\n formatterContext.part = \"percentage\";\n formatterContext.value = d.value;\n formatterContext.label = d.percentage;\n percentage = settings.formatter(formatterContext);\n } else {\n percentage += \"%\";\n }\n return percentage;\n })\n .style(\"font-size\", settings.percentage.fontSize + \"px\")\n .style(\"font-family\", settings.percentage.font)\n .style(\"font-weight\", settings.percentage.fontWeight)\n .style(\"fill\", settings.percentage.color);\n }\n\n // 3. Add the value label\n if (include.value) {\n labelGroup.append(\"text\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"segmentValue\" + i + \"-\" + section; })\n .attr(\"class\", pie.cssPrefix + \"segmentValue-\" + section)\n .text(function(d, i) {\n formatterContext.index = i;\n formatterContext.part = \"value\";\n formatterContext.value = d.value;\n formatterContext.label = d.value;\n return settings.formatter ? settings.formatter(formatterContext, d.value) : d.value;\n })\n .style(\"font-size\", settings.value.fontSize + \"px\")\n .style(\"font-family\", settings.value.font)\n .style(\"font-weight\", settings.value.fontWeight)\n .style(\"fill\", settings.value.color);\n }\n },\n\n /**\n * @param section \"inner\" / \"outer\"\n */\n positionLabelElements: function(pie, section, sectionDisplayType) {\n labels[\"dimensions-\" + section] = [];\n\n // get the latest widths, heights\n var labelGroups = pie.__labels[section];\n labelGroups.each(function(d, i) {\n var mainLabel = d3.select(this).selectAll(\".\" + pie.cssPrefix + \"segmentMainLabel-\" + section);\n var percentage = d3.select(this).selectAll(\".\" + pie.cssPrefix + \"segmentPercentage-\" + section);\n var value = d3.select(this).selectAll(\".\" + pie.cssPrefix + \"segmentValue-\" + section);\n\n labels[\"dimensions-\" + section].push({\n mainLabel: (mainLabel.node() !== null) ? mainLabel.node().getBBox() : null,\n percentage: (percentage.node() !== null) ? percentage.node().getBBox() : null,\n value: (value.node() !== null) ? value.node().getBBox() : null\n });\n });\n\n var singleLinePad = 5;\n var dims = labels[\"dimensions-\" + section];\n switch (sectionDisplayType) {\n case \"label-value1\":\n pie.svg.selectAll(\".\" + pie.cssPrefix + \"segmentValue-\" + section)\n .attr(\"dx\", function(d, i) { return dims[i].mainLabel.width + singleLinePad; });\n break;\n case \"label-value2\":\n pie.svg.selectAll(\".\" + pie.cssPrefix + \"segmentValue-\" + section)\n .attr(\"dy\", function(d, i) { return dims[i].mainLabel.height; });\n break;\n case \"label-percentage1\":\n pie.svg.selectAll(\".\" + pie.cssPrefix + \"segmentPercentage-\" + section)\n .attr(\"dx\", function(d, i) { return dims[i].mainLabel.width + singleLinePad; });\n break;\n case \"label-percentage2\":\n pie.svg.selectAll(\".\" + pie.cssPrefix + \"segmentPercentage-\" + section)\n .attr(\"dx\", function(d, i) { return (dims[i].mainLabel.width / 2) - (dims[i].percentage.width / 2); })\n .attr(\"dy\", function(d, i) { return dims[i].mainLabel.height; });\n break;\n }\n },\n\n computeLabelLinePositions: function(pie) {\n pie.lineCoordGroups = [];\n pie.__labels.outer\n .each(function(d, i) { return labels.computeLinePosition(pie, i); });\n },\n\n computeLinePosition: function(pie, i) {\n var angle = segments.getSegmentAngle(i, pie.options.data.content, pie.totalSize, { midpoint: true });\n var originCoords = math.rotate(pie.pieCenter.x, pie.pieCenter.y - pie.outerRadius, pie.pieCenter.x, pie.pieCenter.y, angle);\n var heightOffset = pie.outerLabelGroupData[i].h / 5; // TODO check\n var labelXMargin = 6; // the x-distance of the label from the end of the line [TODO configurable]\n\n var quarter = Math.floor(angle / 90);\n var midPoint = 4;\n var x2, y2, x3, y3;\n\n // this resolves an issue when the\n if (quarter === 2 && angle === 180) {\n quarter = 1;\n }\n\n switch (quarter) {\n case 0:\n x2 = pie.outerLabelGroupData[i].x - labelXMargin - ((pie.outerLabelGroupData[i].x - labelXMargin - originCoords.x) / 2);\n y2 = pie.outerLabelGroupData[i].y + ((originCoords.y - pie.outerLabelGroupData[i].y) / midPoint);\n x3 = pie.outerLabelGroupData[i].x - labelXMargin;\n y3 = pie.outerLabelGroupData[i].y - heightOffset;\n break;\n case 1:\n x2 = originCoords.x + (pie.outerLabelGroupData[i].x - originCoords.x) / midPoint;\n y2 = originCoords.y + (pie.outerLabelGroupData[i].y - originCoords.y) / midPoint;\n x3 = pie.outerLabelGroupData[i].x - labelXMargin;\n y3 = pie.outerLabelGroupData[i].y - heightOffset;\n break;\n case 2:\n var startOfLabelX = pie.outerLabelGroupData[i].x + pie.outerLabelGroupData[i].w + labelXMargin;\n x2 = originCoords.x - (originCoords.x - startOfLabelX) / midPoint;\n y2 = originCoords.y + (pie.outerLabelGroupData[i].y - originCoords.y) / midPoint;\n x3 = pie.outerLabelGroupData[i].x + pie.outerLabelGroupData[i].w + labelXMargin;\n y3 = pie.outerLabelGroupData[i].y - heightOffset;\n break;\n case 3:\n var startOfLabel = pie.outerLabelGroupData[i].x + pie.outerLabelGroupData[i].w + labelXMargin;\n x2 = startOfLabel + ((originCoords.x - startOfLabel) / midPoint);\n y2 = pie.outerLabelGroupData[i].y + (originCoords.y - pie.outerLabelGroupData[i].y) / midPoint;\n x3 = pie.outerLabelGroupData[i].x + pie.outerLabelGroupData[i].w + labelXMargin;\n y3 = pie.outerLabelGroupData[i].y - heightOffset;\n break;\n }\n\n /*\n * x1 / y1: the x/y coords of the start of the line, at the mid point of the segments arc on the pie circumference\n * x2 / y2: if \"curved\" line style is being used, this is the midpoint of the line. Other\n * x3 / y3: the end of the line; closest point to the label\n */\n if (pie.options.labels.lines.style === \"straight\") {\n pie.lineCoordGroups[i] = [\n { x: originCoords.x, y: originCoords.y },\n { x: x3, y: y3 }\n ];\n } else {\n pie.lineCoordGroups[i] = [\n { x: originCoords.x, y: originCoords.y },\n { x: x2, y: y2 },\n { x: x3, y: y3 }\n ];\n }\n },\n\n addLabelLines: function(pie) {\n var lineGroups = pie.svg.insert(\"g\", \".\" + pie.cssPrefix + \"pieChart\") // meaning, BEFORE .pieChart\n .attr(\"class\", pie.cssPrefix + \"lineGroups\")\n .style(\"opacity\", 1);\n\n var lineGroup = lineGroups.selectAll(\".\" + pie.cssPrefix + \"lineGroup\")\n .data(pie.lineCoordGroups)\n .enter()\n .append(\"g\")\n .attr(\"class\", pie.cssPrefix + \"lineGroup\");\n\n var lineFunction = d3.line()\n .curve(d3.curveBasis)\n .x(function(d) { return d.x; })\n .y(function(d) { return d.y; });\n\n lineGroup.append(\"path\")\n .attr(\"d\", lineFunction)\n .attr(\"stroke\", function(d, i) {\n return (pie.options.labels.lines.color === \"segment\") ? pie.options.colors[i] : pie.options.labels.lines.color;\n })\n .attr(\"stroke-width\", 1)\n .attr(\"fill\", \"none\")\n .style(\"opacity\", function(d, i) {\n var percentage = pie.options.labels.outer.hideWhenLessThanPercentage;\n var isHidden = (percentage !== null && d.percentage < percentage) || pie.options.data.content[i].label === \"\";\n return isHidden ? 0 : 1;\n });\n },\n\n positionLabelGroups: function(pie, section) {\n if (pie.options.labels[section].format === \"none\")\n return;\n\n pie.__labels[section]\n .style(\"opacity\", function(d, i) {\n var percentage = pie.options.labels[section].hideWhenLessThanPercentage;\n return (percentage !== null && d.percentage < percentage) ? 0 : 1;\n })\n .attr(\"transform\", function(d, i) {\n var x, y;\n if (section === \"outer\") {\n x = pie.outerLabelGroupData[i].x;\n y = pie.outerLabelGroupData[i].y;\n } else {\n var pieCenterCopy = extend(true, {}, pie.pieCenter);\n\n // now recompute the \"center\" based on the current _innerRadius\n if (pie.innerRadius > 0) {\n var angle = segments.getSegmentAngle(i, pie.options.data.content, pie.totalSize, { midpoint: true });\n var newCoords = math.translate(pie.pieCenter.x, pie.pieCenter.y, pie.innerRadius, angle);\n pieCenterCopy.x = newCoords.x;\n pieCenterCopy.y = newCoords.y;\n }\n\n var dims = helpers.getDimensions(pie.cssPrefix + \"labelGroup\" + i + \"-inner\");\n var xOffset = dims.w / 2;\n var yOffset = dims.h / 4; // confusing! Why 4? should be 2, but it doesn't look right\n\n x = pieCenterCopy.x + (pie.lineCoordGroups[i][0].x - pieCenterCopy.x) / 1.8;\n y = pieCenterCopy.y + (pie.lineCoordGroups[i][0].y - pieCenterCopy.y) / 1.8;\n\n x = x - xOffset;\n y = y + yOffset;\n }\n\n return \"translate(\" + x + \",\" + y + \")\";\n });\n },\n\n\n getIncludes: function(val) {\n var addMainLabel = false;\n var addValue = false;\n var addPercentage = false;\n\n switch (val) {\n case \"label\":\n addMainLabel = true;\n break;\n case \"value\":\n addValue = true;\n break;\n case \"percentage\":\n addPercentage = true;\n break;\n case \"label-value1\":\n case \"label-value2\":\n addMainLabel = true;\n addValue = true;\n break;\n case \"label-percentage1\":\n case \"label-percentage2\":\n addMainLabel = true;\n addPercentage = true;\n break;\n }\n return {\n mainLabel: addMainLabel,\n value: addValue,\n percentage: addPercentage\n };\n },\n\n\n /**\n * This does the heavy-lifting to compute the actual coordinates for the outer label groups. It does two things:\n * 1. Make a first pass and position them in the ideal positions, based on the pie sizes\n * 2. Do some basic collision avoidance.\n */\n computeOuterLabelCoords: function(pie) {\n\n // 1. figure out the ideal positions for the outer labels\n pie.__labels.outer\n .each(function(d, i) {\n return labels.getIdealOuterLabelPositions(pie, i);\n });\n\n // 2. now adjust those positions to try to accommodate conflicts\n labels.resolveOuterLabelCollisions(pie);\n },\n\n /**\n * This attempts to resolve label positioning collisions.\n */\n resolveOuterLabelCollisions: function(pie) {\n if (pie.options.labels.outer.format === \"none\") {\n return;\n }\n\n var size = pie.options.data.content.length;\n labels.checkConflict(pie, 0, \"clockwise\", size);\n labels.checkConflict(pie, size-1, \"anticlockwise\", size);\n },\n\n checkConflict: function(pie, currIndex, direction, size) {\n var i, curr;\n\n if (size <= 1) {\n return;\n }\n\n var currIndexHemisphere = pie.outerLabelGroupData[currIndex].hs;\n if (direction === \"clockwise\" && currIndexHemisphere !== \"right\") {\n return;\n }\n if (direction === \"anticlockwise\" && currIndexHemisphere !== \"left\") {\n return;\n }\n var nextIndex = (direction === \"clockwise\") ? currIndex+1 : currIndex-1;\n\n // this is the current label group being looked at. We KNOW it's positioned properly (the first item\n // is always correct)\n var currLabelGroup = pie.outerLabelGroupData[currIndex];\n\n // this one we don't know about. That's the one we're going to look at and move if necessary\n var examinedLabelGroup = pie.outerLabelGroupData[nextIndex];\n\n var info = {\n labelHeights: pie.outerLabelGroupData[0].h,\n center: pie.pieCenter,\n lineLength: (pie.outerRadius + pie.options.labels.outer.pieDistance),\n heightChange: pie.outerLabelGroupData[0].h + 1 // 1 = padding\n };\n\n // loop through *ALL* label groups examined so far to check for conflicts. This is because when they're\n // very tightly fitted, a later label group may still appear high up on the page\n if (direction === \"clockwise\") {\n i = 0;\n for (; i<=currIndex; i++) {\n curr = pie.outerLabelGroupData[i];\n\n // if there's a conflict with this label group, shift the label to be AFTER the last known\n // one that's been properly placed\n if (!labels.isLabelHidden(pie, i) && helpers.rectIntersect(curr, examinedLabelGroup)) {\n labels.adjustLabelPos(pie, nextIndex, currLabelGroup, info);\n break;\n }\n }\n } else {\n i = size - 1;\n for (; i >= currIndex; i--) {\n curr = pie.outerLabelGroupData[i];\n\n // if there's a conflict with this label group, shift the label to be AFTER the last known\n // one that's been properly placed\n if (!labels.isLabelHidden(pie, i) && helpers.rectIntersect(curr, examinedLabelGroup)) {\n labels.adjustLabelPos(pie, nextIndex, currLabelGroup, info);\n break;\n }\n }\n }\n labels.checkConflict(pie, nextIndex, direction, size);\n },\n\n isLabelHidden: function(pie, index) {\n var percentage = pie.options.labels.outer.hideWhenLessThanPercentage;\n return (percentage !== null && d.percentage < percentage) || pie.options.data.content[index].label === \"\";\n },\n\n // does a little math to shift a label into a new position based on the last properly placed one\n adjustLabelPos: function(pie, nextIndex, lastCorrectlyPositionedLabel, info) {\n var xDiff, yDiff, newXPos, newYPos;\n newYPos = lastCorrectlyPositionedLabel.y + info.heightChange;\n yDiff = info.center.y - newYPos;\n\n if (Math.abs(info.lineLength) > Math.abs(yDiff)) {\n xDiff = Math.sqrt((info.lineLength * info.lineLength) - (yDiff * yDiff));\n } else {\n xDiff = Math.sqrt((yDiff * yDiff) - (info.lineLength * info.lineLength));\n }\n\n if (lastCorrectlyPositionedLabel.hs === \"right\") {\n newXPos = info.center.x + xDiff;\n } else {\n newXPos = info.center.x - xDiff - pie.outerLabelGroupData[nextIndex].w;\n }\n\n pie.outerLabelGroupData[nextIndex].x = newXPos;\n pie.outerLabelGroupData[nextIndex].y = newYPos;\n },\n\n /**\n * @param i 0-N where N is the dataset size - 1.\n */\n getIdealOuterLabelPositions: function(pie, i) {\n var labelGroupNode = pie.svg.select(\"#\" + pie.cssPrefix + \"labelGroup\" + i + \"-outer\").node();\n if (!labelGroupNode) return;\n\n var labelGroupDims = labelGroupNode.getBBox();\n var angle = segments.getSegmentAngle(i, pie.options.data.content, pie.totalSize, { midpoint: true });\n\n var originalX = pie.pieCenter.x;\n var originalY = pie.pieCenter.y - (pie.outerRadius + pie.options.labels.outer.pieDistance);\n var newCoords = math.rotate(originalX, originalY, pie.pieCenter.x, pie.pieCenter.y, angle);\n\n // if the label is on the left half of the pie, adjust the values\n var hemisphere = \"right\"; // hemisphere\n if (angle > 180) {\n newCoords.x -= (labelGroupDims.width + 8);\n hemisphere = \"left\";\n } else {\n newCoords.x += 8;\n }\n\n pie.outerLabelGroupData[i] = {\n x: newCoords.x,\n y: newCoords.y,\n w: labelGroupDims.width,\n h: labelGroupDims.height,\n hs: hemisphere\n };\n }\n};\n\n //// --------- segments.js -----------\nvar segments = {\n\n effectMap: {\n \"none\": d3.easeLinear,\n \"bounce\": d3.easeBounce,\n \"linear\": d3.easeLinear,\n \"sin\": d3.easeSin,\n \"elastic\": d3.easeElastic,\n \"back\": d3.easeBack,\n \"quad\": d3.easeQuad,\n \"circle\": d3.easeCircle,\n \"exp\": d3.easeExp\n },\n\n /**\n * Creates the pie chart segments and displays them according to the desired load effect.\n * @private\n */\n create: function(pie) {\n var pieCenter = pie.pieCenter;\n var colors = pie.options.colors;\n var loadEffects = pie.options.effects.load;\n var segmentStroke = pie.options.misc.colors.segmentStroke;\n\n // we insert the pie chart BEFORE the title, to ensure the title overlaps the pie\n var pieChartElement = pie.svg.insert(\"g\", \"#\" + pie.cssPrefix + \"title\")\n .attr(\"transform\", function() { return math.getPieTranslateCenter(pieCenter); })\n .attr(\"class\", pie.cssPrefix + \"pieChart\");\n\n var arc = d3.arc()\n .innerRadius(pie.innerRadius)\n .outerRadius(pie.outerRadius)\n .startAngle(0)\n .endAngle(function(d) {\n return (d.value / pie.totalSize) * 2 * Math.PI;\n });\n\n var g = pieChartElement.selectAll(\".\" + pie.cssPrefix + \"arc\")\n .data(pie.options.data.content)\n .enter()\n .append(\"g\")\n .attr(\"class\", pie.cssPrefix + \"arc\");\n\n // if we're not fading in the pie, just set the load speed to 0\n //var loadSpeed = loadEffects.speed;\n //if (loadEffects.effect === \"none\") {\n //\tloadSpeed = 0;\n //}\n\n g.append(\"path\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"segment\" + i; })\n .attr(\"fill\", function(d, i) {\n var color = colors[i];\n if (pie.options.misc.gradient.enabled) {\n color = \"url(#\" + pie.cssPrefix + \"grad\" + i + \")\";\n }\n return color;\n })\n .style(\"stroke\", segmentStroke)\n .style(\"stroke-width\", 1)\n //.transition()\n //.ease(d3.easeCubicInOut)\n //.duration(loadSpeed)\n .attr(\"data-index\", function(d, i) { return i; })\n .attr(\"d\", arc);\n/*\n .attrTween(\"d\", function(b) {\n var i = d3.interpolate({ value: 0 }, b);\n return function(t) {\n var ret = pie.arc(i(t));\n console.log(ret);\n return ret;\n };\n });\n*/\n pie.svg.selectAll(\"g.\" + pie.cssPrefix + \"arc\")\n .attr(\"transform\",\n function(d, i) {\n var angle = 0;\n if (i > 0) {\n angle = segments.getSegmentAngle(i-1, pie.options.data.content, pie.totalSize);\n }\n return \"rotate(\" + angle + \")\";\n }\n );\n pie.arc = arc;\n },\n\n addGradients: function(pie) {\n var grads = pie.svg.append(\"defs\")\n .selectAll(\"radialGradient\")\n .data(pie.options.data.content)\n .enter().append(\"radialGradient\")\n .attr(\"gradientUnits\", \"userSpaceOnUse\")\n .attr(\"cx\", 0)\n .attr(\"cy\", 0)\n .attr(\"r\", \"120%\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"grad\" + i; });\n\n grads.append(\"stop\").attr(\"offset\", \"0%\").style(\"stop-color\", function(d, i) { return pie.options.colors[i]; });\n grads.append(\"stop\").attr(\"offset\", pie.options.misc.gradient.percentage + \"%\").style(\"stop-color\", pie.options.misc.gradient.color);\n },\n\n addSegmentEventHandlers: function(pie) {\n var arc = pie.svg.selectAll(\".\" + pie.cssPrefix + \"arc\");\n arc = arc.merge(pie.__labels.inner.merge(pie.__labels.outer));\n\n arc.on(\"click\", function() {\n var currentEl = d3.select(this);\n var segment;\n\n // mouseover works on both the segments AND the segment labels, hence the following\n if (currentEl.attr(\"class\") === pie.cssPrefix + \"arc\") {\n segment = currentEl.select(\"path\");\n } else {\n var index = currentEl.attr(\"data-index\");\n segment = d3.select(\"#\" + pie.cssPrefix + \"segment\" + index);\n }\n\n var isExpanded = segment.attr(\"class\") === pie.cssPrefix + \"expanded\";\n segments.onSegmentEvent(pie, pie.options.callbacks.onClickSegment, segment, isExpanded);\n if (pie.options.effects.pullOutSegmentOnClick.effect !== \"none\") {\n if (isExpanded) {\n segments.closeSegment(pie, segment.node());\n } else {\n segments.openSegment(pie, segment.node());\n }\n }\n });\n\n arc.on(\"mouseover\", function() {\n var currentEl = d3.select(this);\n var segment, index;\n\n if (currentEl.attr(\"class\") === pie.cssPrefix + \"arc\") {\n segment = currentEl.select(\"path\");\n } else {\n index = currentEl.attr(\"data-index\");\n segment = d3.select(\"#\" + pie.cssPrefix + \"segment\" + index);\n }\n\n if (pie.options.effects.highlightSegmentOnMouseover) {\n index = segment.attr(\"data-index\");\n var segColor = pie.options.colors[index];\n segment.style(\"fill\", helpers.getColorShade(segColor, pie.options.effects.highlightLuminosity));\n }\n\n if (pie.options.tooltips.enabled) {\n index = segment.attr(\"data-index\");\n tt.showTooltip(pie, index);\n }\n\n var isExpanded = segment.attr(\"class\") === pie.cssPrefix + \"expanded\";\n segments.onSegmentEvent(pie, pie.options.callbacks.onMouseoverSegment, segment, isExpanded);\n });\n\n arc.on(\"mousemove\", function() {\n tt.moveTooltip(pie);\n });\n\n arc.on(\"mouseout\", function() {\n var currentEl = d3.select(this);\n var segment, index;\n\n if (currentEl.attr(\"class\") === pie.cssPrefix + \"arc\") {\n segment = currentEl.select(\"path\");\n } else {\n index = currentEl.attr(\"data-index\");\n segment = d3.select(\"#\" + pie.cssPrefix + \"segment\" + index);\n }\n\n if (pie.options.effects.highlightSegmentOnMouseover) {\n index = segment.attr(\"data-index\");\n var color = pie.options.colors[index];\n if (pie.options.misc.gradient.enabled) {\n color = \"url(#\" + pie.cssPrefix + \"grad\" + index + \")\";\n }\n segment.style(\"fill\", color);\n }\n\n if (pie.options.tooltips.enabled) {\n index = segment.attr(\"data-index\");\n tt.hideTooltip(pie, index);\n }\n\n var isExpanded = segment.attr(\"class\") === pie.cssPrefix + \"expanded\";\n segments.onSegmentEvent(pie, pie.options.callbacks.onMouseoutSegment, segment, isExpanded);\n });\n },\n\n // helper function used to call the click, mouseover, mouseout segment callback functions\n onSegmentEvent: function(pie, func, segment, isExpanded) {\n if (!helpers.isFunction(func)) {\n return;\n }\n var index = parseInt(segment.attr(\"data-index\"), 10);\n func({\n segment: segment.node(),\n index: index,\n expanded: isExpanded,\n data: pie.options.data.content[index]\n });\n },\n\n openSegment: function(pie, segment) {\n if (pie.isOpeningSegment) {\n return;\n }\n pie.isOpeningSegment = true;\n\n segments.maybeCloseOpenSegment(pie);\n\n d3.select(segment)\n .transition()\n .ease(segments.effectMap[pie.options.effects.pullOutSegmentOnClick.effect])\n .duration(pie.options.effects.pullOutSegmentOnClick.speed)\n .attr(\"transform\", function(d, i) {\n var c = pie.arc.centroid(d),\n x = c[0],\n y = c[1],\n h = Math.sqrt(x*x + y*y),\n pullOutSize = parseInt(pie.options.effects.pullOutSegmentOnClick.size, 10);\n\n return \"translate(\" + ((x/h) * pullOutSize) + ',' + ((y/h) * pullOutSize) + \")\";\n })\n .on(\"end\", function(d, i) {\n pie.currentlyOpenSegment = segment;\n pie.isOpeningSegment = false;\n d3.select(segment).attr(\"class\", pie.cssPrefix + \"expanded\");\n });\n },\n\n maybeCloseOpenSegment: function(pie) {\n if (typeof pie !== 'undefined' && pie.svg.selectAll(\".\" + pie.cssPrefix + \"expanded\").size() > 0) {\n segments.closeSegment(pie, pie.svg.select(\".\" + pie.cssPrefix + \"expanded\").node());\n }\n },\n\n closeSegment: function(pie, segment) {\n d3.select(segment)\n .transition()\n .duration(400)\n .attr(\"transform\", \"translate(0,0)\")\n .on(\"end\", function(d, i) {\n d3.select(segment).attr(\"class\", \"\");\n pie.currentlyOpenSegment = null;\n });\n },\n\n getCentroid: function(el) {\n var bbox = el.getBBox();\n return {\n x: bbox.x + bbox.width / 2,\n y: bbox.y + bbox.height / 2\n };\n },\n\n /**\n * General helper function to return a segment's angle, in various different ways.\n * @param index\n * @param opts optional object for fine-tuning exactly what you want.\n */\n getSegmentAngle: function(index, data, totalSize, opts) {\n var options = extend({\n // if true, this returns the full angle from the origin. Otherwise it returns the single segment angle\n compounded: true,\n\n // optionally returns the midpoint of the angle instead of the full angle\n midpoint: false\n }, opts);\n\n var currValue = data[index].value;\n var fullValue;\n if (options.compounded) {\n fullValue = 0;\n\n // get all values up to and including the specified index\n for (var i=0; i<=index; i++) {\n fullValue += data[i].value;\n }\n }\n\n if (typeof fullValue === 'undefined') {\n fullValue = currValue;\n }\n\n // now convert the full value to an angle\n var angle = (fullValue / totalSize) * 360;\n\n // lastly, if we want the midpoint, factor that sucker in\n if (options.midpoint) {\n var currAngle = (currValue / totalSize) * 360;\n angle -= (currAngle / 2);\n }\n\n return angle;\n }\n\n};\n\n //// --------- text.js -----------\nvar text = {\n offscreenCoord: -10000,\n\n addTitle: function(pie) {\n pie.__title = pie.svg.selectAll(\".\" + pie.cssPrefix + \"title\")\n .data([pie.options.header.title])\n .enter()\n .append(\"text\")\n .text(function(d) { return d.text; })\n .attr(\"id\", pie.cssPrefix + \"title\")\n .attr(\"class\", pie.cssPrefix + \"title\")\n .attr(\"x\", text.offscreenCoord)\n .attr(\"y\", text.offscreenCoord)\n .attr(\"text-anchor\", function() {\n var location;\n if (pie.options.header.location === \"top-center\" || pie.options.header.location === \"pie-center\") {\n location = \"middle\";\n } else {\n location = \"left\";\n }\n return location;\n })\n .attr(\"fill\", function(d) { return d.color; })\n .style(\"font-size\", function(d) { return d.fontSize + \"px\"; })\n .style(\"font-weight\", function(d) { return d.fontWeight; })\n .style(\"font-family\", function(d) { return d.font; });\n },\n\n positionTitle: function(pie) {\n var textComponents = pie.textComponents;\n var headerLocation = pie.options.header.location;\n var canvasPadding = pie.options.misc.canvasPadding;\n var canvasWidth = pie.options.size.canvasWidth;\n var titleSubtitlePadding = pie.options.header.titleSubtitlePadding;\n\n var x;\n if (headerLocation === \"top-left\") {\n x = canvasPadding.left;\n } else {\n x = ((canvasWidth - canvasPadding.right) / 2) + canvasPadding.left;\n }\n\n // add whatever offset has been added by user\n x += pie.options.misc.pieCenterOffset.x;\n\n var y = canvasPadding.top + textComponents.title.h;\n\n if (headerLocation === \"pie-center\") {\n y = pie.pieCenter.y;\n\n // still not fully correct\n if (textComponents.subtitle.exists) {\n var totalTitleHeight = textComponents.title.h + titleSubtitlePadding + textComponents.subtitle.h;\n y = y - (totalTitleHeight / 2) + textComponents.title.h;\n } else {\n y += (textComponents.title.h / 4);\n }\n }\n\n pie.__title\n .attr(\"x\", x)\n .attr(\"y\", y);\n },\n\n addSubtitle: function(pie) {\n var headerLocation = pie.options.header.location;\n\n pie.__subtitle = pie.svg.selectAll(\".\" + pie.cssPrefix + \"subtitle\")\n .data([pie.options.header.subtitle])\n .enter()\n .append(\"text\")\n .text(function(d) { return d.text; })\n .attr(\"x\", text.offscreenCoord)\n .attr(\"y\", text.offscreenCoord)\n .attr(\"id\", pie.cssPrefix + \"subtitle\")\n .attr(\"class\", pie.cssPrefix + \"subtitle\")\n .attr(\"text-anchor\", function() {\n var location;\n if (headerLocation === \"top-center\" || headerLocation === \"pie-center\") {\n location = \"middle\";\n } else {\n location = \"left\";\n }\n return location;\n })\n .attr(\"fill\", function(d) { return d.color; })\n .style(\"font-size\", function(d) { return d.fontSize + \"px\"; })\n .style(\"font-weight\", function(d) { return d.fontWeight; })\n .style(\"font-family\", function(d) { return d.font; });\n },\n\n positionSubtitle: function(pie) {\n var canvasPadding = pie.options.misc.canvasPadding;\n var canvasWidth = pie.options.size.canvasWidth;\n\n var x;\n if (pie.options.header.location === \"top-left\") {\n x = canvasPadding.left;\n } else {\n x = ((canvasWidth - canvasPadding.right) / 2) + canvasPadding.left;\n }\n\n // add whatever offset has been added by user\n x += pie.options.misc.pieCenterOffset.x;\n\n var y = text.getHeaderHeight(pie);\n\n pie.__subtitle\n .attr(\"x\", x)\n .attr(\"y\", y);\n },\n\n addFooter: function(pie) {\n pie.__footer = pie.svg.selectAll(\".\" + pie.cssPrefix + \"footer\")\n .data([pie.options.footer])\n .enter()\n .append(\"text\")\n .text(function(d) { return d.text; })\n .attr(\"x\", text.offscreenCoord)\n .attr(\"y\", text.offscreenCoord)\n .attr(\"id\", pie.cssPrefix + \"footer\")\n .attr(\"class\", pie.cssPrefix + \"footer\")\n .attr(\"text-anchor\", function() {\n var location = \"left\";\n if (pie.options.footer.location === \"bottom-center\") {\n location = \"middle\";\n } else if (pie.options.footer.location === \"bottom-right\") {\n location = \"left\"; // on purpose. We have to change the x-coord to make it properly right-aligned\n }\n return location;\n })\n .attr(\"fill\", function(d) { return d.color; })\n .style(\"font-size\", function(d) { return d.fontSize + \"px\"; })\n .style(\"font-weight\", function(d) { return d.fontWeight; })\n .style(\"font-family\", function(d) { return d.font; });\n },\n\n positionFooter: function(pie) {\n var footerLocation = pie.options.footer.location;\n var footerWidth = pie.textComponents.footer.w;\n var canvasWidth = pie.options.size.canvasWidth;\n var canvasHeight = pie.options.size.canvasHeight;\n var canvasPadding = pie.options.misc.canvasPadding;\n\n var x;\n if (footerLocation === \"bottom-left\") {\n x = canvasPadding.left;\n } else if (footerLocation === \"bottom-right\") {\n x = canvasWidth - footerWidth - canvasPadding.right;\n } else {\n x = canvasWidth / 2; // TODO - shouldn't this also take into account padding?\n }\n\n pie.__footer\n .attr(\"x\", x)\n .attr(\"y\", canvasHeight - canvasPadding.bottom);\n },\n\n getHeaderHeight: function(pie) {\n var h;\n if (pie.textComponents.title.exists) {\n\n // if the subtitle isn't defined, it'll be set to 0\n var totalTitleHeight = pie.textComponents.title.h + pie.options.header.titleSubtitlePadding + pie.textComponents.subtitle.h;\n if (pie.options.header.location === \"pie-center\") {\n h = pie.pieCenter.y - (totalTitleHeight / 2) + totalTitleHeight;\n } else {\n h = totalTitleHeight + pie.options.misc.canvasPadding.top;\n }\n } else {\n if (pie.options.header.location === \"pie-center\") {\n var footerPlusPadding = pie.options.misc.canvasPadding.bottom + pie.textComponents.footer.h;\n h = ((pie.options.size.canvasHeight - footerPlusPadding) / 2) + pie.options.misc.canvasPadding.top + (pie.textComponents.subtitle.h / 2);\n } else {\n h = pie.options.misc.canvasPadding.top + pie.textComponents.subtitle.h;\n }\n }\n return h;\n }\n};\n\n //// --------- validate.js -----------\nvar tt = {\n addTooltips: function(pie) {\n\n // group the label groups (label, percentage, value) into a single element for simpler positioning\n var tooltips = pie.svg.insert(\"g\")\n .attr(\"class\", pie.cssPrefix + \"tooltips\");\n\n tooltips.selectAll(\".\" + pie.cssPrefix + \"tooltip\")\n .data(pie.options.data.content)\n .enter()\n .append(\"g\")\n .attr(\"class\", pie.cssPrefix + \"tooltip\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"tooltip\" + i; })\n .style(\"opacity\", 0)\n .append(\"rect\")\n .attr(\"rx\", pie.options.tooltips.styles.borderRadius)\n .attr(\"ry\", pie.options.tooltips.styles.borderRadius)\n .attr(\"x\", -pie.options.tooltips.styles.padding)\n .attr(\"opacity\", pie.options.tooltips.styles.backgroundOpacity)\n .style(\"fill\", pie.options.tooltips.styles.backgroundColor);\n\n tooltips.selectAll(\".\" + pie.cssPrefix + \"tooltip\")\n .data(pie.options.data.content)\n .append(\"text\")\n .attr(\"fill\", function(d) { return pie.options.tooltips.styles.color; })\n .style(\"font-size\", function(d) { return pie.options.tooltips.styles.fontSize; })\n .style(\"font-weight\", function(d) { return pie.options.tooltips.styles.fontWeight; })\n .style(\"font-family\", function(d) { return pie.options.tooltips.styles.font; })\n .text(function(d, i) {\n var caption = pie.options.tooltips.string;\n if (pie.options.tooltips.type === \"caption\") {\n caption = d.caption;\n }\n return tt.replacePlaceholders(pie, caption, i, {\n label: d.label,\n value: d.value,\n percentage: d.percentage\n });\n });\n\n tooltips.selectAll(\".\" + pie.cssPrefix + \"tooltip rect\")\n .attr(\"width\", function (d, i) {\n var dims = helpers.getDimensions(pie.cssPrefix + \"tooltip\" + i);\n return dims.w + (2 * pie.options.tooltips.styles.padding);\n })\n .attr(\"height\", function (d, i) {\n var dims = helpers.getDimensions(pie.cssPrefix + \"tooltip\" + i);\n return dims.h + (2 * pie.options.tooltips.styles.padding);\n })\n .attr(\"y\", function (d, i) {\n var dims = helpers.getDimensions(pie.cssPrefix + \"tooltip\" + i);\n return -(dims.h / 2) + 1;\n });\n },\n\n showTooltip: function(pie, index) {\n var fadeInSpeed = pie.options.tooltips.styles.fadeInSpeed;\n if (tt.currentTooltip === index) {\n fadeInSpeed = 1;\n }\n\n tt.currentTooltip = index;\n d3.select(\"#\" + pie.cssPrefix + \"tooltip\" + index)\n .transition()\n .duration(fadeInSpeed)\n .style(\"opacity\", function() { return 1; });\n\n tt.moveTooltip(pie);\n },\n\n moveTooltip: function(pie) {\n d3.selectAll(\"#\" + pie.cssPrefix + \"tooltip\" + tt.currentTooltip)\n .attr(\"transform\", function(d) {\n var mouseCoords = d3.mouse(this.parentNode);\n var x = mouseCoords[0] + pie.options.tooltips.styles.padding + 2;\n var y = mouseCoords[1] - (2 * pie.options.tooltips.styles.padding) - 2;\n return \"translate(\" + x + \",\" + y + \")\";\n });\n },\n\n hideTooltip: function(pie, index) {\n d3.select(\"#\" + pie.cssPrefix + \"tooltip\" + index)\n .style(\"opacity\", function() { return 0; });\n\n // move the tooltip offscreen. This ensures that when the user next mouseovers the segment the hidden\n // element won't interfere\n d3.select(\"#\" + pie.cssPrefix + \"tooltip\" + tt.currentTooltip)\n .attr(\"transform\", function(d, i) {\n // klutzy, but it accounts for tooltip padding which could push it onscreen\n var x = pie.options.size.canvasWidth + 1000;\n var y = pie.options.size.canvasHeight + 1000;\n return \"translate(\" + x + \",\" + y + \")\";\n });\n },\n\n replacePlaceholders: function(pie, str, index, replacements) {\n\n // if the user has defined a placeholderParser function, call it before doing the replacements\n if (helpers.isFunction(pie.options.tooltips.placeholderParser)) {\n pie.options.tooltips.placeholderParser(index, replacements);\n }\n\n var replacer = function() {\n return function(match) {\n var placeholder = arguments[1];\n if (replacements.hasOwnProperty(placeholder)) {\n return replacements[arguments[1]];\n } else {\n return arguments[0];\n }\n };\n };\n return str.replace(/\\{(\\w+)\\}/g, replacer(replacements));\n }\n};\n\n\n // --------------------------------------------------------------------------------------------\n\n // our constructor\n var d3pie = function(element, options) {\n\n // element can be an ID or DOM element\n this.element = element;\n if (typeof element === \"string\") {\n var el = element.replace(/^#/, \"\"); // replace any jQuery-like ID hash char\n this.element = document.getElementById(el);\n }\n\n var opts = {};\n extend(true, opts, defaultSettings, options);\n this.options = opts;\n\n // if the user specified a custom CSS element prefix (ID, class), use it\n if (this.options.misc.cssPrefix !== null) {\n this.cssPrefix = this.options.misc.cssPrefix;\n } else {\n this.cssPrefix = \"p\" + _uniqueIDCounter + \"_\";\n _uniqueIDCounter++;\n }\n\n\n // now run some validation on the user-defined info\n if (!validate.initialCheck(this)) {\n return;\n }\n\n // add a data-role to the DOM node to let anyone know that it contains a d3pie instance, and the d3pie version\n d3.select(this.element).attr(_scriptName, _version);\n\n // things that are done once\n _setupData.call(this);\n _init.call(this);\n };\n\n d3pie.prototype.recreate = function() {\n // now run some validation on the user-defined info\n if (!validate.initialCheck(this)) {\n return;\n }\n\n _setupData.call(this);\n _init.call(this);\n };\n\n d3pie.prototype.redraw = function() {\n this.element.innerHTML = \"\";\n _init.call(this);\n };\n\n d3pie.prototype.destroy = function() {\n this.element.innerHTML = \"\"; // clear out the SVG\n d3.select(this.element).attr(_scriptName, null); // remove the data attr\n };\n\n /**\n * Returns all pertinent info about the current open info. Returns null if nothing's open, or if one is, an object of\n * the following form:\n * \t{\n * \t element: DOM NODE,\n * \t index: N,\n * \t data: {}\n * \t}\n */\n d3pie.prototype.getOpenSegment = function() {\n var segment = this.currentlyOpenSegment;\n if (segment !== null && typeof segment !== \"undefined\") {\n var index = parseInt(d3.select(segment).attr(\"data-index\"), 10);\n return {\n element: segment,\n index: index,\n data: this.options.data.content[index]\n };\n } else {\n return null;\n }\n };\n\n d3pie.prototype.openSegment = function(index) {\n index = parseInt(index, 10);\n if (index < 0 || index > this.options.data.content.length-1) {\n return;\n }\n segments.openSegment(this, d3.select(\"#\" + this.cssPrefix + \"segment\" + index).node());\n };\n\n d3pie.prototype.closeSegment = function() {\n segments.maybeCloseOpenSegment(this);\n };\n\n // this let's the user dynamically update aspects of the pie chart without causing a complete redraw. It\n // intelligently re-renders only the part of the pie that the user specifies. Some things cause a repaint, others\n // just redraw the single element\n d3pie.prototype.updateProp = function(propKey, value) {\n switch (propKey) {\n case \"header.title.text\":\n var oldVal = helpers.processObj(this.options, propKey);\n helpers.processObj(this.options, propKey, value);\n d3.select(\"#\" + this.cssPrefix + \"title\").html(value);\n if ((oldVal === \"\" && value !== \"\") || (oldVal !== \"\" && value === \"\")) {\n this.redraw();\n }\n break;\n\n case \"header.subtitle.text\":\n var oldValue = helpers.processObj(this.options, propKey);\n helpers.processObj(this.options, propKey, value);\n d3.select(\"#\" + this.cssPrefix + \"subtitle\").html(value);\n if ((oldValue === \"\" && value !== \"\") || (oldValue !== \"\" && value === \"\")) {\n this.redraw();\n }\n break;\n\n case \"callbacks.onload\":\n case \"callbacks.onMouseoverSegment\":\n case \"callbacks.onMouseoutSegment\":\n case \"callbacks.onClickSegment\":\n case \"effects.pullOutSegmentOnClick.effect\":\n case \"effects.pullOutSegmentOnClick.speed\":\n case \"effects.pullOutSegmentOnClick.size\":\n case \"effects.highlightSegmentOnMouseover\":\n case \"effects.highlightLuminosity\":\n helpers.processObj(this.options, propKey, value);\n break;\n\n // everything else, attempt to update it & do a repaint\n default:\n helpers.processObj(this.options, propKey, value);\n\n this.destroy();\n this.recreate();\n break;\n }\n };\n\n\n // ------------------------------------------------------------------------------------------------\n\n var _setupData = function () {\n this.options.data.content = math.sortPieData(this);\n if (this.options.data.smallSegmentGrouping.enabled) {\n this.options.data.content = helpers.applySmallSegmentGrouping(this.options.data.content, this.options.data.smallSegmentGrouping);\n }\n\n\n this.options.colors = helpers.initSegmentColors(this);\n this.totalSize = math.getTotalPieSize(this.options.data.content);\n\n var dp = this.options.labels.percentage.decimalPlaces;\n\n // add in percentage data to content\n for (var i=0; i<this.options.data.content.length; i++) {\n this.options.data.content[i].percentage = _getPercentage(this.options.data.content[i].value, this.totalSize, dp);\n }\n\n // adjust the final item to ensure the percentage always adds up to precisely 100%. This is necessary\n var totalPercentage = 0;\n for (var j=0; j<this.options.data.content.length; j++) {\n if (j === this.options.data.content.length - 1) {\n this.options.data.content[j].percentage = (100 - totalPercentage).toFixed(dp);\n }\n totalPercentage += parseFloat(this.options.data.content[j].percentage);\n }\n };\n\n var _init = function() {\n\n // prep-work\n this.svg = helpers.addSVGSpace(this);\n\n // store info about the main text components as part of the d3pie object instance\n this.textComponents = {\n headerHeight: 0,\n title: {\n exists: this.options.header.title.text !== \"\",\n h: 0,\n w: 0\n },\n subtitle: {\n exists: this.options.header.subtitle.text !== \"\",\n h: 0,\n w: 0\n },\n footer: {\n exists: this.options.footer.text !== \"\",\n h: 0,\n w: 0\n }\n };\n\n this.outerLabelGroupData = [];\n\n // add the key text components offscreen (title, subtitle, footer). We need to know their widths/heights for later computation\n if (this.textComponents.title.exists) text.addTitle(this);\n if (this.textComponents.subtitle.exists) text.addSubtitle(this);\n text.addFooter(this);\n\n // console.log(this);\n\n // the footer never moves. Put it in place now\n var self = this;\n text.positionFooter(self);\n var d3 = helpers.getDimensions(self.__footer.node());\n self.textComponents.footer.h = d3.h;\n self.textComponents.footer.w = d3.w;\n\n if (self.textComponents.title.exists) {\n var d1 = helpers.getDimensions(self.__title.node());\n self.textComponents.title.h = d1.h;\n self.textComponents.title.w = d1.w;\n }\n\n if (self.textComponents.subtitle.exists) {\n var d2 = helpers.getDimensions(self.__subtitle.node());\n self.textComponents.subtitle.h = d2.h;\n self.textComponents.subtitle.w = d2.w;\n }\n\n // now compute the full header height\n if (self.textComponents.title.exists || self.textComponents.subtitle.exists) {\n var headerHeight = 0;\n if (self.textComponents.title.exists) {\n headerHeight += self.textComponents.title.h;\n if (self.textComponents.subtitle.exists) {\n headerHeight += self.options.header.titleSubtitlePadding;\n }\n }\n if (self.textComponents.subtitle.exists) {\n headerHeight += self.textComponents.subtitle.h;\n }\n self.textComponents.headerHeight = headerHeight;\n }\n\n // at this point, all main text component dimensions have been calculated\n math.computePieRadius(self);\n\n // this value is used all over the place for placing things and calculating locations. We figure it out ONCE\n // and store it as part of the object\n math.calculatePieCenter(self);\n\n // position the title and subtitle\n text.positionTitle(self);\n text.positionSubtitle(self);\n\n // now create the pie chart segments, and gradients if the user desired\n if (self.options.misc.gradient.enabled) {\n segments.addGradients(self);\n }\n segments.create(self); // also creates this.arc\n\n self.__labels = {};\n labels.add(self, \"inner\", self.options.labels.inner.format);\n labels.add(self, \"outer\", self.options.labels.outer.format);\n\n // position the label elements relatively within their individual group (label, percentage, value)\n labels.positionLabelElements(self, \"inner\", self.options.labels.inner.format);\n labels.positionLabelElements(self, \"outer\", self.options.labels.outer.format);\n labels.computeOuterLabelCoords(self);\n\n // this is (and should be) dumb. It just places the outer groups at their calculated, collision-free positions\n labels.positionLabelGroups(self, \"outer\");\n\n // we use the label line positions for many other calculations, so ALWAYS compute them\n labels.computeLabelLinePositions(self);\n\n // only add them if they're actually enabled\n if (self.options.labels.lines.enabled && self.options.labels.outer.format !== \"none\") {\n labels.addLabelLines(self);\n }\n\n labels.positionLabelGroups(self, \"inner\");\n\n if (helpers.isFunction(self.options.callbacks.onload)) {\n try {\n self.options.callbacks.onload();\n } catch (e) { }\n }\n\n // add and position the tooltips\n if (self.options.tooltips.enabled) {\n tt.addTooltips(self);\n }\n\n segments.addSegmentEventHandlers(self);\n };\n\n var _getPercentage = function(value, total, decimalPlaces) {\n var relativeAmount = value / total;\n if (decimalPlaces <= 0) {\n return Math.round(relativeAmount * 100);\n } else {\n return (relativeAmount * 100).toFixed(decimalPlaces);\n }\n };\n\n return d3pie;\n}));\n","export * from \"./types\"\n\nexport { default as CloudConnectionStatus } from \"./cloud-connection-status\"\n","import {\n concat, cond, equals, identity, last, pipe, T,\n} from \"ramda\"\n\nimport { isDevelopmentEnv, isMainJs, isTestingEnv } from \"utils/env\"\n\n\n// this part needs to be static and should run immediately because otherwise document.currentScript\n// will be null\nconst currentScript = isTestingEnv\n ? { src: \"http://localhost:3000/some-script.js\" } // test env doesn't have document.currentScript\n : document.currentScript\n\nconst getScriptSource = () => {\n // logic based on old dashboard\n\n // http://stackoverflow.com/questions/984510/what-is-my-script-src-url\n // http://stackoverflow.com/questions/6941533/get-protocol-domain-and-port-from-url\n const script = cond([\n [Boolean, identity],\n // \"last\" typings don't work well with HTMLScriptElement\n // if document.currentScript is not available\n [T, () => last(document.getElementsByTagName(\"script\") as unknown as [HTMLScriptElement])],\n ])(currentScript)\n\n return script.src\n}\n\nexport const getPathFromScriptSource = (source: string) => {\n // match strings not containing slash, ending with `.js`, with optional suffix started by `?`\n const jsFilenameRegex = \"[^\\\\/]*\\\\.js(\\\\/?.*)?$\"\n const staticJsPath = \"/static/js\"\n return source.replace(new RegExp(jsFilenameRegex), \"\")\n .replace(staticJsPath, \"\")\n}\n\nconst getDefaultServer = () => {\n if (isDevelopmentEnv) {\n return \"http://localhost:19999\"\n }\n\n // Agent Dashboard does not need sophisticated server-detection, which is causing problems\n // when navigating through streamed nodes. Let's overwrite that setting\n if (isMainJs) {\n const pathname = window.location.pathname\n .replace(\"index.html\", \"\")\n // todo consider .replace(/[^\\/]*\\.html/, \"\") (every .html file in the url)\n .replace(\"default.html\", \"\") // for netdata demo servers\n return window.location.origin + pathname.replace(/\\/v1\\/?$/, \"\")\n }\n\n const source = getScriptSource()\n return getPathFromScriptSource(source).replace(/\\/v1\\/?$/, \"\")\n}\n\n// append \"/\" at the end, if it's not already there\nexport const alwaysEndWithSlash = cond([\n [pipe(last, equals(\"/\")), identity],\n [T, (x: string) => concat(x, \"/\")], // R.__ typings don't work well\n])\n\nexport const serverDefault: string = alwaysEndWithSlash(\n window.netdataServer || getDefaultServer(),\n)\n\nexport const serverStatic: string = isDevelopmentEnv\n ? \"/\" // for localhost:3000/css/...\n : alwaysEndWithSlash(getDefaultServer()) // by default, load from netdata server\n","import { prop } from \"ramda\"\nimport { createSelector } from \"reselect\"\n\nimport { AppStateT } from \"store/app-state\"\nimport { selectChartMetadataFromChartsCall } from \"domains/global/selectors\"\n\nimport { ChartState } from \"./chart-types\"\nimport { initialSingleState } from \"./reducer\"\nimport { storeKey } from \"./constants\"\n\nexport const selectChartsState = (state: AppStateT) => state[storeKey]\nexport const selectSingleChartState = createSelector(\n selectChartsState,\n (_: unknown, { id }: { chartId?: string, id: string }) => id,\n (chartsState, id) => chartsState[id] || initialSingleState,\n)\n\nexport const selectChartData = createSelector(\n selectSingleChartState,\n (chartState) => chartState.chartData,\n)\n\nconst selectChartMetadataFromExplicitCall = createSelector(\n selectSingleChartState, prop(\"chartMetadata\"),\n)\n// dashboard.js normally fetches metadata for every individual charts, but we can prevent it\n// if metadata for ALL charts will be present in state.global (from single call)\nconst selectChartMetadata = createSelector(\n selectChartMetadataFromChartsCall,\n selectChartMetadataFromExplicitCall,\n (metadataFromAll, metadataFromSingleCall) => metadataFromAll || metadataFromSingleCall,\n)\nconst selectIsFetchingDetails = createSelector(selectSingleChartState, prop(\"isFetchingDetails\"))\n\nexport const makeSelectChartMetadataRequest = () => createSelector(\n selectChartMetadata,\n selectIsFetchingDetails,\n (chartMetadata, isFetchingDetails) => ({ chartMetadata, isFetchingDetails }),\n)\n\nexport const selectChartViewRange = createSelector(\n selectSingleChartState,\n (chartState) => chartState.viewRange,\n)\n\nexport const selectChartIsFetchingData = createSelector(\n selectSingleChartState,\n (chartState) => chartState.isFetchingData,\n)\n\nexport const selectChartFetchDataParams = createSelector(\n selectSingleChartState,\n (chartState) => chartState.fetchDataParams,\n)\n\nexport const selectResizeHeight = createSelector(\n selectSingleChartState,\n (chartState) => chartState.resizeHeight,\n)\n\nexport const selectChartPanAndZoom = createSelector(selectSingleChartState, prop(\"chartPanAndZoom\"))\n\n// count the nr of \"success\" or \"failure\" charts\nconst hasCompletedFetching = (chartState: ChartState) => chartState.isFetchDataFailure\n || Boolean(chartState.chartData) || chartState.isFetchDetailsFailure\n\nexport const selectChartsAreFetching = createSelector(selectChartsState, chartsState =>\n Object.values(chartsState).some(({ isFetchingData }) => isFetchingData)\n)\n\nexport const selectAmountOfFetchedCharts = createSelector(\n selectChartsState,\n (chartsState) => Object.values(chartsState)\n .reduce((acc, chartState) => acc + (hasCompletedFetching(chartState) ? 1 : 0), 0),\n)\n\nexport const selectAmountOfCharts = createSelector(\n selectChartsState,\n (chartsState) => Object.keys(chartsState).length,\n)\n\nexport const selectNameOfAnyFetchingChart = createSelector(\n selectChartsState,\n (chartsState) => Object.values(chartsState)\n .find((chartState) => chartState.isFetchingData)?.chartId,\n)\n\nexport const selectAmountOfSnapshotsFetched = createSelector(\n selectChartsState,\n (chartsState) => Object.values(chartsState)\n .reduce((acc, chartState) => acc + (chartState.snapshotData ? 1 : 0), 0),\n)\n\nexport const selectAmountOfSnapshotsFailed = createSelector(\n selectChartsState,\n (chartsState) => Object.values(chartsState)\n .reduce((acc, chartState) => acc + (chartState.snapshotDataIsError ? 1 : 0), 0),\n)\n","import { useMemo } from \"react\"\nimport moment from \"moment\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectTimezoneSetting, selectUTCOffsetSetting } from \"domains/global/selectors\"\n\nconst zeropad = x => {\n if (x > -10 && x < 10) {\n return `0${x.toString()}`\n }\n return x.toString()\n}\n\nexport const isSupportingDateTimeFormat = !!(Intl && Intl.DateTimeFormat && navigator.language)\n\nconst narrowToDate = d => (typeof d === \"number\" ? new Date(d) : d)\n// these are the old netdata functions\n// we fallback to these, if the new ones fail\nexport const localeDateStringNative = d => narrowToDate(d).toLocaleDateString()\nexport const localeTimeStringNative = d => narrowToDate(d).toLocaleTimeString()\nexport const xAxisTimeStringNative = d => {\n const date = narrowToDate(d)\n return `${zeropad(date.getHours())}:${zeropad(date.getMinutes())}:${zeropad(date.getSeconds())}`\n}\n\nexport const isProperTimezone = timeZone => {\n try {\n Intl.DateTimeFormat(navigator.language, {\n localeMatcher: \"best fit\",\n formatMatcher: \"best fit\",\n weekday: \"short\",\n year: \"numeric\",\n month: \"short\",\n day: \"2-digit\",\n timeZone,\n })\n } catch (e) {\n return false\n }\n return true\n}\n\nexport const getDateWithOffset = (date, offset) => moment(date).utcOffset(offset)\n\nconst getOptions = ({ long, isTime, secs, timezone }) => ({\n hourCycle: \"h23\",\n ...(isTime\n ? {}\n : long\n ? { weekday: \"short\", year: \"numeric\", month: \"short\", day: \"2-digit\" }\n : { dateStyle: \"short\" }),\n ...(isTime && {\n timeStyle: secs ? \"medium\" : \"short\",\n }),\n timeZone: timezone,\n})\n\nconst dateFormat = (date, { locale, ...options }) =>\n new Intl.DateTimeFormat(locale ?? navigator.language, getOptions(options)).format(date)\n\nconst getTimezone = timezone => (timezone !== \"\" && timezone !== \"default\" ? timezone : undefined)\n\nexport const useDateTime = () => {\n const timezone = useSelector(selectTimezoneSetting)\n const utcOffset = useSelector(selectUTCOffsetSetting)\n\n const localeDateString = useMemo(() => {\n return isSupportingDateTimeFormat\n ? (date, options) =>\n dateFormat(date, { long: true, timezone: getTimezone(timezone), ...options })\n : localeDateStringNative\n }, [timezone])\n\n const localeTimeString = useMemo(() => {\n return isSupportingDateTimeFormat\n ? (date, options) =>\n dateFormat(date, {\n secs: true,\n isTime: true,\n timezone: getTimezone(timezone),\n ...options,\n })\n : localeTimeStringNative\n }, [timezone])\n\n const xAxisTimeString = useMemo(() => {\n return isSupportingDateTimeFormat\n ? date => dateFormat(date, { secs: true, isTime: true, timezone: getTimezone(timezone) })\n : xAxisTimeStringNative\n }, [timezone])\n\n const xAxisDateString = useMemo(() => {\n return isSupportingDateTimeFormat\n ? date => dateFormat(date, { long: true, timezone: getTimezone(timezone) })\n : xAxisTimeStringNative\n }, [timezone])\n\n return {\n localeDateString,\n localeTimeString,\n xAxisDateString,\n xAxisTimeString,\n utcOffset,\n }\n}\n","import { createAction } from \"redux-act\"\nimport { ChartsMetadata } from \"domains/global/types\"\n\nimport { storeKey } from \"./constants\"\n\nexport interface startSnapshotModeAction {\n charts: ChartsMetadata\n dataPoints: number\n}\nexport const startSnapshotModeAction = createAction<startSnapshotModeAction>(\n `${storeKey}/isSnapshotModeAction`,\n)\n\nexport const stopSnapshotModeAction = createAction(`${storeKey}/stopSnapshotModeAction`)\n\nexport interface ShowSignInModalAction { signInLinkHref: string }\nexport const showSignInModalAction = createAction<ShowSignInModalAction>(\n `${storeKey}/showSignInModal`,\n)\n\nexport const explicitlySignInAction = createAction(`${storeKey}/explicitlySignIn`)\n\nexport interface IsSignedInAction { isSignedIn: boolean }\nexport const isSignedInAction = createAction<IsSignedInAction>(`${storeKey}/isSignedInAction`)\n\nexport interface SetOfflineAction { offline: boolean }\nexport const setOfflineAction = createAction<SetOfflineAction>(`${storeKey}/setOfflineAction`)\n","export const storeKey = \"chart\"\n\nexport const fallbackUpdateTimeInterval = 2000\n\n// corresponds to force_update_at in old dashboard\n// throttle time between use globalPanAndZoom change actions - and requests sent to server\nexport const panAndZoomDelay = 300\n","export const seconds4human = (\n totalSeconds: number | string, overrideOptions?: {[key: string]: string},\n) => {\n const defaultOptions: {[key: string]: string} = {\n now: \"now\",\n space: \" \",\n negative_suffix: \"ago\",\n day: \"day\",\n days: \"days\",\n hour: \"hour\",\n hours: \"hours\",\n minute: \"min\",\n minutes: \"mins\",\n second: \"sec\",\n seconds: \"secs\",\n and: \"and\",\n }\n\n const options = typeof overrideOptions === \"object\"\n ? { ...defaultOptions, ...overrideOptions }\n : defaultOptions\n\n let seconds = typeof totalSeconds === \"string\"\n ? parseInt(totalSeconds, 10)\n : totalSeconds\n\n if (seconds === 0) {\n return options.now\n }\n\n let suffix = \"\"\n if (seconds < 0) {\n seconds = -seconds\n if (options.negative_suffix !== \"\") {\n suffix = options.space + options.negative_suffix\n }\n }\n\n const days = Math.floor(seconds / 86400)\n seconds -= (days * 86400)\n\n const hours = Math.floor(seconds / 3600)\n seconds -= (hours * 3600)\n\n const minutes = Math.floor(seconds / 60)\n seconds -= (minutes * 60)\n\n const strings = []\n\n if (days > 1) {\n strings.push(days.toString() + options.space + options.days)\n } else if (days === 1) {\n strings.push(days.toString() + options.space + options.day)\n }\n\n if (hours > 1) {\n strings.push(hours.toString() + options.space + options.hours)\n } else if (hours === 1) {\n strings.push(hours.toString() + options.space + options.hour)\n }\n\n if (minutes > 1) {\n strings.push(minutes.toString() + options.space + options.minutes)\n } else if (minutes === 1) {\n strings.push(minutes.toString() + options.space + options.minute)\n }\n\n if (seconds > 1) {\n strings.push(Math.floor(seconds).toString() + options.space + options.seconds)\n } else if (seconds === 1) {\n strings.push(Math.floor(seconds).toString() + options.space + options.second)\n }\n\n if (strings.length === 1) {\n return strings.pop() + suffix\n }\n\n const last = strings.pop()\n return `${strings.join(\", \")} ${options.and} ${last}${suffix}`\n}\n","/*! @license Copyright 2017 Dan Vanderkam (danvdk@gmail.com) MIT-licensed (http://opensource.org/licenses/MIT) */\n// SPDX-License-Identifier: MIT\n!function(t){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{var e;e=\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this,e.Dygraph=t()}}(function(){return function t(e,a,i){function n(o,s){if(!a[o]){if(!e[o]){var l=\"function\"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var h=new Error(\"Cannot find module '\"+o+\"'\");throw h.code=\"MODULE_NOT_FOUND\",h}var u=a[o]={exports:{}};e[o][0].call(u.exports,function(t){var a=e[o][1][t];return n(a||t)},u,u.exports,t,e,a,i)}return a[o].exports}for(var r=\"function\"==typeof require&&require,o=0;o<i.length;o++)n(i[o]);return n}({1:[function(t,e,a){function i(){throw new Error(\"setTimeout has not been defined\")}function n(){throw new Error(\"clearTimeout has not been defined\")}function r(t){if(d===setTimeout)return setTimeout(t,0);if((d===i||!d)&&setTimeout)return d=setTimeout,setTimeout(t,0);try{return d(t,0)}catch(e){try{return d.call(null,t,0)}catch(e){return d.call(this,t,0)}}}function o(t){if(c===clearTimeout)return clearTimeout(t);if((c===n||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(t);try{return c(t)}catch(e){try{return c.call(null,t)}catch(e){return c.call(this,t)}}}function s(){v&&g&&(v=!1,g.length?f=g.concat(f):_=-1,f.length&&l())}function l(){if(!v){var t=r(s);v=!0;for(var e=f.length;e;){for(g=f,f=[];++_<e;)g&&g[_].run();_=-1,e=f.length}g=null,v=!1,o(t)}}function h(t,e){this.fun=t,this.array=e}function u(){}var d,c,p=e.exports={};!function(){try{d=\"function\"==typeof setTimeout?setTimeout:i}catch(t){d=i}try{c=\"function\"==typeof clearTimeout?clearTimeout:n}catch(t){c=n}}();var g,f=[],v=!1,_=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var a=1;a<arguments.length;a++)e[a-1]=arguments[a];f.push(new h(t,e)),1!==f.length||v||r(l)},h.prototype.run=function(){this.fun.apply(null,this.array)},p.title=\"browser\",p.browser=!0,p.env={},p.argv=[],p.version=\"\",p.versions={},p.on=u,p.addListener=u,p.once=u,p.off=u,p.removeListener=u,p.removeAllListeners=u,p.emit=u,p.prependListener=u,p.prependOnceListener=u,p.listeners=function(t){return[]},p.binding=function(t){throw new Error(\"process.binding is not supported\")},p.cwd=function(){return\"/\"},p.chdir=function(t){throw new Error(\"process.chdir is not supported\")},p.umask=function(){return 0}},{}],2:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./bars\"),n=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(){};r.prototype=new n.default,r.prototype.extractSeries=function(t,e,a){for(var i,n,r,o=[],s=a.get(\"logscale\"),l=0;l<t.length;l++)i=t[l][0],r=t[l][e],s&&null!==r&&(r[0]<=0||r[1]<=0||r[2]<=0)&&(r=null),null!==r?(n=r[1],null===n||isNaN(n)?o.push([i,n,[n,n]]):o.push([i,n,[r[0],r[2]]])):o.push([i,null,[null,null]]);return o},r.prototype.rollingAverage=function(t,e,a){e=Math.min(e,t.length);var i,n,r,o,s,l,h,u=[];for(n=0,o=0,r=0,s=0,l=0;l<t.length;l++){if(i=t[l][1],h=t[l][2],u[l]=t[l],null===i||isNaN(i)||(n+=h[0],o+=i,r+=h[1],s+=1),l-e>=0){var d=t[l-e];null===d[1]||isNaN(d[1])||(n-=d[2][0],o-=d[1],r-=d[2][1],s-=1)}u[l]=s?[t[l][0],1*o/s,[1*n/s,1*r/s]]:[t[l][0],null,[null,null]]}return u},a.default=r,e.exports=a.default},{\"./bars\":5}],3:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./bars\"),n=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(){};r.prototype=new n.default,r.prototype.extractSeries=function(t,e,a){for(var i,n,r,o,s=[],l=a.get(\"sigma\"),h=a.get(\"logscale\"),u=0;u<t.length;u++)i=t[u][0],o=t[u][e],h&&null!==o&&(o[0]<=0||o[0]-l*o[1]<=0)&&(o=null),null!==o?(n=o[0],null===n||isNaN(n)?s.push([i,n,[n,n,n]]):(r=l*o[1],s.push([i,n,[n-r,n+r,o[1]]]))):s.push([i,null,[null,null,null]]);return s},r.prototype.rollingAverage=function(t,e,a){e=Math.min(e,t.length);var i,n,r,o,s,l,h,u,d,c=[],p=a.get(\"sigma\");for(i=0;i<t.length;i++){for(s=0,u=0,l=0,n=Math.max(0,i-e+1);n<i+1;n++)null===(r=t[n][1])||isNaN(r)||(l++,s+=r,u+=Math.pow(t[n][2][2],2));l?(h=Math.sqrt(u)/l,d=s/l,c[i]=[t[i][0],d,[d-p*h,d+p*h]]):(o=1==e?t[i][1]:null,c[i]=[t[i][0],o,[o,o]])}return c},a.default=r,e.exports=a.default},{\"./bars\":5}],4:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./bars\"),n=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(){};r.prototype=new n.default,r.prototype.extractSeries=function(t,e,a){for(var i,n,r,o,s,l,h,u,d=[],c=a.get(\"sigma\"),p=a.get(\"logscale\"),g=0;g<t.length;g++)i=t[g][0],r=t[g][e],p&&null!==r&&(r[0]<=0||r[1]<=0)&&(r=null),null!==r?(o=r[0],s=r[1],null===o||isNaN(o)?d.push([i,o,[o,o,o,s]]):(l=s?o/s:0,h=s?c*Math.sqrt(l*(1-l)/s):1,u=100*h,n=100*l,d.push([i,n,[n-u,n+u,o,s]]))):d.push([i,null,[null,null,null,null]]);return d},r.prototype.rollingAverage=function(t,e,a){e=Math.min(e,t.length);var i,n,r,o,s=[],l=a.get(\"sigma\"),h=a.get(\"wilsonInterval\"),u=0,d=0;for(r=0;r<t.length;r++){u+=t[r][2][2],d+=t[r][2][3],r-e>=0&&(u-=t[r-e][2][2],d-=t[r-e][2][3]);var c=t[r][0],p=d?u/d:0;if(h)if(d){var g=p<0?0:p,f=d,v=l*Math.sqrt(g*(1-g)/f+l*l/(4*f*f)),_=1+l*l/d;i=(g+l*l/(2*d)-v)/_,n=(g+l*l/(2*d)+v)/_,s[r]=[c,100*g,[100*i,100*n]]}else s[r]=[c,0,[0,0]];else o=d?l*Math.sqrt(p*(1-p)/d):1,s[r]=[c,100*p,[100*(p-o),100*(p+o)]]}return s},a.default=r,e.exports=a.default},{\"./bars\":5}],5:[function(t,e,a){\"use strict\";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(a,\"__esModule\",{value:!0});var n=t(\"./datahandler\"),r=i(n),o=t(\"../dygraph-layout\"),s=i(o),l=function(){r.default.call(this)};l.prototype=new r.default,l.prototype.extractSeries=function(t,e,a){},l.prototype.rollingAverage=function(t,e,a){},l.prototype.onPointsCreated_=function(t,e){for(var a=0;a<t.length;++a){var i=t[a],n=e[a];n.y_top=NaN,n.y_bottom=NaN,n.yval_minus=r.default.parseFloat(i[2][0]),n.yval_plus=r.default.parseFloat(i[2][1])}},l.prototype.getExtremeYValues=function(t,e,a){for(var i,n=null,r=null,o=t.length-1,s=0;s<=o;s++)if(null!==(i=t[s][1])&&!isNaN(i)){var l=t[s][2][0],h=t[s][2][1];l>i&&(l=i),h<i&&(h=i),(null===r||h>r)&&(r=h),(null===n||l<n)&&(n=l)}return[n,r]},l.prototype.onLineEvaluated=function(t,e,a){for(var i,n=0;n<t.length;n++)i=t[n],i.y_top=s.default.calcYNormal_(e,i.yval_minus,a),i.y_bottom=s.default.calcYNormal_(e,i.yval_plus,a)},a.default=l,e.exports=a.default},{\"../dygraph-layout\":13,\"./datahandler\":6}],6:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=function(){},n=i;n.X=0,n.Y=1,n.EXTRAS=2,n.prototype.extractSeries=function(t,e,a){},n.prototype.seriesToPoints=function(t,e,a){for(var i=[],r=0;r<t.length;++r){var o=t[r],s=o[1],l=null===s?null:n.parseFloat(s),h={x:NaN,y:NaN,xval:n.parseFloat(o[0]),yval:l,name:e,idx:r+a,canvasx:NaN,canvasy:NaN};i.push(h)}return this.onPointsCreated_(t,i),i},n.prototype.onPointsCreated_=function(t,e){},n.prototype.rollingAverage=function(t,e,a){},n.prototype.getExtremeYValues=function(t,e,a){},n.prototype.onLineEvaluated=function(t,e,a){},n.parseFloat=function(t){return null===t?NaN:t},a.default=i,e.exports=a.default},{}],7:[function(t,e,a){\"use strict\";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(a,\"__esModule\",{value:!0});var n=t(\"./datahandler\"),r=(i(n),t(\"./default\")),o=i(r),s=function(){};s.prototype=new o.default,s.prototype.extractSeries=function(t,e,a){for(var i,n,r,o,s,l,h=[],u=a.get(\"logscale\"),d=0;d<t.length;d++)i=t[d][0],r=t[d][e],u&&null!==r&&(r[0]<=0||r[1]<=0)&&(r=null),null!==r?(o=r[0],s=r[1],null===o||isNaN(o)?h.push([i,o,[o,s]]):(l=s?o/s:0,n=100*l,h.push([i,n,[o,s]]))):h.push([i,null,[null,null]]);return h},s.prototype.rollingAverage=function(t,e,a){e=Math.min(e,t.length);var i,n=[],r=0,o=0;for(i=0;i<t.length;i++){r+=t[i][2][0],o+=t[i][2][1],i-e>=0&&(r-=t[i-e][2][0],o-=t[i-e][2][1]);var s=t[i][0],l=o?r/o:0;n[i]=[s,100*l]}return n},a.default=s,e.exports=a.default},{\"./datahandler\":6,\"./default\":8}],8:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./datahandler\"),n=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(){};r.prototype=new n.default,r.prototype.extractSeries=function(t,e,a){for(var i=[],n=a.get(\"logscale\"),r=0;r<t.length;r++){var o=t[r][0],s=t[r][e];n&&s<=0&&(s=null),i.push([o,s])}return i},r.prototype.rollingAverage=function(t,e,a){e=Math.min(e,t.length);var i,n,r,o,s,l=[];if(1==e)return t;for(i=0;i<t.length;i++){for(o=0,s=0,n=Math.max(0,i-e+1);n<i+1;n++)null===(r=t[n][1])||isNaN(r)||(s++,o+=t[n][1]);l[i]=s?[t[i][0],o/s]:[t[i][0],null]}return l},r.prototype.getExtremeYValues=function(t,e,a){for(var i,n=null,r=null,o=t.length-1,s=0;s<=o;s++)null===(i=t[s][1])||isNaN(i)||((null===r||i>r)&&(r=i),(null===n||i<n)&&(n=i));return[n,r]},a.default=r,e.exports=a.default},{\"./datahandler\":6}],9:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./dygraph-utils\"),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(i),r=t(\"./dygraph\"),o=function(t){return t&&t.__esModule?t:{default:t}}(r),s=function(t,e,a,i){if(this.dygraph_=t,this.layout=i,this.element=e,this.elementContext=a,this.height=t.height_,this.width=t.width_,!n.isCanvasSupported(this.element))throw\"Canvas is not supported.\";this.area=i.getPlotArea();var r=this.dygraph_.canvas_ctx_;r.beginPath(),r.rect(this.area.x,this.area.y,this.area.w,this.area.h),r.clip(),r=this.dygraph_.hidden_ctx_,r.beginPath(),r.rect(this.area.x,this.area.y,this.area.w,this.area.h),r.clip()};s.prototype.clear=function(){this.elementContext.clearRect(0,0,this.width,this.height)},s.prototype.render=function(){this._updatePoints(),this._renderLineChart()},s._getIteratorPredicate=function(t){return t?s._predicateThatSkipsEmptyPoints:null},s._predicateThatSkipsEmptyPoints=function(t,e){return null!==t[e].yval},s._drawStyledLine=function(t,e,a,i,r,o,l){var h=t.dygraph,u=h.getBooleanOption(\"stepPlot\",t.setName);n.isArrayLike(i)||(i=null);var d=h.getBooleanOption(\"drawGapEdgePoints\",t.setName),c=t.points,p=t.setName,g=n.createIterator(c,0,c.length,s._getIteratorPredicate(h.getBooleanOption(\"connectSeparatedPoints\",p))),f=i&&i.length>=2,v=t.drawingContext;v.save(),f&&v.setLineDash&&v.setLineDash(i);var _=s._drawSeries(t,g,a,l,r,d,u,e);s._drawPointsOnLine(t,_,o,e,l),f&&v.setLineDash&&v.setLineDash([]),v.restore()},s._drawSeries=function(t,e,a,i,n,r,o,s){var l,h,u=null,d=null,c=null,p=[],g=!0,f=t.drawingContext;f.beginPath(),f.strokeStyle=s,f.lineWidth=a;for(var v=e.array_,_=e.end_,y=e.predicate_,x=e.start_;x<_;x++){if(h=v[x],y){for(;x<_&&!y(v,x);)x++;if(x==_)break;h=v[x]}if(null===h.canvasy||h.canvasy!=h.canvasy)o&&null!==u&&(f.moveTo(u,d),f.lineTo(h.canvasx,d)),u=d=null;else{if(l=!1,r||null===u){e.nextIdx_=x,e.next(),c=e.hasNext?e.peek.canvasy:null;var m=null===c||c!=c;l=null===u&&m,r&&(!g&&null===u||e.hasNext&&m)&&(l=!0)}null!==u?a&&(o&&(f.moveTo(u,d),f.lineTo(h.canvasx,d)),f.lineTo(h.canvasx,h.canvasy)):f.moveTo(h.canvasx,h.canvasy),(n||l)&&p.push([h.canvasx,h.canvasy,h.idx]),u=h.canvasx,d=h.canvasy}g=!1}return f.stroke(),p},s._drawPointsOnLine=function(t,e,a,i,n){for(var r=t.drawingContext,o=0;o<e.length;o++){var s=e[o];r.save(),a.call(t.dygraph,t.dygraph,t.setName,r,s[0],s[1],i,n,s[2]),r.restore()}},s.prototype._updatePoints=function(){for(var t=this.layout.points,e=t.length;e--;)for(var a=t[e],i=a.length;i--;){var n=a[i];n.canvasx=this.area.w*n.x+this.area.x,n.canvasy=this.area.h*n.y+this.area.y}},s.prototype._renderLineChart=function(t,e){var a,i,r=e||this.elementContext,o=this.layout.points,s=this.layout.setNames;this.colors=this.dygraph_.colorsMap_;var l=this.dygraph_.getOption(\"plotter\"),h=l;n.isArrayLike(h)||(h=[h]);var u={};for(a=0;a<s.length;a++){i=s[a];var d=this.dygraph_.getOption(\"plotter\",i);d!=l&&(u[i]=d)}for(a=0;a<h.length;a++)for(var c=h[a],p=a==h.length-1,g=0;g<o.length;g++)if(i=s[g],!t||i==t){var f=o[g],v=c;if(i in u){if(!p)continue;v=u[i]}var _=this.colors[i],y=this.dygraph_.getOption(\"strokeWidth\",i);r.save(),r.strokeStyle=_,r.lineWidth=y,v({points:f,setName:i,drawingContext:r,color:_,strokeWidth:y,dygraph:this.dygraph_,axis:this.dygraph_.axisPropertiesForSeries(i),plotArea:this.area,seriesIndex:g,seriesCount:o.length,singleSeriesName:t,allSeriesPoints:o}),r.restore()}},s._Plotters={linePlotter:function(t){s._linePlotter(t)},fillPlotter:function(t){s._fillPlotter(t)},errorPlotter:function(t){s._errorPlotter(t)}},s._linePlotter=function(t){var e=t.dygraph,a=t.setName,i=t.strokeWidth,r=e.getNumericOption(\"strokeBorderWidth\",a),o=e.getOption(\"drawPointCallback\",a)||n.Circles.DEFAULT,l=e.getOption(\"strokePattern\",a),h=e.getBooleanOption(\"drawPoints\",a),u=e.getNumericOption(\"pointSize\",a);r&&i&&s._drawStyledLine(t,e.getOption(\"strokeBorderColor\",a),i+2*r,l,h,o,u),s._drawStyledLine(t,t.color,i,l,h,o,u)},s._errorPlotter=function(t){var e=t.dygraph,a=t.setName;if(e.getBooleanOption(\"errorBars\")||e.getBooleanOption(\"customBars\")){e.getBooleanOption(\"fillGraph\",a)&&console.warn(\"Can't use fillGraph option with error bars\");var i,r=t.drawingContext,o=t.color,l=e.getNumericOption(\"fillAlpha\",a),h=e.getBooleanOption(\"stepPlot\",a),u=t.points,d=n.createIterator(u,0,u.length,s._getIteratorPredicate(e.getBooleanOption(\"connectSeparatedPoints\",a))),c=NaN,p=NaN,g=[-1,-1],f=n.toRGB_(o),v=\"rgba(\"+f.r+\",\"+f.g+\",\"+f.b+\",\"+l+\")\";r.fillStyle=v,r.beginPath();for(var _=function(t){return null===t||void 0===t||isNaN(t)};d.hasNext;){var y=d.next();!h&&_(y.y)||h&&!isNaN(p)&&_(p)?c=NaN:(i=[y.y_bottom,y.y_top],h&&(p=y.y),isNaN(i[0])&&(i[0]=y.y),isNaN(i[1])&&(i[1]=y.y),i[0]=t.plotArea.h*i[0]+t.plotArea.y,i[1]=t.plotArea.h*i[1]+t.plotArea.y,isNaN(c)||(h?(r.moveTo(c,g[0]),r.lineTo(y.canvasx,g[0]),r.lineTo(y.canvasx,g[1])):(r.moveTo(c,g[0]),r.lineTo(y.canvasx,i[0]),r.lineTo(y.canvasx,i[1])),r.lineTo(c,g[1]),r.closePath()),g=i,c=y.canvasx)}r.fill()}},s._fastCanvasProxy=function(t){var e=[],a=null,i=null,n=0,r=function(t){if(!(e.length<=1)){for(var a=e.length-1;a>0;a--){var i=e[a];if(2==i[0]){var n=e[a-1];n[1]==i[1]&&n[2]==i[2]&&e.splice(a,1)}}for(var a=0;a<e.length-1;){var i=e[a];2==i[0]&&2==e[a+1][0]?e.splice(a,1):a++}if(e.length>2&&!t){var r=0;2==e[0][0]&&r++;for(var o=null,s=null,a=r;a<e.length;a++){var i=e[a];if(1==i[0])if(null===o&&null===s)o=a,s=a;else{var l=i[2];l<e[o][2]?o=a:l>e[s][2]&&(s=a)}}var h=e[o],u=e[s];e.splice(r,e.length-r),o<s?(e.push(h),e.push(u)):o>s?(e.push(u),e.push(h)):e.push(h)}}},o=function(a){r(a);for(var o=0,s=e.length;o<s;o++){var l=e[o];1==l[0]?t.lineTo(l[1],l[2]):2==l[0]&&t.moveTo(l[1],l[2])}e.length&&(i=e[e.length-1][1]),n+=e.length,e=[]},s=function(t,n,r){var s=Math.round(n);if(null===a||s!=a){var l=a-i>1,h=s-a>1;o(l||h),a=s}e.push([t,n,r])};return{moveTo:function(t,e){s(2,t,e)},lineTo:function(t,e){s(1,t,e)},stroke:function(){o(!0),t.stroke()},fill:function(){o(!0),t.fill()},beginPath:function(){o(!0),t.beginPath()},closePath:function(){o(!0),t.closePath()},_count:function(){return n}}},s._fillPlotter=function(t){if(!t.singleSeriesName&&0===t.seriesIndex){for(var e=t.dygraph,a=e.getLabels().slice(1),i=a.length;i>=0;i--)e.visibility()[i]||a.splice(i,1);if(function(){for(var t=0;t<a.length;t++)if(e.getBooleanOption(\"fillGraph\",a[t]))return!0;return!1}())for(var r,l,h=t.plotArea,u=t.allSeriesPoints,d=u.length,c=e.getBooleanOption(\"stackedGraph\"),p=e.getColors(),g={},f=function(t,e,a,i){if(t.lineTo(e,a),c)for(var n=i.length-1;n>=0;n--){var r=i[n];t.lineTo(r[0],r[1])}},v=d-1;v>=0;v--){var _=t.drawingContext,y=a[v];if(e.getBooleanOption(\"fillGraph\",y)){var x=e.getNumericOption(\"fillAlpha\",y),m=e.getBooleanOption(\"stepPlot\",y),b=p[v],w=e.axisPropertiesForSeries(y),A=1+w.minyval*w.yscale;A<0?A=0:A>1&&(A=1),A=h.h*A+h.y;var O,D=u[v],E=n.createIterator(D,0,D.length,s._getIteratorPredicate(e.getBooleanOption(\"connectSeparatedPoints\",y))),L=NaN,T=[-1,-1],S=n.toRGB_(b),P=\"rgba(\"+S.r+\",\"+S.g+\",\"+S.b+\",\"+x+\")\";_.fillStyle=P,_.beginPath();var C,M=!0;(D.length>2*e.width_||o.default.FORCE_FAST_PROXY)&&(_=s._fastCanvasProxy(_));for(var N,F=[];E.hasNext;)if(N=E.next(),n.isOK(N.y)||m){if(c){if(!M&&C==N.xval)continue;M=!1,C=N.xval,r=g[N.canvasx];var k;k=void 0===r?A:l?r[0]:r,O=[N.canvasy,k],m?-1===T[0]?g[N.canvasx]=[N.canvasy,A]:g[N.canvasx]=[N.canvasy,T[0]]:g[N.canvasx]=N.canvasy}else O=isNaN(N.canvasy)&&m?[h.y+h.h,A]:[N.canvasy,A];isNaN(L)?(_.moveTo(N.canvasx,O[1]),_.lineTo(N.canvasx,O[0])):(m?(_.lineTo(N.canvasx,T[0]),_.lineTo(N.canvasx,O[0])):_.lineTo(N.canvasx,O[0]),c&&(F.push([L,T[1]]),l&&r?F.push([N.canvasx,r[1]]):F.push([N.canvasx,O[1]]))),T=O,L=N.canvasx}else f(_,L,T[1],F),F=[],L=NaN,null===N.y_stacked||isNaN(N.y_stacked)||(g[N.canvasx]=h.h*N.y_stacked+h.y);l=m,O&&N&&(f(_,N.canvasx,O[1],F),F=[]),_.fill()}}}},a.default=s,e.exports=a.default},{\"./dygraph\":18,\"./dygraph-utils\":17}],10:[function(t,e,a){\"use strict\";function i(t){return t&&t.__esModule?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}Object.defineProperty(a,\"__esModule\",{value:!0});var r=t(\"./dygraph-tickers\"),o=n(r),s=t(\"./dygraph-interaction-model\"),l=i(s),h=t(\"./dygraph-canvas\"),u=i(h),d=t(\"./dygraph-utils\"),c=n(d),p={highlightCircleSize:3,highlightSeriesOpts:null,highlightSeriesBackgroundAlpha:.5,highlightSeriesBackgroundColor:\"rgb(255, 255, 255)\",labelsSeparateLines:!1,labelsShowZeroValues:!0,labelsKMB:!1,labelsKMG2:!1,showLabelsOnHighlight:!0,digitsAfterDecimal:2,maxNumberWidth:6,sigFigs:null,strokeWidth:1,strokeBorderWidth:0,strokeBorderColor:\"white\",axisTickSize:3,axisLabelFontSize:14,rightGap:5,showRoller:!1,xValueParser:void 0,delimiter:\",\",sigma:2,errorBars:!1,fractions:!1,wilsonInterval:!0,customBars:!1,fillGraph:!1,fillAlpha:.15,connectSeparatedPoints:!1,stackedGraph:!1,stackedGraphNaNFill:\"all\",hideOverlayOnMouseOut:!0,legend:\"onmouseover\",stepPlot:!1,xRangePad:0,yRangePad:null,drawAxesAtZero:!1,titleHeight:28,xLabelHeight:18,yLabelWidth:18,axisLineColor:\"black\",axisLineWidth:.3,gridLineWidth:.3,axisLabelWidth:50,gridLineColor:\"rgb(128,128,128)\",interactionModel:l.default.defaultModel,animatedZooms:!1,showRangeSelector:!1,rangeSelectorHeight:40,rangeSelectorPlotStrokeColor:\"#808FAB\",rangeSelectorPlotFillGradientColor:\"white\",rangeSelectorPlotFillColor:\"#A7B1C4\",rangeSelectorBackgroundStrokeColor:\"gray\",rangeSelectorBackgroundLineWidth:1,rangeSelectorPlotLineWidth:1.5,rangeSelectorForegroundStrokeColor:\"black\",rangeSelectorForegroundLineWidth:1,rangeSelectorAlpha:.6,showInRangeSelector:null,plotter:[u.default._fillPlotter,u.default._errorPlotter,u.default._linePlotter],plugins:[],axes:{x:{pixelsPerLabel:70,axisLabelWidth:60,axisLabelFormatter:c.dateAxisLabelFormatter,valueFormatter:c.dateValueFormatter,drawGrid:!0,drawAxis:!0,independentTicks:!0,ticker:o.dateTicker},y:{axisLabelWidth:50,pixelsPerLabel:30,valueFormatter:c.numberValueFormatter,axisLabelFormatter:c.numberAxisLabelFormatter,drawGrid:!0,drawAxis:!0,independentTicks:!0,ticker:o.numericTicks},y2:{axisLabelWidth:50,pixelsPerLabel:30,valueFormatter:c.numberValueFormatter,axisLabelFormatter:c.numberAxisLabelFormatter,drawAxis:!0,drawGrid:!1,independentTicks:!1,ticker:o.numericTicks}}};a.default=p,e.exports=a.default},{\"./dygraph-canvas\":9,\"./dygraph-interaction-model\":12,\"./dygraph-tickers\":16,\"./dygraph-utils\":17}],11:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./dygraph\"),n=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(t){this.container=t};r.prototype.draw=function(t,e){this.container.innerHTML=\"\",void 0!==this.date_graph&&this.date_graph.destroy(),this.date_graph=new n.default(this.container,t,e)},r.prototype.setSelection=function(t){var e=!1;t.length&&(e=t[0].row),this.date_graph.setSelection(e)},r.prototype.getSelection=function(){var t=[],e=this.date_graph.getSelection();if(e<0)return t;for(var a=this.date_graph.layout_.points,i=0;i<a.length;++i)t.push({row:e,column:i+1});return t},a.default=r,e.exports=a.default},{\"./dygraph\":18}],12:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./dygraph-utils\"),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(i),r={};r.maybeTreatMouseOpAsClick=function(t,e,a){a.dragEndX=n.dragGetX_(t,a),a.dragEndY=n.dragGetY_(t,a);var i=Math.abs(a.dragEndX-a.dragStartX),o=Math.abs(a.dragEndY-a.dragStartY);i<2&&o<2&&void 0!==e.lastx_&&-1!=e.lastx_&&r.treatMouseOpAsClick(e,t,a),a.regionWidth=i,a.regionHeight=o},r.startPan=function(t,e,a){var i,r;a.isPanning=!0;var o=e.xAxisRange();if(e.getOptionForAxis(\"logscale\",\"x\")?(a.initialLeftmostDate=n.log10(o[0]),a.dateRange=n.log10(o[1])-n.log10(o[0])):(a.initialLeftmostDate=o[0],a.dateRange=o[1]-o[0]),a.xUnitsPerPixel=a.dateRange/(e.plotter_.area.w-1),e.getNumericOption(\"panEdgeFraction\")){var s=e.width_*e.getNumericOption(\"panEdgeFraction\"),l=e.xAxisExtremes(),h=e.toDomXCoord(l[0])-s,u=e.toDomXCoord(l[1])+s,d=e.toDataXCoord(h),c=e.toDataXCoord(u);a.boundedDates=[d,c];var p=[],g=e.height_*e.getNumericOption(\"panEdgeFraction\");for(i=0;i<e.axes_.length;i++){r=e.axes_[i];var f=r.extremeRange,v=e.toDomYCoord(f[0],i)+g,_=e.toDomYCoord(f[1],i)-g,y=e.toDataYCoord(v,i),x=e.toDataYCoord(_,i);p[i]=[y,x]}a.boundedValues=p}for(a.is2DPan=!1,a.axes=[],i=0;i<e.axes_.length;i++){r=e.axes_[i];var m={},b=e.yAxisRange(i);e.attributes_.getForAxis(\"logscale\",i)?(m.initialTopValue=n.log10(b[1]),m.dragValueRange=n.log10(b[1])-n.log10(b[0])):(m.initialTopValue=b[1],m.dragValueRange=b[1]-b[0]),m.unitsPerPixel=m.dragValueRange/(e.plotter_.area.h-1),a.axes.push(m),r.valueRange&&(a.is2DPan=!0)}},r.movePan=function(t,e,a){a.dragEndX=n.dragGetX_(t,a),a.dragEndY=n.dragGetY_(t,a);var i=a.initialLeftmostDate-(a.dragEndX-a.dragStartX)*a.xUnitsPerPixel;a.boundedDates&&(i=Math.max(i,a.boundedDates[0]));var r=i+a.dateRange;if(a.boundedDates&&r>a.boundedDates[1]&&(i-=r-a.boundedDates[1],r=i+a.dateRange),e.getOptionForAxis(\"logscale\",\"x\")?e.dateWindow_=[Math.pow(n.LOG_SCALE,i),Math.pow(n.LOG_SCALE,r)]:e.dateWindow_=[i,r],a.is2DPan)for(var o=a.dragEndY-a.dragStartY,s=0;s<e.axes_.length;s++){var l=e.axes_[s],h=a.axes[s],u=o*h.unitsPerPixel,d=a.boundedValues?a.boundedValues[s]:null,c=h.initialTopValue+u;d&&(c=Math.min(c,d[1]));var p=c-h.dragValueRange;d&&p<d[0]&&(c-=p-d[0],p=c-h.dragValueRange),e.attributes_.getForAxis(\"logscale\",s)?l.valueRange=[Math.pow(n.LOG_SCALE,p),Math.pow(n.LOG_SCALE,c)]:l.valueRange=[p,c]}e.drawGraph_(!1)},r.endPan=r.maybeTreatMouseOpAsClick,r.startZoom=function(t,e,a){a.isZooming=!0,a.zoomMoved=!1},r.moveZoom=function(t,e,a){a.zoomMoved=!0,a.dragEndX=n.dragGetX_(t,a),a.dragEndY=n.dragGetY_(t,a);var i=Math.abs(a.dragStartX-a.dragEndX),r=Math.abs(a.dragStartY-a.dragEndY);a.dragDirection=i<r/2?n.VERTICAL:n.HORIZONTAL,e.drawZoomRect_(a.dragDirection,a.dragStartX,a.dragEndX,a.dragStartY,a.dragEndY,a.prevDragDirection,a.prevEndX,a.prevEndY),a.prevEndX=a.dragEndX,a.prevEndY=a.dragEndY,a.prevDragDirection=a.dragDirection},r.treatMouseOpAsClick=function(t,e,a){for(var i=t.getFunctionOption(\"clickCallback\"),n=t.getFunctionOption(\"pointClickCallback\"),r=null,o=-1,s=Number.MAX_VALUE,l=0;l<t.selPoints_.length;l++){var h=t.selPoints_[l],u=Math.pow(h.canvasx-a.dragEndX,2)+Math.pow(h.canvasy-a.dragEndY,2);!isNaN(u)&&(-1==o||u<s)&&(s=u,o=l)}var d=t.getNumericOption(\"highlightCircleSize\")+2;if(s<=d*d&&(r=t.selPoints_[o]),r){var c={cancelable:!0,point:r,canvasx:a.dragEndX,canvasy:a.dragEndY};if(t.cascadeEvents_(\"pointClick\",c))return;n&&n.call(t,e,r)}var c={cancelable:!0,xval:t.lastx_,pts:t.selPoints_,canvasx:a.dragEndX,canvasy:a.dragEndY};t.cascadeEvents_(\"click\",c)||i&&i.call(t,e,t.lastx_,t.selPoints_)},r.endZoom=function(t,e,a){e.clearZoomRect_(),a.isZooming=!1,r.maybeTreatMouseOpAsClick(t,e,a);var i=e.getArea();if(a.regionWidth>=10&&a.dragDirection==n.HORIZONTAL){var o=Math.min(a.dragStartX,a.dragEndX),s=Math.max(a.dragStartX,a.dragEndX);o=Math.max(o,i.x),s=Math.min(s,i.x+i.w),o<s&&e.doZoomX_(o,s),a.cancelNextDblclick=!0}else if(a.regionHeight>=10&&a.dragDirection==n.VERTICAL){var l=Math.min(a.dragStartY,a.dragEndY),h=Math.max(a.dragStartY,a.dragEndY);l=Math.max(l,i.y),h=Math.min(h,i.y+i.h),l<h&&e.doZoomY_(l,h),a.cancelNextDblclick=!0}a.dragStartX=null,a.dragStartY=null},r.startTouch=function(t,e,a){t.preventDefault(),t.touches.length>1&&(a.startTimeForDoubleTapMs=null);for(var i=[],n=0;n<t.touches.length;n++){var r=t.touches[n];i.push({pageX:r.pageX,pageY:r.pageY,dataX:e.toDataXCoord(r.pageX),dataY:e.toDataYCoord(r.pageY)})}if(a.initialTouches=i,1==i.length)a.initialPinchCenter=i[0],a.touchDirections={x:!0,y:!0};else if(i.length>=2){a.initialPinchCenter={pageX:.5*(i[0].pageX+i[1].pageX),pageY:.5*(i[0].pageY+i[1].pageY),dataX:.5*(i[0].dataX+i[1].dataX),dataY:.5*(i[0].dataY+i[1].dataY)};var o=180/Math.PI*Math.atan2(a.initialPinchCenter.pageY-i[0].pageY,i[0].pageX-a.initialPinchCenter.pageX);o=Math.abs(o),o>90&&(o=90-o),a.touchDirections={x:o<67.5,y:o>22.5}}a.initialRange={x:e.xAxisRange(),y:e.yAxisRange()}},r.moveTouch=function(t,e,a){a.startTimeForDoubleTapMs=null;var i,n=[];for(i=0;i<t.touches.length;i++){var r=t.touches[i];n.push({pageX:r.pageX,pageY:r.pageY})}var o,s=a.initialTouches,l=a.initialPinchCenter;o=1==n.length?n[0]:{pageX:.5*(n[0].pageX+n[1].pageX),pageY:.5*(n[0].pageY+n[1].pageY)};var h={pageX:o.pageX-l.pageX,pageY:o.pageY-l.pageY},u=a.initialRange.x[1]-a.initialRange.x[0],d=a.initialRange.y[0]-a.initialRange.y[1];h.dataX=h.pageX/e.plotter_.area.w*u,h.dataY=h.pageY/e.plotter_.area.h*d;var c,p;if(1==n.length)c=1,p=1;else if(n.length>=2){var g=s[1].pageX-l.pageX;c=(n[1].pageX-o.pageX)/g;var f=s[1].pageY-l.pageY;p=(n[1].pageY-o.pageY)/f}c=Math.min(8,Math.max(.125,c)),p=Math.min(8,Math.max(.125,p));var v=!1;if(a.touchDirections.x&&(e.dateWindow_=[l.dataX-h.dataX+(a.initialRange.x[0]-l.dataX)/c,l.dataX-h.dataX+(a.initialRange.x[1]-l.dataX)/c],v=!0),a.touchDirections.y)for(i=0;i<1;i++){var _=e.axes_[i],y=e.attributes_.getForAxis(\"logscale\",i);y||(_.valueRange=[l.dataY-h.dataY+(a.initialRange.y[0]-l.dataY)/p,l.dataY-h.dataY+(a.initialRange.y[1]-l.dataY)/p],v=!0)}if(e.drawGraph_(!1),v&&n.length>1&&e.getFunctionOption(\"zoomCallback\")){var x=e.xAxisRange();e.getFunctionOption(\"zoomCallback\").call(e,x[0],x[1],e.yAxisRanges())}},r.endTouch=function(t,e,a){if(0!==t.touches.length)r.startTouch(t,e,a);else if(1==t.changedTouches.length){var i=(new Date).getTime(),n=t.changedTouches[0];a.startTimeForDoubleTapMs&&i-a.startTimeForDoubleTapMs<500&&a.doubleTapX&&Math.abs(a.doubleTapX-n.screenX)<50&&a.doubleTapY&&Math.abs(a.doubleTapY-n.screenY)<50?e.resetZoom():(a.startTimeForDoubleTapMs=i,a.doubleTapX=n.screenX,a.doubleTapY=n.screenY)}};var o=function(t,e,a){return t<e?e-t:t>a?t-a:0},s=function(t,e){var a=n.findPos(e.canvas_),i={left:a.x,right:a.x+e.canvas_.offsetWidth,top:a.y,bottom:a.y+e.canvas_.offsetHeight},r={x:n.pageX(t),y:n.pageY(t)},s=o(r.x,i.left,i.right),l=o(r.y,i.top,i.bottom);return Math.max(s,l)};r.defaultModel={mousedown:function(t,e,a){if(!t.button||2!=t.button){a.initializeMouseDown(t,e,a),t.altKey||t.shiftKey?r.startPan(t,e,a):r.startZoom(t,e,a);var i=function(t){if(a.isZooming){s(t,e)<100?r.moveZoom(t,e,a):null!==a.dragEndX&&(a.dragEndX=null,a.dragEndY=null,e.clearZoomRect_())}else a.isPanning&&r.movePan(t,e,a)},o=function t(o){a.isZooming?null!==a.dragEndX?r.endZoom(o,e,a):r.maybeTreatMouseOpAsClick(o,e,a):a.isPanning&&r.endPan(o,e,a),n.removeEvent(document,\"mousemove\",i),n.removeEvent(document,\"mouseup\",t),a.destroy()};e.addAndTrackEvent(document,\"mousemove\",i),e.addAndTrackEvent(document,\"mouseup\",o)}},willDestroyContextMyself:!0,touchstart:function(t,e,a){r.startTouch(t,e,a)},touchmove:function(t,e,a){r.moveTouch(t,e,a)},touchend:function(t,e,a){r.endTouch(t,e,a)},dblclick:function(t,e,a){if(a.cancelNextDblclick)return void(a.cancelNextDblclick=!1);var i={canvasx:a.dragEndX,canvasy:a.dragEndY,cancelable:!0};e.cascadeEvents_(\"dblclick\",i)||t.altKey||t.shiftKey||e.resetZoom()}},r.nonInteractiveModel_={mousedown:function(t,e,a){a.initializeMouseDown(t,e,a)},mouseup:r.maybeTreatMouseOpAsClick},r.dragIsPanInteractionModel={mousedown:function(t,e,a){a.initializeMouseDown(t,e,a),r.startPan(t,e,a)},mousemove:function(t,e,a){a.isPanning&&r.movePan(t,e,a)},mouseup:function(t,e,a){a.isPanning&&r.endPan(t,e,a)}},a.default=r,e.exports=a.default},{\"./dygraph-utils\":17}],13:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./dygraph-utils\"),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(i),r=function(t){this.dygraph_=t,this.points=[],this.setNames=[],this.annotations=[],this.yAxes_=null,this.xTicks_=null,this.yTicks_=null};r.prototype.addDataset=function(t,e){this.points.push(e),this.setNames.push(t)},r.prototype.getPlotArea=function(){return this.area_},r.prototype.computePlotArea=function(){var t={x:0,y:0};t.w=this.dygraph_.width_-t.x-this.dygraph_.getOption(\"rightGap\"),t.h=this.dygraph_.height_;var e={chart_div:this.dygraph_.graphDiv,reserveSpaceLeft:function(e){var a={x:t.x,y:t.y,w:e,h:t.h};return t.x+=e,t.w-=e,a},reserveSpaceRight:function(e){var a={x:t.x+t.w-e,y:t.y,w:e,h:t.h};return t.w-=e,a},reserveSpaceTop:function(e){var a={x:t.x,y:t.y,w:t.w,h:e};return t.y+=e,t.h-=e,a},reserveSpaceBottom:function(e){var a={x:t.x,y:t.y+t.h-e,w:t.w,h:e};return t.h-=e,a},chartRect:function(){return{x:t.x,y:t.y,w:t.w,h:t.h}}};this.dygraph_.cascadeEvents_(\"layout\",e),this.area_=t},r.prototype.setAnnotations=function(t){this.annotations=[];for(var e=this.dygraph_.getOption(\"xValueParser\")||function(t){return t},a=0;a<t.length;a++){var i={};if(!t[a].xval&&void 0===t[a].x)return void console.error(\"Annotations must have an 'x' property\");if(t[a].icon&&(!t[a].hasOwnProperty(\"width\")||!t[a].hasOwnProperty(\"height\")))return void console.error(\"Must set width and height when setting annotation.icon property\");n.update(i,t[a]),i.xval||(i.xval=e(i.x)),this.annotations.push(i)}},r.prototype.setXTicks=function(t){this.xTicks_=t},r.prototype.setYAxes=function(t){this.yAxes_=t},r.prototype.evaluate=function(){this._xAxis={},this._evaluateLimits(),this._evaluateLineCharts(),this._evaluateLineTicks(),this._evaluateAnnotations()},r.prototype._evaluateLimits=function(){var t=this.dygraph_.xAxisRange();this._xAxis.minval=t[0],this._xAxis.maxval=t[1];var e=t[1]-t[0];this._xAxis.scale=0!==e?1/e:1,this.dygraph_.getOptionForAxis(\"logscale\",\"x\")&&(this._xAxis.xlogrange=n.log10(this._xAxis.maxval)-n.log10(this._xAxis.minval),this._xAxis.xlogscale=0!==this._xAxis.xlogrange?1/this._xAxis.xlogrange:1);for(var a=0;a<this.yAxes_.length;a++){var i=this.yAxes_[a];i.minyval=i.computedValueRange[0],i.maxyval=i.computedValueRange[1],i.yrange=i.maxyval-i.minyval,i.yscale=0!==i.yrange?1/i.yrange:1,this.dygraph_.getOption(\"logscale\")&&(i.ylogrange=n.log10(i.maxyval)-n.log10(i.minyval),i.ylogscale=0!==i.ylogrange?1/i.ylogrange:1,isFinite(i.ylogrange)&&!isNaN(i.ylogrange)||console.error(\"axis \"+a+\" of graph at \"+i.g+\" can't be displayed in log scale for range [\"+i.minyval+\" - \"+i.maxyval+\"]\"))}},r.calcXNormal_=function(t,e,a){return a?(n.log10(t)-n.log10(e.minval))*e.xlogscale:(t-e.minval)*e.scale},r.calcYNormal_=function(t,e,a){if(a){var i=1-(n.log10(e)-n.log10(t.minyval))*t.ylogscale;return isFinite(i)?i:NaN}return 1-(e-t.minyval)*t.yscale},r.prototype._evaluateLineCharts=function(){for(var t=this.dygraph_.getOption(\"stackedGraph\"),e=this.dygraph_.getOptionForAxis(\"logscale\",\"x\"),a=0;a<this.points.length;a++){for(var i=this.points[a],n=this.setNames[a],o=this.dygraph_.getOption(\"connectSeparatedPoints\",n),s=this.dygraph_.axisPropertiesForSeries(n),l=this.dygraph_.attributes_.getForSeries(\"logscale\",n),h=0;h<i.length;h++){var u=i[h];u.x=r.calcXNormal_(u.xval,this._xAxis,e);var d=u.yval;t&&(u.y_stacked=r.calcYNormal_(s,u.yval_stacked,l),\nnull===d||isNaN(d)||(d=u.yval_stacked)),null===d&&(d=NaN,o||(u.yval=NaN)),u.y=r.calcYNormal_(s,d,l)}this.dygraph_.dataHandler_.onLineEvaluated(i,s,l)}},r.prototype._evaluateLineTicks=function(){var t,e,a,i,n,r;for(this.xticks=[],t=0;t<this.xTicks_.length;t++)e=this.xTicks_[t],a=e.label,r=!(\"label_v\"in e),n=r?e.v:e.label_v,(i=this.dygraph_.toPercentXCoord(n))>=0&&i<1&&this.xticks.push({pos:i,label:a,has_tick:r});for(this.yticks=[],t=0;t<this.yAxes_.length;t++)for(var o=this.yAxes_[t],s=0;s<o.ticks.length;s++)e=o.ticks[s],a=e.label,r=!(\"label_v\"in e),n=r?e.v:e.label_v,(i=this.dygraph_.toPercentYCoord(n,t))>0&&i<=1&&this.yticks.push({axis:t,pos:i,label:a,has_tick:r})},r.prototype._evaluateAnnotations=function(){var t,e={};for(t=0;t<this.annotations.length;t++){var a=this.annotations[t];e[a.xval+\",\"+a.series]=a}if(this.annotated_points=[],this.annotations&&this.annotations.length)for(var i=0;i<this.points.length;i++){var n=this.points[i];for(t=0;t<n.length;t++){var r=n[t],o=r.xval+\",\"+r.name;o in e&&(r.annotation=e[o],this.annotated_points.push(r))}}},r.prototype.removeAllDatasets=function(){delete this.points,delete this.setNames,delete this.setPointsLengths,delete this.setPointsOffsets,this.points=[],this.setNames=[],this.setPointsLengths=[],this.setPointsOffsets=[]},a.default=r,e.exports=a.default},{\"./dygraph-utils\":17}],14:[function(t,e,a){(function(t){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=null;if(void 0!==t);a.default=i,e.exports=a.default}).call(this,t(\"_process\"))},{_process:1}],15:[function(t,e,a){(function(i){\"use strict\";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(a,\"__esModule\",{value:!0});var r=t(\"./dygraph-utils\"),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(r),s=t(\"./dygraph-default-attrs\"),l=n(s),h=t(\"./dygraph-options-reference\"),u=(n(h),function(t){this.dygraph_=t,this.yAxes_=[],this.xAxis_={},this.series_={},this.global_=this.dygraph_.attrs_,this.user_=this.dygraph_.user_attrs_||{},this.labels_=[],this.highlightSeries_=this.get(\"highlightSeriesOpts\")||{},this.reparseSeries()});if(u.AXIS_STRING_MAPPINGS_={y:0,Y:0,y1:0,Y1:0,y2:1,Y2:1},u.axisToIndex_=function(t){if(\"string\"==typeof t){if(u.AXIS_STRING_MAPPINGS_.hasOwnProperty(t))return u.AXIS_STRING_MAPPINGS_[t];throw\"Unknown axis : \"+t}if(\"number\"==typeof t){if(0===t||1===t)return t;throw\"Dygraphs only supports two y-axes, indexed from 0-1.\"}if(t)throw\"Unknown axis : \"+t;return 0},u.prototype.reparseSeries=function(){var t=this.get(\"labels\");if(t){this.labels_=t.slice(1),this.yAxes_=[{series:[],options:{}}],this.xAxis_={options:{}},this.series_={};for(var e=this.user_.series||{},a=0;a<this.labels_.length;a++){var i=this.labels_[a],n=e[i]||{},r=u.axisToIndex_(n.axis);this.series_[i]={idx:a,yAxis:r,options:n},this.yAxes_[r]?this.yAxes_[r].series.push(i):this.yAxes_[r]={series:[i],options:{}}}var s=this.user_.axes||{};o.update(this.yAxes_[0].options,s.y||{}),this.yAxes_.length>1&&o.update(this.yAxes_[1].options,s.y2||{}),o.update(this.xAxis_.options,s.x||{})}},u.prototype.get=function(t){var e=this.getGlobalUser_(t);return null!==e?e:this.getGlobalDefault_(t)},u.prototype.getGlobalUser_=function(t){return this.user_.hasOwnProperty(t)?this.user_[t]:null},u.prototype.getGlobalDefault_=function(t){return this.global_.hasOwnProperty(t)?this.global_[t]:l.default.hasOwnProperty(t)?l.default[t]:null},u.prototype.getForAxis=function(t,e){var a,i;if(\"number\"==typeof e)a=e,i=0===a?\"y\":\"y2\";else{if(\"y1\"==e&&(e=\"y\"),\"y\"==e)a=0;else if(\"y2\"==e)a=1;else{if(\"x\"!=e)throw\"Unknown axis \"+e;a=-1}i=e}var n=-1==a?this.xAxis_:this.yAxes_[a];if(n){var r=n.options;if(r.hasOwnProperty(t))return r[t]}if(\"x\"!==e||\"logscale\"!==t){var o=this.getGlobalUser_(t);if(null!==o)return o}var s=l.default.axes[i];return s.hasOwnProperty(t)?s[t]:this.getGlobalDefault_(t)},u.prototype.getForSeries=function(t,e){if(e===this.dygraph_.getHighlightSeries()&&this.highlightSeries_.hasOwnProperty(t))return this.highlightSeries_[t];if(!this.series_.hasOwnProperty(e))throw\"Unknown series: \"+e;var a=this.series_[e],i=a.options;return i.hasOwnProperty(t)?i[t]:this.getForAxis(t,a.yAxis)},u.prototype.numAxes=function(){return this.yAxes_.length},u.prototype.axisForSeries=function(t){return this.series_[t].yAxis},u.prototype.axisOptions=function(t){return this.yAxes_[t].options},u.prototype.seriesForAxis=function(t){return this.yAxes_[t].series},u.prototype.seriesNames=function(){return this.labels_},void 0!==i);a.default=u,e.exports=a.default}).call(this,t(\"_process\"))},{\"./dygraph-default-attrs\":10,\"./dygraph-options-reference\":14,\"./dygraph-utils\":17,_process:1}],16:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./dygraph-utils\"),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(i),r=function(t,e,a,i,n,r){return o(t,e,a,function(t){return\"logscale\"!==t&&i(t)},n,r)};a.numericLinearTicks=r;var o=function(t,e,a,i,r,o){var s,l,h,u,c=i(\"pixelsPerLabel\"),p=[];if(o)for(s=0;s<o.length;s++)p.push({v:o[s]});else{if(i(\"logscale\")){u=Math.floor(a/c);var g=n.binarySearch(t,d,1),f=n.binarySearch(e,d,-1);-1==g&&(g=0),-1==f&&(f=d.length-1);var v=null;if(f-g>=u/4){for(var _=f;_>=g;_--){var y=d[_],x=Math.log(y/t)/Math.log(e/t)*a,m={v:y};null===v?v={tickValue:y,pixel_coord:x}:Math.abs(x-v.pixel_coord)>=c?v={tickValue:y,pixel_coord:x}:m.label=\"\",p.push(m)}p.reverse()}}if(0===p.length){var b,w,A=i(\"labelsKMG2\");A?(b=[1,2,4,8,16,32,64,128,256],w=16):(b=[1,2,5,10,20,50,100],w=10);var O,D,E,L=Math.ceil(a/c),T=Math.abs(e-t)/L,S=Math.floor(Math.log(T)/Math.log(w)),P=Math.pow(w,S);for(l=0;l<b.length&&(O=P*b[l],D=Math.floor(t/O)*O,E=Math.ceil(e/O)*O,u=Math.abs(E-D)/O,!(a/u>c));l++);for(D>E&&(O*=-1),s=0;s<=u;s++)h=D+s*O,p.push({v:h})}}var C=i(\"axisLabelFormatter\");for(s=0;s<p.length;s++)void 0===p[s].label&&(p[s].label=C.call(r,p[s].v,0,i,r));return p};a.numericTicks=o;var s=function(t,e,a,i,n,r){var o=c(t,e,a,i);return o>=0?g(t,e,o,i,n):[]};a.dateTicker=s;var l={MILLISECONDLY:0,TWO_MILLISECONDLY:1,FIVE_MILLISECONDLY:2,TEN_MILLISECONDLY:3,FIFTY_MILLISECONDLY:4,HUNDRED_MILLISECONDLY:5,FIVE_HUNDRED_MILLISECONDLY:6,SECONDLY:7,TWO_SECONDLY:8,FIVE_SECONDLY:9,TEN_SECONDLY:10,THIRTY_SECONDLY:11,MINUTELY:12,TWO_MINUTELY:13,FIVE_MINUTELY:14,TEN_MINUTELY:15,THIRTY_MINUTELY:16,HOURLY:17,TWO_HOURLY:18,SIX_HOURLY:19,DAILY:20,TWO_DAILY:21,WEEKLY:22,MONTHLY:23,QUARTERLY:24,BIANNUAL:25,ANNUAL:26,DECADAL:27,CENTENNIAL:28,NUM_GRANULARITIES:29};a.Granularity=l;var h={DATEFIELD_Y:0,DATEFIELD_M:1,DATEFIELD_D:2,DATEFIELD_HH:3,DATEFIELD_MM:4,DATEFIELD_SS:5,DATEFIELD_MS:6,NUM_DATEFIELDS:7},u=[];u[l.MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:1,spacing:1},u[l.TWO_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:2,spacing:2},u[l.FIVE_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:5,spacing:5},u[l.TEN_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:10,spacing:10},u[l.FIFTY_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:50,spacing:50},u[l.HUNDRED_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:100,spacing:100},u[l.FIVE_HUNDRED_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:500,spacing:500},u[l.SECONDLY]={datefield:h.DATEFIELD_SS,step:1,spacing:1e3},u[l.TWO_SECONDLY]={datefield:h.DATEFIELD_SS,step:2,spacing:2e3},u[l.FIVE_SECONDLY]={datefield:h.DATEFIELD_SS,step:5,spacing:5e3},u[l.TEN_SECONDLY]={datefield:h.DATEFIELD_SS,step:10,spacing:1e4},u[l.THIRTY_SECONDLY]={datefield:h.DATEFIELD_SS,step:30,spacing:3e4},u[l.MINUTELY]={datefield:h.DATEFIELD_MM,step:1,spacing:6e4},u[l.TWO_MINUTELY]={datefield:h.DATEFIELD_MM,step:2,spacing:12e4},u[l.FIVE_MINUTELY]={datefield:h.DATEFIELD_MM,step:5,spacing:3e5},u[l.TEN_MINUTELY]={datefield:h.DATEFIELD_MM,step:10,spacing:6e5},u[l.THIRTY_MINUTELY]={datefield:h.DATEFIELD_MM,step:30,spacing:18e5},u[l.HOURLY]={datefield:h.DATEFIELD_HH,step:1,spacing:36e5},u[l.TWO_HOURLY]={datefield:h.DATEFIELD_HH,step:2,spacing:72e5},u[l.SIX_HOURLY]={datefield:h.DATEFIELD_HH,step:6,spacing:216e5},u[l.DAILY]={datefield:h.DATEFIELD_D,step:1,spacing:864e5},u[l.TWO_DAILY]={datefield:h.DATEFIELD_D,step:2,spacing:1728e5},u[l.WEEKLY]={datefield:h.DATEFIELD_D,step:7,spacing:6048e5},u[l.MONTHLY]={datefield:h.DATEFIELD_M,step:1,spacing:2629817280},u[l.QUARTERLY]={datefield:h.DATEFIELD_M,step:3,spacing:216e5*365.2524},u[l.BIANNUAL]={datefield:h.DATEFIELD_M,step:6,spacing:432e5*365.2524},u[l.ANNUAL]={datefield:h.DATEFIELD_Y,step:1,spacing:864e5*365.2524},u[l.DECADAL]={datefield:h.DATEFIELD_Y,step:10,spacing:315578073600},u[l.CENTENNIAL]={datefield:h.DATEFIELD_Y,step:100,spacing:3155780736e3};var d=function(){for(var t=[],e=-39;e<=39;e++)for(var a=Math.pow(10,e),i=1;i<=9;i++){var n=a*i;t.push(n)}return t}(),c=function(t,e,a,i){for(var n=i(\"pixelsPerLabel\"),r=0;r<l.NUM_GRANULARITIES;r++){if(a/p(t,e,r)>=n)return r}return-1},p=function(t,e,a){var i=u[a].spacing;return Math.round(1*(e-t)/i)},g=function(t,e,a,i,r){var o=i(\"axisLabelFormatter\"),s=i(\"labelsUTC\"),d=s?n.DateAccessorsUTC:n.DateAccessorsLocal,c=u[a].datefield,p=u[a].step,g=u[a].spacing,f=new Date(t),v=[];v[h.DATEFIELD_Y]=d.getFullYear(f),v[h.DATEFIELD_M]=d.getMonth(f),v[h.DATEFIELD_D]=d.getDate(f),v[h.DATEFIELD_HH]=d.getHours(f),v[h.DATEFIELD_MM]=d.getMinutes(f),v[h.DATEFIELD_SS]=d.getSeconds(f),v[h.DATEFIELD_MS]=d.getMilliseconds(f);var _=v[c]%p;a==l.WEEKLY&&(_=d.getDay(f)),v[c]-=_;for(var y=c+1;y<h.NUM_DATEFIELDS;y++)v[y]=y===h.DATEFIELD_D?1:0;var x=[],m=d.makeDate.apply(null,v),b=m.getTime();if(a<=l.HOURLY)for(b<t&&(b+=g,m=new Date(b));b<=e;)x.push({v:b,label:o.call(r,m,a,i,r)}),b+=g,m=new Date(b);else for(b<t&&(v[c]+=p,m=d.makeDate.apply(null,v),b=m.getTime());b<=e;)(a>=l.DAILY||d.getHours(m)%p==0)&&x.push({v:b,label:o.call(r,m,a,i,r)}),v[c]+=p,m=d.makeDate.apply(null,v),b=m.getTime();return x};a.getDateAxis=g},{\"./dygraph-utils\":17}],17:[function(t,e,a){\"use strict\";function i(t,e,a){t.removeEventListener(e,a,!1)}function n(t){return t=t||window.event,t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.cancelBubble=!0,t.cancel=!0,t.returnValue=!1,!1}function r(t,e,a){var i,n,r;if(0===e)i=a,n=a,r=a;else{var o=Math.floor(6*t),s=6*t-o,l=a*(1-e),h=a*(1-e*s),u=a*(1-e*(1-s));switch(o){case 1:i=h,n=a,r=l;break;case 2:i=l,n=a,r=u;break;case 3:i=l,n=h,r=a;break;case 4:i=u,n=l,r=a;break;case 5:i=a,n=l,r=h;break;case 6:case 0:i=a,n=u,r=l}}return i=Math.floor(255*i+.5),n=Math.floor(255*n+.5),r=Math.floor(255*r+.5),\"rgb(\"+i+\",\"+n+\",\"+r+\")\"}function o(t){var e=t.getBoundingClientRect(),a=window,i=document.documentElement;return{x:e.left+(a.pageXOffset||i.scrollLeft),y:e.top+(a.pageYOffset||i.scrollTop)}}function s(t){return!t.pageX||t.pageX<0?0:t.pageX}function l(t){return!t.pageY||t.pageY<0?0:t.pageY}function h(t,e){return s(t)-e.px}function u(t,e){return l(t)-e.py}function d(t){return!!t&&!isNaN(t)}function c(t,e){return!!t&&(null!==t.yval&&(null!==t.x&&void 0!==t.x&&(null!==t.y&&void 0!==t.y&&!(isNaN(t.x)||!e&&isNaN(t.y)))))}function p(t,e){var a=Math.min(Math.max(1,e||2),21);return Math.abs(t)<.001&&0!==t?t.toExponential(a-1):t.toPrecision(a)}function g(t){return t<10?\"0\"+t:\"\"+t}function f(t,e,a,i){var n=g(t)+\":\"+g(e);if(a&&(n+=\":\"+g(a),i)){var r=\"\"+i;n+=\".\"+(\"000\"+r).substring(r.length)}return n}function v(t,e){var a=e?tt:$,i=new Date(t),n=a.getFullYear(i),r=a.getMonth(i),o=a.getDate(i),s=a.getHours(i),l=a.getMinutes(i),h=a.getSeconds(i),u=a.getMilliseconds(i),d=\"\"+n,c=g(r+1),p=g(o),v=3600*s+60*l+h+.001*u,_=d+\"/\"+c+\"/\"+p;return v&&(_+=\" \"+f(s,l,h,u)),_}function _(t,e){var a=Math.pow(10,e);return Math.round(t*a)/a}function y(t,e,a,i,n){for(var r=!0;r;){var o=t,s=e,l=a,h=i,u=n;if(r=!1,null!==h&&void 0!==h&&null!==u&&void 0!==u||(h=0,u=s.length-1),h>u)return-1;null!==l&&void 0!==l||(l=0);var d,c=function(t){return t>=0&&t<s.length},p=parseInt((h+u)/2,10),g=s[p];if(g==o)return p;if(g>o){if(l>0&&(d=p-1,c(d)&&s[d]<o))return p;t=o,e=s,a=l,i=h,n=p-1,r=!0,c=p=g=d=void 0}else{if(!(g<o))return-1;if(l<0&&(d=p+1,c(d)&&s[d]>o))return p;t=o,e=s,a=l,i=p+1,n=u,r=!0,c=p=g=d=void 0}}}function x(t){var e,a;if((-1==t.search(\"-\")||-1!=t.search(\"T\")||-1!=t.search(\"Z\"))&&(a=m(t))&&!isNaN(a))return a;if(-1!=t.search(\"-\")){for(e=t.replace(\"-\",\"/\",\"g\");-1!=e.search(\"-\");)e=e.replace(\"-\",\"/\");a=m(e)}else 8==t.length?(e=t.substr(0,4)+\"/\"+t.substr(4,2)+\"/\"+t.substr(6,2),a=m(e)):a=m(t);return a&&!isNaN(a)||console.error(\"Couldn't parse \"+t+\" as a date\"),a}function m(t){return new Date(t).getTime()}function b(t,e){if(void 0!==e&&null!==e)for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);return t}function w(t,e){if(void 0!==e&&null!==e)for(var a in e)e.hasOwnProperty(a)&&(null===e[a]?t[a]=null:A(e[a])?t[a]=e[a].slice():!function(t){return\"object\"==typeof Node?t instanceof Node:\"object\"==typeof t&&\"number\"==typeof t.nodeType&&\"string\"==typeof t.nodeName}(e[a])&&\"object\"==typeof e[a]?(\"object\"==typeof t[a]&&null!==t[a]||(t[a]={}),w(t[a],e[a])):t[a]=e[a]);return t}function A(t){var e=typeof t;return(\"object\"==e||\"function\"==e&&\"function\"==typeof t.item)&&null!==t&&\"number\"==typeof t.length&&3!==t.nodeType}function O(t){return\"object\"==typeof t&&null!==t&&\"function\"==typeof t.getTime}function D(t){for(var e=[],a=0;a<t.length;a++)A(t[a])?e.push(D(t[a])):e.push(t[a]);return e}function E(){return document.createElement(\"canvas\")}function L(t){try{var e=window.devicePixelRatio,a=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return void 0!==e?e/a:1}catch(t){return 1}}function T(t,e,a,i){e=e||0,a=a||t.length,this.hasNext=!0,this.peek=null,this.start_=e,this.array_=t,this.predicate_=i,this.end_=Math.min(t.length,e+a),this.nextIdx_=e-1,this.next()}function S(t,e,a,i){return new T(t,e,a,i)}function P(t,e,a,i){var n,r=0,o=(new Date).getTime();if(t(r),1==e)return void i();var s=e-1;!function l(){r>=e||et.call(window,function(){var e=(new Date).getTime(),h=e-o;n=r,r=Math.floor(h/a);var u=r-n;r+u>s||r>=s?(t(s),i()):(0!==u&&t(r),l())})}()}function C(t,e){var a={};if(t)for(var i=1;i<t.length;i++)a[t[i]]=!0;var n=function(t){for(var e in t)if(t.hasOwnProperty(e)&&!at[e])return!0;return!1};for(var r in e)if(e.hasOwnProperty(r))if(\"highlightSeriesOpts\"==r||a[r]&&!e.series){if(n(e[r]))return!0}else if(\"series\"==r||\"axes\"==r){var o=e[r];for(var s in o)if(o.hasOwnProperty(s)&&n(o[s]))return!0}else if(!at[r])return!0;return!1}function M(t){for(var e=0;e<t.length;e++){var a=t.charAt(e);if(\"\\r\"===a)return e+1<t.length&&\"\\n\"===t.charAt(e+1)?\"\\r\\n\":a;if(\"\\n\"===a)return e+1<t.length&&\"\\r\"===t.charAt(e+1)?\"\\n\\r\":a}return null}function N(t,e){if(null===e||null===t)return!1;for(var a=t;a&&a!==e;)a=a.parentNode;return a===e}function F(t,e){return e<0?1/Math.pow(t,-e):Math.pow(t,e)}function k(t){var e=nt.exec(t);if(!e)return null;var a=parseInt(e[1],10),i=parseInt(e[2],10),n=parseInt(e[3],10);return e[4]?{r:a,g:i,b:n,a:parseFloat(e[4])}:{r:a,g:i,b:n}}function R(t){var e=k(t);if(e)return e;var a=document.createElement(\"div\");a.style.backgroundColor=t,a.style.visibility=\"hidden\",document.body.appendChild(a);var i=window.getComputedStyle(a,null).backgroundColor;return document.body.removeChild(a),k(i)}function I(t){try{(t||document.createElement(\"canvas\")).getContext(\"2d\")}catch(t){return!1}return!0}function H(t,e,a){var i=parseFloat(t);if(!isNaN(i))return i;if(/^ *$/.test(t))return null;if(/^ *nan *$/i.test(t))return NaN;var n=\"Unable to parse '\"+t+\"' as a number\";return void 0!==a&&void 0!==e&&(n+=\" on line \"+(1+(e||0))+\" ('\"+a+\"') of CSV.\"),console.error(n),null}function Y(t,e){var a=e(\"sigFigs\");if(null!==a)return p(t,a);var i,n=e(\"digitsAfterDecimal\"),r=e(\"maxNumberWidth\"),o=e(\"labelsKMB\"),s=e(\"labelsKMG2\");if(i=0!==t&&(Math.abs(t)>=Math.pow(10,r)||Math.abs(t)<Math.pow(10,-n))?t.toExponential(n):\"\"+_(t,n),o||s){var l,h=[],u=[];o&&(l=1e3,h=rt),s&&(o&&console.warn(\"Setting both labelsKMB and labelsKMG2. Pick one!\"),l=1024,h=ot,u=st);for(var d=Math.abs(t),c=F(l,h.length),g=h.length-1;g>=0;g--,c/=l)if(d>=c){i=_(t/c,n)+h[g];break}if(s){var f=String(t.toExponential()).split(\"e-\");2===f.length&&f[1]>=3&&f[1]<=24&&(i=f[1]%3>0?_(f[0]/F(10,f[1]%3),n):Number(f[0]).toFixed(2),i+=u[Math.floor(f[1]/3)-1])}}return i}function X(t,e,a){return Y.call(this,t,a)}function V(t,e,a){var i=a(\"labelsUTC\"),n=i?tt:$,r=n.getFullYear(t),o=n.getMonth(t),s=n.getDate(t),l=n.getHours(t),h=n.getMinutes(t),u=n.getSeconds(t),d=n.getMilliseconds(t);if(e>=G.Granularity.DECADAL)return\"\"+r;if(e>=G.Granularity.MONTHLY)return lt[o]+\" \"+r;if(0===3600*l+60*h+u+.001*d||e>=G.Granularity.DAILY)return g(s)+\" \"+lt[o];if(e<G.Granularity.SECONDLY){var c=\"\"+d;return g(u)+\".\"+(\"000\"+c).substring(c.length)}return e>G.Granularity.MINUTELY?f(l,h,u,0):f(l,h,u,d)}function Z(t,e){return v(t,e(\"labelsUTC\"))}Object.defineProperty(a,\"__esModule\",{value:!0}),a.removeEvent=i,a.cancelEvent=n,a.hsvToRGB=r,a.findPos=o,a.pageX=s,a.pageY=l,a.dragGetX_=h,a.dragGetY_=u,a.isOK=d,a.isValidPoint=c,a.floatFormat=p,a.zeropad=g,a.hmsString_=f,a.dateString_=v,a.round_=_,a.binarySearch=y,a.dateParser=x,a.dateStrToMillis=m,a.update=b,a.updateDeep=w,a.isArrayLike=A,a.isDateLike=O,a.clone=D,a.createCanvas=E,a.getContextPixelRatio=L,a.Iterator=T,a.createIterator=S,a.repeatAndCleanup=P,a.isPixelChangingOptionList=C,a.detectLineDelimiter=M,a.isNodeContainedBy=N,a.pow=F,a.toRGB_=R,a.isCanvasSupported=I,a.parseFloat_=H,a.numberValueFormatter=Y,a.numberAxisLabelFormatter=X,a.dateAxisLabelFormatter=V,a.dateValueFormatter=Z;var B=t(\"./dygraph-tickers\"),G=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(B);a.LOG_SCALE=10;var W=Math.log(10);a.LN_TEN=W;var U=function(t){return Math.log(t)/W};a.log10=U;var z=function(t,e,a){var i=U(t),n=U(e),r=i+a*(n-i);return Math.pow(10,r)};a.logRangeFraction=z;var j=[2,2];a.DOTTED_LINE=j;var K=[7,3];a.DASHED_LINE=K;var q=[7,2,2,2];a.DOT_DASH_LINE=q;a.HORIZONTAL=1;a.VERTICAL=2;var Q=function(t){return t.getContext(\"2d\")};a.getContext=Q;var J=function(t,e,a){t.addEventListener(e,a,!1)};a.addEvent=J;var $={getFullYear:function(t){return t.getFullYear()},getMonth:function(t){return t.getMonth()},getDate:function(t){return t.getDate()},getHours:function(t){return t.getHours()},getMinutes:function(t){return t.getMinutes()},getSeconds:function(t){return t.getSeconds()},getMilliseconds:function(t){return t.getMilliseconds()},getDay:function(t){return t.getDay()},makeDate:function(t,e,a,i,n,r,o){return new Date(t,e,a,i,n,r,o)}};a.DateAccessorsLocal=$;var tt={getFullYear:function(t){return t.getUTCFullYear()},getMonth:function(t){return t.getUTCMonth()},getDate:function(t){return t.getUTCDate()},getHours:function(t){return t.getUTCHours()},getMinutes:function(t){return t.getUTCMinutes()},getSeconds:function(t){return t.getUTCSeconds()},getMilliseconds:function(t){return t.getUTCMilliseconds()},getDay:function(t){return t.getUTCDay()},makeDate:function(t,e,a,i,n,r,o){return new Date(Date.UTC(t,e,a,i,n,r,o))}};a.DateAccessorsUTC=tt,T.prototype.next=function(){if(!this.hasNext)return null;for(var t=this.peek,e=this.nextIdx_+1,a=!1;e<this.end_;){if(!this.predicate_||this.predicate_(this.array_,e)){this.peek=this.array_[e],a=!0;break}e++}return this.nextIdx_=e,a||(this.hasNext=!1,this.peek=null),t};var et=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();a.requestAnimFrame=et;var at={annotationClickHandler:!0,annotationDblClickHandler:!0,annotationMouseOutHandler:!0,annotationMouseOverHandler:!0,axisLineColor:!0,axisLineWidth:!0,clickCallback:!0,drawCallback:!0,drawHighlightPointCallback:!0,drawPoints:!0,drawPointCallback:!0,drawGrid:!0,fillAlpha:!0,gridLineColor:!0,gridLineWidth:!0,hideOverlayOnMouseOut:!0,highlightCallback:!0,highlightCircleSize:!0,interactionModel:!0,labelsDiv:!0,labelsKMB:!0,labelsKMG2:!0,labelsSeparateLines:!0,labelsShowZeroValues:!0,legend:!0,panEdgeFraction:!0,pixelsPerYLabel:!0,pointClickCallback:!0,pointSize:!0,rangeSelectorPlotFillColor:!0,rangeSelectorPlotFillGradientColor:!0,rangeSelectorPlotStrokeColor:!0,rangeSelectorBackgroundStrokeColor:!0,rangeSelectorBackgroundLineWidth:!0,rangeSelectorPlotLineWidth:!0,rangeSelectorForegroundStrokeColor:!0,rangeSelectorForegroundLineWidth:!0,rangeSelectorAlpha:!0,showLabelsOnHighlight:!0,showRoller:!0,strokeWidth:!0,underlayCallback:!0,unhighlightCallback:!0,zoomCallback:!0},it={DEFAULT:function(t,e,a,i,n,r,o){a.beginPath(),a.fillStyle=r,a.arc(i,n,o,0,2*Math.PI,!1),a.fill()}};a.Circles=it;var nt=/^rgba?\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})(?:,\\s*([01](?:\\.\\d+)?))?\\)$/,rt=[\"K\",\"M\",\"B\",\"T\",\"Q\"],ot=[\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"],st=[\"m\",\"u\",\"n\",\"p\",\"f\",\"a\",\"z\",\"y\"],lt=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"]},{\"./dygraph-tickers\":16}],18:[function(t,e,a){(function(i){\"use strict\";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}function r(t){return t&&t.__esModule?t:{default:t}}function o(t){var e=t[0],a=e[0];if(\"number\"!=typeof a&&!x.isDateLike(a))throw new Error(\"Expected number or date but got \"+typeof a+\": \"+a+\".\");for(var i=1;i<e.length;i++){var n=e[i];if(null!==n&&void 0!==n&&(\"number\"!=typeof n&&!x.isArrayLike(n)))throw new Error(\"Expected number or array but got \"+typeof n+\": \"+n+\".\")}}Object.defineProperty(a,\"__esModule\",{value:!0});var s=function(){function t(t,e){var a=[],i=!0,n=!1,r=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(a.push(o.value),!e||a.length!==e);i=!0);}catch(t){n=!0,r=t}finally{try{!i&&s.return&&s.return()}finally{if(n)throw r}}return a}return function(e,a){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,a);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),l=t(\"./dygraph-layout\"),h=r(l),u=t(\"./dygraph-canvas\"),d=r(u),c=t(\"./dygraph-options\"),p=r(c),g=t(\"./dygraph-interaction-model\"),f=r(g),v=t(\"./dygraph-tickers\"),_=n(v),y=t(\"./dygraph-utils\"),x=n(y),m=t(\"./dygraph-default-attrs\"),b=r(m),w=t(\"./dygraph-options-reference\"),A=(r(w),t(\"./iframe-tarp\")),O=r(A),D=t(\"./datahandler/default\"),E=r(D),L=t(\"./datahandler/bars-error\"),T=r(L),S=t(\"./datahandler/bars-custom\"),P=r(S),C=t(\"./datahandler/default-fractions\"),M=r(C),N=t(\"./datahandler/bars-fractions\"),F=r(N),k=t(\"./datahandler/bars\"),R=r(k),I=t(\"./plugins/annotations\"),H=r(I),Y=t(\"./plugins/axes\"),X=r(Y),V=t(\"./plugins/chart-labels\"),Z=r(V),B=t(\"./plugins/grid\"),G=r(B),W=t(\"./plugins/legend\"),U=r(W),z=t(\"./plugins/range-selector\"),j=r(z),K=t(\"./dygraph-gviz\"),q=r(K),Q=function(t,e,a){this.__init__(t,e,a)};Q.NAME=\"Dygraph\",Q.VERSION=\"2.1.0\",Q.DEFAULT_ROLL_PERIOD=1,Q.DEFAULT_WIDTH=480,Q.DEFAULT_HEIGHT=320,Q.ANIMATION_STEPS=12,Q.ANIMATION_DURATION=200,Q.Plotters=d.default._Plotters,Q.addedAnnotationCSS=!1,Q.prototype.__init__=function(t,e,a){if(this.is_initial_draw_=!0,this.readyFns_=[],null!==a&&void 0!==a||(a={}),a=Q.copyUserAttrs_(a),\"string\"==typeof t&&(t=document.getElementById(t)),!t)throw new Error(\"Constructing dygraph with a non-existent div!\");this.maindiv_=t,this.file_=e,this.rollPeriod_=a.rollPeriod||Q.DEFAULT_ROLL_PERIOD,this.previousVerticalX_=-1,this.fractions_=a.fractions||!1,this.dateWindow_=a.dateWindow||null,this.annotations_=[],t.innerHTML=\"\",\"\"===t.style.width&&a.width&&(t.style.width=a.width+\"px\"),\"\"===t.style.height&&a.height&&(t.style.height=a.height+\"px\"),\"\"===t.style.height&&0===t.clientHeight&&(t.style.height=Q.DEFAULT_HEIGHT+\"px\",\"\"===t.style.width&&(t.style.width=Q.DEFAULT_WIDTH+\"px\")),this.width_=t.clientWidth||a.width||0,this.height_=t.clientHeight||a.height||0,a.stackedGraph&&(a.fillGraph=!0),this.user_attrs_={},x.update(this.user_attrs_,a),this.attrs_={},x.updateDeep(this.attrs_,b.default),this.boundaryIds_=[],this.setIndexByName_={},this.datasetIndex_=[],this.registeredEvents_=[],this.eventListeners_={},this.attributes_=new p.default(this),this.createInterface_(),this.plugins_=[];for(var i=Q.PLUGINS.concat(this.getOption(\"plugins\")),n=0;n<i.length;n++){var r,o=i[n];r=void 0!==o.activate?o:new o;var s={plugin:r,events:{},options:{},pluginOptions:{}},l=r.activate(this);for(var h in l)l.hasOwnProperty(h)&&(s.events[h]=l[h]);this.plugins_.push(s)}for(var n=0;n<this.plugins_.length;n++){var u=this.plugins_[n];for(var h in u.events)if(u.events.hasOwnProperty(h)){var d=u.events[h],c=[u.plugin,d];h in this.eventListeners_?this.eventListeners_[h].push(c):this.eventListeners_[h]=[c]}}this.createDragInterface_(),this.start_()},Q.prototype.cascadeEvents_=function(t,e){if(!(t in this.eventListeners_))return!1;var a={dygraph:this,cancelable:!1,defaultPrevented:!1,preventDefault:function(){if(!a.cancelable)throw\"Cannot call preventDefault on non-cancelable event.\";a.defaultPrevented=!0},propagationStopped:!1,stopPropagation:function(){a.propagationStopped=!0}};x.update(a,e);var i=this.eventListeners_[t];if(i)for(var n=i.length-1;n>=0;n--){var r=i[n][0],o=i[n][1];if(o.call(r,a),a.propagationStopped)break}return a.defaultPrevented},Q.prototype.getPluginInstance_=function(t){for(var e=0;e<this.plugins_.length;e++){var a=this.plugins_[e];if(a.plugin instanceof t)return a.plugin}return null},Q.prototype.isZoomed=function(t){var e=!!this.dateWindow_;if(\"x\"===t)return e;var a=this.axes_.map(function(t){return!!t.valueRange}).indexOf(!0)>=0;if(null===t||void 0===t)return e||a;if(\"y\"===t)return a;throw new Error(\"axis parameter is [\"+t+\"] must be null, 'x' or 'y'.\")},Q.prototype.toString=function(){var t=this.maindiv_;return\"[Dygraph \"+(t&&t.id?t.id:t)+\"]\"},Q.prototype.attr_=function(t,e){return e?this.attributes_.getForSeries(t,e):this.attributes_.get(t)},Q.prototype.getOption=function(t,e){return this.attr_(t,e)},Q.prototype.getNumericOption=function(t,e){return this.getOption(t,e)},Q.prototype.getStringOption=function(t,e){return this.getOption(t,e)},Q.prototype.getBooleanOption=function(t,e){return this.getOption(t,e)},Q.prototype.getFunctionOption=function(t,e){return this.getOption(t,e)},Q.prototype.getOptionForAxis=function(t,e){return this.attributes_.getForAxis(t,e)},Q.prototype.optionsViewForAxis_=function(t){var e=this;return function(a){var i=e.user_attrs_.axes;return i&&i[t]&&i[t].hasOwnProperty(a)?i[t][a]:(\"x\"!==t||\"logscale\"!==a)&&(void 0!==e.user_attrs_[a]?e.user_attrs_[a]:(i=e.attrs_.axes,i&&i[t]&&i[t].hasOwnProperty(a)?i[t][a]:\"y\"==t&&e.axes_[0].hasOwnProperty(a)?e.axes_[0][a]:\"y2\"==t&&e.axes_[1].hasOwnProperty(a)?e.axes_[1][a]:e.attr_(a)))}},Q.prototype.rollPeriod=function(){return this.rollPeriod_},Q.prototype.xAxisRange=function(){return this.dateWindow_?this.dateWindow_:this.xAxisExtremes()},Q.prototype.xAxisExtremes=function(){var t=this.getNumericOption(\"xRangePad\")/this.plotter_.area.w;if(0===this.numRows())return[0-t,1+t];var e=this.rawData_[0][0],a=this.rawData_[this.rawData_.length-1][0];if(t){var i=a-e;e-=i*t,a+=i*t}return[e,a]},Q.prototype.yAxisExtremes=function(){var t=this.gatherDatasets_(this.rolledSeries_,null),e=t.extremes,a=this.axes_;this.computeYAxisRanges_(e);var i=this.axes_;return this.axes_=a,i.map(function(t){return t.extremeRange})},Q.prototype.yAxisRange=function(t){if(void 0===t&&(t=0),t<0||t>=this.axes_.length)return null;var e=this.axes_[t];return[e.computedValueRange[0],e.computedValueRange[1]]},Q.prototype.yAxisRanges=function(){for(var t=[],e=0;e<this.axes_.length;e++)t.push(this.yAxisRange(e));return t},Q.prototype.toDomCoords=function(t,e,a){return[this.toDomXCoord(t),this.toDomYCoord(e,a)]},Q.prototype.toDomXCoord=function(t){if(null===t)return null;var e=this.plotter_.area,a=this.xAxisRange();return e.x+(t-a[0])/(a[1]-a[0])*e.w},Q.prototype.toDomYCoord=function(t,e){var a=this.toPercentYCoord(t,e);if(null===a)return null;var i=this.plotter_.area;return i.y+a*i.h},Q.prototype.toDataCoords=function(t,e,a){return[this.toDataXCoord(t),this.toDataYCoord(e,a)]},Q.prototype.toDataXCoord=function(t){if(null===t)return null;var e=this.plotter_.area,a=this.xAxisRange();if(this.attributes_.getForAxis(\"logscale\",\"x\")){var i=(t-e.x)/e.w;return x.logRangeFraction(a[0],a[1],i)}return a[0]+(t-e.x)/e.w*(a[1]-a[0])},Q.prototype.toDataYCoord=function(t,e){if(null===t)return null;var a=this.plotter_.area,i=this.yAxisRange(e);if(void 0===e&&(e=0),this.attributes_.getForAxis(\"logscale\",e)){var n=(t-a.y)/a.h;return x.logRangeFraction(i[1],i[0],n)}return i[0]+(a.y+a.h-t)/a.h*(i[1]-i[0])},Q.prototype.toPercentYCoord=function(t,e){if(null===t)return null;void 0===e&&(e=0);var a,i=this.yAxisRange(e);if(this.attributes_.getForAxis(\"logscale\",e)){var n=x.log10(i[0]),r=x.log10(i[1]);a=(r-x.log10(t))/(r-n)}else a=(i[1]-t)/(i[1]-i[0]);return a},Q.prototype.toPercentXCoord=function(t){if(null===t)return null;var e,a=this.xAxisRange();if(!0===this.attributes_.getForAxis(\"logscale\",\"x\")){var i=x.log10(a[0]),n=x.log10(a[1]);e=(x.log10(t)-i)/(n-i)}else e=(t-a[0])/(a[1]-a[0]);return e},Q.prototype.numColumns=function(){return this.rawData_?this.rawData_[0]?this.rawData_[0].length:this.attr_(\"labels\").length:0},Q.prototype.numRows=function(){return this.rawData_?this.rawData_.length:0},Q.prototype.getValue=function(t,e){return t<0||t>this.rawData_.length?null:e<0||e>this.rawData_[t].length?null:this.rawData_[t][e]},Q.prototype.createInterface_=function(){var t=this.maindiv_;this.graphDiv=document.createElement(\"div\"),this.graphDiv.style.textAlign=\"left\",this.graphDiv.style.position=\"relative\",t.appendChild(this.graphDiv),this.canvas_=x.createCanvas(),this.canvas_.style.position=\"absolute\",this.hidden_=this.createPlotKitCanvas_(this.canvas_),this.canvas_ctx_=x.getContext(this.canvas_),this.hidden_ctx_=x.getContext(this.hidden_),this.resizeElements_(),this.graphDiv.appendChild(this.hidden_),this.graphDiv.appendChild(this.canvas_),this.mouseEventElement_=this.createMouseEventElement_(),this.layout_=new h.default(this);var e=this;this.mouseMoveHandler_=function(t){e.mouseMove_(t)},this.mouseOutHandler_=function(t){var a=t.target||t.fromElement,i=t.relatedTarget||t.toElement;x.isNodeContainedBy(a,e.graphDiv)&&!x.isNodeContainedBy(i,e.graphDiv)&&e.mouseOut_(t)},this.addAndTrackEvent(window,\"mouseout\",this.mouseOutHandler_),this.addAndTrackEvent(this.mouseEventElement_,\"mousemove\",this.mouseMoveHandler_),this.resizeHandler_||(this.resizeHandler_=function(t){e.resize()},this.addAndTrackEvent(window,\"resize\",this.resizeHandler_))},Q.prototype.resizeElements_=function(){this.graphDiv.style.width=this.width_+\"px\",this.graphDiv.style.height=this.height_+\"px\";var t=this.getNumericOption(\"pixelRatio\"),e=t||x.getContextPixelRatio(this.canvas_ctx_);this.canvas_.width=this.width_*e,this.canvas_.height=this.height_*e,this.canvas_.style.width=this.width_+\"px\",this.canvas_.style.height=this.height_+\"px\",1!==e&&this.canvas_ctx_.scale(e,e);var a=t||x.getContextPixelRatio(this.hidden_ctx_);this.hidden_.width=this.width_*a,this.hidden_.height=this.height_*a,this.hidden_.style.width=this.width_+\"px\",this.hidden_.style.height=this.height_+\"px\",1!==a&&this.hidden_ctx_.scale(a,a)},Q.prototype.destroy=function(){this.canvas_ctx_.restore(),this.hidden_ctx_.restore();for(var t=this.plugins_.length-1;t>=0;t--){var e=this.plugins_.pop();e.plugin.destroy&&e.plugin.destroy()}this.removeTrackedEvents_(),x.removeEvent(window,\"mouseout\",this.mouseOutHandler_),x.removeEvent(this.mouseEventElement_,\"mousemove\",this.mouseMoveHandler_),x.removeEvent(window,\"resize\",this.resizeHandler_),this.resizeHandler_=null,function t(e){for(;e.hasChildNodes();)t(e.firstChild),e.removeChild(e.firstChild)}(this.maindiv_);var a=function(t){for(var e in t)\"object\"==typeof t[e]&&(t[e]=null)};a(this.layout_),a(this.plotter_),a(this)},Q.prototype.createPlotKitCanvas_=function(t){var e=x.createCanvas();return e.style.position=\"absolute\",e.style.top=t.style.top,e.style.left=t.style.left,\ne.width=this.width_,e.height=this.height_,e.style.width=this.width_+\"px\",e.style.height=this.height_+\"px\",e},Q.prototype.createMouseEventElement_=function(){return this.canvas_},Q.prototype.setColors_=function(){var t=this.getLabels(),e=t.length-1;this.colors_=[],this.colorsMap_={};for(var a=this.getNumericOption(\"colorSaturation\")||1,i=this.getNumericOption(\"colorValue\")||.5,n=Math.ceil(e/2),r=this.getOption(\"colors\"),o=this.visibility(),s=0;s<e;s++)if(o[s]){var l=t[s+1],h=this.attributes_.getForSeries(\"color\",l);if(!h)if(r)h=r[s%r.length];else{var u=s%2?n+(s+1)/2:Math.ceil((s+1)/2),d=1*u/(1+e);h=x.hsvToRGB(d,a,i)}this.colors_.push(h),this.colorsMap_[l]=h}},Q.prototype.getColors=function(){return this.colors_},Q.prototype.getPropertiesForSeries=function(t){for(var e=-1,a=this.getLabels(),i=1;i<a.length;i++)if(a[i]==t){e=i;break}return-1==e?null:{name:t,column:e,visible:this.visibility()[e-1],color:this.colorsMap_[t],axis:1+this.attributes_.axisForSeries(t)}},Q.prototype.createRollInterface_=function(){var t=this,e=this.roller_;e||(this.roller_=e=document.createElement(\"input\"),e.type=\"text\",e.style.display=\"none\",e.className=\"dygraph-roller\",this.graphDiv.appendChild(e));var a=this.getBooleanOption(\"showRoller\")?\"block\":\"none\",i=this.getArea(),n={top:i.y+i.h-25+\"px\",left:i.x+1+\"px\",display:a};e.size=\"2\",e.value=this.rollPeriod_,x.update(e.style,n),e.onchange=function(){return t.adjustRoll(e.value)}},Q.prototype.createDragInterface_=function(){var t={isZooming:!1,isPanning:!1,is2DPan:!1,dragStartX:null,dragStartY:null,dragEndX:null,dragEndY:null,dragDirection:null,prevEndX:null,prevEndY:null,prevDragDirection:null,cancelNextDblclick:!1,initialLeftmostDate:null,xUnitsPerPixel:null,dateRange:null,px:0,py:0,boundedDates:null,boundedValues:null,tarp:new O.default,initializeMouseDown:function(t,e,a){t.preventDefault?t.preventDefault():(t.returnValue=!1,t.cancelBubble=!0);var i=x.findPos(e.canvas_);a.px=i.x,a.py=i.y,a.dragStartX=x.dragGetX_(t,a),a.dragStartY=x.dragGetY_(t,a),a.cancelNextDblclick=!1,a.tarp.cover()},destroy:function(){var t=this;if((t.isZooming||t.isPanning)&&(t.isZooming=!1,t.dragStartX=null,t.dragStartY=null),t.isPanning){t.isPanning=!1,t.draggingDate=null,t.dateRange=null;for(var e=0;e<a.axes_.length;e++)delete a.axes_[e].draggingValue,delete a.axes_[e].dragValueRange}t.tarp.uncover()}},e=this.getOption(\"interactionModel\"),a=this;for(var i in e)e.hasOwnProperty(i)&&this.addAndTrackEvent(this.mouseEventElement_,i,function(e){return function(i){e(i,a,t)}}(e[i]));if(!e.willDestroyContextMyself){var n=function(e){t.destroy()};this.addAndTrackEvent(document,\"mouseup\",n)}},Q.prototype.drawZoomRect_=function(t,e,a,i,n,r,o,s){var l=this.canvas_ctx_;r==x.HORIZONTAL?l.clearRect(Math.min(e,o),this.layout_.getPlotArea().y,Math.abs(e-o),this.layout_.getPlotArea().h):r==x.VERTICAL&&l.clearRect(this.layout_.getPlotArea().x,Math.min(i,s),this.layout_.getPlotArea().w,Math.abs(i-s)),t==x.HORIZONTAL?a&&e&&(l.fillStyle=\"rgba(128,128,128,0.33)\",l.fillRect(Math.min(e,a),this.layout_.getPlotArea().y,Math.abs(a-e),this.layout_.getPlotArea().h)):t==x.VERTICAL&&n&&i&&(l.fillStyle=\"rgba(128,128,128,0.33)\",l.fillRect(this.layout_.getPlotArea().x,Math.min(i,n),this.layout_.getPlotArea().w,Math.abs(n-i)))},Q.prototype.clearZoomRect_=function(){this.currentZoomRectArgs_=null,this.canvas_ctx_.clearRect(0,0,this.width_,this.height_)},Q.prototype.doZoomX_=function(t,e){this.currentZoomRectArgs_=null;var a=this.toDataXCoord(t),i=this.toDataXCoord(e);this.doZoomXDates_(a,i)},Q.prototype.doZoomXDates_=function(t,e){var a=this,i=this.xAxisRange(),n=[t,e],r=this.getFunctionOption(\"zoomCallback\");this.doAnimatedZoom(i,n,null,null,function(){r&&r.call(a,t,e,a.yAxisRanges())})},Q.prototype.doZoomY_=function(t,e){var a=this;this.currentZoomRectArgs_=null;for(var i=this.yAxisRanges(),n=[],r=0;r<this.axes_.length;r++){var o=this.toDataYCoord(t,r),l=this.toDataYCoord(e,r);n.push([l,o])}var h=this.getFunctionOption(\"zoomCallback\");this.doAnimatedZoom(null,null,i,n,function(){if(h){var t=a.xAxisRange(),e=s(t,2),i=e[0],n=e[1];h.call(a,i,n,a.yAxisRanges())}})},Q.zoomAnimationFunction=function(t,e){return(1-Math.pow(1.5,-t))/(1-Math.pow(1.5,-e))},Q.prototype.resetZoom=function(){var t=this,e=this.isZoomed(\"x\"),a=this.isZoomed(\"y\"),i=e||a;if(this.clearSelection(),i){var n=this.xAxisExtremes(),r=s(n,2),o=r[0],l=r[1],h=this.getBooleanOption(\"animatedZooms\"),u=this.getFunctionOption(\"zoomCallback\");if(!h)return this.dateWindow_=null,this.axes_.forEach(function(t){t.valueRange&&delete t.valueRange}),this.drawGraph_(),void(u&&u.call(this,o,l,this.yAxisRanges()));var d=null,c=null,p=null,g=null;e&&(d=this.xAxisRange(),c=[o,l]),a&&(p=this.yAxisRanges(),g=this.yAxisExtremes()),this.doAnimatedZoom(d,c,p,g,function(){t.dateWindow_=null,t.axes_.forEach(function(t){t.valueRange&&delete t.valueRange}),u&&u.call(t,o,l,t.yAxisRanges())})}},Q.prototype.doAnimatedZoom=function(t,e,a,i,n){var r,o,s=this,l=this.getBooleanOption(\"animatedZooms\")?Q.ANIMATION_STEPS:1,h=[],u=[];if(null!==t&&null!==e)for(r=1;r<=l;r++)o=Q.zoomAnimationFunction(r,l),h[r-1]=[t[0]*(1-o)+o*e[0],t[1]*(1-o)+o*e[1]];if(null!==a&&null!==i)for(r=1;r<=l;r++){o=Q.zoomAnimationFunction(r,l);for(var d=[],c=0;c<this.axes_.length;c++)d.push([a[c][0]*(1-o)+o*i[c][0],a[c][1]*(1-o)+o*i[c][1]]);u[r-1]=d}x.repeatAndCleanup(function(t){if(u.length)for(var e=0;e<s.axes_.length;e++){var a=u[t][e];s.axes_[e].valueRange=[a[0],a[1]]}h.length&&(s.dateWindow_=h[t]),s.drawGraph_()},l,Q.ANIMATION_DURATION/l,n)},Q.prototype.getArea=function(){return this.plotter_.area},Q.prototype.eventToDomCoords=function(t){if(t.offsetX&&t.offsetY)return[t.offsetX,t.offsetY];var e=x.findPos(this.mouseEventElement_);return[x.pageX(t)-e.x,x.pageY(t)-e.y]},Q.prototype.findClosestRow=function(t){for(var e=1/0,a=-1,i=this.layout_.points,n=0;n<i.length;n++)for(var r=i[n],o=r.length,s=0;s<o;s++){var l=r[s];if(x.isValidPoint(l,!0)){var h=Math.abs(l.canvasx-t);h<e&&(e=h,a=l.idx)}}return a},Q.prototype.findClosestPoint=function(t,e){for(var a,i,n,r,o,s,l,h=1/0,u=this.layout_.points.length-1;u>=0;--u)for(var d=this.layout_.points[u],c=0;c<d.length;++c)r=d[c],x.isValidPoint(r)&&(i=r.canvasx-t,n=r.canvasy-e,(a=i*i+n*n)<h&&(h=a,o=r,s=u,l=r.idx));return{row:l,seriesName:this.layout_.setNames[s],point:o}},Q.prototype.findStackedPoint=function(t,e){for(var a,i,n=this.findClosestRow(t),r=0;r<this.layout_.points.length;++r){var o=this.getLeftBoundary_(r),s=n-o,l=this.layout_.points[r];if(!(s>=l.length)){var h=l[s];if(x.isValidPoint(h)){var u=h.canvasy;if(t>h.canvasx&&s+1<l.length){var d=l[s+1];if(x.isValidPoint(d)){var c=d.canvasx-h.canvasx;if(c>0){var p=(t-h.canvasx)/c;u+=p*(d.canvasy-h.canvasy)}}}else if(t<h.canvasx&&s>0){var g=l[s-1];if(x.isValidPoint(g)){var c=h.canvasx-g.canvasx;if(c>0){var p=(h.canvasx-t)/c;u+=p*(g.canvasy-h.canvasy)}}}(0===r||u<e)&&(a=h,i=r)}}}return{row:n,seriesName:this.layout_.setNames[i],point:a}},Q.prototype.mouseMove_=function(t){var e=this.layout_.points;if(void 0!==e&&null!==e){var a=this.eventToDomCoords(t),i=a[0],n=a[1],r=this.getOption(\"highlightSeriesOpts\"),o=!1;if(r&&!this.isSeriesLocked()){var s;s=this.getBooleanOption(\"stackedGraph\")?this.findStackedPoint(i,n):this.findClosestPoint(i,n),o=this.setSelection(s.row,s.seriesName)}else{var l=this.findClosestRow(i);o=this.setSelection(l)}var h=this.getFunctionOption(\"highlightCallback\");h&&o&&h.call(this,t,this.lastx_,this.selPoints_,this.lastRow_,this.highlightSet_)}},Q.prototype.getLeftBoundary_=function(t){if(this.boundaryIds_[t])return this.boundaryIds_[t][0];for(var e=0;e<this.boundaryIds_.length;e++)if(void 0!==this.boundaryIds_[e])return this.boundaryIds_[e][0];return 0},Q.prototype.animateSelection_=function(t){void 0===this.fadeLevel&&(this.fadeLevel=0),void 0===this.animateId&&(this.animateId=0);var e=this.fadeLevel,a=t<0?e:10-e;if(a<=0)return void(this.fadeLevel&&this.updateSelection_(1));var i=++this.animateId,n=this,r=function(){0!==n.fadeLevel&&t<0&&(n.fadeLevel=0,n.clearSelection())};x.repeatAndCleanup(function(e){n.animateId==i&&(n.fadeLevel+=t,0===n.fadeLevel?n.clearSelection():n.updateSelection_(n.fadeLevel/10))},a,30,r)},Q.prototype.updateSelection_=function(t){this.cascadeEvents_(\"select\",{selectedRow:-1===this.lastRow_?void 0:this.lastRow_,selectedX:-1===this.lastx_?void 0:this.lastx_,selectedPoints:this.selPoints_});var e,a=this.canvas_ctx_;if(this.getOption(\"highlightSeriesOpts\")){a.clearRect(0,0,this.width_,this.height_);var i=1-this.getNumericOption(\"highlightSeriesBackgroundAlpha\"),n=x.toRGB_(this.getOption(\"highlightSeriesBackgroundColor\"));if(i){if(void 0===t)return void this.animateSelection_(1);i*=t,a.fillStyle=\"rgba(\"+n.r+\",\"+n.g+\",\"+n.b+\",\"+i+\")\",a.fillRect(0,0,this.width_,this.height_)}this.plotter_._renderLineChart(this.highlightSet_,a)}else if(this.previousVerticalX_>=0){var r=0,o=this.attr_(\"labels\");for(e=1;e<o.length;e++){var s=this.getNumericOption(\"highlightCircleSize\",o[e]);s>r&&(r=s)}var l=this.previousVerticalX_;a.clearRect(l-r-1,0,2*r+2,this.height_)}if(this.selPoints_.length>0){var h=this.selPoints_[0].canvasx;for(a.save(),e=0;e<this.selPoints_.length;e++){var u=this.selPoints_[e];if(!isNaN(u.canvasy)){var d=this.getNumericOption(\"highlightCircleSize\",u.name),c=this.getFunctionOption(\"drawHighlightPointCallback\",u.name),p=this.plotter_.colors[u.name];c||(c=x.Circles.DEFAULT),a.lineWidth=this.getNumericOption(\"strokeWidth\",u.name),a.strokeStyle=p,a.fillStyle=p,c.call(this,this,u.name,a,h,u.canvasy,p,d,u.idx)}}a.restore(),this.previousVerticalX_=h}},Q.prototype.setSelection=function(t,e,a){this.selPoints_=[];var i=!1;if(!1!==t&&t>=0){t!=this.lastRow_&&(i=!0),this.lastRow_=t;for(var n=0;n<this.layout_.points.length;++n){var r=this.layout_.points[n],o=t-this.getLeftBoundary_(n);if(o>=0&&o<r.length&&r[o].idx==t){var s=r[o];null!==s.yval&&this.selPoints_.push(s)}else for(var l=0;l<r.length;++l){var s=r[l];if(s.idx==t){null!==s.yval&&this.selPoints_.push(s);break}}}}else this.lastRow_>=0&&(i=!0),this.lastRow_=-1;return this.selPoints_.length?this.lastx_=this.selPoints_[0].xval:this.lastx_=-1,void 0!==e&&(this.highlightSet_!==e&&(i=!0),this.highlightSet_=e),void 0!==a&&(this.lockedSet_=a),i&&this.updateSelection_(void 0),i},Q.prototype.mouseOut_=function(t){this.getFunctionOption(\"unhighlightCallback\")&&this.getFunctionOption(\"unhighlightCallback\").call(this,t),this.getBooleanOption(\"hideOverlayOnMouseOut\")&&!this.lockedSet_&&this.clearSelection()},Q.prototype.clearSelection=function(){if(this.cascadeEvents_(\"deselect\",{}),this.lockedSet_=!1,this.fadeLevel)return void this.animateSelection_(-1);this.canvas_ctx_.clearRect(0,0,this.width_,this.height_),this.fadeLevel=0,this.selPoints_=[],this.lastx_=-1,this.lastRow_=-1,this.highlightSet_=null},Q.prototype.getSelection=function(){if(!this.selPoints_||this.selPoints_.length<1)return-1;for(var t=0;t<this.layout_.points.length;t++)for(var e=this.layout_.points[t],a=0;a<e.length;a++)if(e[a].x==this.selPoints_[0].x)return e[a].idx;return-1},Q.prototype.getHighlightSeries=function(){return this.highlightSet_},Q.prototype.isSeriesLocked=function(){return this.lockedSet_},Q.prototype.loadedEvent_=function(t){this.rawData_=this.parseCSV_(t),this.cascadeDataDidUpdateEvent_(),this.predraw_()},Q.prototype.addXTicks_=function(){var t;t=this.dateWindow_?[this.dateWindow_[0],this.dateWindow_[1]]:this.xAxisExtremes();var e=this.optionsViewForAxis_(\"x\"),a=e(\"ticker\")(t[0],t[1],this.plotter_.area.w,e,this);this.layout_.setXTicks(a)},Q.prototype.getHandlerClass_=function(){return this.attr_(\"dataHandler\")?this.attr_(\"dataHandler\"):this.fractions_?this.getBooleanOption(\"errorBars\")?F.default:M.default:this.getBooleanOption(\"customBars\")?P.default:this.getBooleanOption(\"errorBars\")?T.default:E.default},Q.prototype.predraw_=function(){var t=new Date;this.dataHandler_=new(this.getHandlerClass_()),this.layout_.computePlotArea(),this.computeYAxes_(),this.is_initial_draw_||(this.canvas_ctx_.restore(),this.hidden_ctx_.restore()),this.canvas_ctx_.save(),this.hidden_ctx_.save(),this.plotter_=new d.default(this,this.hidden_,this.hidden_ctx_,this.layout_),this.createRollInterface_(),this.cascadeEvents_(\"predraw\"),this.rolledSeries_=[null];for(var e=1;e<this.numColumns();e++){var a=this.dataHandler_.extractSeries(this.rawData_,e,this.attributes_);this.rollPeriod_>1&&(a=this.dataHandler_.rollingAverage(a,this.rollPeriod_,this.attributes_)),this.rolledSeries_.push(a)}this.drawGraph_();var i=new Date;this.drawingTimeMs_=i-t},Q.PointType=void 0,Q.stackPoints_=function(t,e,a,i){for(var n=null,r=null,o=null,s=-1,l=0;l<t.length;++l){var h=t[l],u=h.xval;void 0===e[u]&&(e[u]=0);var d=h.yval;isNaN(d)||null===d?\"none\"==i?d=0:(!function(e){if(!(s>=e))for(var a=e;a<t.length;++a)if(o=null,!isNaN(t[a].yval)&&null!==t[a].yval){s=a,o=t[a];break}}(l),d=r&&o&&\"none\"!=i?r.yval+(o.yval-r.yval)*((u-r.xval)/(o.xval-r.xval)):r&&\"all\"==i?r.yval:o&&\"all\"==i?o.yval:0):r=h;var c=e[u];n!=u&&(c+=d,e[u]=c),n=u,h.yval_stacked=c,c>a[1]&&(a[1]=c),c<a[0]&&(a[0]=c)}},Q.prototype.gatherDatasets_=function(t,e){var a,i,n,r,o,s,l=[],h=[],u=[],d={},c=t.length-1;for(a=c;a>=1;a--)if(this.visibility()[a-1]){if(e){s=t[a];var p=e[0],g=e[1];for(n=null,r=null,i=0;i<s.length;i++)s[i][0]>=p&&null===n&&(n=i),s[i][0]<=g&&(r=i);null===n&&(n=0);for(var f=n,v=!0;v&&f>0;)f--,v=null===s[f][1];null===r&&(r=s.length-1);var _=r;for(v=!0;v&&_<s.length-1;)_++,v=null===s[_][1];f!==n&&(n=f),_!==r&&(r=_),l[a-1]=[n,r],s=s.slice(n,r+1)}else s=t[a],l[a-1]=[0,s.length-1];var y=this.attr_(\"labels\")[a],x=this.dataHandler_.getExtremeYValues(s,e,this.getBooleanOption(\"stepPlot\",y)),m=this.dataHandler_.seriesToPoints(s,y,l[a-1][0]);this.getBooleanOption(\"stackedGraph\")&&(o=this.attributes_.axisForSeries(y),void 0===u[o]&&(u[o]=[]),Q.stackPoints_(m,u[o],x,this.getBooleanOption(\"stackedGraphNaNFill\"))),d[y]=x,h[a]=m}return{points:h,extremes:d,boundaryIds:l}},Q.prototype.drawGraph_=function(){var t=new Date,e=this.is_initial_draw_;this.is_initial_draw_=!1,this.layout_.removeAllDatasets(),this.setColors_(),this.attrs_.pointSize=.5*this.getNumericOption(\"highlightCircleSize\");var a=this.gatherDatasets_(this.rolledSeries_,this.dateWindow_),i=a.points,n=a.extremes;this.boundaryIds_=a.boundaryIds,this.setIndexByName_={};for(var r=this.attr_(\"labels\"),o=0,s=1;s<i.length;s++)this.visibility()[s-1]&&(this.layout_.addDataset(r[s],i[s]),this.datasetIndex_[s]=o++);for(var s=0;s<r.length;s++)this.setIndexByName_[r[s]]=s;if(this.computeYAxisRanges_(n),this.layout_.setYAxes(this.axes_),this.addXTicks_(),this.layout_.evaluate(),this.renderGraph_(e),this.getStringOption(\"timingName\")){var l=new Date;console.log(this.getStringOption(\"timingName\")+\" - drawGraph: \"+(l-t)+\"ms\")}},Q.prototype.renderGraph_=function(t){this.cascadeEvents_(\"clearChart\"),this.plotter_.clear();var e=this.getFunctionOption(\"underlayCallback\");e&&e.call(this,this.hidden_ctx_,this.layout_.getPlotArea(),this,this);var a={canvas:this.hidden_,drawingContext:this.hidden_ctx_};this.cascadeEvents_(\"willDrawChart\",a),this.plotter_.render(),this.cascadeEvents_(\"didDrawChart\",a),this.lastRow_=-1,this.canvas_.getContext(\"2d\").clearRect(0,0,this.width_,this.height_);var i=this.getFunctionOption(\"drawCallback\");if(null!==i&&i.call(this,this,t),t)for(this.readyFired_=!0;this.readyFns_.length>0;){var n=this.readyFns_.pop();n(this)}},Q.prototype.computeYAxes_=function(){var t,e,a;for(this.axes_=[],t=0;t<this.attributes_.numAxes();t++)e={g:this},x.update(e,this.attributes_.axisOptions(t)),this.axes_[t]=e;for(t=0;t<this.axes_.length;t++)if(0===t)e=this.optionsViewForAxis_(\"y\"+(t?\"2\":\"\")),(a=e(\"valueRange\"))&&(this.axes_[t].valueRange=a);else{var i=this.user_attrs_.axes;i&&i.y2&&(a=i.y2.valueRange)&&(this.axes_[t].valueRange=a)}},Q.prototype.numAxes=function(){return this.attributes_.numAxes()},Q.prototype.axisPropertiesForSeries=function(t){return this.axes_[this.attributes_.axisForSeries(t)]},Q.prototype.computeYAxisRanges_=function(t){for(var e,a,i,n,r,o=function(t){return isNaN(parseFloat(t))},s=this.attributes_.numAxes(),l=0;l<s;l++){var h=this.axes_[l],u=this.attributes_.getForAxis(\"logscale\",l),d=this.attributes_.getForAxis(\"includeZero\",l),c=this.attributes_.getForAxis(\"independentTicks\",l);i=this.attributes_.seriesForAxis(l),e=!0,n=.1;var p=this.getNumericOption(\"yRangePad\");if(null!==p&&(e=!1,n=p/this.plotter_.area.h),0===i.length)h.extremeRange=[0,1];else{for(var g,f,v=1/0,_=-1/0,y=0;y<i.length;y++)t.hasOwnProperty(i[y])&&(g=t[i[y]][0],null!==g&&(v=Math.min(g,v)),null!==(f=t[i[y]][1])&&(_=Math.max(f,_)));d&&!u&&(v>0&&(v=0),_<0&&(_=0)),v==1/0&&(v=0),_==-1/0&&(_=1),a=_-v,0===a&&(0!==_?a=Math.abs(_):(_=1,a=1));var m=_,b=v;e&&(u?(m=_+n*a,b=v):(m=_+n*a,b=v-n*a,b<0&&v>=0&&(b=0),m>0&&_<=0&&(m=0))),h.extremeRange=[b,m]}if(h.valueRange){var w=o(h.valueRange[0])?h.extremeRange[0]:h.valueRange[0],A=o(h.valueRange[1])?h.extremeRange[1]:h.valueRange[1];h.computedValueRange=[w,A]}else h.computedValueRange=h.extremeRange;if(!e)if(w=h.computedValueRange[0],A=h.computedValueRange[1],w===A&&(w-=.5,A+=.5),u){var O=n/(2*n-1),D=(n-1)/(2*n-1);h.computedValueRange[0]=x.logRangeFraction(w,A,O),h.computedValueRange[1]=x.logRangeFraction(w,A,D)}else a=A-w,h.computedValueRange[0]=w-a*n,h.computedValueRange[1]=A+a*n;if(c){h.independentTicks=c;var E=this.optionsViewForAxis_(\"y\"+(l?\"2\":\"\")),L=E(\"ticker\");h.ticks=L(h.computedValueRange[0],h.computedValueRange[1],this.plotter_.area.h,E,this),r||(r=h)}}if(void 0===r)throw'Configuration Error: At least one axis has to have the \"independentTicks\" option activated.';for(var l=0;l<s;l++){var h=this.axes_[l];if(!h.independentTicks){for(var E=this.optionsViewForAxis_(\"y\"+(l?\"2\":\"\")),L=E(\"ticker\"),T=r.ticks,S=r.computedValueRange[1]-r.computedValueRange[0],P=h.computedValueRange[1]-h.computedValueRange[0],C=[],M=0;M<T.length;M++){var N=(T[M].v-r.computedValueRange[0])/S,F=h.computedValueRange[0]+N*P;C.push(F)}h.ticks=L(h.computedValueRange[0],h.computedValueRange[1],this.plotter_.area.h,E,this,C)}}},Q.prototype.detectTypeFromString_=function(t){var e=!1,a=t.indexOf(\"-\");a>0&&\"e\"!=t[a-1]&&\"E\"!=t[a-1]||t.indexOf(\"/\")>=0||isNaN(parseFloat(t))?e=!0:8==t.length&&t>\"19700101\"&&t<\"20371231\"&&(e=!0),this.setXAxisOptions_(e)},Q.prototype.setXAxisOptions_=function(t){t?(this.attrs_.xValueParser=x.dateParser,this.attrs_.axes.x.valueFormatter=x.dateValueFormatter,this.attrs_.axes.x.ticker=_.dateTicker,this.attrs_.axes.x.axisLabelFormatter=x.dateAxisLabelFormatter):(this.attrs_.xValueParser=function(t){return parseFloat(t)},this.attrs_.axes.x.valueFormatter=function(t){return t},this.attrs_.axes.x.ticker=_.numericTicks,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter)},Q.prototype.parseCSV_=function(t){var e,a,i=[],n=x.detectLineDelimiter(t),r=t.split(n||\"\\n\"),o=this.getStringOption(\"delimiter\");-1==r[0].indexOf(o)&&r[0].indexOf(\"\\t\")>=0&&(o=\"\\t\");var s=0;\"labels\"in this.user_attrs_||(s=1,this.attrs_.labels=r[0].split(o),this.attributes_.reparseSeries());for(var l,h=!1,u=this.attr_(\"labels\").length,d=!1,c=s;c<r.length;c++){var p=r[c];if(c,0!==p.length&&\"#\"!=p[0]){var g=p.split(o);if(!(g.length<2)){var f=[];if(h||(this.detectTypeFromString_(g[0]),l=this.getFunctionOption(\"xValueParser\"),h=!0),f[0]=l(g[0],this),this.fractions_)for(a=1;a<g.length;a++)e=g[a].split(\"/\"),2!=e.length?(console.error('Expected fractional \"num/den\" values in CSV data but found a value \\''+g[a]+\"' on line \"+(1+c)+\" ('\"+p+\"') which is not of this form.\"),f[a]=[0,0]):f[a]=[x.parseFloat_(e[0],c,p),x.parseFloat_(e[1],c,p)];else if(this.getBooleanOption(\"errorBars\"))for(g.length%2!=1&&console.error(\"Expected alternating (value, stdev.) pairs in CSV data but line \"+(1+c)+\" has an odd number of values (\"+(g.length-1)+\"): '\"+p+\"'\"),a=1;a<g.length;a+=2)f[(a+1)/2]=[x.parseFloat_(g[a],c,p),x.parseFloat_(g[a+1],c,p)];else if(this.getBooleanOption(\"customBars\"))for(a=1;a<g.length;a++){var v=g[a];/^ *$/.test(v)?f[a]=[null,null,null]:(e=v.split(\";\"),3==e.length?f[a]=[x.parseFloat_(e[0],c,p),x.parseFloat_(e[1],c,p),x.parseFloat_(e[2],c,p)]:console.warn('When using customBars, values must be either blank or \"low;center;high\" tuples (got \"'+v+'\" on line '+(1+c)))}else for(a=1;a<g.length;a++)f[a]=x.parseFloat_(g[a],c,p);if(i.length>0&&f[0]<i[i.length-1][0]&&(d=!0),f.length!=u&&console.error(\"Number of columns in line \"+c+\" (\"+f.length+\") does not agree with number of labels (\"+u+\") \"+p),0===c&&this.attr_(\"labels\")){var _=!0;for(a=0;_&&a<f.length;a++)f[a]&&(_=!1);if(_){console.warn(\"The dygraphs 'labels' option is set, but the first row of CSV data ('\"+p+\"') appears to also contain labels. Will drop the CSV labels and use the option labels.\");continue}}i.push(f)}}}return d&&(console.warn(\"CSV is out of order; order it correctly to speed loading.\"),i.sort(function(t,e){return t[0]-e[0]})),i},Q.prototype.parseArray_=function(t){if(0===t.length)return console.error(\"Can't plot empty data set\"),null;if(0===t[0].length)return console.error(\"Data set cannot contain an empty row\"),null;o(t);var e;if(null===this.attr_(\"labels\")){for(console.warn(\"Using default labels. Set labels explicitly via 'labels' in the options parameter\"),this.attrs_.labels=[\"X\"],e=1;e<t[0].length;e++)this.attrs_.labels.push(\"Y\"+e);this.attributes_.reparseSeries()}else{var a=this.attr_(\"labels\");if(a.length!=t[0].length)return console.error(\"Mismatch between number of labels (\"+a+\") and number of columns in array (\"+t[0].length+\")\"),null}if(x.isDateLike(t[0][0])){this.attrs_.axes.x.valueFormatter=x.dateValueFormatter,this.attrs_.axes.x.ticker=_.dateTicker,this.attrs_.axes.x.axisLabelFormatter=x.dateAxisLabelFormatter;var i=x.clone(t);for(e=0;e<t.length;e++){if(0===i[e].length)return console.error(\"Row \"+(1+e)+\" of data is empty\"),null;if(null===i[e][0]||\"function\"!=typeof i[e][0].getTime||isNaN(i[e][0].getTime()))return console.error(\"x value in row \"+(1+e)+\" is not a Date\"),null;i[e][0]=i[e][0].getTime()}return i}return this.attrs_.axes.x.valueFormatter=function(t){return t},this.attrs_.axes.x.ticker=_.numericTicks,this.attrs_.axes.x.axisLabelFormatter=x.numberAxisLabelFormatter,t},Q.prototype.parseDataTable_=function(t){var e=t.getNumberOfColumns(),a=t.getNumberOfRows(),i=t.getColumnType(0);if(\"date\"==i||\"datetime\"==i)this.attrs_.xValueParser=x.dateParser,this.attrs_.axes.x.valueFormatter=x.dateValueFormatter,this.attrs_.axes.x.ticker=_.dateTicker,this.attrs_.axes.x.axisLabelFormatter=x.dateAxisLabelFormatter;else{if(\"number\"!=i)throw new Error(\"only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '\"+i+\"')\");this.attrs_.xValueParser=function(t){return parseFloat(t)},this.attrs_.axes.x.valueFormatter=function(t){return t},this.attrs_.axes.x.ticker=_.numericTicks,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter}var n,r,o=[],s={},l=!1;for(n=1;n<e;n++){var h=t.getColumnType(n);if(\"number\"==h)o.push(n);else{if(\"string\"!=h||!this.getBooleanOption(\"displayAnnotations\"))throw new Error(\"Only 'number' is supported as a dependent type with Gviz. 'string' is only supported if displayAnnotations is true\");var u=o[o.length-1];s.hasOwnProperty(u)?s[u].push(n):s[u]=[n],l=!0}}var d=[t.getColumnLabel(0)];for(n=0;n<o.length;n++)d.push(t.getColumnLabel(o[n])),this.getBooleanOption(\"errorBars\")&&(n+=1);this.attrs_.labels=d,e=d.length;var c=[],p=!1,g=[];for(n=0;n<a;n++){var f=[];if(void 0!==t.getValue(n,0)&&null!==t.getValue(n,0)){if(\"date\"==i||\"datetime\"==i?f.push(t.getValue(n,0).getTime()):f.push(t.getValue(n,0)),this.getBooleanOption(\"errorBars\"))for(r=0;r<e-1;r++)f.push([t.getValue(n,1+2*r),t.getValue(n,2+2*r)]);else{for(r=0;r<o.length;r++){var v=o[r];if(f.push(t.getValue(n,v)),l&&s.hasOwnProperty(v)&&null!==t.getValue(n,s[v][0])){var y={};y.series=t.getColumnLabel(v),y.xval=f[0],y.shortText=function(t){var e=String.fromCharCode(65+t%26);for(t=Math.floor(t/26);t>0;)e=String.fromCharCode(65+(t-1)%26)+e.toLowerCase(),t=Math.floor((t-1)/26);return e}(g.length),y.text=\"\";for(var m=0;m<s[v].length;m++)m&&(y.text+=\"\\n\"),y.text+=t.getValue(n,s[v][m]);g.push(y)}}for(r=0;r<f.length;r++)isFinite(f[r])||(f[r]=null)}c.length>0&&f[0]<c[c.length-1][0]&&(p=!0),c.push(f)}else console.warn(\"Ignoring row \"+n+\" of DataTable because of undefined or null first column.\")}p&&(console.warn(\"DataTable is out of order; order it correctly to speed loading.\"),c.sort(function(t,e){return t[0]-e[0]})),this.rawData_=c,g.length>0&&this.setAnnotations(g,!0),this.attributes_.reparseSeries()},Q.prototype.cascadeDataDidUpdateEvent_=function(){this.cascadeEvents_(\"dataDidUpdate\",{})},Q.prototype.start_=function(){var t=this.file_;if(\"function\"==typeof t&&(t=t()),x.isArrayLike(t))this.rawData_=this.parseArray_(t),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if(\"object\"==typeof t&&\"function\"==typeof t.getColumnRange)this.parseDataTable_(t),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if(\"string\"==typeof t){var e=x.detectLineDelimiter(t);if(e)this.loadedEvent_(t);else{var a;a=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject(\"Microsoft.XMLHTTP\");var i=this;a.onreadystatechange=function(){4==a.readyState&&(200!==a.status&&0!==a.status||i.loadedEvent_(a.responseText))},a.open(\"GET\",t,!0),a.send(null)}}else console.error(\"Unknown data format: \"+typeof t)},Q.prototype.updateOptions=function(t,e){void 0===e&&(e=!1);var a=t.file,i=Q.copyUserAttrs_(t);\"rollPeriod\"in i&&(this.rollPeriod_=i.rollPeriod),\"dateWindow\"in i&&(this.dateWindow_=i.dateWindow);var n=x.isPixelChangingOptionList(this.attr_(\"labels\"),i);x.updateDeep(this.user_attrs_,i),this.attributes_.reparseSeries(),a?(this.cascadeEvents_(\"dataWillUpdate\",{}),this.file_=a,e||this.start_()):e||(n?this.predraw_():this.renderGraph_(!1))},Q.copyUserAttrs_=function(t){var e={};for(var a in t)t.hasOwnProperty(a)&&\"file\"!=a&&t.hasOwnProperty(a)&&(e[a]=t[a]);return e},Q.prototype.resize=function(t,e){if(!this.resize_lock){this.resize_lock=!0,null===t!=(null===e)&&(console.warn(\"Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero.\"),t=e=null);var a=this.width_,i=this.height_;t?(this.maindiv_.style.width=t+\"px\",this.maindiv_.style.height=e+\"px\",this.width_=t,this.height_=e):(this.width_=this.maindiv_.clientWidth,this.height_=this.maindiv_.clientHeight),a==this.width_&&i==this.height_||(this.resizeElements_(),this.predraw_()),this.resize_lock=!1}},Q.prototype.adjustRoll=function(t){this.rollPeriod_=t,this.predraw_()},Q.prototype.visibility=function(){for(this.getOption(\"visibility\")||(this.attrs_.visibility=[]);this.getOption(\"visibility\").length<this.numColumns()-1;)this.attrs_.visibility.push(!0);return this.getOption(\"visibility\")},Q.prototype.setVisibility=function(t,e){var a=this.visibility(),i=!1;if(Array.isArray(t)||(null!==t&&\"object\"==typeof t?i=!0:t=[t]),i)for(var n in t)t.hasOwnProperty(n)&&(n<0||n>=a.length?console.warn(\"Invalid series number in setVisibility: \"+n):a[n]=t[n]);else for(var n=0;n<t.length;n++)\"boolean\"==typeof t[n]?n>=a.length?console.warn(\"Invalid series number in setVisibility: \"+n):a[n]=t[n]:t[n]<0||t[n]>=a.length?console.warn(\"Invalid series number in setVisibility: \"+t[n]):a[t[n]]=e;this.predraw_()},Q.prototype.size=function(){return{width:this.width_,height:this.height_}},Q.prototype.setAnnotations=function(t,e){if(this.annotations_=t,!this.layout_)return void console.warn(\"Tried to setAnnotations before dygraph was ready. Try setting them in a ready() block. See dygraphs.com/tests/annotation.html\");this.layout_.setAnnotations(this.annotations_),e||this.predraw_()},Q.prototype.annotations=function(){return this.annotations_},Q.prototype.getLabels=function(){var t=this.attr_(\"labels\");return t?t.slice():null},Q.prototype.indexFromSetName=function(t){return this.setIndexByName_[t]},Q.prototype.getRowForX=function(t){for(var e=0,a=this.numRows()-1;e<=a;){var i=a+e>>1,n=this.getValue(i,0);if(n<t)e=i+1;else if(n>t)a=i-1;else{if(e==i)return i;a=i}}return null},Q.prototype.ready=function(t){this.is_initial_draw_?this.readyFns_.push(t):t.call(this,this)},Q.prototype.addAndTrackEvent=function(t,e,a){x.addEvent(t,e,a),this.registeredEvents_.push({elem:t,type:e,fn:a})},Q.prototype.removeTrackedEvents_=function(){if(this.registeredEvents_)for(var t=0;t<this.registeredEvents_.length;t++){var e=this.registeredEvents_[t];x.removeEvent(e.elem,e.type,e.fn)}this.registeredEvents_=[]},Q.PLUGINS=[U.default,X.default,j.default,Z.default,H.default,G.default],Q.GVizChart=q.default,Q.DASHED_LINE=x.DASHED_LINE,Q.DOT_DASH_LINE=x.DOT_DASH_LINE,Q.dateAxisLabelFormatter=x.dateAxisLabelFormatter,Q.toRGB_=x.toRGB_,Q.findPos=x.findPos,Q.pageX=x.pageX,Q.pageY=x.pageY,Q.dateString_=x.dateString_,Q.defaultInteractionModel=f.default.defaultModel,Q.nonInteractiveModel=Q.nonInteractiveModel_=f.default.nonInteractiveModel_,Q.Circles=x.Circles,Q.Plugins={Legend:U.default,Axes:X.default,Annotations:H.default,ChartLabels:Z.default,Grid:G.default,RangeSelector:j.default},Q.DataHandlers={DefaultHandler:E.default,BarsHandler:R.default,CustomBarsHandler:P.default,DefaultFractionHandler:M.default,ErrorBarsHandler:T.default,FractionsBarsHandler:F.default},Q.startPan=f.default.startPan,Q.startZoom=f.default.startZoom,Q.movePan=f.default.movePan,Q.moveZoom=f.default.moveZoom,Q.endPan=f.default.endPan,Q.endZoom=f.default.endZoom,Q.numericLinearTicks=_.numericLinearTicks,Q.numericTicks=_.numericTicks,Q.dateTicker=_.dateTicker,Q.Granularity=_.Granularity,Q.getDateAxis=_.getDateAxis,Q.floatFormat=x.floatFormat,a.default=Q,e.exports=a.default}).call(this,t(\"_process\"))},{\"./datahandler/bars\":5,\"./datahandler/bars-custom\":2,\"./datahandler/bars-error\":3,\"./datahandler/bars-fractions\":4,\"./datahandler/default\":8,\"./datahandler/default-fractions\":7,\"./dygraph-canvas\":9,\"./dygraph-default-attrs\":10,\"./dygraph-gviz\":11,\"./dygraph-interaction-model\":12,\"./dygraph-layout\":13,\"./dygraph-options\":15,\"./dygraph-options-reference\":14,\"./dygraph-tickers\":16,\"./dygraph-utils\":17,\"./iframe-tarp\":19,\"./plugins/annotations\":20,\"./plugins/axes\":21,\"./plugins/chart-labels\":22,\"./plugins/grid\":23,\"./plugins/legend\":24,\"./plugins/range-selector\":25,_process:1}],19:[function(t,e,a){\"use strict\";function i(){this.tarps=[]}Object.defineProperty(a,\"__esModule\",{value:!0});var n=t(\"./dygraph-utils\"),r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(n);i.prototype.cover=function(){for(var t=document.getElementsByTagName(\"iframe\"),e=0;e<t.length;e++){var a=t[e],i=r.findPos(a),n=i.x,o=i.y,s=a.offsetWidth,l=a.offsetHeight,h=document.createElement(\"div\");h.style.position=\"absolute\",h.style.left=n+\"px\",h.style.top=o+\"px\",h.style.width=s+\"px\",h.style.height=l+\"px\",h.style.zIndex=999,document.body.appendChild(h),this.tarps.push(h)}},i.prototype.uncover=function(){for(var t=0;t<this.tarps.length;t++)this.tarps[t].parentNode.removeChild(this.tarps[t]);this.tarps=[]},a.default=i,e.exports=a.default},{\"./dygraph-utils\":17}],20:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=function(){this.annotations_=[]};i.prototype.toString=function(){return\"Annotations Plugin\"},i.prototype.activate=function(t){return{clearChart:this.clearChart,didDrawChart:this.didDrawChart}},i.prototype.detachLabels=function(){for(var t=0;t<this.annotations_.length;t++){var e=this.annotations_[t];e.parentNode&&e.parentNode.removeChild(e),this.annotations_[t]=null}this.annotations_=[]},i.prototype.clearChart=function(t){this.detachLabels()},i.prototype.didDrawChart=function(t){var e=t.dygraph,a=e.layout_.annotated_points;if(a&&0!==a.length)for(var i=t.canvas.parentNode,n=function(t,a,i){return function(n){var r=i.annotation;r.hasOwnProperty(t)?r[t](r,i,e,n):e.getOption(a)&&e.getOption(a)(r,i,e,n)}},r=t.dygraph.getArea(),o={},s=0;s<a.length;s++){var l=a[s];if(!(l.canvasx<r.x||l.canvasx>r.x+r.w||l.canvasy<r.y||l.canvasy>r.y+r.h)){var h=l.annotation,u=6;h.hasOwnProperty(\"tickHeight\")&&(u=h.tickHeight);var d=document.createElement(\"div\");d.style.fontSize=e.getOption(\"axisLabelFontSize\")+\"px\"\n;var c=\"dygraph-annotation\";h.hasOwnProperty(\"icon\")||(c+=\" dygraphDefaultAnnotation dygraph-default-annotation\"),h.hasOwnProperty(\"cssClass\")&&(c+=\" \"+h.cssClass),d.className=c;var p=h.hasOwnProperty(\"width\")?h.width:16,g=h.hasOwnProperty(\"height\")?h.height:16;if(h.hasOwnProperty(\"icon\")){var f=document.createElement(\"img\");f.src=h.icon,f.width=p,f.height=g,d.appendChild(f)}else l.annotation.hasOwnProperty(\"shortText\")&&d.appendChild(document.createTextNode(l.annotation.shortText));var v=l.canvasx-p/2;d.style.left=v+\"px\";var _=0;if(h.attachAtBottom){var y=r.y+r.h-g-u;o[v]?y-=o[v]:o[v]=0,o[v]+=u+g,_=y}else _=l.canvasy-g-u;d.style.top=_+\"px\",d.style.width=p+\"px\",d.style.height=g+\"px\",d.title=l.annotation.text,d.style.color=e.colorsMap_[l.name],d.style.borderColor=e.colorsMap_[l.name],h.div=d,e.addAndTrackEvent(d,\"click\",n(\"clickHandler\",\"annotationClickHandler\",l)),e.addAndTrackEvent(d,\"mouseover\",n(\"mouseOverHandler\",\"annotationMouseOverHandler\",l)),e.addAndTrackEvent(d,\"mouseout\",n(\"mouseOutHandler\",\"annotationMouseOutHandler\",l)),e.addAndTrackEvent(d,\"dblclick\",n(\"dblClickHandler\",\"annotationDblClickHandler\",l)),i.appendChild(d),this.annotations_.push(d);var x=t.drawingContext;if(x.save(),x.strokeStyle=h.hasOwnProperty(\"tickColor\")?h.tickColor:e.colorsMap_[l.name],x.lineWidth=h.hasOwnProperty(\"tickWidth\")?h.tickWidth:e.getOption(\"strokeWidth\"),x.beginPath(),h.attachAtBottom){var y=_+g;x.moveTo(l.canvasx,y),x.lineTo(l.canvasx,y+u)}else x.moveTo(l.canvasx,l.canvasy),x.lineTo(l.canvasx,l.canvasy-2-u);x.closePath(),x.stroke(),x.restore()}}},i.prototype.destroy=function(){this.detachLabels()},a.default=i,e.exports=a.default},{}],21:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"../dygraph-utils\"),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(i),r=function(){this.xlabels_=[],this.ylabels_=[]};r.prototype.toString=function(){return\"Axes Plugin\"},r.prototype.activate=function(t){return{layout:this.layout,clearChart:this.clearChart,willDrawChart:this.willDrawChart}},r.prototype.layout=function(t){var e=t.dygraph;if(e.getOptionForAxis(\"drawAxis\",\"y\")){var a=e.getOptionForAxis(\"axisLabelWidth\",\"y\")+2*e.getOptionForAxis(\"axisTickSize\",\"y\");t.reserveSpaceLeft(a)}if(e.getOptionForAxis(\"drawAxis\",\"x\")){var i;i=e.getOption(\"xAxisHeight\")?e.getOption(\"xAxisHeight\"):e.getOptionForAxis(\"axisLabelFontSize\",\"x\")+2*e.getOptionForAxis(\"axisTickSize\",\"x\"),t.reserveSpaceBottom(i)}if(2==e.numAxes()){if(e.getOptionForAxis(\"drawAxis\",\"y2\")){var a=e.getOptionForAxis(\"axisLabelWidth\",\"y2\")+2*e.getOptionForAxis(\"axisTickSize\",\"y2\");t.reserveSpaceRight(a)}}else e.numAxes()>2&&e.error(\"Only two y-axes are supported at this time. (Trying to use \"+e.numAxes()+\")\")},r.prototype.detachLabels=function(){function t(t){for(var e=0;e<t.length;e++){var a=t[e];a.parentNode&&a.parentNode.removeChild(a)}}t(this.xlabels_),t(this.ylabels_),this.xlabels_=[],this.ylabels_=[]},r.prototype.clearChart=function(t){this.detachLabels()},r.prototype.willDrawChart=function(t){function e(t){return Math.round(t)+.5}function a(t){return Math.round(t)-.5}var i=this,r=t.dygraph;if(r.getOptionForAxis(\"drawAxis\",\"x\")||r.getOptionForAxis(\"drawAxis\",\"y\")||r.getOptionForAxis(\"drawAxis\",\"y2\")){var o,s,l,h=t.drawingContext,u=t.canvas.parentNode,d=r.width_,c=r.height_,p=function(t){return{position:\"absolute\",fontSize:r.getOptionForAxis(\"axisLabelFontSize\",t)+\"px\",width:r.getOptionForAxis(\"axisLabelWidth\",t)+\"px\"}},g={x:p(\"x\"),y:p(\"y\"),y2:p(\"y2\")},f=function(t,e,a){var i=document.createElement(\"div\"),r=g[\"y2\"==a?\"y2\":e];n.update(i.style,r);var o=document.createElement(\"div\");return o.className=\"dygraph-axis-label dygraph-axis-label-\"+e+(a?\" dygraph-axis-label-\"+a:\"\"),o.innerHTML=t,i.appendChild(o),i};h.save();var v=r.layout_,_=t.dygraph.plotter_.area,y=function(t){return function(e){return r.getOptionForAxis(e,t)}};if(r.getOptionForAxis(\"drawAxis\",\"y\")){if(v.yticks&&v.yticks.length>0){var x=r.numAxes(),m=[y(\"y\"),y(\"y2\")];v.yticks.forEach(function(t){if(void 0!==t.label){s=_.x;var e=\"y1\",a=m[0];1==t.axis&&(s=_.x+_.w,-1,e=\"y2\",a=m[1]);var n=a(\"axisLabelFontSize\");l=_.y+t.pos*_.h,o=f(t.label,\"y\",2==x?e:null);var r=l-n/2;r<0&&(r=0),r+n+3>c?o.style.bottom=\"0\":o.style.top=r+\"px\",0===t.axis?(o.style.left=_.x-a(\"axisLabelWidth\")-a(\"axisTickSize\")+\"px\",o.style.textAlign=\"right\"):1==t.axis&&(o.style.left=_.x+_.w+a(\"axisTickSize\")+\"px\",o.style.textAlign=\"left\"),o.style.width=a(\"axisLabelWidth\")+\"px\",u.appendChild(o),i.ylabels_.push(o)}});var b=this.ylabels_[0],w=r.getOptionForAxis(\"axisLabelFontSize\",\"y\");parseInt(b.style.top,10)+w>c-w&&(b.style.top=parseInt(b.style.top,10)-w/2+\"px\")}var A;if(r.getOption(\"drawAxesAtZero\")){var O=r.toPercentXCoord(0);(O>1||O<0||isNaN(O))&&(O=0),A=e(_.x+O*_.w)}else A=e(_.x);h.strokeStyle=r.getOptionForAxis(\"axisLineColor\",\"y\"),h.lineWidth=r.getOptionForAxis(\"axisLineWidth\",\"y\"),h.beginPath(),h.moveTo(A,a(_.y)),h.lineTo(A,a(_.y+_.h)),h.closePath(),h.stroke(),2==r.numAxes()&&(h.strokeStyle=r.getOptionForAxis(\"axisLineColor\",\"y2\"),h.lineWidth=r.getOptionForAxis(\"axisLineWidth\",\"y2\"),h.beginPath(),h.moveTo(a(_.x+_.w),a(_.y)),h.lineTo(a(_.x+_.w),a(_.y+_.h)),h.closePath(),h.stroke())}if(r.getOptionForAxis(\"drawAxis\",\"x\")){if(v.xticks){var D=y(\"x\");v.xticks.forEach(function(t){if(void 0!==t.label){s=_.x+t.pos*_.w,l=_.y+_.h,o=f(t.label,\"x\"),o.style.textAlign=\"center\",o.style.top=l+D(\"axisTickSize\")+\"px\";var e=s-D(\"axisLabelWidth\")/2;e+D(\"axisLabelWidth\")>d&&(e=d-D(\"axisLabelWidth\"),o.style.textAlign=\"right\"),e<0&&(e=0,o.style.textAlign=\"left\"),o.style.left=e+\"px\",o.style.width=D(\"axisLabelWidth\")+\"px\",u.appendChild(o),i.xlabels_.push(o)}})}h.strokeStyle=r.getOptionForAxis(\"axisLineColor\",\"x\"),h.lineWidth=r.getOptionForAxis(\"axisLineWidth\",\"x\"),h.beginPath();var E;if(r.getOption(\"drawAxesAtZero\")){var O=r.toPercentYCoord(0,0);(O>1||O<0)&&(O=1),E=a(_.y+O*_.h)}else E=a(_.y+_.h);h.moveTo(e(_.x),E),h.lineTo(e(_.x+_.w),E),h.closePath(),h.stroke()}h.restore()}},a.default=r,e.exports=a.default},{\"../dygraph-utils\":17}],22:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=function(){this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};i.prototype.toString=function(){return\"ChartLabels Plugin\"},i.prototype.activate=function(t){return{layout:this.layout,didDrawChart:this.didDrawChart}};var n=function(t){var e=document.createElement(\"div\");return e.style.position=\"absolute\",e.style.left=t.x+\"px\",e.style.top=t.y+\"px\",e.style.width=t.w+\"px\",e.style.height=t.h+\"px\",e};i.prototype.detachLabels_=function(){for(var t=[this.title_div_,this.xlabel_div_,this.ylabel_div_,this.y2label_div_],e=0;e<t.length;e++){var a=t[e];a&&(a.parentNode&&a.parentNode.removeChild(a))}this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};var r=function(t,e,a,i,n){var r=document.createElement(\"div\");r.style.position=\"absolute\",r.style.left=1==a?\"0px\":e.x+\"px\",r.style.top=e.y+\"px\",r.style.width=e.w+\"px\",r.style.height=e.h+\"px\",r.style.fontSize=t.getOption(\"yLabelWidth\")-2+\"px\";var o=document.createElement(\"div\");o.style.position=\"absolute\",o.style.width=e.h+\"px\",o.style.height=e.w+\"px\",o.style.top=e.h/2-e.w/2+\"px\",o.style.left=e.w/2-e.h/2+\"px\",o.className=\"dygraph-label-rotate-\"+(1==a?\"right\":\"left\");var s=document.createElement(\"div\");return s.className=i,s.innerHTML=n,o.appendChild(s),r.appendChild(o),r};i.prototype.layout=function(t){this.detachLabels_();var e=t.dygraph,a=t.chart_div;if(e.getOption(\"title\")){var i=t.reserveSpaceTop(e.getOption(\"titleHeight\"));this.title_div_=n(i),this.title_div_.style.fontSize=e.getOption(\"titleHeight\")-8+\"px\";var o=document.createElement(\"div\");o.className=\"dygraph-label dygraph-title\",o.innerHTML=e.getOption(\"title\"),this.title_div_.appendChild(o),a.appendChild(this.title_div_)}if(e.getOption(\"xlabel\")){var s=t.reserveSpaceBottom(e.getOption(\"xLabelHeight\"));this.xlabel_div_=n(s),this.xlabel_div_.style.fontSize=e.getOption(\"xLabelHeight\")-2+\"px\";var o=document.createElement(\"div\");o.className=\"dygraph-label dygraph-xlabel\",o.innerHTML=e.getOption(\"xlabel\"),this.xlabel_div_.appendChild(o),a.appendChild(this.xlabel_div_)}if(e.getOption(\"ylabel\")){var l=t.reserveSpaceLeft(0);this.ylabel_div_=r(e,l,1,\"dygraph-label dygraph-ylabel\",e.getOption(\"ylabel\")),a.appendChild(this.ylabel_div_)}if(e.getOption(\"y2label\")&&2==e.numAxes()){var h=t.reserveSpaceRight(0);this.y2label_div_=r(e,h,2,\"dygraph-label dygraph-y2label\",e.getOption(\"y2label\")),a.appendChild(this.y2label_div_)}},i.prototype.didDrawChart=function(t){var e=t.dygraph;this.title_div_&&(this.title_div_.children[0].innerHTML=e.getOption(\"title\")),this.xlabel_div_&&(this.xlabel_div_.children[0].innerHTML=e.getOption(\"xlabel\")),this.ylabel_div_&&(this.ylabel_div_.children[0].children[0].innerHTML=e.getOption(\"ylabel\")),this.y2label_div_&&(this.y2label_div_.children[0].children[0].innerHTML=e.getOption(\"y2label\"))},i.prototype.clearChart=function(){},i.prototype.destroy=function(){this.detachLabels_()},a.default=i,e.exports=a.default},{}],23:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=function(){};i.prototype.toString=function(){return\"Gridline Plugin\"},i.prototype.activate=function(t){return{willDrawChart:this.willDrawChart}},i.prototype.willDrawChart=function(t){function e(t){return Math.round(t)+.5}function a(t){return Math.round(t)-.5}var i,n,r,o,s=t.dygraph,l=t.drawingContext,h=s.layout_,u=t.dygraph.plotter_.area;if(s.getOptionForAxis(\"drawGrid\",\"y\")){for(var d=[\"y\",\"y2\"],c=[],p=[],g=[],f=[],v=[],r=0;r<d.length;r++)g[r]=s.getOptionForAxis(\"drawGrid\",d[r]),g[r]&&(c[r]=s.getOptionForAxis(\"gridLineColor\",d[r]),p[r]=s.getOptionForAxis(\"gridLineWidth\",d[r]),v[r]=s.getOptionForAxis(\"gridLinePattern\",d[r]),f[r]=v[r]&&v[r].length>=2);o=h.yticks,l.save(),o.forEach(function(t){if(t.has_tick){var r=t.axis;g[r]&&(l.save(),f[r]&&l.setLineDash&&l.setLineDash(v[r]),l.strokeStyle=c[r],l.lineWidth=p[r],i=e(u.x),n=a(u.y+t.pos*u.h),l.beginPath(),l.moveTo(i,n),l.lineTo(i+u.w,n),l.stroke(),l.restore())}}),l.restore()}if(s.getOptionForAxis(\"drawGrid\",\"x\")){o=h.xticks,l.save();var v=s.getOptionForAxis(\"gridLinePattern\",\"x\"),f=v&&v.length>=2;f&&l.setLineDash&&l.setLineDash(v),l.strokeStyle=s.getOptionForAxis(\"gridLineColor\",\"x\"),l.lineWidth=s.getOptionForAxis(\"gridLineWidth\",\"x\"),o.forEach(function(t){t.has_tick&&(i=e(u.x+t.pos*u.w),n=a(u.y+u.h),l.beginPath(),l.moveTo(i,n),l.lineTo(i,u.y),l.closePath(),l.stroke())}),f&&l.setLineDash&&l.setLineDash([]),l.restore()}},i.prototype.destroy=function(){},a.default=i,e.exports=a.default},{}],24:[function(t,e,a){\"use strict\";function i(t,e,a){if(!t||t.length<=1)return'<div class=\"dygraph-legend-line\" style=\"border-bottom-color: '+e+';\"></div>';var i,n,r,o,s,l=0,h=0,u=[];for(i=0;i<=t.length;i++)l+=t[i%t.length];if((s=Math.floor(a/(l-t[0])))>1){for(i=0;i<t.length;i++)u[i]=t[i]/a;h=u.length}else{for(s=1,i=0;i<t.length;i++)u[i]=t[i]/l;h=u.length+1}var d=\"\";for(n=0;n<s;n++)for(i=0;i<h;i+=2)r=u[i%u.length],o=i<t.length?u[(i+1)%u.length]:0,d+='<div class=\"dygraph-legend-dash\" style=\"margin-right: '+o+\"em; padding-left: \"+r+'em;\"></div>';return d}Object.defineProperty(a,\"__esModule\",{value:!0});var n=t(\"../dygraph-utils\"),r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(n),o=function(){this.legend_div_=null,this.is_generated_div_=!1};o.prototype.toString=function(){return\"Legend Plugin\"},o.prototype.activate=function(t){var e,a=t.getOption(\"labelsDiv\");return a&&null!==a?e=\"string\"==typeof a||a instanceof String?document.getElementById(a):a:(e=document.createElement(\"div\"),e.className=\"dygraph-legend\",t.graphDiv.appendChild(e),this.is_generated_div_=!0),this.legend_div_=e,this.one_em_width_=10,{select:this.select,deselect:this.deselect,predraw:this.predraw,didDrawChart:this.didDrawChart}};var s=function(t){var e=document.createElement(\"span\");e.setAttribute(\"style\",\"margin: 0; padding: 0 0 0 1em; border: 0;\"),t.appendChild(e);var a=e.offsetWidth;return t.removeChild(e),a},l=function(t){return t.replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/</g,\"<\").replace(/>/g,\">\")};o.prototype.select=function(t){var e=t.selectedX,a=t.selectedPoints,i=t.selectedRow,n=t.dygraph.getOption(\"legend\");if(\"never\"===n)return void(this.legend_div_.style.display=\"none\");if(\"follow\"===n){var r=t.dygraph.plotter_.area,s=this.legend_div_.offsetWidth,l=t.dygraph.getOptionForAxis(\"axisLabelWidth\",\"y\"),h=a[0].x*r.w+50,u=a[0].y*r.h-50;h+s+1>r.w&&(h=h-100-s-(l-r.x)),t.dygraph.graphDiv.appendChild(this.legend_div_),this.legend_div_.style.left=l+h+\"px\",this.legend_div_.style.top=u+\"px\"}var d=o.generateLegendHTML(t.dygraph,e,a,this.one_em_width_,i);this.legend_div_.innerHTML=d,this.legend_div_.style.display=\"\"},o.prototype.deselect=function(t){\"always\"!==t.dygraph.getOption(\"legend\")&&(this.legend_div_.style.display=\"none\");var e=s(this.legend_div_);this.one_em_width_=e;var a=o.generateLegendHTML(t.dygraph,void 0,void 0,e,null);this.legend_div_.innerHTML=a},o.prototype.didDrawChart=function(t){this.deselect(t)},o.prototype.predraw=function(t){if(this.is_generated_div_){t.dygraph.graphDiv.appendChild(this.legend_div_);var e=t.dygraph.getArea(),a=this.legend_div_.offsetWidth;this.legend_div_.style.left=e.x+e.w-a-1+\"px\",this.legend_div_.style.top=e.y+\"px\"}},o.prototype.destroy=function(){this.legend_div_=null},o.generateLegendHTML=function(t,e,a,n,s){var h={dygraph:t,x:e,series:[]},u={},d=t.getLabels();if(d)for(var c=1;c<d.length;c++){var p=t.getPropertiesForSeries(d[c]),g=t.getOption(\"strokePattern\",d[c]),f={dashHTML:i(g,p.color,n),label:d[c],labelHTML:l(d[c]),isVisible:p.visible,color:p.color};h.series.push(f),u[d[c]]=f}if(void 0!==e){var v=t.optionsViewForAxis_(\"x\"),_=v(\"valueFormatter\");h.xHTML=_.call(t,e,v,d[0],t,s,0);for(var y=[],x=t.numAxes(),c=0;c<x;c++)y[c]=t.optionsViewForAxis_(\"y\"+(c?1+c:\"\"));var m=t.getOption(\"labelsShowZeroValues\"),b=t.getHighlightSeries();for(c=0;c<a.length;c++){var w=a[c],f=u[w.name];if(f.y=w.yval,0===w.yval&&!m||isNaN(w.canvasy))f.isVisible=!1;else{var p=t.getPropertiesForSeries(w.name),A=y[p.axis-1],O=A(\"valueFormatter\"),D=O.call(t,w.yval,A,w.name,t,s,d.indexOf(w.name));r.update(f,{yHTML:D}),w.name==b&&(f.isHighlighted=!0)}}}return(t.getOption(\"legendFormatter\")||o.defaultFormatter).call(t,h)},o.defaultFormatter=function(t){var e=t.dygraph;if(!0!==e.getOption(\"showLabelsOnHighlight\"))return\"\";var a,i=e.getOption(\"labelsSeparateLines\");if(void 0===t.x){if(\"always\"!=e.getOption(\"legend\"))return\"\";a=\"\";for(var n=0;n<t.series.length;n++){var r=t.series[n];r.isVisible&&(\"\"!==a&&(a+=i?\"<br/>\":\" \"),a+=\"<span style='font-weight: bold; color: \"+r.color+\";'>\"+r.dashHTML+\" \"+r.labelHTML+\"</span>\")}return a}a=t.xHTML+\":\";for(var n=0;n<t.series.length;n++){var r=t.series[n];if(r.isVisible){i&&(a+=\"<br>\");a+=\"<span\"+(r.isHighlighted?' class=\"highlight\"':\"\")+\"> <b><span style='color: \"+r.color+\";'>\"+r.labelHTML+\"</span></b>: \"+r.yHTML+\"</span>\"}}return a},a.default=o,e.exports=a.default},{\"../dygraph-utils\":17}],25:[function(t,e,a){\"use strict\";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(a,\"__esModule\",{value:!0});var n=t(\"../dygraph-utils\"),r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(n),o=t(\"../dygraph-interaction-model\"),s=i(o),l=t(\"../iframe-tarp\"),h=i(l),u=function(){this.hasTouchInterface_=\"undefined\"!=typeof TouchEvent,this.isMobileDevice_=/mobile|android/gi.test(navigator.appVersion),this.interfaceCreated_=!1};u.prototype.toString=function(){return\"RangeSelector Plugin\"},u.prototype.activate=function(t){return this.dygraph_=t,this.getOption_(\"showRangeSelector\")&&this.createInterface_(),{layout:this.reserveSpace_,predraw:this.renderStaticLayer_,didDrawChart:this.renderInteractiveLayer_}},u.prototype.destroy=function(){this.bgcanvas_=null,this.fgcanvas_=null,this.leftZoomHandle_=null,this.rightZoomHandle_=null},u.prototype.getOption_=function(t,e){return this.dygraph_.getOption(t,e)},u.prototype.setDefaultOption_=function(t,e){this.dygraph_.attrs_[t]=e},u.prototype.createInterface_=function(){this.createCanvases_(),this.createZoomHandles_(),this.initInteraction_(),this.getOption_(\"animatedZooms\")&&(console.warn(\"Animated zooms and range selector are not compatible; disabling animatedZooms.\"),this.dygraph_.updateOptions({animatedZooms:!1},!0)),this.interfaceCreated_=!0,this.addToGraph_()},u.prototype.addToGraph_=function(){var t=this.graphDiv_=this.dygraph_.graphDiv;t.appendChild(this.bgcanvas_),t.appendChild(this.fgcanvas_),t.appendChild(this.leftZoomHandle_),t.appendChild(this.rightZoomHandle_)},u.prototype.removeFromGraph_=function(){var t=this.graphDiv_;t.removeChild(this.bgcanvas_),t.removeChild(this.fgcanvas_),t.removeChild(this.leftZoomHandle_),t.removeChild(this.rightZoomHandle_),this.graphDiv_=null},u.prototype.reserveSpace_=function(t){this.getOption_(\"showRangeSelector\")&&t.reserveSpaceBottom(this.getOption_(\"rangeSelectorHeight\")+4)},u.prototype.renderStaticLayer_=function(){this.updateVisibility_()&&(this.resize_(),this.drawStaticLayer_())},u.prototype.renderInteractiveLayer_=function(){this.updateVisibility_()&&!this.isChangingRange_&&(this.placeZoomHandles_(),this.drawInteractiveLayer_())},u.prototype.updateVisibility_=function(){var t=this.getOption_(\"showRangeSelector\");if(t)this.interfaceCreated_?this.graphDiv_&&this.graphDiv_.parentNode||this.addToGraph_():this.createInterface_();else if(this.graphDiv_){this.removeFromGraph_();var e=this.dygraph_;setTimeout(function(){e.width_=0,e.resize()},1)}return t},u.prototype.resize_=function(){function t(t,e,a,i){var n=i||r.getContextPixelRatio(e);t.style.top=a.y+\"px\",t.style.left=a.x+\"px\",t.width=a.w*n,t.height=a.h*n,t.style.width=a.w+\"px\",t.style.height=a.h+\"px\",1!=n&&e.scale(n,n)}var e=this.dygraph_.layout_.getPlotArea(),a=0;this.dygraph_.getOptionForAxis(\"drawAxis\",\"x\")&&(a=this.getOption_(\"xAxisHeight\")||this.getOption_(\"axisLabelFontSize\")+2*this.getOption_(\"axisTickSize\")),this.canvasRect_={x:e.x,y:e.y+e.h+a+4,w:e.w,h:this.getOption_(\"rangeSelectorHeight\")};var i=this.dygraph_.getNumericOption(\"pixelRatio\");t(this.bgcanvas_,this.bgcanvas_ctx_,this.canvasRect_,i),t(this.fgcanvas_,this.fgcanvas_ctx_,this.canvasRect_,i)},u.prototype.createCanvases_=function(){this.bgcanvas_=r.createCanvas(),this.bgcanvas_.className=\"dygraph-rangesel-bgcanvas\",this.bgcanvas_.style.position=\"absolute\",this.bgcanvas_.style.zIndex=9,this.bgcanvas_ctx_=r.getContext(this.bgcanvas_),this.fgcanvas_=r.createCanvas(),this.fgcanvas_.className=\"dygraph-rangesel-fgcanvas\",this.fgcanvas_.style.position=\"absolute\",this.fgcanvas_.style.zIndex=9,this.fgcanvas_.style.cursor=\"default\",this.fgcanvas_ctx_=r.getContext(this.fgcanvas_)},u.prototype.createZoomHandles_=function(){var t=new Image;t.className=\"dygraph-rangesel-zoomhandle\",t.style.position=\"absolute\",t.style.zIndex=10,t.style.visibility=\"hidden\",t.style.cursor=\"col-resize\",t.width=9,t.height=16,t.src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAAXNSR0IArs4c6QAAAAZiS0dEANAAzwDP4Z7KegAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9sHGw0cMqdt1UwAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaElEQVQoz+3SsRFAQBCF4Z9WJM8KCDVwownl6YXsTmCUsyKGkZzcl7zkz3YLkypgAnreFmDEpHkIwVOMfpdi9CEEN2nGpFdwD03yEqDtOgCaun7sqSTDH32I1pQA2Pb9sZecAxc5r3IAb21d6878xsAAAAAASUVORK5CYII=\",this.isMobileDevice_&&(t.width*=2,t.height*=2),this.leftZoomHandle_=t,this.rightZoomHandle_=t.cloneNode(!1)},u.prototype.initInteraction_=function(){var t,e,a,i,n,o,l,u,d,c,p,g,f,v,_=this,y=document,x=0,m=null,b=!1,w=!1,A=!this.isMobileDevice_,O=new h.default;t=function(t){var e=_.dygraph_.xAxisExtremes(),a=(e[1]-e[0])/_.canvasRect_.w;return[e[0]+(t.leftHandlePos-_.canvasRect_.x)*a,e[0]+(t.rightHandlePos-_.canvasRect_.x)*a]},e=function(t){return r.cancelEvent(t),b=!0,x=t.clientX,m=t.target?t.target:t.srcElement,\"mousedown\"!==t.type&&\"dragstart\"!==t.type||(r.addEvent(y,\"mousemove\",a),r.addEvent(y,\"mouseup\",i)),_.fgcanvas_.style.cursor=\"col-resize\",O.cover(),!0},a=function(t){if(!b)return!1;r.cancelEvent(t);var e=t.clientX-x;if(Math.abs(e)<4)return!0;x=t.clientX;var a,i=_.getZoomHandleStatus_();m==_.leftZoomHandle_?(a=i.leftHandlePos+e,a=Math.min(a,i.rightHandlePos-m.width-3),a=Math.max(a,_.canvasRect_.x)):(a=i.rightHandlePos+e,a=Math.min(a,_.canvasRect_.x+_.canvasRect_.w),a=Math.max(a,i.leftHandlePos+m.width+3));var o=m.width/2;return m.style.left=a-o+\"px\",_.drawInteractiveLayer_(),A&&n(),!0},i=function(t){return!!b&&(b=!1,O.uncover(),r.removeEvent(y,\"mousemove\",a),r.removeEvent(y,\"mouseup\",i),_.fgcanvas_.style.cursor=\"default\",A||n(),!0)},n=function(){try{var e=_.getZoomHandleStatus_();if(_.isChangingRange_=!0,e.isZoomed){var a=t(e);_.dygraph_.doZoomXDates_(a[0],a[1])}else _.dygraph_.resetZoom()}finally{_.isChangingRange_=!1}},o=function(t){var e=_.leftZoomHandle_.getBoundingClientRect(),a=e.left+e.width/2;e=_.rightZoomHandle_.getBoundingClientRect();var i=e.left+e.width/2;return t.clientX>a&&t.clientX<i},l=function(t){return!(w||!o(t)||!_.getZoomHandleStatus_().isZoomed)&&(r.cancelEvent(t),w=!0,x=t.clientX,\"mousedown\"===t.type&&(r.addEvent(y,\"mousemove\",u),r.addEvent(y,\"mouseup\",d)),!0)},u=function(t){if(!w)return!1;r.cancelEvent(t);var e=t.clientX-x;if(Math.abs(e)<4)return!0;x=t.clientX;var a=_.getZoomHandleStatus_(),i=a.leftHandlePos,n=a.rightHandlePos,o=n-i;i+e<=_.canvasRect_.x?(i=_.canvasRect_.x,n=i+o):n+e>=_.canvasRect_.x+_.canvasRect_.w?(n=_.canvasRect_.x+_.canvasRect_.w,i=n-o):(i+=e,n+=e);var s=_.leftZoomHandle_.width/2;return _.leftZoomHandle_.style.left=i-s+\"px\",_.rightZoomHandle_.style.left=n-s+\"px\",_.drawInteractiveLayer_(),A&&c(),!0},d=function(t){return!!w&&(w=!1,r.removeEvent(y,\"mousemove\",u),r.removeEvent(y,\"mouseup\",d),A||c(),!0)},c=function(){try{_.isChangingRange_=!0,_.dygraph_.dateWindow_=t(_.getZoomHandleStatus_()),_.dygraph_.drawGraph_(!1)}finally{_.isChangingRange_=!1}},p=function(t){if(!b&&!w){var e=o(t)?\"move\":\"default\";e!=_.fgcanvas_.style.cursor&&(_.fgcanvas_.style.cursor=e)}},g=function(t){\"touchstart\"==t.type&&1==t.targetTouches.length?e(t.targetTouches[0])&&r.cancelEvent(t):\"touchmove\"==t.type&&1==t.targetTouches.length?a(t.targetTouches[0])&&r.cancelEvent(t):i(t)},f=function(t){\"touchstart\"==t.type&&1==t.targetTouches.length?l(t.targetTouches[0])&&r.cancelEvent(t):\"touchmove\"==t.type&&1==t.targetTouches.length?u(t.targetTouches[0])&&r.cancelEvent(t):d(t)},v=function(t,e){for(var a=[\"touchstart\",\"touchend\",\"touchmove\",\"touchcancel\"],i=0;i<a.length;i++)_.dygraph_.addAndTrackEvent(t,a[i],e)},this.setDefaultOption_(\"interactionModel\",s.default.dragIsPanInteractionModel),this.setDefaultOption_(\"panEdgeFraction\",1e-4);var D=window.opera?\"mousedown\":\"dragstart\";this.dygraph_.addAndTrackEvent(this.leftZoomHandle_,D,e),this.dygraph_.addAndTrackEvent(this.rightZoomHandle_,D,e),this.dygraph_.addAndTrackEvent(this.fgcanvas_,\"mousedown\",l),this.dygraph_.addAndTrackEvent(this.fgcanvas_,\"mousemove\",p),this.hasTouchInterface_&&(v(this.leftZoomHandle_,g),v(this.rightZoomHandle_,g),v(this.fgcanvas_,f))},u.prototype.drawStaticLayer_=function(){var t=this.bgcanvas_ctx_;t.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);try{this.drawMiniPlot_()}catch(t){console.warn(t)}this.bgcanvas_ctx_.lineWidth=this.getOption_(\"rangeSelectorBackgroundLineWidth\"),t.strokeStyle=this.getOption_(\"rangeSelectorBackgroundStrokeColor\"),t.beginPath(),t.moveTo(.5,.5),t.lineTo(.5,this.canvasRect_.h-.5),t.lineTo(this.canvasRect_.w-.5,this.canvasRect_.h-.5),t.lineTo(this.canvasRect_.w-.5,.5),t.stroke()},u.prototype.drawMiniPlot_=function(){var t=this.getOption_(\"rangeSelectorPlotFillColor\"),e=this.getOption_(\"rangeSelectorPlotFillGradientColor\"),a=this.getOption_(\"rangeSelectorPlotStrokeColor\");if(t||a){var i=this.getOption_(\"stepPlot\"),n=this.computeCombinedSeriesAndLimits_(),r=n.yMax-n.yMin,o=this.bgcanvas_ctx_,s=this.dygraph_.xAxisExtremes(),l=Math.max(s[1]-s[0],1e-30),h=(this.canvasRect_.w-.5)/l,u=(this.canvasRect_.h-.5)/r,d=this.canvasRect_.w-.5,c=this.canvasRect_.h-.5,p=null,g=null;o.beginPath(),o.moveTo(.5,c);for(var f=0;f<n.data.length;f++){var v=n.data[f],_=null!==v[0]?(v[0]-s[0])*h:NaN,y=null!==v[1]?c-(v[1]-n.yMin)*u:NaN;(i||null===p||Math.round(_)!=Math.round(p))&&(isFinite(_)&&isFinite(y)?(null===p?o.lineTo(_,c):i&&o.lineTo(_,g),o.lineTo(_,y),p=_,g=y):(null!==p&&(i?(o.lineTo(_,g),o.lineTo(_,c)):o.lineTo(p,c)),p=g=null))}if(o.lineTo(d,c),o.closePath(),t){var x=this.bgcanvas_ctx_.createLinearGradient(0,0,0,c);e&&x.addColorStop(0,e),x.addColorStop(1,t),this.bgcanvas_ctx_.fillStyle=x,o.fill()}a&&(this.bgcanvas_ctx_.strokeStyle=a,this.bgcanvas_ctx_.lineWidth=this.getOption_(\"rangeSelectorPlotLineWidth\"),o.stroke())}},u.prototype.computeCombinedSeriesAndLimits_=function(){var t,e=this.dygraph_,a=this.getOption_(\"logscale\"),i=e.numColumns(),n=e.getLabels(),o=new Array(i),s=!1,l=e.visibility(),h=[];for(t=1;t<i;t++){var u=this.getOption_(\"showInRangeSelector\",n[t]);h.push(u),null!==u&&(s=!0)}if(s)for(t=1;t<i;t++)o[t]=h[t-1];else for(t=1;t<i;t++)o[t]=l[t-1];var d=[],c=e.dataHandler_,p=e.attributes_;for(t=1;t<e.numColumns();t++)if(o[t]){var g=c.extractSeries(e.rawData_,t,p);e.rollPeriod()>1&&(g=c.rollingAverage(g,e.rollPeriod(),p)),d.push(g)}var f=[];for(t=0;t<d[0].length;t++){for(var v=0,_=0,y=0;y<d.length;y++){var x=d[y][t][1];null===x||isNaN(x)||(_++,v+=x)}f.push([d[0][t][0],v/_])}var m=Number.MAX_VALUE,b=-Number.MAX_VALUE;for(t=0;t<f.length;t++){var w=f[t][1];null!==w&&isFinite(w)&&(!a||w>0)&&(m=Math.min(m,w),b=Math.max(b,w))}if(a)for(b=r.log10(b),b+=.25*b,m=r.log10(m),t=0;t<f.length;t++)f[t][1]=r.log10(f[t][1]);else{var A,O=b-m;A=O<=Number.MIN_VALUE?.25*b:.25*O,b+=A,m-=A}return{data:f,yMin:m,yMax:b}},u.prototype.placeZoomHandles_=function(){var t=this.dygraph_.xAxisExtremes(),e=this.dygraph_.xAxisRange(),a=t[1]-t[0],i=Math.max(0,(e[0]-t[0])/a),n=Math.max(0,(t[1]-e[1])/a),r=this.canvasRect_.x+this.canvasRect_.w*i,o=this.canvasRect_.x+this.canvasRect_.w*(1-n),s=Math.max(this.canvasRect_.y,this.canvasRect_.y+(this.canvasRect_.h-this.leftZoomHandle_.height)/2),l=this.leftZoomHandle_.width/2;this.leftZoomHandle_.style.left=r-l+\"px\",this.leftZoomHandle_.style.top=s+\"px\",this.rightZoomHandle_.style.left=o-l+\"px\",this.rightZoomHandle_.style.top=this.leftZoomHandle_.style.top,this.leftZoomHandle_.style.visibility=\"visible\",this.rightZoomHandle_.style.visibility=\"visible\"},u.prototype.drawInteractiveLayer_=function(){var t=this.fgcanvas_ctx_;t.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);var e=this.canvasRect_.w-1,a=this.canvasRect_.h-1,i=this.getZoomHandleStatus_();if(t.strokeStyle=this.getOption_(\"rangeSelectorForegroundStrokeColor\"),t.lineWidth=this.getOption_(\"rangeSelectorForegroundLineWidth\"),i.isZoomed){var n=Math.max(1,i.leftHandlePos-this.canvasRect_.x),r=Math.min(e,i.rightHandlePos-this.canvasRect_.x);t.fillStyle=\"rgba(240, 240, 240, \"+this.getOption_(\"rangeSelectorAlpha\").toString()+\")\",t.fillRect(0,0,n,this.canvasRect_.h),t.fillRect(r,0,this.canvasRect_.w-r,this.canvasRect_.h),t.beginPath(),t.moveTo(1,1),t.lineTo(n,1),t.lineTo(n,a),t.lineTo(r,a),t.lineTo(r,1),t.lineTo(e,1),t.stroke()}else t.beginPath(),t.moveTo(1,1),t.lineTo(1,a),t.lineTo(e,a),t.lineTo(e,1),t.stroke()},u.prototype.getZoomHandleStatus_=function(){var t=this.leftZoomHandle_.width/2,e=parseFloat(this.leftZoomHandle_.style.left)+t,a=parseFloat(this.rightZoomHandle_.style.left)+t;return{leftHandlePos:e,rightHandlePos:a,isZoomed:e-1>this.canvasRect_.x||a+1<this.canvasRect_.x+this.canvasRect_.w}},a.default=u,e.exports=a.default},{\"../dygraph-interaction-model\":12,\"../dygraph-utils\":17,\"../iframe-tarp\":19}]},{},[18])(18)});\n//# sourceMappingURL=dist/dygraph.min.js.map\n","import { ChartData, ChartMetadata } from \"../chart-types\"\nimport { seconds4human } from \"./seconds4human\"\n\nexport const LEGEND_BOTTOM_SINGLE_LINE_HEIGHT = 80\n\nexport const legendPluginModuleString = (withContext: boolean, chartMetadata: ChartMetadata) => {\n let str = \" \"\n let context = \"\"\n\n if (withContext && typeof chartMetadata.context === \"string\") {\n // eslint-disable-next-line prefer-destructuring\n context = chartMetadata.context\n }\n\n if (typeof chartMetadata.plugin === \"string\" && chartMetadata.plugin !== \"\") {\n str = chartMetadata.plugin\n\n if (str.endsWith(\".plugin\")) {\n str = str.substring(0, str.length - 7)\n }\n\n if (typeof chartMetadata.module === \"string\" && chartMetadata.module !== \"\") {\n str += `:${chartMetadata.module}`\n }\n\n if (withContext && context !== \"\") {\n str += `, ${context}`\n }\n } else if (withContext && context !== \"\") {\n str = context\n }\n return str\n}\n\nexport const legendResolutionTooltip = (chartData: ChartData, chartMetadata: ChartMetadata) => {\n const collected = chartMetadata.update_every\n // todo if there's no data (but maybe there won't be situation like this), then use \"collected\"\n const viewed = chartData.view_update_every\n if (collected === viewed) {\n return `resolution ${seconds4human(collected)}`\n }\n\n return `resolution ${seconds4human(viewed)}, collected every ${seconds4human(collected)}`\n}\n\ntype GetNewSelectedDimensions = (arg: {\n allDimensions: string[],\n selectedDimensions: string[],\n clickedDimensionName: string,\n isModifierKeyPressed: boolean,\n}) => string[]\n\nexport const getNewSelectedDimensions: GetNewSelectedDimensions = ({\n allDimensions,\n selectedDimensions,\n clickedDimensionName,\n isModifierKeyPressed,\n}) => {\n // when selectedDimensions is empty, then all dimensions should be enabled\n // let's narrow this case now\n const enabledDimensions = selectedDimensions.length === 0 ? allDimensions : selectedDimensions\n const isCurrentlySelected = enabledDimensions.includes(clickedDimensionName)\n\n let newSelectedDimensions: string[]\n if (!isModifierKeyPressed\n && ((isCurrentlySelected && enabledDimensions.length > 1) || !isCurrentlySelected)\n ) {\n newSelectedDimensions = [clickedDimensionName]\n } else if (isCurrentlySelected) { // modifier key pressed\n newSelectedDimensions = enabledDimensions.filter(\n (dimension) => dimension !== clickedDimensionName,\n )\n } else { // modifier key pressed\n newSelectedDimensions = enabledDimensions.concat(clickedDimensionName)\n }\n\n if (newSelectedDimensions.length === allDimensions.length) {\n return []\n }\n return newSelectedDimensions\n}\n","import { createReducer } from \"redux-act\"\n\nimport { ChartsMetadata } from \"domains/global/types\"\n\nimport { startSnapshotModeAction, stopSnapshotModeAction, isSignedInAction, setOfflineAction } from \"./actions\"\n\nexport type StateT = {\n isSnapshotMode: boolean\n snapshotCharts: ChartsMetadata | null\n snapshotDataPoints: number | null\n isSignedIn: boolean\n offline: boolean\n}\n\nexport const initialState: StateT = {\n isSnapshotMode: false,\n snapshotCharts: null,\n snapshotDataPoints: null,\n isSignedIn: false,\n offline: false\n}\n\nexport const dashboardReducer = createReducer<StateT>({}, initialState)\n\ndashboardReducer.on(startSnapshotModeAction, (state, { charts, dataPoints }) => ({\n ...state,\n snapshotCharts: charts, // todo integrate with /charts result\n snapshotDataPoints: dataPoints,\n isSnapshotMode: true,\n}))\n\ndashboardReducer.on(stopSnapshotModeAction, (state) => ({\n ...state,\n isSnapshotMode: initialState.isSnapshotMode,\n snapshotCharts: initialState.snapshotCharts,\n snapshotDataPoints: initialState.snapshotDataPoints,\n}))\n\ndashboardReducer.on(isSignedInAction, (state, { isSignedIn }) => ({\n ...state,\n isSignedIn\n}))\n\ndashboardReducer.on(setOfflineAction, (state, { offline }) => ({\n ...state,\n offline\n}))\n","import { combineReducers } from \"redux\"\n\nimport { globalReducer } from \"domains/global/reducer\"\nimport { storeKey as globalKey } from \"domains/global/constants\"\n\nimport { chartReducer } from \"domains/chart/reducer\"\nimport { storeKey as chartKey } from \"domains/chart/constants\"\n\nimport { dashboardReducer } from \"domains/dashboard/reducer\"\nimport { storeKey as dashboardKey } from \"domains/dashboard/constants\"\n\nexport default combineReducers({\n [globalKey]: globalReducer,\n [chartKey]: chartReducer,\n\n // todo lazy-load and inject those reducers, when they are not needed (dashboard.js, cloud)\n [dashboardKey]: dashboardReducer,\n})\n","import axios from \"axios\"\n\nexport const axiosInstance = axios.create({\n headers: {\n \"Cache-Control\": \"no-cache, no-store\",\n Pragma: \"no-cache\",\n },\n withCredentials: true,\n})\n","import axios from \"axios\"\n\nexport const axiosInstance = axios.create({\n // timeout: 30 * 1000, // todo\n headers: {\n \"Cache-Control\": \"no-cache, no-store\",\n Pragma: \"no-cache\",\n },\n withCredentials: true,\n})\n","import {\n Subject, from, empty,\n} from \"rxjs\"\nimport {\n mergeMap, tap, catchError, startWith, switchMap,\n} from \"rxjs/operators\"\nimport { CancelTokenSource, Method } from \"axios\"\n\nimport { UnknownStringKeyT } from \"types/common\"\n\nimport { axiosInstance } from \"./axios-instance\"\n\nexport const CHART_UNMOUNTED = \"Chart scrolled out of view\"\n\ninterface FetchInputEvent {\n url: string\n method?: Method\n params?: UnknownStringKeyT\n data?: UnknownStringKeyT\n onErrorCallback: (error: Error) => void\n onSuccessCallback: (data: { [key: string]: unknown }) => void\n cancelTokenSource?: CancelTokenSource\n}\n\nconst METRICS_TIMEOUT = 15_000\n\nexport const getFetchStream = (concurrentCallsLimit: number) => {\n const fetch$ = new Subject<FetchInputEvent>()\n const resetFetch$ = new Subject()\n\n const handler = mergeMap(({\n url, method = \"GET\", params = {}, data, onErrorCallback, onSuccessCallback, cancelTokenSource,\n }: FetchInputEvent) => (\n from(axiosInstance.request({\n url,\n method,\n params,\n data,\n timeout: METRICS_TIMEOUT,\n cancelToken: cancelTokenSource?.token,\n })).pipe(\n tap(({ data: responseData }) => { onSuccessCallback(responseData) }),\n catchError((error: Error) => {\n // todo implement error handling to support NETDATA.options.current.retries_on_data_failures\n if (error?.message !== CHART_UNMOUNTED) {\n console.warn(\"fetch error\", url) // eslint-disable-line no-console\n }\n onErrorCallback(error)\n return empty()\n }),\n )\n ), concurrentCallsLimit)\n\n const output = resetFetch$.pipe(\n startWith(null),\n switchMap(() => fetch$.pipe(handler)),\n )\n\n output.subscribe()\n return [fetch$, resetFetch$]\n}\n","import { tail, sum, reverse } from \"ramda\"\nimport { ChartData, DygraphData } from \"domains/chart/chart-types\"\n\n/*\nwhen requesting for bigger time interval than available history in the agent,\nwe get only the available range. Dashboard was first designed to not allow zooming-out too much.\nBut we want to show the requested time-range, so to do it consistently, we return nr of points\nwhen making the request, and after getting result, we add `null`s at the beginning\n */\n\ninterface GetCorrectedPointsArg {\n after: number\n before: number\n firstEntry: number\n points: number\n}\nexport const getCorrectedPoints = ({\n after,\n before,\n firstEntry,\n points,\n}: GetCorrectedPointsArg) => {\n const nowInSeconds = Math.round(new Date().valueOf() / 1000)\n const afterAbsolute = after > 0 ? after : nowInSeconds + after\n const beforeAbsolute = before > 0 ? before : nowInSeconds + before\n\n if (afterAbsolute < firstEntry) {\n // take into account first_entry\n const realAfter = Math.max(afterAbsolute, firstEntry)\n const requestedRange = beforeAbsolute - afterAbsolute\n const availableRange = beforeAbsolute - realAfter\n\n return Math.round((points * availableRange) / requestedRange)\n }\n return null\n}\n\nexport const addPointsDygraph = (data: DygraphData, nrOfPointsToFill: number) => {\n const viewUpdateEvery = data.view_update_every\n if (!data.result.data.length) {\n return data\n }\n const firstAddedTimestamp = data.result.data[0][0] - nrOfPointsToFill * viewUpdateEvery\n const emptyPoint = tail(data.result.labels).map(() => null)\n const nulls = new Array(nrOfPointsToFill)\n .fill(null)\n .map((_, i) => [firstAddedTimestamp + i * viewUpdateEvery, ...emptyPoint])\n return {\n ...data,\n after: data.after - viewUpdateEvery * nrOfPointsToFill,\n result: {\n ...data.result,\n data: nulls.concat(data.result.data),\n },\n }\n}\n\nexport const fillMissingData = (data: ChartData, nrOfPointsToFill: number) => {\n if (data.format === \"json\") {\n return addPointsDygraph(data as DygraphData, nrOfPointsToFill)\n }\n return data\n}\n\nconst emptyArray: number[] = []\nexport const transformResults = (data: ChartData, format: string, shouldRevertFlip: boolean) => {\n if (format === \"array\" && data.format === \"json\") {\n if (Array.isArray(data.result)) return data\n\n const dataResult = shouldRevertFlip\n ? reverse((data as DygraphData).result.data)\n : (data as DygraphData).result.data\n return {\n ...data,\n // set proper output type so other functions like fillMissingData work properly\n format: \"array\",\n result: dataResult.reduce((acc: number[], pointData: number[]) => {\n pointData.shift()\n return [...acc, sum(pointData)]\n }, emptyArray),\n }\n }\n return data\n}\n\nexport const mapDefaultAggrMethod = (unit: string): string => {\n if (unit.length === 0) {\n return \"sum\"\n }\n const avgUnits: any = {\n percentage: true,\n percent: true,\n \"rotations/min\": true,\n ratio: true,\n seconds: true,\n \"seconds ago\": true,\n milliseconds: true,\n millisec: true,\n ms: true,\n \"log2 s\": true,\n minutes: true,\n hours: true,\n interval: true,\n ticks: true,\n celsius: true,\n c: true,\n mhz: true,\n hz: true,\n volts: true,\n kwh: true,\n ampere: true,\n amps: true,\n dbm: true,\n value: true,\n stratum: true,\n units: true,\n watt: true,\n temperature: true,\n \"random number\": true,\n rpm: true,\n quadro: true,\n \"adv/item\": true,\n multiplier: true,\n geforce: true,\n }\n if (avgUnits[unit.toLowerCase()]) {\n return \"avg\"\n }\n const avgUnitsRegExes: any = [\".*%.*\", \".*/operation\", \".*/run\", \".*/ run\", \".*/request\"]\n if (\n avgUnitsRegExes.some((regEx: string) => {\n const regExpression = RegExp(regEx, \"i\")\n return regExpression.test(unit.toLowerCase())\n })\n ) {\n return \"avg\"\n }\n return \"sum\"\n}\n","import styled from \"styled-components\"\nimport {\n getSizeBy, Text, TextSmall, getColor,\n} from \"@netdata/netdata-ui\"\n\nexport const Container = styled.div`\n width: 100%;\n height: 100%;\n min-height: ${getSizeBy(10)};\n display: flex;\n flex-flow: row nowrap;\n padding: ${getSizeBy(2)} ${getSizeBy(2)} ${getSizeBy(2)} ${getSizeBy(2)};\n`\n\nexport const SideContent = styled.div<{ right?: boolean }>`\n flex-grow: 0;\n flex-shrink: 0;\n height: 100%;\n align-self: stretch;\n`\n\nexport const ContentContainer = styled.div``\n\nexport const HeaderText = styled(Text)<{ error?: boolean; success?: boolean }>`\n color: ${({ error, success }) => (success && getColor(\"success\"))\n || (error && getColor(\"error\"))};\n font-weight: bold;\n display: block;\n margin-bottom: ${getSizeBy()};\n`\n\nexport const ContentText = styled(TextSmall)<{ error?: boolean; success?: boolean }>`\n display: block;\n color: ${({ error }) => (error && getColor(\"error\")) || getColor(\"border\")};\n`\n","import React from \"react\"\nimport {\n Container, SideContent, ContentContainer, HeaderText, ContentText,\n} from \"./styled\"\n\ninterface NotificationProps {\n header?: string\n leftContent?: React.ReactNode\n rightContent?: React.ReactNode\n text?: React.ReactNode\n className?: string\n renderContent?: (props: NotificationProps) => React.ReactNode | React.ReactNodeArray | null\n success?: boolean\n error?: boolean\n}\n\nexport const UINotification = (props: NotificationProps) => {\n const {\n header, text, leftContent, rightContent, renderContent, success, error,\n } = props\n return (\n <Container>\n {leftContent && <SideContent>{leftContent}</SideContent>}\n <ContentContainer>\n {header && (\n <HeaderText success={success} error={error}>\n {header}\n </HeaderText>\n )}\n {text && (\n <ContentText success={success} error={error}>\n {text}\n </ContentText>\n )}\n {renderContent && renderContent(props)}\n </ContentContainer>\n {rightContent && <SideContent right>{rightContent}</SideContent>}\n </Container>\n )\n}\n\n// for usage in non-jsx contexts\n// eslint-disable-next-line react/jsx-props-no-spreading\nexport const createUINotification = (props: NotificationProps) => <UINotification {...props} />\n","import styled from \"styled-components\"\nimport { getSizeBy } from \"@netdata/netdata-ui\"\n\nexport const NodeIconContainer = styled.div`\n width: ${getSizeBy(5)};\n height: ${getSizeBy(5)};\n margin-right: ${getSizeBy(2)};\n display: flex;\n justify-content: center;\n align-items: center;\n`\n\nexport const NotificationLink = styled.a`\n &,\n &:hover {\n text-decoration: underline;\n color: inherit;\n }\n`\n","import React from \"react\"\nimport { Icon } from \"@netdata/netdata-ui\"\nimport { toast } from \"react-toastify\"\n\nimport { createUINotification } from \"components/ui-notification\"\n\nimport * as S from \"./styled\"\n\nexport const toastOptions = {\n position: toast.POSITION.BOTTOM_RIGHT,\n autoClose: 10000,\n pauseOnFocusLoss: false,\n}\n\nexport const showCloudInstallationProblemNotification = () => {\n const uiNotification = {\n header: \"Installation error\",\n text: \"The installer could not prepare the required dependencies to enable Netdata Cloud\"\n + \" functionality\",\n }\n const notificationComponent = createUINotification({\n ...uiNotification,\n error: true,\n leftContent: (\n <S.NodeIconContainer>\n <Icon name=\"gear\" size=\"large\" color=\"error\" />\n </S.NodeIconContainer>\n ),\n })\n toast.error(notificationComponent, toastOptions)\n}\n\nexport const showCloudConnectionProblemNotification = () => {\n const uiNotification = {\n header: \"Connection Problem\",\n text: (\n <S.NotificationLink\n href=\"https://learn.netdata.cloud/docs/agent/packaging/installer#automatic-one-line-installation-script\"\n target=\"_blank\"\n >\n To access Cloud install again your agent via the kickstart script\n </S.NotificationLink>\n ),\n }\n const notificationComponent = createUINotification({\n ...uiNotification,\n error: true,\n leftContent: (\n <S.NodeIconContainer>\n <Icon name=\"gear\" size=\"large\" color=\"error\" />\n </S.NodeIconContainer>\n ),\n })\n toast.error(notificationComponent, toastOptions)\n}\n","import {\n mergeAll, pipe, split, mergeRight,\n} from \"ramda\"\nimport { mapIndexed } from \"ramda-adjunct\"\n\nconst defaultUrlOptions = {\n hash: \"#\",\n theme: null,\n help: null,\n mode: \"live\", // 'live', 'print'\n update_always: false,\n pan_and_zoom: false,\n server: null,\n after: 0,\n before: 0,\n highlight: false,\n highlight_after: 0,\n highlight_before: 0,\n nowelcome: false,\n show_alarms: false,\n chart: null,\n family: null,\n alarm: null,\n alarm_unique_id: 0,\n alarm_id: 0,\n alarm_event_id: 0,\n alarm_when: 0,\n} as {[key: string]: unknown}\n\nconst isInvalidPair = ([key, value]: [string, string]) => (\n defaultUrlOptions[key] === undefined || value === undefined\n)\n\nconst parseQueryPair = ([key, value]: [string, string]): {[key: string] : unknown} => {\n if (isInvalidPair([key, value])) {\n return {}\n }\n return {\n [key]: decodeURIComponent(value),\n }\n}\n\nexport const parseUrl = pipe(\n split(\";\"),\n mapIndexed((value, index) => (\n (index === 0) ? { hash: value } : parseQueryPair((value.split(\"=\") as [string, string]))\n )),\n mergeAll,\n mergeRight(defaultUrlOptions),\n)\n\nconst urlParsed = parseUrl(document.location.hash)\n\nexport const isPrintMode = urlParsed.mode === \"print\"\n","import {\n call,\n put,\n takeEvery,\n select,\n spawn,\n take,\n delay,\n} from \"redux-saga/effects\"\nimport { channel } from \"redux-saga\"\nimport { Action } from \"redux-act\"\n\nimport { axiosInstance } from \"utils/api\"\nimport { alwaysEndWithSlash, serverDefault } from \"utils/server-detection\"\nimport { getFetchStream } from \"utils/netdata-sdk\"\nimport { isMainJs } from \"utils/env\"\nimport { fillMissingData, transformResults } from \"utils/fill-missing-data\"\nimport {\n showCloudInstallationProblemNotification, showCloudConnectionProblemNotification,\n} from \"components/notifications\"\nimport { selectGlobalPanAndZoom, selectSnapshot, selectRegistry } from \"domains/global/selectors\"\nimport { StateT as GlobalStateT } from \"domains/global/reducer\"\nimport { stopSnapshotModeAction } from \"domains/dashboard/actions\"\nimport { isPrintMode } from \"domains/dashboard/utils/parse-url\"\nimport { INFO_POLLING_FREQUENCY } from \"domains/global/constants\"\n\nimport {\n fetchDataAction,\n FetchDataPayload,\n fetchChartAction,\n FetchChartPayload,\n fetchDataForSnapshotAction,\n FetchDataForSnapshotPayload,\n fetchInfoAction,\n FetchInfoPayload,\n fetchDataCancelAction,\n} from \"./actions\"\nimport { ChartData } from \"./chart-types\"\n\nconst CONCURRENT_CALLS_LIMIT_METRICS = isMainJs ? 30 : 60\nconst CONCURRENT_CALLS_LIMIT_PRINT = 2\nconst CONCURRENT_CALLS_LIMIT_SNAPSHOTS = 1\n\nconst fetchDataResponseChannel = channel()\n\nexport function* watchFetchDataResponseChannel() {\n while (true) {\n const action = (yield take(fetchDataResponseChannel))\n\n // special case - if requested relative timeRange, and during request the mode has been changed\n // to absolute global-pan-and-zoom, cancel the store update\n // todo do xss check of data\n if (action.type === fetchDataAction.success.toString()) {\n const payload = (action.payload as FetchDataPayload)\n const { viewRange } = payload.fetchDataParams\n const [start, end] = viewRange\n const globalPanAndZoom = (yield select(\n selectGlobalPanAndZoom,\n )) as GlobalStateT[\"globalPanAndZoom\"]\n\n if (globalPanAndZoom\n && (start <= 0 || end <= 0) // check if they are not timestamps\n ) {\n yield put(fetchDataCancelAction({\n id: payload.id,\n }))\n // eslint-disable-next-line no-continue\n continue\n }\n }\n\n yield put(action)\n }\n}\n\n// todo construct a new version of key that will be safer to be used in future\n// (while keeping old key supported for some time)\n// perhaps the key could be passed as attribute to the chart, to avoid matching\nconst constructCompatibleKey = (dimensions: undefined | string, options: string) => (\n // strange transformations for backwards compatibility. old snapshot keys were encoded this way\n // that empty dimensions were actually \"null\" string\n `${dimensions === undefined\n ? \"null\"\n : encodeURIComponent(dimensions)\n },${encodeURIComponent(options)}`\n)\n\n// currently BE always transforms data as if `flip` was there\nconst IS_FLIP_RESPECTED_IN_COMPOSITE_CHARTS = false\n\nconst getGroupByValues = (groupBy) => {\n if (groupBy === \"chart\") return \"node\"\n if (groupBy === \"node\" || groupBy === \"dimension\") return groupBy\n return `label=${groupBy}`\n}\n\nconst [fetchMetrics$] = getFetchStream(\n isPrintMode ? CONCURRENT_CALLS_LIMIT_PRINT : CONCURRENT_CALLS_LIMIT_METRICS,\n)\nfunction* fetchDataSaga({ payload }: Action<FetchDataPayload>) {\n const {\n // props for api\n host, context, chart, format, points, group, gtime, options,\n after, before, dimensions, labels, postGroupBy, postAggregationMethod,\n aggrMethod, dimensionsAggrMethod, nodeIDs, httpMethod,\n groupBy = \"dimension\", // group by node, dimension, or label keys\n aggrGroups = [],\n // props for the store\n fetchDataParams, id, cancelTokenSource,\n } = payload\n\n const snapshot = yield select(selectSnapshot)\n if (snapshot) {\n // if reading snapshot\n const dimensionsWithUrlOptions = constructCompatibleKey(dimensions, options)\n const matchingKey = Object.keys(snapshot.data).find((snapshotKey) => (\n snapshotKey.startsWith(chart) && snapshotKey.includes(dimensionsWithUrlOptions)\n ))\n if (!matchingKey) {\n // eslint-disable-next-line no-console\n console.warn(`Could not find snapshot key for chart: ${chart} and id ${id}`)\n return\n }\n const data = snapshot.data[matchingKey]\n yield put(fetchDataAction.success({\n chartData: data,\n fetchDataParams,\n id,\n }))\n return\n }\n\n const url = isMainJs\n ? `${alwaysEndWithSlash(host)}api/v1/data`\n : host\n\n const agentOptionsOriginal = options.split(\"|\")\n const hasFlip = agentOptionsOriginal.includes(\"flip\")\n const shouldAddFakeFlip = !IS_FLIP_RESPECTED_IN_COMPOSITE_CHARTS && !hasFlip\n // if flip is not respected in composite-charts, send it always (like dygraph charts normally do)\n const agentOptions = shouldAddFakeFlip\n ? agentOptionsOriginal.concat(\"flip\") : agentOptionsOriginal\n\n const groupValues = [\n getGroupByValues(groupBy),\n postGroupBy && `label=${postGroupBy}`,\n ].filter(Boolean)\n\n const axiosOptions = httpMethod === \"POST\" ? {\n // used by cloud's room-overview\n data: {\n filter: {\n nodeIDs,\n context,\n dimensions: dimensions ? dimensions.split(/['|]/) : undefined,\n labels,\n },\n after,\n before,\n points,\n group,\n gtime,\n agent_options: agentOptions,\n ...(postAggregationMethod && { post_aggregation_methods: [postAggregationMethod] }),\n aggregations: [groupBy !== \"dimension\" && {\n method: dimensionsAggrMethod || \"sum\",\n groupBy: [\"chart\", ...groupValues],\n },\n groupBy !== \"chart\" && {\n method: aggrMethod,\n groupBy: groupValues,\n ...(aggrGroups.length && { labels: aggrGroups }),\n }].filter(Boolean),\n },\n } : {\n params: {\n chart,\n _: new Date().valueOf(),\n format,\n points,\n group,\n gtime,\n options,\n after,\n before,\n dimensions,\n },\n }\n\n const onSuccessCallback = (data: { [id: string]: unknown}) => {\n if (!data?.result) {\n fetchDataResponseChannel.put(fetchDataAction.failure({ id }))\n } else {\n const { fillMissingPoints } = fetchDataParams\n\n const transformedResults = transformResults(\n (data as unknown) as ChartData,\n format,\n shouldAddFakeFlip,\n )\n\n const chartData = {\n ...transformedResults,\n // @ts-ignore\n ...((\"post_aggregated_data\" in data.result) && {\n postAggregationMethod,\n groupBy,\n postGroupBy,\n aggrGroups,\n // @ts-ignore\n postAggregated: data.result.post_aggregated_data[postAggregationMethod],\n }),\n }\n\n fetchDataResponseChannel.put(fetchDataAction.success({\n chartData: fillMissingPoints\n ? fillMissingData(chartData as ChartData, fillMissingPoints)\n : chartData,\n fetchDataParams,\n id,\n }))\n }\n }\n\n const onErrorCallback = (error: Error) => {\n console.warn(\"fetch chart data failure\", error) // eslint-disable-line no-console\n fetchDataResponseChannel.put(fetchDataAction.failure({ id }))\n }\n\n fetchMetrics$.next({\n ...axiosOptions,\n method: httpMethod || \"GET\",\n url,\n onErrorCallback,\n onSuccessCallback,\n cancelTokenSource,\n })\n}\n\nconst [fetchForSnapshot$, resetFetchForSnapshot$] = getFetchStream(CONCURRENT_CALLS_LIMIT_SNAPSHOTS)\nfunction fetchDataForSnapshotSaga({ payload }: Action<FetchDataForSnapshotPayload>) {\n const {\n host, chart, format, points, group, gtime, options,\n after, before, dimensions, aggrMethod,\n groupBy,\n nodeIDs,\n chartLibrary, id,\n } = payload\n\n // backwards-compatibility, the keys look like this:\n // net_errors.stf0,dygraph,null,ms%7Cflip%7Cjsonwrap%7Cnonzero\n const chartDataUniqueID = `${chart},${chartLibrary},${constructCompatibleKey(\n dimensions,\n options,\n )}`\n\n const url = `${alwaysEndWithSlash(host)}api/v1/data`\n const params = {\n chart,\n _: new Date().valueOf(),\n format,\n points,\n group,\n gtime,\n options,\n after,\n before,\n dimensions,\n ...(aggrMethod && { aggr_method: aggrMethod }),\n ...(nodeIDs && { node_ids: nodeIDs.join(\",\") }),\n ...(groupBy && { groupBy }),\n }\n\n const onSuccessCallback = (data: unknown) => {\n fetchDataResponseChannel.put(fetchDataForSnapshotAction.success({\n snapshotData: data,\n id,\n }))\n // temporarily, until main.js finished rewrite\n // @ts-ignore\n window.chartUpdated({\n chartDataUniqueID,\n data,\n })\n }\n\n const onErrorCallback = () => {\n fetchDataResponseChannel.put(fetchDataForSnapshotAction.failure({ id }))\n // @ts-ignore\n window.chartUpdated({\n chartDataUniqueID,\n chart,\n data: null,\n })\n }\n\n fetchForSnapshot$.next({\n url,\n params,\n onErrorCallback,\n onSuccessCallback,\n })\n}\n\nfunction stopSnapshotModeSaga() {\n // any calls in the queue should stop when save-snapshot modal is closed\n resetFetchForSnapshot$.next()\n}\n\nfunction* fetchChartSaga({ payload }: Action<FetchChartPayload>) {\n const { chart, id, host } = payload\n\n const snapshot = yield select(selectSnapshot)\n if (snapshot) {\n yield put(fetchChartAction.success({\n chartMetadata: snapshot.charts.charts[chart],\n id,\n }))\n return\n }\n\n let response\n const url = isMainJs\n ? `${alwaysEndWithSlash(host)}api/v1/chart`\n : host.replace(\"/data\", \"/chart\")\n try {\n response = yield call(axiosInstance.get, url, {\n params: {\n chart,\n },\n })\n } catch (e) {\n console.warn(\"fetch chart details failure\") // eslint-disable-line no-console\n yield put(fetchChartAction.failure({ id }))\n return\n }\n yield put(fetchChartAction.success({\n chartMetadata: response.data,\n id,\n }))\n}\n\nfunction* fetchInfoSaga({ payload }: Action<FetchInfoPayload>) {\n const { poll } = payload\n let isCloudEnabled = false\n let isAgentClaimed = false\n let isCloudAvailable = false\n let isACLKAvailable = false\n\n try {\n const registry: GlobalStateT[\"registry\"] = yield select(selectRegistry)\n const wasCloudAvailable = registry?.isCloudAvailable\n const wasACLKAvailable = registry?.isACLKAvailable\n\n const { data } = yield call(axiosInstance.get, `${serverDefault}/api/v1/info`)\n isCloudAvailable = data?.[\"cloud-available\"] || false\n isCloudEnabled = data?.[\"cloud-enabled\"] || false\n isAgentClaimed = data?.[\"agent-claimed\"] || false\n isACLKAvailable = data?.[\"aclk-available\"] || false\n\n yield put(fetchInfoAction.success({\n isCloudAvailable, isCloudEnabled, isAgentClaimed, isACLKAvailable, fullInfoPayload: data,\n }))\n\n if (isCloudEnabled && (wasCloudAvailable === null) && !isCloudAvailable) {\n // show only once per session\n showCloudInstallationProblemNotification()\n }\n if (isCloudAvailable && isAgentClaimed && (wasACLKAvailable !== false) && !isACLKAvailable) {\n // show at session-init and if we see a change of isACLKAvailable from true to false\n showCloudConnectionProblemNotification()\n }\n // TODO: No success notification spec`ed?\n // else if (!wasACLKAvailable && isACLKAvailable) {\n // toast.success(\"Connected to the Cloud!\", {\n // position: \"bottom-right\",\n // type: toast.TYPE.SUCCESS,\n // autoClose: NOTIFICATIONS_TIMEOUT,\n // })\n // }\n } catch (e) {\n console.warn(\"fetch agent info failure\") // eslint-disable-line no-console\n yield put(fetchInfoAction.failure())\n }\n\n if (poll && isCloudEnabled && isAgentClaimed) {\n yield delay(INFO_POLLING_FREQUENCY)\n yield put(fetchInfoAction({ poll: true }))\n }\n}\n\n\nexport function* chartSagas() {\n yield takeEvery(fetchDataAction.request, fetchDataSaga)\n yield takeEvery(fetchChartAction.request, fetchChartSaga)\n yield takeEvery(fetchDataForSnapshotAction.request, fetchDataForSnapshotSaga)\n yield takeEvery(stopSnapshotModeAction, stopSnapshotModeSaga)\n yield takeEvery(fetchInfoAction.request, fetchInfoSaga)\n yield spawn(watchFetchDataResponseChannel)\n}\n","export const sidePanelTransitionTimeInSeconds = 0.2\n","import { sortBy, prop, last } from \"ramda\"\nimport { Action } from \"redux-act\"\nimport {\n call, delay, spawn, take, takeEvery, put,\n} from \"redux-saga/effects\"\n\nimport { axiosInstance } from \"utils/api\"\nimport { serverStatic } from \"utils/server-detection\"\nimport { name2id } from \"utils/name-2-id\"\n\nimport {\n startAlarmsAction, StartAlarmsPayload, fetchAllAlarmsAction, updateActiveAlarmsAction,\n} from \"./actions\"\nimport { AlarmLogs, AlarmLog, ActiveAlarms } from \"./types\"\n\nconst ALARMS_INITIALIZATION_DELAY = 1000\nconst ALARMS_UPDATE_EVERY = 10000 // the time in ms between alarm checks\nconst CHART_DIV_OFFSET = -50\n\n// firefox moves the alarms off-screen (above, outside the top of the screen)\n// if alarms are shown faster than: one per 500ms\nconst ALARMS_MS_BETWEEN_NOTIFICATIONS = 500\n\n// equal to old NETDATA.alarms.notifications\nconst areNotificationsAvailable = \"Notification\" in window\n\nconst notificationCallback = window.netdataAlarmsNotifCallback\n\n\n// todo this doesn't change in the session, but should be moved to the redux state anyway\nlet firstNotificationId = 0\nlet lastNotificationId = 0\n\n\nconst scrollToChart = (chartID: unknown): boolean => {\n if (typeof chartID === \"string\") {\n const chartElement = document.querySelector(`#chart_${name2id(chartID)}`)\n if (chartElement) {\n const offset = (chartElement as HTMLDivElement).offsetTop + CHART_DIV_OFFSET;\n (document.querySelector(\"html\") as HTMLElement).scrollTop = offset\n return true\n }\n }\n return false\n}\n\n// perhaps sagas are not the best place for this\nconst scrollToAlarm = (alarm: AlarmLog) => {\n if (typeof alarm === \"object\") {\n const hasFoundChart = scrollToChart(alarm.chart)\n if (hasFoundChart) {\n window.focus()\n }\n }\n}\n\nconst requestPermissions = () => {\n if (areNotificationsAvailable) {\n if (Notification.permission === \"default\") {\n Notification.requestPermission()\n }\n }\n}\n\nconst hasGivenNotificationPermissions = () => (areNotificationsAvailable\n && Notification.permission === \"granted\"\n)\n\nfunction* getLog(lastNotificationIdArg: number, serverDefault: string) {\n try {\n const { data } = yield call(\n axiosInstance.get,\n `${serverDefault}/api/v1/alarm_log?after=${lastNotificationIdArg}`,\n )\n // todo xss check\n return data\n } catch (error) {\n console.warn(\"Error fetching alarms log\", error) // eslint-disable-line no-console\n return null\n }\n}\n\ninterface NotificationConfig {\n notificationTitle: string\n notificationOptions: NotificationOptions\n notificationHandler: (event: Event) => void\n}\n// called \"notify\" in old codebase\nconst getNotification = (\n entry: AlarmLog, activeAlarms: ActiveAlarms, firstNotificationIdArg: number,\n): NotificationConfig | undefined => {\n if (entry.updated) {\n // has been updated by another alarm\n return\n }\n\n let valueString = entry.value_string\n const t = activeAlarms.alarms[`${entry.chart}.${entry.name}`]\n if (typeof t !== \"undefined\"\n && entry.status === t.status\n && typeof t.value_string !== \"undefined\"\n ) {\n valueString = t.value_string\n }\n\n const name = entry.name.replace(/_/g, \" \")\n let status = entry.status.toLowerCase()\n let title = `${name} = ${valueString}`\n const tag = entry.alarm_id\n let icon = \"images/banner-icon-144x144.png\"\n let interaction = false\n let show = true\n\n // switch/case left here to simplify refractor (it's very similar to old code)\n switch (entry.status) {\n case \"REMOVED\":\n show = false\n break\n\n case \"UNDEFINED\":\n return\n\n case \"UNINITIALIZED\":\n return\n\n case \"CLEAR\":\n if (entry.unique_id < firstNotificationIdArg) {\n // alarm is not current\n return\n }\n if (entry.old_status === \"UNINITIALIZED\" || entry.old_status === \"UNDEFINED\") {\n // alarm switch to CLEAR from old_status\n return\n }\n if (entry.no_clear_notification) {\n // alarm is CLEAR but has no_clear_notification flag\n return\n }\n title = `${name} back to normal (${valueString})`\n icon = \"images/check-mark-2-128-green.png\"\n interaction = false\n break\n\n case \"WARNING\":\n if (entry.old_status === \"CRITICAL\") {\n status = `demoted to ${entry.status.toLowerCase()}`\n }\n\n icon = \"images/alert-128-orange.png\"\n interaction = false\n break\n\n case \"CRITICAL\":\n if (entry.old_status === \"WARNING\") {\n status = `escalated to ${entry.status.toLowerCase()}`\n }\n\n icon = \"images/alert-128-red.png\"\n interaction = true\n break\n\n default:\n console.warn(`invalid alarm status ${entry.status}`) // eslint-disable-line no-console\n return\n }\n\n // filter recipients\n // if (show) {\n // show = NETDATA.alarms.recipientMatches(entry.recipient, NETDATA.alarms.recipients)\n // }\n\n\n if (show) {\n if (typeof notificationCallback === \"function\") {\n show = notificationCallback(entry)\n }\n\n if (show) {\n // show this notification\n // eslint-disable-next-line consistent-return\n return {\n notificationTitle: title,\n notificationOptions: {\n body: `${entry.hostname} - ${entry.chart} (${entry.family}) - ${status}: ${entry.info}`,\n tag: `${tag}`,\n requireInteraction: interaction,\n icon: serverStatic + icon,\n data: entry,\n },\n notificationHandler: (event: Event) => {\n event.preventDefault()\n if (event.target) {\n const { data } = event.target as Notification\n scrollToAlarm(data)\n }\n },\n }\n }\n }\n}\n\nfunction* notifyAll(serverDefault: string, activeAlarms: ActiveAlarms) {\n const alarmLogs: AlarmLogs = yield call(getLog, lastNotificationId, serverDefault)\n if (alarmLogs === null || typeof alarmLogs !== \"object\") {\n console.warn(\"invalid alarms log response\") // eslint-disable-line no-console\n return\n }\n\n if (alarmLogs.length === 0) {\n console.log(\"received empty alarm log\") // eslint-disable-line no-console\n return\n }\n\n const logsSorted = sortBy(prop(\"unique_id\"), alarmLogs)\n\n // eslint-disable-next-line camelcase\n const newLogs = logsSorted.filter(({ unique_id }) => unique_id > lastNotificationId)\n const notifications = newLogs\n .map((entry) => (getNotification(entry, activeAlarms, firstNotificationId)))\n .filter((x) => x !== undefined) as NotificationConfig[]\n\n for (let i = 0; i < notifications.length; i += 1) {\n const {\n notificationTitle, notificationOptions, notificationHandler,\n } = notifications[i]\n const notification = new Notification(\n notificationTitle,\n notificationOptions,\n )\n notification.onclick = notificationHandler\n\n yield delay(ALARMS_MS_BETWEEN_NOTIFICATIONS)\n }\n\n // todo put to redux store\n lastNotificationId = (last(logsSorted) as AlarmLog).unique_id\n\n if (typeof window.netdataAlarmsRemember === \"undefined\" || window.netdataAlarmsRemember) {\n localStorage.setItem(\"last_notification_id\", `${lastNotificationId}`)\n }\n}\n\n\nfunction* get(what: string, serverDefault: string) {\n const { data } = yield call(axiosInstance.get, `${serverDefault}/api/v1/alarms?${what}`)\n if (firstNotificationId === 0 && typeof data.latest_alarm_log_unique_id === \"number\") {\n firstNotificationId = data.latest_alarm_log_unique_id\n }\n return data\n}\n\nfunction* alarmsLoop(serverDefault: string) {\n while (true) {\n const activeAlarms = (yield call(get, \"active\", serverDefault)) as ActiveAlarms\n if (activeAlarms) {\n yield put(updateActiveAlarmsAction({ activeAlarms }))\n if (\n hasGivenNotificationPermissions()\n // timestamps in seconds\n && (activeAlarms.latest_alarm_log_unique_id > lastNotificationId)\n ) {\n yield call(notifyAll, serverDefault, activeAlarms)\n\n if (activeAlarms.status === false) {\n // Health monitoring is disabled on this netdata\n break\n }\n }\n }\n yield delay(ALARMS_UPDATE_EVERY)\n }\n}\n\nfunction* startAlarms() {\n // make sure we handle that action only once, we don't want multiple intervals/loops\n const { payload }: { payload: StartAlarmsPayload } = yield take(startAlarmsAction)\n const { serverDefault } = payload\n\n yield delay(ALARMS_INITIALIZATION_DELAY)\n\n lastNotificationId = +(localStorage.getItem(\"last_notification_id\") || lastNotificationId)\n requestPermissions()\n yield call(alarmsLoop, serverDefault)\n}\n\ntype FetchAllAlarmsPayload = {\n callback: (x: unknown) => void,\n serverDefault: string,\n}\nfunction* fetchAllAlarmsSaga({ payload }: Action<FetchAllAlarmsPayload>) {\n const { callback, serverDefault } = payload\n const allAlarms = yield call(get, \"all\", serverDefault)\n callback(allAlarms)\n}\n\nexport function* alarmsSagas() {\n yield spawn(startAlarms)\n yield takeEvery(fetchAllAlarmsAction.request, fetchAllAlarmsSaga)\n}\n","const allowedReferrerDomains = [\n \"\",\n \"https://www.google.com/\",\n \"https://duckduckgo.com/\",\n \"https://www.reddit.com/\",\n]\n\nexport const isAllowedReferrer = (referrer: string) => allowedReferrerDomains.includes(referrer)\n || referrer.endsWith(\".my-netdata.io/\")\n || referrer.startsWith(\"https://github.com/\")\n || referrer.endsWith(\"netdata.cloud/\")\n || referrer.startsWith(\"https://app.netdata.cloud/\")\n","import { uniq, filter } from \"ramda\"\nimport {\n spawn, take, put, takeEvery, call, delay, select,\n} from \"redux-saga/effects\"\nimport { channel } from \"redux-saga\"\nimport { AxiosResponse } from \"axios\"\nimport { Action } from \"redux-act\"\n\nimport { NETDATA_REGISTRY_SERVER } from \"utils/utils\"\nimport { axiosInstance } from \"utils/api\"\nimport { isDemo } from \"utils/is-demo\"\nimport { sidePanelTransitionTimeInSeconds } from \"components/space-panel/settings\"\nimport { fetchInfoAction } from \"domains/chart/actions\"\n\nimport {\n fetchHelloAction,\n FetchHelloPayload,\n windowFocusChangeAction,\n updatePersonUrlsAction,\n SetOptionAction,\n setOptionAction,\n setSpacePanelStatusAction,\n SetSpacePanelStatusActionPayload,\n setSpacePanelTransitionEndAction,\n HelloResponse,\n accessRegistrySuccessAction,\n} from \"./actions\"\nimport { alarmsSagas } from \"./alarms-sagas\"\nimport { MASKED_DATA } from \"./constants\"\nimport { selectFullInfoPayload } from \"./selectors\"\nimport { isAllowedReferrer } from \"./utils\"\nimport { InfoPayload } from \"./__mocks__/info-mock\"\n\nconst windowFocusChannel = channel()\n\nexport function listenToWindowFocus() {\n window.addEventListener(\"focus\", () => {\n windowFocusChannel.put(windowFocusChangeAction({ hasWindowFocus: true }))\n })\n window.addEventListener(\"blur\", () => {\n windowFocusChannel.put(windowFocusChangeAction({ hasWindowFocus: false }))\n })\n}\n\nexport function* watchWindowFocusChannel() {\n while (true) {\n const action = yield take(windowFocusChannel)\n yield put(action)\n }\n}\n\nfunction* waitForFullInfoPayload() {\n return (yield take(fetchInfoAction.success)).payload.fullInfoPayload\n}\n\nfunction* injectPosthog(machineGuid: string, personGuid?: string) {\n if (window.posthog) {\n return\n }\n const info: InfoPayload = (yield select(selectFullInfoPayload))\n || (yield call(waitForFullInfoPayload))\n || {}\n\n /* eslint-disable */\n // @ts-ignore\n !function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(\".\");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement(\"script\")).type=\"text/javascript\",p.async=!0,p.src=s.api_host+\"/static/array.js\",(r=t.getElementsByTagName(\"script\")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a=\"posthog\",u.people=u.people||[],u.toString=function(t){var e=\"posthog\";return\"posthog\"!==a&&(e+=\".\"+a),t||(e+=\" (stub)\"),e},u.people.toString=function(){return u.toString(1)+\".people (stub)\"},o=\"capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags\".split(\" \"),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);\n /* eslint-enable */\n window.posthog.init(\"mqkwGT0JNFqO-zX2t0mW6Tec9yooaVu7xCBlXtHnt5Y\", {\n api_host: \"https://app.posthog.com\",\n loaded: (posthog: any) => {\n if (personGuid) {\n posthog.identify(personGuid)\n }\n },\n })\n const shouldMaskReferrer = !isDemo && !isAllowedReferrer(document.referrer)\n const MASKED = \"masked\"\n window.posthog.register(\n // remove properties with unavailable values\n filter((value) => value !== undefined && value !== null,\n {\n $ip: \"127.0.0.1\",\n $current_url: isDemo ? null : \"agent dashboard\",\n $pathname: isDemo ? null : \"netdata-dashboard\",\n $host: isDemo ? null : \"dashboard.netdata.io\",\n\n $initial_referring_domain: shouldMaskReferrer ? MASKED : null,\n $initial_referrer: shouldMaskReferrer ? MASKED : null,\n $referring_domain: shouldMaskReferrer ? MASKED : null,\n $referrer: shouldMaskReferrer ? MASKED : null,\n\n event_source: \"agent dashboard\",\n\n netdata_version: info.version,\n netdata_machine_guid: machineGuid,\n netdata_person_id: personGuid || \"Unavailable\",\n netdata_buildinfo: info[\"buildinfo\"],\n netdata_release_channel: info[\"release-channel\"],\n mirrored_host_count: info.mirrored_hosts?.length,\n alarms_normal: info.alarms?.normal,\n alarms_warning: info.alarms?.warning,\n alarms_critical: info.alarms.critical,\n host_os_name: info.os_name,\n host_os_id: info.os_id,\n host_os_id_like: info.os_id_like,\n host_os_version: info.os_version,\n host_os_version_id: info.os_version_id,\n host_os_detection: info.os_detection,\n system_cores_total: info.cores_total,\n system_total_disk_space: info.total_disk_space,\n system_cpu_freq: info.cpu_freq,\n system_ram_total: info.ram_total,\n system_kernel_name: info.kernel_name,\n system_kernel_version: info.kernel_version,\n system_architecture: info.architecture,\n system_virtualization: info.virtualization,\n system_virt_detection: info.virt_detection,\n system_container: info.container,\n system_container_detection: info.container_detection,\n container_os_name: info.container_os_name,\n container_os_id: info.container_os_id,\n container_os_id_like: info.container_os_id_like,\n container_os_version: info.container_os_version,\n container_os_version_id: info.container_os_version_id,\n host_collectors_count: info.collectors.length,\n host_cloud_enabled: info[\"cloud-enabled\"],\n host_cloud_available: info[\"cloud-available\"],\n host_agent_claimed: info[\"agent-claimed\"],\n host_aclk_available: info[\"aclk-available\"],\n host_aclk_implementation: info[\"aclk-implementation\"],\n host_allmetrics_json_used: info[\"allmetrics-json-used\"],\n host_allmetrics_prometheus_used: info[\"allmetrics-prometheus-used\"],\n host_allmetrics_shell_used: info[\"allmetrics-shell-used\"],\n host_charts_count: info[\"charts-count\"],\n host_dashboard_used: info[\"dashboard-used\"],\n host_metrics_count: info[\"metrics-count\"],\n host_notification_methods: info[\"notification-methods\"],\n config_memory_mode: info[\"memory-mode\"],\n config_exporting_enabled: info[\"exporting-enabled\"],\n config_exporting_connectors: info[\"exporting-connectors\"],\n config_hosts_available: info[\"hosts-available\"],\n config_https_enabled: info[\"https-enabled\"],\n config_multidb_disk_quota: info[\"multidb-disk-quota\"],\n config_page_cache_size: info[\"page-cache-size\"],\n config_stream_enabled: info[\"stream-enabled\"],\n config_web_enabled: info[\"web-enabled\"],\n // eslint-disable-next-line camelcase\n host_is_parent: info.host_labels?._is_parent,\n mirrored_hosts_reachable: info.mirrored_hosts_status\n .filter(({ reachable }) => reachable).length,\n mirrored_hosts_unreachable: info.mirrored_hosts_status\n .filter(({ reachable }) => !reachable).length,\n host_collectors: info.collectors,\n host_is_k8s_node: info.is_k8s_node,\n }),\n )\n}\n\nexport type PersonUrl = [\n string, // guid\n string, // url\n number, // last timestamp (ms)\n number, // accesses\n string // name\n]\n\ntype AccessRegistryResponse = null | {\n personGuid?: string\n registryServer: string\n urls?: PersonUrl[]\n}\n\ntype AccessRegistry = (args: {\n machineGuid: string\n maxRedirects: number\n name: string\n registryServer: string\n url: string\n}) => Promise<AccessRegistryResponse>\nconst accessRegistry: AccessRegistry = ({\n machineGuid, maxRedirects, name, registryServer, url,\n}) => axiosInstance.get(`${registryServer}/api/v1/registry`, {\n headers: {\n \"Cache-Control\": \"no-cache, no-store\",\n Pragma: \"no-cache\",\n },\n params: {\n action: \"access\",\n machine: machineGuid,\n name,\n url,\n },\n withCredentials: true, // required for the cookie\n}).then(({ data }) => {\n // todo xss check\n const isRedirect = typeof data.registry === \"string\"\n\n let returnData = data\n if (typeof data.status !== \"string\" || data.status !== \"ok\") {\n // todo throw error (409 in old dashboard)\n returnData = null\n }\n\n if (returnData === null) {\n if (isRedirect && maxRedirects > 0) {\n return accessRegistry({\n maxRedirects: maxRedirects - 1,\n machineGuid,\n name,\n registryServer: data.registry,\n url,\n })\n }\n return { registryServer }\n }\n const urls = data.urls.filter((u: [string, string]) => u[1] !== MASKED_DATA)\n return {\n personGuid: data.person_guid || null,\n registryServer,\n urls,\n }\n}).catch(() => {\n // todo handle error in better way (410 in old dashboard)\n console.warn(\"error calling registry:\", registryServer) // eslint-disable-line no-console\n return null\n})\n\nexport interface RegistryMachine {\n guid: string\n url: string\n lastTimestamp: number\n accesses: number\n name: string\n alternateUrls: string[]\n}\n\ntype ParsePersonUrls = (\n personUrls: PersonUrl[]\n) => {\n registryMachines: { [key: string]: RegistryMachine }\n registryMachinesArray: RegistryMachine[]\n}\nexport const parsePersonUrls: ParsePersonUrls = (personUrls) => {\n // todo main.js is using registryMachines, but should use only the array\n const registryMachines: { [key: string]: RegistryMachine } = {}\n\n personUrls\n .slice()\n .reverse()\n .forEach(([guid, url, lastTimestamp, accesses, name]: PersonUrl) => {\n const existingObj = registryMachines[guid] || {\n lastTimestamp: 0,\n accesses: 0,\n alternateUrls: [],\n guid: \"\",\n url: \"\",\n name: \"\"\n }\n const isNewer = existingObj.lastTimestamp < lastTimestamp\n const extended: RegistryMachine = {\n guid: existingObj.guid || guid,\n url: isNewer ? url : existingObj.url,\n lastTimestamp: isNewer ? lastTimestamp : existingObj.lastTimestamp,\n accesses: existingObj.accesses + accesses,\n name: isNewer ? name : existingObj.name,\n alternateUrls: existingObj.alternateUrls.concat(url),\n }\n registryMachines[guid] = extended\n })\n\n const registryMachinesArray = uniq(\n // not sure if reverse is needed, but it was in old dashboard\n personUrls\n .slice()\n .reverse()\n .map(([guid]: PersonUrl) => guid),\n ).map((guid) => registryMachines[guid])\n return {\n registryMachines,\n registryMachinesArray,\n }\n}\n\nfunction* fetchHelloSaga({ payload }: Action<FetchHelloPayload>) {\n const { serverDefault } = payload\n const helloCallUrl = `${serverDefault}api/v1/registry?action=hello`\n let response: AxiosResponse<HelloResponse>\n try {\n response = yield call(axiosInstance.get, helloCallUrl, {\n headers: {\n \"Cache-Control\": \"no-cache, no-store\",\n Pragma: \"no-cache\",\n },\n withCredentials: true,\n })\n } catch (error) {\n console.warn(\"error accessing registry or Do-Not-Track is enabled\") // eslint-disable-line\n yield put(fetchHelloAction.failure())\n return\n }\n const cloudBaseURL = response.data.cloud_base_url\n const { hostname } = response.data\n const machineGuid = response.data.machine_guid\n const registryServer = response.data.registry\n const isUsingGlobalRegistry = registryServer === NETDATA_REGISTRY_SERVER\n\n yield put(fetchHelloAction.success({\n cloudBaseURL,\n hostname,\n isUsingGlobalRegistry,\n machineGuid,\n }))\n\n const name = hostname\n const url = serverDefault\n\n // now make access call - max_redirects, callback, etc...\n const accessRegistryResponse: AccessRegistryResponse = yield call(accessRegistry, {\n machineGuid,\n maxRedirects: 2,\n name,\n registryServer,\n url,\n })\n\n if (response.data.anonymous_statistics) {\n yield spawn(injectPosthog, response.data.machine_guid, accessRegistryResponse?.personGuid)\n }\n\n if (accessRegistryResponse?.urls && accessRegistryResponse?.personGuid) {\n const personUrls = parsePersonUrls(accessRegistryResponse.urls)\n const { registryMachines, registryMachinesArray } = personUrls\n yield put(updatePersonUrlsAction({\n personGuid: accessRegistryResponse.personGuid,\n registryMachines,\n registryMachinesArray,\n }))\n }\n\n yield put(accessRegistrySuccessAction({\n registryServer: accessRegistryResponse?.registryServer || registryServer,\n }))\n}\n\nconst constructOptionStorageKey = (key: string) => `options.${key}`\nfunction setOptionSaga({ payload }: Action<SetOptionAction>) {\n const { key, value } = payload\n if (key === \"stop_updates_when_focus_is_lost\") {\n // old dashboard was saving that property to localStorage, but was always omitting it when\n // reading. it was only possible to persist this setting via url (update_always hash param)\n return\n }\n localStorage.setItem(constructOptionStorageKey(key), JSON.stringify(value))\n}\n\nfunction* spacePanelSaga({ payload }: Action<SetSpacePanelStatusActionPayload>) {\n if (payload.isActive) {\n document.body.className = \"with-panel\"\n } else {\n document.body.className = \"\"\n }\n yield delay(sidePanelTransitionTimeInSeconds * 1000)\n yield put(setSpacePanelTransitionEndAction({ isActive: payload.isActive }))\n}\n\nexport function* globalSagas() {\n yield spawn(listenToWindowFocus)\n yield spawn(watchWindowFocusChannel)\n yield takeEvery(fetchHelloAction.request, fetchHelloSaga)\n yield spawn(alarmsSagas)\n yield takeEvery(setOptionAction, setOptionSaga)\n yield takeEvery(setSpacePanelStatusAction, spacePanelSaga)\n}\n","/* eslint-disable camelcase */\n/* eslint-disable operator-linebreak */\nimport { take, takeEvery } from \"redux-saga/effects\"\nimport { Action } from \"redux-act\"\n\nimport {\n clearHighlightAction,\n SetGlobalChartUnderlayAction,\n setGlobalChartUnderlayAction,\n} from \"domains/global/actions\"\nimport {\n explicitlySignInAction,\n showSignInModalAction,\n ShowSignInModalAction,\n} from \"domains/dashboard/actions\"\nimport { setHashParams, getHashParams, removeHashParams } from \"utils/hash-utils\"\n\nexport const LOCAL_STORAGE_NEEDS_SYNC = \"LOCAL-STORAGE-NEEDS-SYNC\"\n\nfunction setGlobalChartUnderlaySaga({ payload }: Action<SetGlobalChartUnderlayAction>) {\n const { after, before } = payload\n if (window.urlOptions) {\n // additional check to prevent loop, after setting initial state from url\n if (window.urlOptions.after !== after || window.urlOptions.before !== before) {\n window.urlOptions.netdataHighlightCallback(true, after, before)\n }\n } else {\n // TODO: Consider a setting to control whether the component sets these hash params\n const hashParams = getHashParams()\n const highlight_after = Math.round(after).toString()\n const highlight_before = Math.round(before).toString()\n if (\n hashParams.highlight_after !== highlight_after ||\n hashParams.highlight_before !== highlight_before\n ) {\n setHashParams({ highlight_after, highlight_before })\n }\n }\n}\n\nfunction clearHighlightSaga() {\n if (window.urlOptions) {\n window.urlOptions.netdataHighlightCallback(false, 0, 0)\n } else {\n removeHashParams([\"highlight_after\", \"highlight_before\"])\n }\n}\n\nfunction* showSignInSaga({ payload }: Action<ShowSignInModalAction>) {\n if (window.showSignInModal) {\n window.showSignInModal()\n\n yield take(explicitlySignInAction)\n const { signInLinkHref } = payload\n window.localStorage.setItem(LOCAL_STORAGE_NEEDS_SYNC, \"true\")\n window.location.href = signInLinkHref\n }\n}\n\nexport function* mainJsSagas() {\n yield takeEvery(setGlobalChartUnderlayAction, setGlobalChartUnderlaySaga)\n yield takeEvery(clearHighlightAction, clearHighlightSaga)\n yield takeEvery(showSignInModalAction, showSignInSaga)\n}\n","import { spawn } from \"redux-saga/effects\"\n\nimport { chartSagas } from \"domains/chart/sagas\"\nimport { globalSagas } from \"domains/global/sagas\"\nimport { mainJsSagas } from \"domains/dashboard/sagas\"\n\nexport function* rootSaga() {\n yield spawn(globalSagas)\n yield spawn(chartSagas)\n yield spawn(mainJsSagas)\n}\n","import { compose, applyMiddleware, createStore } from \"redux\"\nimport createSagaMiddleware from \"redux-saga\"\nimport rootReducer from \"./root-reducer\"\nimport { rootSaga } from \"./root-saga\"\n\nconst sagaMiddleware = createSagaMiddleware()\n\nconst reduxDevTools = process.env.NODE_ENV === \"development\"\n && window.__REDUX_DEVTOOLS_EXTENSION__\n // @ts-ignore\n && window.__REDUX_DEVTOOLS_EXTENSION__({ name: \"Dashboard Charts\" })\n\nconst composeMiddlewaresWithDevTools = () => (reduxDevTools\n ? compose(applyMiddleware(sagaMiddleware), reduxDevTools)\n : compose(applyMiddleware(sagaMiddleware)))\n\nexport const configureStore = () => {\n const store = createStore(\n rootReducer,\n composeMiddlewaresWithDevTools(),\n )\n sagaMiddleware.run(rootSaga)\n return store\n}\n\nexport const store = configureStore()\n","import $ from \"jquery\"\n\nwindow.$ = $\nwindow.jQuery = $\n","let loadCssPromise: Promise<void>\n\ntype LoadCss = (href: string) => Promise<void>\nexport const loadCss: LoadCss = (href) => {\n if (loadCssPromise) {\n return loadCssPromise\n }\n return new Promise((resolve, reject) => {\n const fileRef = document.createElement(\"link\")\n fileRef.setAttribute(\"rel\", \"stylesheet\")\n fileRef.setAttribute(\"type\", \"text/css\")\n fileRef.setAttribute(\"href\", href)\n\n fileRef.onload = () => {\n resolve()\n }\n\n fileRef.onerror = () => {\n reject(Error(`Error loading css: ${href}`))\n }\n\n document.getElementsByTagName(\"head\")[0].appendChild(fileRef)\n })\n}\n","import classNames from \"classnames\"\nimport { Attributes } from \"./transformDataAttributes\"\n\nexport type ChartLibraryName =\n | \"dygraph\"\n | \"sparkline\"\n | \"peity\"\n | \"google\"\n // | \"d3\"\n | \"d3pie\"\n | \"easypiechart\"\n | \"gauge\"\n | \"textonly\"\n | \"groupbox\"\nexport interface ChartLibraryConfig {\n aspectRatio?: number\n format: string\n hasLegend: (attributes: Attributes) => boolean\n hasToolboxPanAndZoom?: boolean\n isLogScale?: (attributes: Attributes) => boolean\n options: (attributes: Attributes) => string\n trackColors: boolean\n pixelsPerPoint: (attributes: Attributes) => number\n xssRegexIgnore: RegExp\n containerClass: (attributes: Attributes) => string\n}\nexport type ChartLibrariesSettings = {\n [key in ChartLibraryName]: ChartLibraryConfig\n}\n\ntype IsDygraphSparkline = (attributes: Attributes) => boolean\nconst isDygraphSparkline: IsDygraphSparkline = (attributes) => (\n attributes.dygraphTheme === \"sparkline\"\n)\n\nexport const chartLibrariesSettings: ChartLibrariesSettings = {\n dygraph: {\n // initialize: window.NETDATA.dygraphInitialize,\n // create: window.NETDATA.dygraphChartCreate,\n // update: window.NETDATA.dygraphChartUpdate,\n // resize(state) {\n // if (typeof state.tmp.dygraph_instance !== \"undefined\"\n // && typeof state.tmp.dygraph_instance.resize === \"function\") {\n // state.tmp.dygraph_instance.resize()\n // }\n // },\n // setSelection: window.NETDATA.dygraphSetSelection,\n // clearSelection: window.NETDATA.dygraphClearSelection,\n hasToolboxPanAndZoom: true,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result.data$\"),\n format: \"json\",\n options(attributes: Attributes) {\n if (typeof this.isLogScale === \"function\") {\n // flip - in proper order (from oldest to newest)\n return `ms|flip${this.isLogScale(attributes) ? \"|abs\" : \"\"}`\n }\n return \"\"\n },\n hasLegend(attributes: Attributes) {\n // not using __hasLegendCache__ as in old-dashboard, because performance tweaks like this\n // probably won't be needed in react app\n const { legend = true } = attributes\n return !isDygraphSparkline(attributes) && Boolean(legend)\n },\n // autoresize(state) {\n // void (state)\n // return true\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: true,\n pixelsPerPoint: ((attributes: Attributes) => (isDygraphSparkline(attributes) ? 2 : 3)),\n // pixels_per_point(state) {\n // return (this.isSparkline(state) === false) ? 3 : 2\n // },\n isLogScale(attributes: Attributes) {\n return attributes.dygraphTheme === \"logscale\"\n },\n containerClass(attributes: Attributes) {\n return this.hasLegend(attributes)\n ? classNames(\n \"netdata-container-with-legend\",\n attributes.legendPosition === \"bottom\" && \"netdata-container-with-legend--bottom\",\n )\n : \"netdata-container\"\n },\n // container_class(state) {\n // if (this.legend(state) !== null) {\n // return \"netdata-container-with-legend\"\n // }\n // return \"netdata-container\"\n // },\n },\n sparkline: {\n // initialize: window.NETDATA.sparklineInitialize,\n // create: window.NETDATA.sparklineChartCreate,\n // update: window.NETDATA.sparklineChartUpdate,\n // resize: null,\n // setSelection: undefined, // function(state, t) { void(state); return true; },\n // clearSelection: undefined, // function(state) { void(state); return true; },\n hasToolboxPanAndZoom: false,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n format: \"array\",\n options: () => \"flip|abs\",\n hasLegend: () => false,\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: false,\n pixelsPerPoint: () => 3,\n containerClass: () => \"netdata-container\",\n },\n peity: {\n // initialize: window.NETDATA.peityInitialize,\n // create: window.NETDATA.peityChartCreate,\n // update: window.NETDATA.peityChartUpdate,\n // resize: null,\n // setSelection: undefined, // function(state, t) { void(state); return true; },\n // clearSelection: undefined, // function(state) { void(state); return true; },\n hasToolboxPanAndZoom: false,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n format: \"ssvcomma\",\n options: () => \"null2zero|flip|abs\",\n hasLegend: () => false,\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: false,\n pixelsPerPoint: () => 3,\n containerClass: () => \"netdata-container\",\n },\n google: {\n // initialize: window.NETDATA.googleInitialize,\n // create: window.NETDATA.googleChartCreate,\n // update: window.NETDATA.googleChartUpdate,\n // resize: null,\n // setSelection: undefined, // function(state, t) { void(state); return true; },\n // clearSelection: undefined, // function(state) { void(state); return true; },\n hasToolboxPanAndZoom: false,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result.rows$\"),\n format: \"datatable\",\n options: () => \"\",\n hasLegend: () => false,\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 300\n // },\n trackColors: false,\n pixelsPerPoint: () => 4,\n containerClass: () => \"netdata-container\",\n },\n d3pie: {\n // initialize: window.NETDATA.d3pieInitialize,\n // create: window.NETDATA.d3pieChartCreate,\n // update: window.NETDATA.d3pieChartUpdate,\n // resize: null,\n // setSelection: window.NETDATA.d3pieSetSelection,\n // clearSelection: window.NETDATA.d3pieClearSelection,\n hasToolboxPanAndZoom: false,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result.data$\"),\n format: \"json\",\n hasLegend: () => false,\n options: () => \"objectrows|ms\",\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: false,\n pixelsPerPoint: () => 15,\n containerClass: () => \"netdata-container\",\n },\n // d3: {\n // initialize: window.NETDATA.d3Initialize,\n // create: window.NETDATA.d3ChartCreate,\n // update: window.NETDATA.d3ChartUpdate,\n // resize: null,\n // setSelection: undefined, // function(state, t) { void(state); return true; },\n // clearSelection: undefined, // function(state) { void(state); return true; },\n // toolboxPanAndZoom: null,\n // initialized: false,\n // enabled: true,\n // xssRegexIgnore: new RegExp(\"^/api/v1/data\\.result.data$\"),\n // format(state) {\n // void (state)\n // return \"json\"\n // },\n // options(state) {\n // void (state)\n // return \"\"\n // },\n // legend(state) {\n // void (state)\n // return null\n // },\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n // track_colors(state) {\n // void (state)\n // return false\n // },\n // pixels_per_point(state) {\n // void (state)\n // return 3\n // },\n // container_class(state) {\n // void (state)\n // return \"netdata-container\"\n // },\n // },\n easypiechart: {\n // initialize: window.NETDATA.easypiechartInitialize,\n // create: window.NETDATA.easypiechartChartCreate,\n // update: window.NETDATA.easypiechartChartUpdate,\n // resize: null,\n // setSelection: window.NETDATA.easypiechartSetSelection,\n // clearSelection: window.NETDATA.easypiechartClearSelection,\n hasToolboxPanAndZoom: false,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n format: \"array\",\n options() {\n return \"absolute\"\n },\n hasLegend() {\n return false\n },\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: true,\n pixelsPerPoint: () => 3,\n aspectRatio: 100,\n containerClass: () => \"netdata-container-easypiechart\",\n },\n gauge: {\n // initialize: window.NETDATA.gaugeInitialize,\n // create: window.NETDATA.gaugeChartCreate,\n // update: window.NETDATA.gaugeChartUpdate,\n // resize: null,\n // setSelection: window.NETDATA.gaugeSetSelection,\n // clearSelection: window.NETDATA.gaugeClearSelection,\n hasToolboxPanAndZoom: false,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n format: \"array\",\n options: () => \"absolute\",\n hasLegend: () => false,\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: true,\n pixelsPerPoint: () => 3,\n aspectRatio: 60,\n containerClass: () => \"netdata-container-gauge\",\n },\n textonly: {\n // autoresize(state) {\n // void (state)\n // return false\n // },\n containerClass: () => \"netdata-container\",\n // create: window.NETDATA.textOnlyCreate,\n // enabled: true,\n format: \"array\",\n // initialized: true,\n // initialize(callback) {\n // callback()\n // },\n hasLegend: () => false,\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n options: () => \"absolute\",\n pixelsPerPoint: () => 3,\n trackColors: false,\n // update: window.NETDATA.textOnlyUpdate,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n },\n groupbox: {\n containerClass: () => \"netdata-container\",\n hasLegend: () => false,\n options: () => \"absolute\",\n format: \"json\",\n trackColors: false,\n pixelsPerPoint: () => 3,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n },\n}\n","import { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { chartLibrariesSettings } from \"domains/chart/utils/chartLibrariesSettings\"\n\nexport const getChartURLOptions = (\n attributes: Attributes, shouldEliminateZeroDimensions: boolean,\n) => {\n const {\n appendOptions,\n overrideOptions,\n } = attributes\n let ret = \"\"\n\n ret += overrideOptions\n ? overrideOptions.toString()\n : chartLibrariesSettings[attributes.chartLibrary].options(attributes)\n\n if (typeof appendOptions === \"string\") {\n ret += `|${encodeURIComponent(appendOptions)}`\n }\n\n ret += \"|jsonwrap\"\n\n if (shouldEliminateZeroDimensions) {\n ret += \"|nonzero\"\n }\n\n if (attributes.dimensionsAggrMethod === \"sum-of-abs\"\n || (!attributes.dimensionsAggrMethod && attributes.groupBy && attributes.groupBy !== \"dimension\")\n ) {\n ret += \"|absolute\"\n }\n\n return ret\n}\n","export const BIGGEST_INTERVAL_NUMBER = 2 ** 31 - 1\n","import React from \"react\"\n\nimport { Icon } from \"components/icon\"\n\ninterface Props {\n containerNode: HTMLElement\n hasEmptyData: boolean\n}\n\nexport const Loader = ({\n containerNode,\n hasEmptyData,\n}: Props) => {\n // below is 90% of original logic.\n // since it rerenders when IntersectionObserver turns the chart back on,\n // it's not that important to detect screen height and container sizes changes\n const screenHeight = window.screen.height\n\n // normally we want a font size, as tall as the element\n let h = containerNode.clientHeight\n\n // but give it some air, 20% let's say, or 5 pixels min\n const lost = Math.max(h * 0.2, 5)\n h -= lost\n\n // center the text, vertically\n let paddingTop = (lost - 5) / 2\n\n // but check the width too\n // it should fit 10 characters in it\n const w = containerNode.clientWidth / 10\n if (h > w) {\n paddingTop += (h - w) / 2\n h = w\n }\n\n // and don't make it too huge\n // 5% of the screen size is good\n if (h > screenHeight / 20) {\n paddingTop += (h - (screenHeight / 20)) / 2\n h = screenHeight / 20\n }\n\n const label = hasEmptyData ? \" empty\" : \" netdata\"\n const iconType = hasEmptyData ? \"noData\" : \"loading\"\n\n return (\n <div\n className=\"netdata-message icon\"\n style={{\n fontSize: h,\n paddingTop,\n }}\n >\n <Icon iconType={iconType} />\n {label}\n </div>\n )\n}\n","type GetPanAndZoomStep = (event: React.MouseEvent) => number\nexport const getPanAndZoomStep: GetPanAndZoomStep = (event) => {\n if (event.ctrlKey) {\n return window.NETDATA.options.current.pan_and_zoom_factor\n * window.NETDATA.options.current.pan_and_zoom_factor_multiplier_control\n } if (event.shiftKey) {\n return window.NETDATA.options.current.pan_and_zoom_factor\n * window.NETDATA.options.current.pan_and_zoom_factor_multiplier_shift\n } if (event.altKey) {\n return window.NETDATA.options.current.pan_and_zoom_factor\n * window.NETDATA.options.current.pan_and_zoom_factor_multiplier_alt\n }\n return window.NETDATA.options.current.pan_and_zoom_factor\n}\n","export const safeEqualCheck = (a: unknown, b: unknown) => {\n if (a === b) {\n return true\n }\n return Number.isNaN(a as number) && Number.isNaN(b as number)\n}\n","import { identity } from \"ramda\"\nimport { useCallback, useState, useMemo, useRef } from \"react\"\n\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectTemperatureSetting, selectSecondsAsTimeSetting } from \"domains/global/selectors\"\nimport { unitsConversionCreator } from \"utils/units-conversion\"\nimport { safeEqualCheck } from \"utils/safe-equal-check\"\n\nimport { ChartData } from \"../chart-types\"\nimport { Attributes } from \"./transformDataAttributes\"\n\ntype Converter = (v: number) => number | string\n// only time units are converted into strings, the rest are numbers\n\n// todo - memoization similar to the one as in old dashboard, but probably not needed\nconst formattersFixed: any[] = []\nconst formattersZeroBased: any[] = []\nconst fastNumberFormat = (min: number, max: number) => {\n const key = max\n if (min === max) {\n if (typeof formattersFixed[key] === \"undefined\") {\n formattersFixed[key] = new Intl.NumberFormat(undefined, {\n useGrouping: true,\n minimumFractionDigits: min,\n maximumFractionDigits: max,\n })\n }\n\n return formattersFixed[key]\n }\n if (min === 0) {\n if (typeof formattersZeroBased[key] === \"undefined\") {\n formattersZeroBased[key] = new Intl.NumberFormat(undefined, {\n useGrouping: true,\n minimumFractionDigits: min,\n maximumFractionDigits: max,\n })\n }\n\n return formattersZeroBased[key]\n }\n // (old dashboard comment)\n // this is never used\n // it is added just for completeness\n return new Intl.NumberFormat(undefined, {\n useGrouping: true,\n minimumFractionDigits: min,\n maximumFractionDigits: max,\n })\n}\n\nconst getLegendFormatValue =\n (\n convertUnits: Converter,\n intlNumberFormat: Intl.NumberFormat | null,\n valueDecimalDetail: number\n ) =>\n (value: number | string | null) => {\n if (typeof value !== \"number\") {\n return \"-\"\n }\n\n const convertedValue = convertUnits(value)\n if (typeof convertedValue !== \"number\") {\n return convertedValue\n }\n\n if (intlNumberFormat !== null) {\n return intlNumberFormat.format(convertedValue)\n }\n\n let dmin\n let dmax\n if (valueDecimalDetail !== -1) {\n dmin = valueDecimalDetail\n dmax = valueDecimalDetail\n } else {\n dmin = 0\n const abs = convertedValue < 0 ? -convertedValue : convertedValue\n if (abs > 1000) {\n dmax = 0\n } else if (abs > 10) {\n dmax = 1\n } else if (abs > 1) {\n dmax = 2\n } else if (abs > 0.1) {\n dmax = 2\n } else if (abs > 0.01) {\n dmax = 4\n } else if (abs > 0.001) {\n dmax = 5\n } else if (abs > 0.0001) {\n dmax = 6\n } else {\n dmax = 7\n }\n }\n\n return fastNumberFormat(dmin, dmax).format(convertedValue)\n }\n\ntype LegendFormatValue = (value: string | number | null) => string | number\n\ninterface Arguments {\n attributes: Attributes\n data: ChartData\n units: string\n unitsCommon: string | undefined\n unitsDesired: string\n uuid: string\n}\nexport const useFormatters = ({\n attributes,\n data,\n units,\n unitsCommon,\n unitsDesired,\n uuid,\n}: Arguments) => {\n const temperatureSetting = useSelector(selectTemperatureSetting)\n const secondsAsTimeSetting = useSelector(selectSecondsAsTimeSetting)\n\n // previously _unitsConversion\n const [convertUnits, setConvertUnits] = useState<Converter>(() => identity)\n\n // probably can also be removed\n const [min, setMin] = useState<number>()\n const [max, setMax] = useState<number>()\n\n // todo most of this state is not needed, that hook can be refactored\n const [unitsCurrent, setUnitsCurrent] = useState<string>(units)\n\n const [decimals, setDecimals] = useState<number>(-1)\n const [intlNumberFormat, setIntlNumberFormat] = useState<Intl.NumberFormat | null>(null)\n\n const {\n // \"valueDecimalDetail\" in old app\n decimalDigits = -1,\n } = attributes\n\n const legendFormatValue: LegendFormatValue = useMemo(\n () => getLegendFormatValue(convertUnits, intlNumberFormat, decimalDigits),\n [convertUnits, decimalDigits, intlNumberFormat]\n )\n\n const legendFormatValueRef = useRef(legendFormatValue)\n const updateLegendFormatValueRef = (\n newConvertUnits: Converter,\n newIntlNumberFormat: any,\n newDecimalDigits: any\n ) => {\n legendFormatValueRef.current = getLegendFormatValue(\n newConvertUnits,\n newIntlNumberFormat,\n newDecimalDigits\n )\n }\n\n const legendFormatValueDecimalsFromMinMax = useCallback(\n (newMin: number, newMax: number) => {\n if (safeEqualCheck(min, newMin) && safeEqualCheck(max, newMax)) {\n return legendFormatValueRef.current\n }\n // we should call the convertUnits-creation only when original app was doing this\n // so we don't get new updates in improper places\n setMin(newMin)\n setMax(newMax)\n\n const newConvertUnits = unitsConversionCreator.get(\n uuid,\n newMin,\n newMax,\n units,\n unitsDesired,\n unitsCommon,\n switchedUnits => {\n setUnitsCurrent(switchedUnits)\n // that.legendSetUnitsString(that.units_current);\n // that.legendSetUnitsString just populates some DOM with unitsCurrent\n // on all occurrences just take the unitsCurrent from this state\n },\n temperatureSetting,\n secondsAsTimeSetting\n )\n\n // as function, so useState() interprets it properly\n setConvertUnits(() => newConvertUnits)\n\n const convertedMin = newConvertUnits(newMin)\n const convertedMax = newConvertUnits(newMax)\n\n // if number is returned, we format it!!!!\n if (typeof convertedMin !== \"number\" || typeof convertedMax !== \"number\") {\n updateLegendFormatValueRef(newConvertUnits, intlNumberFormat, decimalDigits)\n return legendFormatValueRef.current\n }\n\n let newDecimals\n\n if (data.min === data.max) {\n // it is a fixed number, let the visualizer decide based on the value\n newDecimals = -1\n } else if (decimalDigits !== -1) {\n // there is an override\n newDecimals = decimalDigits\n } else {\n // ok, let's calculate the proper number of decimal points\n let delta\n\n if (convertedMin === convertedMax) {\n delta = Math.abs(convertedMin)\n } else {\n delta = Math.abs(convertedMax - convertedMin)\n }\n\n if (delta > 1000) {\n newDecimals = 0\n } else if (delta > 10) {\n newDecimals = 1\n } else if (delta > 1) {\n newDecimals = 2\n } else if (delta > 0.1) {\n newDecimals = 2\n } else if (delta > 0.01) {\n newDecimals = 4\n } else if (delta > 0.001) {\n newDecimals = 5\n } else if (delta > 0.0001) {\n newDecimals = 6\n } else {\n newDecimals = 7\n }\n }\n\n let newIntlNumberFormat = intlNumberFormat\n\n if (newDecimals !== decimals) {\n if (newDecimals < 0) {\n newIntlNumberFormat = null\n } else {\n newIntlNumberFormat = fastNumberFormat(newDecimals, newDecimals)\n }\n setIntlNumberFormat(() => newIntlNumberFormat)\n setDecimals(newDecimals)\n }\n updateLegendFormatValueRef(newConvertUnits, newIntlNumberFormat, newDecimals)\n return legendFormatValueRef.current\n },\n [\n decimals,\n decimalDigits,\n min,\n max,\n uuid,\n temperatureSetting,\n units,\n unitsDesired,\n unitsCommon,\n secondsAsTimeSetting,\n data.min,\n data.max,\n intlNumberFormat,\n ]\n )\n\n return {\n legendFormatValue,\n legendFormatValueDecimalsFromMinMax,\n unitsCurrent,\n }\n}\n","const defaultColor = {\n r: 255,\n g: 0,\n b: 0,\n}\n\ntype ColorHex2Rgb = (hex: string) => {\n r: number,\n g: number,\n b: number\n}\nexport const colorHex2Rgb: ColorHex2Rgb = (hex) => {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i\n if (!hex) {\n return defaultColor\n }\n const hexFull = hex.replace(shorthandRegex, (m, r, g, b) => r + r + g + g + b + b)\n\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hexFull)\n if (!result) {\n console.warn(\"wrong color format:\", hex) // eslint-disable-line no-console\n }\n return result\n ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16),\n } : defaultColor\n}\n","import styled from \"styled-components\"\nimport { getSizeBy } from \"@netdata/netdata-ui\"\n\nexport const LegendContainer = styled.div`\n margin-bottom: ${getSizeBy(3)};\n padding-left: 35px;\n`\n\nexport const LegendFirstRow = styled.div`\n margin-top: 4px;\n display: flex;\n justify-content: space-between;\n`\n\nexport const LegendSecondRow = styled.div`\n margin-top: 4px;\n display: flex;\n justify-content: space-between;\n`\n\nexport const LegendUnit = styled.div`\n`\n\nexport const DateTimeSeparator = styled.span`\n margin: 0 3px;\n`\n\nexport const LegendItems = styled.div`\n display: flex;\n flex-wrap: wrap;\n overflow: auto;\n max-height: 80px;\n`\n\nexport const DimensionItem = styled.div<{ color: string, isDisabled: boolean }>`\n display: flex;\n align-items: center;\n color: ${({ color }) => color};\n margin-right: 12px;\n cursor: pointer;\n opacity: ${({ isDisabled }) => (isDisabled ? 0.3 : null)};\n user-select: none;\n font-size: 11px;\n &:focus {\n outline: none;\n }\n`\n\n// toolbox is based on \"absolute\", so to make sure it's not put on top of dimension-item\n// let's put a transparent block as last in dimension-items container. Toolbox will soon be moved\n// to other place so it's temporary\nexport const DimensionItemToolboxPlaceholder = styled.div`\n width: 140px;\n height: 20px;\n`\n\nexport const DimensionIcon = styled.div<{ color: string }>`\n width: 14px;\n height: 7px;\n border-radius: 4px;\n overflow: hidden;\n background-color: ${({ color }) => color};\n`\n\nexport const DimensionLabel = styled.span`\n margin-left: 3px;\n`\n\nexport const DimensionValue = styled.span`\n margin-left: 5px;\n min-width: 30px;\n`\n\nexport const ToolboxContainer = styled.div`\n position: relative;\n touch-action: none;\n`\n","import React, { useCallback } from \"react\"\nimport { createSelector } from \"reselect\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectChartData } from \"domains/chart/selectors\"\nimport { DimensionLabel } from \"./chart-legend-bottom.styled\"\n\nconst emptyObject = {}\n\nconst selector = createSelector(\n selectChartData,\n ({ dimension_names: dimensionNames, keys = emptyObject }) => ({\n dimensionNames,\n keys,\n })\n)\n\nconst LegendText = ({ id, index }) => {\n const { dimensionNames, keys } = useSelector(useCallback(state => selector(state, { id }), [id]))\n const { chart, node } = keys\n\n if (chart && node && Object.keys(keys).length === 2) {\n return (\n <DimensionLabel>\n {chart[index]}@{node[index]}\n </DimensionLabel>\n )\n }\n\n const name = dimensionNames[index]\n\n return <DimensionLabel>{name}</DimensionLabel>\n}\n\nexport default LegendText\n","import React, { Fragment, useRef, useEffect, useCallback } from \"react\"\nimport classNames from \"classnames\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectChartData } from \"domains/chart/selectors\"\n\nimport { colorHex2Rgb } from \"utils/color-hex-2-rgb\"\nimport { useDateTime } from \"utils/date-time\"\n\nimport { legendResolutionTooltip, legendPluginModuleString } from \"../utils/legend-utils\"\n\nimport { ChartMetadata } from \"../chart-types\"\nimport LegendText from \"./legendText\"\n\ninterface Props {\n chartUuid: string\n chartMetadata: ChartMetadata\n chartLibrary: string\n colors: {\n [key: string]: string\n }\n hoveredRow: number\n hoveredX: number | null\n legendFormatValue: (value: number | string | null) => (number | string)\n onDimensionClick: (clickedDimensionName: string, event: React.MouseEvent) => void\n selectedDimensions: string[]\n showLatestOnBlur: boolean\n unitsCurrent: string\n viewBefore: number\n}\n\nexport const ChartLegendRight = ({\n chartUuid,\n chartMetadata,\n chartLibrary,\n colors,\n hoveredRow,\n hoveredX,\n legendFormatValue,\n onDimensionClick,\n selectedDimensions,\n showLatestOnBlur,\n unitsCurrent,\n viewBefore,\n}: Props) => {\n const chartData = useSelector(\n useCallback((state: any) => selectChartData(state, { id: chartUuid }), [chartUuid])\n )\n const { dimension_names: dimensionNames, dimension_ids: dimensionIds } = chartData\n\n // todo handle also this case:\n // const netdataLast = chartData.last_entry * 1000\n // const dataUpdateEvery = chartData.view_update_every * 1000\n // showUndefined = Math.abs(netdataLast - viewBefore) > dataUpdateEvery\n // (showUndefined also when difference between last and before is bigger than granularity)\n const showUndefined = hoveredRow === -1 && !showLatestOnBlur\n\n // todo support timezone\n const legendDate = new Date(hoveredX || viewBefore)\n\n // todo make a possibility to add chartLegened when there's not chartData\n // (if this situation is possible)\n\n // @ts-ignore ignoring because options.current has inconsistent structure\n const colorFillOpacity = window.NETDATA.options.current[\n `color_fill_opacity_${chartMetadata.chart_type}`\n ]\n\n const { localeDateString, localeTimeString } = useDateTime()\n\n const scrollbarRef = useRef(null)\n useEffect(() => {\n if (scrollbarRef.current) {\n window.Ps.initialize(scrollbarRef.current, {\n wheelSpeed: 0.2,\n wheelPropagation: true,\n swipePropagation: true,\n minScrollbarLength: null,\n maxScrollbarLength: null,\n useBothWheelAxes: false,\n suppressScrollX: true,\n suppressScrollY: false,\n scrollXMarginOffset: 0,\n scrollYMarginOffset: 0,\n theme: \"default\",\n })\n }\n }, [scrollbarRef])\n\n return (\n <div className={classNames(\n \"netdata-chart-legend\",\n `netdata-${chartLibrary}-legend`,\n )}\n >\n <span\n className=\"netdata-legend-title-date\"\n title={legendPluginModuleString(true, chartMetadata)}\n >\n {showUndefined\n ? legendPluginModuleString(false, chartMetadata)\n : localeDateString(legendDate)}\n </span>\n <br />\n <span\n className=\"netdata-legend-title-time\"\n title={legendResolutionTooltip(chartData, chartMetadata)}\n >\n {showUndefined\n ? chartMetadata.context.toString()\n : localeTimeString(legendDate)}\n </span>\n <br />\n <span className=\"netdata-legend-title-units\">{unitsCurrent}</span>\n <br />\n <div className=\"netdata-legend-series\" ref={scrollbarRef}>\n <div className=\"netdata-legend-series-content\">\n {dimensionIds.map((dimensionId, i) => {\n const dimensionName = dimensionNames[i]\n // todo dimension could be a separate component\n const color = colors[dimensionName]\n const rgb = colorHex2Rgb(color)\n\n const isSelected = selectedDimensions.length === 0\n || selectedDimensions.includes(dimensionName)\n\n let value\n if (showUndefined) {\n value = null\n } else if (hoveredRow !== -1) {\n const hoveredValueArray = chartData.result.data[hoveredRow]\n // [timestamp, valueDim1, valueDim2, ...]\n value = hoveredValueArray ? hoveredValueArray[i + 1] : null\n } else {\n value = chartData.view_latest_values[i]\n }\n\n return (\n <Fragment key={dimensionId}>\n {i !== 0 && <br />}\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\n <span\n title={dimensionName}\n className={classNames(\n \"netdata-legend-name\",\n isSelected ? \"selected\" : \"not-selected\",\n )}\n onClick={(event) => {\n onDimensionClick(dimensionName, event)\n }}\n role=\"button\"\n style={{ color }}\n tabIndex={0}\n >\n <table\n className={`netdata-legend-name-table-${chartMetadata.chart_type}`}\n style={{\n backgroundColor: `rgba(${rgb.r},${rgb.g},${rgb.b},${colorFillOpacity})`,\n }}\n >\n <tbody>\n <tr className=\"netdata-legend-name-tr\">\n <td className=\"netdata-legend-name-td\" />\n </tr>\n </tbody>\n </table>\n {\" \"}\n <LegendText id={chartUuid} index={i} />\n </span>\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\n <span\n title={dimensionName}\n className={classNames(\n \"netdata-legend-value\",\n !isSelected && \"hidden\",\n )}\n onClick={(event) => {\n onDimensionClick(dimensionName, event)\n }}\n role=\"button\"\n style={{ color }} // omitted !important during refractor, react doesn't support it\n tabIndex={0}\n >\n {legendFormatValue(\n value,\n )}\n </span>\n </Fragment>\n )\n })}\n </div>\n </div>\n </div>\n )\n}\n","import React, { useCallback } from \"react\"\nimport { useDateTime } from \"utils/date-time\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectChartData } from \"domains/chart/selectors\"\nimport { legendPluginModuleString, legendResolutionTooltip } from \"domains/chart/utils/legend-utils\"\nimport { ChartMetadata } from \"../chart-types\"\nimport LegendText from \"./legendText\"\nimport * as S from \"./chart-legend-bottom.styled\"\ninterface Props {\n chartUuid: string\n chartMetadata: ChartMetadata\n chartLibrary: string\n colors: {\n [key: string]: string\n }\n hoveredRow: number\n hoveredX: number | null\n legendFormatValue: (value: number | string | null) => number | string\n onDimensionClick: (clickedDimensionName: string, event: React.MouseEvent) => void\n selectedDimensions: string[]\n showLatestOnBlur: boolean\n unitsCurrent: string\n viewBefore: number\n legendToolbox: JSX.Element\n resizeHandler: React.ReactNode\n}\n\nexport const ChartTimeframe = ({\n chartMetadata,\n showUndefined,\n hoveredX,\n viewBefore,\n chartData,\n}: any) => {\n const { localeDateString, localeTimeString } = useDateTime()\n\n const legendDate = new Date(hoveredX || viewBefore)\n\n return (\n <div>\n <span title={legendPluginModuleString(true, chartMetadata)}>\n {showUndefined\n ? legendPluginModuleString(false, chartMetadata)\n : localeDateString(legendDate)}\n </span>\n <S.DateTimeSeparator>|</S.DateTimeSeparator>\n <span title={legendResolutionTooltip(chartData, chartMetadata)}>\n {showUndefined ? chartMetadata.context.toString() : localeTimeString(legendDate)}\n </span>\n </div>\n )\n}\n\nexport const ChartLegendBottom = ({\n chartUuid,\n chartMetadata,\n colors,\n hoveredRow,\n hoveredX,\n legendFormatValue,\n onDimensionClick,\n selectedDimensions,\n showLatestOnBlur,\n unitsCurrent,\n viewBefore,\n legendToolbox,\n resizeHandler,\n}: Props) => {\n const showUndefined = hoveredRow === -1 && !showLatestOnBlur\n const chartData = useSelector(\n useCallback((state: any) => selectChartData(state, { id: chartUuid }), [chartUuid])\n )\n const { dimension_names: dimensionNames, dimension_ids: dimensionIds } = chartData\n\n return (\n <S.LegendContainer>\n <S.LegendFirstRow>\n <S.LegendUnit>{unitsCurrent}</S.LegendUnit>\n <ChartTimeframe\n chartMetadata={chartMetadata}\n showUndefined={showUndefined}\n hoveredX={hoveredX}\n viewBefore={viewBefore}\n chartData={chartData}\n />\n </S.LegendFirstRow>\n <S.LegendSecondRow>\n <S.LegendItems>\n {dimensionIds.map((dimensionId, i) => {\n const dimensionName = dimensionNames[i]\n const color = colors[dimensionName]\n\n const isSelected =\n selectedDimensions.length === 0 || selectedDimensions.includes(dimensionName)\n\n let value\n if (showUndefined) {\n value = null\n } else if (hoveredRow !== -1) {\n const hoveredValueArray = chartData.result.data[hoveredRow]\n // [timestamp, valueDim1, valueDim2, ...]\n value = hoveredValueArray ? hoveredValueArray[i + 1] : null\n } else {\n value = chartData.view_latest_values[i]\n }\n return (\n <S.DimensionItem\n color={color}\n onClick={event => {\n onDimensionClick(dimensionName, event)\n }}\n role=\"button\"\n tabIndex={0}\n isDisabled={!isSelected}\n key={dimensionId}\n >\n <S.DimensionIcon title={dimensionName} color={color} />\n <LegendText id={chartUuid} index={i} />\n <S.DimensionValue>{isSelected && legendFormatValue(value)}</S.DimensionValue>\n </S.DimensionItem>\n )\n })}\n <S.DimensionItemToolboxPlaceholder />\n </S.LegendItems>\n <S.ToolboxContainer>\n {legendToolbox}\n {resizeHandler}\n </S.ToolboxContainer>\n </S.LegendSecondRow>\n </S.LegendContainer>\n )\n}\n","import React, { useCallback } from \"react\"\n\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectChartData } from \"domains/chart/selectors\"\nimport { getNewSelectedDimensions } from \"domains/chart/utils/legend-utils\"\nimport { Attributes } from \"../utils/transformDataAttributes\"\nimport { ChartMetadata } from \"../chart-types\"\n\nimport { ChartLegendRight } from \"./chart-legend-right\"\nimport { ChartLegendBottom } from \"./chart-legend-bottom\"\n\ninterface Props {\n attributes: Attributes\n chartUuid: string\n chartMetadata: ChartMetadata\n chartLibrary: string\n colors: {\n [key: string]: string\n }\n hoveredRow: number\n hoveredX: number | null\n legendFormatValue: (value: number | string | null) => number | string\n selectedDimensions: string[]\n setSelectedDimensions: (selectedDimensions: string[]) => void\n showLatestOnBlur: boolean\n unitsCurrent: string\n viewBefore: number\n legendToolbox: JSX.Element\n resizeHandler: React.ReactNode\n}\n\nexport const ChartLegend = ({\n attributes,\n chartUuid,\n chartMetadata,\n chartLibrary,\n colors,\n hoveredRow,\n hoveredX,\n legendFormatValue,\n selectedDimensions,\n setSelectedDimensions,\n showLatestOnBlur,\n unitsCurrent,\n viewBefore,\n legendToolbox,\n resizeHandler,\n}: Props) => {\n const dimension_names = useSelector(\n useCallback((state: any) => selectChartData(state, { id: chartUuid }).dimension_names, [\n chartUuid,\n ])\n )\n\n const onDimensionClick = (clickedDimensionName: string, event: React.MouseEvent) => {\n event.preventDefault()\n const isModifierKeyPressed = event.shiftKey || event.ctrlKey\n const newSelectedDimensions = getNewSelectedDimensions({\n allDimensions: dimension_names,\n selectedDimensions,\n clickedDimensionName,\n isModifierKeyPressed,\n })\n setSelectedDimensions(newSelectedDimensions)\n }\n\n if (attributes.legendPosition === \"bottom\") {\n return (\n <ChartLegendBottom\n chartUuid={chartUuid}\n chartLibrary={chartLibrary}\n chartMetadata={chartMetadata}\n colors={colors}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n legendFormatValue={legendFormatValue}\n onDimensionClick={onDimensionClick}\n selectedDimensions={selectedDimensions}\n showLatestOnBlur={showLatestOnBlur}\n unitsCurrent={unitsCurrent}\n viewBefore={viewBefore}\n legendToolbox={legendToolbox}\n resizeHandler={resizeHandler}\n />\n )\n }\n\n return (\n <ChartLegendRight\n chartUuid={chartUuid}\n chartLibrary={chartLibrary}\n chartMetadata={chartMetadata}\n colors={colors}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n legendFormatValue={legendFormatValue}\n onDimensionClick={onDimensionClick}\n selectedDimensions={selectedDimensions}\n showLatestOnBlur={showLatestOnBlur}\n unitsCurrent={unitsCurrent}\n viewBefore={viewBefore}\n />\n )\n}\n","import React from \"react\"\n\nimport { ToolboxButton } from \"./toolbox-button\"\n\ntype ClickCallback = (event: React.MouseEvent) => void\ninterface Props {\n onToolboxLeftClick: ClickCallback\n onToolboxRightClick: ClickCallback\n onToolboxZoomInClick: ClickCallback\n onToolboxZoomOutClick: ClickCallback\n}\nexport const LegendToolbox = ({\n onToolboxLeftClick,\n onToolboxRightClick,\n onToolboxZoomInClick,\n onToolboxZoomOutClick,\n}: Props) => (\n <div className=\"netdata-legend-toolbox\">\n <ToolboxButton\n className=\"netdata-legend-toolbox-button\"\n onClick={onToolboxLeftClick}\n iconType=\"left\"\n popoverTitle=\"Pan Left\"\n popoverContent=\"Pan the chart to the left. You can also <b>drag it</b> with your mouse or your\n finger (on touch devices).<br/><small>Help can be disabled from the settings.</small>\"\n />\n <ToolboxButton\n className=\"netdata-legend-toolbox-button\"\n onClick={onToolboxRightClick}\n iconType=\"right\"\n popoverTitle=\"Pan Right\"\n popoverContent=\"Pan the chart to the right. You can also <b>drag it</b> with your mouse or\n your finger (on touch devices).<br/><small>Help can be disabled from the settings.</small>\"\n />\n <ToolboxButton\n className=\"netdata-legend-toolbox-button\"\n onClick={onToolboxZoomInClick}\n iconType=\"zoomIn\"\n popoverTitle=\"Chart Zoom In\"\n popoverContent=\"Zoom in the chart. You can also press SHIFT and select an area of the chart,\n or press SHIFT or ALT and use the mouse wheel or 2-finger touchpad scroll to zoom in or out.\n <br/><small>Help can be disabled from the settings.</small>\"\n />\n <ToolboxButton\n className=\"netdata-legend-toolbox-button\"\n onClick={onToolboxZoomOutClick}\n iconType=\"zoomOut\"\n popoverTitle=\"Chart Zoom Out\"\n popoverContent=\"Zoom out the chart. You can also press SHIFT or ALT and use the mouse wheel,\n or 2-finger touchpad scroll to zoom in or out.<br/><small>Help can be disabled from the\n settings.</small>\"\n />\n </div>\n)\n","/* eslint-disable no-nested-ternary */\nimport { always, memoizeWith } from \"ramda\"\nimport Color from \"color\"\n\nimport { ChartMetadata, DygraphData } from \"domains/chart/chart-types\"\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartLibraryConfig } from \"domains/chart/utils/chartLibrariesSettings\"\n\nexport const getDataForFakeStacked = (\n data: number[][],\n dimensionsVisibility: boolean[],\n): number[][] => data.map((point) => {\n const [timestamp, ...values] = point\n const rest: number[] = []\n let currentMin = 0\n let currentMax = 0\n values\n .map((value, i) => ({ isVisible: dimensionsVisibility[i], value }))\n // reverse because first dimensions should be \"on top\" (at least positive ones)\n .slice().reverse()\n .forEach(({ isVisible, value }) => {\n if (!isVisible) {\n rest.push(0) // push with value '0'. it won't be visible but needs to be present in array\n return\n }\n if (value >= 0) {\n currentMax += value\n rest.push(currentMax)\n } else {\n currentMin += value\n rest.push(currentMin)\n }\n })\n return [\n timestamp,\n ...rest,\n ]\n})\n\nconst isPercentage = (unit: string) => unit === \"percentage\"\n || unit === \"percent\"\n || unit.indexOf(\"%\") !== -1\n\nexport const getDygraphChartType = (\n attributes: Attributes, chartData: DygraphData, chartMetadata: ChartMetadata,\n chartSettings: ChartLibraryConfig,\n) => {\n const isLogScale = (chartSettings.isLogScale as ((a: Attributes) => boolean))(attributes)\n const {\n dygraphType: dygraphRequestedType = chartMetadata.chart_type,\n groupBy,\n } = attributes\n\n if (groupBy && groupBy !== \"dimension\" && isPercentage(chartMetadata.units)) {\n return \"line\"\n }\n\n // corresponds to state.tmp.dygraph_chart_type in old app\n let dygraphChartType = dygraphRequestedType\n if (dygraphChartType === \"stacked\" && chartData.dimensions === 1) {\n dygraphChartType = \"area\"\n }\n if (dygraphChartType === \"stacked\" && isLogScale) {\n dygraphChartType = \"area\"\n }\n return dygraphChartType\n}\n\nconst getBackgroundColor = memoizeWith(\n always(\"true\"),\n () => Color(window.NETDATA.themes.current.background),\n)\n// when in \"fakeStacked\" mode, we cannot use opacity for fill in charts, because the areas would\n// be visible under each other. So the darkening / whitening needs to be added directly to colors\n// (the colors are too saturated for areas and in stacked mode they were with 0.8 opacity)\nexport const transformColors = (colors: string[]) => (\n colors.map((color) => Color(color).mix(getBackgroundColor(), 0.2).hex())\n)\n\nexport const getDygraphFillAlpha = (\n isFakeStacked: boolean, dygraphChartType: string,\n) => (isFakeStacked\n ? window.NETDATA.options.current.color_fill_opacity_fake_stacked\n : dygraphChartType === \"stacked\"\n ? window.NETDATA.options.current.color_fill_opacity_stacked\n : window.NETDATA.options.current.color_fill_opacity_area)\n\n\n// https://github.com/danvk/dygraphs/blob/master/src/iframe-tarp.js#L1-L23\n// On mouseUp dygraphs put rectangles above all iframes so mouseUp can be properly intercepted.\n// this causes a problem with some analytics iframes that place themselves in regions where they\n// aren't visible anyway (for example hubspot iframe on Cloud), and this creates a problematic\n// horizontal scrollbar to appear. This function filters those \"rectangles\" (tarps) to omit\n// elements with unreachable \"left\" styles\nexport const hackDygraphIFrameTarps = (tarps: HTMLDivElement[]): HTMLDivElement[] => (\n tarps.filter((element: HTMLDivElement) => {\n const isOutsideReasonableViewport = Number(element.style.left.replace(\"px\", \"\")) > 10000\n if (isOutsideReasonableViewport) {\n element.parentNode!.removeChild(element)\n }\n return !isOutsideReasonableViewport\n })\n)\n","/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable function-paren-newline */\n/* eslint-disable comma-dangle */\nimport React, { useRef, useCallback } from \"react\"\nimport { useToggle } from \"react-use\"\n\nconst useProceededChart = (\n chartRef: any,\n propsRef: any\n): [boolean, React.Ref<HTMLElement>, (g: Dygraph) => void] => {\n const [proceeded, toggleProceeded] = useToggle(false)\n\n const ref = useRef<HTMLElement>(null)\n\n const updatePosition = useCallback((g: Dygraph) => {\n const { x } = g.getArea()\n const distance = g.toDomXCoord(propsRef.current.chartData.first_entry * 1000)\n const hasProceeded = distance > x\n toggleProceeded(hasProceeded)\n\n if (hasProceeded && ref.current) {\n const { height } = chartRef.current.getBoundingClientRect()\n ref.current.style.left = `${x}px`\n ref.current.style.right = `calc(100% - ${distance}px)`\n ref.current.style.top = `${height / 2}px`\n }\n }, [])\n\n return [proceeded, ref, updatePosition]\n}\n\nexport default useProceededChart\n","import { useRef } from \"react\"\nimport { useToggle } from \"react-use\"\n\nconst badgeTopMargin = \"40px\"\n\nconst defaultPositionTo = (ref, x, position, topMargin) => {\n ref.current.style.left = `${x}px`\n ref.current.style.right = `calc(100% - ${position}px)`\n ref.current.style.top = topMargin\n}\n\nexport default () => {\n const [isRendered, toggleIsRendered] = useToggle(false)\n\n const ref = useRef(null)\n\n const updatePosition = (isVisible, g, position, positionTo = defaultPositionTo) => {\n if (!isVisible) {\n toggleIsRendered(false)\n return\n }\n\n if (ref.current) {\n toggleIsRendered(true)\n const { x } = g.getArea()\n\n positionTo(ref, x, position, badgeTopMargin)\n }\n }\n\n return [isRendered, ref, updatePosition]\n}\n","import React, { forwardRef } from \"react\"\nimport styled from \"styled-components\"\n\nconst Container = styled.div`\n display: block;\n`\n\nconst ProceededChartDisclaimer = forwardRef((\n props: React.HTMLAttributes<HTMLElement>,\n ref: React.Ref<HTMLDivElement>,\n) => (\n <Container ref={ref} className=\"dygraph__history-tip\" data-testid=\"proceededChartDisclaimer\">\n <span className=\"dygraph__history-tip-content\">\n Want to extend your history of real-time metrics?\n <br />\n <a href=\"https://learn.netdata.cloud/guides/longer-metrics-storage/\" target=\"_blank\" rel=\"noopener noreferrer\" data-testid=\"proceededChartDisclaimer-configure\">\n Configure Netdata's \n <b>history</b>\n </a>\n or use the \n <a href=\"https://learn.netdata.cloud/docs/agent/database/engine/\" target=\"_blank\" rel=\"noopener noreferrer\" data-testid=\"proceededChartDisclaimer-engine\">DB engine</a>\n .\n </span>\n </Container>\n))\n\nexport default ProceededChartDisclaimer\n","import React, { forwardRef } from \"react\"\nimport styled from \"styled-components\"\n\nconst backgroundColorMap = {\n WARNING: \"#FFF8E1\",\n CRITICAL: \"#FFEBEF\",\n CLEAR: \"#E5F5E8\",\n}\nexport const getBackgroundColor = (status) => backgroundColorMap[status] || null\n\nconst borderColorMap = {\n WARNING: \"#FFC300\",\n CRITICAL: \"#F59B9B\",\n CLEAR: \"#68C47D\",\n}\nexport const getBorderColor = (status) => borderColorMap[status] || null\n\nconst textColorMap = {\n WARNING: \"#536775\",\n CRITICAL: \"#FF4136\",\n CLEAR: \"#00AB44\",\n}\nexport const getColor = (status) => textColorMap[status] || null\n\nconst Container = styled.div`\n position: absolute;\n margin-right: 10px;\n overflow: hidden;\n pointer-events: none;\n direction: rtl;\n z-index: 10; // higher than chart\n`\n\nconst Badge = styled.div`\n display: inline-block;\n border-radius: 36px;\n padding: 2px 12px;\n background: ${({ background }) => background};\n border: 1px solid ${({ border }) => border};\n color: ${({ color }) => color};\n font-size: 12px;\n font-weight: 700;\n direction: ltr;\n white-space: nowrap;\n`\n\nexport default forwardRef((\n { isVisible, status, label },\n ref,\n) => (\n <Container ref={ref}>\n {isVisible && (\n <Badge\n background={getBackgroundColor(status)}\n border={getBorderColor(status)}\n color={getColor(status)}\n >\n {label}\n </Badge>\n )}\n </Container>\n))\n","//@ts-nocheck\nimport { sortBy, reverse } from \"ramda\"\nimport React, { useLayoutEffect, useRef, useCallback } from \"react\"\nimport classNames from \"classnames\"\nimport { useUpdateEffect, useUnmount, useMount } from \"react-use\"\n// this version is needed because it contains a fix for handling constant value in the chart\n// ie. https://github.com/danvk/dygraphs/pull/909\nimport Dygraph from \"vendor/dygraph-c91c859.min\"\nimport \"dygraphs/src-es5/extras/smooth-plotter\"\nimport ResizeObserver from \"resize-observer-polyfill\"\n\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { AppStateT } from \"store/app-state\"\nimport { DygraphArea, NetdataDygraph } from \"types/vendor-overrides\"\nimport { TimeRange } from \"types/common\"\nimport { useDateTime } from \"utils/date-time\"\nimport { debounce } from \"utils/debounce\"\n\nimport {\n selectCommonMin,\n selectCommonMax,\n selectGlobalChartUnderlay,\n selectGlobalSelectionMaster,\n selectSmoothPlot,\n selectSyncPanAndZoom,\n selectSpacePanelTransitionEndIsActive,\n selectAlarm,\n selectTimezoneSetting,\n} from \"domains/global/selectors\"\nimport {\n resetGlobalPanAndZoomAction,\n setCommonMaxAction,\n setCommonMinAction,\n setGlobalPauseAction,\n resetGlobalPauseAction,\n} from \"domains/global/actions\"\n\nimport { resetChartPanAndZoomAction } from \"domains/chart/actions\"\n\nimport { Attributes } from \"../../utils/transformDataAttributes\"\nimport {\n chartLibrariesSettings,\n ChartLibraryConfig,\n ChartLibraryName,\n} from \"../../utils/chartLibrariesSettings\"\nimport { ChartMetadata, DygraphData } from \"../../chart-types\"\nimport { selectResizeHeight } from \"../../selectors\"\n\nimport {\n getDygraphChartType,\n getDataForFakeStacked,\n transformColors,\n getDygraphFillAlpha,\n hackDygraphIFrameTarps,\n} from \"./dygraph/utils\"\nimport \"./dygraph-chart.css\"\n\nimport useProceededChart from \"../../hooks/use-proceeded-chart\"\nimport useDygraphBadge from \"../../hooks/useDygraphBadge\"\nimport ProceededChartDisclaimer from \"./proceeded-chart-disclaimer\"\nimport AlarmBadge, { getBorderColor } from \"./alarmBadge\"\n\n// This is the threshold above which we assume chart shown duration has changed\nconst timeframeThreshold = 5000\nconst dygraphResizeDebounceTime = 500\n\ntype IsInRangeOfAvailableData = (props: {\n after: number, before: number, chartData: DygraphData,\n}) => boolean\nconst isInRangeOfAvailableData: IsInRangeOfAvailableData = ({ after, before, chartData }) => (\n after >= (chartData.first_entry * 1000) && before <= (chartData.last_entry * 1000)\n)\n\ninterface GetInitialDygraphOptions {\n attributes: Attributes,\n chartData: DygraphData,\n chartMetadata: ChartMetadata,\n chartSettings: ChartLibraryConfig,\n dimensionsVisibility: boolean[]\n hiddenLabelsElementId: string,\n isFakeStacked: boolean,\n orderedColors: string[],\n setMinMax: (minMax: TimeRange) => void\n shouldSmoothPlot: boolean,\n unitsCurrent: string,\n xAxisDateString: (d: Date) => string,\n xAxisTimeString: (d: Date) => string,\n}\nconst getInitialDygraphOptions = ({\n attributes,\n chartData,\n chartMetadata,\n chartSettings,\n dimensionsVisibility,\n hiddenLabelsElementId,\n isFakeStacked,\n orderedColors,\n setMinMax,\n shouldSmoothPlot,\n unitsCurrent,\n xAxisDateString,\n xAxisTimeString,\n}: GetInitialDygraphOptions) => {\n const isSparkline = attributes.dygraphTheme === \"sparkline\"\n const highlightCircleSize = isSparkline ? 3 : 4\n\n const isLogScale = (chartSettings.isLogScale as ((a: Attributes) => boolean))(attributes)\n const dygraphChartType = getDygraphChartType(attributes, chartData, chartMetadata, chartSettings)\n const {\n dygraphSmooth = dygraphChartType === \"line\"\n && !isSparkline,\n dygraphDrawAxis = true,\n legendPosition,\n } = attributes\n const isLegendOnBottom = legendPosition === \"bottom\"\n const {\n // destructuring with default values\n dygraphColors = orderedColors,\n dygraphRightGap = 5,\n dygraphShowRangeSelector = false,\n dygraphShowRoller = false,\n dygraphTitle = attributes.title || chartMetadata.title,\n dygraphTitleHeight = 19,\n dygraphLegend = \"always\",\n dygraphLabelsDiv = hiddenLabelsElementId,\n dygraphLabelsSeparateLine = true,\n dygraphIncludeZero = dygraphChartType === \"stacked\",\n dygraphShowZeroValues = true,\n dygraphShowLabelsOnHighLight = true,\n dygraphHideOverlayOnMouseOut = true,\n dygraphXRangePad = 0,\n dygraphYRangePad = 1,\n dygraphValueRange = [null, null],\n dygraphYLabelWidth = 12,\n // eslint-disable-next-line no-nested-ternary\n dygraphStrokeWidth = dygraphChartType === \"stacked\"\n ? 0.1\n : (dygraphSmooth === true\n ? 1.5\n : 0.7),\n\n dygraphStrokePattern,\n dygraphDrawPoints = false,\n dygraphDrawGapEdgePoints = true,\n dygraphConnectSeparatedPoints = false,\n dygraphPointSize = 1,\n dygraphStepPlot = false,\n dygraphStrokeBorderColor = window.NETDATA.themes.current.background,\n dygraphStrokeBorderWidth = 0,\n dygraphFillGraph = (dygraphChartType === \"area\" || dygraphChartType === \"stacked\"),\n dygraphFillAlpha = getDygraphFillAlpha(isFakeStacked, dygraphChartType),\n dygraphStackedGraph = dygraphChartType === \"stacked\" && !isFakeStacked,\n dygraphStackedGraphNanFill = \"none\",\n dygraphAxisLabelFontSize = 10,\n dygraphAxisLineColor = window.NETDATA.themes.current.axis,\n dygraphAxisLineWidth = 1.0,\n dygraphDrawGrid = true,\n dygraphGridLinePattern,\n dygraphGridLineWidth = 1.0,\n dygraphGridLineColor = window.NETDATA.themes.current.grid,\n dygraphMaxNumberWidth = 8,\n dygraphSigFigs,\n dygraphDigitsAfterDecimal = 2,\n dygraphHighlighCircleSize = highlightCircleSize,\n dygraphHighlightSeriesOpts,\n dygraphHighlightSeriesBackgroundAlpha,\n\n dygraphXPixelsPerLabel = 50,\n dygraphXAxisLabelWidth = 60,\n dygraphDrawXAxis = dygraphDrawAxis,\n dygraphYPixelsPerLabel = 15,\n dygraphYAxisLabelWidth = isLegendOnBottom ? 30 : 50,\n dygraphDrawYAxis = dygraphDrawAxis,\n } = attributes\n return {\n colors: isFakeStacked ? transformColors(reverse(dygraphColors)) : dygraphColors,\n\n // leave a few pixels empty on the right of the chart\n rightGap: isSparkline ? 0 : dygraphRightGap,\n showRangeSelector: dygraphShowRangeSelector,\n showRoller: dygraphShowRoller,\n title: isSparkline ? undefined : dygraphTitle,\n titleHeight: dygraphTitleHeight,\n legend: dygraphLegend, // we need this to get selection events\n labels: chartData.result.labels,\n labelsDiv: dygraphLabelsDiv,\n\n labelsSeparateLines: isSparkline ? true : dygraphLabelsSeparateLine,\n labelsShowZeroValues: isLogScale ? false : dygraphShowZeroValues,\n labelsKMB: false,\n labelsKMG2: false,\n showLabelsOnHighlight: dygraphShowLabelsOnHighLight,\n hideOverlayOnMouseOut: dygraphHideOverlayOnMouseOut,\n includeZero: dygraphIncludeZero,\n xRangePad: dygraphXRangePad,\n yRangePad: isSparkline ? 1 : dygraphYRangePad,\n valueRange: dygraphValueRange,\n ylabel: (isSparkline || isLegendOnBottom) ? undefined : unitsCurrent,\n yLabelWidth: (isSparkline || isLegendOnBottom) ? 0 : dygraphYLabelWidth,\n\n // the function to plot the chart\n plotter: (dygraphSmooth && shouldSmoothPlot) ? window.smoothPlotter : null,\n\n // The width of the lines connecting data points.\n // This can be used to increase the contrast or some graphs.\n strokeWidth: dygraphStrokeWidth,\n strokePattern: dygraphStrokePattern,\n\n // The size of the dot to draw on each point in pixels (see drawPoints).\n // A dot is always drawn when a point is \"isolated\",\n // i.e. there is a missing point on either side of it.\n // This also controls the size of those dots.\n drawPoints: dygraphDrawPoints,\n\n // Draw points at the edges of gaps in the data.\n // This improves visibility of small data segments or other data irregularities.\n drawGapEdgePoints: dygraphDrawGapEdgePoints,\n connectSeparatedPoints: isLogScale ? false : dygraphConnectSeparatedPoints,\n pointSize: dygraphPointSize,\n\n // enabling this makes the chart with little square lines\n stepPlot: dygraphStepPlot,\n\n // Draw a border around graph lines to make crossing lines more easily\n // distinguishable. Useful for graphs with many lines.\n strokeBorderColor: dygraphStrokeBorderColor,\n strokeBorderWidth: dygraphStrokeBorderWidth,\n fillGraph: dygraphFillGraph,\n fillAlpha: dygraphFillAlpha,\n stackedGraph: dygraphStackedGraph,\n stackedGraphNaNFill: dygraphStackedGraphNanFill,\n drawAxis: isSparkline ? false : dygraphDrawAxis,\n axisLabelFontSize: dygraphAxisLabelFontSize,\n axisLineColor: dygraphAxisLineColor,\n axisLineWidth: dygraphAxisLineWidth,\n drawGrid: isSparkline ? false : dygraphDrawGrid,\n gridLinePattern: dygraphGridLinePattern,\n gridLineWidth: dygraphGridLineWidth,\n gridLineColor: dygraphGridLineColor,\n maxNumberWidth: dygraphMaxNumberWidth,\n sigFigs: dygraphSigFigs,\n digitsAfterDecimal: dygraphDigitsAfterDecimal,\n highlightCircleSize: dygraphHighlighCircleSize,\n highlightSeriesOpts: dygraphHighlightSeriesOpts, // TOO SLOW: { strokeWidth: 1.5 },\n // TOO SLOW: (state.tmp.dygraph_chart_type === 'stacked')?0.7:0.5,\n highlightSeriesBackgroundAlpha: dygraphHighlightSeriesBackgroundAlpha,\n visibility: dimensionsVisibility,\n logscale: isLogScale,\n\n axes: {\n x: {\n pixelsPerLabel: dygraphXPixelsPerLabel,\n // insufficient typings for Dygraph\n // @ts-ignore\n ticker: Dygraph.dateTicker,\n axisLabelWidth: dygraphXAxisLabelWidth,\n drawAxis: isSparkline ? false : dygraphDrawXAxis,\n axisLabelFormatter: (d: Date | number) => ((d as Date).toTimeString().startsWith(\"00:00:00\")\n ? xAxisDateString(d as Date)\n : xAxisTimeString(d as Date)\n ),\n },\n y: {\n logscale: isLogScale,\n pixelsPerLabel: dygraphYPixelsPerLabel,\n axisLabelWidth: dygraphYAxisLabelWidth,\n drawAxis: isSparkline ? false : dygraphDrawYAxis,\n // axisLabelFormatter is added on the updates\n axisLabelFormatter(y: Date | number) {\n const formatter = setMinMax([\n // @ts-ignore\n // eslint-disable-next-line no-underscore-dangle\n this.axes_[0].extremeRange[0],\n // @ts-ignore\n // eslint-disable-next-line no-underscore-dangle\n this.axes_[0].extremeRange[1],\n ]) as unknown as ((value: Date | number) => string)\n return formatter(y as number)\n },\n },\n },\n }\n}\n\ninterface Props {\n attributes: Attributes\n chartData: DygraphData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n chartLibrary: ChartLibraryName\n chartUuid: string\n colors: {\n [key: string]: string\n }\n dimensionsVisibility: boolean[]\n hasEmptyData: boolean\n hasLegend: boolean\n isRemotelyControlled: boolean\n onUpdateChartPanAndZoom: (arg: {\n after: number, before: number,\n callback: (after: number, before: number) => void,\n masterID: string,\n shouldNotExceedAvailableRange: boolean,\n }) => void\n orderedColors: string[]\n immediatelyDispatchPanAndZoom: () => void\n\n hoveredRow: number\n hoveredX: number | null\n setGlobalChartUnderlay: (arg: { after: number, before: number, masterID: string }) => void\n setHoveredX: (hoveredX: number | null, noMaster?: boolean) => void\n setMinMax: (minMax: TimeRange) => void\n unitsCurrent: string\n viewAfter: number\n viewBefore: number\n}\nexport const DygraphChart = ({\n attributes,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n chartLibrary,\n // colors,\n chartUuid,\n dimensionsVisibility,\n hasEmptyData,\n hasLegend,\n isRemotelyControlled,\n onUpdateChartPanAndZoom,\n orderedColors,\n immediatelyDispatchPanAndZoom,\n\n hoveredRow,\n hoveredX,\n setGlobalChartUnderlay,\n setHoveredX,\n setMinMax,\n unitsCurrent,\n viewAfter,\n viewBefore,\n}: Props) => {\n const globalChartUnderlay = useSelector(selectGlobalChartUnderlay)\n const selectedAlarm = useSelector(selectAlarm)\n const alarm = selectedAlarm?.chartId === chartData.id ? selectedAlarm : null\n\n const timezone = useSelector(selectTimezoneSetting)\n\n const { xAxisDateString, xAxisTimeString } = useDateTime()\n const chartSettings = chartLibrariesSettings[chartLibrary]\n const hiddenLabelsElementId = `${chartUuid}-hidden-labels-id`\n\n const dygraphChartType = getDygraphChartType(attributes, chartData, chartMetadata, chartSettings)\n // isFakeStacked - is a special mode for displaying stacked charts with both positive and negative\n // values. Dygraph.js doesn't support it so in this case we need to sum the values manually\n // and display the chart as \"area\" type, but with keeping all styling (fill etc.) properties\n // as in \"stacked\" type\n // because first values need to be \"on top\" (at least for positive values), the dimension order\n // needs to be reversed (in getDataForFakeStacked function and when assigning dimension colors)\n const isFakeStacked = chartData.min < 0 && dygraphChartType === \"stacked\"\n const dygraphFillAlpha = getDygraphFillAlpha(isFakeStacked, dygraphChartType)\n\n const chartElement = useRef<HTMLDivElement>(null)\n\n const updateChartPanOrZoom = useCallback(({\n after, before,\n callback,\n shouldNotExceedAvailableRange,\n }) => {\n onUpdateChartPanAndZoom({\n after,\n before,\n callback,\n masterID: chartUuid,\n shouldNotExceedAvailableRange,\n })\n }, [chartUuid, onUpdateChartPanAndZoom])\n\n // keep in ref to prevent additional updates\n const dygraphInstance = useRef<Dygraph | null>()\n // state.tmp.dygraph_user_action in old dashboard\n const latestIsUserAction = useRef(false)\n // state.tmp.dygraph_mouse_down in old dashboard\n const isMouseDown = useRef(false)\n // state.tmp.dygraph_highlight_after in old dashboard\n const dygraphHighlightAfter = useRef<null | number>(null)\n // state.dygraph_last_touch_move in old dashboard\n const dygraphLastTouchMove = useRef(0)\n // state.dygraph_last_touch_page_x in old dashboard\n const dygraphLastTouchPageX = useRef(0)\n // state.dygraph_last_touch_end in old dashboard\n const dygraphLastTouchEnd = useRef<undefined | number>()\n\n const dispatch = useDispatch()\n const isSyncPanAndZoom = useSelector(selectSyncPanAndZoom)\n\n const resetGlobalPanAndZoom = useCallback(() => {\n latestIsUserAction.current = false // prevent starting panAndZoom\n if (dygraphInstance.current) {\n // todo on toolbox reset click, do updateOptions({ dateWindow: null })\n // (issue existed also before rewrite)\n dygraphInstance.current.updateOptions({\n // reset dateWindow to the current\n // @ts-ignore external typings dont support null\n dateWindow: null,\n })\n }\n\n if (isSyncPanAndZoom) {\n dispatch(resetGlobalPanAndZoomAction())\n } else {\n dispatch(resetChartPanAndZoomAction({ id: chartUuid }))\n }\n }, [chartUuid, dispatch, isSyncPanAndZoom])\n\n const [isAlarmBadgeVisible, alarmBadgeRef, updateAlarmBadge] = useDygraphBadge() as any\n\n // setGlobalChartUnderlay is using state from closure (chartData.after), so we need to have always\n // the newest callback. Unfortunately we cannot use Dygraph.updateOptions() (library restriction)\n // for interactionModel callbacks so we need to keep the callback in mutable ref\n const propsRef = useRef({\n alarm,\n chartData,\n globalChartUnderlay,\n hoveredX,\n immediatelyDispatchPanAndZoom,\n // put it to ref to prevent additional updateOptions() after creating dygraph\n resetGlobalPanAndZoom,\n setGlobalChartUnderlay,\n updateAlarmBadge,\n updateChartPanOrZoom,\n viewAfter,\n viewBefore,\n })\n\n const [\n isProceeded, precededChartRef, updatePrecededPosition,\n ] = useProceededChart(chartElement, propsRef)\n\n useLayoutEffect(() => {\n propsRef.current.alarm = alarm\n propsRef.current.chartData = chartData\n propsRef.current.hoveredX = hoveredX\n propsRef.current.immediatelyDispatchPanAndZoom = immediatelyDispatchPanAndZoom\n propsRef.current.globalChartUnderlay = globalChartUnderlay\n propsRef.current.resetGlobalPanAndZoom = resetGlobalPanAndZoom\n propsRef.current.setGlobalChartUnderlay = setGlobalChartUnderlay\n propsRef.current.updateAlarmBadge = updateAlarmBadge\n propsRef.current.updateChartPanOrZoom = updateChartPanOrZoom\n propsRef.current.viewAfter = viewAfter\n propsRef.current.viewBefore = viewBefore\n }, [\n alarm,\n chartData,\n globalChartUnderlay,\n hoveredX,\n immediatelyDispatchPanAndZoom,\n resetGlobalPanAndZoom,\n setGlobalChartUnderlay,\n updateAlarmBadge,\n updateChartPanOrZoom,\n viewAfter,\n viewBefore,\n ])\n\n const shouldSmoothPlot = useSelector(selectSmoothPlot)\n useLayoutEffect(() => {\n if (chartElement && chartElement.current && !dygraphInstance.current && !hasEmptyData) {\n const dygraphOptionsStatic = getInitialDygraphOptions({\n attributes,\n chartData,\n chartMetadata,\n chartSettings,\n dimensionsVisibility,\n hiddenLabelsElementId,\n isFakeStacked,\n orderedColors,\n setMinMax,\n shouldSmoothPlot,\n unitsCurrent,\n xAxisDateString,\n xAxisTimeString,\n })\n\n latestIsUserAction.current = false\n\n const dygraphOptions = {\n ...dygraphOptionsStatic,\n // set dateWindow on init - this is needed when chart is globalPanAndZoom-master\n // and user scrolls down/up so the chart hides and then unhides. This causes the chart\n // to re-create, but the data has additional padding which should be outside of\n // visible range\n dateWindow: [propsRef.current.viewAfter, propsRef.current.viewBefore],\n\n highlightCallback(\n event: MouseEvent, xval: number,\n ) {\n // todo\n // state.pauseChart()\n\n const newHoveredX = isMouseDown.current\n ? null\n : xval\n\n const currentHoveredX = propsRef.current.hoveredX\n if (newHoveredX !== currentHoveredX) {\n setHoveredX(newHoveredX)\n }\n },\n\n unhighlightCallback() {\n // todo\n // state.unpauseChart();\n if (propsRef.current.hoveredX !== null) {\n setHoveredX(null)\n }\n },\n drawCallback(dygraph: Dygraph) {\n // the user has panned the chart and this is called to re-draw the chart\n // 1. refresh this chart by adding data to it\n // 2. notify all the other charts about the update they need\n\n // to prevent an infinite loop (feedback), we use\n // state.tmp.dygraph_user_action\n // - when true, this is initiated by a user\n // - when false, this is feedback\n\n if (latestIsUserAction.current) {\n latestIsUserAction.current = false\n const xRange = dygraph.xAxisRange()\n const after = Math.round(xRange[0])\n const before = Math.round(xRange[1])\n\n if (isInRangeOfAvailableData({\n after, before, chartData: propsRef.current.chartData,\n })) {\n propsRef.current.updateChartPanOrZoom({ after, before })\n }\n }\n },\n zoomCallback: (minDate: number, maxDate: number) => {\n latestIsUserAction.current = true\n propsRef.current.updateChartPanOrZoom({ after: minDate, before: maxDate })\n },\n\n underlayCallback(canvas: CanvasRenderingContext2D, area: DygraphArea, g: Dygraph) {\n updatePrecededPosition(g)\n\n if (propsRef.current.alarm) {\n const { alarm: currentAlarm } = propsRef.current\n\n const alarmPosition = g.toDomXCoord(currentAlarm.when * 1000)\n const fillColor = getBorderColor(currentAlarm.status)\n const horizontalPadding = 3\n // use RAF, because dygraph doesn't provide any callback called after drawing the chart\n requestAnimationFrame(() => {\n canvas.fillStyle = fillColor\n const globalAlphaCache = canvas.globalAlpha\n canvas.globalAlpha = 0.7\n canvas.fillRect(alarmPosition - horizontalPadding, area.y, 2 * horizontalPadding, area.h)\n canvas.globalAlpha = globalAlphaCache\n })\n\n propsRef.current.updateAlarmBadge(\n propsRef.current.alarm,\n g,\n alarmPosition - horizontalPadding,\n )\n }\n\n // the chart is about to be drawn\n // this function renders global highlighted time-frame\n\n if (propsRef.current.globalChartUnderlay) {\n const { after, before } = propsRef.current.globalChartUnderlay\n\n if (after < before) {\n const HIGHLIGHT_HORIZONTAL_PADDING = 20\n const bottomLeft = g.toDomCoords(after, -HIGHLIGHT_HORIZONTAL_PADDING)\n const topRight = g.toDomCoords(before, HIGHLIGHT_HORIZONTAL_PADDING)\n\n const left = bottomLeft[0]\n const right = topRight[0]\n\n // eslint-disable-next-line no-param-reassign\n canvas.fillStyle = window.NETDATA.themes.current.highlight\n canvas.fillRect(left, area.y, right - left, area.h)\n }\n }\n },\n\n // interactionModel cannot be replaced with updateOptions(). we need to keep all changing\n // values and callbacks in mutable ref,\n interactionModel: {\n mousedown(event: MouseEvent, dygraph: Dygraph, context: any) {\n // Right-click should not initiate anything.\n if (event.button && event.button === 2) {\n return\n }\n\n latestIsUserAction.current = true\n isMouseDown.current = true\n context.initializeMouseDown(event, dygraph, context)\n\n // limit problematic dygraph's feature, more info above the function\n // eslint-disable-next-line no-param-reassign\n context.tarp.tarps = hackDygraphIFrameTarps(context.tarp.tarps)\n\n dispatch(setGlobalPauseAction())\n\n if (event.button && event.button === 1) {\n // middle mouse button\n\n if (event.shiftKey) {\n // panning\n dygraphHighlightAfter.current = null\n // @ts-ignore\n Dygraph.startPan(event, dygraph, context)\n } else if (event.altKey || event.ctrlKey || event.metaKey) {\n // middle mouse button highlight\n dygraphHighlightAfter.current = dygraph.toDataXCoord(event.offsetX)\n // @ts-ignore\n Dygraph.startZoom(event, dygraph, context)\n } else {\n // middle mouse button selection for zoom\n dygraphHighlightAfter.current = null\n // @ts-ignore\n Dygraph.startZoom(event, dygraph, context)\n }\n } else if (event.shiftKey) {\n // left mouse button selection for zoom (ZOOM)\n dygraphHighlightAfter.current = null\n // @ts-ignore\n Dygraph.startZoom(event, dygraph, context)\n } else if (event.altKey || event.ctrlKey || event.metaKey) {\n // left mouse button highlight\n dygraphHighlightAfter.current = dygraph.toDataXCoord(event.offsetX)\n // @ts-ignore\n Dygraph.startZoom(event, dygraph, context)\n } else {\n // left mouse button dragging (PAN)\n dygraphHighlightAfter.current = null\n // @ts-ignore\n Dygraph.startPan(event, dygraph, context)\n }\n },\n\n mousemove(event: MouseEvent, dygraph: Dygraph, context: any) {\n // if (state.tmp.dygraph_highlight_after !== null) {\n // else if (\n if (dygraphHighlightAfter.current !== null) {\n // highlight selection\n latestIsUserAction.current = true\n // @ts-ignore\n Dygraph.moveZoom(event, dygraph, context)\n event.preventDefault()\n } else if (context.isPanning) {\n latestIsUserAction.current = true\n // eslint-disable-next-line no-param-reassign\n context.is2DPan = false\n // @ts-ignore\n Dygraph.movePan(event, dygraph, context)\n } else if (context.isZooming) {\n // @ts-ignore\n Dygraph.moveZoom(event, dygraph, context)\n }\n },\n\n mouseup(event: MouseEvent, dygraph: Dygraph, context: any) {\n isMouseDown.current = false\n if (dygraphHighlightAfter.current !== null) {\n const sortedRange = sortBy((x) => +x, [\n dygraphHighlightAfter.current,\n dygraph.toDataXCoord(event.offsetX),\n ])\n\n propsRef.current.setGlobalChartUnderlay({\n after: sortedRange[0],\n before: sortedRange[1],\n masterID: chartData.id,\n })\n dygraphHighlightAfter.current = null\n // eslint-disable-next-line no-param-reassign\n context.isZooming = false\n\n // old dashboard code\n // @ts-ignore\n // eslint-disable-next-line no-underscore-dangle\n dygraph.clearZoomRect_()\n // this call probably fixes the broken selection circle during highlighting\n // and forces underlayCallback to fire (and draw highlight-rect\n // @ts-ignore\n // eslint-disable-next-line no-underscore-dangle\n dygraph.drawGraph_(false)\n } else if (context.isPanning) {\n latestIsUserAction.current = true\n // @ts-ignore\n Dygraph.endPan(event, dygraph, context)\n propsRef.current.immediatelyDispatchPanAndZoom()\n } else if (context.isZooming) {\n latestIsUserAction.current = true\n // @ts-ignore\n Dygraph.endZoom(event, dygraph, context)\n propsRef.current.immediatelyDispatchPanAndZoom()\n }\n },\n\n wheel(event: WheelEvent, dygraph: Dygraph) {\n if (!event.shiftKey && !event.altKey) return\n\n latestIsUserAction.current = true\n event.preventDefault()\n event.stopPropagation()\n\n // https://dygraphs.com/gallery/interaction-api.js\n const zoom = (g, zoomInPercentage, bias) => {\n bias = bias || 0.5\n const [afterAxis, beforeAxis] = g.xAxisRange()\n const delta = beforeAxis - afterAxis\n const increment = delta * zoomInPercentage\n const [afterIncrement, beforeIncrement] = [increment * bias, increment * (1 - bias)]\n\n const after = afterAxis + afterIncrement\n const before = beforeAxis - beforeIncrement\n\n propsRef.current.updateChartPanOrZoom({\n after,\n before,\n shouldNotExceedAvailableRange: true,\n callback: (updatedAfter: number, updatedBefore: number) => {\n dygraph.updateOptions({\n dateWindow: [updatedAfter, updatedBefore],\n })\n },\n })\n }\n\n const offsetToPercentage = (g, offsetX) => {\n // This is calculating the pixel offset of the leftmost date.\n const [axisAfterOffset] = g.toDomCoords(g.xAxisRange()[0], null)\n // x and w are relative to the corner of the drawing area,\n // so that the upper corner of the drawing area is (0, 0).\n const x = offsetX - axisAfterOffset\n // This is computing the rightmost pixel, effectively defining the\n // width.\n const w = g.toDomCoords(g.xAxisRange()[1], null)[0] - axisAfterOffset\n\n // Percentage from the left.\n return w === 0 ? 0 : x / w\n }\n\n const normalDef =\n typeof event.wheelDelta === \"number\" && !Number.isNaN(event.wheelDelta)\n ? event.wheelDelta / 40\n : event.deltaY * -1.2\n\n const normal = event.detail ? event.detail * -1 : normalDef\n const percentage = normal / 50\n\n if (!event.offsetX) event.offsetX = event.layerX - event.target.offsetLeft\n const xPct = offsetToPercentage(dygraph, event.offsetX)\n\n zoom(dygraph, percentage, xPct)\n },\n\n click(event: MouseEvent) {\n event.preventDefault()\n },\n\n dblclick() {\n dispatch(resetGlobalPauseAction({ forcePlay: false }))\n propsRef.current.resetGlobalPanAndZoom()\n },\n\n touchstart(event: TouchEvent, dygraph: Dygraph, context: any) {\n isMouseDown.current = true\n latestIsUserAction.current = true\n\n // todo\n // state.pauseChart()\n\n Dygraph.defaultInteractionModel.touchstart(event, dygraph, context)\n\n // we overwrite the touch directions at the end, to overwrite\n // the internal default of dygraph\n // eslint-disable-next-line no-param-reassign\n context.touchDirections = { x: true, y: false }\n\n dygraphLastTouchMove.current = 0\n\n if (typeof event.touches[0].pageX === \"number\") {\n dygraphLastTouchPageX.current = event.touches[0].pageX\n } else {\n dygraphLastTouchPageX.current = 0\n }\n },\n touchmove(event: TouchEvent, dygraph: Dygraph, context: any) {\n latestIsUserAction.current = true\n Dygraph.defaultInteractionModel.touchmove(event, dygraph, context)\n\n dygraphLastTouchMove.current = Date.now()\n },\n\n touchend(event: TouchEvent, dygraph: Dygraph, context: any) {\n isMouseDown.current = false\n latestIsUserAction.current = true\n Dygraph.defaultInteractionModel.touchend(event, dygraph, context)\n\n // if it didn't move, it is a selection\n if (dygraphLastTouchMove.current === 0 && dygraphLastTouchPageX.current !== 0\n && chartElement.current // this is just for TS\n ) {\n latestIsUserAction.current = false // prevent updating pan-and-zoom\n // internal api of dygraph\n // @ts-ignore\n // eslint-disable-next-line no-underscore-dangle\n const dygraphPlotter = dygraph.plotter_\n const pct = (dygraphLastTouchPageX.current - (\n dygraphPlotter.area.x + chartElement.current.getBoundingClientRect().left\n )) / dygraphPlotter.area.w\n\n const { current } = propsRef\n const t = Math.round(current.viewAfter\n + (current.viewBefore - current.viewAfter) * pct)\n // dont set \"master\" so the highlight is recalculated (to match existing row)\n setHoveredX(t, true)\n }\n\n // if it was double tap within double click time, reset the charts\n const now = Date.now()\n if (typeof dygraphLastTouchEnd.current !== \"undefined\") {\n if (dygraphLastTouchMove.current === 0) {\n const dt = now - dygraphLastTouchEnd.current\n if (dt <= window.NETDATA.options.current.double_click_speed) {\n propsRef.current.resetGlobalPanAndZoom()\n }\n }\n }\n\n // remember the timestamp of the last touch end\n dygraphLastTouchEnd.current = now\n propsRef.current.immediatelyDispatchPanAndZoom()\n },\n },\n }\n\n const data = isFakeStacked\n ? getDataForFakeStacked(chartData.result.data, dimensionsVisibility)\n : chartData.result.data\n const instance = new Dygraph((chartElement.current), data, dygraphOptions)\n dygraphInstance.current = instance\n }\n }, [attributes, chartData, chartMetadata, chartSettings, chartUuid, dimensionsVisibility,\n hasEmptyData, hiddenLabelsElementId, isFakeStacked,\n orderedColors, setHoveredX, setMinMax, shouldSmoothPlot, unitsCurrent,\n xAxisDateString, xAxisTimeString, updatePrecededPosition, dispatch])\n\n useUpdateEffect(() => {\n if (dygraphInstance.current) {\n const isSparkline = attributes.dygraphTheme === \"sparkline\"\n const isLegendOnBottom = attributes.legendPosition === \"bottom\"\n dygraphInstance.current.updateOptions({\n ylabel: (isSparkline || isLegendOnBottom) ? undefined : unitsCurrent,\n })\n }\n }, [attributes, unitsCurrent])\n\n\n // immediately update when changing global chart underlay or currently showed alarm\n useUpdateEffect(() => {\n if (dygraphInstance.current) {\n dygraphInstance.current.updateOptions({})\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [alarm, globalChartUnderlay])\n\n const spacePanelTransitionEndIsActive = useSelector(selectSpacePanelTransitionEndIsActive)\n useUpdateEffect(() => {\n if (dygraphInstance.current) {\n // dygraph always resizes on browser width change, but doesn't resize when the container\n // has different width.\n window.requestAnimationFrame(() => {\n if (dygraphInstance.current) {\n (dygraphInstance.current as NetdataDygraph).resize()\n }\n })\n }\n }, [spacePanelTransitionEndIsActive])\n\n // update data of the chart\n // first effect should only be made by new DygraphInstance()\n useUpdateEffect(() => {\n // dont update when there is no data - in this case we should still show old chart\n if (dygraphInstance.current && !hasEmptyData) {\n // todo support state.tmp.dygraph_force_zoom\n const forceDateWindow = [viewAfter, viewBefore]\n\n // in old dashboard, when chart needed to reset internal dateWindow state,\n // dateWindow was set to null, and new dygraph got the new dateWindow from results.\n // this caused small unsync between dateWindow of parent (master) and child charts\n // i also detected that forceDateWindow timestamps have slightly better performance (10%)\n // so if the chart needs to change local dateWindow, we'll always use timestamps instead of\n // null.\n\n const xAxisRange = dygraphInstance.current.xAxisRange()\n // eslint-disable-next-line max-len\n const hasChangedDuration = Math.abs((viewBefore - viewAfter) - (xAxisRange[1] - xAxisRange[0])) > timeframeThreshold\n\n // check if the time is relative\n const hasScrolledToTheFutureDuringPlayMode = viewBefore <= 0\n && (xAxisRange[1] > viewBefore)\n // if viewAfter is bigger than current dateWindow start, just reset dateWindow\n && (xAxisRange[0] > viewAfter)\n && !hasChangedDuration\n\n const optionsDateWindow = (isRemotelyControlled && !hasScrolledToTheFutureDuringPlayMode)\n ? { dateWindow: forceDateWindow }\n : {}\n\n const { dygraphColors = orderedColors } = attributes\n const file = isFakeStacked\n ? getDataForFakeStacked(chartData.result.data, dimensionsVisibility)\n : chartData.result.data\n\n const includeZero = dimensionsVisibility.length === 1 ||\n dimensionsVisibility.filter(x => x === true).length > 1\n\n dygraphInstance.current.updateOptions({\n ...optionsDateWindow,\n colors: isFakeStacked ? transformColors(reverse(dygraphColors)) : dygraphColors,\n file,\n labels: chartData.result.labels,\n fillAlpha: dygraphFillAlpha,\n ...(dygraphChartType === \"stacked\" ? { includeZero } : {}),\n stackedGraph: dygraphChartType === \"stacked\" && !isFakeStacked,\n // see explanation about reversing before isFakeStacked assignment\n visibility: isFakeStacked ? reverse(dimensionsVisibility) : dimensionsVisibility,\n })\n }\n }, [attributes, chartData.result, chartUuid, dimensionsVisibility, dygraphChartType,\n dygraphFillAlpha, hasEmptyData, isFakeStacked, isRemotelyControlled, orderedColors,\n viewAfter, viewBefore])\n\n useUpdateEffect(() => {\n if (!dygraphInstance.current) {\n return\n }\n\n const dygraphOptionsStatic = getInitialDygraphOptions({\n attributes,\n chartData,\n chartMetadata,\n chartSettings,\n dimensionsVisibility,\n hiddenLabelsElementId,\n isFakeStacked,\n orderedColors,\n setMinMax,\n shouldSmoothPlot,\n unitsCurrent,\n xAxisDateString,\n xAxisTimeString,\n })\n if (!hasEmptyData) dygraphInstance.current.updateOptions(dygraphOptionsStatic)\n }, [dygraphChartType, timezone])\n\n // set selection\n const currentSelectionMasterId = useSelector(selectGlobalSelectionMaster)\n useLayoutEffect(() => {\n if (dygraphInstance.current && currentSelectionMasterId !== chartUuid) {\n if (hoveredRow === -1) {\n // getSelection is 100 times faster that clearSelection\n if (dygraphInstance.current.getSelection() !== -1) {\n dygraphInstance.current.clearSelection()\n }\n return\n }\n dygraphInstance.current.setSelection(hoveredRow)\n }\n }, [chartData, chartUuid, currentSelectionMasterId, hoveredRow,\n viewAfter, viewBefore])\n\n\n // handle resizeHeight change\n const resizeHeight = useSelector(\n (state: AppStateT) => selectResizeHeight(state, { id: chartUuid }),\n )\n useLayoutEffect(() => {\n if (dygraphInstance.current) {\n (dygraphInstance.current as NetdataDygraph).resize()\n }\n }, [resizeHeight, chartData.dimension_names.length])\n\n\n const commonMinState = useSelector((state: AppStateT) => (\n attributes.commonMin\n ? selectCommonMin(state, attributes.commonMin)\n : undefined\n ))\n const commonMaxState = useSelector((state: AppStateT) => (\n attributes.commonMax\n ? selectCommonMax(state, attributes.commonMax)\n : undefined\n ))\n\n useLayoutEffect(() => {\n const { commonMin: commonMinKey, commonMax: commonMaxKey } = attributes\n\n if (\n dygraphInstance.current\n && (commonMinKey || commonMaxKey)\n ) {\n const extremes = (dygraphInstance.current as NetdataDygraph).yAxisExtremes()[0]\n const [currentMin, currentMax] = extremes\n\n const {\n dygraphValueRange = [null, null],\n } = attributes\n // if the user gave a valueRange, respect it\n const shouldUseCommonMin = dygraphValueRange[0] === null\n const shouldUseCommonMax = dygraphValueRange[1] === null\n\n\n let shouldUpdate = false\n let valueRange: number[] = [...extremes]\n\n // check if current extreme (painted by dygraph) is not more extreme than commonMin/Max\n // if yes - update the chart\n if (commonMinKey && shouldUseCommonMin) {\n if (commonMinState && commonMinState.currentExtreme < currentMin) {\n valueRange[0] = commonMinState.currentExtreme\n shouldUpdate = true\n }\n }\n if (commonMaxKey && shouldUseCommonMax) {\n if (commonMaxState && commonMaxState.currentExtreme > currentMax) {\n valueRange[1] = commonMaxState.currentExtreme\n shouldUpdate = true\n }\n }\n\n if (shouldUpdate) {\n dygraphInstance.current.updateOptions({ valueRange })\n const newExtremes = (dygraphInstance.current as NetdataDygraph).yAxisExtremes()[0]\n // get updated valueRange (rounded by dygraph)\n valueRange = [...newExtremes]\n }\n\n // if the value is different than the one stored in state, update redux state\n if (commonMinKey && shouldUseCommonMin\n && (valueRange[0] !== commonMinState?.charts[chartUuid])\n ) {\n dispatch(setCommonMinAction({ chartUuid, commonMinKey, value: valueRange[0] }))\n }\n if (commonMaxKey && shouldUseCommonMax\n && (valueRange[1] !== commonMaxState?.charts[chartUuid])\n ) {\n dispatch(setCommonMaxAction({ chartUuid, commonMaxKey, value: valueRange[1] }))\n }\n }\n }, [attributes, chartData.result, chartUuid, commonMinState, commonMaxState, dispatch])\n\n useLayoutEffect(() => {\n if (isProceeded && dygraphInstance.current) {\n updatePrecededPosition(dygraphInstance.current)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isProceeded])\n\n useUnmount(() => {\n if (dygraphInstance.current) {\n dygraphInstance.current.destroy()\n }\n })\n\n /**\n * resize with ResizeObserver\n */\n const resizeObserver = useRef<ResizeObserver>()\n useMount(() => {\n if (!attributes.detectResize) {\n return\n }\n // flag used to prevent first callback (and resize) on dygraph initial draw\n let hasOmitedFirstCallback = false\n const callbackDebounced = debounce(() => {\n if (!hasOmitedFirstCallback) {\n hasOmitedFirstCallback = true\n return\n }\n\n if (dygraphInstance.current) {\n (dygraphInstance.current as NetdataDygraph).resize()\n }\n }, dygraphResizeDebounceTime)\n\n resizeObserver.current = new ResizeObserver(() => {\n callbackDebounced()\n })\n resizeObserver.current.observe(chartElement.current as HTMLDivElement)\n })\n\n useUnmount(() => {\n dygraphInstance.current = null // clear it for debounce purposes\n if (resizeObserver.current) {\n resizeObserver.current.disconnect()\n }\n })\n\n const isLegendOnBottom = attributes.legendPosition === \"bottom\"\n\n return (\n <>\n <div\n ref={chartElement}\n id={chartElementId}\n className={classNames(\n chartElementClassName,\n { \"dygraph-chart--legend-bottom\": isLegendOnBottom },\n )}\n />\n {isProceeded && hasLegend && (\n <ProceededChartDisclaimer ref={precededChartRef as React.Ref<HTMLDivElement>} />\n )}\n {alarm?.value && hasLegend && (\n // @ts-ignore\n <AlarmBadge\n isVisible={isAlarmBadgeVisible}\n ref={alarmBadgeRef}\n status={alarm.status}\n label={alarm.value}\n />\n )}\n <div className=\"dygraph-chart__labels-hidden\" id={hiddenLabelsElementId} />\n </>\n )\n}\n","// https://gist.github.com/ca0v/73a31f57b397606c9813472f7493a940\n\nexport const debounce = <F extends (...args: any[]) => any>(func: F, waitFor: number) => {\n let timeout: ReturnType<typeof setTimeout> | null = null\n\n const debounced = (...args: Parameters<F>) => {\n if (timeout !== null) {\n clearTimeout(timeout)\n timeout = null\n }\n timeout = setTimeout(() => func(...args), waitFor)\n }\n\n return debounced as (...args: Parameters<F>) => ReturnType<F>\n}\n","import React, { useRef, useEffect, useState } from \"react\"\n// @ts-ignore \"declare module\" doesn't work properly when importing dashboard in cloud\nimport EasyPie from \"easy-pie-chart\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata, EasyPieChartData } from \"domains/chart/chart-types\"\nimport { ChartLibraryName } from \"domains/chart/utils/chartLibrariesSettings\"\nimport {\n always, cond, identity, T, sortBy, map, pipe,\n} from \"ramda\"\n\ntype GetPercentFromValueMinMax = (arg: {\n value: number | undefined\n min: number | undefined\n max: number | undefined\n isMinOverride: boolean\n isMaxOverride: boolean\n}) => number\nconst getPercentFromValueMinMax: GetPercentFromValueMinMax = ({\n value = 0, min = 0, max = 0,\n isMinOverride,\n isMaxOverride,\n}) => {\n /* eslint-disable no-param-reassign */\n // todo refractor old logic to readable functions\n // if no easyPiechart-min-value attribute\n if (!isMinOverride && min > 0) {\n min = 0\n }\n if (!isMaxOverride && max < 0) {\n max = 0\n }\n\n let pcent\n\n if (min < 0 && max > 0) {\n // it is both positive and negative\n // zero at the top center of the chart\n max = (-min > max) ? -min : max\n pcent = Math.round((value * 100) / max)\n } else if (value >= 0 && min >= 0 && max >= 0) {\n // clockwise\n pcent = Math.round(((value - min) * 100) / (max - min))\n if (pcent === 0) {\n pcent = 0.1\n }\n } else {\n // counter clockwise\n pcent = Math.round(((value - max) * 100) / (max - min))\n if (pcent === 0) {\n pcent = -0.1\n }\n }\n /* eslint-enable no-param-reassign */\n return pcent\n}\n\ninterface Props {\n attributes: Attributes\n chartData: EasyPieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n chartLibrary: ChartLibraryName\n chartUuid: string\n colors: {\n [key: string]: string\n }\n chartWidth: number\n dimensionsVisibility: boolean[]\n isRemotelyControlled: boolean\n legendFormatValue: ((v: number | string | null) => number | string)\n onUpdateChartPanAndZoom: (arg: {\n after: number, before: number,\n callback: (after: number, before: number) => void,\n masterID: string,\n shouldNotExceedAvailableRange: boolean,\n }) => void\n orderedColors: string[]\n\n hoveredRow: number\n setGlobalChartUnderlay: (arg: { after: number, before: number, masterID: string }) => void\n setMinMax: (minMax: [number, number]) => void\n showUndefined: boolean\n unitsCurrent: string\n viewAfter: number\n viewBefore: number\n}\nexport const EasyPieChart = ({\n attributes,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n chartWidth,\n hoveredRow,\n legendFormatValue,\n orderedColors,\n setMinMax,\n showUndefined,\n unitsCurrent,\n}: Props) => {\n const chartElement = useRef<HTMLDivElement>(null)\n const [chartInstance, setChartInstance] = useState()\n\n const valueIndex = hoveredRow === -1\n ? 0\n : (chartData.result.length - 1 - hoveredRow) // because data for easy-pie-chart are flipped\n const value = showUndefined ? null : chartData.result[valueIndex]\n\n const {\n // if this is set, then we're overriding commonMin\n easyPieChartMinValue: min = chartData.min, // todo replace with commonMin\n easyPieChartMaxValue: max = chartData.max, // todo replace with commonMax\n } = attributes\n\n // make sure the order is correct and that value is not outside those boundaries\n // (this check was present in old dashboard but perhaps it's not needed)\n const safeMinMax = pipe(\n map((x: number) => +x),\n sortBy(identity),\n ([_min, _max]: number[]) => [Math.min(_min, value || 0), Math.max(_max, value || 0)],\n )([min, max])\n\n useEffect(() => {\n setMinMax(safeMinMax as [number, number])\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [safeMinMax])\n\n const pcent = getPercentFromValueMinMax({\n value: showUndefined ? 0 : (value as number),\n min: safeMinMax[0],\n max: safeMinMax[1],\n isMinOverride: attributes.easyPieChartMinValue !== undefined,\n isMaxOverride: attributes.easyPieChartMaxValue !== undefined,\n })\n\n useEffect(() => {\n if (chartElement.current && !chartInstance) {\n const stroke = cond([\n [(v) => v < 3, always(2)],\n [T, identity],\n ])(Math.floor(chartWidth / 22))\n\n const {\n easyPieChartTrackColor = window.NETDATA.themes.current.easypiechart_track,\n easyPieChartScaleColor = window.NETDATA.themes.current.easypiechart_scale,\n easyPieChartScaleLength = 5,\n easyPieChartLineCap = \"round\",\n easyPieChartLineWidth = stroke,\n easyPieChartTrackWidth,\n easyPieChartSize = chartWidth,\n easyPieChartRotate = 0,\n easyPieChartAnimate = { duration: 500, enabled: true },\n easyPieChartEasing,\n } = attributes\n\n const newChartInstance = new EasyPie(chartElement.current, {\n barColor: orderedColors[0],\n trackColor: easyPieChartTrackColor,\n scaleColor: easyPieChartScaleColor,\n scaleLength: easyPieChartScaleLength,\n lineCap: easyPieChartLineCap,\n lineWidth: easyPieChartLineWidth,\n trackWidth: easyPieChartTrackWidth,\n size: easyPieChartSize,\n rotate: easyPieChartRotate,\n animate: easyPieChartAnimate,\n easing: easyPieChartEasing,\n })\n setChartInstance(newChartInstance)\n }\n }, [attributes, chartData, chartInstance, chartWidth, orderedColors])\n\n // update with value\n useEffect(() => {\n if (chartInstance) {\n const shouldUseAnimation = hoveredRow === -1 && !showUndefined\n\n if (shouldUseAnimation && !chartInstance.options.animate.enabled) {\n chartInstance.enableAnimation()\n } else if (!shouldUseAnimation && chartInstance.options.animate.enabled) {\n chartInstance.disableAnimation()\n }\n\n setTimeout(() => {\n // need to be in timeout to trigger animation properly\n chartInstance.update(pcent)\n }, 0)\n }\n }, [chartInstance, hoveredRow, pcent, showUndefined])\n\n const valueFontSize = (chartWidth * 2) / 3 / 5\n const valuetop = Math.round((chartWidth - valueFontSize - (chartWidth / 40)) / 2)\n\n const titleFontSize = Math.round((valueFontSize * 1.6) / 3)\n const titletop = Math.round(valuetop - (titleFontSize * 2) - (chartWidth / 40))\n\n const unitFontSize = Math.round(titleFontSize * 0.9)\n const unitTop = Math.round(valuetop + (valueFontSize + unitFontSize) + (chartWidth / 40))\n // to update, just label innerText and pcent are changed\n\n return (\n <div ref={chartElement} id={chartElementId} className={chartElementClassName}>\n <span\n className=\"easyPieChartLabel\"\n style={{\n fontSize: valueFontSize,\n top: valuetop,\n }}\n >\n {legendFormatValue(value)}\n </span>\n <span\n className=\"easyPieChartTitle\"\n style={{\n fontSize: titleFontSize,\n top: titletop,\n }}\n >\n {attributes.title || chartMetadata.title}\n </span>\n <span\n className=\"easyPieChartUnits\"\n style={{\n fontSize: unitFontSize,\n top: unitTop,\n }}\n >\n {unitsCurrent}\n </span>\n\n </div>\n )\n}\n","import React, {\n useRef, useEffect, useState,\n} from \"react\"\n// @ts-ignore \"declare module\" doesn't work properly when importing dashboard in cloud\nimport { Gauge } from \"gaugeJS\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata, EasyPieChartData } from \"domains/chart/chart-types\"\nimport { ChartLibraryName } from \"domains/chart/utils/chartLibrariesSettings\"\nimport {\n identity, sortBy, map, pipe, always,\n} from \"ramda\"\n\nconst isSetByUser = (x: undefined | number): x is number => (\n typeof x === \"number\"\n)\n\ninterface Props {\n attributes: Attributes\n chartData: EasyPieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n chartLibrary: ChartLibraryName\n chartUuid: string\n colors: {\n [key: string]: string\n }\n chartHeight: number\n chartWidth: number\n dimensionsVisibility: boolean[]\n isRemotelyControlled: boolean\n legendFormatValue: ((v: number | string | null) => number | string)\n onUpdateChartPanAndZoom: (arg: {\n after: number, before: number,\n callback: (after: number, before: number) => void,\n masterID: string,\n shouldNotExceedAvailableRange: boolean,\n }) => void\n orderedColors: string[]\n\n hoveredRow: number\n hoveredX: number | null\n setGlobalChartUnderlay: (arg: { after: number, before: number, masterID: string }) => void\n setHoveredX: (hoveredX: number | null, noMaster?: boolean) => void\n setMinMax: (minMax: [number, number]) => void\n showUndefined: boolean\n unitsCurrent: string\n viewAfter: number\n viewBefore: number\n}\nexport const GaugeChart = ({\n attributes,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n chartUuid,\n chartHeight,\n chartWidth,\n hoveredRow,\n legendFormatValue,\n orderedColors,\n setMinMax,\n showUndefined,\n unitsCurrent,\n}: Props) => {\n const chartCanvasElement = useRef<HTMLCanvasElement>(null)\n const [chartInstance, setChartInstance] = useState()\n\n const valueIndex = hoveredRow === -1\n ? 0\n : (chartData.result.length - 1 - hoveredRow) // because data for easy-pie-chart are flipped\n const value = chartData.result[valueIndex]\n\n const {\n // if this is set, then we're overriding commonMin\n gaugeMinValue: minAttribute,\n gaugeMaxValue: maxAttribute,\n } = attributes\n\n const min = isSetByUser(minAttribute) ? minAttribute : chartData.min\n const max = isSetByUser(maxAttribute) ? maxAttribute : chartData.max\n // we should use minAttribute if it's existing\n // old app was using commonMin\n\n // make sure the order is correct and that value is not outside those boundaries\n // (this check was present in old dashboard but perhaps it's not needed)\n const [safeMin, safeMax] = pipe(\n // if they are attributes, make sure they're converted to numbers\n map((x: number) => +x),\n // make sure it is zero based\n // but only if it has not been set by the user\n ([_min, _max]: number[]) => [\n (!isSetByUser(minAttribute) && _min > 0) ? 0 : _min,\n (!isSetByUser(maxAttribute) && _max < 0) ? 0 : _max,\n ],\n // make sure min <= max\n sortBy(identity),\n ([_min, _max]: number[]) => [Math.min(_min, value), Math.max(_max, value)],\n )([min, max])\n // calling outside \"useEffect\" intentionally,\n // because it should update the values first, and only then render the chart in useEffect()\n useEffect(() => {\n setMinMax([safeMin, safeMax])\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [safeMin, safeMax])\n\n const pcent = pipe(\n always(((value - safeMin) * 100) / (safeMax - safeMin)),\n // bug fix for gauge.js 1.3.1\n // if the value is the absolute min or max, the chart is broken\n (_pcent: number) => Math.max(0.001, _pcent),\n (_pcent: number) => Math.min(99.999, _pcent),\n )()\n\n useEffect(() => {\n if (chartCanvasElement.current && !chartInstance) {\n const {\n gaugePointerColor = window.NETDATA.themes.current.gauge_pointer,\n gaugeStrokeColor = window.NETDATA.themes.current.gauge_stroke,\n gaugeStartColor = orderedColors[0],\n gaugeStopColor,\n gaugeGenerateGradient = false,\n } = attributes\n\n const options = {\n lines: 12, // The number of lines to draw\n angle: 0.14, // The span of the gauge arc\n lineWidth: 0.57, // The line thickness\n radiusScale: 1.0, // Relative radius\n pointer: {\n length: 0.85, // 0.9 The radius of the inner circle\n strokeWidth: 0.045, // The rotation offset\n color: gaugePointerColor, // Fill color\n },\n\n // If false, the max value of the gauge will be updated if value surpass max\n // If true, the min value of the gauge will be fixed unless you set it manually\n limitMax: true,\n limitMin: true,\n colorStart: gaugeStartColor,\n colorStop: gaugeStopColor,\n strokeColor: gaugeStrokeColor,\n generateGradient: (gaugeGenerateGradient === true), // gmosx:\n gradientType: 0,\n highDpiSupport: true, // High resolution support\n }\n\n const newChartInstance = new Gauge(chartCanvasElement.current).setOptions(options)\n\n // we will always feed a percentage (copied from old dashboard)\n newChartInstance.minValue = 0\n newChartInstance.maxValue = 100\n\n setChartInstance(newChartInstance)\n }\n }, [attributes, chartData, chartInstance, chartWidth, orderedColors])\n\n // update with value\n useEffect(() => {\n if (chartInstance) {\n // gauge animation\n const shouldUseAnimation = hoveredRow === -1 && !showUndefined\n // animation doesn't work in newest, 1.3.7 version!\n const speed = shouldUseAnimation ? 32 : 1000000000\n chartInstance.animationSpeed = speed\n setTimeout(() => {\n chartInstance.set(showUndefined ? 0 : pcent)\n }, 0)\n }\n }, [chartInstance, chartHeight, chartWidth, hoveredRow, pcent, showUndefined])\n\n const valueFontSize = Math.floor(chartHeight / 5)\n const valueTop = Math.round((chartHeight - valueFontSize) / 3.2)\n\n const titleFontSize = Math.round(valueFontSize / 2.1)\n const titleTop = 0\n\n const unitFontSize = Math.round(titleFontSize * 0.9)\n\n const minMaxFontSize = Math.round(valueFontSize * 0.75)\n return (\n <div\n id={chartElementId}\n className={chartElementClassName}\n >\n <canvas\n ref={chartCanvasElement}\n className=\"gaugeChart\"\n id={`gauge-${chartUuid}-canvas`}\n style={{\n width: chartWidth,\n height: chartHeight,\n }}\n />\n <span\n className=\"gaugeChartLabel\"\n style={{\n fontSize: valueFontSize,\n top: valueTop,\n }}\n >\n {legendFormatValue(showUndefined ? null : value)}\n </span>\n <span\n className=\"gaugeChartTitle\"\n style={{\n fontSize: titleFontSize,\n top: titleTop,\n }}\n >\n {attributes.title || chartMetadata.title}\n </span>\n <span\n className=\"gaugeChartUnits\"\n style={{\n fontSize: unitFontSize,\n }}\n >\n {unitsCurrent}\n </span>\n <span className=\"gaugeChartMin\" style={{ fontSize: minMaxFontSize }}>\n {legendFormatValue(showUndefined ? null : safeMin)}\n </span>\n <span className=\"gaugeChartMax\" style={{ fontSize: minMaxFontSize }}>\n {legendFormatValue(showUndefined ? null : safeMax)}\n </span>\n </div>\n )\n}\n","import {\n cond, identity, map, pipe, replace, splitEvery, T, toString,\n} from \"ramda\"\n\ntype NormalizeHex = (hex: string) => string\nexport const normalizeHex: NormalizeHex = pipe(\n toString,\n replace(/[^0-9a-f]/gi, \"\"),\n cond([\n [(str) => str.length < 6, (str) => str[0] + str[0] + str[1] + str[1] + str[2] + str[2]],\n [T, identity],\n ]),\n)\n\nexport const colorLuminance = (hex: string, lum: number = 0) => {\n const hexNormalized = normalizeHex(hex)\n\n // convert to decimal and change luminosity\n const rgb = pipe(\n // point-free version generates ts error\n (str: string) => splitEvery(2, str),\n map(\n pipe(\n (str: string) => parseInt(str, 16),\n (nr) => Math.round(\n Math.min(\n Math.max(0, nr + (nr * lum)),\n 255,\n ),\n ).toString(16),\n (str) => `00${str}`.substr(str.length),\n ),\n ),\n (x) => x.join(\"\"),\n )(hexNormalized)\n return `#${rgb}`\n}\n","/* eslint-disable indent */\n/* eslint-disable operator-linebreak */\n/* eslint-disable comma-dangle */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable consistent-return */\nimport \"jquery-sparkline\"\nimport React, { useRef, useEffect, useState } from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata, EasyPieChartData } from \"domains/chart/chart-types\"\nimport { colorLuminance } from \"domains/chart/utils/color-luminance\"\nimport { MS_IN_SECOND } from \"utils/utils\"\nimport { TimeRange } from \"types/common\"\n\nconst convertToTimestamp = (number: number) => {\n if (number > 0) {\n return number\n }\n return new Date().valueOf() + number // number is negative or zero\n}\n\ninterface TimeWindowCorrection {\n paddingLeftPercentage?: string\n widthRatio?: number\n}\nconst getForceTimeWindowCorrection = (\n chartData: EasyPieChartData,\n viewRange: TimeRange\n): TimeWindowCorrection => {\n const requestedAfter = convertToTimestamp(viewRange[0])\n const requestedBefore = convertToTimestamp(viewRange[1])\n const after = chartData.after * MS_IN_SECOND\n const before = chartData.before * MS_IN_SECOND\n\n const currentDuration = before - after\n const requestedDuration = requestedBefore - requestedAfter\n // don't do overrides when current (available) duration is bigger or only slightly lower\n // than requested duration\n const DURATION_CHANGE_TOLERANCE = 1.03\n if (currentDuration > requestedDuration / DURATION_CHANGE_TOLERANCE) {\n return {}\n }\n\n const widthRatio = currentDuration / requestedDuration\n\n const visibleDuration = requestedBefore - requestedAfter\n const paddingLeftPercentage = `${100 * ((after - requestedAfter) / visibleDuration)}%`\n\n return {\n paddingLeftPercentage,\n widthRatio,\n }\n}\n\ninterface Props {\n attributes: Attributes\n chartContainerElement: HTMLElement\n chartData: EasyPieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n dimensionsVisibility: boolean[]\n isRemotelyControlled: boolean\n orderedColors: string[]\n unitsCurrent: string\n viewAfterForCurrentData: number\n viewBeforeForCurrentData: number\n}\nexport const SparklineChart = ({\n attributes,\n chartContainerElement,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n orderedColors,\n unitsCurrent,\n viewAfterForCurrentData,\n viewBeforeForCurrentData,\n}: Props) => {\n const chartElement = useRef<HTMLDivElement>(null)\n\n // update width, height automatically each time\n const [$chartElement, set$chartElement] = useState()\n const sparklineOptions = useRef<{ [key: string]: any }>()\n\n const { paddingLeftPercentage = undefined, widthRatio = 1 } = attributes.forceTimeWindow\n ? getForceTimeWindowCorrection(chartData, [viewAfterForCurrentData, viewBeforeForCurrentData])\n : {}\n\n const updateSparklineValues = () => {\n if (!$chartElement) return\n\n const { width, height } = chartContainerElement.getBoundingClientRect()\n // @ts-ignore\n $chartElement.sparkline(chartData.result, {\n ...sparklineOptions.current,\n width: Math.floor(width * widthRatio),\n height: Math.floor(height),\n })\n }\n\n // create chart\n useEffect(() => {\n const { sparklineLineColor = orderedColors[0] } = attributes\n const defaultFillColor =\n chartMetadata.chart_type === \"line\"\n ? window.NETDATA.themes.current.background\n : colorLuminance(sparklineLineColor, window.NETDATA.chartDefaults.fill_luminance)\n const chartTitle = attributes.title || chartMetadata.title\n\n const emptyStringIfDisable = (x: string | undefined) => (x === \"disable\" ? \"\" : x)\n\n const {\n sparklineType = \"line\",\n sparklineFillColor = defaultFillColor,\n sparklineDisableInteraction = false,\n sparklineDisableTooltips = false,\n sparklineDisableHighlight = false,\n sparklineHighlightLighten = 1.4,\n sparklineTooltipSuffix = ` ${unitsCurrent}`,\n sparklineNumberFormatter = (n: number) => n.toFixed(2),\n } = attributes\n\n const sparklineInitOptions = {\n type: sparklineType,\n lineColor: sparklineLineColor,\n fillColor: sparklineFillColor,\n chartRangeMin: attributes.sparklineChartRangeMin,\n chartRangeMax: attributes.sparklineChartRangeMax,\n composite: attributes.sparklineComposite,\n enableTagOptions: attributes.sparklineEnableTagOptions,\n tagOptionPrefix: attributes.sparklineTagOptionPrefix,\n tagValuesAttribute: attributes.sparklineTagValuesAttribute,\n\n disableHiddenCheck: attributes.sparklineDisableHiddenCheck,\n defaultPixelsPerValue: attributes.sparklineDefaultPixelsPerValue,\n spotColor: emptyStringIfDisable(attributes.sparklineSpotColor),\n minSpotColor: emptyStringIfDisable(attributes.sparklineMinSpotColor),\n maxSpotColor: emptyStringIfDisable(attributes.sparklineMaxSpotColor),\n spotRadius: attributes.sparklineSpotRadius,\n valueSpots: attributes.sparklineValueSpots,\n highlightSpotColor: attributes.sparklineHighlightSpotColor,\n highlightLineColor: attributes.sparklineHighlightLineColor,\n lineWidth: attributes.sparklineLineWidth,\n normalRangeMin: attributes.sparklineNormalRangeMin,\n normalRangeMax: attributes.sparklineNormalRangeMax,\n drawNormalOnTop: attributes.sparklineDrawNormalOnTop,\n xvalues: attributes.sparklineXvalues,\n chartRangeClip: attributes.sparklineChartRangeClip,\n chartRangeMinX: attributes.sparklineChartRangeMinX,\n chartRangeMaxX: attributes.sparklineChartRangeMaxX,\n disableInteraction: sparklineDisableInteraction,\n disableTooltips: sparklineDisableTooltips,\n disableHighlight: sparklineDisableHighlight,\n highlightLighten: sparklineHighlightLighten,\n highlightColor: attributes.sparklineHighlightColor,\n tooltipContainer: attributes.sparklineTooltipContainer,\n tooltipClassname: attributes.sparklineTooltipClassname,\n tooltipChartTitle: chartTitle,\n tooltipFormat: attributes.sparklineTooltipFormat,\n tooltipPrefix: attributes.sparklineTooltipPrefix,\n tooltipSuffix: sparklineTooltipSuffix,\n tooltipSkipNull: attributes.sparklineTooltipSkipNull,\n tooltipValueLookups: attributes.sparklineTooltipValueLookups,\n tooltipFormatFieldlist: attributes.sparklineTooltipFormatFieldlist,\n tooltipFormatFieldlistKey: attributes.sparklineTooltipFormatFieldlistKey,\n numberFormatter: sparklineNumberFormatter,\n numberDigitGroupSep: attributes.sparklineNumberDigitGroupSep,\n numberDecimalMark: attributes.sparklineNumberDecimalMark,\n numberDigitGroupCount: attributes.sparklineNumberDigitGroupCount,\n animatedZooms: attributes.sparklineAnimatedZooms,\n }\n sparklineOptions.current = sparklineInitOptions\n\n if (!chartElement.current || $chartElement) return\n\n set$chartElement(() => window.$(chartElement.current))\n }, [\n $chartElement,\n attributes,\n chartContainerElement,\n chartData.result,\n chartMetadata,\n orderedColors,\n unitsCurrent,\n widthRatio,\n ])\n\n const { sparklineOnHover } = attributes\n useEffect(() => {\n if (!$chartElement || !sparklineOnHover) return\n\n const onLeave = () => sparklineOnHover(null)\n const onChange = ({ sparklines: [sparkline] }: any) => {\n const { x, y } = sparkline.getCurrentRegionFields()\n sparklineOnHover({ x, y })\n }\n\n // @ts-ignore\n $chartElement.bind(\"sparklineRegionChange\", onChange).bind(\"mouseleave\", onLeave)\n return () => {\n // @ts-ignore\n $chartElement.unbind(\"sparklineRegionChange\", onChange).unbind(\"mouseleave\", onLeave)\n }\n }, [$chartElement, sparklineOnHover])\n\n // update chart\n useEffect(updateSparklineValues, [$chartElement, chartData.result])\n\n const style = paddingLeftPercentage\n ? {\n textAlign: \"initial\" as \"initial\", // :) typescript\n paddingLeft: paddingLeftPercentage,\n }\n : undefined\n\n return (\n <div ref={chartElement} id={chartElementId} className={chartElementClassName} style={style} />\n )\n}\n","import * as d3 from \"d3\"\n\nwindow.d3 = d3\n","let fetchPromise: Promise<string>\n\nconst GOOGLE_JS_API_SRC = \"https://www.google.com/jsapi\"\n\nexport const loadGoogleVisualizationApi = () => {\n if (fetchPromise) {\n return fetchPromise\n }\n fetchPromise = new Promise((resolve, reject) => {\n setTimeout(() => {\n const script = document.createElement(\"script\")\n script.type = \"text/javascript\"\n script.async = true\n script.src = GOOGLE_JS_API_SRC\n\n script.onerror = () => {\n reject(Error(\"error loading google.js api\"))\n }\n script.onload = () => {\n resolve(\"ok\")\n }\n\n const firstScript = document.getElementsByTagName(\"script\")[0] as HTMLScriptElement\n (firstScript.parentNode as Node).insertBefore(script, firstScript)\n }, 1000)\n }).then(() => new Promise((resolve) => {\n window.google.load(\"visualization\", \"1.1\", {\n packages: [\"corechart\", \"controls\"],\n callback: resolve,\n })\n }))\n return fetchPromise\n}\n","// @ts-ignore \"declare module\" doesn't work properly when importing dashboard in cloud\nimport \"jquery-sparkline\"\nimport React, {\n useRef, useEffect, useState,\n} from \"react\"\n\nimport \"../../utils/d3-loader\"\n// @ts-ignore \"declare module\" doesn't work properly when importing dashboard in cloud\nimport d3pie from \"vendor/d3pie-0.2.1-netdata-3\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport {\n ChartMetadata,\n D3pieChartData,\n} from \"domains/chart/chart-types\"\nimport { seconds4human } from \"domains/chart/utils/seconds4human\"\nimport { useDateTime } from \"utils/date-time\"\nimport { tail } from \"ramda\"\n\nconst emptyContent = {\n label: \"no data\",\n value: 100,\n color: \"#666666\",\n}\n\ntype GetDateRange = (arg: {\n chartData: D3pieChartData,\n index: number,\n localeDateString: (date: number | Date) => string,\n localeTimeString: (time: number | Date) => string,\n}) => string\nconst getDateRange: GetDateRange = ({\n chartData, index,\n localeDateString, localeTimeString,\n}) => {\n const dt = Math.round((chartData.before - chartData.after + 1) / chartData.points)\n const dtString = seconds4human(dt)\n\n const before = chartData.result.data[index].time\n const after = before - (dt * 1000)\n\n const d1 = localeDateString(after)\n const t1 = localeTimeString(after)\n const d2 = localeDateString(before)\n const t2 = localeTimeString(before)\n\n if (d1 === d2) {\n return `${d1} ${t1} to ${t2}, ${dtString}`\n }\n\n return `${d1} ${t1} to ${d2} ${t2}, ${dtString}`\n}\n\ninterface Props {\n attributes: Attributes\n chartContainerElement: HTMLElement\n chartData: D3pieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n dimensionsVisibility: boolean[]\n hoveredRow: number\n hoveredX: number | null\n isRemotelyControlled: boolean\n legendFormatValue: ((v: number | string | null) => number | string)\n orderedColors: string[]\n setMinMax: (minMax: [number, number]) => void\n showUndefined: boolean\n unitsCurrent: string\n}\nexport const D3pieChart = ({\n attributes,\n chartContainerElement,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n hoveredRow,\n hoveredX,\n legendFormatValue,\n orderedColors,\n setMinMax,\n unitsCurrent,\n}: Props) => {\n const chartElement = useRef<HTMLDivElement>(null)\n\n const legendFormatValueRef = useRef(legendFormatValue)\n legendFormatValueRef.current = legendFormatValue\n\n const [d3pieInstance, setD3pieInstance] = useState()\n const d3pieOptions = useRef<{[key: string]: any}>()\n\n const { localeDateString, localeTimeString } = useDateTime()\n\n // create chart\n useEffect(() => {\n if (chartElement.current && !d3pieInstance) {\n // d3pieSetContent\n // todo this should be set in chart.tsx, when creating hook\n setMinMax([chartData.min, chartData.max])\n // index is ROW! it's !== 0 only when selection is made\n const index = 0\n const content = tail(chartData.result.labels).map((label, i) => {\n const value = chartData.result.data[index][label]\n const color = orderedColors[i]\n return {\n label,\n value,\n color,\n }\n }).filter((x) => x.value !== null && x.value > 0)\n const safeContent = content.length > 0 ? content : emptyContent\n\n const defaultTitle = attributes.title || chartMetadata.title\n const dateRange = getDateRange({\n chartData,\n index: 0,\n localeDateString,\n localeTimeString,\n })\n const {\n d3pieTitle = defaultTitle,\n d3pieSubtitle = unitsCurrent,\n d3pieFooter = dateRange,\n d3pieTitleColor = window.NETDATA.themes.current.d3pie.title,\n d3pieTitleFontsize = 12,\n d3pieTitleFontweight = \"bold\",\n d3pieTitleFont = \"arial\",\n d3PieSubtitleColor = window.NETDATA.themes.current.d3pie.subtitle,\n d3PieSubtitleFontsize = 10,\n d3PieSubtitleFontweight = \"normal\",\n d3PieSubtitleFont = \"arial\",\n d3PieFooterColor = window.NETDATA.themes.current.d3pie.footer,\n d3PieFooterFontsize = 9,\n d3PieFooterFontweight = \"bold\",\n d3PieFooterFont = \"arial\",\n d3PieFooterLocation = \"bottom-center\",\n\n d3PiePieinnerradius = \"45%\",\n d3PiePieouterradius = \"80%\",\n d3PieSortorder = \"value-desc\",\n d3PieSmallsegmentgroupingEnabled = false,\n d3PieSmallsegmentgroupingValue = 1,\n d3PieSmallsegmentgroupingValuetype = \"percentage\",\n d3PieSmallsegmentgroupingLabel = \"other\",\n d3PieSmallsegmentgroupingColor = window.NETDATA.themes.current.d3pie.other,\n\n d3PieLabelsOuterFormat = \"label-value1\",\n d3PieLabelsOuterHidewhenlessthanpercentage = null,\n d3PieLabelsOuterPiedistance = 15,\n d3PieLabelsInnerFormat = \"percentage\",\n d3PieLabelsInnerHidewhenlessthanpercentage = 2,\n\n d3PieLabelsMainLabelColor = window.NETDATA.themes.current.d3pie.mainlabel,\n d3PieLabelsMainLabelFont = \"arial\",\n d3PieLabelsMainLabelFontsize = 10,\n d3PieLabelsMainLabelFontweight = \"normal\",\n\n d3PieLabelsPercentageColor = window.NETDATA.themes.current.d3pie.percentage,\n d3PieLabelsPercentageFont = \"arial\",\n d3PieLabelsPercentageFontsize = 10,\n d3PieLabelsPercentageFontweight = \"bold\",\n\n d3PieLabelsValueColor = window.NETDATA.themes.current.d3pie.value,\n d3PieLabelsValueFont = \"arial\",\n d3PieLabelsValueFontsize = 10,\n d3PieLabelsValueFontweight = \"bold\",\n\n d3PieLabelsLinesEnabled = true,\n d3PieLabelsLinesStyle = \"curved\",\n d3PieLabelsLinesColor = \"segment\", // \"segment\" or a hex color\n\n d3PieLabelsTruncationEnabled = false,\n d3PieLabelsTruncationTruncatelength = 30,\n\n d3PieMiscColorsSegmentstroke = window.NETDATA.themes.current.d3pie.segment_stroke,\n d3PieMiscGradientEnabled = false,\n d3PieMiscColorsPercentage = 95,\n d3PieMiscGradientColor = window.NETDATA.themes.current.d3pie.gradient_color,\n\n d3PieCssprefix = null,\n } = attributes\n\n const { width, height } = chartContainerElement.getBoundingClientRect()\n\n const initialD3pieOptions = {\n header: {\n title: {\n text: d3pieTitle,\n color: d3pieTitleColor,\n fontSize: d3pieTitleFontsize,\n fontWeight: d3pieTitleFontweight,\n font: d3pieTitleFont,\n },\n subtitle: {\n text: d3pieSubtitle,\n color: d3PieSubtitleColor,\n fontSize: d3PieSubtitleFontsize,\n fontWeight: d3PieSubtitleFontweight,\n font: d3PieSubtitleFont,\n },\n titleSubtitlePadding: 1,\n },\n footer: {\n text: d3pieFooter,\n color: d3PieFooterColor,\n fontSize: d3PieFooterFontsize,\n fontWeight: d3PieFooterFontweight,\n font: d3PieFooterFont,\n location: d3PieFooterLocation,\n },\n size: {\n canvasHeight: Math.floor(height),\n canvasWidth: Math.floor(width),\n pieInnerRadius: d3PiePieinnerradius,\n pieOuterRadius: d3PiePieouterradius,\n },\n data: {\n // none, random, value-asc, value-desc, label-asc, label-desc\n sortOrder: d3PieSortorder,\n smallSegmentGrouping: {\n enabled: d3PieSmallsegmentgroupingEnabled,\n value: d3PieSmallsegmentgroupingValue,\n // percentage, value\n valueType: d3PieSmallsegmentgroupingValuetype,\n label: d3PieSmallsegmentgroupingLabel,\n color: d3PieSmallsegmentgroupingColor,\n },\n\n // REQUIRED! This is where you enter your pie data; it needs to be an array of objects\n // of this form: { label: \"label\", value: 1.5, color: \"#000000\" } - color is optional\n content: safeContent,\n },\n\n\n labels: {\n outer: {\n // label, value, percentage, label-value1, label-value2, label-percentage1,\n // label-percentage2\n format: d3PieLabelsOuterFormat,\n hideWhenLessThanPercentage: d3PieLabelsOuterHidewhenlessthanpercentage,\n pieDistance: d3PieLabelsOuterPiedistance,\n },\n inner: {\n // label, value, percentage, label-value1, label-value2, label-percentage1,\n // label-percentage2\n format: d3PieLabelsInnerFormat,\n hideWhenLessThanPercentage: d3PieLabelsInnerHidewhenlessthanpercentage,\n },\n mainLabel: {\n color: d3PieLabelsMainLabelColor, // or 'segment' for dynamic color\n font: d3PieLabelsMainLabelFont,\n fontSize: d3PieLabelsMainLabelFontsize,\n fontWeight: d3PieLabelsMainLabelFontweight,\n },\n percentage: {\n color: d3PieLabelsPercentageColor,\n font: d3PieLabelsPercentageFont,\n fontSize: d3PieLabelsPercentageFontsize,\n fontWeight: d3PieLabelsPercentageFontweight,\n decimalPlaces: 0,\n },\n value: {\n color: d3PieLabelsValueColor,\n font: d3PieLabelsValueFont,\n fontSize: d3PieLabelsValueFontsize,\n fontWeight: d3PieLabelsValueFontweight,\n },\n lines: {\n enabled: d3PieLabelsLinesEnabled,\n style: d3PieLabelsLinesStyle,\n color: d3PieLabelsLinesColor,\n },\n truncation: {\n enabled: d3PieLabelsTruncationEnabled,\n truncateLength: d3PieLabelsTruncationTruncatelength,\n },\n formatter(context: any) {\n if (context.part === \"value\") {\n return legendFormatValueRef.current(context.value)\n }\n if (context.part === \"percentage\") {\n return `${context.label}%`\n }\n\n return context.label\n },\n },\n effects: {\n load: {\n effect: \"none\", // none / default\n speed: 0, // commented in the d3pie code to speed it up\n },\n pullOutSegmentOnClick: {\n effect: \"bounce\", // none / linear / bounce / elastic / back\n speed: 400,\n size: 5,\n },\n highlightSegmentOnMouseover: true,\n highlightLuminosity: -0.2,\n },\n tooltips: {\n enabled: false,\n type: \"placeholder\", // caption|placeholder\n string: \"\",\n placeholderParser: null, // function\n styles: {\n fadeInSpeed: 250,\n backgroundColor: window.NETDATA.themes.current.d3pie.tooltip_bg,\n backgroundOpacity: 0.5,\n color: window.NETDATA.themes.current.d3pie.tooltip_fg,\n borderRadius: 2,\n font: \"arial\",\n fontSize: 12,\n padding: 4,\n },\n },\n misc: {\n colors: {\n background: \"transparent\", // transparent or color #\n // segments: state.chartColors(),\n segmentStroke: d3PieMiscColorsSegmentstroke,\n },\n gradient: {\n enabled: d3PieMiscGradientEnabled,\n percentage: d3PieMiscColorsPercentage,\n color: d3PieMiscGradientColor,\n },\n canvasPadding: {\n top: 5,\n right: 5,\n bottom: 5,\n left: 5,\n },\n pieCenterOffset: {\n x: 0,\n y: 0,\n },\n cssPrefix: d3PieCssprefix,\n },\n callbacks: {\n onload: null,\n onMouseoverSegment: null,\n onMouseoutSegment: null,\n onClickSegment: null,\n },\n }\n // eslint-disable-next-line new-cap\n const newD3pieInstance = new d3pie(chartElement.current, initialD3pieOptions)\n d3pieOptions.current = initialD3pieOptions\n setD3pieInstance(() => newD3pieInstance)\n }\n }, [attributes, chartContainerElement, chartData, chartMetadata, d3pieInstance, legendFormatValue,\n localeDateString, localeTimeString, orderedColors, setMinMax, unitsCurrent])\n\n // update chart\n useEffect(() => {\n if (d3pieInstance && d3pieOptions.current) {\n const dateRange = getDateRange({\n chartData,\n index: 0,\n localeDateString,\n localeTimeString,\n })\n const {\n d3pieSubtitle = unitsCurrent,\n d3pieFooter = dateRange,\n } = attributes\n\n\n const isHoveredButNoData = !!hoveredX && (hoveredRow === -1)\n const slot = chartData.result.data.length - hoveredRow - 1\n\n const index = (slot < 0 || slot >= chartData.result.data.length)\n ? 0\n : slot\n\n const content = tail(chartData.result.labels).map((label, i) => {\n const value = chartData.result.data[index][label]\n const color = orderedColors[i]\n return {\n label,\n value,\n color,\n }\n }).filter((x) => x.value !== null && x.value > 0)\n const safeContent = (content.length > 0 && !isHoveredButNoData)\n ? content\n : [emptyContent]\n\n d3pieInstance.options.header.subtitle.text = d3pieSubtitle\n d3pieInstance.options.footer.text = d3pieFooter\n\n d3pieInstance.options.data.content = safeContent\n d3pieInstance.destroy()\n d3pieInstance.recreate()\n }\n }, [attributes, chartData, d3pieInstance, hoveredRow, hoveredX, localeDateString,\n localeTimeString, orderedColors, unitsCurrent])\n\n return (\n <div ref={chartElement} id={chartElementId} className={chartElementClassName} />\n )\n}\n","// @ts-ignore \"declare module\" doesn't work properly when importing dashboard in cloud\nimport \"peity\"\nimport React, {\n useRef, useState, useLayoutEffect,\n} from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata, EasyPieChartData } from \"domains/chart/chart-types\"\nimport { colorLuminance } from \"domains/chart/utils/color-luminance\"\n\ninterface Props {\n attributes: Attributes\n chartContainerElement: HTMLElement\n chartData: EasyPieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n orderedColors: string[]\n}\nexport const PeityChart = ({\n attributes,\n chartContainerElement,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n orderedColors,\n}: Props) => {\n const chartElement = useRef<HTMLDivElement>(null)\n\n // update width, height automatically each time\n const [$chartElement, set$chartElement] = useState()\n const peityOptions = useRef<{\n stroke: string,\n fill: string,\n strokeWidth: number,\n width: number,\n height: number,\n }>()\n\n\n // create chart\n useLayoutEffect(() => {\n if (chartElement.current && !$chartElement) {\n const $element = window.$(chartElement.current)\n\n const { width, height } = chartContainerElement.getBoundingClientRect()\n\n const {\n peityStrokeWidth = 1,\n } = attributes\n const peityInitOptions = {\n stroke: window.NETDATA.themes.current.foreground,\n strokeWidth: peityStrokeWidth,\n width: Math.floor(width),\n height: Math.floor(height),\n fill: window.NETDATA.themes.current.foreground,\n }\n\n set$chartElement(() => $element)\n peityOptions.current = peityInitOptions\n }\n }, [attributes, $chartElement, chartContainerElement])\n\n // update chart\n useLayoutEffect(() => {\n if ($chartElement && peityOptions.current) {\n const getFillOverride = () => (\n chartMetadata.chart_type === \"line\"\n ? window.NETDATA.themes.current.background\n : colorLuminance(orderedColors[0], window.NETDATA.chartDefaults.fill_luminance)\n )\n const updatedOptions = {\n ...peityOptions.current,\n stroke: orderedColors[0],\n // optimizatino from old dashboard, perhaps could be transformed to useMemo()\n fill: (orderedColors[0] === peityOptions.current.stroke)\n ? peityOptions.current.fill\n : getFillOverride(),\n }\n $chartElement.peity(\"line\", updatedOptions)\n peityOptions.current = updatedOptions\n }\n }, [$chartElement, chartData, chartMetadata, orderedColors])\n\n return (\n <div\n ref={chartElement}\n id={chartElementId}\n className={chartElementClassName}\n >\n {chartData.result}\n </div>\n )\n}\n","import React, {\n useRef, useState, useLayoutEffect,\n} from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata, EasyPieChartData } from \"domains/chart/chart-types\"\nimport { loadGoogleVisualizationApi } from \"domains/chart/utils/google-visualization-loader\"\n\ninterface Props {\n attributes: Attributes\n chartData: EasyPieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n orderedColors: string[]\n unitsCurrent: string\n}\nexport const GoogleChart = ({\n attributes,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n orderedColors,\n unitsCurrent,\n}: Props) => {\n const chartElement = useRef<HTMLDivElement>(null)\n const googleChartInstance = useRef<\n google.visualization.AreaChart |\n google.visualization.LineChart>()\n\n const [hasApiBeenLoaded, setHasApiBeenLoaded] = useState(false)\n loadGoogleVisualizationApi()\n .then(() => {\n setHasApiBeenLoaded(true)\n })\n\n const googleOptions = useRef<{[key: string]: unknown}>()\n\n // update chart\n useLayoutEffect(() => {\n if (googleChartInstance.current && googleOptions.current) {\n const dataTable = new window.google.visualization.DataTable(chartData.result)\n googleChartInstance.current.draw(dataTable, googleOptions.current)\n }\n }, [chartData])\n\n // create chart\n useLayoutEffect(() => {\n if (chartElement.current && !googleOptions.current && hasApiBeenLoaded) {\n const dataTable = new window.google.visualization.DataTable(chartData.result)\n\n const {\n title = chartMetadata.title,\n } = attributes\n const chartType = chartMetadata.chart_type\n const areaOpacity = new Map([\n [\"area\", window.NETDATA.options.current.color_fill_opacity_area],\n [\"stacked\", window.NETDATA.options.current.color_fill_opacity_stacked],\n ]).get(chartType) || 0.3\n const initialGoogleOptions = {\n colors: orderedColors,\n\n // do not set width, height - the chart resizes itself\n // width: state.chartWidth(),\n // height: state.chartHeight(),\n lineWidth: chartType === \"line\" ? 2 : 1,\n title,\n fontSize: 11,\n hAxis: {\n // title: \"Time of Day\",\n // format:'HH:mm:ss',\n viewWindowMode: \"maximized\",\n slantedText: false,\n format: \"HH:mm:ss\",\n textStyle: {\n fontSize: 9,\n },\n gridlines: {\n color: \"#EEE\",\n },\n },\n vAxis: {\n title: unitsCurrent,\n viewWindowMode: (chartType === \"area\" || chartType === \"stacked\")\n ? \"maximized\"\n : \"pretty\",\n minValue: chartType === \"stacked\" ? undefined : -0.1,\n maxValue: chartType === \"stacked\" ? undefined : 0.1,\n direction: 1,\n textStyle: {\n fontSize: 9,\n },\n gridlines: {\n color: \"#EEE\",\n },\n },\n chartArea: {\n width: \"65%\",\n height: \"80%\",\n },\n focusTarget: \"category\",\n annotation: {\n 1: {\n style: \"line\",\n },\n },\n pointsVisible: false,\n titlePosition: \"out\",\n titleTextStyle: {\n fontSize: 11,\n },\n tooltip: {\n isHtml: false,\n ignoreBounds: true,\n textStyle: {\n fontSize: 9,\n },\n },\n curveType: \"function\" as \"function\",\n areaOpacity,\n isStacked: chartType === \"stacked\",\n }\n\n const googleInstance = [\"area\", \"stacked\"].includes(chartMetadata.chart_type)\n ? new window.google.visualization.AreaChart(chartElement.current)\n : new window.google.visualization.LineChart(chartElement.current)\n\n googleInstance.draw(dataTable, initialGoogleOptions)\n\n googleOptions.current = initialGoogleOptions\n googleChartInstance.current = googleInstance\n }\n }, [attributes, chartData.result, chartMetadata, chartElement, hasApiBeenLoaded, orderedColors,\n unitsCurrent])\n\n\n return (\n <div\n ref={chartElement}\n id={chartElementId}\n className={chartElementClassName}\n />\n )\n}\n","import React from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { EasyPieChartData } from \"domains/chart/chart-types\"\n\ninterface Props {\n attributes: Attributes\n chartData: EasyPieChartData\n chartElementClassName: string\n chartElementId: string\n}\nexport const TextOnly = ({\n attributes,\n chartData,\n chartElementClassName,\n chartElementId,\n}: Props) => {\n const { textOnlyDecimalPlaces = 1, textOnlyPrefix = \"\", textOnlySuffix = \"\" } = attributes\n\n // Round based on number of decimal places to show\n const precision = 10 ** textOnlyDecimalPlaces\n const value = Math.round(chartData.result[0] * precision) / precision\n\n const textContent = chartData.result.length === 0 ? \"\" : textOnlyPrefix + value + textOnlySuffix\n\n return (\n <div id={chartElementId} className={chartElementClassName}>\n {textContent}\n </div>\n )\n}\n","/* eslint-disable no-param-reassign */\n// @ts-nocheck\n\nexport const defaultCellSize = 11\nexport const defaultPadding = 1\nexport const defaultAspectRatio = Math.round(16 / 9)\n\nexport const getCellBoxSize = (cellSize = defaultCellSize, padding = defaultPadding) =>\n cellSize - padding\nexport const getRows = (data, aspectRatio = defaultAspectRatio) =>\n Math.sqrt(data.length / aspectRatio)\nexport const getColumns = (rows, aspectRatio = defaultAspectRatio) => rows * aspectRatio\n\nexport const getXPosition = (columns, index, cellSize = defaultCellSize) =>\n Math.floor(index % columns) * cellSize\nexport const getYPosition = (columns, index, cellSize = defaultCellSize) =>\n Math.floor(index / columns) * cellSize\n\nexport const getFullWidth = (columns, cellSize = defaultCellSize) => Math.ceil(columns) * cellSize\nexport const getFullHeight = (rows, cellSize = defaultCellSize, padding = defaultCellSize) =>\n Math.ceil(rows) * cellSize + padding\n\nexport const getOffsetPosition = (offset, cellSize = defaultCellSize) =>\n Math.floor(offset / cellSize)\n","/* eslint-disable object-curly-newline */\n/* eslint-disable no-param-reassign */\n// @ts-nocheck\nimport { getCellBoxSize, getXPosition, getYPosition, getOffsetPosition } from \"./utilities\"\n\nexport default (\n el,\n columns,\n total,\n { onMouseenter, onMouseout },\n { cellSize, cellPadding } = {}\n) => {\n let hoveredIndex = -1\n\n const getEvent = index => {\n const rect = el.getBoundingClientRect()\n const offsetX = getXPosition(columns, index, cellSize)\n const offsetY = getYPosition(columns, index, cellSize)\n const left = rect.left + offsetX\n const top = rect.top + offsetY\n const cellBoxSize = getCellBoxSize(cellSize, cellPadding)\n\n return {\n index,\n left,\n top,\n right: left + cellBoxSize,\n bottom: top + cellBoxSize,\n width: cellBoxSize,\n height: cellBoxSize,\n offsetX,\n offsetY,\n }\n }\n\n const mouseout = () => {\n onMouseout(getEvent(hoveredIndex))\n hoveredIndex = -1\n }\n\n const mousemove = e => {\n const { offsetX, offsetY } = e\n const x = getOffsetPosition(offsetX, cellSize)\n const y = getOffsetPosition(offsetY, cellSize)\n const nextHoveredIndex = y * columns + x\n\n if (nextHoveredIndex === hoveredIndex) return\n\n if (hoveredIndex !== -1) mouseout()\n\n if (nextHoveredIndex >= total) return\n\n onMouseenter(getEvent(nextHoveredIndex))\n hoveredIndex = nextHoveredIndex\n }\n\n el.addEventListener(\"mousemove\", mousemove)\n el.addEventListener(\"mouseout\", mouseout)\n return () => {\n el.removeEventListener(\"mousemove\", mousemove)\n el.removeEventListener(\"mouseout\", mouseout)\n }\n}\n","/* eslint-disable object-curly-newline */\n/* eslint-disable comma-dangle */\n/* eslint-disable implicit-arrow-linebreak */\n/* eslint-disable no-param-reassign */\n// @ts-nocheck\nimport { scaleLinear, extent } from \"d3\"\nimport {\n getCellBoxSize,\n getRows,\n getColumns,\n getXPosition,\n getYPosition,\n getFullWidth,\n getFullHeight,\n} from \"./utilities\"\nimport registerEvents from \"./events\"\n\nexport const getWidth = (data, { aspectRatio, cellSize } = {}) => {\n const rows = getRows(data, aspectRatio)\n const columns = getColumns(rows, aspectRatio)\n return getFullWidth(columns, cellSize)\n}\n\nconst getCanvasAttributes = (data, { aspectRatio, cellSize, padding } = {}) => {\n const rows = getRows(data, aspectRatio)\n const columns = getColumns(rows, aspectRatio)\n const width = getFullWidth(columns, cellSize)\n const height = getFullHeight(rows, cellSize, padding)\n\n return { width, height, columns: Math.ceil(columns) }\n}\n\nconst defaultColorRange = [\"rgba(198, 227, 246, 0.9)\", \"rgba(14, 154, 255, 0.9)\"]\n\nconst makeGetColor = (values, colorRange = defaultColorRange) =>\n scaleLinear()\n .domain(extent(values, value => value))\n .range(colorRange)\n\nexport default (el, { onMouseenter, onMouseout }, options = {}) => {\n const { cellSize, cellPadding, cellStroke = 2, lineWidth = 1, colorRange } = options\n const canvas = el.getContext(\"2d\")\n\n let activeBox = -1\n let deactivateBox = () => {}\n let activateBox = {}\n let clearEvents = () => {}\n\n const clear = () => {\n deactivateBox()\n clearEvents()\n canvas.clearRect(0, 0, el.width, el.height)\n canvas.beginPath()\n }\n\n const update = ({ data }) => {\n const { width, height, columns } = getCanvasAttributes(data, options)\n el.width = parseInt(width)\n el.height = parseInt(height)\n clear()\n clearEvents()\n const getColor = makeGetColor(data, colorRange)\n\n const drawBox = (value, index) => {\n canvas.fillStyle = getColor(value)\n\n const offsetX = getXPosition(columns, index, cellSize)\n const offsetY = getYPosition(columns, index, cellSize)\n\n if (lineWidth && cellStroke) {\n canvas.clearRect(\n offsetX - lineWidth,\n offsetY - lineWidth,\n getCellBoxSize(cellSize, cellPadding) + cellStroke,\n getCellBoxSize(cellSize, cellPadding) + cellStroke\n )\n }\n\n canvas.fillRect(\n offsetX,\n offsetY,\n getCellBoxSize(cellSize, cellPadding),\n getCellBoxSize(cellSize, cellPadding)\n )\n }\n\n data.forEach(drawBox)\n\n clearEvents = registerEvents(\n el,\n columns,\n data.length,\n {\n onMouseenter,\n onMouseout,\n },\n options\n )\n\n deactivateBox = () => {\n if (activeBox !== -1) drawBox(data[activeBox], activeBox)\n }\n\n activateBox = index => {\n deactivateBox()\n activeBox = index\n\n const offsetX = getXPosition(columns, index, cellSize)\n const offsetY = getYPosition(columns, index, cellSize)\n\n if (lineWidth && cellStroke) {\n canvas.lineWidth = lineWidth\n canvas.strokeStyle = \"#fff\"\n canvas.strokeRect(\n offsetX + lineWidth,\n offsetY + lineWidth,\n getCellBoxSize(cellSize, cellPadding) - cellStroke,\n getCellBoxSize(cellSize, cellPadding) - cellStroke\n )\n }\n }\n }\n\n return {\n clear,\n update,\n activateBox: index => activateBox(index),\n deactivateBox: () => deactivateBox(),\n }\n}\n","/* eslint-disable arrow-body-style */\n// @ts-nocheck\n\nexport default (el) => {\n return el.getBoundingClientRect().top / window.innerHeight > 0.5 ? \"top\" : \"bottom\"\n}\n","/* eslint-disable operator-linebreak */\n/* eslint-disable implicit-arrow-linebreak */\n/* eslint-disable object-curly-newline */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable react/jsx-fragments */\n// @ts-nocheck\nimport React, { useRef, useLayoutEffect, Fragment, useState, useCallback } from \"react\"\nimport { Drop } from \"@netdata/netdata-ui\"\nimport drawBoxes from \"./drawBoxes\"\nimport getAlign from \"./getAlign\"\n\ninterface GroupboxData {\n data: number[]\n labels: string[]\n}\n\ninterface GroupBoxProps {\n data: GroupboxData[]\n}\n\nconst aligns = {\n top: { bottom: \"top\" },\n bottom: { top: \"bottom\" },\n}\n\nconst GroupBox = ({ data, renderTooltip, ...options }: GroupBoxProps) => {\n const dataRef = useRef()\n const canvasRef = useRef()\n const boxesRef = useRef()\n\n const [hover, setHover] = useState(null)\n const dropHoverRef = useRef(false)\n const boxHoverRef = useRef(-1)\n const timeoutId = useRef()\n\n const close = () => {\n boxesRef.current.deactivateBox()\n setHover(null)\n dropHoverRef.current = false\n boxHoverRef.current = -1\n }\n\n const closeDrop = () =>\n requestAnimationFrame(() => {\n setHover(currentHover => {\n if (\n !dropHoverRef.current &&\n (boxHoverRef.current === -1 || boxHoverRef.current !== currentHover?.index)\n ) {\n close()\n }\n return currentHover\n })\n })\n\n useLayoutEffect(() => {\n boxesRef.current = drawBoxes(\n canvasRef.current,\n {\n onMouseenter: ({ index, ...rect }) => {\n boxHoverRef.current = index\n boxesRef.current.activateBox(index)\n timeoutId.current = setTimeout(() => {\n setHover({\n target: { getBoundingClientRect: () => rect },\n index,\n rect,\n })\n }, 600)\n },\n onMouseout: () => {\n boxHoverRef.current = -1\n clearTimeout(timeoutId.current)\n closeDrop()\n },\n },\n options\n )\n return () => boxesRef.current.clear()\n }, [])\n\n useLayoutEffect(() => {\n if (\n hover &&\n dataRef.current &&\n dataRef.current.labels[hover.index] !== data.labels[hover.index]\n ) {\n close()\n }\n dataRef.current = data\n boxesRef.current.update(data)\n }, [data])\n\n const onMouseEnter = useCallback(() => {\n dropHoverRef.current = true\n }, [])\n\n const onMouseLeave = useCallback(() => {\n dropHoverRef.current = false\n closeDrop()\n }, [])\n\n const align = hover && getAlign(hover.target)\n\n return (\n <Fragment>\n <canvas data-testid=\"groupBox\" ref={canvasRef} />\n {hover && renderTooltip && (\n <Drop\n align={aligns[align]}\n target={hover.target}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n {renderTooltip(hover.index, align)}\n </Drop>\n )}\n </Fragment>\n )\n}\n\nexport default GroupBox\n","/* eslint-disable operator-linebreak */\n/* eslint-disable object-curly-newline */\n/* eslint-disable arrow-body-style */\n/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/jsx-one-expression-per-line */\n// @ts-nocheck\nimport React, { useRef, useMemo } from \"react\"\nimport styled from \"styled-components\"\nimport { Flex, TextMicro, Popover } from \"@netdata/netdata-ui\"\nimport GroupBox from \"./groupBox\"\nimport { getWidth } from \"./drawBoxes\"\nimport getAlign from \"./getAlign\"\n\ninterface GroupBoxWrapperProps {\n data: any\n title: string\n}\n\nconst Title = styled.span`\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow-x: hidden;\n`\n\nconst Label = styled(Flex).attrs({\n as: TextMicro,\n gap: 1,\n})`\n cursor: default;\n &:hover {\n font-weight: bold;\n }\n`\n\nconst GroupBoxWrapper = ({\n data,\n label,\n groupIndex,\n renderGroupPopover,\n renderBoxPopover,\n}: GroupBoxWrapperProps) => {\n const ref = useRef()\n const align = ref.current && getAlign(ref.current)\n\n const style = useMemo(() => ({ maxWidth: `${getWidth(data.data)}px` }), [data])\n\n const boxPopover =\n renderBoxPopover &&\n ((index, boxAlign) => renderBoxPopover({ group: label, groupIndex, align: boxAlign, index }))\n\n const groupPopover =\n renderGroupPopover && (() => renderGroupPopover({ group: label, groupIndex, align }))\n\n return (\n <Flex data-testid=\"groupBoxWrapper\" column alignItems=\"start\" gap={1} margin={[0, 4, 0, 0]}>\n <Popover content={groupPopover} align={align} plain>\n {({ isOpen, ref: popoverRef, ...rest }) => (\n <Label\n data-testid=\"groupBoxWrapper-title\"\n ref={el => {\n ref.current = el\n popoverRef(el)\n }}\n strong={isOpen}\n style={style}\n {...rest}\n >\n <Title>{label}</Title>\n {data.data.length > 3 && <span>({data.data.length})</span>}\n </Label>\n )}\n </Popover>\n <GroupBox data={data} renderTooltip={boxPopover} />\n </Flex>\n )\n}\n\nconst GroupBoxes = ({ data, labels, renderBoxPopover, renderGroupPopover }: any) => (\n <Flex data-testid=\"groupBoxes\" flexWrap overflow={{ vertical: \"auto\" }} flex>\n {labels.map((label, index) => {\n return data[index].data.length ? (\n <GroupBoxWrapper\n key={label}\n label={label}\n groupIndex={index}\n data={data[index]}\n renderGroupPopover={renderGroupPopover}\n renderBoxPopover={renderBoxPopover}\n />\n ) : null\n })}\n </Flex>\n)\n\nexport default GroupBoxes\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { Flex, TextNano } from \"@netdata/netdata-ui\"\n\ninterface LegendProps {\n children?: React.ReactNode\n}\n\nconst LinearColorScaleBar = styled(Flex).attrs({ width: \"120px\", height: \"12px\", round: true })`\n background: linear-gradient(to right, #c6e3f6, #0e9aff);\n`\n\nconst Legend = ({ children }: LegendProps) => (\n <Flex data-testid=\"groupBox-legend\" gap={4} alignItems=\"center\">\n <TextNano strong>{children}</TextNano>\n <Flex gap={2} alignItems=\"center\">\n <TextNano>0%</TextNano>\n <LinearColorScaleBar />\n <TextNano>100%</TextNano>\n </Flex>\n {/* <Flex gap={2} alignItems=\"center\">\n <TextNano strong>Alarms</TextNano>\n <Flex width=\"12px\" height=\"12px\" background=\"error\" round />\n </Flex>\n <Flex gap={2} alignItems=\"center\">\n <TextNano strong>Warnings</TextNano>\n <Flex width=\"12px\" height=\"12px\" background=\"warning\" round />\n </Flex> */}\n </Flex>\n)\n\nexport default Legend\n","// @ts-nocheck\n\nconst labels = {\n k8s_cluster_id: { icon: \"cluster\", title: \"Cluster Id\" },\n k8s_node_name: { icon: \"nodes_hollow\", title: \"Node\" },\n k8s_namespace: { icon: \"cluster_spaces\", title: \"Namespace\" },\n k8s_controller_kind: { icon: \"controller_kind\", title: \"Controller Kind\" },\n k8s_controller_name: { icon: \"controller_name\", title: \"Controller Name\" },\n k8s_pod_name: { icon: \"pod\", title: \"Pod Name\" },\n k8s_container_name: { icon: \"container\", title: \"Container\" },\n}\n\nexport const labelIds = Object.keys(labels)\n\nexport default (id) => {\n if (id in labels) return labels[id]\n // k8s_custom_label -> Custom Label\n const title = id.replace(/_./g, (word) => ` ${word[1].toUpperCase()}`).replace(/^k8s /, \"\")\n return { title, icon: \"node\" }\n}\n","/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst Separator = () => <Flex height=\"1px\" width=\"100%\" background=\"separator\" />\n\nexport default Separator\n","/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { H5 } from \"@netdata/netdata-ui\"\n\nconst Header = props => (\n <H5 color=\"bright\" wordBreak=\"break-all\" data-testid=\"k8sPopover-header\" {...props} />\n)\n\nexport default Header\n","/* eslint-disable indent */\n/* eslint-disable implicit-arrow-linebreak */\n/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { Flex, Button, getColor } from \"@netdata/netdata-ui\"\nimport styled from \"styled-components\"\n\nexport const TabButton = styled(Button).attrs(({ active }) => ({\n flavour: \"borderless\",\n neutral: true,\n themeType: \"dark\",\n className: \"btn\",\n disabled: active,\n \"data-testid\": \"k8sPopoverChart-tab\",\n}))`\n &&& {\n height: initial;\n width: initial;\n padding: 2px 20px;\n ${({ active, theme }) => active && `border-bottom: 3px solid ${getColor(\"bright\")({ theme })};`}\n color: ${({ active, theme }) => getColor(active ? \"bright\" : \"separator\")({ theme })}\n }\n`\n\nconst Tabs = ({ value, onChange, ...rest }) => (\n <Flex data-testid=\"k8sPopoverChart-tabs\" {...rest}>\n <TabButton label=\"Context\" active={value === \"context\"} onClick={() => onChange(\"context\")} />\n <TabButton label=\"Metrics\" active={value === \"metrics\"} onClick={() => onChange(\"metrics\")} />\n </Flex>\n)\n\nexport default Tabs\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { Flex, Button, H6, makeFlex } from \"@netdata/netdata-ui\"\nimport styled from \"styled-components\"\n\nconst ExpandButton = styled(makeFlex(Button)).attrs({\n icon: \"chevron_right_s\",\n label: \"More\",\n flavour: \"borderless\",\n neutral: true,\n themeType: \"dark\",\n className: \"btn\",\n alignItems: \"baseline\",\n gap: 1,\n direction: \"rowReverse\",\n})`\n &&& {\n padding: 0;\n margin: 0;\n font-weight: normal;\n height: initial;\n width: initial;\n\n svg {\n height: 6px;\n width: 6px;\n position: initial;\n }\n }\n`\n\nconst Section = ({ title, onExpand, children, noBorder }) => (\n <Flex\n gap={3}\n padding={[0, 0, 3]}\n border={!noBorder && { side: \"bottom\", color: \"separator\" }}\n column\n data-testid=\"k8sPopoverSection\"\n >\n <Flex justifyContent=\"between\" data-testid=\"k8sPopoverSection-header\">\n <H6 color=\"border\" wordBreak=\"break-all\">\n {title}\n </H6>\n {onExpand && <ExpandButton onClick={onExpand} />}\n </Flex>\n <Flex gap={4} column data-testid=\"k8sPopoverSection-content\">\n {children}\n </Flex>\n </Flex>\n)\n\nexport default Section\n","import { LOCALSTORAGE_HEIGHT_KEY_PREFIX } from \"domains/chart/components/resize-handler\"\n\nimport { LEGEND_BOTTOM_SINGLE_LINE_HEIGHT } from \"domains/chart/utils/legend-utils\"\nimport { Attributes } from \"./transformDataAttributes\"\nimport { ChartLibraryConfig } from \"./chartLibrariesSettings\"\n\ntype GetPortalNodeStyles = (\n attributes: Attributes,\n chartSettings: ChartLibraryConfig,\n shouldAddSpecialHeight: boolean,\n) => {\n height: string | undefined,\n width: string | undefined,\n minWidth: string | undefined\n}\n\nconst getHeightFromLocalStorage = (heightID: string, isLegendOnBottom: boolean) => {\n const persitedHeight = localStorage.getItem(`${LOCALSTORAGE_HEIGHT_KEY_PREFIX}${heightID}`)\n if (persitedHeight) {\n if (Number.isNaN(Number(persitedHeight))) {\n return null\n }\n return `${isLegendOnBottom\n ? Number(persitedHeight) + LEGEND_BOTTOM_SINGLE_LINE_HEIGHT\n : persitedHeight\n }px`\n }\n\n return null\n}\n\nexport const getPortalNodeStyles: GetPortalNodeStyles = (\n attributes,\n chartSettings,\n shouldAddSpecialHeight,\n) => {\n let width\n if (typeof attributes.width === \"string\") {\n // eslint-disable-next-line prefer-destructuring\n width = attributes.width\n } else if (typeof attributes.width === \"number\") {\n width = `${attributes.width.toString()}px`\n }\n let height\n if (chartSettings.aspectRatio === undefined) {\n if (typeof attributes.height === \"string\") {\n // eslint-disable-next-line prefer-destructuring\n height = attributes.height\n } else if (typeof attributes.height === \"number\") {\n height = `${attributes.height.toString()}px`\n }\n }\n const isLegendOnBottom = attributes.legendPosition === \"bottom\"\n\n const heightFromLocalStorage = attributes.heightId\n ? getHeightFromLocalStorage(attributes.heightId, isLegendOnBottom)\n : null\n\n if (heightFromLocalStorage) {\n // .replace() is for backwards compatibility - old dashboard was always doing\n // JSON.stringify when setting localStorage so many users have '\"180px\"' values set.\n // We can remove .replace() after some time\n height = heightFromLocalStorage.replace(/\"/g, \"\")\n }\n\n if (shouldAddSpecialHeight) {\n const heightOverriden = isLegendOnBottom\n ? window.innerHeight * 0.5\n : window.innerHeight * 0.4\n height = `${heightOverriden}px`\n }\n\n const chartDefaultsMinWidth = window.NETDATA.chartDefaults.min_width\n const minWidth = chartDefaultsMinWidth === null\n ? undefined\n : chartDefaultsMinWidth\n return {\n height,\n width,\n minWidth,\n }\n}\n","import {\n useEffect, useRef, useState, MutableRefObject,\n} from \"react\"\n\nconst globalIntersectionOptions = {\n root: null,\n rootMargin: \"0px\",\n threshold: undefined,\n}\n\ntype IntersectionCallback = (isVisible: boolean) => void\ntype Listener = {\n element: HTMLElement,\n callback: IntersectionCallback,\n}\nconst createGlobalIntersectionObserver = () => {\n let listeners: Listener[] = []\n const globalHandler = (entries: IntersectionObserverEntry[]) => {\n entries.forEach(({ isIntersecting, target }) => {\n const callback = listeners.find(({ element }) => element === target)?.callback\n if (callback) {\n callback(isIntersecting)\n }\n })\n }\n const globalObserver = new IntersectionObserver(globalHandler, globalIntersectionOptions)\n\n return {\n subscribe: (element: HTMLElement, callback: IntersectionCallback) => {\n globalObserver.observe(element)\n listeners = listeners.concat({ element, callback })\n },\n unsubscribe: (elementToUnsubscribe: HTMLElement) => {\n listeners = listeners.filter(({ element }) => element !== elementToUnsubscribe)\n },\n }\n}\nconst globalIntersectionObserver = createGlobalIntersectionObserver()\n\n\n// this hook is created for 2 reasons:\n// 1) to use the same IntersectionObserver for all charts (contrary to use-intersection from\n// react-use, which creates new observer for every hook)\n// 2) to update the isVisible state only when necessary (contrary to what \"use-in-view\" hook from\n// https://github.com/thebuilder/react-intersection-observer does)\nexport const useCommonIntersection = (\n element: HTMLElement,\n clonedChildrenRef: MutableRefObject<HTMLElement | undefined>,\n) => {\n const [isVisible, setIsVisible] = useState(false)\n const isVisibleRef = useRef(isVisible)\n // the ref is just to prevent most updates on init - charts are not visible on first intersection\n // observer callback, but it still tries to set the state. UseState does not bail out when\n // state doesn't change\n\n useEffect(() => {\n if (typeof IntersectionObserver === \"function\") {\n globalIntersectionObserver.subscribe(\n element,\n (newIsVisible) => {\n if (isVisibleRef.current !== newIsVisible) {\n if (clonedChildrenRef.current) {\n // eslint-disable-next-line no-param-reassign\n clonedChildrenRef.current.style.visibility = newIsVisible ? \"visible\" : \"hidden\"\n }\n\n isVisibleRef.current = newIsVisible\n // we need to mirror it in `use-state` to cause react update\n setIsVisible(newIsVisible)\n }\n },\n )\n }\n return () => {\n globalIntersectionObserver.unsubscribe(element)\n }\n }, [clonedChildrenRef, element])\n\n return isVisible\n}\n","import React from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\n\ninterface Props {\n attributes: Attributes\n}\n\n// rendered on init (for example when chart is not visible)\n// and when it's rendering after being hidden previously\nexport const InvisibleSearchableText = ({\n attributes,\n}: Props) => (\n <span style={{ position: \"absolute\", opacity: 0, width: 0 }}>\n {attributes.id}\n </span>\n)\n","import React, {\n useEffect, useLayoutEffect, useState, useRef,\n} from \"react\"\nimport { useDebounce } from \"react-use\"\nimport { forEachObjIndexed } from \"ramda\"\n\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { isPrintMode } from \"domains/dashboard/utils/parse-url\"\nimport { selectDestroyOnHide, selectIsAsyncOnScroll, selectAlarm } from \"domains/global/selectors\"\nimport { getPortalNodeStyles } from \"domains/chart/utils/get-portal-node-styles\"\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { chartLibrariesSettings } from \"domains/chart/utils/chartLibrariesSettings\"\nimport { useCommonIntersection } from \"hooks/use-common-intersection\"\n\nimport { clearChartStateAction } from \"../actions\"\n\nimport { InvisibleSearchableText } from \"./invisible-searchable-text\"\n\nconst SCROLL_DEBOUNCE_ASYNC = 750\nconst SCROLL_DEBOUNCE_SYNC = 100\n\nconst cloneWithCanvas = (element: HTMLElement) => {\n const cloned = element.cloneNode(true) as HTMLElement\n const clonedCanvases = cloned.querySelectorAll(\"canvas\")\n\n element.querySelectorAll(\"canvas\")\n .forEach((oldCanvas, index) => {\n const newCanvas = clonedCanvases[index]\n const context = newCanvas.getContext(\"2d\")\n\n newCanvas.width = oldCanvas.width\n newCanvas.height = oldCanvas.height\n\n if (context) {\n context.drawImage(oldCanvas, 0, 0)\n }\n })\n return cloned\n}\n\nconst shouldCleanChartStateAlways = localStorage.getItem(\"wipe-chart-state\")\n\ninterface Props {\n attributes: Attributes\n chartUuid: string\n children: any\n portalNode: HTMLElement\n}\nexport const DisableOutOfView = ({\n attributes,\n chartUuid,\n children,\n portalNode,\n}: Props) => {\n /* when unmounting, clear redux state for this chart */\n const dispatch = useDispatch()\n useEffect(() => { // eslint-disable-line arrow-body-style\n return () => {\n dispatch(clearChartStateAction({ id: chartUuid }))\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n\n /* separate functionality - adding custom styles to portalNode */\n const chartSettings = chartLibrariesSettings[attributes.chartLibrary]\n const [hasPortalNodeBeenStyled, setHasPortalNodeBeenStyled] = useState<boolean>(false)\n const isShowingAlarmOnChart = useSelector(selectAlarm)?.chartId === attributes.id\n useLayoutEffect(() => {\n if (hasPortalNodeBeenStyled) {\n return\n }\n const shouldAddSpecialHeight = isShowingAlarmOnChart\n && attributes.chartLibrary === \"dygraph\"\n && chartSettings.hasLegend(attributes)\n const styles = getPortalNodeStyles(attributes, chartSettings, shouldAddSpecialHeight)\n forEachObjIndexed((value, styleName) => {\n if (value) {\n portalNode.style.setProperty(styleName, value)\n }\n }, styles)\n // eslint-disable-next-line no-param-reassign\n portalNode.className = chartSettings.containerClass(attributes)\n setHasPortalNodeBeenStyled(true)\n }, [attributes, chartSettings, hasPortalNodeBeenStyled, isShowingAlarmOnChart, portalNode,\n setHasPortalNodeBeenStyled ])\n /* end of \"adding custom styles to portalNode\" */\n\n\n const destroyOnHide = useSelector(selectDestroyOnHide)\n\n const clonedChildrenRef = useRef<HTMLElement>()\n const isVisibleIntersection = useCommonIntersection(portalNode, clonedChildrenRef)\n\n // todo hook to scroll (observe on visible items) instead of changes in intersectionRatio\n // because intersectinnRatio maxes out on 1.0 when element is fully visible\n const isAsyncOnScroll = useSelector(selectIsAsyncOnScroll)\n const debounceTime = isAsyncOnScroll ? SCROLL_DEBOUNCE_ASYNC : SCROLL_DEBOUNCE_SYNC\n\n // \"should hide because of debounced scroll handler\"\n const [shouldHideDebounced, setShouldHideDebounced] = useState(!isVisibleIntersection)\n useDebounce(\n () => {\n // start rendering, when intersectionRatio is not 0 and it hasn't changed for 1500 ms\n setShouldHideDebounced(!isVisibleIntersection)\n },\n debounceTime,\n [isVisibleIntersection],\n )\n const shouldHide = isVisibleIntersection ? shouldHideDebounced : true\n\n const previousIsVisibleIntersection = useRef(isVisibleIntersection)\n if (clonedChildrenRef.current\n && previousIsVisibleIntersection.current !== isVisibleIntersection\n ) {\n previousIsVisibleIntersection.current = isVisibleIntersection\n }\n\n useEffect(() => {\n if (!isPrintMode && shouldHide && shouldCleanChartStateAlways) {\n dispatch(clearChartStateAction({ id: chartUuid }))\n }\n }, [chartUuid, dispatch, shouldHide])\n\n\n if (isPrintMode) {\n // we should show everything in this case\n return children\n }\n\n if (shouldHide) {\n // todo perhaps loader should be added here to both scenarios\n if (destroyOnHide) {\n return (\n <InvisibleSearchableText attributes={attributes} />\n )\n }\n\n if (!clonedChildrenRef.current) {\n const newClonedChildren = Array.from(portalNode.children)\n .map((child) => cloneWithCanvas(child as HTMLElement))\n\n const clonedChildrenContainer = document.createElement(\"div\")\n clonedChildrenContainer.style.visibility = \"hidden\"\n\n newClonedChildren.forEach((child) => {\n clonedChildrenContainer.appendChild(child)\n })\n\n clonedChildrenRef.current = clonedChildrenContainer\n }\n\n return (\n <>\n <InvisibleSearchableText attributes={attributes} />\n <div\n ref={(nodeElement) => {\n if (nodeElement && clonedChildrenRef.current) {\n nodeElement.appendChild(clonedChildrenRef.current)\n }\n }}\n />\n </>\n )\n }\n\n if (!destroyOnHide && clonedChildrenRef.current) {\n clonedChildrenRef.current = undefined\n }\n\n return children\n}\n","import React from \"react\"\n\nimport { Attributes } from \"../../utils/transformDataAttributes\"\nimport { ChartMetadata } from \"../../chart-types\"\nimport { ChartWithLoader, RenderCustomElementForDygraph } from \"../chart-with-loader\"\nimport { DisableOutOfView } from \"../disable-out-of-view\"\nimport { DropdownMenu } from \"../chart-dropdown\"\n\nexport type Props = {\n attributes: Attributes\n // warning! this is not the same as chartId in old dashboard\n // here, the chartID must be unique across all agents\n chartUuid: string\n uuid?: string\n portalNode: HTMLElement\n chartMetadata?: ChartMetadata | undefined\n dropdownMenu?: DropdownMenu\n renderCustomElementForDygraph?: RenderCustomElementForDygraph\n onAttributesChange?: any\n}\n\nexport const ChartContainer = ({\n attributes,\n chartMetadata,\n chartUuid,\n dropdownMenu,\n portalNode,\n renderCustomElementForDygraph,\n onAttributesChange,\n uuid,\n}: Props) => (\n <DisableOutOfView attributes={attributes} portalNode={portalNode} chartUuid={chartUuid}>\n <ChartWithLoader\n attributes={attributes}\n chartUuid={chartUuid}\n renderCustomElementForDygraph={renderCustomElementForDygraph}\n onAttributesChange={onAttributesChange}\n dropdownMenu={dropdownMenu}\n externalChartMetadata={chartMetadata}\n portalNode={portalNode}\n uuid={uuid}\n />\n </DisableOutOfView>\n)\n","/* eslint-disable max-len */\nimport { ChartsMetadata } from \"domains/global/types\"\nimport { AnyStringKeyT } from \"types/common\"\nimport { ChartEnriched } from \"domains/chart/chart-types\"\n\nexport interface Submenus {\n [submenus: string]: {\n charts: ChartEnriched[]\n height: number\n info: string | null\n priority: number\n title: string | null\n }\n}\n\nexport interface CorrelationMetadata {\n scoredCount?: number\n totalCount?: number\n averageScore?: number\n}\n\nexport interface Menu {\n // eslint-disable-next-line camelcase\n menu_pattern: string\n priority: number\n submenus: Submenus\n title: string\n icon: string\n info: string\n height: number\n correlationsMetadata?: CorrelationMetadata\n}\n\nexport interface Menus {\n [menu: string]: Menu\n}\n\nexport const options = {\n menus: {} as Menus,\n submenu_names: {} as {[family: string]: string},\n data: null as (ChartsMetadata | null),\n hostname: \"netdata_server\", // will be overwritten by the netdata server\n version: \"unknown\",\n release_channel: \"unknown\",\n hosts: [],\n\n duration: 0, // the default duration of the charts\n update_every: 1,\n\n chartsPerRow: 0,\n // chartsMinWidth: 1450,\n chartsHeight: 180,\n}\n\n\n// netdata standard information\nexport const netdataDashboard = {\n sparklines_registry: {} as {[key: string]: { count: number }},\n os: \"unknown\",\n\n menu: {},\n submenu: {} as {\n [family: string]: {\n info?: string | ((os: string) => string)\n title?: string\n }\n },\n context: {} as {\n [id: string]: {\n valueRange: string // examples: \"[0, 100]\", \"[null, null]\"\n height: number\n decimalDigits: number\n }},\n\n // generate a sparkline\n // used in the documentation\n sparkline(\n prefix: string, chart: string, dimension: string, units: string = \"\", suffix: string,\n ) {\n if (options.data === null || typeof options.data.charts === \"undefined\") {\n return \"\"\n }\n\n if (typeof options.data.charts[chart] === \"undefined\") {\n return \"\"\n }\n\n if (typeof options.data.charts[chart].dimensions === \"undefined\") {\n return \"\"\n }\n\n if (typeof options.data.charts[chart].dimensions[dimension] === \"undefined\") {\n return \"\"\n }\n\n let key = `${chart}.${dimension}`\n\n if (typeof this.sparklines_registry[key] === \"undefined\") {\n this.sparklines_registry[key] = { count: 1 }\n } else {\n this.sparklines_registry[key].count += 1\n }\n\n key = `${key}.${this.sparklines_registry[key].count}`\n\n return `${prefix}<div class=\"netdata-container\" data-netdata=\"${chart}\" data-after=\"-120\"\n data-width=\"25%\" data-height=\"15px\" data-chart-library=\"dygraph\"\n data-dygraph-theme=\"sparkline\" data-dimensions=\"${dimension}\"\n data-show-value-of-${dimension}-at=\"${key}\"></div>\n (<span id=\"${key}\" style=\"display: inline-block; min-width: 50px; text-align: right;\">\n X</span>${units})${suffix}`\n },\n\n gaugeChart(\n title: string, width: string, dimensions: string = \"\", colors: string = \"\",\n ) {\n return `${\"<div class=\\\"netdata-container\\\" data-netdata=\\\"CHART_UNIQUE_ID\\\"\"\n + \" data-dimensions=\\\"\"}${dimensions}\"`\n + \" data-chart-library=\\\"gauge\\\"\"\n + \" data-gauge-adjust=\\\"width\\\"\"\n + ` data-title=\"${title}\"`\n + ` data-width=\"${width}\"`\n + \" data-before=\\\"0\\\"\"\n + \" data-after=\\\"-CHART_DURATION\\\"\"\n + \" data-points=\\\"CHART_DURATION\\\"\"\n + ` data-colors=\"${colors}\"`\n + \" role=\\\"application\\\"></div>\"\n },\n\n anyAttribute(obj: AnyStringKeyT, attr: string, key: string, def: unknown, domain?: string) {\n if (typeof (obj[key]) !== \"undefined\") {\n const config = obj[key]\n const configWithDomain = domain ? {...config, ...config[domain]} : config\n const x = configWithDomain[attr]\n\n if (x === undefined) {\n return def\n }\n\n if (typeof (x) === \"function\") {\n return x(netdataDashboard.os)\n }\n\n return x\n }\n\n return def\n },\n\n menuTitle(chart: ChartEnriched) {\n if (chart.sectionTitle) {\n return chart.sectionTitle\n }\n if (typeof chart.menu_pattern !== \"undefined\") {\n const type = chart.type || chart.id.split(\".\")[0]\n return (`${this.anyAttribute(this.menu, \"title\", chart.menu_pattern, chart.menu_pattern)\n .toString()\n } ${type.slice(-(type.length - chart.menu_pattern.length - 1)).toString()}`)\n .replace(/_/g, \" \")\n }\n\n return (this.anyAttribute(this.menu, \"title\", chart.menu, chart.menu)).toString()\n .replace(/_/g, \" \")\n },\n\n menuIcon(chart: ChartEnriched) {\n if (typeof chart.menu_pattern !== \"undefined\") {\n return this.anyAttribute(this.menu, \"icon\", chart.menu_pattern,\n \"<i class=\\\"fas fa-puzzle-piece\\\"></i>\").toString()\n }\n\n return this.anyAttribute(this.menu, \"icon\", chart.menu, \"<i class=\\\"fas fa-puzzle-piece\\\"></i>\")\n },\n\n menuInfo(chart: ChartEnriched) {\n if (typeof chart.menu_pattern !== \"undefined\") {\n return this.anyAttribute(this.menu, \"info\", chart.menu_pattern, null)\n }\n\n return this.anyAttribute(this.menu, \"info\", chart.menu, null)\n },\n\n menuHeight(chart: ChartEnriched) {\n if (typeof chart.menu_pattern !== \"undefined\") {\n return this.anyAttribute(this.menu, \"height\", chart.menu_pattern, 1.0)\n }\n\n return this.anyAttribute(this.menu, \"height\", chart.menu, 1.0)\n },\n\n submenuTitle(menu: string, submenu: string) {\n const key = `${menu}.${submenu}`\n // console.log(key);\n const title = this.anyAttribute(this.submenu, \"title\", key, submenu)\n .toString().replace(/_/g, \" \") as string\n if (title.length > 28) {\n const a = title.substring(0, 13)\n const b = title.substring(title.length - 12, title.length)\n return `${a}...${b}`\n }\n return title\n },\n\n submenuInfo(menu: string, submenu: string) {\n const key = `${menu}.${submenu}`\n return this.anyAttribute(this.submenu, \"info\", key, null) as (string | null)\n },\n\n submenuHeight(menu: string, submenu: string, relative: number) {\n const key = `${menu}.${submenu}`\n return this.anyAttribute(this.submenu, \"height\", key, 1.0) * relative\n },\n\n contextInfo(id: string, domain?: string) {\n const x = this.anyAttribute(this.context, \"info\", id, null, domain)\n\n if (x !== null) {\n return `<div class=\"shorten dashboard-context-info\"\n role=\"document\">${x}</div>`\n }\n return \"\"\n },\n\n contextValueRange(id: string) {\n if (typeof this.context[id] !== \"undefined\"\n && typeof this.context[id].valueRange !== \"undefined\"\n ) {\n try {\n return JSON.parse(this.context[id].valueRange)\n } catch (e) {\n return [null, null]\n }\n }\n return [null, null]\n },\n\n contextHeight(id: string, def: number) {\n if (typeof this.context[id] !== \"undefined\" && typeof this.context[id].height !== \"undefined\") {\n return def * this.context[id].height\n }\n return def\n },\n\n contextDecimalDigits(id: string, def: number) {\n if (typeof this.context[id] !== \"undefined\"\n && typeof this.context[id].decimalDigits !== \"undefined\"\n ) {\n return this.context[id].decimalDigits\n }\n return def\n },\n}\n\n// @ts-ignore\nwindow.netdataDashboard = netdataDashboard\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/destructuring-assignment */\n/* eslint-disable operator-linebreak */\n/* eslint-disable arrow-body-style */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React, { memo } from \"react\"\nimport styled from \"styled-components\"\nimport { Flex, Text } from \"@netdata/netdata-ui\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { useFormatters } from \"domains/chart/utils/formatters\"\nimport { netdataDashboard } from \"domains/dashboard/utils/netdata-dashboard\"\nimport { selectChartData } from \"domains/chart/selectors\"\n\nconst Title = styled(Text)`\n text-overflow: ellipsis;\n max-width: 120px;\n overflow-x: hidden;\n`\n\nconst getUnitSign = unit => {\n return unit === \"percentage\" ? \"%\" : ` ${unit.replace(/milliseconds/, \"ms\")}`\n}\n\nconst aggrMethods = {\n avg: \"Average\",\n sum: \"Sum\",\n min: \"Min\",\n max: \"Max\",\n}\nconst getAggregation = value => `${aggrMethods[value]}` || \"\"\n\nconst ChartValueContainer = memo(({ id, units, aggrMethod, displayedIndex }) => {\n const chartData = useSelector((state: AppStateT) => selectChartData(state, { id }))\n\n const value =\n typeof displayedIndex === \"number\"\n ? chartData.result[displayedIndex]\n : chartData.view_latest_values[0]\n\n const { legendFormatValue, unitsCurrent } = useFormatters({\n attributes: {},\n data: chartData,\n units,\n unitsCommon: null,\n unitsDesired: null,\n uuid: id,\n })\n\n const aggregation = getAggregation(aggrMethod)\n\n return (\n <Text\n wordBreak=\"keep-all\"\n color=\"bright\"\n margin={[0, 0, 0, \"auto\"]}\n data-testid=\"k8sPopoverChart-chartValue\"\n >\n {aggregation && (\n <Text margin={[0, 1, 0, 0]} color=\"separator\" data-testid=\"k8sPopoverChart-chartValue-aggr\">\n {aggregation}\n </Text>\n )}\n {legendFormatValue(value)}\n {getUnitSign(unitsCurrent)}\n </Text>\n )\n})\n\nconst ChartValue = ({ id, ...rest }) => {\n const chartData = useSelector((state: AppStateT) => selectChartData(state, { id }))\n\n if (!chartData || chartData.result.length === 0) return null\n return <ChartValueContainer id={id} {...rest} />\n}\n\nconst ChartOverview = ({ id, chartMetadata, aggrMethod, displayedIndex }) => {\n const { units, context } = chartMetadata\n const title = context.replace(/cgroup\\./, \"\")\n const icon = netdataDashboard.menuIcon(chartMetadata)\n\n return (\n <Flex gap={2} data-testid=\"k8sPopoverChart-overview\">\n <Text color=\"bright\" dangerouslySetInnerHTML={{ __html: icon }} />\n <Title color=\"bright\" data-testid=\"k8sPopoverChart-title\">\n {title}\n </Title>\n <ChartValue id={id} units={units} aggrMethod={aggrMethod} displayedIndex={displayedIndex} />\n </Flex>\n )\n}\n\nexport default memo(ChartOverview)\n","import React, { useMemo } from \"react\"\nimport Anchor from \"@/src/components/anchor\"\nimport { Text } from \"@netdata/netdata-ui\"\nimport { useLocalStorage } from \"react-use\"\nimport { utmUrlSuffix } from \"utils/utils\"\nimport { utmParametersToString } from \"domains/global/selectors\"\n\nexport type UserStatus = \"LOGGED_IN\" | \"EXPIRED_LOGIN\" | \"UNKNOWN\"\nexport type NodeClaimedStatus = \"NOT_CLAIMED\" | \"CLAIMED\"\nexport type UserNodeAccess = \"NO_ACCESS\" | \"ACCESS_OK\"\ntype UserPreference = \"AGENT\" | \"CLOUD\" | \"UNDEFINED\"\nexport type NodeLiveness = \"LIVE\" | \"NOT_LIVE\"\ntype CTATYPE = \"NAVIGATE\" | \"REFRESH\"\n\nexport enum MigrationModalPromos {\n PROMO_SIGN_IN_CLOUD = \"PROMO_SIGN_IN_CLOUD\",\n PROMO_SIGN_UP_CLOUD = \"PROMO_SIGN_UP_CLOUD\",\n PROMO_IVNITED_TO_SPACE = \"PROMO_IVNITED_TO_SPACE\",\n PROMO_CLAIM_NODE = \"PROMO_CLAIM_NODE\",\n PROMO_TO_USE_NEW_DASHBAORD = \"PROMO_TO_USE_NEW_DASHBAORD\",\n FALLBACK_TO_AGENT = \"FALLBACK_TO_AGENT\",\n NO_INFO_FALLBACK_TO_AGENT = \"NO_INFO_FALLBACK_TO_AGENT\",\n}\n\ntype MigrationModalActions = {\n text: string\n action: CTATYPE\n toPath?: string\n userPreference?: UserPreference | \"DONT_SHOW\"\n}\n\ntype MigrationModalContent = {\n title: string\n text: {\n header: ((props: any) => React.ReactNode) | string\n bullets?: Array<string | ((props?: any) => React.ReactNode)>\n footer?: ((props: any) => React.ReactNode) | string\n }\n tickBoxOption: { text: string; preferenceID: MigrationModalPromos }\n CTA1: MigrationModalActions\n CTA2?: MigrationModalActions\n}\n\ntype MigrationModalInfo = {\n [key in MigrationModalPromos]: MigrationModalContent\n}\n\nconst campaign = \"agent_nudge_to_cloud\"\n\nconst makeUTMParameters = (modalPromo: MigrationModalPromos) =>\n `${utmUrlSuffix}${utmParametersToString({\n content: modalPromo,\n campaign,\n })}`\n\nexport const migrationmodalInfo: MigrationModalInfo = {\n [MigrationModalPromos.PROMO_SIGN_UP_CLOUD]: {\n title: \"Learn about Netdata Cloud!\",\n text: {\n header: () => (\n <Text strong>\n Netdata Cloud is a FREE service that complements the Netdata Agent, to provide:\n </Text>\n ),\n bullets: [\n \"Infrastructure level dashboards (each chart aggregates data from multiple nodes)\",\n \"Central dispatch of alert notifications\",\n \"Custom dashboards editor\",\n \"Intelligence assisted troubleshooting, to help surface the root cause of issues\",\n ],\n footer: \"Have a look, you will be surprised!\",\n },\n tickBoxOption: {\n text: \"Remember my choice\",\n preferenceID: MigrationModalPromos.PROMO_SIGN_UP_CLOUD,\n },\n CTA1: {\n text: \"Wow! Let’s go to Netdata Cloud\",\n toPath: \"path/signup/cloud\",\n action: \"NAVIGATE\",\n userPreference: \"CLOUD\",\n },\n CTA2: {\n text: \"Later, stay at the agent dashboard\",\n action: \"NAVIGATE\",\n toPath: \"path/agent-dashboard\",\n userPreference: \"AGENT\",\n },\n },\n [MigrationModalPromos.PROMO_SIGN_IN_CLOUD]: {\n title: \"Sign-in to Netdata Cloud or get an invitation!\",\n text: {\n header: () => (\n <>\n <Text strong>\n This node is connected to Netdata Cloud but you are not. If you have a Netdata Cloud\n account sign-in, if not ask for an invitation to it.\n </Text>\n\n <Text>\n Netdata Cloud is a FREE service that complements the Netdata Agent, to provide:\n </Text>\n </>\n ),\n bullets: [\n \"Infrastructure level dashboards (each chart aggregates data from multiple nodes)\",\n \"Central dispatch of alert notifications\",\n \"Custom dashboards editor\",\n \"Intelligence assisted troubleshooting, to help surface the root cause of issues\",\n ],\n footer: \"Have a look, you will be surprised!\",\n },\n tickBoxOption: {\n text: \"Remember my choice\",\n preferenceID: MigrationModalPromos.PROMO_SIGN_IN_CLOUD,\n },\n CTA1: {\n text: \"Sign-in or get a Netdata Cloud account\",\n action: \"NAVIGATE\",\n toPath: \"path/signin/cloud\",\n userPreference: \"CLOUD\",\n },\n CTA2: {\n text: \"Later, stay at the Agent dashboard\",\n toPath: \"path/agent-dashboard\",\n action: \"NAVIGATE\",\n userPreference: \"AGENT\",\n },\n },\n [MigrationModalPromos.PROMO_IVNITED_TO_SPACE]: {\n title: \"Get an invitation to this Node’s Space!\",\n text: {\n header: () => (\n <Text strong>\n This node is connected to Netdata Cloud but it isnt available on one of your Spaces.\n </Text>\n ),\n bullets: [],\n footer: \"Ask for an invitation to this Space!\",\n },\n tickBoxOption: {\n text: \"Don't remind me of this again\",\n preferenceID: MigrationModalPromos.PROMO_IVNITED_TO_SPACE,\n },\n CTA1: {\n text: \"Thanks, stay at Agent dashboard for now\",\n toPath: \"agent\",\n action: \"NAVIGATE\",\n userPreference: \"AGENT\",\n },\n },\n [MigrationModalPromos.PROMO_CLAIM_NODE]: {\n title: \"This node isn’t connected to Netdata Cloud\",\n text: {\n header: () => (\n <Text strong>\n For you to be able to see this node on Netdata Cloud you will either need to:\n </Text>\n ),\n footer: \"Have a look, you will be surprised!\",\n bullets: [\n () => {\n return (\n <Text>\n {\" \"}\n Connect this node directly (documentation on{\" \"}\n <Anchor\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href={`https://learn.netdata.cloud/docs/agent/claim?${makeUTMParameters(\n MigrationModalPromos.PROMO_CLAIM_NODE\n ).substring(1)}#how-to-connect-a-node`}\n >\n how to connect a node\n </Anchor>\n ) , or\n </Text>\n )\n },\n () => {\n return (\n <Text>\n Αctivate streaming to a parent node that is already connected (documentation on{\" \"}\n <Anchor\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href={`https://learn.netdata.cloud/docs/metrics-storage-management/enable-streaming?${makeUTMParameters(\n MigrationModalPromos.PROMO_CLAIM_NODE\n ).substring(1)}`}\n >\n how to configure streaming\n </Anchor>\n )\n </Text>\n )\n },\n ],\n },\n tickBoxOption: {\n text: \"Remember my choice.\",\n preferenceID: MigrationModalPromos.PROMO_CLAIM_NODE,\n },\n CTA1: {\n text: \"Wow! Let’s go to Netdata Cloud\",\n action: \"NAVIGATE\",\n toPath: \"path/node/cloud\",\n userPreference: \"CLOUD\",\n },\n CTA2: {\n text: \"Later, stay at the Agent dashboard\",\n action: \"NAVIGATE\",\n toPath: \"path/agent-dashboard\",\n userPreference: \"AGENT\",\n },\n },\n [MigrationModalPromos.PROMO_TO_USE_NEW_DASHBAORD]: {\n title: \"Use the Old or the New dashboard?\",\n text: {\n header: () => (\n <Text strong>\n This node is available in your Netdata Cloud account. So, you have full access to the NEW\n dashboards, charts, intelligence-assisted troubleshooting and many more!\n </Text>\n ),\n bullets: [],\n },\n tickBoxOption: {\n text: \"Remember my choice\",\n preferenceID: MigrationModalPromos.PROMO_TO_USE_NEW_DASHBAORD,\n },\n CTA1: {\n text: \"Wow! Let’s go to Netdata Cloud \",\n action: \"NAVIGATE\",\n toPath: \"path/dashboard/cloud\",\n userPreference: \"CLOUD\",\n },\n CTA2: {\n text: \"Later, stay at the Agent dashboard\",\n action: \"NAVIGATE\",\n toPath: \"path/agent-dashboard\",\n userPreference: \"AGENT\",\n },\n },\n [MigrationModalPromos.FALLBACK_TO_AGENT]: {\n title: \"Oops! This node has lost connection to Netdata Cloud!\",\n text: {\n header: ({ date = \"\" }) => {\n return (\n <>\n <Text strong>\n Unfortunately, it seems that this node is not currently connected to Netdata Cloud.\n So, the old agent dashboard is the only option available.\n </Text>\n {/* <Text>\n The node lost its Netdata Cloud connection at <Text strong>{date}</Text>.\n </Text> */}\n <Text>\n To troubleshoot Netdata Cloud connection issues, please follow this{\" \"}\n <Anchor\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href={`https://learn.netdata.cloud/docs/agent/claim?${makeUTMParameters(\n MigrationModalPromos.FALLBACK_TO_AGENT\n ).substring(1)}#troubleshooting`}\n >\n this guide.\n </Anchor>\n </Text>\n </>\n )\n },\n bullets: [],\n },\n tickBoxOption: {\n text: \"Don't show this again\",\n preferenceID: MigrationModalPromos.FALLBACK_TO_AGENT,\n },\n CTA1: {\n text: \"Check again please\",\n action: \"REFRESH\",\n userPreference: undefined,\n },\n CTA2: {\n text: \"Thanks, stay at Agent dashboard\",\n toPath: \"path/agent\",\n action: \"NAVIGATE\",\n userPreference: \"AGENT\",\n },\n },\n [MigrationModalPromos.NO_INFO_FALLBACK_TO_AGENT]: {\n title: \"Oops! We aren't able to get information of this node in regards to Netdata Cloud!\",\n text: {\n header: () => {\n return (\n <>\n <Text strong>\n Unfortunately, it seems we aren't able to get information on this node in regards to\n Netdata Cloud.\n </Text>\n <Text>\n This could be from internet connectivity issues from your end or some temporary issue\n with our services. So, the old agent dashboard is the only option available.\n </Text>\n </>\n )\n },\n bullets: [],\n },\n tickBoxOption: {\n text: \"Don't show this again\",\n preferenceID: MigrationModalPromos.NO_INFO_FALLBACK_TO_AGENT,\n },\n CTA1: {\n text: \"Check again please\",\n action: \"REFRESH\",\n userPreference: undefined,\n },\n CTA2: {\n text: \"Thanks, stay at Agent dashboard\",\n toPath: \"path/agent-dashboard\",\n action: \"NAVIGATE\",\n userPreference: \"AGENT\",\n },\n },\n}\n\nexport type PromoProps = {\n userSavedPreference?: UserPreference\n userStatus?: UserStatus\n nodeClaimedStatus?: NodeClaimedStatus\n userNodeAccess?: UserNodeAccess\n nodeLiveness?: NodeLiveness\n}\n\nconst isPromoSignUp = ({\n userSavedPreference,\n userStatus,\n nodeClaimedStatus,\n}: PromoProps): boolean =>\n userSavedPreference !== \"AGENT\" && userStatus === \"UNKNOWN\" && nodeClaimedStatus === \"NOT_CLAIMED\"\n\nconst isPromoSignIn = ({\n userSavedPreference,\n userStatus,\n nodeClaimedStatus,\n}: PromoProps): boolean =>\n userSavedPreference !== \"AGENT\" && userStatus === \"UNKNOWN\" && nodeClaimedStatus === \"CLAIMED\"\n\nconst isPromoInvitedToSpace = ({\n userSavedPreference,\n userStatus,\n nodeClaimedStatus,\n userNodeAccess,\n}: PromoProps): boolean =>\n userSavedPreference !== \"AGENT\" &&\n (userStatus === \"LOGGED_IN\" || userStatus === \"EXPIRED_LOGIN\") &&\n nodeClaimedStatus === \"CLAIMED\" &&\n userNodeAccess === \"NO_ACCESS\"\n\nconst isPromoToClaimThisNode = ({\n userSavedPreference,\n userStatus,\n nodeClaimedStatus,\n}: PromoProps): boolean =>\n userSavedPreference !== \"AGENT\" &&\n (userStatus === \"LOGGED_IN\" || userStatus === \"EXPIRED_LOGIN\") &&\n nodeClaimedStatus === \"NOT_CLAIMED\"\n\nconst isPromoToNewDasboardOnCloud = ({\n userSavedPreference,\n userStatus,\n nodeLiveness,\n userNodeAccess,\n}: PromoProps): boolean =>\n !userSavedPreference &&\n (userStatus === \"LOGGED_IN\" || userStatus === \"EXPIRED_LOGIN\") &&\n nodeLiveness === \"LIVE\" &&\n userNodeAccess === \"ACCESS_OK\"\n\nconst isNoInfoFallbackToAgent = ({\n userSavedPreference,\n userStatus,\n nodeClaimedStatus,\n nodeLiveness,\n userNodeAccess,\n}: PromoProps): boolean =>\n userSavedPreference === \"CLOUD\" &&\n !userStatus &&\n !nodeClaimedStatus &&\n !nodeLiveness &&\n !userNodeAccess\n\nconst isFallbackToAgent = ({\n userSavedPreference,\n userStatus,\n nodeClaimedStatus,\n nodeLiveness,\n userNodeAccess,\n}: PromoProps): boolean =>\n userSavedPreference !== \"AGENT\" &&\n (userStatus === \"LOGGED_IN\" || userStatus === \"EXPIRED_LOGIN\") &&\n nodeClaimedStatus === \"CLAIMED\" &&\n nodeLiveness === \"NOT_LIVE\" &&\n userNodeAccess === \"ACCESS_OK\"\n\nexport const goToAgentDashboard = ({ userSavedPreference }: PromoProps) =>\n userSavedPreference === \"AGENT\"\n\nexport const goToCloud = ({\n userSavedPreference,\n userStatus,\n nodeLiveness,\n userNodeAccess,\n}: PromoProps) =>\n userSavedPreference === \"CLOUD\" &&\n (userStatus === \"LOGGED_IN\" || userStatus === \"EXPIRED_LOGIN\") &&\n nodeLiveness === \"LIVE\" &&\n userNodeAccess === \"ACCESS_OK\"\n\nconst modalStatusWithPromoFunctions: Record<\n MigrationModalPromos,\n (props: PromoProps) => boolean\n> = {\n [MigrationModalPromos.FALLBACK_TO_AGENT]: isFallbackToAgent,\n [MigrationModalPromos.NO_INFO_FALLBACK_TO_AGENT]: isNoInfoFallbackToAgent,\n [MigrationModalPromos.PROMO_TO_USE_NEW_DASHBAORD]: isPromoToNewDasboardOnCloud,\n [MigrationModalPromos.PROMO_CLAIM_NODE]: isPromoToClaimThisNode,\n [MigrationModalPromos.PROMO_IVNITED_TO_SPACE]: isPromoInvitedToSpace,\n [MigrationModalPromos.PROMO_SIGN_IN_CLOUD]: isPromoSignIn,\n [MigrationModalPromos.PROMO_SIGN_UP_CLOUD]: isPromoSignUp,\n}\n\nconst useMigrationModal = ({\n userStatus,\n nodeClaimedStatus,\n userNodeAccess,\n nodeLiveness,\n}: PromoProps) => {\n const [userSavedPreference, setUserPrefrence] = useLocalStorage<UserPreference>(\n \"USER_SAVED_PREFERENCE\"\n )\n\n const migrationModalPromo = useMemo<MigrationModalPromos>(() => {\n return Object.keys(modalStatusWithPromoFunctions).find(modalStatus => {\n return modalStatusWithPromoFunctions[modalStatus]({\n userStatus,\n nodeClaimedStatus,\n userNodeAccess,\n userSavedPreference,\n nodeLiveness,\n })\n }) as MigrationModalPromos\n }, [userStatus, nodeClaimedStatus, userNodeAccess, nodeLiveness, userSavedPreference])\n\n return {\n migrationModalPromoInfo: migrationmodalInfo[migrationModalPromo],\n migrationModalPromo,\n setUserPrefrence,\n userSavedPreference,\n }\n}\n\nexport default useMigrationModal\n","/* eslint-disable comma-dangle */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable object-curly-newline */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React, { useRef, useContext, useLayoutEffect, useState, memo, useMemo } from \"react\"\nimport { throttle } from \"throttle-debounce\"\nimport { ChartContainer } from \"domains/chart/components/chart-container\"\nimport { ThemeContext } from \"styled-components\"\nimport { Flex, getColor } from \"@netdata/netdata-ui\"\nimport ChartOverview from \"./chartOverview\"\n\nconst Chart = ({ groupLabel, postGroupLabel, id, attributes, relatedIndex }) => {\n const theme = useContext(ThemeContext)\n const chartContainerRef = useRef()\n const [displayedIndex, setDisplayedIndex] = useState()\n const setDisplayedIndexThrottled = useMemo(() => throttle(400, setDisplayedIndex), [])\n const [, repaint] = useState()\n\n useLayoutEffect(() => {\n repaint(true)\n }, [])\n\n const { chartMetadata, attributes: relatedChartAttributes } = attributes.relatedCharts[\n relatedIndex\n ]\n\n const chartAttributes = useMemo(\n () => ({\n id: chartMetadata.id,\n\n width: \"100%\",\n height: \"60px\",\n\n chartLibrary: \"sparkline\",\n sparklineLineWidth: \"2px\",\n sparklineLineColor: getColor(\"border\")({ theme }),\n sparklineFillColor: getColor(\"disabled\")({ theme }),\n sparklineSpotRadius: 0,\n sparklineDisableTooltips: true,\n sparklineOnHover: (event) => setDisplayedIndexThrottled(event?.x),\n\n httpMethod: \"POST\",\n host: attributes.host,\n nodeIDs: attributes.nodeIDs,\n dimensions: relatedChartAttributes.dimensions,\n aggrMethod: relatedChartAttributes.aggrMethod,\n\n labels: {\n k8s_cluster_id: [chartMetadata.chartLabels.k8s_cluster_id[0]],\n [attributes.groupBy]: [groupLabel],\n ...(postGroupLabel && { [attributes.postGroupBy]: [postGroupLabel] }),\n },\n }),\n [chartMetadata, attributes]\n )\n\n return (\n <Flex gap={2} column data-testid=\"k8sPopoverChart\">\n <div\n ref={chartContainerRef}\n style={{ height: \"60px\", width: \"100%\" }}\n data-testid=\"k8sPopoverChart-container\"\n >\n {chartContainerRef.current && (\n <ChartContainer\n chartUuid={id}\n attributes={chartAttributes}\n chartMetadata={chartMetadata}\n portalNode={chartContainerRef.current}\n />\n )}\n </div>\n <ChartOverview\n id={id}\n aggrMethod={chartAttributes.aggrMethod}\n chartMetadata={chartMetadata}\n displayedIndex={displayedIndex}\n />\n </Flex>\n )\n}\n\nexport default memo(Chart)\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport styled from \"styled-components\"\nimport { Text, Flex, Icon } from \"@netdata/netdata-ui\"\n\nconst ExternalButton = styled(Icon).attrs({\n margin: [0, 0, 0, \"auto\"],\n color: \"bright\",\n width: \"10px\",\n height: \"10px\",\n alignSelf: \"center\",\n name: \"nav_arrow_goto\",\n role: \"button\",\n title: \"Go to node\",\n \"data-testid\": \"k8sPopoverItem-externalButton\",\n})`\n cursor: pointer;\n`\n\nconst Item = ({ icon, title, secondary, onClick }) => (\n <Flex gap={1} alignItems=\"start\" data-testid=\"k8sPopoverItem\">\n <Flex width=\"22px\" height=\"22px\" data-testid=\"k8sPopoverItem-icon\">\n <Icon name={icon} color=\"bright\" margin={[0, 1, 0, 0]} width=\"22px\" height=\"22px\" />\n </Flex>\n <Text color=\"bright\" data-testid=\"k8sPopoverItem-title\">\n {title}\n </Text>\n {secondary && (\n <Text color=\"border\" wordBreak=\"break-all\" data-testid=\"k8sPopoverItem-detail\">\n {secondary}\n </Text>\n )}\n {onClick && <ExternalButton onClick={onClick} />}\n </Flex>\n)\n\nexport default Item\n","/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { useDateTime } from \"utils/date-time\"\nimport Item from \"./item\"\nimport Section from \"./section\"\n\nconst DateItem = ({ date, title }) => {\n const { localeDateString, localeTimeString } = useDateTime()\n\n return (\n <Item\n icon=\"around_clock\"\n title={title}\n secondary={`${localeDateString(date)} | ${localeTimeString(date)}`}\n />\n )\n}\n\nconst DateSection = ({ before, after }) => (\n <Section title=\"Time\">\n <DateItem title=\"From\" date={after} />\n <DateItem title=\"To\" date={before} />\n </Section>\n)\n\nexport default DateSection\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport Section from \"./section\"\nimport Chart from \"./chart\"\nimport DateSection from \"./dateSection\"\n\nconst Metrics = ({ groupLabel, postGroupLabel, attributes, viewAfter, viewBefore }) => (\n <Flex gap={3} column width=\"100%\" data-testid=\"k8sPopoverMetrics\">\n <DateSection after={viewAfter} before={viewBefore} />\n <Section title=\"Metrics\" noBorder>\n <Flex gap={3} column data-testid=\"k8sPopoverMetrics-container\">\n {attributes.relatedCharts.map(({ chartMetadata }, index) => (\n <Chart\n key={chartMetadata.id}\n id={[groupLabel, postGroupLabel, attributes.id, chartMetadata.id].join(\"|\")}\n attributes={attributes}\n relatedIndex={index}\n groupLabel={groupLabel}\n postGroupLabel={postGroupLabel}\n />\n ))}\n </Flex>\n </Section>\n </Flex>\n)\n\nexport default Metrics\n","/* eslint-disable no-param-reassign */\n/* eslint-disable comma-dangle */\n/* eslint-disable object-curly-newline */\n/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React, { memo } from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport Item from \"./item\"\nimport Section from \"./section\"\nimport getLabel, { labelIds } from \"./getLabel\"\n\nconst LabelsSection = ({ labelId, items, onExpand, onItemClick, ...rest }) => {\n const { title, icon } = getLabel(labelId)\n const sliced = items.slice(0, 3)\n const expandable = items.length > 3\n\n const text = expandable ? `${title} (${items.length})` : title\n return (\n <Section title={text} onExpand={expandable && onExpand} {...rest}>\n {sliced.map((item) => (\n <Item\n key={item}\n icon={icon}\n title={item}\n onClick={onItemClick && (() => onItemClick(item))}\n />\n ))}\n </Section>\n )\n}\n\nconst getLabelIds = (chartLabels) => {\n chartLabels = { ...chartLabels }\n const predefinedLabelIds = labelIds.reduce((acc, labelId) => {\n if (!(labelId in chartLabels)) return acc\n\n delete chartLabels[labelId]\n return [...acc, labelId]\n }, [])\n\n return [...predefinedLabelIds, ...Object.keys(chartLabels)]\n}\n\nconst Context = ({ chartLabels, onExpand, onNodeClick }) => {\n const ids = getLabelIds(chartLabels)\n\n return (\n <Flex gap={3} column width=\"100%\" data-testid=\"k8sPopoverContext\">\n {ids.map((id, index) => (\n <LabelsSection\n key={id}\n labelId={id}\n items={chartLabels[id]}\n onExpand={() => onExpand(id)}\n noBorder={index === ids.length - 1}\n onItemClick={id === \"k8s_node_name\" && onNodeClick}\n />\n ))}\n </Flex>\n )\n}\n\nexport default memo(Context)\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { Flex, Button, makeFlex } from \"@netdata/netdata-ui\"\nimport styled from \"styled-components\"\nimport Separator from \"./separator\"\nimport Header from \"./header\"\nimport Item from \"./item\"\nimport getLabel from \"./getLabel\"\n\nconst StyledButton = styled(makeFlex(Button)).attrs({\n flavour: \"borderless\",\n neutral: true,\n themeType: \"dark\",\n className: \"btn\",\n alignItems: \"start\",\n gap: 1,\n})`\n &&& {\n padding: 0;\n margin: 0;\n height: initial;\n width: initial;\n\n svg {\n height: 18px;\n width: 18px;\n position: initial;\n }\n }\n`\n\nconst List = ({ labelId, items, onBack, onItemClick }) => {\n const { title, icon } = getLabel(labelId)\n\n return (\n <Flex height=\"100%\" gap={3} data-testid=\"k8sPopoverList\" column>\n <Header>\n <StyledButton\n label={`${title} (${items.length})`}\n icon=\"chevron_left\"\n onClick={onBack}\n data-testid=\"k8sPopoverList-back\"\n />\n </Header>\n <Separator />\n <Flex\n gap={3}\n overflow={{ vertical: \"auto\", horizontal: \"hidden\" }}\n column\n data-testid=\"k8sPopoverList-container\"\n >\n {items.map((item) => (\n <Item\n key={item}\n icon={icon}\n title={item}\n onClick={onItemClick && (() => onItemClick(item))}\n />\n ))}\n </Flex>\n </Flex>\n )\n}\n\nexport default List\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React, { useState } from \"react\"\nimport { Flex, DropContainer } from \"@netdata/netdata-ui\"\nimport Separator from \"./separator\"\nimport Header from \"./header\"\nimport Tabs from \"./tabs\"\nimport Metrics from \"./metrics\"\nimport Context from \"./context\"\nimport List from \"./list\"\n\nconst Container = (props) => (\n <DropContainer\n background={[\"transparent\", \"popover\"]}\n padding={[2, 4]}\n width=\"322px\"\n height=\"422px\"\n {...props}\n />\n)\n\nconst TabsContainer = ({ label, value, onChange, children }) => (\n <Flex height=\"100%\" column>\n <Header>{label}</Header>\n <Tabs value={value} onChange={onChange} margin={[4, 0, 0, 0]} />\n <Separator />\n <Flex gap={3} overflow={{ vertical: \"auto\", horizontal: \"hidden\" }} margin={[4, 0, 0, 0]}>\n {children}\n </Flex>\n </Flex>\n)\n\nconst Popover = ({\n title,\n groupLabel,\n postGroupLabel,\n chartLabels,\n attributes,\n viewBefore,\n viewAfter,\n ...rest\n}) => {\n const [view, setView] = useState(\"context\")\n\n const isLabelView = view !== \"context\" && view !== \"metrics\"\n\n const { onNodeClick } = attributes\n\n return (\n <Container data-testid=\"k8sPopover\" {...rest}>\n {isLabelView && (\n <List\n labelId={view}\n items={chartLabels[view]}\n attributes={attributes}\n onBack={() => setView(\"context\")}\n onItemClick={view === \"k8s_node_name\" && onNodeClick}\n />\n )}\n {!isLabelView && (\n <TabsContainer label={title} value={view} onChange={setView}>\n {view === \"context\" && (\n <Context chartLabels={chartLabels} onExpand={setView} onNodeClick={onNodeClick} />\n )}\n {view === \"metrics\" && (\n <Metrics\n groupLabel={groupLabel}\n postGroupLabel={postGroupLabel}\n attributes={attributes}\n viewAfter={viewAfter}\n viewBefore={viewBefore}\n />\n )}\n </TabsContainer>\n )}\n </Container>\n )\n}\n\nexport default Popover\n","/* eslint-disable arrow-body-style */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable comma-dangle */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React, { useMemo } from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport { ChartMetadata } from \"domains/chart/chart-types\"\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes.ts\"\nimport { ChartTimeframe } from \"domains/chart/components/chart-legend-bottom\"\nimport GroupBoxes from \"domains/chart/components/lib-charts/group-box-chart/groupBoxes\"\nimport Legend from \"domains/chart/components/lib-charts/group-box-chart/legend\"\nimport getLabel from \"./getLabel\"\nimport transform from \"./transform\"\nimport Popover from \"./popover\"\n\ninterface Props {\n chartData: any\n chartMetadata: ChartMetadata\n attributes: Attributes\n viewAfter: number\n viewBefore: number\n hoveredRow: number\n hoveredX: number | null\n showUndefined: boolean\n}\n\nconst Kubernetes = ({\n chartData,\n chartMetadata,\n attributes,\n viewAfter,\n viewBefore,\n hoveredRow,\n hoveredX,\n showUndefined,\n}: Props) => {\n const { filteredRows } = attributes\n const { data: groupBoxData, labels, chartLabels } = useMemo(\n () => transform(chartData, filteredRows),\n [filteredRows, chartData]\n )\n\n const {\n id,\n result: { data },\n groupBy,\n postGroupBy,\n } = chartData\n\n const renderBoxPopover = ({ groupIndex, index, align }) => {\n const label = groupBoxData[groupIndex].labels[index]\n const { title } = getLabel(postGroupBy)\n\n return (\n <Popover\n align={align}\n title={`${title}: ${label}`}\n groupLabel={labels[groupIndex]}\n postGroupLabel={label}\n chartLabels={groupBoxData[groupIndex].chartLabels[index]}\n attributes={attributes}\n viewBefore={viewBefore}\n viewAfter={viewAfter}\n />\n )\n }\n\n const renderGroupPopover = ({ groupIndex, align }) => {\n const label = labels[groupIndex]\n const { title } = getLabel(groupBy)\n\n return (\n <Popover\n align={align}\n title={`${title}: ${label}`}\n groupLabel={label}\n chartLabels={chartLabels[groupIndex]}\n attributes={attributes}\n viewBefore={viewBefore}\n viewAfter={viewAfter}\n />\n )\n }\n\n const groupedBoxesData = useMemo(() => {\n return groupBoxData.map((groupedBox) => {\n return {\n labels: groupedBox.labels,\n data:\n hoveredRow === -1 || hoveredRow > data.length || !(hoveredRow in data)\n ? groupedBox.postAggregated\n : groupedBox.indexes.map((index) => data[hoveredRow][index + 1]) || [],\n }\n })\n }, [data, groupBoxData, hoveredRow])\n\n return (\n <Flex column width=\"100%\" height=\"100%\" gap={4} padding={[4, 2]}>\n <GroupBoxes\n data={groupedBoxesData}\n labels={labels}\n renderBoxPopover={renderBoxPopover}\n renderGroupPopover={renderGroupPopover}\n />\n <Flex data-testid=\"legend-container\" justifyContent=\"between\">\n <Legend>{id}</Legend>\n <ChartTimeframe\n chartMetadata={chartMetadata}\n showUndefined={showUndefined}\n hoveredX={hoveredX}\n viewBefore={viewBefore}\n chartData={chartData}\n />\n </Flex>\n </Flex>\n )\n}\n\nexport default Kubernetes\n","/* eslint-disable arrow-body-style */\n/* eslint-disable object-curly-newline */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable comma-dangle */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\n\nexport default (chartData, filteredRows) => {\n const { keys, labels: labelValues, groupBy, postGroupBy, aggrGroups, postAggregated } = chartData\n const groupValues = keys[groupBy]\n const postGroupValues = keys[postGroupBy]\n const indexes = filteredRows || [...Array(groupValues.length)].map((v, index) => index)\n\n const postGroupData = indexes.reduce((acc: any, index: number) => {\n const groupValue = groupValues[index]\n if (!(groupValue in acc)) {\n acc[groupValue] = {\n labels: [],\n indexes: [],\n chartLabels: [],\n postAggregated: [],\n }\n }\n const boxes = acc[groupValue]\n boxes.indexes.push(index)\n boxes.labels.push(postGroupValues[index])\n boxes.postAggregated.push(postAggregated[index])\n\n const chartLabels = aggrGroups.reduce((labelsAcc, label) => {\n return labelValues[label][index]\n ? { ...labelsAcc, [label]: labelValues[label][index] }\n : labelsAcc\n }, {})\n boxes.chartLabels.push(chartLabels)\n return acc\n }, {})\n\n const labels = Object.keys(postGroupData).sort(\n (a, b) => postGroupData[b].indexes.length - postGroupData[a].indexes.length\n )\n\n const groupData = labels.map((label) => postGroupData[label])\n\n const groupChartLabels = groupData.map((boxes) => {\n return aggrGroups.reduce((acc, label) => {\n const groupLabels = new Set(\n boxes.chartLabels.reduce((accChartLabels, chartLabels) => {\n return chartLabels[label] ? [...accChartLabels, ...chartLabels[label]] : accChartLabels\n }, [])\n )\n return groupLabels.size === 0 ? acc : { ...acc, [label]: Array.from(groupLabels) }\n }, {})\n })\n\n return { labels, data: groupData, chartLabels: groupChartLabels }\n}\n","import React, { useCallback } from \"react\"\nimport classNames from \"classnames\"\n\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { setGlobalChartUnderlayAction, setGlobalPanAndZoomAction } from \"domains/global/actions\"\nimport { selectSyncPanAndZoom } from \"domains/global/selectors\"\nimport { setChartPanAndZoomAction } from \"domains/chart/actions\"\nimport { useShowValueOutside } from \"hooks/use-show-value-outside\"\n\nimport { Attributes } from \"../utils/transformDataAttributes\"\nimport {\n ChartData, ChartMetadata, DygraphData, EasyPieChartData, D3pieChartData,\n} from \"../chart-types\"\nimport { chartLibrariesSettings, ChartLibraryName } from \"../utils/chartLibrariesSettings\"\n\nimport { DygraphChart } from \"./lib-charts/dygraph-chart\"\nimport { EasyPieChart } from \"./lib-charts/easy-pie-chart\"\nimport { GaugeChart } from \"./lib-charts/gauge-chart\"\nimport { SparklineChart } from \"./lib-charts/sparkline-chart\"\nimport { D3pieChart } from \"./lib-charts/d3pie-chart\"\nimport { PeityChart } from \"./lib-charts/peity-chart\"\nimport { GoogleChart } from \"./lib-charts/google-chart\"\nimport { TextOnly } from \"./lib-charts/text-only\"\nimport { KubernetesGroupBoxes } from \"./lib-charts/group-box-chart\"\n\ninterface Props {\n attributes: Attributes\n chartContainerElement: HTMLElement\n chartData: ChartData\n chartMetadata: ChartMetadata\n chartLibrary: ChartLibraryName\n colors: {\n [key: string]: string\n }\n chartUuid: string\n chartHeight: number\n chartWidth: number\n dimensionsVisibility: boolean[]\n hasEmptyData: boolean\n isRemotelyControlled: boolean\n legendFormatValue: ((v: number | string | null) => number | string)\n orderedColors: string[]\n hoveredX: number | null\n onUpdateChartPanAndZoom: (arg: { after: number, before: number, masterID: string }) => void\n immediatelyDispatchPanAndZoom: () => void\n\n hoveredRow: number\n setHoveredX: (hoveredX: number | null, noMaster?: boolean) => void\n setMinMax: (minMax: [number, number]) => void\n showLatestOnBlur: boolean\n unitsCurrent: string\n viewAfterForCurrentData: number,\n viewBeforeForCurrentData: number,\n}\n\nexport const AbstractChart = ({\n attributes,\n chartContainerElement,\n chartData,\n chartMetadata,\n chartLibrary,\n colors,\n chartUuid,\n chartHeight,\n chartWidth,\n dimensionsVisibility,\n hasEmptyData,\n isRemotelyControlled,\n legendFormatValue,\n orderedColors,\n hoveredRow,\n hoveredX,\n onUpdateChartPanAndZoom,\n immediatelyDispatchPanAndZoom,\n setHoveredX,\n setMinMax,\n showLatestOnBlur,\n unitsCurrent,\n viewAfterForCurrentData,\n viewBeforeForCurrentData,\n}: Props) => {\n const dispatch = useDispatch()\n\n const isSyncPanAndZoom = useSelector(selectSyncPanAndZoom)\n const setGlobalChartUnderlay = useCallback(({ after, before, masterID }) => {\n dispatch(setGlobalChartUnderlayAction({ after, before, masterID }))\n\n // freeze charts\n // don't send masterID, so no padding is applied\n if (isSyncPanAndZoom) {\n dispatch(setGlobalPanAndZoomAction({\n after: viewAfterForCurrentData,\n before: viewBeforeForCurrentData,\n }))\n } else {\n dispatch(setChartPanAndZoomAction({\n after: viewAfterForCurrentData,\n before: viewBeforeForCurrentData,\n id: chartUuid,\n }))\n }\n }, [chartUuid, dispatch, isSyncPanAndZoom, viewAfterForCurrentData, viewBeforeForCurrentData])\n\n const chartSettings = chartLibrariesSettings[chartLibrary]\n const { hasLegend } = chartSettings\n const chartElementClassName = hasLegend(attributes)\n ? classNames(\n `netdata-chart-with-legend-${attributes.legendPosition || \"right\"}`,\n `netdata-${chartLibrary}-chart-with-legend-right`,\n )\n : classNames(\n \"netdata-chart\",\n `netdata-${chartLibrary}-chart`,\n )\n const chartElementId = `${chartLibrary}-${chartUuid}-chart`\n const showUndefined = hoveredRow === -1 && !showLatestOnBlur\n\n useShowValueOutside({\n attributes, chartData, chartSettings, hoveredRow, legendFormatValue, showUndefined,\n })\n\n if (chartLibrary === \"easypiechart\") {\n return (\n <EasyPieChart\n attributes={attributes}\n chartData={chartData as EasyPieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n chartLibrary={chartLibrary}\n chartWidth={chartWidth}\n colors={colors}\n chartUuid={chartUuid}\n dimensionsVisibility={dimensionsVisibility}\n isRemotelyControlled={isRemotelyControlled}\n // easyPieChart doesn't support resizing, so lets just create new one when\n // container size changes\n key={chartWidth}\n legendFormatValue={legendFormatValue}\n orderedColors={orderedColors}\n hoveredRow={hoveredRow}\n onUpdateChartPanAndZoom={onUpdateChartPanAndZoom}\n setGlobalChartUnderlay={setGlobalChartUnderlay}\n setMinMax={setMinMax}\n showUndefined={showUndefined}\n unitsCurrent={unitsCurrent}\n viewAfter={viewAfterForCurrentData}\n viewBefore={viewBeforeForCurrentData}\n />\n )\n }\n\n if (chartLibrary === \"gauge\") {\n return (\n <GaugeChart\n attributes={attributes}\n chartData={chartData as EasyPieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n chartLibrary={chartLibrary}\n chartHeight={chartHeight}\n chartWidth={chartWidth}\n colors={colors}\n chartUuid={chartUuid}\n dimensionsVisibility={dimensionsVisibility}\n isRemotelyControlled={isRemotelyControlled}\n legendFormatValue={legendFormatValue}\n orderedColors={orderedColors}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n onUpdateChartPanAndZoom={onUpdateChartPanAndZoom}\n setGlobalChartUnderlay={setGlobalChartUnderlay}\n setHoveredX={setHoveredX}\n setMinMax={setMinMax}\n showUndefined={showUndefined}\n unitsCurrent={unitsCurrent}\n viewAfter={viewAfterForCurrentData}\n viewBefore={viewBeforeForCurrentData}\n />\n )\n }\n\n if (chartLibrary === \"sparkline\") {\n return (\n <SparklineChart\n attributes={attributes}\n chartContainerElement={chartContainerElement}\n chartData={chartData as EasyPieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n dimensionsVisibility={dimensionsVisibility}\n isRemotelyControlled={isRemotelyControlled}\n orderedColors={orderedColors}\n unitsCurrent={unitsCurrent}\n viewAfterForCurrentData={viewAfterForCurrentData}\n viewBeforeForCurrentData={viewBeforeForCurrentData}\n />\n )\n }\n\n if (chartLibrary === \"d3pie\") {\n return (\n <D3pieChart\n attributes={attributes}\n chartContainerElement={chartContainerElement}\n chartData={chartData as D3pieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n dimensionsVisibility={dimensionsVisibility}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n isRemotelyControlled={isRemotelyControlled}\n legendFormatValue={legendFormatValue}\n orderedColors={orderedColors}\n setMinMax={setMinMax}\n showUndefined={showUndefined}\n unitsCurrent={unitsCurrent}\n />\n )\n }\n\n if (chartLibrary === \"peity\") {\n return (\n <PeityChart\n attributes={attributes}\n chartContainerElement={chartContainerElement}\n chartData={chartData as EasyPieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n orderedColors={orderedColors}\n />\n )\n }\n\n if (chartLibrary === \"google\") {\n return (\n <GoogleChart\n attributes={attributes}\n chartData={chartData as EasyPieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n orderedColors={orderedColors}\n unitsCurrent={unitsCurrent}\n />\n )\n }\n\n if (chartLibrary === \"textonly\") {\n return (\n <TextOnly\n attributes={attributes}\n chartData={chartData as EasyPieChartData}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n />\n )\n }\n\n if (chartLibrary === \"groupbox\") {\n return (\n <KubernetesGroupBoxes\n chartData={chartData}\n chartMetadata={chartMetadata}\n attributes={attributes}\n viewAfter={viewAfterForCurrentData}\n viewBefore={viewBeforeForCurrentData}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n showUndefined={showUndefined}\n />\n )\n }\n\n return (\n <DygraphChart\n attributes={attributes}\n chartData={chartData as DygraphData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n chartLibrary={chartLibrary}\n colors={colors}\n chartUuid={chartUuid}\n dimensionsVisibility={dimensionsVisibility}\n hasEmptyData={hasEmptyData}\n hasLegend={hasLegend(attributes)}\n isRemotelyControlled={isRemotelyControlled}\n orderedColors={orderedColors}\n immediatelyDispatchPanAndZoom={immediatelyDispatchPanAndZoom}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n onUpdateChartPanAndZoom={onUpdateChartPanAndZoom}\n setGlobalChartUnderlay={setGlobalChartUnderlay}\n setHoveredX={setHoveredX}\n setMinMax={setMinMax}\n unitsCurrent={unitsCurrent}\n viewAfter={viewAfterForCurrentData}\n viewBefore={viewBeforeForCurrentData}\n />\n )\n}\n","import { useEffect, useRef } from \"react\"\nimport { isEmpty } from \"ramda\"\nimport { useMount } from \"react-use\"\n\nimport { ChartData, DygraphData } from \"domains/chart/chart-types\"\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartLibraryConfig } from \"domains/chart/utils/chartLibrariesSettings\"\n\n\ninterface UseShowValueOutsideArgument {\n attributes: Attributes\n chartData: ChartData\n chartSettings: ChartLibraryConfig\n hoveredRow: number\n legendFormatValue: ((v: number | string | null) => number | string)\n showUndefined: boolean\n}\n\n// example of the attribute:\n// show-value-of-iowait-at: \"system.cpu.iowait.1\"\n\nexport const useShowValueOutside = ({\n attributes,\n chartData,\n chartSettings,\n hoveredRow,\n legendFormatValue,\n showUndefined,\n}: UseShowValueOutsideArgument) => {\n // a ref to store found elements, just once per lifetime of component\n const showValueAttributesNodes = useRef<(HTMLElement | null)[]>([])\n\n // find the nodes that will have populated values\n useMount(() => {\n const { showValueOf } = attributes\n // showValueOf will be undefined if not used, but additional isEmpty check can prevent\n // regression performance issue in the future\n if (!showValueOf || isEmpty(showValueOf)) {\n return\n }\n const dimensionNames = chartData.dimension_names\n const dimensionIds = chartData.dimension_ids\n dimensionNames.forEach((dimensionName, i) => {\n const userElementId = showValueOf[`show-value-of-${dimensionName.toLowerCase()}`]\n || showValueOf[`show-value-of-${dimensionIds[i].toLowerCase()}-at`]\n\n // if element is not found, just add null\n showValueAttributesNodes.current = showValueAttributesNodes.current.concat(\n document.getElementById(userElementId),\n )\n })\n })\n\n useEffect(() => {\n if (showValueAttributesNodes.current.length) {\n const chartSettingCallOptions = chartSettings.options(attributes)\n const isFlipped = chartSettingCallOptions.includes(\"flip\")\n\n // \"objectrows\" is for d3pie, which has different data format\n if (chartData.format === \"json\" && !chartSettingCallOptions.includes(\"objectrows\")) {\n const { data } = (chartData as DygraphData).result\n const valueIndex = hoveredRow === -1\n ? (data.length - 1)\n : (hoveredRow) // because data for easy-pie-chart are flipped\n\n // yes, \"flipped\" value means chronological order (from oldest to newest) :)\n const rowIndex = isFlipped ? valueIndex : (data.length - valueIndex - 1)\n const row = data[rowIndex]\n\n chartData.dimension_names.forEach((dimensionName, dimensionIndex) => {\n const value = (showUndefined || !row)\n ? \"\"\n : legendFormatValue(row[dimensionIndex + 1])\n const element = showValueAttributesNodes.current[dimensionIndex]\n if (element) {\n element.innerText = `${value}`\n }\n })\n }\n }\n }, [attributes, chartData, chartSettings, hoveredRow, legendFormatValue, showUndefined])\n}\n","import { __, prop } from \"ramda\"\nimport React, { useEffect, useState, useCallback, useMemo, memo, useContext } from \"react\"\nimport { ThemeContext } from \"styled-components\"\nimport { useDebouncedCallback } from \"use-debounce\"\n\nimport {\n requestCommonColorsAction,\n setDefaultAfterAction,\n setGlobalPanAndZoomAction,\n setGlobalSelectionAction,\n} from \"domains/global/actions\"\nimport {\n createSelectAssignedColors,\n selectGlobalSelection,\n selectSyncPanAndZoom,\n selectSyncSelection,\n selectUnitsScalingMethod,\n} from \"domains/global/selectors\"\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { TimeRange } from \"types/common\"\nimport { MS_IN_SECOND, isTimestamp } from \"utils/utils\"\n\nimport { setChartPanAndZoomAction } from \"domains/chart/actions\"\n\nimport { getPanAndZoomStep } from \"../utils/get-pan-and-zoom-step\"\nimport { Attributes } from \"../utils/transformDataAttributes\"\nimport { chartLibrariesSettings } from \"../utils/chartLibrariesSettings\"\nimport { useFormatters } from \"../utils/formatters\"\nimport { ChartData, ChartMetadata } from \"../chart-types\"\n\nimport { ChartLegend } from \"./chart-legend\"\nimport { LegendToolbox } from \"./legend-toolbox\"\nimport { ResizeHandler } from \"./resize-handler\"\nimport { AbstractChart } from \"./abstract-chart\"\n\ninterface GlobalPanAndZoomState {\n after: number // timestamp in ms\n before: number // timestamp in ms\n masterID?: string\n shouldForceTimeRange?: boolean\n}\n\ninterface Props {\n attributes: Attributes\n chartContainerElement: HTMLElement\n chartData: ChartData\n chartMetadata: ChartMetadata\n chartHeight: number\n chartUuid: string\n chartWidth: number\n defaultAfter: number\n globalPanAndZoom: null | GlobalPanAndZoomState\n hasEmptyData: boolean\n isRemotelyControlled: boolean\n viewRangeForCurrentData: TimeRange\n viewRange: TimeRange\n selectedDimensions: string[]\n setSelectedDimensions: (newState: string[]) => void\n showLatestOnBlur: boolean\n}\n\nexport const Chart = memo(\n ({\n attributes,\n attributes: { chartLibrary },\n chartContainerElement,\n chartData,\n chartMetadata,\n chartHeight,\n chartUuid,\n chartWidth,\n defaultAfter,\n globalPanAndZoom,\n hasEmptyData,\n isRemotelyControlled,\n viewRangeForCurrentData,\n viewRange,\n selectedDimensions,\n setSelectedDimensions,\n showLatestOnBlur,\n }: Props) => {\n const themeContext = useContext(ThemeContext)\n const unitsScalingMethod = useSelector(selectUnitsScalingMethod)\n const chartSettings = chartLibrariesSettings[chartLibrary]\n const { hasLegend } = chartSettings\n const {\n units = chartMetadata.units,\n unitsCommon,\n unitsDesired = unitsScalingMethod,\n } = attributes\n\n // we need to have empty selectedDimensions work as {all enabled}, in case\n // new dimensions show up (when all are enabled, the new dimensions should also auto-enable)\n const dimensionsVisibility = useMemo(\n () =>\n chartData.dimension_names.map(dimensionName =>\n selectedDimensions.length === 0 ? true : selectedDimensions.includes(dimensionName)\n ),\n [chartData.dimension_names, selectedDimensions]\n )\n\n const shouldDisplayToolbox =\n hasLegend(attributes) && window.NETDATA.options.current.legend_toolbox\n\n const shouldDisplayResizeHandler =\n shouldDisplayToolbox &&\n window.NETDATA.options.current.resize_charts && // legacy way of turning off for print mode\n !attributes.hideResizeHandler\n\n const dispatch = useDispatch()\n const allDimensionNames = useMemo(() => {\n // metadata and chartData dimensions match each other, but we need to first parse\n // dimensions from metadata, to keep the same order (when browser parsers dimensions object,\n // it sorts them in *some* way which is hard to reproduce). And people can get used to colors\n // so let's keep them as they were before\n const dimensionNamesFromMetadata = Object.values(chartMetadata.dimensions).map(x => x.name)\n const additionalDimensionNamesFromData = chartData.dimension_names.filter(\n x => !dimensionNamesFromMetadata.includes(x)\n )\n return dimensionNamesFromMetadata.concat(additionalDimensionNamesFromData)\n }, [chartData.dimension_names, chartMetadata.dimensions])\n useEffect(() => {\n dispatch(\n requestCommonColorsAction({\n chartContext: chartMetadata.context,\n chartUuid,\n colorsAttribute: attributes.colors,\n commonColorsAttribute: attributes.commonColors,\n dimensionNames: allDimensionNames,\n })\n )\n }, [\n allDimensionNames,\n attributes.colors,\n attributes.commonColors,\n chartMetadata.context,\n chartUuid,\n dispatch,\n ])\n\n const { legendFormatValue, legendFormatValueDecimalsFromMinMax, unitsCurrent } = useFormatters({\n attributes,\n data: chartData,\n units,\n unitsCommon,\n unitsDesired,\n uuid: chartUuid,\n })\n\n const [localHoveredX, setLocalHoveredX] = useState<number | null>(null)\n\n const isSyncSelection = useSelector(selectSyncSelection)\n const handleSetHoveredX = useCallback(\n (newHoveredX, noMaster) => {\n if (isSyncSelection) {\n const action = noMaster\n ? { chartUuid: null, hoveredX: newHoveredX }\n : { chartUuid, hoveredX: newHoveredX }\n dispatch(setGlobalSelectionAction(action))\n } else {\n setLocalHoveredX(newHoveredX)\n }\n },\n [chartUuid, dispatch, isSyncSelection]\n )\n const globalHoveredX = useSelector(selectGlobalSelection)\n const hoveredX = isSyncSelection ? globalHoveredX : localHoveredX\n\n // time-frames for requested data (even when request is pending)\n const viewAfter = isTimestamp(viewRange[0]) ? viewRange[0] : chartData.after * MS_IN_SECOND\n const viewBefore = isTimestamp(viewRange[1]) ? viewRange[1] : chartData.before * MS_IN_SECOND\n\n const viewAfterForCurrentData = isTimestamp(viewRangeForCurrentData[0])\n ? viewRangeForCurrentData[0]\n : chartData.after * MS_IN_SECOND\n const viewBeforeForCurrentData = isTimestamp(viewRangeForCurrentData[1])\n ? viewRangeForCurrentData[1]\n : chartData.before * MS_IN_SECOND // when 'before' is 0 or negative\n\n const netdataFirst = chartData.first_entry * MS_IN_SECOND\n const netdataLast = chartData.last_entry * MS_IN_SECOND\n\n // old dashboard persists min duration based on first chartWidth, i assume it's a bug\n // and will update fixedMinDuration when width changes\n const fixedMinDuration = useMemo(\n () => Math.round((chartWidth / 30) * chartMetadata.update_every * MS_IN_SECOND),\n [chartMetadata.update_every, chartWidth]\n )\n\n const isSyncPanAndZoom = useSelector(selectSyncPanAndZoom)\n\n const setGlobalPanAndZoomDebounced = useDebouncedCallback(\n newGlobalPanAndZoom => {\n dispatch(setGlobalPanAndZoomAction(newGlobalPanAndZoom))\n },\n 400 // corresponds to global_pan_sync_time in old dashboard\n )\n\n const immediatelyDispatchPanAndZoom = useCallback(() => {\n setGlobalPanAndZoomDebounced.flush()\n }, [setGlobalPanAndZoomDebounced])\n\n /**\n * pan-and-zoom handler (both for toolbox and mouse events)\n */\n const handleUpdateChartPanAndZoom = useCallback(\n ({\n after,\n before,\n callback,\n shouldFlushImmediately = false,\n shouldForceTimeRange,\n shouldNotExceedAvailableRange,\n }) => {\n if (before < after) {\n return\n }\n let minDuration = fixedMinDuration\n\n const currentDuraton = Math.round(viewBefore - viewAfter)\n\n let afterForced = Math.round(after)\n let beforeForced = Math.round(before)\n const viewUpdateEvery = chartData.view_update_every * MS_IN_SECOND\n\n if (shouldNotExceedAvailableRange) {\n const first = netdataFirst + viewUpdateEvery\n const last = netdataLast + viewUpdateEvery\n // first check \"before\"\n if (beforeForced > last) {\n afterForced -= before - last\n beforeForced = last\n }\n\n if (afterForced < first) {\n afterForced = first\n }\n }\n\n // align them to update_every\n // stretching them further away\n afterForced -= afterForced % viewUpdateEvery\n beforeForced += viewUpdateEvery - (beforeForced % viewUpdateEvery)\n\n // the final wanted duration\n let wantedDuration = beforeForced - afterForced\n\n // to allow panning, accept just a point below our minimum\n if (currentDuraton - viewUpdateEvery < minDuration) {\n minDuration = currentDuraton - viewUpdateEvery\n }\n\n // we do it, but we adjust to minimum size and return false\n // when the wanted size is below the current and the minimum\n // and we zoom\n let doCallback = true\n if (wantedDuration < currentDuraton && wantedDuration < minDuration) {\n minDuration = fixedMinDuration\n\n const dt = (minDuration - wantedDuration) / 2\n beforeForced += dt\n afterForced -= dt\n wantedDuration = beforeForced - afterForced\n doCallback = false\n }\n\n const tolerance = viewUpdateEvery * 2\n const movement = Math.abs(beforeForced - viewBefore)\n\n if (\n Math.abs(currentDuraton - wantedDuration) <= tolerance &&\n movement <= tolerance &&\n doCallback\n ) {\n return\n }\n\n if (isSyncPanAndZoom) {\n setGlobalPanAndZoomDebounced.callback({\n after: afterForced,\n before: beforeForced,\n masterID: chartUuid,\n shouldForceTimeRange,\n })\n if (shouldFlushImmediately) {\n setGlobalPanAndZoomDebounced.flush()\n }\n } else {\n dispatch(\n setChartPanAndZoomAction({\n after: afterForced,\n before: beforeForced,\n id: chartUuid,\n shouldForceTimeRange,\n })\n )\n }\n\n if (doCallback && typeof callback === \"function\") {\n callback(afterForced, beforeForced)\n }\n },\n [\n chartData.view_update_every,\n chartUuid,\n dispatch,\n fixedMinDuration,\n isSyncPanAndZoom,\n netdataFirst,\n netdataLast,\n setGlobalPanAndZoomDebounced,\n viewAfter,\n viewBefore,\n ]\n )\n\n /**\n * toolbox handlers\n */\n const handleToolBoxPanAndZoom = useCallback(\n (after: number, before: number) => {\n const newAfter = Math.max(after, netdataFirst)\n const newBefore = Math.min(before, netdataLast)\n handleUpdateChartPanAndZoom({\n after: newAfter,\n before: newBefore,\n shouldForceTimeRange: true,\n shouldFlushImmediately: true,\n })\n },\n [handleUpdateChartPanAndZoom, netdataFirst, netdataLast]\n )\n\n const handleToolboxLeftClick = useCallback(\n (event: React.MouseEvent) => {\n const step = (viewBefore - viewAfter) * getPanAndZoomStep(event)\n const newBefore = viewBefore - step\n const newAfter = viewAfter - step\n if (newAfter >= netdataFirst) {\n handleToolBoxPanAndZoom(newAfter, newBefore)\n }\n },\n [handleToolBoxPanAndZoom, netdataFirst, viewAfter, viewBefore]\n )\n\n const handleToolboxRightClick = useCallback(\n (event: React.MouseEvent) => {\n const timeWindow = viewBefore - viewAfter\n const step = timeWindow * getPanAndZoomStep(event)\n const newBefore = Math.min(viewBefore + step, netdataLast)\n const newAfter = newBefore - timeWindow\n handleToolBoxPanAndZoom(newAfter, newBefore)\n },\n [handleToolBoxPanAndZoom, netdataLast, viewAfter, viewBefore]\n )\n\n const handleToolboxZoomInClick = useCallback(\n (event: React.MouseEvent) => {\n const panAndZoomStep = getPanAndZoomStep(event) * 0.8\n if (!globalPanAndZoom) {\n dispatch(\n setDefaultAfterAction({\n after: Math.round(defaultAfter / (panAndZoomStep + 1)),\n })\n )\n return\n }\n // if visible time range is much bigger than available time range in history, first zoom-in\n // should just fit to available range\n if (viewBefore - viewAfter > (netdataLast - netdataFirst) * 1.2) {\n handleToolBoxPanAndZoom(netdataFirst, netdataLast)\n return\n }\n const dt = ((viewBefore - viewAfter) * panAndZoomStep) / 2\n const newAfter = viewAfter + dt\n const newBefore = viewBefore - dt\n handleToolBoxPanAndZoom(newAfter, newBefore)\n },\n [\n defaultAfter,\n dispatch,\n globalPanAndZoom,\n handleToolBoxPanAndZoom,\n netdataFirst,\n netdataLast,\n viewAfter,\n viewBefore,\n ]\n )\n\n const handleToolboxZoomOutClick = useCallback(\n (event: React.MouseEvent) => {\n const panAndZoomStep = getPanAndZoomStep(event) * 0.8\n if (!globalPanAndZoom) {\n dispatch(\n setDefaultAfterAction({\n after: Math.round(defaultAfter * (panAndZoomStep + 1)),\n })\n )\n return\n }\n const dt =\n ((viewBefore - viewAfter) / (1.0 - panAndZoomStep * 0.8) - (viewBefore - viewAfter)) / 2\n const newAfter = viewAfter - dt\n const newBefore = viewBefore + dt\n handleToolBoxPanAndZoom(newAfter, newBefore)\n },\n [defaultAfter, dispatch, globalPanAndZoom, handleToolBoxPanAndZoom, viewAfter, viewBefore]\n )\n\n /**\n * assign colors\n */\n const selectAssignedColors = useMemo(\n () =>\n createSelectAssignedColors({\n chartContext: chartMetadata.context,\n chartUuid,\n colorsAttribute: attributes.colors,\n commonColorsAttribute: attributes.commonColors,\n }),\n [attributes.colors, attributes.commonColors, chartMetadata, chartUuid]\n )\n const colors = useSelector(selectAssignedColors)\n const orderedColors = useMemo(\n () => chartData.dimension_names.map(prop(__, colors)),\n [chartData, colors]\n )\n\n if (!colors) {\n return <span /> // wait for createSelectAssignedColors reducer result to come back\n }\n\n const isTimeVisible = hoveredX && hoveredX >= viewAfter && hoveredX <= viewBefore\n const viewUpdateEvery = chartData.view_update_every * MS_IN_SECOND\n const hoveredRow = isTimeVisible\n ? Math.floor(((hoveredX as number) - chartData.after * MS_IN_SECOND) / viewUpdateEvery)\n : -1\n\n const isLegendOnBottom = attributes.legendPosition === \"bottom\"\n\n const legendToolbox = (\n <LegendToolbox\n onToolboxLeftClick={handleToolboxLeftClick}\n onToolboxRightClick={handleToolboxRightClick}\n onToolboxZoomInClick={handleToolboxZoomInClick}\n onToolboxZoomOutClick={handleToolboxZoomOutClick}\n />\n )\n\n const resizeHandler = shouldDisplayResizeHandler && (\n <ResizeHandler\n chartContainerElement={chartContainerElement}\n chartUuid={chartUuid}\n heightId={attributes.heightId}\n isLegendOnBottom={isLegendOnBottom}\n />\n )\n\n return (\n <>\n <AbstractChart\n // remount on theme change\n key={themeContext.name}\n attributes={attributes}\n chartContainerElement={chartContainerElement}\n chartData={chartData}\n chartMetadata={chartMetadata}\n chartLibrary={chartLibrary}\n colors={colors}\n chartUuid={chartUuid}\n chartHeight={chartHeight}\n chartWidth={chartWidth}\n dimensionsVisibility={dimensionsVisibility}\n hasEmptyData={hasEmptyData}\n onUpdateChartPanAndZoom={handleUpdateChartPanAndZoom}\n immediatelyDispatchPanAndZoom={immediatelyDispatchPanAndZoom}\n isRemotelyControlled={isRemotelyControlled}\n legendFormatValue={legendFormatValue}\n orderedColors={orderedColors}\n hoveredX={hoveredX}\n hoveredRow={hoveredRow}\n setHoveredX={handleSetHoveredX}\n setMinMax={([min, max]) => legendFormatValueDecimalsFromMinMax(min, max)}\n showLatestOnBlur={showLatestOnBlur}\n unitsCurrent={unitsCurrent}\n viewAfterForCurrentData={viewAfterForCurrentData}\n viewBeforeForCurrentData={viewBeforeForCurrentData}\n />\n {hasLegend(attributes) && (\n <ChartLegend\n attributes={attributes}\n chartUuid={chartUuid}\n chartMetadata={chartMetadata}\n chartLibrary={chartLibrary}\n colors={colors}\n hoveredX={hoveredX}\n hoveredRow={hoveredRow}\n legendFormatValue={legendFormatValue}\n selectedDimensions={selectedDimensions}\n setSelectedDimensions={setSelectedDimensions}\n showLatestOnBlur={showLatestOnBlur}\n unitsCurrent={unitsCurrent}\n viewBefore={viewBefore}\n legendToolbox={legendToolbox}\n resizeHandler={resizeHandler}\n />\n )}\n {shouldDisplayToolbox && !isLegendOnBottom && legendToolbox}\n {!isLegendOnBottom && resizeHandler}\n </>\n )\n }\n)\n","import styled from \"styled-components\"\nimport { getColor, Icon } from \"@netdata/netdata-ui\"\n\nexport const DropdownItem = styled.div`\n display: flex;\n flex-direction: start;\n align-items: center;\n color: ${getColor([\"neutral\", \"limedSpruce\"])};\n white-space: nowrap;\n & > svg use {\n fill: ${getColor([\"neutral\", \"limedSpruce\"])};\n }\n`\n\nexport const DropdownItemLabel = styled.span`\n margin-left: 12px;\n`\n\nexport const DotsBtn = styled(Icon)`\n width: 6px;\n height: 10px;\n cursor: pointer;\n & use {\n fill: ${getColor([\"neutral\", \"limedSpruce\"])};\n & :hover {\n fill: ${getColor([\"neutral\", \"regentgrey\"])};\n }\n }\n`\n","import React, { useState, ReactNode } from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata } from \"domains/chart/chart-types\"\n\nimport { List, SimpleListItem } from \"@rmwc/list\"\nimport { MenuSurface, MenuSurfaceAnchor } from \"@rmwc/menu\"\n\nimport * as S from \"./styled\"\n\ninterface DropdownMenuCallbackProps {\n attributes: Attributes,\n chartMetadata: ChartMetadata,\n chartID: string,\n}\n\nexport type DropdownMenu = {\n icon: ReactNode,\n label: string,\n onClick: (dropdownMenuCallbackProps: DropdownMenuCallbackProps) => void,\n}[]\n\ninterface Props {\n attributes: Attributes\n chartID: string\n chartMetadata: ChartMetadata\n dropdownMenu: DropdownMenu\n}\n\nexport const ChartDropdown = ({\n attributes,\n chartID,\n chartMetadata,\n dropdownMenu,\n}: Props) => {\n const [isOpen, setIsOpen] = useState(false)\n\n const handleClose = () => {\n setIsOpen(false)\n }\n\n return (\n <>\n <S.DotsBtn\n name=\"dots_2x3\"\n onClick={() => {\n setIsOpen(true)\n }}\n />\n <MenuSurfaceAnchor>\n <MenuSurface open={isOpen} onClose={handleClose}>\n <List>\n {dropdownMenu.map(({ icon, label, onClick }) => (\n <SimpleListItem\n key={label}\n text={(\n <S.DropdownItem>\n {icon}\n <S.DropdownItemLabel>\n {label}\n </S.DropdownItemLabel>\n </S.DropdownItem>\n )}\n onClick={() => {\n onClick({ attributes, chartMetadata, chartID })\n handleClose()\n }}\n />\n ))}\n </List>\n </MenuSurface>\n </MenuSurfaceAnchor>\n </>\n )\n}\n","import { prop } from \"ramda\"\nimport styled, { keyframes } from \"styled-components\"\n\nimport { getColor } from \"@netdata/netdata-ui\"\n\nconst circleAnimation = keyframes`\n 0% {\n opacity: .1;\n }\n 50% {\n opacity: .5;\n }\n 100% {\n opacity: .1;\n }\n`\n\n\nexport const SpinnerContainer = styled.div<{ top: number, right: number }>`\n position: absolute;\n top: ${prop(\"top\")}px;\n right: ${prop(\"right\")}px;\n display: flex;\n`\n\nexport const Circle = styled.div<{ size: number }>`\n width: ${prop(\"size\")}px;\n height: ${prop(\"size\")}px;\n background: ${getColor(\"border\")};\n border-radius: 50%;\n animation: 1s linear infinite both ${circleAnimation};\n`\n\nexport const Circle2 = styled(Circle)<{ spaceBetween: number }>`\n animation-delay: .3s; \n margin-left: ${prop(\"spaceBetween\")}px;\n`\n\nexport const Circle3 = styled(Circle)<{ spaceBetween: number }>`\n animation-delay: .6s; \n margin-left: ${prop(\"spaceBetween\")}px;\n`\n","import React from \"react\"\n\nimport * as S from \"./styled\"\n\ninterface Props {\n chartLibrary: string\n}\nexport const ChartSpinner = ({\n chartLibrary,\n}: Props) => {\n const top = chartLibrary === \"dygraph\" ? 33 : 0\n const right = chartLibrary === \"dygraph\" ? 8 : 0\n const size = chartLibrary === \"dygraph\" ? 10 : 7\n const spaceBetween = chartLibrary === \"dygraph\" ? 4 : 2\n return (\n <S.SpinnerContainer top={top} right={right}>\n <S.Circle size={size} />\n <S.Circle2 size={size} spaceBetween={spaceBetween} />\n <S.Circle3 size={size} spaceBetween={spaceBetween} />\n </S.SpinnerContainer>\n )\n}\n","import styled from \"styled-components\"\n\nimport { chartDropdownZIndex } from \"styles/z-index\"\n\nexport const ChartDropdownContainer = styled.div`\n position: absolute;\n top: 0;\n left: 40px;\n width: 20px;\n height: 20px;\n z-index: ${chartDropdownZIndex};\n`\n","export const notificationsZIndex = \"z-index: 50;\"\n\nexport const chartDropdownZIndex = 10\n\nexport const spacesBarZIndex = 8\n\nexport const spacePanelZIndex = 6\n\nexport const appHeaderZIndex = 5\n\n// the same as in cloud\nexport const portalSidebarZIndex = \"z-index: 35;\"\nexport const customDropdownZIndex = \"z-index: 45;\"\nexport const dialogsZIndex = 60\n","import { cond, always, T } from \"ramda\"\nimport axios from \"axios\"\nimport React, { useEffect, useState, useMemo, useLayoutEffect } from \"react\"\nimport { useThrottle, useUpdateEffect, useUnmount, useDebounce } from \"react-use\"\n\nimport { AppStateT } from \"store/app-state\"\nimport { useSelector, useDispatch } from \"store/redux-separate-context\"\n\nimport {\n selectGlobalPanAndZoom,\n selectGlobalSelection,\n selectShouldEliminateZeroDimensions,\n selectPanAndZoomDataPadding,\n selectSnapshot,\n selectSpacePanelTransitionEndIsActive,\n selectDefaultAfter,\n} from \"domains/global/selectors\"\nimport { serverDefault } from \"utils/server-detection\"\nimport { CHART_UNMOUNTED } from \"utils/netdata-sdk\"\nimport { getCorrectedPoints } from \"utils/fill-missing-data\"\n\nimport { fallbackUpdateTimeInterval, panAndZoomDelay } from \"../../constants\"\nimport { getChartURLOptions } from \"../../utils/get-chart-url-options\"\nimport { chartLibrariesSettings } from \"../../utils/chartLibrariesSettings\"\nimport { Attributes } from \"../../utils/transformDataAttributes\"\nimport { getChartPixelsPerPoint } from \"../../utils/get-chart-pixels-per-point\"\nimport { useFetchNewDataClock } from \"../../hooks/use-fetch-new-data-clock\"\n\nimport { fetchChartAction, fetchDataAction } from \"../../actions\"\nimport {\n selectChartData,\n selectChartFetchDataParams,\n makeSelectChartMetadataRequest,\n selectChartPanAndZoom,\n selectChartIsFetchingData,\n selectChartViewRange,\n} from \"../../selectors\"\nimport {\n ChartData,\n ChartMetadata,\n D3pieChartData,\n DygraphData,\n EasyPieChartData,\n} from \"../../chart-types\"\n\nimport { Loader } from \"../loader\"\nimport { Chart } from \"../chart\"\nimport { ChartDropdown, DropdownMenu } from \"../chart-dropdown\"\nimport { ChartSpinner } from \"../chart-spinner/chart-spinner\"\n\nimport * as S from \"./styled\"\nimport \"./chart-with-loader.css\"\n\nexport type RenderCustomElementForDygraph = (selectedChartConfiguration: {\n attributes: Attributes\n onAttributesChange: any\n chartMetadata: ChartMetadata\n chartID: string\n chartData: ChartData | null\n}) => JSX.Element\n\nconst dimensionsAggrMethodMap = {\n \"sum-of-abs\": \"sum\",\n}\n\nconst emptyArray = [] as any\n\nexport type Props = {\n attributes: Attributes\n chartUuid: string\n uuid?: string\n dropdownMenu?: DropdownMenu\n externalChartMetadata?: ChartMetadata\n portalNode: HTMLElement\n renderCustomElementForDygraph?: RenderCustomElementForDygraph\n onAttributesChange?: any\n}\n\nexport const ChartWithLoader = ({\n attributes,\n chartUuid,\n uuid,\n dropdownMenu,\n externalChartMetadata,\n portalNode,\n renderCustomElementForDygraph,\n onAttributesChange,\n}: Props) => {\n /**\n * fetch chart details\n */\n const { host = serverDefault, id, nodeIDs } = attributes\n const dispatch = useDispatch()\n const selectChartMetadataRequest = useMemo(makeSelectChartMetadataRequest, [])\n const { chartMetadata, isFetchingDetails } = useSelector((state: AppStateT) =>\n selectChartMetadataRequest(state, { chartId: id, id: chartUuid })\n )\n const actualChartMetadata = externalChartMetadata || chartMetadata\n useEffect(() => {\n if (!chartMetadata && !isFetchingDetails && !externalChartMetadata) {\n dispatch(\n fetchChartAction.request({\n chart: id,\n id: chartUuid,\n host,\n nodeIDs,\n })\n )\n }\n }, [\n id,\n chartUuid,\n dispatch,\n host,\n isFetchingDetails,\n chartMetadata,\n externalChartMetadata,\n nodeIDs,\n uuid,\n ])\n\n // todo local state option\n const globalPanAndZoom = useSelector(selectGlobalPanAndZoom)\n const chartPanAndZoom = useSelector((state: AppStateT) =>\n selectChartPanAndZoom(state, { id: chartUuid })\n )\n const panAndZoom = chartPanAndZoom || globalPanAndZoom\n\n const isPanAndZoomMaster =\n (!!globalPanAndZoom && globalPanAndZoom.masterID === chartUuid) || Boolean(chartPanAndZoom)\n const shouldForceTimeRange = panAndZoom?.shouldForceTimeRange || false\n\n // (isRemotelyControlled === false) only during globalPanAndZoom, when chart is panAndZoomMaster\n // and when no toolbox is used at that time\n const isRemotelyControlled = !panAndZoom || !isPanAndZoomMaster || shouldForceTimeRange // used when zooming/shifting in toolbox\n\n const fetchDataParams = useSelector((state: AppStateT) =>\n selectChartFetchDataParams(state, { id: chartUuid })\n )\n const viewRange = useSelector((state: AppStateT) =>\n selectChartViewRange(state, { id: chartUuid })\n )\n const chartData = useSelector((state: AppStateT) => selectChartData(state, { id: chartUuid }))\n const isFetchingData = useSelector((state: AppStateT) =>\n selectChartIsFetchingData(state, { id: chartUuid })\n )\n\n const hoveredX = useSelector(selectGlobalSelection)\n\n // periodical update of newest data\n // default to 2000ms. When chartMetadata has been fetched, use chartMetadata.update_every\n // if chartData has been fetched, use chartData.view_update_every instead\n // todo add support to \"data-update-every\" attribute\n const viewUpdateEvery = cond([\n [always(!!chartData), () => (chartData as ChartData).view_update_every * 1000],\n [\n always(!!actualChartMetadata),\n () => (actualChartMetadata as ChartMetadata).update_every * 1000,\n ],\n [T, always(fallbackUpdateTimeInterval)],\n ])()\n const [shouldFetch, setShouldFetch] = useFetchNewDataClock({\n areCriteriaMet: !panAndZoom && !hoveredX,\n preferedIntervalTime: viewUpdateEvery,\n })\n\n const panAndZoomThrottled = useThrottle(panAndZoom, panAndZoomDelay)\n useEffect(() => {\n setShouldFetch(true)\n }, [panAndZoomThrottled, setShouldFetch])\n\n const defaultAfter = useSelector(selectDefaultAfter)\n // when after/before changes, don't wait for next interval, just fetch immediately\n useUpdateEffect(() => {\n setShouldFetch(true)\n }, [\n attributes.after,\n attributes.before,\n defaultAfter,\n attributes.dimensions,\n attributes.aggrMethod,\n attributes.groupBy,\n ])\n\n const { before: initialBefore = window.NETDATA.chartDefaults.before } = attributes\n\n // attributes.after should be now used only for old custom dashboard\n // and in the future for setting timeframe per-chart\n const liveModeAfter = attributes.after || defaultAfter\n\n const chartSettings = chartLibrariesSettings[attributes.chartLibrary]\n const { hasLegend } = chartSettings\n\n // todo optimize by using resizeObserver (optionally)\n const boundingClientRect = portalNode.getBoundingClientRect()\n\n // from old dashboard\n const chartWidth = boundingClientRect.width - (hasLegend(attributes) ? 140 : 0)\n const chartHeight = boundingClientRect.height\n\n const isShowingSnapshot = Boolean(useSelector(selectSnapshot))\n const shouldEliminateZeroDimensions =\n useSelector(selectShouldEliminateZeroDimensions) || isShowingSnapshot\n const shouldUsePanAndZoomPadding = useSelector(selectPanAndZoomDataPadding)\n\n const { CancelToken } = axios\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const cancelTokenSource = useMemo(() => CancelToken.source(), [])\n useUnmount(() => {\n cancelTokenSource.cancel(CHART_UNMOUNTED)\n })\n\n /**\n * spinner state\n * show spinner when it's fetching for more than 2 seconds\n * hide spinner immediately when it's not fetching\n */\n const [shouldShowSpinnerDebounced, setShouldShowSpinnerDebounced] = useState(false)\n const shouldShowSpinner = shouldShowSpinnerDebounced && isFetchingData\n useDebounce(\n () => {\n if (isFetchingData) {\n setShouldShowSpinnerDebounced(true)\n }\n },\n 2000,\n [isFetchingData]\n )\n useEffect(() => {\n if (!isFetchingData && shouldShowSpinnerDebounced) {\n setShouldShowSpinnerDebounced(false)\n }\n }, [isFetchingData, shouldShowSpinnerDebounced])\n\n /**\n * fetch data\n */\n useEffect(() => {\n if (shouldFetch && actualChartMetadata && !isFetchingData) {\n // todo can be overridden by main.js\n const forceDataPoints = window.NETDATA.options.force_data_points\n\n let after\n let before\n let newViewRange\n let pointsMultiplier = 1\n\n if (panAndZoom) {\n if (isPanAndZoomMaster) {\n after = Math.round(panAndZoom.after / 1000)\n before = Math.round(panAndZoom.before / 1000)\n\n newViewRange = [after, before]\n\n if (shouldUsePanAndZoomPadding) {\n const requestedPadding = Math.round((before - after) / 2)\n after -= requestedPadding\n before += requestedPadding\n pointsMultiplier = 2\n }\n } else {\n after = Math.round(panAndZoom.after / 1000)\n before = Math.round(panAndZoom.before / 1000)\n pointsMultiplier = 1\n }\n } else {\n // no panAndZoom\n before = initialBefore\n after = liveModeAfter\n pointsMultiplier = 1\n }\n\n newViewRange = (newViewRange || [after, before]).map(x => x * 1000) as [number, number]\n\n const dataPoints =\n attributes.points ||\n Math.round(chartWidth / getChartPixelsPerPoint({ attributes, chartSettings }))\n const points = forceDataPoints || dataPoints * pointsMultiplier\n\n const shouldForceTimeWindow = attributes.forceTimeWindow || Boolean(defaultAfter)\n // if we want to add fake points, we need first need to request less\n // to have the desired frequency\n // this will be removed when Agents will support forcing time-window between points\n const correctedPoints = shouldForceTimeWindow\n ? getCorrectedPoints({\n after,\n before,\n firstEntry: actualChartMetadata.first_entry,\n points,\n })\n : null\n\n const group = attributes.method || window.NETDATA.chartDefaults.method\n setShouldFetch(false)\n dispatch(\n fetchDataAction.request({\n // properties to be passed to API\n host,\n context: actualChartMetadata.context,\n chart: actualChartMetadata.id,\n format: chartSettings.format,\n points: correctedPoints || points,\n group,\n gtime: attributes.gtime || 0,\n options: getChartURLOptions(attributes, shouldEliminateZeroDimensions),\n after: after || null,\n before: before || null,\n dimensions: attributes.dimensions,\n labels: attributes.labels,\n postGroupBy: attributes.postGroupBy,\n postAggregationMethod: attributes.postAggregationMethod,\n aggrMethod: attributes.aggrMethod,\n aggrGroups: attributes.aggrGroups,\n // @ts-ignore\n dimensionsAggrMethod:\n dimensionsAggrMethodMap[attributes.dimensionsAggrMethod] ||\n attributes.dimensionsAggrMethod,\n nodeIDs,\n httpMethod: attributes.httpMethod,\n groupBy: attributes.groupBy,\n\n // properties for the reducer\n fetchDataParams: {\n // we store it here so it is only available when data is fetched\n // those params should be synced with data\n fillMissingPoints: correctedPoints ? points - correctedPoints : undefined,\n isRemotelyControlled,\n viewRange: newViewRange,\n },\n id: chartUuid,\n cancelTokenSource,\n })\n )\n }\n }, [\n attributes,\n actualChartMetadata,\n chartSettings,\n chartUuid,\n chartWidth,\n defaultAfter,\n dispatch,\n hasLegend,\n host,\n initialBefore,\n isFetchingData,\n isPanAndZoomMaster,\n isRemotelyControlled,\n liveModeAfter,\n panAndZoom,\n portalNode,\n setShouldFetch,\n shouldEliminateZeroDimensions,\n shouldUsePanAndZoomPadding,\n shouldFetch,\n cancelTokenSource,\n nodeIDs,\n uuid,\n ])\n\n useSelector(selectSpacePanelTransitionEndIsActive)\n\n const externalSelectedDimensions = attributes?.selectedDimensions\n const [selectedDimensions, setSelectedDimensions] = useState<string[]>(\n externalSelectedDimensions || emptyArray\n )\n\n useLayoutEffect(() => {\n if (externalSelectedDimensions) {\n setSelectedDimensions(externalSelectedDimensions)\n }\n }, [externalSelectedDimensions])\n\n useLayoutEffect(() => {\n setSelectedDimensions(externalSelectedDimensions || emptyArray)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [attributes?.groupBy])\n\n const customElementForDygraph = useMemo(\n () =>\n renderCustomElementForDygraph &&\n renderCustomElementForDygraph({\n onAttributesChange,\n attributes,\n chartMetadata: actualChartMetadata as ChartMetadata,\n chartData,\n chartID: id,\n }),\n [\n onAttributesChange,\n renderCustomElementForDygraph,\n attributes,\n id,\n actualChartMetadata,\n chartData,\n ]\n )\n\n // eslint-disable-next-line max-len\n const hasEmptyData =\n (chartData as DygraphData | D3pieChartData | null)?.result?.data?.length === 0 ||\n (chartData as EasyPieChartData | null)?.result?.length === 0\n\n if (!chartData || !actualChartMetadata) {\n return (\n <>\n <Loader\n // Loader should remount when that flag is changed, because inside\n // there's an oldschool bootstrap icon which doesn't handle updates well\n key={`${hasEmptyData}`}\n hasEmptyData={hasEmptyData}\n containerNode={portalNode}\n />\n {shouldShowSpinner && <ChartSpinner chartLibrary={attributes.chartLibrary} />}\n </>\n )\n }\n\n return (\n <>\n {hasEmptyData && (\n <Loader key={`${hasEmptyData}`} hasEmptyData={hasEmptyData} containerNode={portalNode} />\n )}\n <Chart\n attributes={attributes}\n chartContainerElement={portalNode}\n chartData={chartData}\n chartMetadata={actualChartMetadata}\n chartUuid={chartUuid}\n chartHeight={chartHeight}\n chartWidth={chartWidth}\n defaultAfter={defaultAfter}\n globalPanAndZoom={globalPanAndZoom}\n hasEmptyData={hasEmptyData}\n isRemotelyControlled={fetchDataParams.isRemotelyControlled}\n // view range that updates only when data is fetched\n viewRangeForCurrentData={fetchDataParams.viewRange}\n // view range that updates when requesting and fetching of data\n viewRange={viewRange!}\n selectedDimensions={selectedDimensions}\n setSelectedDimensions={setSelectedDimensions}\n showLatestOnBlur={!panAndZoom}\n />\n {shouldShowSpinner && <ChartSpinner chartLibrary={attributes.chartLibrary} />}\n {dropdownMenu && dropdownMenu.length > 0 && (\n <S.ChartDropdownContainer>\n <ChartDropdown\n dropdownMenu={dropdownMenu}\n chartID={id}\n attributes={attributes}\n chartMetadata={actualChartMetadata}\n />\n </S.ChartDropdownContainer>\n )}\n {customElementForDygraph}\n </>\n )\n}\n","import { useEffect, useState } from \"react\"\nimport { useInterval } from \"react-use\"\n\nimport { useSelector } from \"store/redux-separate-context\"\nimport {\n selectHasWindowFocus,\n selectStopUpdatesWhenFocusIsLost,\n selectGlobalPause,\n} from \"domains/global/selectors\"\nimport { BIGGEST_INTERVAL_NUMBER } from \"utils/biggest-interval-number\"\nimport { isPrintMode } from \"domains/dashboard/utils/parse-url\"\n\ntype UseFetchNewDataClock = (arg: {\n areCriteriaMet: boolean\n preferedIntervalTime: number\n}) => [boolean, (shouldFetch: boolean) => void]\nexport const useFetchNewDataClock: UseFetchNewDataClock = ({\n areCriteriaMet,\n preferedIntervalTime,\n}) => {\n const hasWindowFocus = useSelector(selectHasWindowFocus)\n const stopUpdatesWhenFocusIsLost = useSelector(selectStopUpdatesWhenFocusIsLost)\n const globalPause = useSelector(selectGlobalPause)\n\n const shouldBeUpdating = !(!hasWindowFocus && stopUpdatesWhenFocusIsLost) && !globalPause\n\n const [shouldFetch, setShouldFetch] = useState<boolean>(true)\n const [shouldFetchImmediatelyAfterFocus, setShouldFetchImmediatelyAfterFocus] = useState(false)\n\n useEffect(() => {\n if (shouldFetchImmediatelyAfterFocus && shouldBeUpdating) {\n setShouldFetchImmediatelyAfterFocus(false)\n setShouldFetch(true)\n }\n }, [shouldFetchImmediatelyAfterFocus, setShouldFetchImmediatelyAfterFocus, shouldBeUpdating])\n\n // don't use setInterval when we loose focus\n const intervalTime =\n (shouldBeUpdating || !shouldFetchImmediatelyAfterFocus) && !isPrintMode\n ? preferedIntervalTime\n : BIGGEST_INTERVAL_NUMBER\n useInterval(() => {\n if (areCriteriaMet) {\n if (!shouldBeUpdating) {\n setShouldFetchImmediatelyAfterFocus(true)\n return\n }\n setShouldFetch(true)\n }\n // when there's no focus, don't ask for updated data\n }, intervalTime)\n return [shouldFetch, setShouldFetch]\n}\n","import { Attributes } from \"./transformDataAttributes\"\nimport { ChartLibraryConfig } from \"./chartLibrariesSettings\"\n\ntype GetChartPixelsPerPoint = (arg: {\n attributes: Attributes,\n chartSettings: ChartLibraryConfig,\n}) => number\n\nexport const getChartPixelsPerPoint: GetChartPixelsPerPoint = ({\n attributes, chartSettings,\n}) => {\n const {\n pixelsPerPoint: pixelsPerPointAttribute,\n } = attributes\n if (typeof pixelsPerPointAttribute === \"number\") {\n return pixelsPerPointAttribute\n }\n const pixelsPerPointSetting = chartSettings.pixelsPerPoint(attributes)\n\n return Math.max(...[\n pixelsPerPointSetting,\n window.NETDATA.options.current.pixels_per_point,\n ].filter((px) => typeof px === \"number\"))\n}\n","import { prop, pick } from \"ramda\"\nimport { createSelector } from \"reselect\"\n\nimport { AppStateT } from \"store/app-state\"\n\nimport { storeKey } from \"./constants\"\n\nconst selectDashboardDomain = (state: AppStateT) => state[storeKey]\n\nexport const selectIsSnapshotMode = createSelector(\n selectDashboardDomain,\n prop(\"isSnapshotMode\"),\n)\n\nexport const selectSnapshotOptions = createSelector(\n selectDashboardDomain,\n pick([\"snapshotCharts\", \"snapshotDataPoints\"]),\n)\n","import React, { useEffect } from \"react\"\n\nimport { MS_IN_SECOND } from \"utils/utils\"\nimport { serverDefault } from \"utils/server-detection\"\nimport { selectIsSnapshotMode, selectSnapshotOptions } from \"domains/dashboard/selectors\"\nimport { selectGlobalPanAndZoom } from \"domains/global/selectors\"\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { TimeRangeObjT } from \"types/common\"\n\nimport { Attributes } from \"../utils/transformDataAttributes\"\nimport { fetchDataForSnapshotAction } from \"../actions\"\nimport { chartLibrariesSettings } from \"../utils/chartLibrariesSettings\"\nimport { getChartURLOptions } from \"../utils/get-chart-url-options\"\n\ninterface SnapshotLoaderProps {\n attributes: Attributes\n chartUuid: string\n}\nconst SnapshotLoader = ({\n attributes,\n chartUuid,\n}: SnapshotLoaderProps) => {\n const host = attributes.host || serverDefault\n const { snapshotDataPoints } = useSelector(selectSnapshotOptions)\n const group = attributes.method || window.NETDATA.chartDefaults.method\n const { chartLibrary } = attributes\n const chartSettings = chartLibrariesSettings[chartLibrary]\n\n const globalPanAndZoom = useSelector(selectGlobalPanAndZoom)\n const after = (globalPanAndZoom as TimeRangeObjT).after / MS_IN_SECOND\n const before = (globalPanAndZoom as TimeRangeObjT).before / MS_IN_SECOND\n\n const dispatch = useDispatch()\n useEffect(() => {\n dispatch(fetchDataForSnapshotAction.request({\n // properties to be passed to API\n host,\n context: attributes.id,\n chart: attributes.id,\n format: chartSettings.format,\n points: snapshotDataPoints as number,\n group,\n gtime: attributes.gtime || 0,\n // for snapshots, always eliminate zero dimensions\n options: getChartURLOptions(attributes, true),\n after: after || null,\n before: before || null,\n dimensions: attributes.dimensions,\n aggrMethod: attributes.aggrMethod,\n nodeIDs: attributes.nodeIDs,\n chartLibrary,\n id: chartUuid,\n groupBy: attributes.groupBy,\n }))\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }) // todo fetch based on state\n return null\n}\n\n\ninterface SnapshotLoaderContainerProps {\n attributes: Attributes\n chartUuid: string\n}\nexport const SnapshotLoaderContainer = ({\n attributes,\n chartUuid,\n}: SnapshotLoaderContainerProps) => {\n const isSnapshotMode = useSelector(selectIsSnapshotMode)\n if (!isSnapshotMode) {\n return null\n }\n return <SnapshotLoader attributes={attributes} chartUuid={chartUuid} />\n}\n","import React, { memo } from \"react\"\nimport { createPortal } from \"react-dom\"\n\nimport { getAttributes } from \"../utils/transformDataAttributes\"\nimport { ChartWithLoader } from \"./chart-with-loader\"\nimport { DisableOutOfView } from \"./disable-out-of-view\"\nimport { SnapshotLoaderContainer } from \"./snapshot-loader\"\n\nconst getNodesArray = () => Array.from(document.querySelectorAll(\"[data-netdata]\"))\n\nexport const Portals = memo(() => {\n const nodes = getNodesArray()\n return (\n <>\n {nodes.map((node, index) => {\n const attributesMapped = getAttributes(node)\n const chartId = `${attributesMapped.id}-${index}`\n return (\n createPortal(\n <>\n <DisableOutOfView\n attributes={attributesMapped}\n chartUuid={chartId}\n portalNode={(node as HTMLElement)}\n >\n <ChartWithLoader\n attributes={attributesMapped}\n // todo change to uuid generator (when we disconnect dashboard.js)\n chartUuid={chartId}\n portalNode={(node as HTMLElement)}\n />\n </DisableOutOfView>\n <SnapshotLoaderContainer\n attributes={attributesMapped}\n chartUuid={chartId}\n />\n </>,\n node,\n )\n )\n })}\n </>\n )\n})\n","import { useEffect, useState } from \"react\"\n\nimport { axiosInstance } from \"utils/api\"\n\nexport const useHttp = <T = unknown>(\n url: string | undefined,\n shouldMakeCall : boolean = true,\n isExternal?: boolean,\n) => {\n const [isFetching, setIsFetching] = useState(false)\n const [isError, setIsError] = useState(false)\n const [data, setData] = useState<T | null>(null)\n useEffect(() => {\n if (shouldMakeCall && url) {\n const options = isExternal\n ? { headers: null, withCredentials: false }\n : {}\n\n setIsFetching(true)\n axiosInstance.get(url, options)\n .then((r) => {\n if (r.data) {\n setData(r.data)\n setIsError(false)\n setIsFetching(false)\n }\n })\n .catch((error) => {\n // eslint-disable-next-line no-console\n console.warn(`error fetching ${url}`, error)\n setIsError(true)\n setIsFetching(false)\n })\n }\n }, [isExternal, shouldMakeCall, url])\n // force triple instead of array\n return [data, isFetching, isError] as [T | null, boolean, boolean]\n}\n","import { ReactNode, useEffect, useRef } from \"react\"\nimport { createPortal } from \"react-dom\"\n\nconst modalRoot = document.getElementById(\"modal-root\") as HTMLElement\n\ntype Props = {\n children: ReactNode\n}\nexport const ModalPortal = ({ children }: Props) => {\n const element = useRef(document.createElement(\"div\"))\n useEffect(() => {\n modalRoot.appendChild(element.current)\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n modalRoot.removeChild(element.current)\n }\n }, [])\n\n return createPortal(children, element.current)\n}\n","import React, { useRef, useEffect } from \"react\"\nimport classNames from \"classnames\"\n\nimport { useSelector } from \"store/redux-separate-context\"\nimport { ModalPortal } from \"domains/dashboard/components/modal-portal\"\nimport {\n selectAmountOfCharts, selectAmountOfFetchedCharts, selectNameOfAnyFetchingChart,\n} from \"domains/chart/selectors\"\n\nimport \"./print-modal.scss\"\n\nconst TIMEOUT_DURATION_TO_MAKE_SURE_ALL_CHARTS_HAVE_BEEN_RENDERED = 1000\n\nexport const PrintModal = () => {\n const printModalElement = useRef<HTMLDivElement>(null)\n const isFetchingMetrics = true\n\n useEffect(() => {\n // todo replace bootstrap with newer solution (custom or react-compatible library)\n if (printModalElement.current) {\n const $element = window.$(printModalElement.current)\n $element.modal(\"show\")\n }\n }) // render just once\n\n const amountOfCharts = useSelector(selectAmountOfCharts)\n const amountOfFetchedCharts = useSelector(selectAmountOfFetchedCharts)\n const nameOfAnyFetchingChart = useSelector(selectNameOfAnyFetchingChart)\n\n const percentage = amountOfCharts === 0\n ? 0\n : (amountOfFetchedCharts / amountOfCharts) * 100\n\n useEffect(() => {\n if (percentage === 100) {\n setTimeout(() => {\n // in case browser will not be able to close the window\n window.$(printModalElement.current).modal(\"hide\")\n window.print()\n window.close()\n }, TIMEOUT_DURATION_TO_MAKE_SURE_ALL_CHARTS_HAVE_BEEN_RENDERED)\n }\n }, [percentage])\n\n\n const progressBarText = nameOfAnyFetchingChart\n && `${Math.round(percentage)}%, ${nameOfAnyFetchingChart}`\n\n\n return (\n <ModalPortal>\n <div\n ref={printModalElement}\n className=\"modal fade\"\n id=\"printModal\"\n tabIndex={-1}\n role=\"dialog\"\n aria-labelledby=\"printModalLabel\"\n data-keyboard=\"false\"\n data-backdrop=\"static\"\n >\n <div className=\"modal-dialog modal-lg\" role=\"document\">\n <div className=\"modal-content\">\n <div className=\"modal-header\">\n <button\n type=\"button\"\n className={classNames(\n \"close\",\n { \"print-modal__close-button--disabled\": isFetchingMetrics },\n )}\n data-dismiss=\"modal\"\n aria-label=\"Close\"\n >\n <span aria-hidden=\"true\">×</span>\n </button>\n <h4 className=\"modal-title\" id=\"printModalLabel\">\n Preparing dashboard for printing...\n </h4>\n </div>\n <div className=\"modal-body\">\n Please wait while we initialize and render all the charts on the dashboard.\n <div\n className=\"progress progress-striped active\"\n style={{ height: \"2em\" }}\n >\n <div\n id=\"printModalProgressBar\"\n className=\"progress-bar progress-bar-info\"\n role=\"progressbar\"\n aria-valuenow={percentage}\n aria-valuemin={0}\n aria-valuemax={100}\n style={{\n minWidth: \"2em\",\n width: `${percentage}%`,\n }}\n >\n <span\n id=\"printModalProgressBarText\"\n style={{\n paddingLeft: 10,\n paddingTop: 4,\n fontSize: \"1.2em\",\n textAlign: \"left\",\n width: \"100%\",\n position: \"absolute\",\n display: \"block\",\n color: \"black\",\n }}\n >\n {progressBarText}\n </span>\n </div>\n </div>\n The print dialog will appear as soon as we finish rendering the page.\n </div>\n <div className=\"modal-footer\" />\n </div>\n </div>\n </div>\n </ModalPortal>\n )\n}\n","import styled from \"styled-components\"\nimport { getSizeBy, getColor } from \"@netdata/netdata-ui\"\n\nexport const SocialMediaContainer = styled.div`\n width: 185px;\n padding: ${getSizeBy(2)};\n background: ${getColor(\"borderSecondary\")};\n\n font-size: 12px;\n margin-bottom: ${getSizeBy(3)};\n`\n\nexport const FirstRow = styled.div`\n display: flex;\n justify-content: space-between;\n`\n\nexport const GithubCopy = styled.div`\n\n`\n\nexport const GithubCopyLine = styled.div`\n\n`\n\nexport const SocialMediaLink = styled.a`\n &, &:hover {\n color: ${getColor(\"main\")};\n }\n`\n\nexport const GithubStarQuestion = styled(SocialMediaLink)``\n\nexport const GithubIcon = styled(SocialMediaLink)`\n font-size: 24px;\n`\n\nexport const TwitterIcon = styled(SocialMediaLink)`\n font-size: 17px;\n`\n\nexport const FacebookIcon = styled(SocialMediaLink)`\n font-size: 23px;\n`\n\nexport const Separator = styled.div`\n margin-top: ${getSizeBy(2)};\n border-top: 1px solid ${getColor(\"separator\")};\n\n`\nexport const SecondRow = styled.div`\n margin-top: ${getSizeBy(2)};\n display: flex;\n align-items: center;\n justify-content: space-between;\n`\n\nexport const SecondRowText = styled.span`\n font-size: 10px;\n`\n","import React from \"react\"\n\nimport * as S from \"./styled\"\n\nexport const SidebarSocialMedia = () => (\n <S.SocialMediaContainer>\n <S.FirstRow>\n <S.GithubCopy>\n <S.GithubCopyLine>\n Do you like Netdata?\n </S.GithubCopyLine>\n <S.GithubStarQuestion href=\"https://github.com/netdata/netdata/\" target=\"_blank\">\n Give us a star!\n </S.GithubStarQuestion>\n </S.GithubCopy>\n <S.GithubIcon href=\"https://github.com/netdata/netdata/\" target=\"_blank\">\n <i className=\"fab fa-github\" />\n </S.GithubIcon>\n </S.FirstRow>\n <S.Separator />\n <S.SecondRow>\n <S.SecondRowText>\n And share the word!\n </S.SecondRowText>\n <S.TwitterIcon href=\"https://twitter.com/linuxnetdata/\" target=\"_blank\">\n <i className=\"fab fa-twitter\" />\n </S.TwitterIcon>\n <S.FacebookIcon href=\"https://www.facebook.com/linuxnetdata/\" target=\"_blank\">\n <i className=\"fab fa-facebook\" />\n </S.FacebookIcon>\n </S.SecondRow>\n </S.SocialMediaContainer>\n)\n","import React, { useRef } from \"react\"\nimport { createPortal } from \"react-dom\"\n\ninterface Props {\n children: React.ReactNode\n}\nexport const SidebarSocialMediaPortal = ({\n children,\n}: Props) => {\n const element = useRef(document.querySelector(\"#sidebar-end-portal-container\"))\n return createPortal(children, element.current!)\n}\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { ToastContainer, ToastContainerProps } from \"react-toastify\"\nimport \"react-toastify/dist/ReactToastify.min.css\"\n\nimport { getColor } from \"@netdata/netdata-ui\"\n\nimport { notificationsZIndex } from \"styles/z-index\"\n\nconst WrappedToastContainer = ({\n className,\n ...rest\n}: ToastContainerProps & { className?: string }) => (\n <div className={className}>\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <ToastContainer {...rest} closeButton={false} />\n </div>\n)\n\nexport const NotificationsContainer = styled(WrappedToastContainer)<ToastContainerProps>`\n .Toastify__toast-container {\n position: fixed;\n width: unset;\n min-width: 400px;\n max-width: 500px;\n ${notificationsZIndex};\n color: ${getColor([\"neutral\", \"limedSpruce\"])};\n }\n .Toastify__toast {\n padding: 0;\n padding-top: 5px;\n }\n .Toastify__toast--error {\n background: ${getColor([\"red\", \"lavender\"])};\n border: 1px solid ${getColor(\"error\")};\n }\n .Toastify__toast--warning {\n }\n .Toastify__toast--success {\n background: ${getColor([\"green\", \"frostee\"])};\n border: 1px solid ${getColor(\"success\")};\n }\n .Toastify__toast-body {\n }\n .Toastify__progress-bar {\n bottom: unset;\n top: 0;\n }\n .Toastify__progress-bar--success {\n background-color: ${getColor(\"success\")};\n }\n .Toastify__progress-bar--error {\n background-color: ${getColor(\"error\")};\n }\n`\n","import React from \"react\"\nimport { Icon, Flex } from \"@netdata/netdata-ui\"\n\nconst Item = ({ icon, children, hasBorder }) => (\n <Flex\n gap={2}\n border={hasBorder && { side: \"right\", color: \"separator\" }}\n alignItems=\"center\"\n padding={[0, 3, 0, 0]}\n height=\"100%\"\n >\n {!!icon && <Icon name={icon} color=\"bright\" height=\"15px\" />}\n {children}\n </Flex>\n)\n\nexport default Item\n","import React from \"react\"\nimport { Text } from \"@netdata/netdata-ui\"\nimport Item from \"../item\"\nimport { useSelector } from \"@/src/store/redux-separate-context\"\n\nconst hostNameSelector = state => {\n const snapshot = state.global.snapshot\n const data = state.global.chartsMetadata.data\n\n if (!snapshot && !data) return \"\"\n return snapshot ? snapshot.hostname : data.hostname\n}\n\nconst Node = () => {\n const hostname = useSelector(hostNameSelector)\n\n return (\n <Item icon=\"node_hollow\">\n <Text data-testid={`header-nodename-${hostname}`} color=\"bright\" strong truncate>\n {hostname}\n </Text>\n </Item>\n )\n}\n\nexport default Node\n","import React from \"react\"\nimport { Flex, TextSmall } from \"@netdata/netdata-ui\"\n\nconst tooltipBackground = [\"neutral\", \"black\"]\n\nconst CustomTooltip = ({ children, isBasic }) => (\n <Flex\n padding={[1.5, 2]}\n margin={[2]}\n background={tooltipBackground}\n round={1}\n {...(!isBasic && { width: { max: \"300px\" } })}\n >\n <TextSmall color=\"bright\">{children}</TextSmall>\n </Flex>\n)\n\nexport default CustomTooltip\n","import React from \"react\"\nimport CustomTooltip from \"@/src/components/tooltips/customTooltip\"\n\nconst getContent = (content, { isBasic }) => {\n const contentNode = typeof content === \"function\" ? content() : content\n if (typeof content === \"string\" || isBasic) {\n return <CustomTooltip isBasic={isBasic}>{contentNode}</CustomTooltip>\n }\n return contentNode\n}\n\nexport default getContent\n","import React, { useCallback } from \"react\"\nimport { Tooltip as BaseTooltip } from \"@netdata/netdata-ui\"\nimport getContent from \"./getContent\"\n\nconst Tooltip = ({ children, content, isBasic, ...rest }) => {\n const getTooltipContent = useCallback(() => getContent(content, { isBasic }), [content, isBasic])\n return (\n <BaseTooltip plain animation content={getTooltipContent} {...rest}>\n {children}\n </BaseTooltip>\n )\n}\n\nexport default Tooltip\n","import React, { useCallback } from \"react\"\nimport { Flex, Button } from \"@netdata/netdata-ui\"\nimport Tooltip from \"@/src/components/tooltips\"\nimport { setGlobalPauseAction } from \"domains/global/actions\"\nimport { useDispatch } from \"store/redux-separate-context\"\n\nconst Options = () => {\n const dispatch = useDispatch()\n const onClick = useCallback(() => dispatch(setGlobalPauseAction()), [dispatch])\n return (\n <Flex gap={2} data-testid=\"header-options-button\">\n <Tooltip content=\"Import a Netdata snapshot\" align=\"bottom\" plain>\n <Button\n flavour=\"borderless\"\n neutral\n themeType=\"dark\"\n data-toggle=\"modal\"\n data-target=\"#loadSnapshotModal\"\n icon=\"download\"\n />\n </Tooltip>\n <Tooltip content=\"Export a Netdata snapshot\" align=\"bottom\" plain>\n <Button\n onClick={onClick}\n flavour=\"borderless\"\n neutral\n themeType=\"dark\"\n data-toggle=\"modal\"\n data-target=\"#saveSnapshotModal\"\n icon=\"upload\"\n />\n </Tooltip>\n <Tooltip content=\"Print the dashboard\" align=\"bottom\" plain>\n <Button\n flavour=\"borderless\"\n neutral\n themeType=\"dark\"\n data-toggle=\"modal\"\n data-target=\"#printPreflightModal\"\n icon=\"print\"\n />\n </Tooltip>\n </Flex>\n )\n}\n\nexport default Options\n","import React from \"react\"\nimport { Button } from \"@netdata/netdata-ui\"\nimport Tooltip from \"@/src/components/tooltips\"\n\nimport { useHttp } from \"hooks/use-http\"\n\nconst NETDATA_LATEST_VERSION_URL = \"https://api.github.com/repos/netdata/netdata/releases/latest\"\nconst NETDATA_LATEST_GCS_VERSION_URL =\n \"https://www.googleapis.com/storage/v1/b/netdata-nightlies/o/latest-version.txt\"\n\nconst transformGcsVersionResponse = data => data.replace(/(\\r\\n|\\n|\\r| |\\t)/gm, \"\")\n\nconst transformGithubResponse = data => data?.tag_name.replace(/(\\r\\n|\\n|\\r| |\\t)/gm, \"\")\n\nconst versionsMatch = (v1, v2) => {\n if (v1 === v2) {\n return true\n }\n let s1 = v1.split(\".\")\n let s2 = v2.split(\".\")\n // Check major version\n let n1 = parseInt(s1[0].substring(1, 2), 10)\n let n2 = parseInt(s2[0].substring(1, 2), 10)\n if (n1 < n2) return false\n if (n1 > n2) return true\n\n // Check minor version\n n1 = parseInt(s1[1], 10)\n n2 = parseInt(s2[1], 10)\n if (n1 < n2) return false\n if (n1 > n2) return true\n\n // Split patch: format could be e.g. 0-22-nightly\n s1 = s1[2].split(\"-\")\n s2 = s2[2].split(\"-\")\n\n n1 = parseInt(s1[0], 10)\n n2 = parseInt(s2[0], 10)\n if (n1 < n2) return false\n if (n1 > n2) return true\n\n n1 = s1.length > 1 ? parseInt(s1[1], 10) : 0\n n2 = s2.length > 1 ? parseInt(s2[1], 10) : 0\n if (n1 < n2) return false\n return true\n}\n\nconst VersionControl = ({ currentVersion, releaseChannel }) => {\n const isStableReleaseChannel = releaseChannel === \"stable\"\n const [githubVersion] = useHttp(NETDATA_LATEST_VERSION_URL, isStableReleaseChannel, true)\n\n const [gcsVersionResponse] = useHttp(NETDATA_LATEST_GCS_VERSION_URL, !isStableReleaseChannel)\n const [mediaLinkResponse] = useHttp(gcsVersionResponse?.mediaLink, Boolean(gcsVersionResponse))\n\n const latestVersion = isStableReleaseChannel\n ? transformGithubResponse(githubVersion)\n : mediaLinkResponse\n ? transformGcsVersionResponse(mediaLinkResponse)\n : null\n\n if (!latestVersion) {\n return null\n }\n const isNewVersionAvailable = !versionsMatch(currentVersion, latestVersion)\n\n return (\n <Tooltip content={isNewVersionAvailable ? \"Need help?\" : \"Check Version\"} align=\"bottom\" plain>\n <Button\n data-testid=\"header-version-control-button\"\n flavour=\"borderless\"\n themeType=\"dark\"\n small\n neutral={!isNewVersionAvailable}\n warning={isNewVersionAvailable}\n name={isNewVersionAvailable ? \"update_pending\" : \"update\"}\n icon={isNewVersionAvailable ? \"update_pending\" : \"update\"}\n data-toggle=\"modal\"\n data-target=\"#updateModal\"\n />\n </Tooltip>\n )\n}\n\nexport default VersionControl\n","import React from \"react\"\nimport VersionControl from \"components/app-header/components/versionControl\"\nimport { useSelector } from \"@/src/store/redux-separate-context\"\n\nconst versionSelector = state => {\n const { data } = state.global.chartsMetadata\n\n if (!data) return null\n\n const { version, release_channel: releaseChannel } = data\n return {\n version,\n releaseChannel,\n }\n}\n\nconst Version = () => {\n const data = useSelector(versionSelector)\n return (\n data && <VersionControl currentVersion={data.version} releaseChannel={data.releaseChannel} />\n )\n}\n\nexport default Version\n","import { useState, useCallback } from \"react\"\n\n/**\n * @example\n * const [value, toggle, toggleOn, toggleOff] = useToggle(false);\n *\n * @param {Boolean} initialValue\n */\n\nconst useToggle = (initialValue = false) => {\n const [value, setToggle] = useState(!!initialValue)\n const toggle = useCallback(() => setToggle(oldValue => !oldValue), [])\n const toggleOn = useCallback(() => setToggle(true), [])\n const toggleOff = useCallback(() => setToggle(false), [])\n\n return [value, toggle, toggleOn, toggleOff]\n}\n\nexport default useToggle\n","import { useEffect, useState } from \"react\"\n\nconst useLocalStorage = (key, defaultValue) => {\n const [value, setValue] = useState(() => getValueFromStorage(key, defaultValue))\n\n useEffect(() => localStorage.setItem(key, JSON.stringify(value)), [key, value])\n\n return [value, setValue]\n}\n\nconst getValueFromStorage = (key, defaultValue = \"\") =>\n JSON.parse(localStorage.getItem(key)) ?? defaultValue\n\nexport default useLocalStorage\n","import styled from \"styled-components\"\nimport { getColor, getSizeBy, Icon } from \"@netdata/netdata-ui\"\nimport { Menu } from \"@rmwc/menu\"\n\nexport const RootContainer = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n`\n\nexport const StyledMenu = styled(Menu)``\n\nexport const DropdownContainer = styled.div`\n cursor: pointer;\n color: ${getColor(\"bright\")};\n .mdc-menu-surface {\n border-radius: 0;\n .mdc-list {\n padding: 0;\n }\n .mdc-list-item {\n padding: 0 ${getSizeBy(5)} 0 ${getSizeBy(5)};\n font-size: 14px;\n height: ${getSizeBy(6)};\n }\n }\n`\n\nexport const ListContainer = styled.div`\n padding: ${getSizeBy(3)} 0;\n`\n\nexport const OpenerIcon = styled(Icon)`\n flex-shrink: 0;\n flex-grow: 0;\n margin-left: ${({ noMargin }) => (noMargin ? \"unset\" : \"16px\")};\n fill: ${getColor(\"bright\")};\n width: 10px;\n height: 5px;\n`\n","import styled from \"styled-components\"\nimport { getColor, getSizeBy, Icon, Drop } from \"@netdata/netdata-ui\"\nimport { Dropdown } from \"@/src/components/mdx-components/dropdown\"\nimport { dialogsZIndex, customDropdownZIndex } from \"@/src/styles/z-index\"\n\nexport const PickerBox = styled.div`\n display: flex;\n position: relative;\n min-width: ${getSizeBy(102)};\n min-height: ${getSizeBy(43)};\n flex-direction: column;\n align-items: flex-end;\n background-color: ${getColor(\"mainBackground\")};\n color: ${getColor(\"text\")};\n z-index: ${dialogsZIndex};\n border-radius: 8px;\n`\n\nexport const StyledTimePeriod = styled.span`\n margin-top: ${getSizeBy(3)};\n cursor: pointer;\n width: 187px;\n height: ${getSizeBy(2)};\n &:first-of-type {\n margin-top: ${getSizeBy(1)};\n }\n &:last-of-type {\n margin-bottom: ${getSizeBy(1)};\n }\n & > span:hover {\n color: ${getColor(\"textLite\")};\n }\n`\nexport const StyledCustomTimePeriod = styled.span`\n margin: ${getSizeBy(1)} ${getSizeBy(3)} 0;\n color: ${({ isSelected, theme }) => getColor(isSelected ? \"primary\" : \"text\")({ theme })};\n cursor: pointer;\n &:first-of-type {\n margin-top: 0;\n }\n &:hover {\n color: ${getColor(\"textLite\")};\n }\n`\n\nexport const StyledDropdown = styled(Dropdown)`\n width: 88px;\n height: 32px;\n padding-top: 8px;\n padding-bottom: 8px;\n padding-left: 8px;\n padding-right: 7px;\n border: 1px solid ${getColor(\"border\")};\n box-sizing: border-box;\n border-radius: 4px;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ${getColor(\"text\")};\n .mdc-menu-surface--anchor {\n .mdc-menu-surface--open {\n ${customDropdownZIndex}\n margin-top: ${getSizeBy(2)};\n background: ${getColor(\"mainBackground\")};\n border-radius: 4px;\n }\n }\n .mdc-list {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n`\nexport const DropdownIcon = styled(Icon)`\n fill: ${getColor(\"text\")};\n width: 12px;\n height: 12px;\n`\n\nexport const CustomInput = styled.input`\n border: 1px solid ${getColor(\"border\")};\n color: inherit;\n background: ${getColor(\"mainBackground\")};\n box-sizing: border-box;\n border-radius: 4px;\n padding: 4px;\n width: 32px;\n height: 32px;\n margin-left: 10px;\n margin-right: 10px;\n outline: none;\n &:focus {\n border: 1px solid ${getColor(\"primary\")};\n }\n`\nexport const StyledDrop = styled(Drop).attrs({\n background: \"mainBackground\",\n round: 2,\n margin: [4, 0, 0],\n border: { side: \"all\", color: \"elementBackground\" },\n animation: true,\n})`\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n`\nexport const StyledHR = styled.hr`\n border: none;\n margin: 0;\n border-left: 1px solid ${getColor(\"borderSecondary\")};\n height: 284px;\n`\n","import React, { useRef } from \"react\"\nimport { List } from \"@rmwc/list\"\nimport { MenuSurfaceAnchor, MenuSurface } from \"@rmwc/menu\"\nimport { RootContainer, ListContainer, DropdownContainer, OpenerIcon } from \"./styled\"\n\nexport const Dropdown = ({\n title,\n children,\n className,\n renderTitle,\n isOpen = false,\n onMenuToggle,\n anchorCorner = \"bottomStart\",\n renderOpener,\n}) => {\n const ref = useRef()\n\n const handleOpenState = () => {\n onMenuToggle(!isOpen)\n }\n\n const handleClose = () => {\n onMenuToggle(false)\n }\n\n return (\n <DropdownContainer className={className}>\n <MenuSurfaceAnchor>\n <MenuSurface ref={ref} open={isOpen} onClose={handleClose} anchorCorner={anchorCorner}>\n {typeof children === \"function\" ? (\n isOpen && (\n <ListContainer>\n <List>{children({ maxHeight: ref.current?.root.ref.style.maxHeight })}</List>\n </ListContainer>\n )\n ) : (\n <ListContainer>\n <List>{children}</List>\n </ListContainer>\n )}\n </MenuSurface>\n <RootContainer onClick={handleOpenState}>\n {title || (renderTitle && renderTitle())}\n {renderOpener ? (\n renderOpener()\n ) : (\n <OpenerIcon name=\"triangle_down\" noMargin={Boolean(renderTitle)} />\n )}\n </RootContainer>\n </MenuSurfaceAnchor>\n </DropdownContainer>\n )\n}\n","import React, { memo, useCallback } from \"react\"\nimport { Text } from \"@netdata/netdata-ui\"\nimport { StyledTimePeriod } from \"./styled\"\n\nconst TimePeriod = ({ value, period, resolution, isSelected, setTimeRange, tagging }) => {\n const onClick = useCallback(\n () => setTimeRange(value, resolution),\n [value, resolution, setTimeRange]\n )\n return (\n <StyledTimePeriod\n key={value}\n onClick={onClick}\n data-ga={`date-picker::click-quick-selector::${tagging}::${-value}`}\n data-testid=\"timePeriod-value\"\n >\n <Text color={isSelected ? \"primary\" : \"text\"}>{period}</Text>\n </StyledTimePeriod>\n )\n}\n\nexport default memo(TimePeriod)\n","import { format, formatDistanceStrict, parse, getTime, getUnixTime, add, isMatch } from \"date-fns\"\n\nconst MINUTE = 60\nconst HOUR = MINUTE * 60\nconst DAY = HOUR * 24\nconst MONTH = 30 * DAY\n\nexport const maxTimePeriodInUnix = 94694400\nexport const dateResolutions = [\"minutes\", \"hours\", \"days\", \"months\"]\n\nconst resolutionsMapping = {\n minutes: MINUTE,\n hours: HOUR,\n days: DAY,\n months: MONTH,\n}\n\nexport const getCustomTimePeriod = (after, resolution) =>\n Math.round(after / resolutionsMapping[resolution])\n\nexport const parseInputPeriod = (timeCorrection, resolution) => {\n const customRange = add(new Date(0), {\n [resolution]: timeCorrection,\n })\n return -getUnixTime(customRange)\n}\n\nconst focusTaggingMap = {\n startDate: \"start\",\n endDate: \"finish\",\n}\n\nexport const getFocusTagging = focusedInput => focusTaggingMap[focusedInput]\n\nexport const timePeriods = [\n { period: \"Last 5 minutes\", value: -5 * MINUTE, resolution: \"minutes\" },\n { period: \"Last 15 minutes\", value: -15 * MINUTE, resolution: \"minutes\" },\n { period: \"Last 30 minutes\", value: -30 * MINUTE, resolution: \"minutes\" },\n { period: \"Last 2 hours\", value: -2 * HOUR, resolution: \"hours\" },\n { period: \"Last 6 hours\", value: -6 * HOUR, resolution: \"hours\" },\n { period: \"Last 12 hours\", value: -12 * HOUR, resolution: \"hours\" },\n { period: \"Last Day\", value: -DAY, resolution: \"days\" },\n { period: \"Last 2 Days\", value: -2 * DAY, resolution: \"days\" },\n { period: \"Last 7 Days\", value: -7 * DAY, resolution: \"days\" },\n]\n\nexport const formatDates = (startDate, endDate) => {\n const formattedStartDate = format(startDate, \"MMMM d yyyy, H:mm:ss\")\n const formattedEndDate = format(endDate, \"MMMM d yyyy, H:mm:ss\")\n return {\n formattedStartDate,\n formattedEndDate,\n }\n}\n\nexport const formatOffset = offset => {\n if (!offset) return \"+00:00\"\n const splitOffset = offset.toString().split(\".\")\n const mathSign = splitOffset[0] > 0 ? \"+\" : \"-\"\n const absoluteNumber = Math.abs(splitOffset[0]).toString()\n const firstPart = `${mathSign}${absoluteNumber.padStart(2, 0)}`\n return splitOffset.length > 1\n ? `${firstPart}:${String(splitOffset[1] * 0.6).padEnd(2, 0)}`\n : `${firstPart}:00`\n}\n\nexport const getDateWithOffset = (date, utcOffset) => {\n const formattedDate = isMatch(date, \"MMMM d yyyy, H:mm\")\n ? date\n : parse(date, \"MMMM d yyyy, H:mm\", Date.now())\n return parse(`${formattedDate} ${formatOffset(utcOffset)}`, \"MMMM d yyyy, H:mm xxx\", Date.now())\n}\n\nexport const getTimePeriod = (startDate, endDate) =>\n formatDistanceStrict(getTime(startDate), getTime(endDate))\n","import React from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport TimePeriod from \"./timePeriod\"\nimport { timePeriods } from \"./utils\"\n\nconst TimePeriods = ({ handleTimePeriodChange, selectedDate, tagging }) => (\n <Flex\n column\n justifyContent=\"start\"\n alignItems=\"start\"\n height={{ max: \"240px\" }}\n overflow={{ vertical: \"scroll\" }}\n data-testid=\"timePeriods\"\n >\n {timePeriods.map(({ period, value, resolution }) => (\n <TimePeriod\n key={value}\n value={value}\n period={period}\n resolution={resolution}\n setTimeRange={handleTimePeriodChange}\n isSelected={selectedDate === value}\n tagging={tagging}\n />\n ))}\n </Flex>\n)\n\nexport default TimePeriods\n","import React, { useCallback, useEffect, useState } from \"react\"\nimport { isValid, add, getUnixTime } from \"date-fns\"\nimport { Flex, Text } from \"@netdata/netdata-ui\"\nimport {\n getCustomTimePeriod,\n parseInputPeriod,\n dateResolutions,\n maxTimePeriodInUnix,\n} from \"./utils\"\nimport { StyledDropdown, DropdownIcon, CustomInput, StyledCustomTimePeriod } from \"./styled\"\n\nconst CustomTimePeriod = ({ handleTimePeriodChange, value, resolution, tagging }) => {\n const getInputValue = () => (value <= 0 ? getCustomTimePeriod(-value, resolution) : 0)\n const [inputValue, setInputValue] = useState(getInputValue)\n const [isDropdownOpen, toggleDropdown] = useState(false)\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => setInputValue(getInputValue()), [value])\n\n const onChange = useCallback(e => setInputValue(e.target.value), [])\n\n const onBlur = useCallback(\n e => {\n const currentValue = Number(e.currentTarget.value)\n const isValidInput =\n !Number.isNaN(currentValue) && Number.isInteger(currentValue) && currentValue > 0\n const timePeriod = add(new Date(0), {\n [resolution]: currentValue,\n })\n const isValidTimePeriod =\n isValidInput && isValid(timePeriod) && getUnixTime(timePeriod) <= maxTimePeriodInUnix\n if (isValidTimePeriod)\n return handleTimePeriodChange(parseInputPeriod(currentValue, resolution), resolution)\n return value <= 0 ? setInputValue(getCustomTimePeriod(-value, resolution)) : setInputValue(0)\n },\n [resolution, value, handleTimePeriodChange]\n )\n\n const onChangeResolution = useCallback(\n newResolution => {\n return () => {\n handleTimePeriodChange(parseInputPeriod(inputValue, newResolution), newResolution)\n toggleDropdown(false)\n }\n },\n [inputValue, handleTimePeriodChange]\n )\n\n const renderTitle = () => (\n <Flex alignItems=\"center\" flexWrap={false} width=\"100%\">\n <Text padding={[0, 4, 0, 0]}>{resolution}</Text>\n <DropdownIcon name=\"triangle_down\" />\n </Flex>\n )\n return (\n <Flex\n justifyContent=\"start\"\n alignItems=\"center\"\n height={8}\n data-ga={`date-picker::click-last-integer::${tagging}`}\n data-testid=\"customTimePeriod\"\n >\n <Text>Last</Text>\n <CustomInput\n value={inputValue}\n onChange={onChange}\n onBlur={onBlur}\n data-ga={`date-picker::click-last-integer::${tagging}::${inputValue}`}\n data-testid=\"timePeriod-timeInput\"\n />\n <StyledDropdown\n isOpen={isDropdownOpen}\n onMenuToggle={toggleDropdown}\n renderTitle={renderTitle}\n renderOpener={() => null}\n >\n {() =>\n dateResolutions.map(dateResolution => (\n <StyledCustomTimePeriod\n key={dateResolution}\n onClick={onChangeResolution(dateResolution)}\n data-ga={`date-picker::click-last-time-${dateResolution}::${tagging}`}\n data-testid=\"timePeriod-option\"\n >\n {dateResolution}\n </StyledCustomTimePeriod>\n ))\n }\n </StyledDropdown>\n </Flex>\n )\n}\n\nexport default CustomTimePeriod\n","import React from \"react\"\nimport DatePickerLib from \"react-datepicker\"\nimport \"react-datepicker/dist/react-datepicker.css\"\n\nconst DatePicker = ({\n selected,\n selectsStart = false,\n selectsEnd = false,\n startDate,\n endDate,\n onChange,\n minDate,\n maxDate,\n dateFormat = \"MM/dd/yyyy\",\n open = false,\n startOpen = false,\n inline = false,\n selectsRange = false,\n monthsShown = 1,\n showPopperArrow = true,\n calendarContainer = null,\n}) => (\n <DatePickerLib\n selected={selected}\n onChange={onChange}\n selectsStart={selectsStart}\n selectsEnd={selectsEnd}\n startDate={startDate}\n endDate={endDate}\n minDate={minDate}\n maxDate={maxDate}\n dateFormat={dateFormat}\n open={open}\n startOpen={startOpen}\n inline={inline}\n selectsRange={selectsRange}\n monthsShown={monthsShown}\n showPopperArrow={showPopperArrow}\n calendarContainer={calendarContainer}\n />\n)\n\nexport default DatePicker\n","import { getColor, getRgbColor } from \"@netdata/netdata-ui\"\nimport styled from \"styled-components\"\n\nexport const StyledDateInput = styled.input`\n width: 100%;\n text-align: center;\n border: 1px solid ${getColor(\"border\")};\n color: inherit;\n background: ${getColor(\"mainBackground\")};\n box-sizing: border-box;\n border-radius: 4px;\n padding: 4px;\n height: 32px;\n margin-left: 20px;\n margin-right: 20px;\n outline: none;\n &:focus {\n border: 1px solid ${getColor(\"primary\")};\n }\n`\nexport const StyledCalendar = styled.div`\n background: ${getColor(\"mainBackground\")};\n border: 0;\n .react-datepicker {\n &__navigation {\n top: 8px;\n &-icon::before {\n border-color: ${getColor(\"text\")};\n }\n }\n &__header {\n background: ${getColor(\"mainBackground\")};\n border: 0;\n .react-datepicker__current-month {\n color: ${getColor(\"main\")};\n font-weight: normal;\n }\n .react-datepicker__day-name {\n color: ${getColor(\"textLite\")};\n }\n }\n &__day {\n color: ${getColor(\"main\")};\n &:hover {\n background: ${getColor(\"elementBackground\")};\n }\n &--disabled {\n color: ${getColor(\"textLite\")};\n &:hover {\n background: inherit;\n }\n }\n &--keyboard-selected,\n &--keyboard-selected:hover {\n color: ${getColor(\"main\")};\n background: inherit;\n border-radius: inherit;\n }\n &--selected,\n &--selected:hover {\n color: ${getColor(\"bright\")};\n background: ${getColor(\"primary\")};\n border-radius: 8px;\n }\n &--in-selecting-range,\n &--in-range {\n color: ${getColor(\"primary\")};\n background: ${getColor(\"elementBackground\")};\n border-radius: 0;\n }\n &--selecting-range-start,\n &--range-start {\n color: ${getColor(\"bright\")};\n background: ${getColor(\"primary\")};\n border-top-left-radius: 8px;\n border-bottom-left-radius: 8px;\n &:hover {\n color: ${getColor(\"bright\")};\n background: ${getRgbColor([\"green\", \"netdata\"], 0.8)};\n border-radius: 0;\n border-top-left-radius: 8px;\n border-bottom-left-radius: 8px;\n }\n }\n &--selecting-range-end,\n &--range-end {\n color: ${getColor(\"bright\")};\n background: ${getColor(\"primary\")};\n border-top-right-radius: 8px;\n border-bottom-right-radius: 8px;\n &:hover {\n color: ${getColor(\"bright\")};\n background: ${getRgbColor([\"green\", \"netdata\"], 0.8)};\n border-top-right-radius: 8px;\n border-bottom-right-radius: 8px;\n }\n }\n }\n }\n`\n","import React, { useState, useEffect, useCallback } from \"react\"\nimport { format, isValid, getTime } from \"date-fns\"\nimport { getDateWithOffset } from \"./utils\"\nimport { StyledDateInput } from \"../datePicker/styled\"\nimport { useDateTime } from \"@/src/utils/date-time\"\n\nconst DatePickerInput = ({\n name = \"\",\n value = \"\",\n onDatesChange,\n onFocus,\n placeholderText = \"\",\n}) => {\n const { utcOffset } = useDateTime()\n const [inputValue, setInputValue] = useState(\"\")\n const onChange = useCallback(e => {\n const date = e.target.value\n setInputValue(date)\n }, [])\n const setFormattedValue = useCallback(value => {\n if (isValid(value)) {\n const formattedDate = format(value, \"MMMM d yyyy, H:mm\")\n setInputValue(formattedDate)\n }\n }, [])\n const onBlur = useCallback(\n e => {\n const parsedDate = getDateWithOffset(e.target.value, utcOffset)\n const isValidDate = isValid(parsedDate) && getTime(parsedDate) > 0\n if (isValidDate) {\n const timestamp = getTime(parsedDate)\n onDatesChange(timestamp, () => setFormattedValue(value))\n } else setFormattedValue(value)\n },\n [value, utcOffset, onDatesChange, setFormattedValue]\n )\n\n useEffect(() => setFormattedValue(value), [value, setFormattedValue])\n\n return (\n <StyledDateInput\n type=\"text\"\n name={name}\n value={value ? inputValue : placeholderText}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n placeholder={placeholderText}\n data-testid=\"datePicker-input\"\n />\n )\n}\n\nexport default DatePickerInput\n","import { useDateTime } from \"@/src/utils/date-time\"\nimport { useCallback } from \"react\"\n\nconst useLocaleDate = () => {\n const { localeTimeString, localeDateString } = useDateTime()\n return useCallback(\n date => {\n return `${localeDateString(date, { locale: \"en-us\", long: false })} ${localeTimeString(date, {\n secs: false,\n })}`\n },\n [localeTimeString, localeDateString]\n )\n}\n\nexport default useLocaleDate\n","import { useMemo } from \"react\"\nimport { toDate } from \"date-fns\"\nimport useLocaleDate from \"./useLocaleDate\"\n\nexport const convertTimestampToDate = (timestamp, getLocaleDate) => {\n if (timestamp > 0) {\n return toDate(new Date(getLocaleDate(timestamp)))\n } else if (timestamp || timestamp === 0)\n return toDate(new Date(getLocaleDate(new Date().valueOf() + timestamp * 1000)))\n return null\n}\n\nconst useConvertedDates = (startDate, endDate) => {\n const getLocaleDate = useLocaleDate()\n return useMemo(\n () => [\n convertTimestampToDate(startDate, getLocaleDate),\n convertTimestampToDate(endDate, getLocaleDate),\n ],\n [startDate, endDate, getLocaleDate]\n )\n}\n\nexport default useConvertedDates\n","import { Flex } from \"@netdata/netdata-ui\"\nimport React, { useCallback } from \"react\"\nimport { getTime, isBefore, format } from \"date-fns\"\nimport { useDateTime } from \"@/src/utils/date-time\"\nimport DatePicker from \"../datePicker/datePickerLib\"\nimport DatePickerInput from \"./datePickerInput\"\nimport useConvertedDates, { convertTimestampToDate } from \"./useConvertedDate\"\nimport useLocaleDate from \"./useLocaleDate\"\nimport { getDateWithOffset } from \"./utils\"\nimport { StyledCalendar } from \"../datePicker/styled\"\n\nconst DatePickerWrapper = ({\n startDate,\n setStartDate,\n endDate,\n setEndDate,\n onDatesChange,\n onInputFocus,\n}) => {\n const getLocaleDate = useLocaleDate()\n const [convertedStartDate, convertedEndDate] = useConvertedDates(startDate, endDate)\n const { utcOffset } = useDateTime()\n const setValidStartDate = useCallback(\n (startDate, setPreviousValue) =>\n isBefore(convertTimestampToDate(startDate, getLocaleDate), convertedEndDate)\n ? setStartDate(startDate)\n : setPreviousValue(),\n [convertedEndDate, getLocaleDate, setStartDate]\n )\n\n const setValidEndDate = useCallback(\n (endDate, setPreviousValue) =>\n isBefore(convertedStartDate, convertTimestampToDate(endDate, getLocaleDate))\n ? setEndDate(endDate)\n : setPreviousValue(),\n [convertedStartDate, getLocaleDate, setEndDate]\n )\n\n const onChange = useCallback(\n dates => {\n const [startDate, endDate] = dates\n\n const startDateWithOffset = startDate\n ? getDateWithOffset(format(startDate, \"MMMM d yyyy, H:mm\"), utcOffset)\n : startDate\n const endDateWithOffset = endDate\n ? getDateWithOffset(format(endDate, \"MMMM d yyyy, H:mm\"), utcOffset)\n : endDate\n\n const startDateTimestamp = getTime(startDateWithOffset) || null\n const endDateTimestamp = getTime(endDateWithOffset) || null\n\n onDatesChange(startDateTimestamp, endDateTimestamp)\n },\n [utcOffset, onDatesChange]\n )\n\n return (\n <Flex\n column\n justifyContent=\"center\"\n alignItems=\"center\"\n flex={{ grow: 1 }}\n gap={3}\n margin={[0, 0, 0, 7]}\n data-testid=\"datePicker-wrapper\"\n >\n <DatePicker\n selected={convertedStartDate}\n onChange={onChange}\n startDate={convertedStartDate}\n endDate={convertedEndDate}\n maxDate={new Date()}\n minDate={new Date(\"1/1/2018\")}\n inline\n selectsRange\n monthsShown={2}\n dateFormat=\"MMMM d yyyy, H:mm\"\n showPopperArrow={false}\n calendarContainer={StyledCalendar}\n />\n <Flex justifyContent=\"around\" alignItems=\"center\" width=\"100%\">\n <DatePickerInput\n name=\"startDate\"\n value={convertedStartDate}\n onDatesChange={setValidStartDate}\n onFocus={onInputFocus}\n placeholderText=\"Select a start date\"\n />\n <DatePickerInput\n name=\"endDate\"\n value={convertedEndDate}\n onDatesChange={setValidEndDate}\n onFocus={onInputFocus}\n placeholderText=\"Select an end date\"\n />\n </Flex>\n </Flex>\n )\n}\n\nexport default DatePickerWrapper\n","import React, { useMemo } from \"react\"\nimport { Flex, Icon, TextSmall } from \"@netdata/netdata-ui\"\nimport { formatDates, getTimePeriod } from \"./utils\"\nimport useConvertedDates from \"./useConvertedDate\"\n\nconst PeriodIndication = ({ startDate, endDate }) => {\n const [convertedStart, convertedEnd] = useConvertedDates(startDate, endDate)\n\n const { formattedStartDate, formattedEndDate } = useMemo(\n () => formatDates(convertedStart, convertedEnd),\n [convertedStart, convertedEnd]\n )\n const timePeriod = useMemo(\n () => getTimePeriod(convertedStart, convertedEnd),\n [convertedStart, convertedEnd]\n )\n\n return (\n <Flex alignItems=\"center\" justifyContent=\"between\" gap={2}>\n <Flex alignItems=\"center\" justifyContent=\"center\" gap={1.5}>\n <TextSmall strong whiteSpace=\"nowrap\">\n From\n </TextSmall>\n <TextSmall whiteSpace=\"nowrap\" data-testid=\"periodIndication-from\">\n {formattedStartDate}\n </TextSmall>\n </Flex>\n <Icon name=\"arrow_left\" size=\"small\" color=\"textLite\" rotate={2} />\n <Flex alignItems=\"center\" justifyContent=\"center\" gap={1.5}>\n <TextSmall strong whiteSpace=\"nowrap\">\n To\n </TextSmall>\n <TextSmall whiteSpace=\"nowrap\" data-testid=\"periodIndication-to\">\n {formattedEndDate}\n </TextSmall>\n </Flex>\n <Flex alignItems=\"center\" justifyContent=\"center\" gap={2}>\n <TextSmall whiteSpace=\"nowrap\">/</TextSmall>\n <TextSmall color=\"textLite\" whiteSpace=\"nowrap\" data-testid=\"periodIndication-period\">\n {timePeriod}\n </TextSmall>\n </Flex>\n </Flex>\n )\n}\n\nexport default PeriodIndication\n","import moment from \"moment\"\n\nexport const SECONDS = 1000\nexport const MINUTE = SECONDS * 60\nexport const HOUR = MINUTE * 60\nexport const DAY = HOUR * 24\nexport const MONTH = DAY * 30\n\nconst resolutionMap = [\n { value: DAY, unit: \"d\" },\n { value: HOUR, unit: \"h\" },\n { value: MINUTE, unit: \"min\" },\n { value: MINUTE, unit: \"min\" },\n { value: SECONDS, unit: \"s\" },\n]\n\nexport const getStartDate = start =>\n start < 0 ? moment(new Date()).add(start, \"seconds\") : moment(start)\nexport const getEndDate = end => (!end ? moment(new Date()) : moment(end))\nexport const getIsSameDate = (startDate, endDate) => startDate.isSame(endDate, \"day\")\nexport const getDuration = (startDate, endDate) => moment.duration(startDate.diff(endDate))\n\nconst getResolution = (value, resolution) => (value > 1 ? `${Math.floor(value)}${resolution}` : \"\")\n\nexport const getGranularDuration = duration => {\n let seconds = Math.abs(duration)\n const showSeconds = seconds < MINUTE\n return resolutionMap.reduce((acc, { value, unit }) => {\n if (value === SECONDS && !showSeconds) return acc\n acc = acc + getResolution(seconds / value, unit)\n seconds = seconds % value\n return acc\n }, \"\")\n}","import styled from \"styled-components\"\nimport { Flex, getColor } from \"@netdata/netdata-ui\"\n\nconst Container = styled(Flex)`\n cursor: pointer;\n\n &:hover * {\n color: ${getColor(\"textLite\")};\n fill: ${getColor(\"textLite\")};\n }\n`\n\nexport default Container\n","import React from \"react\"\nimport { Flex, TextSmall, Icon } from \"@netdata/netdata-ui\"\nimport { useDateTime } from \"utils/date-time\"\n\nconst DateBox = ({ isPlaying, startDate, endDate, isSameDate }) => {\n const { localeTimeString, localeDateString } = useDateTime()\n return (\n <Flex gap={2}>\n <TextSmall color=\"text\" whiteSpace=\"nowrap\">\n {localeDateString(startDate, { long: false })} •{\" \"}\n <TextSmall color={isPlaying ? \"accent\" : \"textFocus\"} whiteSpace=\"nowrap\">\n {localeTimeString(startDate, { secs: false })}\n </TextSmall>\n </TextSmall>\n <Icon name=\"arrow_left\" color={isPlaying ? \"accent\" : \"textFocus\"} size=\"small\" rotate={2} />\n <TextSmall color=\"text\" whiteSpace=\"nowrap\">\n {!isSameDate && `${localeDateString(endDate, { long: false })} • `}\n <TextSmall color={isPlaying ? \"accent\" : \"textFocus\"} whiteSpace=\"nowrap\">\n {localeTimeString(endDate, { secs: false })}\n </TextSmall>\n </TextSmall>\n </Flex>\n )\n}\n\nexport default DateBox\n","import React from \"react\"\nimport { Flex, TextSmall } from \"@netdata/netdata-ui\"\n\nconst DurationBox = ({ isPlaying, duration }) => {\n return (\n <Flex gap={1}>\n <Flex width=\"24px\" justifyContent=\"center\">\n {isPlaying && (\n <TextSmall color=\"text\" whiteSpace=\"nowrap\">\n • last\n </TextSmall>\n )}\n </Flex>\n <TextSmall color=\"text\" whiteSpace=\"nowrap\">\n {duration}\n </TextSmall>\n </Flex>\n )\n}\n\nexport default DurationBox\n","import React, { useState, useMemo, useEffect, forwardRef } from \"react\"\nimport Tooltip from \"@/src/components/tooltips\"\nimport { useSelector as useDashboardSelector } from \"store/redux-separate-context\"\nimport { selectGlobalPanAndZoom } from \"domains/global/selectors\"\nimport {\n getStartDate,\n getEndDate,\n getIsSameDate,\n getDuration,\n MINUTE,\n getGranularDuration,\n} from \"./utils\"\nimport Container from \"./container\"\nimport DateBox from \"./dateBox\"\nimport DurationBox from \"./durationBox\"\n\nconst PickerAccessorElement = forwardRef(\n (\n { onClick, start = 15 * MINUTE, end, isPlaying, isPickerOpen, setRangeValues, tagging },\n ref\n ) => {\n const [timeframe, setTimeframe] = useState()\n const startDate = getStartDate(start)\n const endDate = getEndDate(end)\n const globalPanAndZoom = useDashboardSelector(selectGlobalPanAndZoom)\n useEffect(() => {\n const after = getDuration(startDate, endDate).as(\"seconds\")\n if (!isPlaying && timeframe !== after) setTimeframe(Math.round(after))\n if (isPlaying && timeframe && !!globalPanAndZoom) {\n setRangeValues({ start: Math.round(timeframe) })\n setTimeframe(null)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [startDate, endDate, timeframe, isPlaying])\n\n const isSameDate = useMemo(() => getIsSameDate(startDate, endDate), [startDate, endDate])\n const duration = useMemo(\n () => getGranularDuration(getDuration(startDate, endDate).as(\"milliseconds\")),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [isPlaying, startDate, endDate]\n )\n\n return (\n <Tooltip\n content={isPickerOpen ? () => {} : \"Select a predefined or a custom timeframe\"}\n align=\"bottom\"\n plain\n >\n <Container\n alignItems=\"center\"\n justifyContent=\"center\"\n gap={1}\n height=\"100%\"\n width={{ min: \"380px\" }}\n onMouseDown={onClick}\n padding={[0, 1]}\n ref={ref}\n data-ga={`date-picker::click-time::${tagging}`}\n data-testid=\"datePicker-accessorElement\"\n >\n <DateBox\n isPlaying={isPlaying}\n endDate={endDate}\n startDate={startDate}\n isSameDate={isSameDate}\n />\n <DurationBox isPlaying={isPlaying} duration={duration} />\n </Container>\n </Tooltip>\n )\n }\n)\n\nexport default PickerAccessorElement\n","import React, { useState, useEffect, useMemo, useRef, useCallback } from \"react\"\nimport { Button, Flex } from \"@netdata/netdata-ui\"\nimport useToggle from \"hooks/useToggle\"\nimport useLocalStorage from \"hooks/useLocalStorage\"\nimport TimePeriods from \"./timePeriods\"\nimport CustomTimePeriod from \"./customTimePeriod\"\nimport DatePickerWrapper from \"./datePickerWrapper\"\nimport { getFocusTagging } from \"./utils\"\nimport PeriodIndication from \"./periodIndication\"\nimport AccessorElement from \"./accessorElement\"\nimport { PickerBox, StyledDrop, StyledHR } from \"./styled\"\n\nexport const reportEvent = (\n eventCategory,\n eventAction,\n eventLabel,\n eventValue,\n event = \"gaCustomEvent\"\n) => {\n if (window.dataLayer) {\n const eventData = { event, eventCategory, eventAction, eventLabel, eventValue }\n window.dataLayer.push(eventData)\n }\n}\n\nconst DatePickerDrop = ({\n onChange,\n values: { start: initialStartDate, end: initialEndDate } = {},\n defaultValue = -60 * 15,\n tagging = \"\",\n isPlaying,\n}) => {\n const [startDate, setStartDate] = useState(initialStartDate)\n const [endDate, setEndDate] = useState(initialStartDate)\n const [resolution, setResolution] = useLocalStorage(\"resolution\", \"minutes\")\n const [focusedInput, setFocusedInput] = useState(\"startDate\")\n const [isOpen, toggle, , close] = useToggle()\n const ref = useRef()\n\n const setDates = useCallback(({ startDate, endDate }) => {\n setStartDate(startDate)\n setEndDate(endDate)\n }, [])\n\n useEffect(() => {\n setDates({\n startDate: initialStartDate,\n endDate: initialEndDate,\n })\n }, [initialStartDate, initialEndDate, setDates])\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const clearChanges = useCallback(() => setDates({ startDate: defaultValue, endDate: 0 }), [])\n\n const onInputFocus = useCallback(e => {\n if (!e.target.name) return\n setFocusedInput(e.target.name)\n }, [])\n\n const togglePicker = useCallback(\n e => {\n e.stopPropagation()\n toggle()\n },\n [toggle]\n )\n\n const applyChanges = () => {\n onChange({\n start: startDate,\n end: endDate,\n })\n close()\n }\n\n const focusTagging = useMemo(() => getFocusTagging(focusedInput), [focusedInput])\n\n const isValidTimePeriod = startDate !== null && endDate !== null && startDate !== endDate\n const isApplyDisabled = startDate === initialStartDate && endDate === initialEndDate\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const consistentDefaultValue = useMemo(() => defaultValue, [])\n const isClearDisabled = startDate === consistentDefaultValue\n\n const handleTimePeriodChange = useCallback(\n (time, resolution) => {\n setResolution(resolution)\n setDates({\n startDate: time,\n endDate: 0,\n })\n },\n [setDates, setResolution]\n )\n const onDatepickerChange = (startDate, endDate) => {\n setDates({ startDate, endDate })\n const date = focusTagging === \"finish\" ? endDate || startDate : startDate || endDate\n reportEvent(\"date-picker\", \"click-date-picker\", tagging, String(date))\n }\n\n const pickerDrop =\n ref.current && isOpen ? (\n <StyledDrop\n target={ref.current}\n canHideTarget={false}\n align={{ top: \"bottom\", left: \"left\" }}\n onEsc={close}\n onClickOutside={close}\n >\n <PickerBox data-testid=\"datePicker\">\n <Flex justifyContent=\"between\" alignItems=\"center\" width=\"100%\" padding={[6, 6, 0, 6]}>\n <Flex column gap={3} margin={[0, 7, 0, 0]}>\n <TimePeriods\n handleTimePeriodChange={handleTimePeriodChange}\n selectedDate={startDate}\n tagging={tagging}\n />\n <CustomTimePeriod\n handleTimePeriodChange={handleTimePeriodChange}\n value={startDate}\n resolution={resolution}\n tagging={tagging}\n />\n </Flex>\n <StyledHR />\n <DatePickerWrapper\n startDate={startDate}\n endDate={endDate}\n setStartDate={setStartDate}\n setEndDate={setEndDate}\n onDatesChange={onDatepickerChange}\n onInputFocus={onInputFocus}\n />\n </Flex>\n <Flex\n alignItems=\"center\"\n justifyContent={isValidTimePeriod ? \"between\" : \"end\"}\n width=\"100%\"\n padding={[5, 6]}\n gap={2}\n >\n {isValidTimePeriod && <PeriodIndication startDate={startDate} endDate={endDate} />}\n <Flex alignItems=\"center\" justifyContent=\"center\" gap={4}>\n <Button\n label=\"Clear\"\n flavour=\"hollow\"\n onClick={clearChanges}\n disabled={isClearDisabled}\n data-ga={`date-picker::click-clear::${tagging}-${focusTagging}`}\n data-testid=\"datePicker-clear\"\n />\n <Button\n label=\"Apply\"\n onClick={applyChanges}\n disabled={!isValidTimePeriod || isApplyDisabled}\n data-ga={`date-picker::click-apply::${tagging}-${focusTagging}`}\n data-testid=\"datePicker-apply\"\n />\n </Flex>\n </Flex>\n </PickerBox>\n </StyledDrop>\n ) : null\n\n return (\n <>\n <AccessorElement\n onClick={togglePicker}\n tagging={tagging}\n isPickerOpen={isOpen}\n isPlaying={isPlaying}\n setRangeValues={onChange}\n start={initialStartDate}\n end={initialEndDate}\n ref={ref}\n />\n {pickerDrop}\n </>\n )\n}\n\nexport default DatePickerDrop\n","import React, { memo, useEffect, useMemo } from \"react\"\nimport {\n useDispatch as useDashboardDispatch,\n useSelector as useDashboardSelector,\n} from \"store/redux-separate-context\"\nimport {\n resetGlobalPanAndZoomAction,\n setGlobalPanAndZoomAction,\n setDefaultAfterAction,\n} from \"domains/global/actions\"\nimport { selectDefaultAfter, selectGlobalPanAndZoom } from \"domains/global/selectors\"\nimport { setHashParams } from \"utils/hash-utils\"\nimport DatePickerDrop from \"./datePickerDrop\"\n\nconst ReduxDatePickerContainer = memo(({ tagging, isPlaying }) => {\n const dashboardDispatch = useDashboardDispatch()\n\n const globalPanAndZoom = useDashboardSelector(selectGlobalPanAndZoom)\n const isGlobalPanAndZoom = Boolean(globalPanAndZoom)\n\n const defaultAfter = useDashboardSelector(selectDefaultAfter)\n const pickedValues = useMemo(\n () =>\n isGlobalPanAndZoom\n ? { start: globalPanAndZoom.after, end: globalPanAndZoom.before }\n : {\n start: defaultAfter,\n end: 0,\n },\n [isGlobalPanAndZoom, globalPanAndZoom, defaultAfter]\n )\n\n function handlePickedValuesChange(params) {\n const { start, end } = params\n if (start < 0) {\n // live mode\n dashboardDispatch(\n // changes the default value, so it becomes inconsistent\n setDefaultAfterAction({\n after: start,\n })\n )\n if (isGlobalPanAndZoom) {\n dashboardDispatch(resetGlobalPanAndZoomAction())\n }\n } else {\n // global-pan-and-zoom mode\n dashboardDispatch(\n setGlobalPanAndZoomAction({\n after: start,\n before: end,\n })\n )\n }\n }\n\n useEffect(() => {\n const { start, end } = pickedValues\n const after = start.toString()\n const before = end.toString()\n if (window.urlOptions.after !== after || window.urlOptions.before !== before) {\n window.urlOptions.netdataPanAndZoomCallback(true, after, before)\n }\n setHashParams({ after, before })\n }, [pickedValues])\n return (\n <DatePickerDrop\n values={pickedValues}\n defaultValue={defaultAfter}\n onChange={handlePickedValuesChange}\n tagging={tagging}\n isPlaying={isPlaying}\n />\n )\n})\n\nexport default ReduxDatePickerContainer\n","import styled from \"styled-components\"\nimport { Flex, getRgbColor } from \"@netdata/netdata-ui\"\n\nconst getBackground = ({ theme, isPlaying }) => {\n const { name } = theme\n\n const background =\n name === \"Dark\"\n ? getRgbColor(isPlaying ? [\"green\", \"netdata\"] : [\"neutral\", \"tuna\"], isPlaying ? 0.3 : 1)\n : getRgbColor(isPlaying ? [\"green\", \"frostee\"] : [\"neutral\", \"blackhaze\"])\n\n return background({ theme })\n}\n\nconst Container = styled(Flex)`\n background: ${getBackground};\n`\n\nexport default Container\n","import styled from \"styled-components\"\nimport { Pill, getColor } from \"@netdata/netdata-ui\"\n\nconst getHoverColor = ({ isPlaying }) =>\n getColor(isPlaying ? [\"green\", \"chateau\"] : [\"neutral\", \"iron\"])\n\nconst StyledPill = styled(Pill).attrs(({ isPlaying }) => ({\n flavour: isPlaying ? \"success\" : \"neutral\",\n}))`\n &:hover {\n background: ${getHoverColor};\n border-color: ${getHoverColor};\n }\n`\n\nexport default StyledPill\n","import React, { useMemo } from \"react\"\nimport { useDispatch } from \"store/redux-separate-context\"\nimport { resetGlobalPauseAction, setGlobalPauseAction } from \"domains/global/actions\"\nimport Tooltip from \"@/src/components/tooltips\"\nimport StyledPill from \"./styledPill\"\n\nconst getIcon = (isPlaying, isForcePlaying) => {\n if (!isPlaying) return \"pauseSolid\"\n return isForcePlaying ? \"forcePlay\" : \"playSolid\"\n}\n\nconst PlayPausePill = ({ isPlaying, isForcePlaying }) => {\n const dispatch = useDispatch()\n\n const onPlay = () => dispatch(resetGlobalPauseAction({ forcePlay: false }))\n const onPause = () => dispatch(setGlobalPauseAction())\n const icon = useMemo(() => getIcon(isPlaying, isForcePlaying), [isPlaying, isForcePlaying])\n\n return (\n <Tooltip content={isPlaying ? \"Click to pause\" : \"Click to play\"} align=\"bottom\" plain>\n <StyledPill icon={icon} onClick={isPlaying ? onPause : onPlay} isPlaying={isPlaying}>\n {isPlaying ? \"Playing\" : \"Paused\"}\n </StyledPill>\n </Tooltip>\n )\n}\n\nexport default PlayPausePill\n","import React, { useCallback, forwardRef } from \"react\"\nimport styled from \"styled-components\"\nimport { getColor, Flex, Icon, Text } from \"@netdata/netdata-ui\"\n\nexport const PanelRowContainer = styled(Flex)`\n cursor: pointer;\n\n &:hover {\n background: ${getColor(\"selected\")};\n }\n\n ${props => props.selected && `background: ${getColor(\"selected\")(props)};`}\n`\n\nconst MenuItem = forwardRef(\n (\n {\n disabled,\n children,\n Wrapper = Text,\n onClick,\n testid,\n icon,\n padding = [2, 3],\n margin = [0],\n round = 0,\n actions,\n selected,\n width = \"100%\",\n },\n ref\n ) => {\n const click = useCallback(() => {\n if (disabled) return\n if (onClick) onClick()\n }, [onClick, disabled])\n\n return (\n <PanelRowContainer\n ref={ref}\n flexWrap={false}\n justifyContent=\"between\"\n alignItems=\"center\"\n padding={padding}\n margin={margin}\n round={round}\n onClick={click}\n data-testid={testid}\n width={width}\n selected={selected}\n disabled={disabled}\n >\n <Flex alignItems=\"center\" gap={3} flex basis=\"\">\n {typeof icon === \"string\" ? (\n <Icon name={icon} disabled={disabled} color=\"text\" height=\"16px\" width=\"16px\" />\n ) : (\n icon\n )}\n <Wrapper opacity={disabled ? \"medium\" : undefined} width=\"150px\">\n {children}\n </Wrapper>\n </Flex>\n {actions}\n </PanelRowContainer>\n )\n }\n)\n\nexport default MenuItem\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { Flex, H4, Collapsible } from \"@netdata/netdata-ui\"\n\nexport const DefaultListHeader = styled(H4).attrs({ padding: [0], margin: [0] })`\n cursor: pointer;\n`\n\nconst SectionHandle = ({ toggleOpen, label, testid, Header = DefaultListHeader }) => (\n <Header data-testid={testid} onClick={toggleOpen}>\n {label}\n </Header>\n)\n\nconst ItemsList = ({ isOpen = false, toggleOpen, label, children, testid, Header }) => (\n <Flex column>\n <SectionHandle Header={Header} toggleOpen={toggleOpen} label={label} testid={testid} />\n <Collapsible open={isOpen}>{children}</Collapsible>\n </Flex>\n)\n\nexport default ItemsList\n","import React from \"react\"\nimport { Flex, TextSmall } from \"@netdata/netdata-ui\"\n\nconst PlayOptionsTooltip = () => (\n <Flex\n padding={[1, 2]}\n margin={[1]}\n background={[\"neutral\", \"black\"]}\n round={1}\n justifyContent=\"center\"\n width={{ max: \"320px\" }}\n >\n <TextSmall color=\"bright\">\n Play to refresh and have live content, pause to see historical, or force play to keep\n refreshing even when the tab loses focus at the expense of some system performance.\n </TextSmall>\n </Flex>\n)\n\nexport default PlayOptionsTooltip\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nexport const Divider = styled(Flex).attrs({\n bacgkround: \"disabled\",\n height: \"1px\",\n margin: [2, 6],\n})``\n","import React, { memo, Fragment } from \"react\"\nimport styled from \"styled-components\"\nimport { useToggle } from \"react-use\"\nimport { Flex, Icon, Drop } from \"@netdata/netdata-ui\"\nimport { MenuItem } from \"@/src/components/menus\"\nimport { useDispatch } from \"store/redux-separate-context\"\nimport { resetGlobalPauseAction, setGlobalPauseAction } from \"domains/global/actions\"\nimport Tooltip from \"@/src/components/tooltips\"\nimport PlayOptionsTooltip from \"./playOptionsTooltip\"\n\nconst MenuButton = styled(Flex).attrs({ padding: [1], role: \"button\" })`\n cursor: pointer;\n`\n\nconst Dropdown = styled(Flex).attrs({\n column: true,\n padding: [2],\n background: \"dropdown\",\n round: 1,\n overflow: { vertical: \"auto\" },\n margin: [2, 0, 0],\n width: 40,\n})`\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n`\n\nconst PlayOptions = ({ target }) => {\n const dispatch = useDispatch()\n const [isOpen, toggle] = useToggle()\n\n const close = () => toggle(false)\n\n const onPlay = () => {\n dispatch(resetGlobalPauseAction({ forcePlay: false }))\n close()\n }\n\n const onPause = () => {\n dispatch(setGlobalPauseAction())\n close()\n }\n\n const onForcePlay = () => {\n dispatch(resetGlobalPauseAction({ forcePlay: true }))\n close()\n }\n\n return (\n <Fragment>\n {!isOpen ? (\n <Tooltip content={<PlayOptionsTooltip />} align=\"bottom\" plain>\n <MenuButton onClick={toggle} width=\"auto\">\n <Icon name=\"chevron_down\" color=\"text\" width=\"12px\" height=\"12px\" />\n </MenuButton>\n </Tooltip>\n ) : (\n <MenuButton onClick={toggle} width=\"auto\">\n <Icon name=\"chevron_down\" color=\"text\" width=\"12px\" height=\"12px\" />\n </MenuButton>\n )}\n {target.current && isOpen && (\n <Drop\n target={target.current}\n align={{ top: \"bottom\", left: \"left\" }}\n onEsc={close}\n onClickOutside={close}\n animation\n >\n <Dropdown>\n <MenuItem round={1} icon=\"playOutline\" onClick={onPlay}>\n Play\n </MenuItem>\n <MenuItem round={1} icon=\"pauseOutline\" onClick={onPause}>\n Pause\n </MenuItem>\n <MenuItem round={1} icon=\"forcePlayOutline\" onClick={onForcePlay}>\n Force Play\n </MenuItem>\n </Dropdown>\n </Drop>\n )}\n </Fragment>\n )\n}\n\nconst MemoizedPlayOptions = memo(PlayOptions)\n\nexport default MemoizedPlayOptions\n","import React, { useMemo, useRef } from \"react\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport {\n selectHasWindowFocus,\n selectStopUpdatesWhenFocusIsLost,\n selectGlobalPanAndZoom,\n selectGlobalPause,\n selectGlobalSelection,\n} from \"domains/global/selectors\"\nimport { ReduxDatePickerContainer } from \"components/date-picker\"\nimport Item from \"../item\"\nimport Container from \"./container\"\nimport PlayPausePill from \"./playPausePill\"\nimport PlayOptions from \"./playOptions\"\n\nconst tagging = \"global-view\"\n\nconst GlobalControls = () => {\n const ref = useRef()\n const hasWindowFocus = useSelector(selectHasWindowFocus)\n const stopUpdatesWhenFocusIsLost = useSelector(selectStopUpdatesWhenFocusIsLost)\n const globalPanAndZoom = useSelector(selectGlobalPanAndZoom)\n const hoveredX = useSelector(selectGlobalSelection)\n const globalPause = useSelector(selectGlobalPause)\n\n const isPlaying = useMemo(\n () =>\n Boolean(\n (hasWindowFocus || !stopUpdatesWhenFocusIsLost) &&\n !globalPanAndZoom &&\n !hoveredX &&\n !globalPause\n ),\n [hasWindowFocus, stopUpdatesWhenFocusIsLost, globalPanAndZoom, hoveredX, globalPause]\n )\n\n return (\n <Item hasBorder>\n <Container\n isPlaying={isPlaying}\n padding={[2, 2]}\n round\n height=\"100%\"\n alignItems=\"center\"\n gap={1}\n ref={ref}\n >\n <PlayPausePill isPlaying={isPlaying} isForcePlaying={!stopUpdatesWhenFocusIsLost} />\n <PlayOptions target={ref} />\n <ReduxDatePickerContainer isPlaying={isPlaying} tagging={tagging} />\n </Container>\n </Item>\n )\n}\n\nexport default GlobalControls\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst hollowColors = {\n warning: \"#FFF8E1\",\n error: \"#FFEBEF\",\n}\n\nconst StyledPill = styled(Flex).attrs(({ round = 999, hollow, background }) => ({\n padding: [0.5, 2],\n round,\n border: hollow ? { side: \"all\", color: background, size: \"1px\" } : false,\n}))`\n background: ${({ background, hollow }) => (hollow ? hollowColors[background] : background)};\n cursor: pointer;\n`\n\nexport default StyledPill\n","import React, { forwardRef } from \"react\"\nimport { TextMicro } from \"@netdata/netdata-ui\"\nimport StyledPill from \"./styled\"\n\nconst Pill = forwardRef(({ children, background, color, hollow, ...rest }, ref) => (\n <StyledPill background={background} hollow={hollow} ref={ref} {...rest}>\n <TextMicro color={hollow ? background : color} strong>\n {children}\n </TextMicro>\n </StyledPill>\n))\n\nexport default Pill\n","import React, { useMemo } from \"react\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectActiveAlarms } from \"domains/global/selectors\"\nimport Item from \"./item\"\nimport Pill from \"./pill\"\nimport Tooltip from \"@/src/components/tooltips\"\n\nconst pillProps = {\n \"data-toggle\": \"modal\",\n \"data-target\": \"#alarmsModal\",\n}\n\nconst Alarms = () => {\n const activeAlarms = useSelector(selectActiveAlarms)\n\n const alarms = useMemo(() => (activeAlarms ? Object.values(activeAlarms.alarms) : []), [\n activeAlarms,\n ])\n\n const { critical, warning } = useMemo(\n () =>\n alarms.reduce(\n (acc, { status }) => {\n if (status === \"CRITICAL\") acc.critical = acc.critical + 1\n if (status === \"WARNING\") acc.warning = acc.warning + 1\n return acc\n },\n { critical: 0, warning: 0 }\n ),\n [alarms]\n )\n\n return (\n <Item icon=\"alarm\">\n <Tooltip\n content={\n critical\n ? `${critical} critical alert${critical.length > 1 ? \"s\" : \"\"}`\n : \"No critical alerts\"\n }\n align=\"bottom\"\n plain\n >\n <Pill background=\"error\" hollow {...pillProps}>\n {critical}\n </Pill>\n </Tooltip>\n <Tooltip\n content={\n warning ? `${warning} warning alert${warning.length > 1 ? \"s\" : \"\"}` : \"No warning alerts\"\n }\n align=\"bottom\"\n plain\n >\n <Pill background=\"warning\" hollow {...pillProps}>\n {warning}\n </Pill>\n </Tooltip>\n </Item>\n )\n}\n\nexport default Alarms\n","import React from \"react\"\nimport { Button, News as AgentNews } from \"@netdata/netdata-ui\"\nimport Tooltip from \"@/src/components/tooltips\"\n\nconst News = () => {\n return (\n <AgentNews app=\"agent\">\n {({ toggle, upToDate }) => (\n <Tooltip content=\"News\" align=\"bottom\" plain>\n <Button\n data-testid=\"header-news-button\"\n themeType=\"dark\"\n name=\"news\"\n icon=\"insights\"\n flavour=\"borderless\"\n neutral={upToDate}\n warning={!upToDate}\n onClick={toggle}\n />\n </Tooltip>\n )}\n </AgentNews>\n )\n}\n\nexport default News\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst Dropdown = styled(Flex).attrs({\n column: true,\n padding: [2],\n background: \"dropdown\",\n round: 1,\n overflow: { vertical: \"auto\" },\n margin: [2, 0, 0],\n width: 80,\n})`\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n`\n\nexport default Dropdown\n","import styled from \"styled-components\"\nimport { TextInput } from \"@netdata/netdata-ui\"\n\nconst SearchInput = styled(TextInput)`\n & input {\n background: transparent;\n }\n\n & > label {\n margin-bottom: 0;\n }\n`\nexport default SearchInput\n","import React, { forwardRef } from \"react\"\nimport SearchInput from \"./searchInput\"\n\nconst Search = forwardRef(({ value, onChange }, ref) => (\n <SearchInput inputRef={ref} value={value} onChange={onChange} placeholder=\"Search\" metaShrinked />\n))\n\nexport default Search\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst Container = styled(Flex).attrs({\n column: true,\n padding: [2, 0, 0],\n overflow: { vertical: \"auto\" },\n height: { max: \"320px\" },\n})``\n\nexport default Container\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst Wrapper = styled(Flex).attrs({\n justifyContent: \"between\",\n alignItems: \"center\",\n width: \"100%\",\n gap: 2,\n})``\n\nexport default Wrapper\n","import React, { useCallback } from \"react\"\nimport { Text } from \"@netdata/netdata-ui\"\nimport { MenuItem } from \"@/src/components/menus\"\nimport Wrapper from \"./wrapper\"\n\nconst OffsetItem = ({ name, offset, utc, onSelect }) => {\n const onClick = useCallback(() => onSelect(utc), [utc, onSelect])\n\n return (\n <MenuItem round={1} onClick={onClick} Wrapper={Wrapper}>\n <Text color=\"text\">{name}</Text>\n <Text color=\"textLite\" whiteSpace=\"nowrap\">\n UTC {offset}\n </Text>\n </MenuItem>\n )\n}\n\nexport default OffsetItem\n","export const timezones = [\n {\n value: \"Dateline Standard Time\",\n abbr: \"DST\",\n text: \"International Date Line West\",\n utc: [\"Etc/GMT+12\"],\n },\n {\n value: \"UTC-11\",\n abbr: \"U\",\n text: \"Coordinated Universal Time-11\",\n utc: [\"Etc/GMT+11\", \"Pacific/Midway\", \"Pacific/Niue\", \"Pacific/Pago_Pago\"],\n },\n {\n value: \"Hawaiian Standard Time\",\n abbr: \"HST\",\n text: \"Hawaii\",\n utc: [\n \"Etc/GMT+10\",\n \"Pacific/Honolulu\",\n \"Pacific/Johnston\",\n \"Pacific/Rarotonga\",\n \"Pacific/Tahiti\",\n ],\n },\n {\n value: \"Alaskan Standard Time\",\n abbr: \"AKDT\",\n text: \"Alaska\",\n utc: [\n \"America/Anchorage\",\n \"America/Juneau\",\n \"America/Nome\",\n \"America/Sitka\",\n \"America/Yakutat\",\n ],\n },\n {\n value: \"Pacific Standard Time (Mexico)\",\n abbr: \"PDT\",\n text: \"Baja California\",\n utc: [\"America/Santa_Isabel\"],\n },\n {\n value: \"Pacific Standard Time\",\n abbr: \"PST\",\n text: \"Pacific Time (US & Canada)\",\n utc: [\n \"America/Dawson\",\n \"America/Los_Angeles\",\n \"America/Tijuana\",\n \"America/Vancouver\",\n \"America/Whitehorse\",\n \"PST8PDT\",\n ],\n },\n {\n value: \"US Mountain Standard Time\",\n abbr: \"UMST\",\n text: \"Arizona\",\n utc: [\n \"America/Creston\",\n \"America/Dawson_Creek\",\n \"America/Hermosillo\",\n \"America/Phoenix\",\n \"Etc/GMT+7\",\n ],\n },\n {\n value: \"Mountain Standard Time (Mexico)\",\n abbr: \"MDT\",\n text: \"Chihuahua, La Paz, Mazatlan\",\n utc: [\"America/Chihuahua\", \"America/Mazatlan\"],\n },\n {\n value: \"Mountain Standard Time\",\n abbr: \"MDT\",\n text: \"Mountain Time (US & Canada)\",\n utc: [\n \"America/Boise\",\n \"America/Cambridge_Bay\",\n \"America/Denver\",\n \"America/Edmonton\",\n \"America/Inuvik\",\n \"America/Ojinaga\",\n \"America/Yellowknife\",\n \"MST7MDT\",\n ],\n },\n {\n value: \"Central America Standard Time\",\n abbr: \"CAST\",\n text: \"Central America\",\n utc: [\n \"America/Belize\",\n \"America/Costa_Rica\",\n \"America/El_Salvador\",\n \"America/Guatemala\",\n \"America/Managua\",\n \"America/Tegucigalpa\",\n \"Etc/GMT+6\",\n \"Pacific/Galapagos\",\n ],\n },\n {\n value: \"Central Standard Time\",\n abbr: \"CDT\",\n text: \"Central Time (US & Canada)\",\n utc: [\n \"America/Chicago\",\n \"America/Indiana/Knox\",\n \"America/Indiana/Tell_City\",\n \"America/Matamoros\",\n \"America/Menominee\",\n \"America/North_Dakota/Beulah\",\n \"America/North_Dakota/Center\",\n \"America/North_Dakota/New_Salem\",\n \"America/Rainy_River\",\n \"America/Rankin_Inlet\",\n \"America/Resolute\",\n \"America/Winnipeg\",\n \"CST6CDT\",\n ],\n },\n {\n value: \"Central Standard Time (Mexico)\",\n abbr: \"CDT\",\n text: \"Guadalajara, Mexico City, Monterrey\",\n utc: [\n \"America/Bahia_Banderas\",\n \"America/Cancun\",\n \"America/Merida\",\n \"America/Mexico_City\",\n \"America/Monterrey\",\n ],\n },\n {\n value: \"Canada Central Standard Time\",\n abbr: \"CCST\",\n text: \"Saskatchewan\",\n utc: [\"America/Regina\", \"America/Swift_Current\"],\n },\n {\n value: \"SA Pacific Standard Time\",\n abbr: \"SPST\",\n text: \"Bogota, Lima, Quito\",\n utc: [\n \"America/Bogota\",\n \"America/Cayman\",\n \"America/Coral_Harbour\",\n \"America/Eirunepe\",\n \"America/Guayaquil\",\n \"America/Jamaica\",\n \"America/Lima\",\n \"America/Panama\",\n \"America/Rio_Branco\",\n \"Etc/GMT+5\",\n ],\n },\n {\n value: \"Eastern Standard Time\",\n abbr: \"EDT\",\n text: \"Eastern Time (US & Canada)\",\n utc: [\n \"America/Detroit\",\n \"America/Havana\",\n \"America/Indiana/Petersburg\",\n \"America/Indiana/Vincennes\",\n \"America/Indiana/Winamac\",\n \"America/Iqaluit\",\n \"America/Kentucky/Monticello\",\n \"America/Louisville\",\n \"America/Montreal\",\n \"America/Nassau\",\n \"America/New_York\",\n \"America/Nipigon\",\n \"America/Pangnirtung\",\n \"America/Port-au-Prince\",\n \"America/Thunder_Bay\",\n \"America/Toronto\",\n \"EST5EDT\",\n ],\n },\n {\n value: \"US Eastern Standard Time\",\n abbr: \"UEDT\",\n text: \"Indiana (East)\",\n utc: [\"America/Indiana/Marengo\", \"America/Indiana/Vevay\", \"America/Indianapolis\"],\n },\n {\n value: \"Venezuela Standard Time\",\n abbr: \"VST\",\n text: \"Caracas\",\n utc: [\"America/Caracas\"],\n },\n {\n value: \"Paraguay Standard Time\",\n abbr: \"PYT\",\n text: \"Asuncion\",\n utc: [\"America/Asuncion\"],\n },\n {\n value: \"Atlantic Standard Time\",\n abbr: \"ADT\",\n text: \"Atlantic Time (Canada)\",\n utc: [\n \"America/Glace_Bay\",\n \"America/Goose_Bay\",\n \"America/Halifax\",\n \"America/Moncton\",\n \"America/Thule\",\n \"Atlantic/Bermuda\",\n ],\n },\n {\n value: \"Central Brazilian Standard Time\",\n abbr: \"CBST\",\n text: \"Cuiaba\",\n utc: [\"America/Campo_Grande\", \"America/Cuiaba\"],\n },\n {\n value: \"SA Western Standard Time\",\n abbr: \"SWST\",\n text: \"Georgetown, La Paz, Manaus, San Juan\",\n utc: [\n \"America/Anguilla\",\n \"America/Antigua\",\n \"America/Aruba\",\n \"America/Barbados\",\n \"America/Blanc-Sablon\",\n \"America/Boa_Vista\",\n \"America/Curacao\",\n \"America/Dominica\",\n \"America/Grand_Turk\",\n \"America/Grenada\",\n \"America/Guadeloupe\",\n \"America/Guyana\",\n \"America/Kralendijk\",\n \"America/La_Paz\",\n \"America/Lower_Princes\",\n \"America/Manaus\",\n \"America/Marigot\",\n \"America/Martinique\",\n \"America/Montserrat\",\n \"America/Port_of_Spain\",\n \"America/Porto_Velho\",\n \"America/Puerto_Rico\",\n \"America/Santo_Domingo\",\n \"America/St_Barthelemy\",\n \"America/St_Kitts\",\n \"America/St_Lucia\",\n \"America/St_Thomas\",\n \"America/St_Vincent\",\n \"America/Tortola\",\n \"Etc/GMT+4\",\n ],\n },\n {\n value: \"Pacific SA Standard Time\",\n abbr: \"PSST\",\n text: \"Santiago\",\n utc: [\"America/Santiago\", \"Antarctica/Palmer\"],\n },\n {\n value: \"Newfoundland Standard Time\",\n abbr: \"NDT\",\n text: \"Newfoundland\",\n utc: [\"America/St_Johns\"],\n },\n {\n value: \"E. South America Standard Time\",\n abbr: \"ESAST\",\n text: \"Brasilia\",\n utc: [\"America/Sao_Paulo\"],\n },\n {\n value: \"Argentina Standard Time\",\n abbr: \"AST\",\n text: \"Buenos Aires\",\n utc: [\n \"America/Argentina/La_Rioja\",\n \"America/Argentina/Rio_Gallegos\",\n \"America/Argentina/Salta\",\n \"America/Argentina/San_Juan\",\n \"America/Argentina/San_Luis\",\n \"America/Argentina/Tucuman\",\n \"America/Argentina/Ushuaia\",\n \"America/Buenos_Aires\",\n \"America/Catamarca\",\n \"America/Cordoba\",\n \"America/Jujuy\",\n \"America/Mendoza\",\n ],\n },\n {\n value: \"SA Eastern Standard Time\",\n abbr: \"SEST\",\n text: \"Cayenne, Fortaleza\",\n utc: [\n \"America/Araguaina\",\n \"America/Belem\",\n \"America/Cayenne\",\n \"America/Fortaleza\",\n \"America/Maceio\",\n \"America/Paramaribo\",\n \"America/Recife\",\n \"America/Santarem\",\n \"Antarctica/Rothera\",\n \"Atlantic/Stanley\",\n \"Etc/GMT+3\",\n ],\n },\n {\n value: \"Greenland Standard Time\",\n abbr: \"GDT\",\n text: \"Greenland\",\n utc: [\"America/Godthab\"],\n },\n {\n value: \"Montevideo Standard Time\",\n abbr: \"MST\",\n text: \"Montevideo\",\n utc: [\"America/Montevideo\"],\n },\n {\n value: \"Bahia Standard Time\",\n abbr: \"BST\",\n text: \"Salvador\",\n utc: [\"America/Bahia\"],\n },\n {\n value: \"UTC-02\",\n abbr: \"U\",\n text: \"Coordinated Universal Time-02\",\n utc: [\"America/Noronha\", \"Atlantic/South_Georgia\", \"Etc/GMT+2\"],\n },\n {\n value: \"Mid-Atlantic Standard Time\",\n abbr: \"MDT\",\n text: \"Mid-Atlantic - Old\",\n utc: [],\n },\n {\n value: \"Azores Standard Time\",\n abbr: \"ADT\",\n text: \"Azores\",\n utc: [\"America/Scoresbysund\", \"Atlantic/Azores\"],\n },\n {\n value: \"Cape Verde Standard Time\",\n abbr: \"CVST\",\n text: \"Cape Verde Is.\",\n utc: [\"Atlantic/Cape_Verde\", \"Etc/GMT+1\"],\n },\n {\n value: \"Morocco Standard Time\",\n abbr: \"MDT\",\n text: \"Casablanca\",\n utc: [\"Africa/Casablanca\", \"Africa/El_Aaiun\"],\n },\n {\n value: \"UTC\",\n abbr: \"UTC\",\n text: \"Coordinated Universal Time\",\n utc: [\"America/Danmarkshavn\", \"Etc/GMT\"],\n },\n {\n value: \"GMT Standard Time\",\n abbr: \"GMT\",\n text: \"Edinburgh, London\",\n utc: [\"Europe/Isle_of_Man\", \"Europe/Guernsey\", \"Europe/Jersey\", \"Europe/London\"],\n },\n {\n value: \"GMT Standard Time\",\n abbr: \"GDT\",\n text: \"Dublin, Lisbon\",\n utc: [\n \"Atlantic/Canary\",\n \"Atlantic/Faeroe\",\n \"Atlantic/Madeira\",\n \"Europe/Dublin\",\n \"Europe/Lisbon\",\n ],\n },\n {\n value: \"Greenwich Standard Time\",\n abbr: \"GST\",\n text: \"Monrovia, Reykjavik\",\n utc: [\n \"Africa/Abidjan\",\n \"Africa/Accra\",\n \"Africa/Bamako\",\n \"Africa/Banjul\",\n \"Africa/Bissau\",\n \"Africa/Conakry\",\n \"Africa/Dakar\",\n \"Africa/Freetown\",\n \"Africa/Lome\",\n \"Africa/Monrovia\",\n \"Africa/Nouakchott\",\n \"Africa/Ouagadougou\",\n \"Africa/Sao_Tome\",\n \"Atlantic/Reykjavik\",\n \"Atlantic/St_Helena\",\n ],\n },\n {\n value: \"W. Europe Standard Time\",\n abbr: \"WEDT\",\n text: \"Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna\",\n utc: [\n \"Arctic/Longyearbyen\",\n \"Europe/Amsterdam\",\n \"Europe/Andorra\",\n \"Europe/Berlin\",\n \"Europe/Busingen\",\n \"Europe/Gibraltar\",\n \"Europe/Luxembourg\",\n \"Europe/Malta\",\n \"Europe/Monaco\",\n \"Europe/Oslo\",\n \"Europe/Rome\",\n \"Europe/San_Marino\",\n \"Europe/Stockholm\",\n \"Europe/Vaduz\",\n \"Europe/Vatican\",\n \"Europe/Vienna\",\n \"Europe/Zurich\",\n ],\n },\n {\n value: \"Central Europe Standard Time\",\n abbr: \"CEDT\",\n text: \"Belgrade, Bratislava, Budapest, Ljubljana, Prague\",\n utc: [\n \"Europe/Belgrade\",\n \"Europe/Bratislava\",\n \"Europe/Budapest\",\n \"Europe/Ljubljana\",\n \"Europe/Podgorica\",\n \"Europe/Prague\",\n \"Europe/Tirane\",\n ],\n },\n {\n value: \"Romance Standard Time\",\n abbr: \"RDT\",\n text: \"Brussels, Copenhagen, Madrid, Paris\",\n utc: [\"Africa/Ceuta\", \"Europe/Brussels\", \"Europe/Copenhagen\", \"Europe/Madrid\", \"Europe/Paris\"],\n },\n {\n value: \"Central European Standard Time\",\n abbr: \"CEDT\",\n text: \"Sarajevo, Skopje, Warsaw, Zagreb\",\n utc: [\"Europe/Sarajevo\", \"Europe/Skopje\", \"Europe/Warsaw\", \"Europe/Zagreb\"],\n },\n {\n value: \"W. Central Africa Standard Time\",\n abbr: \"WCAST\",\n text: \"West Central Africa\",\n utc: [\n \"Africa/Algiers\",\n \"Africa/Bangui\",\n \"Africa/Brazzaville\",\n \"Africa/Douala\",\n \"Africa/Kinshasa\",\n \"Africa/Lagos\",\n \"Africa/Libreville\",\n \"Africa/Luanda\",\n \"Africa/Malabo\",\n \"Africa/Ndjamena\",\n \"Africa/Niamey\",\n \"Africa/Porto-Novo\",\n \"Africa/Tunis\",\n \"Etc/GMT-1\",\n ],\n },\n {\n value: \"Namibia Standard Time\",\n abbr: \"NST\",\n text: \"Windhoek\",\n utc: [\"Africa/Windhoek\"],\n },\n {\n value: \"GTB Standard Time\",\n abbr: \"GDT\",\n text: \"Athens, Bucharest\",\n utc: [\"Asia/Nicosia\", \"Europe/Athens\", \"Europe/Bucharest\", \"Europe/Chisinau\"],\n },\n {\n value: \"Middle East Standard Time\",\n abbr: \"MEDT\",\n text: \"Beirut\",\n utc: [\"Asia/Beirut\"],\n },\n {\n value: \"Egypt Standard Time\",\n abbr: \"EST\",\n text: \"Cairo\",\n utc: [\"Africa/Cairo\"],\n },\n {\n value: \"Syria Standard Time\",\n abbr: \"SDT\",\n text: \"Damascus\",\n utc: [\"Asia/Damascus\"],\n },\n {\n value: \"E. Europe Standard Time\",\n abbr: \"EEDT\",\n text: \"E. Europe\",\n utc: [\n \"Asia/Nicosia\",\n \"Europe/Athens\",\n \"Europe/Bucharest\",\n \"Europe/Chisinau\",\n \"Europe/Helsinki\",\n \"Europe/Kiev\",\n \"Europe/Mariehamn\",\n \"Europe/Nicosia\",\n \"Europe/Riga\",\n \"Europe/Sofia\",\n \"Europe/Tallinn\",\n \"Europe/Uzhgorod\",\n \"Europe/Vilnius\",\n \"Europe/Zaporozhye\",\n ],\n },\n {\n value: \"South Africa Standard Time\",\n abbr: \"SAST\",\n text: \"Harare, Pretoria\",\n utc: [\n \"Africa/Blantyre\",\n \"Africa/Bujumbura\",\n \"Africa/Gaborone\",\n \"Africa/Harare\",\n \"Africa/Johannesburg\",\n \"Africa/Kigali\",\n \"Africa/Lubumbashi\",\n \"Africa/Lusaka\",\n \"Africa/Maputo\",\n \"Africa/Maseru\",\n \"Africa/Mbabane\",\n \"Etc/GMT-2\",\n ],\n },\n {\n value: \"FLE Standard Time\",\n abbr: \"FDT\",\n text: \"Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius\",\n utc: [\n \"Europe/Helsinki\",\n \"Europe/Kiev\",\n \"Europe/Mariehamn\",\n \"Europe/Riga\",\n \"Europe/Sofia\",\n \"Europe/Tallinn\",\n \"Europe/Uzhgorod\",\n \"Europe/Vilnius\",\n \"Europe/Zaporozhye\",\n ],\n },\n {\n value: \"Turkey Standard Time\",\n abbr: \"TDT\",\n text: \"Istanbul\",\n utc: [\"Europe/Istanbul\"],\n },\n {\n value: \"Israel Standard Time\",\n abbr: \"JDT\",\n text: \"Jerusalem\",\n utc: [\"Asia/Jerusalem\"],\n },\n {\n value: \"Libya Standard Time\",\n abbr: \"LST\",\n text: \"Tripoli\",\n utc: [\"Africa/Tripoli\"],\n },\n {\n value: \"Jordan Standard Time\",\n abbr: \"JST\",\n text: \"Amman\",\n utc: [\"Asia/Amman\"],\n },\n {\n value: \"Arabic Standard Time\",\n abbr: \"AST\",\n text: \"Baghdad\",\n utc: [\"Asia/Baghdad\"],\n },\n {\n value: \"Kaliningrad Standard Time\",\n abbr: \"KST\",\n text: \"Kaliningrad\",\n utc: [\"Europe/Kaliningrad\"],\n },\n {\n value: \"Arab Standard Time\",\n abbr: \"AST\",\n text: \"Kuwait, Riyadh\",\n utc: [\"Asia/Aden\", \"Asia/Bahrain\", \"Asia/Kuwait\", \"Asia/Qatar\", \"Asia/Riyadh\"],\n },\n {\n value: \"E. Africa Standard Time\",\n abbr: \"EAST\",\n text: \"Nairobi\",\n utc: [\n \"Africa/Addis_Ababa\",\n \"Africa/Asmera\",\n \"Africa/Dar_es_Salaam\",\n \"Africa/Djibouti\",\n \"Africa/Juba\",\n \"Africa/Kampala\",\n \"Africa/Khartoum\",\n \"Africa/Mogadishu\",\n \"Africa/Nairobi\",\n \"Antarctica/Syowa\",\n \"Etc/GMT-3\",\n \"Indian/Antananarivo\",\n \"Indian/Comoro\",\n \"Indian/Mayotte\",\n ],\n },\n {\n value: \"Moscow Standard Time\",\n abbr: \"MSK\",\n text: \"Moscow, St. Petersburg, Volgograd, Minsk\",\n utc: [\"Europe/Kirov\", \"Europe/Moscow\", \"Europe/Simferopol\", \"Europe/Volgograd\", \"Europe/Minsk\"],\n },\n {\n value: \"Samara Time\",\n abbr: \"SAMT\",\n text: \"Samara, Ulyanovsk, Saratov\",\n utc: [\"Europe/Astrakhan\", \"Europe/Samara\", \"Europe/Ulyanovsk\"],\n },\n {\n value: \"Iran Standard Time\",\n abbr: \"IDT\",\n text: \"Tehran\",\n utc: [\"Asia/Tehran\"],\n },\n {\n value: \"Arabian Standard Time\",\n abbr: \"AST\",\n text: \"Abu Dhabi, Muscat\",\n utc: [\"Asia/Dubai\", \"Asia/Muscat\", \"Etc/GMT-4\"],\n },\n {\n value: \"Azerbaijan Standard Time\",\n abbr: \"ADT\",\n text: \"Baku\",\n utc: [\"Asia/Baku\"],\n },\n {\n value: \"Mauritius Standard Time\",\n abbr: \"MST\",\n text: \"Port Louis\",\n utc: [\"Indian/Mahe\", \"Indian/Mauritius\", \"Indian/Reunion\"],\n },\n {\n value: \"Georgian Standard Time\",\n abbr: \"GET\",\n text: \"Tbilisi\",\n utc: [\"Asia/Tbilisi\"],\n },\n {\n value: \"Caucasus Standard Time\",\n abbr: \"CST\",\n text: \"Yerevan\",\n utc: [\"Asia/Yerevan\"],\n },\n {\n value: \"Afghanistan Standard Time\",\n abbr: \"AST\",\n text: \"Kabul\",\n utc: [\"Asia/Kabul\"],\n },\n {\n value: \"West Asia Standard Time\",\n abbr: \"WAST\",\n text: \"Ashgabat, Tashkent\",\n utc: [\n \"Antarctica/Mawson\",\n \"Asia/Aqtau\",\n \"Asia/Aqtobe\",\n \"Asia/Ashgabat\",\n \"Asia/Dushanbe\",\n \"Asia/Oral\",\n \"Asia/Samarkand\",\n \"Asia/Tashkent\",\n \"Etc/GMT-5\",\n \"Indian/Kerguelen\",\n \"Indian/Maldives\",\n ],\n },\n {\n value: \"Yekaterinburg Time\",\n abbr: \"YEKT\",\n text: \"Yekaterinburg\",\n utc: [\"Asia/Yekaterinburg\"],\n },\n {\n value: \"Pakistan Standard Time\",\n abbr: \"PKT\",\n text: \"Islamabad, Karachi\",\n utc: [\"Asia/Karachi\"],\n },\n {\n value: \"India Standard Time\",\n abbr: \"IST\",\n text: \"Chennai, Kolkata, Mumbai, New Delhi\",\n utc: [\"Asia/Kolkata\"],\n },\n {\n value: \"Sri Lanka Standard Time\",\n abbr: \"SLST\",\n text: \"Sri Jayawardenepura\",\n utc: [\"Asia/Colombo\"],\n },\n {\n value: \"Nepal Standard Time\",\n abbr: \"NST\",\n text: \"Kathmandu\",\n utc: [\"Asia/Kathmandu\"],\n },\n {\n value: \"Central Asia Standard Time\",\n abbr: \"CAST\",\n text: \"Nur-Sultan (Astana)\",\n utc: [\n \"Antarctica/Vostok\",\n \"Asia/Almaty\",\n \"Asia/Bishkek\",\n \"Asia/Qyzylorda\",\n \"Asia/Urumqi\",\n \"Etc/GMT-6\",\n \"Indian/Chagos\",\n ],\n },\n {\n value: \"Bangladesh Standard Time\",\n abbr: \"BST\",\n text: \"Dhaka\",\n utc: [\"Asia/Dhaka\", \"Asia/Thimphu\"],\n },\n {\n value: \"Myanmar Standard Time\",\n abbr: \"MST\",\n text: \"Yangon (Rangoon)\",\n utc: [\"Asia/Rangoon\", \"Indian/Cocos\"],\n },\n {\n value: \"SE Asia Standard Time\",\n abbr: \"SAST\",\n text: \"Bangkok, Hanoi, Jakarta\",\n utc: [\n \"Antarctica/Davis\",\n \"Asia/Bangkok\",\n \"Asia/Hovd\",\n \"Asia/Jakarta\",\n \"Asia/Phnom_Penh\",\n \"Asia/Pontianak\",\n \"Asia/Saigon\",\n \"Asia/Vientiane\",\n \"Etc/GMT-7\",\n \"Indian/Christmas\",\n ],\n },\n {\n value: \"N. Central Asia Standard Time\",\n abbr: \"NCAST\",\n text: \"Novosibirsk\",\n utc: [\"Asia/Novokuznetsk\", \"Asia/Novosibirsk\", \"Asia/Omsk\"],\n },\n {\n value: \"China Standard Time\",\n abbr: \"CST\",\n text: \"Beijing, Chongqing, Hong Kong, Urumqi\",\n utc: [\"Asia/Hong_Kong\", \"Asia/Macau\", \"Asia/Shanghai\"],\n },\n {\n value: \"North Asia Standard Time\",\n abbr: \"NAST\",\n text: \"Krasnoyarsk\",\n utc: [\"Asia/Krasnoyarsk\"],\n },\n {\n value: \"Singapore Standard Time\",\n abbr: \"MPST\",\n text: \"Kuala Lumpur, Singapore\",\n utc: [\n \"Asia/Brunei\",\n \"Asia/Kuala_Lumpur\",\n \"Asia/Kuching\",\n \"Asia/Makassar\",\n \"Asia/Manila\",\n \"Asia/Singapore\",\n \"Etc/GMT-8\",\n ],\n },\n {\n value: \"W. Australia Standard Time\",\n abbr: \"WAST\",\n text: \"Perth\",\n utc: [\"Antarctica/Casey\", \"Australia/Perth\"],\n },\n {\n value: \"Taipei Standard Time\",\n abbr: \"TST\",\n text: \"Taipei\",\n utc: [\"Asia/Taipei\"],\n },\n {\n value: \"Ulaanbaatar Standard Time\",\n abbr: \"UST\",\n text: \"Ulaanbaatar\",\n utc: [\"Asia/Choibalsan\", \"Asia/Ulaanbaatar\"],\n },\n {\n value: \"North Asia East Standard Time\",\n abbr: \"NAEST\",\n text: \"Irkutsk\",\n utc: [\"Asia/Irkutsk\"],\n },\n {\n value: \"Japan Standard Time\",\n abbr: \"JST\",\n text: \"Osaka, Sapporo, Tokyo\",\n utc: [\"Asia/Dili\", \"Asia/Jayapura\", \"Asia/Tokyo\", \"Etc/GMT-9\", \"Pacific/Palau\"],\n },\n {\n value: \"Korea Standard Time\",\n abbr: \"KST\",\n text: \"Seoul\",\n utc: [\"Asia/Pyongyang\", \"Asia/Seoul\"],\n },\n {\n value: \"Cen. Australia Standard Time\",\n abbr: \"CAST\",\n text: \"Adelaide\",\n utc: [\"Australia/Adelaide\", \"Australia/Broken_Hill\"],\n },\n {\n value: \"AUS Central Standard Time\",\n abbr: \"ACST\",\n text: \"Darwin\",\n utc: [\"Australia/Darwin\"],\n },\n {\n value: \"E. Australia Standard Time\",\n abbr: \"EAST\",\n text: \"Brisbane\",\n utc: [\"Australia/Brisbane\", \"Australia/Lindeman\"],\n },\n {\n value: \"AUS Eastern Standard Time\",\n abbr: \"AEST\",\n text: \"Canberra, Melbourne, Sydney\",\n utc: [\"Australia/Melbourne\", \"Australia/Sydney\"],\n },\n {\n value: \"West Pacific Standard Time\",\n abbr: \"WPST\",\n text: \"Guam, Port Moresby\",\n utc: [\n \"Antarctica/DumontDUrville\",\n \"Etc/GMT-10\",\n \"Pacific/Guam\",\n \"Pacific/Port_Moresby\",\n \"Pacific/Saipan\",\n \"Pacific/Truk\",\n ],\n },\n {\n value: \"Tasmania Standard Time\",\n abbr: \"TST\",\n text: \"Hobart\",\n utc: [\"Australia/Currie\", \"Australia/Hobart\"],\n },\n {\n value: \"Yakutsk Standard Time\",\n abbr: \"YST\",\n text: \"Yakutsk\",\n utc: [\"Asia/Chita\", \"Asia/Khandyga\", \"Asia/Yakutsk\"],\n },\n {\n value: \"Central Pacific Standard Time\",\n abbr: \"CPST\",\n text: \"Solomon Is., New Caledonia\",\n utc: [\n \"Antarctica/Macquarie\",\n \"Etc/GMT-11\",\n \"Pacific/Efate\",\n \"Pacific/Guadalcanal\",\n \"Pacific/Kosrae\",\n \"Pacific/Noumea\",\n \"Pacific/Ponape\",\n ],\n },\n {\n value: \"Vladivostok Standard Time\",\n abbr: \"VST\",\n text: \"Vladivostok\",\n utc: [\"Asia/Sakhalin\", \"Asia/Ust-Nera\", \"Asia/Vladivostok\"],\n },\n {\n value: \"New Zealand Standard Time\",\n abbr: \"NZST\",\n text: \"Auckland, Wellington\",\n utc: [\"Antarctica/McMurdo\", \"Pacific/Auckland\"],\n },\n {\n value: \"UTC+12\",\n abbr: \"U\",\n text: \"Coordinated Universal Time+12\",\n utc: [\n \"Etc/GMT-12\",\n \"Pacific/Funafuti\",\n \"Pacific/Kwajalein\",\n \"Pacific/Majuro\",\n \"Pacific/Nauru\",\n \"Pacific/Tarawa\",\n \"Pacific/Wake\",\n \"Pacific/Wallis\",\n ],\n },\n {\n value: \"Fiji Standard Time\",\n abbr: \"FST\",\n text: \"Fiji\",\n utc: [\"Pacific/Fiji\"],\n },\n {\n value: \"Magadan Standard Time\",\n abbr: \"MST\",\n text: \"Magadan\",\n utc: [\"Asia/Anadyr\", \"Asia/Kamchatka\", \"Asia/Magadan\", \"Asia/Srednekolymsk\"],\n },\n {\n value: \"Kamchatka Standard Time\",\n abbr: \"KDT\",\n text: \"Petropavlovsk-Kamchatsky - Old\",\n utc: [\"Asia/Kamchatka\"],\n },\n {\n value: \"Tonga Standard Time\",\n abbr: \"TST\",\n text: \"Nuku'alofa\",\n utc: [\"Etc/GMT-13\", \"Pacific/Enderbury\", \"Pacific/Fakaofo\", \"Pacific/Tongatapu\"],\n },\n {\n value: \"Samoa Standard Time\",\n abbr: \"SST\",\n text: \"Samoa\",\n utc: [\"Pacific/Apia\"],\n },\n]\n","import { timezones } from \"./timezones\"\n\nconst digitizeOffset = parsedOffset => {\n if (!parsedOffset) return \"+0\"\n const splitOffset = parsedOffset.split(\":\")\n return splitOffset.length > 1\n ? `${splitOffset[0]}${(splitOffset[1] / 60).toString().substr(1)}`\n : splitOffset[0]\n}\n\nconst normalizeOffset = parsedOffset => (parsedOffset ? parsedOffset.replace(\"−\", \"-\") : \"\")\n\nconst now = new Date()\nexport const timezoneList = () => {\n const memoized = {}\n return timezones.reduce((acc, timezone) => {\n const { utc } = timezone\n\n try {\n // We use 'fr' locale because it is the only one that returns back the UTC offset (dd/mm/yyyy, UTC-x) \n // so we can parse it later and digitize it.\n const dateString = new Intl.DateTimeFormat(\"fr\", {\n timeZone: utc[0],\n timeZoneName: \"short\",\n }).format(now)\n\n const [parsedOffset] = dateString.match(/[−+].+/) || []\n const normalizedOffset = normalizeOffset(parsedOffset)\n\n if (memoized[normalizedOffset])\n return acc.concat({ ...timezone, offset: memoized[normalizedOffset] })\n\n const digitizedOffset = digitizeOffset(normalizedOffset)\n\n memoized[normalizedOffset] = digitizedOffset\n return acc.concat({ ...timezone, offset: digitizedOffset })\n } catch (e) {\n return acc\n }\n }, [])\n}\n\nexport const timezonesById = timezones =>\n timezones.reduce((acc, { utc, ...timezone }) => {\n utc.forEach(item => (acc[item] = { ...timezone, utc: item }))\n return acc\n }, {})\n\nexport const getDefaultTimezone = () => {\n const dateFormat = new Intl.DateTimeFormat(\"default\", {})\n const usedOptions = dateFormat.resolvedOptions()\n return usedOptions\n}\n","import React, { useRef, useState, useEffect, useMemo, useCallback } from \"react\"\nimport { useToggle } from \"react-use\"\nimport { Drop, Flex, Text, Icon } from \"@netdata/netdata-ui\"\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { setOptionAction } from \"@/src/domains/global/actions\"\nimport { selectTimezoneSetting } from \"domains/global/selectors\"\nimport { MenuItem } from \"@/src/components/menus\"\nimport Item from \"../item\"\nimport Dropdown from \"./dropdown\"\nimport Search from \"./search\"\nimport Container from \"./container\"\nimport Wrapper from \"./wrapper\"\nimport OffsetItem from \"./offsetItem\"\nimport { getDefaultTimezone, timezoneList, timezonesById } from \"./utils\"\nimport { getHashParams } from \"utils/hash-utils\"\n\nconst timezones = timezoneList().sort((a, b) => a.offset - b.offset)\nconst byId = timezonesById(timezones)\n\nconst getTimezone = (selectedTimezone, timezoneHash) => {\n const timezone = timezoneHash\n ? timezoneHash\n : selectedTimezone === \"default\"\n ? getDefaultTimezone().timeZone\n : selectedTimezone\n\n return byId[timezone in byId ? timezone : getDefaultTimezone().timeZone] || {}\n}\n\nconst Timezone = () => {\n const [value, setValue] = useState(\"\")\n const [isOpen, toggle] = useToggle()\n\n const ref = useRef()\n const inputRef = useRef()\n\n const { updateUtcParam } = window.urlOptions\n\n useEffect(() => {\n if (!inputRef.current || !isOpen) return\n inputRef.current.focus()\n }, [isOpen])\n\n const dispatch = useDispatch()\n const selectedTimezone = useSelector(selectTimezoneSetting)\n\n const selectedOffset = useMemo(() => {\n const { utc: timezoneHash = \"\" } = getHashParams()\n const { offset = \"\", utc = \"\" } = getTimezone(selectedTimezone, timezoneHash)\n\n if (timezoneHash !== utc) updateUtcParam(utc)\n if (selectedTimezone !== utc) dispatch(setOptionAction({ key: \"timezone\", value: utc }))\n\n dispatch(setOptionAction({ key: \"utcOffset\", value: parseFloat(offset) }))\n\n return offset\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedTimezone])\n\n const zones = useMemo(() => {\n if (!value) return timezones\n return timezones.filter(\n ({ text, offset }) =>\n text.toUpperCase().includes(value.toUpperCase()) || offset.includes(value)\n )\n }, [value])\n\n const close = () => {\n toggle(false)\n setValue(\"\")\n }\n\n const onSelect = useCallback(utc => {\n updateUtcParam(utc)\n dispatch(setOptionAction({ key: \"timezone\", value: utc }))\n close()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n const onChange = useCallback(e => setValue(e.target.value), [])\n\n return (\n <Item hasBorder>\n <MenuItem round={1} onClick={toggle} ref={ref} Wrapper={Wrapper}>\n <Flex gap={1}>\n <Text color=\"textLite\" whiteSpace=\"nowrap\">\n UTC {selectedOffset}\n </Text>\n </Flex>\n <Icon name=\"chevron_down\" color=\"text\" width=\"12px\" height=\"12px\" />\n </MenuItem>\n {ref.current && isOpen && (\n <Drop\n target={ref.current}\n align={{ top: \"bottom\", left: \"left\" }}\n onEsc={close}\n onClickOutside={close}\n animation\n >\n <Dropdown>\n <Search value={value} onChange={onChange} ref={inputRef} />\n <Container>\n {zones.map(({ text, offset, utc }) => (\n <OffsetItem\n key={text}\n name={text}\n offset={offset}\n utc={utc[0]}\n onSelect={onSelect}\n />\n ))}\n </Container>\n </Dropdown>\n </Drop>\n )}\n </Item>\n )\n}\n\nexport default Timezone\n","import React, { useCallback, useEffect, useState, useRef } from \"react\"\nimport styled from \"styled-components\"\nimport { useSelector, useDispatch } from \"store/redux-separate-context\"\nimport { useLocalStorage } from \"react-use\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport { sendToChildIframe, useListenToPostMessage } from \"utils/post-message\"\nimport { getIframeSrc, NETDATA_REGISTRY_SERVER } from \"utils/utils\"\nimport useUserNodeAccessMessage from \"hooks/use-user-node-access\"\nimport { selectRegistry, selectCloudBaseUrl } from \"domains/global/selectors\"\nimport { LOCAL_STORAGE_NEEDS_SYNC } from \"domains/dashboard/sagas\"\nimport { setOfflineAction } from \"@/src/domains/dashboard/actions\"\nimport { SIGN_IN_IFRAME_ID } from \"components/header/constants\"\n\nconst IframeContainer = styled(Flex).attrs({ position: \"absolute\" })`\n display: none;\n`\nconst Iframe = ({ signedIn }) => {\n const [rendered, setRendered] = useState(false)\n const signInMsg = useRef()\n const ref = useRef()\n\n const [lsValue, , removeLsValue] = useLocalStorage(LOCAL_STORAGE_NEEDS_SYNC)\n const cloudBaseURL = useSelector(selectCloudBaseUrl)\n const registry = useSelector(selectRegistry)\n\n const dispatch = useDispatch()\n\n const { origin, pathname } = window.location\n const nameParam = encodeURIComponent(registry.hostname)\n const originParam = encodeURIComponent(origin + pathname)\n\n const signInIframeUrl = getIframeSrc(\n cloudBaseURL,\n `sign-in?id=${registry.machineGuid}&name=${nameParam}&origin=${originParam}`\n )\n\n useListenToPostMessage(\"hello-from-sign-in\", msg => {\n signInMsg.current = msg\n })\n\n useUserNodeAccessMessage()\n\n const onLoad = useCallback(() => {\n setRendered(true)\n setTimeout(() => dispatch(setOfflineAction({ offline: signInMsg.current === undefined })), 500)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n useEffect(() => {\n const handler = e => {\n if (!e?.target) return\n if (e.target.src === signInIframeUrl && !rendered) onLoad()\n }\n\n window.addEventListener(\"DOMFrameContentLoaded\", handler)\n return () => window.removeEventListener(\"DOMFrameContentLoaded\", handler)\n }, [signInIframeUrl, rendered, onLoad])\n\n useEffect(() => {\n if (!signedIn || !ref.current) return\n if (!registry.registryServer || registry.registryServer === NETDATA_REGISTRY_SERVER) return\n if (!lsValue) return\n\n removeLsValue()\n\n const { registryMachinesArray } = registry\n if (registryMachinesArray && registryMachinesArray.length > 0) {\n sendToChildIframe(ref.current, {\n type: \"synced-private-registry\",\n payload: registryMachinesArray,\n })\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [signedIn, registry, lsValue])\n\n return (\n <IframeContainer as=\"iframe\" id={SIGN_IN_IFRAME_ID} src={signInIframeUrl} onLoad={onLoad} />\n )\n}\n\nexport default Iframe\n","import { useCallback, useState } from \"react\"\nimport { useLocalStorage } from \"react-use\"\nimport { useDispatch } from \"react-redux\"\nimport { useListenToPostMessage } from \"@/src/utils/post-message\"\nimport { isSignedInAction } from \"@/src/domains/dashboard/actions\"\n\nconst useCheckSignInStatus = () => {\n const dispatch = useDispatch()\n const [value, setValue] = useLocalStorage(\"has-sign-in-history\")\n const [hasSignedInBefore, setHasSignedInBefore] = useState(value)\n\n const onMessage = useCallback(isNew => {\n if (isNew) {\n setHasSignedInBefore(isNew)\n setValue(isNew)\n }\n dispatch(isSignedInAction({ isSignedIn: isNew }))\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n const [signedIn] = useListenToPostMessage(\"is-signed-in\", onMessage)\n\n return [signedIn, hasSignedInBefore]\n}\n\nexport default useCheckSignInStatus\n","import React from \"react\"\nimport { useSelector } from \"react-redux\"\nimport { Button } from \"@netdata/netdata-ui\"\nimport SignInButton from \"components/auth/signIn\"\nimport SignInIframe from \"components/auth/signIn/iframe\"\nimport useCheckSignInStatus from \"components/auth/signIn/useCheckSignInStatus\"\nimport { selectIsCloudEnabled } from \"domains/global/selectors\"\nimport Tooltip from \"@/src/components/tooltips\"\n\nconst SignIn = () => {\n const [signedIn] = useCheckSignInStatus()\n const cloudEnabled = useSelector(selectIsCloudEnabled)\n\n return (\n cloudEnabled && (\n <Tooltip\n content=\"Sign in to Netdata to monitor all your nodes at once, have composite charts, custom dashboards, use intelligent features and more\"\n align=\"bottom\"\n plain\n >\n <div>\n <SignInIframe signedIn={signedIn} />\n {!signedIn && (\n <SignInButton utmParameters={{ content: \"topbar\" }}>\n {({ isRegistry, link, offline, onSignIn }) => (\n <Button\n data-testid=\"header-signin\"\n label=\"Sign in\"\n disabled={offline}\n {...(isRegistry ? { as: \"a\", href: link } : { onClick: onSignIn })}\n />\n )}\n </SignInButton>\n )}\n </div>\n </Tooltip>\n )\n )\n}\n\nexport default SignIn\n","import { Text, NavigationTab, Icon } from \"@netdata/netdata-ui\"\nimport React from \"react\"\n\nconst CloudTab = ({ label, active, showBorderLeft, icon, onActivate }) => {\n const handleOnActivate = () => {\n if (active) return\n if (onActivate) onActivate()\n }\n return (\n <NavigationTab\n onActivate={handleOnActivate}\n icon={<Icon name={icon} size=\"small\" />}\n fixed\n closable={false}\n showBorderLeft={showBorderLeft}\n active={active}\n >\n <Text>{label}</Text>\n </NavigationTab>\n )\n}\n\nexport default CloudTab\n","import React from \"react\"\nimport {\n Flex,\n Button,\n Box,\n Text,\n H3,\n H4,\n Modal,\n ModalContent,\n ModalBody,\n ModalHeader,\n ModalCloseButton,\n ModalFooter,\n Icon,\n} from \"@netdata/netdata-ui\"\n\nimport GoToCloud from \"components/auth/signIn\"\n\nexport const TITLE = \"Discover the free benefits of Netdata Cloud\"\n\nconst DiscoverCloudModal = ({ closeModal, text, header, handleGoToCloud, image, video }) => {\n return (\n <Modal borderShadow backdrop={false}>\n <ModalContent background=\"modalBackground\">\n <ModalHeader>\n <Flex gap={2}>\n <Icon color=\"white\" name=\"netdata\" />\n <H3 margin={[0]}>{TITLE}:</H3>\n </Flex>\n\n <ModalCloseButton onClose={closeModal} />\n </ModalHeader>\n <ModalBody>\n <Flex column width={189} height={130}>\n <Flex padding={[0, 0, 4, 0]} column gap={4}>\n <Flex alignItems=\"center\">\n <H4 margin={[0]}>{header}</H4>\n <Box\n sx={{ marginLeft: \"auto\" }}\n data-testid=\"go-to-cloud-cta\"\n margin={[0, 2, 0, 0]}\n width={{ min: 40 }}\n >\n <GoToCloud utmParameters={{ campaign: \"discover_cloud\" }}>\n {({ link }) => (\n <Box\n label={\n <Text textTransform=\"none\" strong color=\"panel\">\n Sign in to Netdata Cloud!\n </Text>\n }\n width=\"100%\"\n onClick={() => handleGoToCloud({ link })}\n as={Button}\n small\n data-ga={\"go-to-cloud-button\"}\n data-testid=\"cta1-button\"\n />\n )}\n </GoToCloud>\n </Box>\n </Flex>\n {text()}\n </Flex>\n {image && (\n <Flex height=\"auto\" width=\"100%\" overflow=\"hidden\">\n <Box\n sx={{\n width: \"100%\",\n height: \"auto\",\n }}\n as=\"img\"\n src={image}\n ></Box>\n </Flex>\n )}\n {video && (\n <Flex height=\"100%\" width=\"100%\">\n <Box sx={{ width: \"100%\", height: \"100%\" }}>\n <iframe\n title={`discover-cloud-iframe}`}\n width=\"100%\"\n height=\"100%\"\n src={video}\n frameBorder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n allowFullScreen\n />\n </Box>\n </Flex>\n )}\n </Flex>\n </ModalBody>\n <ModalFooter></ModalFooter>\n </ModalContent>\n </Modal>\n )\n}\n\nexport default DiscoverCloudModal\n","import { Text } from \"@netdata/netdata-ui\"\nimport Anchor from \"@/src/components/anchor\"\nimport React from \"react\"\n\nconst TabsContentText = ({ children }) => <Text fontSize=\"16px\">{children}</Text>\n\nexport const TabsContent = {\n Home: {\n id: \"Home\",\n label: \"Home\",\n header: \"Home\",\n text: () => (\n <TabsContentText>\n The Home view in Netdata cloud provides summarized relevant information in an easily\n digestible display. You can see information about your nodes, data collection and retention\n stats, alerts, users and dashboards.\n </TabsContentText>\n ),\n icon: \"room_home\",\n image: \"images/home.png\",\n },\n nodeView: {\n id: \"nodeView\",\n label: \"Node View\",\n header: \"Node View\",\n text: () => (\n <>\n <TabsContentText>\n The single node view you are currently using will of course be available on Netdata Cloud\n as well. In addition, the charts and visualization on Netdata Cloud will be more flexible\n and powerful for troubleshooting than what is available on the agent.\n </TabsContentText>\n <TabsContentText>\n Netdata Cloud also comes with the Metric Correlations feature that lets you quickly find\n metrics and charts related to a particular window of interest that you want to explore\n further. By displaying the standard Netdata dashboard, filtered to show only charts that\n are relevant to the window of interest, you can get to the root cause sooner.\n </TabsContentText>\n </>\n ),\n icon: \"nodes_hollow\",\n image: \"images/nodeView.png\",\n },\n Overview: {\n id: \"Overview\",\n label: \"Overview\",\n header: \"Overview\",\n text: () => (\n <>\n <TabsContentText>\n The Overview tab is a great way to monitor your infrastructure using Netdata Cloud. While\n the interface might look similar to local dashboards served by an Agent, or even the\n single-node dashboards in Netdata Cloud, Overview uses composite charts. These charts\n display real-time aggregated metrics from all the nodes (or a filtered selection) in a\n given War Room.\n </TabsContentText>\n <TabsContentText>\n With Overview's composite charts, you can see your infrastructure from a single pane of\n glass, discover trends or anomalies, then drill down by grouping metrics by node and\n jumping to single-node dashboards for root cause analysis.\n </TabsContentText>\n <TabsContentText>\n Here's an example of a composite chart visualizing Disk I/O bandwidth from 5 different\n nodes in one chart.\n </TabsContentText>\n </>\n ),\n icon: \"room_overview\",\n image: \"images/overview.png\",\n },\n Nodes: {\n id: \"Nodes\",\n label: \"Nodes\",\n header: \"Nodes\",\n text: () => (\n <TabsContentText>\n The Nodes view in Netdata Cloud lets you see and customize key metrics from any number of\n Agent-monitored nodes and seamlessly navigate to any node's dashboard for troubleshooting\n performance issues or anomalies using Netdata's highly-granular metrics.\n </TabsContentText>\n ),\n icon: \"nodes_hollow\",\n image: \"images/nodes.jpg\",\n },\n Dashboards: {\n id: \"Dashboards\",\n label: \"Dashboards\",\n header: \"Dashboards\",\n text: () => (\n <TabsContentText>\n With Netdata Cloud, you can build new dashboards that target your infrastructure's unique\n needs. Put key metrics from any number of distributed systems in one place for a bird's eye\n view of your infrastructure.\n </TabsContentText>\n ),\n icon: \"dashboard\",\n image: \"images/dashboards.png\",\n },\n Alerts: {\n id: \"Alerts\",\n label: \"Alerts\",\n header: \"Alerts\",\n text: () => (\n <TabsContentText>\n The Alerts view gives you a high level of availability and performance information for every\n node you're monitoring with Netdata Cloud. It also offers an easy way to drill down into any\n particular alert by taking the user to the dedicated alert view from where the user can run\n metrics correlation or take further troubleshooting steps.\n </TabsContentText>\n ),\n icon: \"alarm\",\n image: \"images/alerts.jpg\",\n },\n Anomalies: {\n id: \"Anomalies\",\n label: \"Anomalies\",\n header: \"Anomaies\",\n text: () => (\n <TabsContentText>\n The Anomalies view on Netdata Cloud lets you quickly surface potentially anomalous metrics\n and charts related to a particular highlight window of interest using Anomaly Advisor.\n Anomalies are detected using per metric unsupervised machine learning running at the edge!\n </TabsContentText>\n ),\n icon: \"anomaliesLens\",\n video:\n \"https://user-images.githubusercontent.com/24860547/165943403-1acb9759-7446-4704-8955-c566d04ad7ab.mp4\",\n },\n Pricing: {\n id: \"Pricing\",\n label: \"Pricing\",\n header: \"Pricing\",\n text: () => (\n <TabsContentText>\n Netdata Cloud’s distributed architecture—with processing occurring at the individual\n nodes—enables us to add any number of users at marginal cost. Couple this with our upcoming\n paid plan with added functionality for enterprise customers, and it means we can commit to\n providing our current functionality for free, always.\n </TabsContentText>\n ),\n image: \"images/pricing.png\",\n icon: \"pricing\",\n },\n Privacy: {\n id: \"Privacy\",\n label: \"Privacy\",\n header: \"Privacy\",\n text: () => (\n <>\n <TabsContentText>\n Data privacy is very important to us. We firmly believe that your data belongs to you.\n This is why we don't store any metric data in Netdata Cloud.\n </TabsContentText>\n <TabsContentText>\n Your local installations of the Netdata Agent form the basis for the Netdata Cloud. All\n the data that you see in the web browser when using Netdata Cloud, is actually streamed\n directly from the Netdata Agent to the Netdata Cloud dashboard. The data passes through\n our systems, but it isn't stored. You can learn more about{\" \"}\n <Anchor\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href=\"https://learn.netdata.cloud/docs/agent/netdata-security\"\n >\n the Agent's security design\n </Anchor>{\" \"}\n design in the Agent documentation.\n </TabsContentText>\n <TabsContentText>\n However, to be able to offer the stunning visualizations and advanced functionality of\n Netdata Cloud, it does store a limited number of metadata. This metadata is ONLY available\n to Netdata and NEVER to any 3rd parties. You can learn more about what metadata is stored\n in Netdata cloud in our\n <Anchor\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href=\"https://learn.netdata.cloud/docs/cloud/data-privacy\"\n >\n {\" \"}\n documentation\n </Anchor>\n </TabsContentText>\n </>\n ),\n icon: \"privacy\",\n },\n}\n","import React from \"react\"\nimport {\n Text,\n Drop,\n ModalContent,\n ModalBody,\n ModalHeader,\n ModalCloseButton,\n ModalFooter,\n Flex,\n Button,\n Box,\n H3,\n H4,\n Icon,\n} from \"@netdata/netdata-ui\"\n\nimport GoToCloud from \"components/auth/signIn\"\n\nexport const TITLE = \"Discover the free benefits of Netdata Cloud\"\n\nconst DiscoverCloudDrop = ({\n parentRef,\n isDropdownOpen,\n closeDropdown,\n text,\n header,\n handleGoToCloud,\n image,\n video,\n}) => {\n if (parentRef.current && isDropdownOpen)\n return (\n <Drop\n backdrop\n data-testid=\"selectedNodesDropdown\"\n onEsc={closeDropdown}\n align={{ top: \"bottom\", left: \"left\" }}\n target={parentRef.current}\n onClickOutside={closeDropdown}\n >\n <ModalContent background=\"modalBackground\">\n <ModalHeader>\n <Flex gap={2}>\n <Icon color=\"white\" name=\"netdata\" />\n <H3 margin={[0]}>{TITLE}:</H3>\n </Flex>\n\n <ModalCloseButton onClose={closeDropdown} />\n </ModalHeader>\n <ModalBody>\n <Flex column width={189} height={130}>\n <Flex padding={[0, 0, 4, 0]} column gap={4}>\n <Flex alignItems=\"center\">\n <H4 margin={[0]}>{header}</H4>\n <Box\n sx={{ marginLeft: \"auto\" }}\n data-testid=\"go-to-cloud-cta\"\n margin={[0, 2, 0, 0]}\n width={{ min: 40 }}\n >\n <GoToCloud utmParameters={{ campaign: \"discover_cloud\" }}>\n {({ link }) => (\n <Box\n label={\n <Text textTransform=\"none\" strong color=\"panel\">\n Sign in to Netdata Cloud!\n </Text>\n }\n width=\"100%\"\n onClick={() => handleGoToCloud({ link })}\n data-testid=\"cta1-button\"\n as={Button}\n small\n data-ga={\"go-to-cloud-button\"}\n />\n )}\n </GoToCloud>\n </Box>\n </Flex>\n {text()}\n </Flex>\n {image && (\n <Flex height=\"auto\" width=\"100%\" overflow=\"hidden\">\n <Box\n sx={{\n width: \"100%\",\n height: \"auto\",\n }}\n as=\"img\"\n src={image}\n ></Box>\n </Flex>\n )}\n {video && (\n <Flex height=\"100%\" width=\"100%\">\n <Box sx={{ width: \"100%\", height: \"100%\" }}>\n <iframe\n title={`discover-cloud-iframe}`}\n width=\"100%\"\n height=\"100%\"\n src={video}\n frameBorder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n allowFullScreen\n />\n </Box>\n </Flex>\n )}\n </Flex>\n </ModalBody>\n <ModalFooter></ModalFooter>\n </ModalContent>\n </Drop>\n )\n\n return null\n}\n\nexport default DiscoverCloudDrop\n","import React, { useState, useRef } from \"react\"\nimport { Text, Flex, NavigationTabs } from \"@netdata/netdata-ui\"\n\nimport CloudTab from \"./cloudTab\"\nimport { TITLE } from \"./discoverCloudModal\"\n\nimport { callAll } from \"@/src/utils/utils\"\nimport { TabsContent } from \"./contents\"\n\nimport DiscoverCloudDrop from \"./discoverCloudDrop\"\n\nconst Wrapper = Flex\nconst InnerPositioner = Flex\n\nconst DiscoverCloud = () => {\n const [isModalOpen, setIsModalOpen] = useState(false)\n const [selectedModalContent, setSelectedModalContent] = useState(null)\n const dropDownParentRef = useRef()\n\n const handleOpenModal = () => {\n setIsModalOpen(true)\n }\n\n const handleCloseModal = () => {\n setIsModalOpen(false)\n }\n\n const handleGoToCloud = ({ link }) => {\n window.location.href = link\n }\n\n const handleSetModalContent = content => {\n setSelectedModalContent(content)\n }\n const handleResetModalContent = () => {\n setSelectedModalContent(null)\n }\n\n return (\n <Wrapper padding={[0, 0, 0, 4]} position=\"relative\" height={15}>\n <InnerPositioner\n padding={[4, 2, 4, 2]}\n gap={4}\n height=\"100%\"\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n <Text color=\"primary\">{TITLE}:</Text>\n <Flex ref={dropDownParentRef}>\n <NavigationTabs>\n {Object.keys(TabsContent).map((key, index) => {\n const { label, icon, id } = TabsContent[key]\n const selectedContentId = selectedModalContent ? selectedModalContent.id : null\n return (\n <CloudTab\n key={key}\n icon={icon}\n active={id === selectedContentId}\n label={label}\n showBorderLeft={index === 0}\n onActivate={callAll(handleOpenModal, () =>\n handleSetModalContent(TabsContent[key])\n )}\n />\n )\n })}\n </NavigationTabs>\n </Flex>\n </InnerPositioner>\n <DiscoverCloudDrop\n parentRef={dropDownParentRef}\n isDropdownOpen={isModalOpen}\n {...selectedModalContent}\n closeDropdown={callAll(handleCloseModal, handleResetModalContent)}\n handleGoToCloud={handleGoToCloud}\n />\n {/* {isModalOpen && selectedModalContent && (\n <DiscoverCloudModal\n {...selectedModalContent}\n closeModal={callAll(handleCloseModal, handleResetModalContent)}\n handleGoToCloud={handleGoToCloud}\n />\n )} */}\n </Wrapper>\n )\n}\n\nexport default DiscoverCloud\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { Flex, Box } from \"@netdata/netdata-ui\"\nimport Node from \"./node\"\nimport Options from \"./options\"\nimport Version from \"./version\"\nimport GlobalControls from \"./globalControls\"\nimport Alarms from \"./alarms\"\nimport News from \"./news\"\nimport Timezone from \"./timezone\"\nimport SignIn from \"./signIn\"\nimport { CloudConnectionStatus } from \"./ACLK\"\nimport { DiscoverCloud } from \"@/src/components/discover-cloud\"\nimport { selectIsCloudEnabled } from \"domains/global/selectors\"\nimport { useSelector } from \"react-redux\"\n\nconst Wrapper = styled(Flex).attrs({\n as: \"header\",\n position: \"relative\",\n justifyContent: \"between\",\n background: \"panel\",\n zIndex: 20,\n width: \"100%\",\n padding: [2, 4, 2, 4],\n})`\n pointer-events: all;\n`\n\nconst Header = () => {\nconst cloudEnabled = useSelector(selectIsCloudEnabled)\n\n return <Wrapper>\n <Flex alignItems=\"center\" gap={3}>\n <Node />\n </Flex>\n <Flex justifyContent=\"end\" alignItems=\"center\" gap={3}>\n <CloudConnectionStatus />\n <Version />\n <News />\n <Options />\n <Timezone />\n <GlobalControls />\n <Alarms />\n <SignIn />\n </Flex>\n {cloudEnabled&& <Box sx={{ background: \"#272B30\" }} position=\"absolute\" top=\"52px\" left=\"0px\" right=\"0px\">\n <DiscoverCloud />\n </Box>} \n</Wrapper>\n}\n\n\n\nexport default Header\n","import styled from \"styled-components\"\nimport { Button } from \"@netdata/netdata-ui\"\n\nconst ExpandButton = styled(Button)`\n&& {\n > .button-icon {\n width: 6px;\n height: 9px;\n }\n`\nexport default ExpandButton\n","import React from \"react\"\nimport { useSelector } from \"react-redux\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport { selectCloudBaseUrl } from \"domains/global/selectors\"\nimport { getIframeSrc } from \"@/src/utils\"\n\n\nconst SignOut = ({ flavour = \"default\", ...rest }) => {\n const cloudBaseURL = useSelector(selectCloudBaseUrl)\n\n return (\n <Flex\n alignItems=\"center\"\n as=\"iframe\"\n src={`${getIframeSrc(cloudBaseURL, \"sign-out\")}?type=${flavour}`}\n border={{ side: \"all\", size: \"0px\" }}\n width={{ max: \"128px\" }}\n height={{ max: \"40px\" }}\n {...rest}\n />\n )\n}\n\nexport default SignOut\n","import React, { useMemo } from \"react\"\nimport { ThemeProvider } from \"styled-components\"\nimport { createSelector } from \"reselect\"\nimport { useToggle } from \"react-use\"\nimport { Flex, Button, DarkTheme, Text, Layer } from \"@netdata/netdata-ui\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { MenuItem } from \"components/menus\"\nimport SignOut from \"components/auth/signOut\"\nimport SignIn from \"components/auth/signIn\"\n\nconst SignInItem = () => {\n const onClick = (e, link) => {\n e.stopPropagation()\n window.location.href = link\n }\n return (\n <SignIn utmParameters={{ content: \"userSettings\" }}>\n {({ isRegistry, link, onSignIn }) => (\n <Text onClick={isRegistry ? e => onClick(e, link) : onSignIn}>Sign in</Text>\n )}\n </SignIn>\n )\n}\n\nconst isSignedInSelector = createSelector(\n ({ dashboard }) => dashboard,\n ({ isSignedIn }) => isSignedIn\n)\n\nconst UserSettings = () => {\n const [isOpen, toggle] = useToggle()\n const signedIn = useSelector(isSignedInSelector)\n\n const menuItems = useMemo(\n () => [\n ...(signedIn\n ? [\n {\n children: \"Operational Status\",\n onClick: () =>\n window.open(\"https://status.netdata.cloud\", \"_blank\", \"noopener,noreferrer\"),\n },\n ]\n : []),\n ...(signedIn ? [{ separator: true }] : []),\n ...(signedIn\n ? [\n {\n children: (\n <SignOut\n data-testid=\"signout-button-sidebar\"\n flavour=\"borderless\"\n height={{ max: \"18px\" }}\n />\n ),\n },\n ]\n : [{ children: <SignInItem /> }]),\n ],\n [signedIn]\n )\n\n return (\n <ThemeProvider theme={DarkTheme}>\n <Button\n data-testid=\"avatar-button-sidebar\"\n flavour=\"borderless\"\n neutral\n icon=\"user\"\n title=\"User settings\"\n name=\"userSettings\"\n onClick={toggle}\n />\n {isOpen && (\n <Layer\n position=\"bottom-left\"\n onClickOutside={toggle}\n onEsc={toggle}\n backdrop={false}\n margin={[5, 18]}\n >\n <Flex column width={52} background=\"mainBackground\" padding={[3]} round>\n {menuItems.map((item, i) => {\n if (item.separator) return <Flex height=\"1px\" background=\"disabled\" key={i} />\n return (\n <MenuItem\n key={i}\n padding={[2, 4]}\n round={1}\n {...(item.onClick && { onClick: item.onClick })}\n >\n {item.children}\n </MenuItem>\n )\n })}\n </Flex>\n </Layer>\n )}\n </ThemeProvider>\n )\n}\n\nexport default UserSettings\n","import React from \"react\"\nimport { Flex, Button } from \"@netdata/netdata-ui\"\n\nconst SpacesSkeleton = () => (\n <React.Fragment>\n <Flex\n width=\"40px\"\n height=\"40px\"\n round={2}\n border={{ side: \"all\", color: \"border\", size: \"2px\", type: \"dotted\" }}\n />\n <Flex height=\"1px\" background=\"separator\" width=\"20px\" />\n <Button icon=\"plus\" disabled />\n </React.Fragment>\n)\n\nexport default SpacesSkeleton\n","import React from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectCloudBaseUrl } from \"domains/global/selectors\"\nimport { getIframeSrc } from \"utils/utils\"\n\nconst SpacesIframe = () => {\n const cloudBaseURL = useSelector(selectCloudBaseUrl)\n return (\n <Flex\n as=\"iframe\"\n src={getIframeSrc(cloudBaseURL, \"space-bar\")}\n title=\"Space Bar\"\n height=\"100%\"\n width=\"100%\"\n border={{ side: \"all\", size: \"0px\" }}\n overflow=\"hidden\"\n />\n )\n}\n\nexport default SpacesIframe\n","import React from \"react\"\nimport { useSelector } from \"react-redux\"\nimport { Icon, Flex, Button, Documentation } from \"@netdata/netdata-ui\"\nimport { selectIsCloudEnabled } from \"domains/global/selectors\"\nimport ExpandButton from \"./expandButton\"\nimport UserSettings from \"./userSettings\"\nimport SpacesSkeleton from \"./spacesSkeleton\"\nimport SpacesIframe from \"./spacesIframe\"\n\nconst Spaces = ({ isOpen, toggle, isSignedIn }) => {\n const cloudEnabled = useSelector(selectIsCloudEnabled)\n\n return (\n <Flex\n column\n justifyContent=\"between\"\n background=\"panel\"\n padding={[3, 0]}\n width=\"64px\"\n alignItems=\"center\"\n gap={6}\n position=\"relative\"\n overflow=\"hidden\"\n >\n <Flex column gap={4} alignItems=\"center\" height=\"100%\" overflow=\"hidden\">\n <Icon color=\"success\" name=\"netdataPress\" height=\"32px\" width=\"32px\" />\n {!isOpen && (\n <ExpandButton\n icon=\"chevron_right_s\"\n onClick={toggle}\n small\n neutral\n flavour=\"borderless\"\n themeType=\"dark\"\n />\n )}\n {cloudEnabled && isSignedIn && <SpacesIframe />}\n {cloudEnabled && !isSignedIn && <SpacesSkeleton />}\n </Flex>\n <Flex column gap={4} alignItems=\"center\">\n <Documentation app=\"agent\">\n {toggle => (\n <Button\n flavour=\"borderless\"\n neutral\n themeType=\"dark\"\n className=\"btn\"\n icon=\"question\"\n onClick={toggle}\n title=\"Need help?\"\n />\n )}\n </Documentation>\n <Button\n flavour=\"borderless\"\n neutral\n themeType=\"dark\"\n className=\"btn\"\n data-toggle=\"modal\"\n data-target=\"#optionsModal\"\n icon=\"gear\"\n title=\"Settings\"\n />\n {cloudEnabled && <UserSettings />}\n </Flex>\n </Flex>\n )\n}\n\nexport default Spaces\n","// some old functions here, i don't have time to comprehend them now\n\n// --------------------------------------------------------------------\n// natural sorting\n// http://www.davekoelle.com/files/alphanum.js - LGPL\n\nconst naturalSortChunkify = (t: string) => {\n const tz = []\n let x = 0\n let y = -1; let n = 0 as boolean | number; let i; let j\n\n // eslint-disable-next-line no-cond-assign,no-plusplus\n while (i = (j = t.charAt(x++)).charCodeAt(0)) {\n const m = (i >= 48 && i <= 57)\n if (m !== n) {\n // eslint-disable-next-line no-plusplus\n tz[++y] = \"\"\n n = m\n }\n tz[y] += j\n }\n\n return tz\n}\n\n\nexport const naturalSortCompare = (a: string, b: string) => {\n const aa = naturalSortChunkify(a.toLowerCase())\n const bb = naturalSortChunkify(b.toLowerCase())\n\n // eslint-disable-next-line no-plusplus\n for (let x = 0; aa[x] && bb[x]; x++) {\n if (aa[x] !== bb[x]) {\n const c = Number(aa[x]); const\n d = Number(bb[x])\n if (c.toString() === aa[x] && d.toString() === bb[x]) {\n return c - d\n }\n return (aa[x] > bb[x]) ? 1 : -1\n }\n }\n return aa.length - bb.length\n}\n\n\ninterface ObjectsWithPriority {\n [key: string]: {\n priority: number\n }\n}\nexport const sortObjectByPriority = <T extends ObjectsWithPriority>(object: T) => {\n const sorted = Object.keys(object)\n\n sorted.sort((a, b) => {\n if (object[a].priority < object[b].priority) {\n return -1\n }\n if (object[a].priority > object[b].priority) {\n return 1\n }\n return naturalSortCompare(a, b)\n })\n\n return sorted\n}\n\n\ninterface PrioritySortObject {\n name: string\n priority: number\n}\nexport const prioritySort = <T extends PrioritySortObject>(a: T, b: T) => {\n if (a.priority < b.priority) {\n return -1\n }\n if (a.priority > b.priority) {\n return 1\n }\n return naturalSortCompare(a.name, b.name)\n}\n","import { naturalSortCompare } from \"domains/dashboard/utils/sorting\"\n\nconst getBaseUrl = hostname => {\n let base = document.location.origin.toString() + decodeURI(document.location.pathname.toString())\n if (base.endsWith(`/host/${hostname}/`)) {\n base = base.substring(0, base.length - `/host/${hostname}/`.toString().length)\n }\n\n if (base.endsWith(\"/\")) {\n base = base.substring(0, base.length - 1)\n }\n\n return base\n}\n\nconst getNodeUrl = (baseUrl, hostname) => `${baseUrl}/host/${hostname}/`\n\nconst getNodes = (hosts, hostname, hostsStatus) => {\n if (!hosts || !hostname) return {}\n\n // decodeURI, because pathname (which is hostname) can contain white-spaces\n // or other characters which are URIencoded when user clicks the link\n // and we need to match it with `chartsMetadata.hostname`\n const baseUrl = getBaseUrl(hostname)\n\n const [{ hostname: parentNodeHostname }] = hosts\n\n const parentNode = {\n hostname: parentNodeHostname,\n url: `${baseUrl}/`,\n }\n\n const replicatedNodes = hosts\n .slice(1)\n .map(({ hostname }, index) => ({\n hostname,\n url: getNodeUrl(baseUrl, hostname),\n status: hostsStatus.find(host => host.hostname === hostname)?.reachable || false,\n }))\n .sort((a, b) => naturalSortCompare(a.hostname, b.hostname))\n\n return {\n parentNode,\n replicatedNodes,\n }\n}\n\nexport default getNodes\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst Anchor = styled(Flex).attrs({\n as: \"a\",\n gap: 2,\n alignItems: \"center\",\n})`\n & :hover {\n text-decoration: none;\n }\n`\n\nexport default Anchor\n","import React from \"react\"\nimport { Flex, Text, Icon } from \"@netdata/netdata-ui\"\nimport Pill from \"components/header/pill\"\nimport Anchor from \"./anchor\"\n\nconst Node = ({ hostname, url, status }) => {\n return (\n <Anchor href={url} justifyContent=\"between\" padding={[0, 0, 0, 2]}>\n <Flex alignItems=\"center\" gap={2}>\n <Icon name=\"node\" color=\"bright\" />\n <Text color=\"bright\" truncate>\n {hostname}\n </Text>\n </Flex>\n <Pill background={status ? \"success\" : \"border\"} color=\"bright\" round={10}>\n {status ? \"Live\" : \"Off\"}\n </Pill>\n </Anchor>\n )\n}\n\nexport default Node\n","import React, { useState, useCallback, useMemo } from \"react\"\nimport styled from \"styled-components\"\nimport { Flex, Text, Icon, TextInput } from \"@netdata/netdata-ui\"\nimport { MenuList } from \"components/menus\"\nimport Anchor from \"./anchor\"\nimport Node from \"./node\"\n\nconst Search = styled(TextInput)`\n & > label {\n margin-bottom: 0;\n }\n`\n\nconst StyledIcon = styled(Icon)`\n transform: ${({ right }) => (right ? \"rotate(270deg)\" : \"none\")};\n`\n\nconst ReplicatedNodes = ({ parentNode, replicatedNodes }) => {\n const [listOpen, setListOpen] = useState(true)\n const [value, setValue] = useState(\"\")\n\n const toggleListOpen = useCallback(() => setListOpen(o => !o), [])\n const onChange = useCallback(e => setValue(e.target.value), [])\n\n const nodes = useMemo(() => {\n if (!value) return replicatedNodes\n return replicatedNodes.filter(({ hostname }) =>\n hostname.toLowerCase().includes(value.toLowerCase())\n )\n }, [replicatedNodes, value])\n\n return (\n <MenuList\n isOpen={listOpen}\n toggleOpen={toggleListOpen}\n label={\n <Flex alignItems=\"center\" justifyContent=\"between\">\n <Text strong color=\"border\">\n Replicated nodes\n </Text>\n <StyledIcon right={!listOpen} name=\"chevron_down\" size=\"small\" color=\"text\" />\n </Flex>\n }\n >\n <Flex column gap={4} padding={[4, 0, 0]}>\n <Anchor as=\"a\" href={parentNode.url} justifyContent=\"start\">\n <Icon name=\"nodes\" size=\"small\" color=\"bright\" />\n <Text color=\"bright\">{parentNode.hostname}</Text>\n </Anchor>\n {nodes.length >= 5 && (\n <Flex padding={[0, 0, 0, 2]}>\n <Search\n value={value}\n onChange={onChange}\n iconLeft={<Icon name=\"search_s\" size=\"small\" color=\"text\" />}\n metaShrinked\n />\n </Flex>\n )}\n <Flex column gap={2}>\n {nodes.map(({ hostname, url, status }) => (\n <Node key={hostname} hostname={hostname} url={url} status={status} />\n ))}\n </Flex>\n </Flex>\n </MenuList>\n )\n}\n\nexport default ReplicatedNodes\n","import React, { useRef, useEffect } from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { sendToChildIframe, useListenToPostMessage } from \"@/src/utils/post-message\"\nimport { getIframeSrc } from \"@/src/utils\"\nimport { selectCloudBaseUrl } from \"domains/global/selectors\"\n\nconst SpacePanelIframe = ({ parentNode, replicatedNodes }) => {\n const cloudBaseURL = useSelector(selectCloudBaseUrl)\n\n const ref = useRef()\n\n const [spacePanelMessage] = useListenToPostMessage(\"hello-from-space-panel\")\n\n useEffect(() => {\n if (!spacePanelMessage || !ref.current) return\n sendToChildIframe(ref.current, {\n type: \"streamed-hosts-data\",\n payload: { parentNode, replicatedNodes },\n })\n }, [replicatedNodes, parentNode, spacePanelMessage])\n\n return (\n <Flex\n ref={ref}\n as=\"iframe\"\n src={getIframeSrc(cloudBaseURL, \"space-panel\")}\n title=\"space panel\"\n width=\"100%\"\n height=\"100%\"\n border={{ side: \"all\", size: \"0px\" }}\n />\n )\n}\n\nexport default SpacePanelIframe\n","import React from \"react\"\nimport { TextSmall } from \"@netdata/netdata-ui\"\n\nconst promptContent = {\n signIn: {\n title: \"Welcome back!\",\n content: [\n <TextSmall key=\"1\" color=\"bright\">\n Sign in again to enjoy the benefits of Netdata Cloud{\" \"}\n </TextSmall>,\n ],\n },\n signUp: {\n title: \"Welcome to Netdata Cloud!\",\n content: [\n <TextSmall key=\"1\" color=\"bright\">\n <TextSmall strong color=\"bright\">\n A single place\n </TextSmall>{\" \"}\n for all your nodes.\n </TextSmall>,\n <TextSmall key=\"2\" color=\"bright\">\n <TextSmall strong color=\"bright\">\n Multi-node dashboards\n </TextSmall>{\" \"}\n out of the box.\n </TextSmall>,\n <TextSmall key=\"3\" color=\"bright\">\n <TextSmall strong color=\"bright\">\n Custom dashboards\n </TextSmall>{\" \"}\n for you to create, edit and share online.\n </TextSmall>,\n <TextSmall key=\"4\" color=\"bright\">\n <TextSmall strong color=\"bright\">\n Metric Correlations\n </TextSmall>{\" \"}\n to find the root cause of anything.\n </TextSmall>,\n <TextSmall key=\"5\" color=\"bright\">\n <TextSmall strong color=\"bright\">\n Centrally dispatched notifications\n </TextSmall>{\" \"}\n for all alarms of all your nodes.\n </TextSmall>,\n <TextSmall key=\"6\" color=\"bright\">\n And... It is{\" \"}\n <TextSmall\n as=\"a\"\n href=\"https://www.netdata.cloud/get-netdata/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n strong\n color=\"bright\"\n >\n free, forever!\n </TextSmall>\n </TextSmall>,\n ],\n },\n}\n\nexport default promptContent\n","import React from \"react\"\nimport { Flex, Text, Button } from \"@netdata/netdata-ui\"\nimport SignIn from \"@/src/components/auth/signIn\"\nimport promptContent from \"./promptContent\"\n\nconst SignInPrompt = () => {\n return (\n <SignIn utmParameters={{ content: \"sidebar\" }}>\n {({ isRegistry, link, onSignIn, offline }) => {\n const { title, content } = promptContent[\"signIn\"]\n return (\n <Flex\n background={[\"neutral\", \"regentgrey\"]}\n column\n gap={4}\n padding={[10]}\n border={{ side: \"right\", color: \"panel\" }}\n >\n <Text color=\"bright\" strong>\n {title}\n </Text>\n {content.map(el => el)}\n <Button\n width=\"100%\"\n label=\"Sign in\"\n disabled={offline}\n {...(isRegistry ? { as: \"a\", href: link } : { onClick: onSignIn })}\n />\n </Flex>\n )\n }}\n </SignIn>\n )\n}\n\nexport default SignInPrompt\n","import React from \"react\"\n\nconst NoNetwork = () => (\n <svg width=\"68\" height=\"68\" viewBox=\"0 0 68 68\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M48.875 6.375H19.125C16.7778 6.375 14.875 8.27779 14.875 10.625V40.375C14.875 42.7222 16.7778 44.625 19.125 44.625H48.875C51.2222 44.625 53.125 42.7222 53.125 40.375V10.625C53.125 8.27779 51.2222 6.375 48.875 6.375Z\"\n fill=\"white\"\n stroke=\"#AEB3B7\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M41.0834 38.25C41.8658 38.25 42.5 38.8843 42.5 39.6667V41.0833C44.0648 41.0833 45.3334 42.3519 45.3334 43.9167V58.0833C45.3334 59.6481 44.0648 60.9167 42.5 60.9167H38.25V65.1667H31.8278V60.9167H26.9167C25.3519 60.9167 24.0834 59.6481 24.0834 58.0833V43.9167C24.0834 42.3519 25.3519 41.0833 26.9167 41.0833V39.6667C26.9167 38.8843 27.551 38.25 28.3334 38.25H41.0834Z\"\n fill=\"#35414A\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M39.7954 12.75C40.5778 12.75 41.2121 13.3843 41.2121 14.1667L41.2108 16.7294L43.9166 16.7296C44.699 16.7296 45.3333 17.3639 45.3333 18.1463V34C45.3333 34.7824 44.699 35.4167 43.9166 35.4167L43.272 35.4152L43.2727 33.3403H41.2121L41.2108 35.4152H39.151L39.1515 33.3403H37.0909L37.0897 35.4152H35.0299L35.0303 33.3403H32.9697L32.9686 35.4152H30.9088L30.909 33.3403H28.8484L28.8475 35.4152H26.7877L26.7878 33.3403H24.7272L24.7265 35.4152L24.0833 35.4167C23.3009 35.4167 22.6666 34.7824 22.6666 34V18.1463C22.6666 17.3639 23.3009 16.7296 24.0833 16.7296L26.7877 16.7294L26.7878 14.1667C26.7878 13.3843 27.4221 12.75 28.2045 12.75H39.7954Z\"\n fill=\"#35414A\"\n />\n </svg>\n)\n\nexport default NoNetwork\n","import React from \"react\"\nimport { Flex, TextNano, TextSmall } from \"@netdata/netdata-ui\"\nimport NoNetwork from \"./noNetwork\"\n\nconst OfflinePrompt = () => (\n <Flex alignItems=\"center\" background={[\"neutral\", \"regentgrey\"]} column gap={1} padding={[10]}>\n <TextSmall color=\"bright\" strong textAlign=\"center\">\n Can't connect to Netdata Cloud\n </TextSmall>\n <NoNetwork />\n <TextNano color=\"bright\" textAlign=\"center\" margin={[2, 0, 0]}>\n Maybe you are behind a firewall or you don’t have connection to the internet\n </TextNano>\n </Flex>\n)\n\nexport default OfflinePrompt\n","import styled from \"styled-components\"\nimport { getSizeBy, getColor, Icon, TextNano, Text } from \"@netdata/netdata-ui\"\n\nexport const NodesContainer = styled.div`\n .mdc-list-item {\n padding: 0 0;\n padding-left: 0;\n }\n .rmwc-collapsible-list__children {\n .mdc-list-item {\n padding: 0 0;\n padding-left: 0;\n height: ${getSizeBy(4)};\n }\n }\n .rmwc-collapsible-list__handle {\n .mdc-list-item {\n padding: 0 ${getSizeBy(2)};\n }\n }\n .mdc-list-item__meta {\n color: ${getColor(\"bright\")};\n }\n .mdc-list-item:before {\n background: none;\n }\n`\n\nexport const ListItem = styled.div`\n width: 100%;\n min-height: ${getSizeBy(3)};\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n cursor: pointer;\n justify-content: space-between;\n`\n\nexport const TrashIcon = styled(Icon)`\n fill: #35414a;\n margin-right: ${getSizeBy(2)};\n transition: opacity 0.4s ease-in;\n &:hover {\n opacity: 0.6;\n }\n`\n\nexport const StyledIcon = styled(Icon)`\n flex-shrink: 0;\n flex-grow: 0;\n margin-right: ${getSizeBy(2)};\n fill: ${getColor([\"gray\", \"arsenic\"])};\n`\n\n// @ts-ignore todo extend interface in dashboard due to lack of types in netdata-ui\nexport const NodeUrl = styled(TextNano.withComponent(\"a\"))`\n text-decoration: none;\n margin-left: ${getSizeBy(5)};\n color: #aeb3b7;\n max-width: 145px;\n word-wrap: break-word;\n &:hover {\n color: inherit; // overwrite bootstrap\n text-decoration: none;\n }\n`\n\n// @ts-ignore todo\nexport const NodeName = styled(Text.withComponent(\"a\"))`\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n white-space: nowrap;\n`\n","import React, { useCallback, useState } from \"react\"\nimport { CollapsibleList, SimpleListItem } from \"@rmwc/list\"\nimport \"@material/list/dist/mdc.list.css\"\nimport \"@rmwc/list/collapsible-list.css\"\nimport \"@rmwc/icon/icon.css\"\nimport { Box, Flex, Text } from \"@netdata/netdata-ui\"\n\nimport truncateMiddle from \"utils/truncateMiddle\"\nimport { naturalSortCompare } from \"domains/dashboard/utils/sorting\"\nimport { MASKED_DATA } from \"domains/global/constants\"\nimport { MenuList } from \"components/menus\"\n\nimport { NodesContainer, ListItem, StyledIcon, NodeUrl, NodeName, TrashIcon } from \"./styled\"\n\nconst Node = ({ name, alternateUrls, machineGuid }) => (\n <CollapsibleList\n handle={\n <SimpleListItem\n text={\n <>\n <StyledIcon name=\"node\" />\n <NodeName\n color=\"bright\"\n href=\"\"\n onClick={event => {\n event.preventDefault() // prevent navigating to url\n event.stopPropagation()\n window.gotoServerModalHandler(machineGuid)\n }}\n >\n {name}\n </NodeName>\n </>\n }\n metaIcon={alternateUrls.length && \"chevron_right\"}\n />\n }\n >\n <Box margin={[2, 0, 0]}>\n {alternateUrls.map(url => (\n <ListItem key={url}>\n <NodeUrl href={url}>{truncateMiddle(url, 50)}</NodeUrl>\n <TrashIcon\n name=\"trashcan\"\n size=\"small\"\n onClick={() => {\n window.deleteRegistryModalHandler(machineGuid, name, url)\n }}\n />\n </ListItem>\n ))}\n </Box>\n </CollapsibleList>\n)\n\nexport const VisitedNodes = ({ machinesArray }) => {\n const sortedMachines = machinesArray\n .sort((a, b) => naturalSortCompare(a.name, b.name))\n .filter(({ url }) => url !== MASKED_DATA)\n\n const [listOpen, setListOpen] = useState(true)\n const toggleListOpen = useCallback(() => setListOpen(o => !o), [])\n\n return (\n <MenuList\n isOpen={listOpen}\n toggleOpen={toggleListOpen}\n label={\n <Flex alignItems=\"center\" justifyContent=\"between\">\n <Text strong color=\"border\">\n Visited Nodes\n </Text>\n <StyledIcon right={!listOpen} name=\"chevron_down\" size=\"small\" color=\"text\" />\n </Flex>\n }\n >\n <NodesContainer column gap={2}>\n {sortedMachines.map(({ name, alternateUrls, guid, url }) => (\n <Node\n alternateUrls={alternateUrls}\n key={`${name}-${guid}`}\n machineGuid={guid}\n name={name}\n url={url}\n />\n ))}\n </NodesContainer>\n </MenuList>\n )\n}\n\nexport default VisitedNodes\n","export default (text, maxLength) => {\n if (text.length <= maxLength) return text\n\n const spanLength = Math.floor((maxLength - 3) / 2)\n return `${text.substring(0, spanLength)}...${text.substring(text.length - spanLength)}`\n}\n","import React, { useCallback } from \"react\"\nimport { useSelector } from \"react-redux\"\nimport { createSelector } from \"reselect\"\nimport { Flex, Text, TextSmall, Collapsible, Button } from \"@netdata/netdata-ui\"\nimport { selectIsUsingGlobalRegistry, selectIsCloudEnabled } from \"domains/global/selectors\"\nimport getNodes from \"./nodes\"\nimport ReplicatedNodes from \"./replicatedNodes\"\nimport SpacePanelIframe from \"./spacePanelIframe\"\nimport SignInPrompt from \"./prompts/signIn\"\nimport OfflinePrompt from \"./prompts/offline\"\nimport VisitedNodes from \"./visitedNodes\"\n\nconst replicatedNodesSelector = createSelector(\n state => state.global.chartsMetadata.data || {},\n state => state.global.registry.fullInfoPayload.mirrored_hosts_status || {},\n ({ hosts, hostname }, hostsStatus) => getNodes(hosts, hostname, hostsStatus)\n)\n\nconst visitedNodesSelector = createSelector(\n state => state.global.registry,\n registry => registry.registryMachinesArray || []\n)\n\nconst isSignedInSelector = createSelector(\n ({ dashboard }) => dashboard,\n ({ isSignedIn, offline }) => ({ isSignedIn, offline })\n)\n\nconst Space = ({ isOpen, toggle }) => {\n const { parentNode = {}, replicatedNodes = [] } = useSelector(replicatedNodesSelector)\n const visitedNodes = useSelector(visitedNodesSelector)\n const globalRegistry = useSelector(selectIsUsingGlobalRegistry)\n const { isSignedIn, offline } = useSelector(isSignedInSelector)\n const cloudEnabled = useSelector(selectIsCloudEnabled)\n\n const switchIdentity = useCallback(() => window.switchRegistryModalHandler(), [])\n\n return (\n <Collapsible width={74} background=\"panel\" open={isOpen} direction=\"horizontal\" persist>\n <Flex\n flex\n column\n overflow={{ vertical: \"hidden\" }}\n margin={[3, 0, 0]}\n border={{ side: \"left\", color: \"separator\" }}\n style={{ pointerEvents: \"all\" }}\n >\n <Flex overflow={{ vertical: \"auto\" }} flex column gap={4} padding={[4]}>\n <Flex alignSelf=\"end\">\n <Button\n neutral\n flavour=\"borderless\"\n themeType=\"dark\"\n small\n icon=\"chevron_left\"\n onClick={toggle}\n />\n </Flex>\n {!isSignedIn && (\n <>\n {!!replicatedNodes.length && (\n <ReplicatedNodes parentNode={parentNode} replicatedNodes={replicatedNodes} />\n )}\n {!!visitedNodes.length && (\n <Text strong color=\"border\">\n <VisitedNodes machinesArray={visitedNodes} />\n </Text>\n )}\n </>\n )}\n {isSignedIn && (\n <SpacePanelIframe parentNode={parentNode} replicatedNodes={replicatedNodes} />\n )}\n </Flex>\n {globalRegistry && (\n <Flex border={{ side: \"top\" }} justifyContent=\"center\" alignItems=\"center\" padding={[6]}>\n <TextSmall onClick={switchIdentity}>Switch Identity</TextSmall>\n </Flex>\n )}\n {!isSignedIn && cloudEnabled && <SignInPrompt />}\n {offline && cloudEnabled && <OfflinePrompt />}\n </Flex>\n </Collapsible>\n )\n}\n\nexport default React.memo(Space)\n","import React, { useCallback, useEffect } from \"react\"\nimport styled from \"styled-components\"\nimport { createSelector } from \"reselect\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport { useDispatch, useSelector } from \"react-redux\"\nimport { useLocalStorage } from \"react-use\"\nimport { selectSpacePanelIsActive } from \"@/src/domains/global/selectors\"\nimport { setSpacePanelStatusAction } from \"@/src/domains/global/actions\"\nimport Spaces from \"./spaces\"\nimport Space from \"./space\"\n\nconst Wrapper = styled(Flex).attrs({ height: \"100vh\", zIndex: 10 })`\n pointer-events: all;\n`\n\nconst isSignedInSelector = createSelector(\n ({ dashboard }) => dashboard,\n ({ isSignedIn }) => isSignedIn\n)\n\nconst Sidebar = () => {\n const [lsValue, setLsValue] = useLocalStorage(\"space-panel-state\")\n const isOpen = useSelector(selectSpacePanelIsActive)\n const signedIn = useSelector(isSignedInSelector)\n\n const dispatch = useDispatch()\n\n const toggle = useCallback(() => {\n dispatch(setSpacePanelStatusAction({ isActive: !isOpen }))\n setLsValue(!isOpen)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpen])\n\n useEffect(() => {\n dispatch(setSpacePanelStatusAction({ isActive: lsValue ? signedIn : false }))\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [signedIn])\n\n return (\n <Wrapper>\n <Spaces isOpen={isOpen} toggle={toggle} isSignedIn={signedIn} />\n <Space isOpen={isOpen} toggle={toggle} offline={true} />\n </Wrapper>\n )\n}\n\nexport default React.memo(Sidebar)\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport Header from \"components/header\"\nimport Sidebar from \"components/sidebar\"\n\nconst Wrapper = styled(Flex).attrs({\n position: \"fixed\",\n justifyContent: \"start\",\n alignItems: \"start\",\n width: \"100%\",\n zIndex: 10,\n})`\n top: 0;\n left: 0;\n pointer-events: none;\n`\n\nconst Layout = ({ children, printMode }) => {\n\n if (printMode) return children\n\n return (\n <Wrapper>\n <Sidebar />\n <Header />\n {children}\n </Wrapper>\n )\n}\n\nexport default Layout\n","import { DefaultTheme, DarkTheme } from \"@netdata/netdata-ui\"\n\nexport type DashboardTheme = any\n\nexport const mapTheme = (theme: DashboardTheme): any =>\n ({\n slate: DarkTheme,\n white: DefaultTheme,\n }[theme] || DarkTheme)\n","import React, { useState, useCallback } from \"react\"\nimport GoToCloud from \"components/auth/signIn\"\n\nimport {\n Modal,\n ModalContent,\n ModalBody,\n ModalFooter,\n ModalHeader,\n Text,\n Flex,\n H3,\n Button,\n Box,\n Checkbox,\n} from \"@netdata/netdata-ui\"\n\nconst campaign = \"agent_nudge_to_cloud\"\n\nconst MigrationModal = ({\n migrationModalPromoInfo,\n setUserPrefrence,\n closeModal,\n savePromoRemindMeSelection,\n migrationModalPromo,\n requestRefreshOfAccess,\n}) => {\n const [isRememberChoiceChecked, setIsRememberChoiceChecked] = useState(false)\n\n const handleCheckBoxChange = e => {\n setIsRememberChoiceChecked(e.currentTarget.checked)\n }\n\n const handleClickedCTA1 = useCallback(\n ({ link, toPath }) => {\n const { CTA1 } = migrationModalPromoInfo\n\n if (CTA1.action === \"NAVIGATE\") {\n if (isRememberChoiceChecked) {\n setUserPrefrence(CTA1.userPreference)\n savePromoRemindMeSelection(isRememberChoiceChecked)\n }\n if (toPath !== \"agent\") window.location.href = link\n closeModal()\n } else if (CTA1.action === \"REFRESH\") {\n requestRefreshOfAccess()\n }\n },\n [\n migrationModalPromoInfo,\n setUserPrefrence,\n isRememberChoiceChecked,\n requestRefreshOfAccess,\n savePromoRemindMeSelection,\n closeModal,\n ]\n )\n\n const handleClickedCTA2 = useCallback(() => {\n const { CTA2 } = migrationModalPromoInfo\n if (isRememberChoiceChecked) {\n setUserPrefrence(CTA2.userPreference)\n savePromoRemindMeSelection(isRememberChoiceChecked)\n }\n if (CTA2.action === \"NAVIGATE\") {\n } else if (CTA2.action === \"REFRESH\") {\n requestRefreshOfAccess()\n }\n closeModal()\n }, [\n migrationModalPromoInfo,\n setUserPrefrence,\n isRememberChoiceChecked,\n requestRefreshOfAccess,\n savePromoRemindMeSelection,\n closeModal,\n ])\n\n return migrationModalPromoInfo ? (\n <Modal>\n <ModalContent width={180} background=\"modalBackground\">\n <ModalHeader>\n <H3 margin={[0]}>{migrationModalPromoInfo.title}</H3>\n </ModalHeader>\n <ModalBody>\n <Flex padding={[0, 0, 4, 0]} column gap={3}>\n {typeof migrationModalPromoInfo.text.header === \"function\" ? (\n migrationModalPromoInfo.text.header({})\n ) : (\n <Text>{migrationModalPromoInfo.text.header}</Text>\n )}\n {migrationModalPromoInfo.text.bullets.length > 0 && (\n <Flex column gap={3}>\n <Flex column gap={1} as={\"ul\"}>\n {migrationModalPromoInfo.text.bullets.map(bullet => {\n if (typeof bullet === \"function\") {\n return <li key={bullet}>{bullet()}</li>\n }\n return (\n <li key={bullet}>\n <Text>{bullet}</Text>\n </li>\n )\n })}\n </Flex>\n </Flex>\n )}\n {migrationModalPromoInfo.text.footer && (\n <Text data-testid=\"body-footer\">{migrationModalPromoInfo.text.footer}</Text>\n )}\n </Flex>\n </ModalBody>\n <ModalFooter>\n <Box margin={[0, \"auto\", 0, 0]}>\n <Checkbox\n data-ga={`${migrationModalPromo}::click-remind-me::ad`}\n data-testid=\"remind-me-checkbox\"\n checked={isRememberChoiceChecked}\n onChange={handleCheckBoxChange}\n label={migrationModalPromoInfo.tickBoxOption.text}\n />\n </Box>\n <Box data-testid=\"cta1\" margin={[0, 2, 0, 0]} width={{ min: 40 }}>\n <GoToCloud utmParameters={{ content: migrationModalPromo, campaign }}>\n {({ link }) => (\n <Button\n data-ga={`${migrationModalPromo}::click-ct1::ad`}\n textTransform=\"none\"\n data-testid=\"cta1-button\"\n onClick={() =>\n handleClickedCTA1({ link, toPath: migrationModalPromoInfo.CTA1.toPath })\n }\n width=\"100%\"\n label={migrationModalPromoInfo.CTA1.text}\n />\n )}\n </GoToCloud>\n </Box>\n {migrationModalPromoInfo.CTA2 && (\n <Box\n data-ga={`${migrationModalPromo}::click-ct2::ad`}\n onClick={handleClickedCTA2}\n height={10}\n className=\"btn btn-default\"\n data-testid=\"cta2\"\n width={{ min: 40 }}\n >\n <Box as={Text} sx={{ fontWeight: \"500\", lineHeight: \"25px\" }}>\n {migrationModalPromoInfo.CTA2.text}\n </Box>\n </Box>\n )}\n </ModalFooter>\n </ModalContent>\n </Modal>\n ) : null\n}\n\nexport default MigrationModal\n","import React, { useState, useEffect, useMemo } from \"react\"\nimport { useLocalStorage } from \"react-use\"\nimport { useSelector } from \"react-redux\"\n\nimport { selectUserNodeAccess } from \"domains/global/selectors\"\nimport {\n MigrationModal,\n useMigrationModal,\n PromoProps,\n goToCloud,\n goToAgentDashboard,\n} from \"@/src/domains/dashboard/components/migration-modal\"\nimport { selectSignInUrl } from \"domains/global/selectors\"\nimport { useRequestRefreshOfAccessMessage } from \"hooks/use-user-node-access\"\nimport { selectIsCloudEnabled } from \"domains/global/selectors\"\nimport { selectRegistry } from \"domains/global/selectors\"\n\n// const PROMO_SIGN_UP_CLOUD: PromoProps = { userStatus: \"UNKNOWN\", nodeClaimedStatus: \"NOT_CLAIMED\" } //CLOUD\n// const PROMO_SIGN_IN_CLOUD: PromoProps = {\n// userStatus: \"UNKNOWN\",\n// nodeClaimedStatus: \"CLAIMED\",\n// } //CLOUD\n// const PROMO_IVNITED_TO_SPACE: PromoProps = {\n// userStatus: \"LOGGED_IN\",\n// nodeClaimedStatus: \"CLAIMED\",\n// userNodeAccess: \"NO_ACCESS\",\n// } //CLOUD\n\n// const PROMO_CLAIM_NODE: PromoProps = { userStatus: \"LOGGED_IN\", nodeClaimedStatus: \"NOT_CLAIMED\" } //CLOUD\n// const PROMO_TO_USE_NEW_DASHBAORD: PromoProps = {\n// userStatus: \"LOGGED_IN\",\n// nodeLiveness: \"LIVE\",\n// userNodeAccess: \"ACCESS_OK\",\n// } //UNDEFIND\n\n// const FALLBACK_TO_AGENT: PromoProps = {\n// userStatus: \"LOGGED_IN\",\n// nodeLiveness: \"NOT_LIVE\",\n// userNodeAccess: \"ACCESS_OK\",\n// nodeClaimedStatus: \"CLAIMED\",\n// } //CLOUD\n\n// const NO_INFO_FALLBACK_TO_AGENT: PromoProps = {\n// userStatus: undefined,\n// nodeLiveness: undefined,\n// userNodeAccess: undefined,\n// nodeClaimedStatus: undefined,\n// } //CLOUD\n\n// const GO_TO_CLOUD: PromoProps = {\n// userStatus: \"LOGGED_IN\",\n// nodeLiveness: \"LIVE\",\n// userNodeAccess: \"ACCESS_OK\",\n// nodeClaimedStatus: \"CLAIMED\",\n// } //CLOUD\n\nconst MigrationManager = () => {\n const cloudEnabled = useSelector(selectIsCloudEnabled)\n const registry = useSelector(selectRegistry)\n\n const cloudUrl = useSelector(state =>\n selectSignInUrl({ content: \"agent-auto-redirect\", term: registry.machineGuid })(state as any)\n )\n\n const linkToCoud = useMemo(() => {\n const { href } = window.location\n const redirectURI = encodeURIComponent(href)\n return `${cloudUrl}&redirect_uri=${redirectURI}`\n }, [cloudUrl])\n\n const userNodeAccess = useSelector(selectUserNodeAccess) as PromoProps\n const [isModalOpen, setModalOpen] = useState(false)\n const { migrationModalPromoInfo, setUserPrefrence, userSavedPreference, migrationModalPromo } =\n useMigrationModal({\n ...userNodeAccess,\n })\n\n const preferenceID = migrationModalPromoInfo?.tickBoxOption.preferenceID || \"\"\n\n /**\n * There is seem to be a bug when we are using the useLocalStorage,\n * the value to be returned does not change when preferenceID is changing.\n * For that reason we access the localStorage directly\n */\n const [, savePromoRemindMeSelection] = useLocalStorage(preferenceID)\n const hasPromoSelectionSaved = localStorage.getItem(preferenceID)\n\n const closeModal = () => {\n setModalOpen(false)\n }\n\n const isPromoEligibleForShow =\n cloudEnabled &&\n migrationModalPromoInfo &&\n isModalOpen &&\n (!hasPromoSelectionSaved || hasPromoSelectionSaved === \"undefined\")\n\n const requestRefreshOfAccess = useRequestRefreshOfAccessMessage()\n\n /** We are delaying the show of modal because some time the userNodeAccess is equal to null\n * and only for a few seconds we are showing the NO_INFO modal an the the userNodeAccess\n * has a new value and we show a second modal on top of the other. We dont want this\n * behaviour\n */\n useEffect(() => {\n let showModalTimer = setTimeout(() => setModalOpen(true), 4000)\n return () => {\n clearTimeout(showModalTimer)\n }\n }, [])\n\n useEffect(() => {\n if (goToCloud({ userSavedPreference, ...userNodeAccess })) {\n window.location.href = linkToCoud\n }\n }, [linkToCoud, userNodeAccess, userSavedPreference])\n\n useEffect(() => {\n if (goToAgentDashboard({ userSavedPreference })) console.log(\"Lets go to Agent\")\n }, [userSavedPreference])\n\n useEffect(() => {\n if (isPromoEligibleForShow) {\n document.documentElement.style.overflow = \"hidden\"\n } else {\n document.documentElement.style.overflow = \"auto\"\n }\n }, [isModalOpen, isPromoEligibleForShow])\n\n if (isPromoEligibleForShow)\n return (\n <MigrationModal\n savePromoRemindMeSelection={savePromoRemindMeSelection}\n migrationModalPromoInfo={migrationModalPromoInfo}\n setUserPrefrence={setUserPrefrence}\n closeModal={closeModal}\n migrationModalPromo={migrationModalPromo}\n requestRefreshOfAccess={requestRefreshOfAccess}\n />\n )\n\n return null\n}\n\nexport default MigrationManager\n","import React, { useEffect, useLayoutEffect, useRef, useState } from \"react\"\nimport Ps from \"perfect-scrollbar\"\nimport { ThemeProvider } from \"styled-components\"\n\nimport \"@formatjs/intl-datetimeformat/polyfill\"\nimport \"@formatjs/intl-datetimeformat/locale-data/en\"\nimport \"@formatjs/intl-datetimeformat/add-all-tz\"\n\nimport \"@material/menu-surface/dist/mdc.menu-surface.css\"\n\n// intentionally loading before bootstrap styles\nimport \"./styles/main.css\"\n\n// needs to be included before bootstrap\nimport \"domains/chart/utils/jquery-loader\"\nimport \"bootstrap\"\nimport \"bootstrap-toggle\"\nimport \"bootstrap-toggle/css/bootstrap-toggle.min.css\"\n\nimport { useStore } from \"react-redux\"\nimport \"typeface-ibm-plex-sans\"\nimport \"@fortawesome/fontawesome-free/js/all\"\n\nimport \"styles/fonts.css\"\nimport { loadCss } from \"utils/css-loader\"\nimport { useDateTime } from \"utils/date-time\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectCloudBaseUrl, selectHasFetchedInfo, selectTheme } from \"domains/global/selectors\"\nimport { Portals } from \"domains/chart/components/portals\"\nimport { useChartsMetadata } from \"domains/dashboard/hooks/use-charts-metadata\"\nimport { PrintModal } from \"domains/dashboard/components/print-modal\"\nimport { SidebarSocialMedia } from \"domains/dashboard/components/sidebar-social-media\"\nimport { SidebarSocialMediaPortal } from \"domains/dashboard/components/sidebar-social-media-portal\"\nimport { isPrintMode } from \"domains/dashboard/utils/parse-url\"\nimport useAlarmFromUrl from \"domains/dashboard/hooks/useAlarmFromUrl\"\nimport { useRegistry } from \"hooks/use-registry\"\nimport { useAlarms } from \"hooks/use-alarms\"\nimport { NotificationsContainer } from \"components/notifications-container\"\n\nimport Layout from \"components/layout\"\n\nimport \"./types/global\"\n\nimport { useInfo } from \"hooks/use-info\"\nimport { serverStatic } from \"utils/server-detection\"\nimport { mapTheme } from \"utils/map-theme\"\nimport { netdataCallback, updateLocaleFunctions } from \"./main\"\n\nimport { MigrationManager } from \"@/src/domains/dashboard/components/migration-manager\"\nimport { isDemo } from \"./utils/is-demo\"\nimport { Box } from \"@netdata/netdata-ui\"\nimport { selectIsCloudEnabled } from \"domains/global/selectors\"\n\nconst FakeMargin = Box\n\n// support legacy code\nwindow.Ps = Ps\n\nconst App: React.FC = () => {\n const cloudEnabled = useSelector(selectIsCloudEnabled)\n\n const store = useStore()\n useEffect(() => {\n // todo\n // @ts-ignore\n window.NETDATA.alarms = {}\n // @ts-ignore\n window.NETDATA.pause = callback => {\n callback()\n }\n netdataCallback(store)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n const [refreshHelper, setRefreshHelper] = useState<number>()\n // this is temporary, we will not need it when main.js will be fully refactored\n const haveDOMReadyForParsing = refreshHelper !== undefined\n // a workaround - each time parseDom is run, the portals are rerendered\n const parseDom = useRef(() => {\n setRefreshHelper(Math.random())\n })\n\n useEffect(() => {\n if (haveDOMReadyForParsing) {\n const loadOverlay = document.getElementById(\"loadOverlay\")\n if (loadOverlay) {\n loadOverlay.style.display = \"none\"\n }\n }\n }, [haveDOMReadyForParsing])\n\n const { localeDateString, localeTimeString } = useDateTime()\n useEffect(() => {\n updateLocaleFunctions({\n localeDateString,\n localeTimeString,\n })\n }, [localeDateString, localeTimeString])\n\n useRegistry(true)\n useAlarms(true)\n useInfo(true)\n\n const [hasFetchDependencies, setHasFetchDependencies] = useState(false)\n useLayoutEffect(() => {\n Promise.all([\n loadCss(serverStatic + window.NETDATA.themes.current.bootstrap_css),\n loadCss(serverStatic + window.NETDATA.themes.current.dashboard_css),\n ]).then(() => {\n setHasFetchDependencies(true)\n })\n }, [])\n\n const chartsMetadata = useChartsMetadata()\n const cloudBaseURL = useSelector(selectCloudBaseUrl)\n\n // @ts-ignore\n window.NETDATA.parseDom = parseDom.current\n\n const hasFetchedInfo = useSelector(selectHasFetchedInfo)\n const theme = useSelector(selectTheme)\n useAlarmFromUrl()\n\n return (\n <ThemeProvider theme={mapTheme(theme)}>\n {hasFetchDependencies && (\n // this needs to render after dynamic css files are loaded, otherwise netdata-ui\n // styling will have smaller priority than bootstrap css\n <NotificationsContainer />\n )}\n <></>\n {chartsMetadata && cloudBaseURL && hasFetchedInfo && haveDOMReadyForParsing && (\n <>\n <Layout printMode={isPrintMode}>\n {isDemo ? null : <MigrationManager />}\n {hasFetchDependencies && (\n <>\n <Portals key={refreshHelper} />\n <SidebarSocialMediaPortal>\n <SidebarSocialMedia />\n </SidebarSocialMediaPortal>\n {isPrintMode && <PrintModal />}\n </>\n )}\n </Layout>\n {cloudEnabled && <FakeMargin height={15} />}\n </>\n )}\n </ThemeProvider>\n )\n}\n\nexport default App\n","import { useEffect } from \"react\"\n\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { serverDefault } from \"utils/server-detection\"\nimport { fetchHelloAction } from \"domains/global/actions\"\nimport { selectRegistry } from \"domains/global/selectors\"\n\nexport const useRegistry = (shouldUseRegistry: boolean) => {\n const registry = useSelector(selectRegistry)\n\n const dispatch = useDispatch()\n useEffect(() => {\n if (shouldUseRegistry && !registry.isFetchingHello && !registry.hasFetchedHello\n && !registry.isHelloCallError\n ) {\n dispatch(fetchHelloAction.request({\n serverDefault,\n }))\n }\n }, [dispatch, registry, shouldUseRegistry])\n}\n","import { useEffect } from \"react\"\n\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { startAlarmsAction } from \"domains/global/actions\"\nimport { selectHasStartedAlarms } from \"domains/global/selectors\"\nimport { serverDefault } from \"utils/server-detection\"\n\nexport const useAlarms = (shouldUseAlarms: boolean) => {\n const hasStartedAlarms = useSelector(selectHasStartedAlarms)\n\n const dispatch = useDispatch()\n useEffect(() => {\n if (shouldUseAlarms && !hasStartedAlarms) {\n dispatch(startAlarmsAction({\n serverDefault,\n }))\n }\n }, [dispatch, hasStartedAlarms, shouldUseAlarms])\n}\n","import { useEffect } from \"react\"\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { fetchInfoAction } from \"domains/chart/actions\"\nimport { selectRegistry } from \"domains/global/selectors\"\n\nexport const useInfo = (shouldUseInfo: boolean) => {\n const registry = useSelector(selectRegistry)\n const hasStartedInfo = registry?.hasStartedInfo || false\n const dispatch = useDispatch()\n useEffect(() => {\n if (shouldUseInfo && !hasStartedInfo) {\n dispatch(fetchInfoAction.request({\n poll: false,\n }))\n }\n }, [dispatch, hasStartedInfo, shouldUseInfo])\n}\n","import { useHttp } from \"hooks/use-http\"\nimport { serverDefault } from \"utils/server-detection\"\nimport { ChartsMetadata } from \"domains/global/types\"\n\nexport const useChartsMetadata = () => {\n const [chartsMetadata] = useHttp<ChartsMetadata>(`${serverDefault}api/v1/charts`)\n return chartsMetadata\n}\n","import { useMount } from \"react-use\"\n\nimport { useDispatch } from \"store/redux-separate-context\"\nimport { getHashParams } from \"utils/hash-utils\"\nimport { setAlarmAction, setGlobalPanAndZoomAction } from \"domains/global/actions\"\nimport { alarmStatuses } from \"domains/global/constants\"\n\nexport default () => {\n const dispatch = useDispatch()\n useMount(() => {\n const params = getHashParams()\n const alarmWhen = params[\"alarm_when\"]\n if (alarmWhen) {\n const alarmTime = Number(alarmWhen)\n\n const alarmStatus = params[\"alarm_status\"]\n const alarmChart = params[\"alarm_chart\"]\n const alarmValue = params[\"alarm_value\"]\n if (!alarmStatuses.includes(alarmStatus) || !alarmChart || !alarmValue) {\n return\n }\n\n dispatch(setAlarmAction({\n alarm: {\n chartId: alarmChart,\n status: alarmStatus,\n value: alarmValue,\n when: alarmTime,\n },\n }))\n const PADDING = 1000 * 60 * 5\n dispatch(setGlobalPanAndZoomAction({\n after: alarmTime * 1000 - PADDING,\n before: alarmTime * 1000 + PADDING,\n }))\n }\n })\n}\n","import React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport { Provider } from \"react-redux\"\n\nimport { store } from \"store\"\n\n// resolved in craco.config\n// @ts-ignore\nimport App from \"App\"\n\nimport \"./index.css\"\n\n// todo for static-dashboard:\n// 1) wait for the whole page to load, then render\n// 2) when the whole page is loaded, check window.NETDATA.options set by user and override initial\n// options settings\n\nReactDOM.render(\n <Provider store={store}>\n <App />\n </Provider>,\n document.getElementById(\"root\")\n)\n","import { useCallback, useMemo } from \"react\"\nimport { useDispatch, useSelector } from \"react-redux\"\nimport { createSelector } from \"reselect\"\nimport { useLocalStorage } from \"react-use\"\nimport { showSignInModalAction } from \"domains/dashboard/actions\"\nimport { selectSignInUrl, selectRegistry } from \"domains/global/selectors\"\nimport { NETDATA_REGISTRY_SERVER } from \"utils/utils\"\n\nconst isRegistrySelector = createSelector(\n selectRegistry,\n ({ registryServer }) => registryServer === NETDATA_REGISTRY_SERVER\n)\n\nconst offlineSelector = createSelector(\n ({ dashboard }) => dashboard,\n ({ offline }) => offline\n)\n\nconst SignIn = ({ children, utmParameters }) => {\n const [hasSignedInBefore] = useLocalStorage(\"has-sign-in-history\")\n const signInUrl = useSelector(state => selectSignInUrl(utmParameters)(state))\n const isRegistry = useSelector(isRegistrySelector)\n const offline = useSelector(offlineSelector)\n\n const dispatch = useDispatch()\n\n const link = useMemo(() => {\n const { href } = window.location\n const redirectURI = encodeURIComponent(href)\n return `${signInUrl}&redirect_uri=${redirectURI}`\n }, [signInUrl])\n\n const onSignIn = useCallback(\n () =>\n dispatch(\n showSignInModalAction({\n signInLinkHref: link,\n })\n ),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [link]\n )\n\n return useMemo(\n () =>\n typeof children === \"function\"\n ? children({ isRegistry, link, onSignIn, offline, hasSignedInBefore })\n : children,\n [children, isRegistry, link, onSignIn, offline, hasSignedInBefore]\n )\n}\n\nexport default SignIn\n","/* eslint-disable comma-dangle */\n/* eslint-disable implicit-arrow-linebreak */\nimport { omit, pipe, mergeDeepLeft } from \"ramda\"\n\ntype HashParams = { [param: string]: string }\nconst fragmentParamsSeparatorRegEx = /[&;]/\nconst fragmentParamsSeparator = \";\"\n\nexport const getHashParams = (\n hash = decodeURIComponent(window.location.hash.substr(1))\n): HashParams => {\n if (hash.length === 0) {\n return {}\n }\n const params = hash.split(fragmentParamsSeparatorRegEx)\n const response = params.reduce((acc: HashParams, current) => {\n const parts = current.split(\"=\")\n const [param, value] = parts\n acc[param] = value\n return acc\n }, {})\n return response\n}\n\nexport const makeHashFromObject = (params: { [paramKey: string]: string }) => {\n const entries = Object.entries(params)\n if (entries.length === 0) {\n return \"\"\n }\n return entries\n .map(([key, value]) => (value === undefined ? key : `${key}=${encodeURIComponent(value)}`))\n .join(fragmentParamsSeparator)\n}\n\nexport const getFilteredHash = (\n excludedParams: string[],\n hash = decodeURIComponent(window.location.hash.substr(1))\n) => {\n const filteredParams = omit(excludedParams, getHashParams(hash))\n return makeHashFromObject(filteredParams)\n}\n\nexport const getUniqueParamsHash = pipe(getHashParams, makeHashFromObject)\n\nexport const setHashParams = (params: { [paramKey: string]: string }) => {\n const allParams = getHashParams()\n const allParamsResult = mergeDeepLeft(params, allParams)\n window.history.replaceState(window.history.state, \"\", `#${makeHashFromObject(allParamsResult)}`)\n}\n\nexport const getHashParam = (\n param: string,\n hash = decodeURIComponent(window.location.hash.substr(1))\n): string => getHashParams(hash)[param]\n\nexport const hasHashParam = (\n param: string,\n hash = decodeURIComponent(window.location.hash.substr(1))\n): boolean => getHashParams(hash)[param] !== undefined\n\nexport const removeHashParams = (params: string[]) => {\n window.history.replaceState(window.history.state, \"\", `#${getFilteredHash(params)}`)\n}\n","import { useEffect, useCallback, useState } from \"react\"\n\ntype IframesMessageType =\n | \"spaces\"\n | \"workspaces\"\n | \"hello-from-spaces-bar\"\n | \"hello-from-space-panel\"\n | \"hello-from-sign-in\"\n | \"is-signed-in\"\n | \"streamed-hosts-data\"\n | \"has-focus\"\n | \"iframe-focus-change\"\n | \"synced-private-registry\"\n | \"set-is-logout-dropdown-opened\"\n | \"user-node-access\"\n | \"request-refresh-access\"\n\ninterface IframesMessage<T = unknown> {\n type: IframesMessageType\n payload: T\n}\n\nexport const sendToChildIframe = (\n htmlIframeElement: HTMLIFrameElement | string,\n message: IframesMessage\n) => {\n const iframeElement =\n typeof htmlIframeElement === \"string\"\n ? (document.getElementById(htmlIframeElement) as HTMLIFrameElement)\n : htmlIframeElement\n\n if (iframeElement.contentWindow) {\n iframeElement.contentWindow.postMessage(message, \"*\")\n }\n}\n\nexport const useListenToPostMessage = <T>(\n messageType: IframesMessageType,\n callback?: (newMessage: T) => void,\n defaultState?: T | (() => T)\n): [T | undefined, () => void] => {\n const [lastMessage, setLastMessage] = useState<T | undefined>(defaultState)\n const handleMessage = useCallback(\n message => {\n const data = message.data as IframesMessage<T>\n if (data.type === messageType) {\n setLastMessage(data.payload)\n if (callback) {\n callback(data.payload)\n }\n }\n },\n [callback, messageType]\n )\n const resetMesssage = useCallback(() => {\n setLastMessage(defaultState as T)\n }, [defaultState])\n useEffect(() => {\n window.addEventListener(\"message\", handleMessage)\n return () => {\n window.removeEventListener(\"message\", handleMessage)\n }\n }, [handleMessage, messageType])\n return [lastMessage, resetMesssage]\n}\n","export const isMainJs = process.env.REACT_APP_IS_MAIN_DASHBOARD\nexport const isTestingEnv = process.env.NODE_ENV === \"test\"\nexport const isDevelopmentEnv = process.env.NODE_ENV === \"development\"\n","export const storeKey = \"dashboard\"\n","import { createContext } from \"react\"\nimport {\n createDispatchHook, createSelectorHook, ReactReduxContextValue,\n useSelector as useSelectorOriginal,\n useDispatch as useDispatchOriginal,\n} from \"react-redux\"\n\nconst shouldUseDefaultContext = process.env.REACT_APP_SHOULD_USE_DEFAULT_CONTEXT\n\nexport const dashboardReduxContext = shouldUseDefaultContext\n ? undefined\n : createContext<ReactReduxContextValue>(undefined as any)\n\nexport const useSelector = dashboardReduxContext\n ? createSelectorHook(dashboardReduxContext)\n : useSelectorOriginal\nexport const useDispatch = dashboardReduxContext\n ? createDispatchHook(dashboardReduxContext)\n : useDispatchOriginal\n","const isPrintMode = window.location.hash.split(\";\").includes(\"help=true\")\n\nconst getIsDemo = () => {\n if (isPrintMode) {\n return false\n }\n const { hostname } = document.location\n return (\n hostname.endsWith(\".my-netdata.io\")\n || hostname.endsWith(\".mynetdata.io\")\n || hostname.endsWith(\".netdata.rocks\")\n || hostname.endsWith(\".netdata.ai\")\n || hostname.endsWith(\".netdata.live\")\n || hostname.endsWith(\".firehol.org\")\n || hostname.endsWith(\".netdata.online\")\n || hostname.endsWith(\".netdata.cloud\")\n )\n}\n\nexport const isDemo = getIsDemo()\n","import { prop, path } from \"ramda\"\nimport { createSelector } from \"reselect\"\n\nimport { AppStateT } from \"store/app-state\"\nimport { utmUrlSuffix } from \"utils/utils\"\nimport { alwaysEndWithSlash } from \"utils/server-detection\"\n\nimport { GetKeyArguments, getKeyForCommonColorsState } from \"./reducer\"\nimport { storeKey } from \"./constants\"\nimport { OptionsKey } from \"./options\"\n\nconst NETDATA_REGISTRY_SERVER = \"https://registry.my-netdata.io\"\n\nexport const createSelectAssignedColors = (args: GetKeyArguments) => (state: AppStateT) => {\n const keyName = getKeyForCommonColorsState(args)\n const substate = state[storeKey].commonColorsKeys[keyName]\n return substate && substate.assigned\n}\n\nexport const selectGlobal = (state: AppStateT) => state.global\n\nexport const selectCommonMin = createSelector(\n selectGlobal,\n (_: unknown, commonMinKey: string) => commonMinKey,\n (globalState, commonMinKey) => (\n globalState.commonMin[commonMinKey]\n ),\n)\n\nexport const selectCommonMax = createSelector(\n selectGlobal,\n (_: unknown, commonMaxKey: string) => commonMaxKey,\n (globalState, commonMaxKey) => (\n globalState.commonMax[commonMaxKey]\n ),\n)\n\nexport const selectGlobalSelection = createSelector(selectGlobal, prop(\"hoveredX\"))\n\nexport const selectGlobalSelectionMaster = createSelector(\n selectGlobal,\n prop(\"currentSelectionMasterId\"),\n)\n\nexport const selectGlobalPanAndZoom = createSelector(selectGlobal, prop(\"globalPanAndZoom\"))\n\nexport const selectDefaultAfter = createSelector(selectGlobal, prop(\"defaultAfter\"))\n\nexport const selectGlobalChartUnderlay = createSelector(selectGlobal, prop(\"globalChartUnderlay\"))\n\nexport const selectHasWindowFocus = createSelector(selectGlobal, prop(\"hasWindowFocus\"))\nexport const selectGlobalPause = createSelector(selectGlobal, prop(\"globalPause\"))\n\nexport const selectSnapshot = createSelector(\n selectGlobal,\n prop(\"snapshot\"),\n)\n\nexport const selectRegistry = createSelector(selectGlobal, prop(\"registry\"))\n\nexport const selectCloudBaseUrl = createSelector(selectRegistry, prop(\"cloudBaseURL\"))\n\nexport const utmParametersToString = (utmParameters = {}) =>\n Object.keys(utmParameters).reduce((acc, key) => (acc += `&utm_${key}=${utmParameters[key]}`), \"\")\n\nexport const selectSignInUrl = utmParameters =>\n createSelector(selectRegistry, selectCloudBaseUrl, (registry, cloudBaseURL) => {\n const name = encodeURIComponent(registry.hostname)\n const origin = encodeURIComponent(\n alwaysEndWithSlash(window.location.origin + window.location.pathname)\n )\n // not adding redirect_url - it needs to always be based on newest href\n // eslint-disable-next-line max-len\n return `${cloudBaseURL}/sign-in?id=${\n registry.machineGuid\n }&name=${name}&origin=${origin}${utmUrlSuffix}${utmParametersToString(utmParameters)}`\n })\n\nexport const selectIsFetchingHello = createSelector(selectRegistry, prop(\"isFetchingHello\"))\nexport const selectIsUsingGlobalRegistry = createSelector(\n selectRegistry,\n ({ registryServer }) => registryServer && (registryServer !== NETDATA_REGISTRY_SERVER),\n)\n\n// currently cloud-base-url is taken from registry?action=hello call, which returns error\n// if Agent+browser are configured to respect do-not-track\nexport const selectIsCloudEnabled = createSelector(\n selectRegistry,\n (registry) => registry.isCloudEnabled && !registry.isHelloCallError,\n)\nexport const selectHasFetchedInfo = createSelector(selectRegistry, prop(\"hasFetchedInfo\"))\nexport const selectFullInfoPayload = createSelector(selectRegistry, prop(\"fullInfoPayload\"))\n\nexport const selectHasStartedAlarms = createSelector(\n selectGlobal,\n path([\"alarms\", \"hasStartedAlarms\"]),\n)\nexport const selectActiveAlarms = createSelector(\n selectGlobal,\n (global) => global.alarms.activeAlarms,\n)\n\nexport const selectAlarm = createSelector(\n selectGlobal,\n (global) => global.alarm\n)\n\nexport const selectSpacePanelIsActive = createSelector(selectGlobal, prop(\"spacePanelIsActive\"))\nexport const selectSpacePanelTransitionEndIsActive = createSelector(\n selectGlobal, prop(\"spacePanelTransitionEndIsActive\"),\n)\n\nexport const selectOptions = createSelector(selectGlobal, global => global.options)\n\nexport const createSelectOption = <T extends OptionsKey>(optionName: T) => (\n createSelector(selectOptions, (options) => options[optionName])\n)\n\nexport const selectDestroyOnHide = createSelectOption(\"destroy_on_hide\")\nexport const selectStopUpdatesWhenFocusIsLost = createSelectOption(\n \"stop_updates_when_focus_is_lost\",\n)\nexport const selectShouldEliminateZeroDimensions = createSelectOption(\"eliminate_zero_dimensions\")\nexport const selectIsAsyncOnScroll = createSelectOption(\"async_on_scroll\")\n\nexport const selectParallelRefresher = createSelectOption(\"parallel_refresher\")\nexport const selectConcurrentRefreshes = createSelectOption(\"concurrent_refreshes\")\nexport const selectSyncSelection = createSelectOption(\"sync_selection\")\nexport const selectSyncPanAndZoom = createSelectOption(\"sync_pan_and_zoom\")\n\nexport const selectTheme = createSelectOption(\"theme\")\nexport const selectShowHelp = createSelectOption(\"show_help\")\nexport const selectPanAndZoomDataPadding = createSelectOption(\"pan_and_zoom_data_padding\")\nexport const selectSmoothPlot = createSelectOption(\"smooth_plot\")\n\nexport const selectUnitsScalingMethod = createSelectOption(\"units\")\nexport const selectTemperatureSetting = createSelectOption(\"temperature\")\nexport const selectSecondsAsTimeSetting = createSelectOption(\"seconds_as_time\")\nexport const selectTimezoneSetting = createSelectOption(\"timezone\")\nexport const selectUTCOffsetSetting = createSelectOption(\"utcOffset\")\nexport const selectUserSetServerTimezone = createSelectOption(\"user_set_server_timezone\")\n\nexport const selectChartsMetadata = createSelector(\n selectGlobal,\n (global) => global.chartsMetadata.data,\n)\n\nexport const selectChartMetadataFromChartsCall = createSelector(\n selectChartsMetadata,\n (_: unknown, { chartId }: { chartId: string, id: string }) => chartId,\n (allMetadata, chartId) => allMetadata?.charts[chartId],\n)\n\nexport const selectUserNodeAccess = createSelector(selectGlobal, global => global.userNodeAccess)\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { Text, getColor } from \"@netdata/netdata-ui\"\n\nconst BaseAnchor = styled(\"a\")`\n && {\n color: ${getColor(\"primary\")};\n\n :hover {\n color: ${getColor(\"primary\")};\n }\n\n :visited {\n color: ${getColor(\"accent\")};\n }\n }\n`\n\ntype AnchorProps = React.ComponentPropsWithRef<\"a\"> & {\n Component?: React.ElementType\n}\n\nconst Anchor = ({ Component = Text, ...rest }: AnchorProps): any => (\n <Component as={BaseAnchor} {...rest} />\n)\n\nexport default Anchor\n","import { createAction } from \"redux-act\"\n\n// slightly simplified version of the creator used in the cloud\n// we will unify it when some typing issues will be fixed (cloud version didn't warn on bad payload)\nexport const createRequestAction = <RequestT, SuccessT = any, FailureT = any>(name: string) => {\n const action = createAction<RequestT>(name.toUpperCase())\n\n return Object.assign(action, {\n request: action,\n success: createAction<SuccessT>(\n `${name.toUpperCase()}_SUCCESS`,\n (payload) => payload,\n (meta) => meta,\n ),\n failure: createAction<FailureT>(\n `${name.toUpperCase()}_FAILURE`,\n (payload) => payload,\n (meta) => ({\n ...meta,\n error: true,\n }),\n ),\n })\n}\n","import { mergeAll, mergeRight } from \"ramda\"\nimport { LOCALSTORAGE_HEIGHT_KEY_PREFIX } from \"domains/chart/components/resize-handler\"\nimport { DashboardTheme } from \"utils/map-theme\"\n\nexport const SYNC_PAN_AND_ZOOM = \"sync_pan_and_zoom\"\nexport const STOP_UPDATES_WHEN_FOCUS_IS_LOST = \"stop_updates_when_focus_is_lost\"\nexport const DESTROY_ON_HIDE = \"destroy_on_hide\"\nexport const THEME = \"theme\"\nexport const LEGEND_RIGHT = \"legend_right\"\n\nexport const themeLocalStorageKey = \"netdataTheme\"\n\n/* eslint-disable camelcase */\n\nexport interface Options {\n // performance options\n [STOP_UPDATES_WHEN_FOCUS_IS_LOST]: boolean\n eliminate_zero_dimensions: boolean\n [DESTROY_ON_HIDE]: boolean\n async_on_scroll: boolean\n\n // synchronization options\n parallel_refresher: boolean\n concurrent_refreshes: boolean\n sync_selection: boolean\n [SYNC_PAN_AND_ZOOM]: boolean\n\n // visual options\n [LEGEND_RIGHT]: boolean\n [THEME]: DashboardTheme\n show_help: boolean\n pan_and_zoom_data_padding: boolean\n smooth_plot: boolean\n\n // locale options\n units: \"auto\" | \"original\"\n temperature: \"celsius\" | \"fahrenheit\"\n seconds_as_time: boolean\n timezone: string\n user_set_server_timezone: string\n utcOffset: number | string\n}\nexport type OptionsKey = keyof Options\n\n// those options have been created around 2015/2016 and some of them are not needed anymore\n// so we need to revisit them, test their impact, etc.\n\nexport const INITIAL_OPTIONS: Options = {\n // performance options\n\n // boolean - shall we stop auto-refreshes when document does not have user focus\n [STOP_UPDATES_WHEN_FOCUS_IS_LOST]: true,\n // do not show dimensions with just zeros\n eliminate_zero_dimensions: true,\n // destroy charts when they are not visible\n [DESTROY_ON_HIDE]: false, // eventually apply slow device detection\n async_on_scroll: false,\n\n // synchronization options\n // enable parallel refresh of charts\n parallel_refresher: true, // eventually apply slow device detection\n // when parallel_refresher is enabled, sync also the charts\n concurrent_refreshes: true,\n // enable or disable selection sync\n sync_selection: true,\n // enable or disable pan and zoom sync\n [SYNC_PAN_AND_ZOOM]: true,\n\n // visual options\n [LEGEND_RIGHT]: false,\n [THEME]: \"slate\",\n // when enabled the charts will show some help\n // when there's no bootstrap, we can't show it\n show_help: Boolean(window.netdataShowHelp) && !window.netdataNoBootstrap,\n // fetch more data for the master chart when panning or zooming\n pan_and_zoom_data_padding: true,\n // enable smooth plot, where possible\n smooth_plot: true, // eventually apply slow device detection\n\n // locale options\n units: \"auto\", // auto or original\n temperature: \"celsius\",\n seconds_as_time: true, // show seconds as DDd:HH:MM:SS ?\n timezone: \"default\", // the timezone to use, or 'default'\n user_set_server_timezone: \"default\", // as set by the user on the dashboard\n utcOffset: 0,\n}\n\nconst localStorageKeyToOption = <T extends string>(key: T) =>\n key.replace(/^options\\./, \"\").replace(themeLocalStorageKey, THEME)\n\nconst getItemFromLocalStorage = <T extends string>(key: T) => {\n const value = localStorage.getItem(key)\n // \"undefined\" (deliberate as a string) to support \"options.setOptionCallback\", an old property\n // used in old dashboard. users will still have it, so we need to support it for some time\n if (value === null || value === \"undefined\") {\n localStorage.removeItem(key)\n return null\n }\n let parsed\n try {\n parsed = JSON.parse(value)\n } catch (e) {\n // todo fix after main.js refactor\n // special case for netdataTheme, only this option is not boolean\n if (key === themeLocalStorageKey && value) {\n return value\n }\n\n console.log(`localStorage: failed to read \"${key}\", using default`) // eslint-disable-line no-console, max-len\n // it was not present in old dashboard, but it probably makes sense to remove broken values\n localStorage.removeItem(key)\n return null\n }\n return parsed\n}\n\nexport const getOptionsMergedWithLocalStorage = (): Options => {\n const optionsFromLocalStorage = Object.keys(localStorage)\n .filter(key => key.startsWith(\"options.\") || key === themeLocalStorageKey)\n .map(key => ({\n [localStorageKeyToOption(key)]: getItemFromLocalStorage(key),\n }))\n .filter(o => Object.values(o)[0] !== null)\n\n const overridenOptions = mergeAll(optionsFromLocalStorage) as unknown as Options\n return mergeRight(INITIAL_OPTIONS, overridenOptions)\n}\n\nexport const optionsMergedWithLocalStorage = getOptionsMergedWithLocalStorage()\nexport const initialLegendRight = optionsMergedWithLocalStorage[LEGEND_RIGHT]\n\nexport const clearLocalStorage = () => {\n const localStorageKeys = Object.keys(localStorage)\n localStorageKeys.forEach(key => {\n if (key.startsWith(LOCALSTORAGE_HEIGHT_KEY_PREFIX) || key.startsWith(\"options.\")) {\n localStorage.removeItem(key)\n }\n })\n}\n"],"sourceRoot":""}
\ No newline at end of file |