summaryrefslogtreecommitdiffstats
path: root/src/web/gui/v2/8059.c88ad65e1926faee2379.chunk.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/gui/v2/8059.c88ad65e1926faee2379.chunk.js')
-rw-r--r--src/web/gui/v2/8059.c88ad65e1926faee2379.chunk.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/web/gui/v2/8059.c88ad65e1926faee2379.chunk.js b/src/web/gui/v2/8059.c88ad65e1926faee2379.chunk.js
new file mode 100644
index 000000000..ee584a8f8
--- /dev/null
+++ b/src/web/gui/v2/8059.c88ad65e1926faee2379.chunk.js
@@ -0,0 +1 @@
+!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c9704d9d-ca79-45da-9e3f-f952d471a9f2",e._sentryDebugIdIdentifier="sentry-dbid-c9704d9d-ca79-45da-9e3f-f952d471a9f2")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"08864407160b3973b9b88c5ae92687282b21e2f4"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[8059],{62232:(e,t,a)=>{a.d(t,{A:()=>g});var l=a(58168),n=(a(17333),a(41393),a(98992),a(54520),a(81454),a(8711)),r=a(68090),c=a.n(r),o=a(96540),i=a(10058);const s=(0,n.default)(i.Box).withConfig({displayName:"breadcrumbs__StyledItemContainer",componentId:"sc-3u39st-0"})([""]),d=(0,n.css)(["&:hover{color:",";}"],(e=>{let{withHover:t,theme:a}=e;return t&&(0,i.getColor)("success")({theme:a})})),u=(0,n.default)(i.Text).withConfig({displayName:"breadcrumbs__StyledText",componentId:"sc-3u39st-1"})(["",""],d),m=(0,n.default)(i.TextSmall).withConfig({displayName:"breadcrumbs__StyledTextSmall",componentId:"sc-3u39st-2"})(["",""],d),g=e=>{let{items:t,isBig:a,showBackButton:n=!0,testid:r="",...d}=e;const g=(0,o.useMemo)((()=>{if(null===t||void 0===t||!t.length||!n)return null;return c()(t.filter((e=>{let{onClick:t}=e;return!!t}))).onClick}),[t,n]);if(null===t||void 0===t||!t.length)return null;const h=a?u:m;return o.createElement(i.Flex,(0,l.A)({gap:4},d),n&&o.createElement(i.Button,{onClick:g,icon:"chevron_left",label:"Back",neutral:!0,flavour:"hollow",small:!0,padding:[0,2,0,1],textTransform:"uppercase","data-testid":"".concat(r,"-breadcrumbs-backButton")}),o.createElement(i.Flex,{gap:2,alignItems:"center"},t.map(((e,t)=>{let{isDisabled:a,name:n,onClick:c}=e;return o.createElement(s,(0,l.A)({key:t,alignItems:"center"},c&&{cursor:"pointer",onClick:c},{"data-testid":"".concat(r,"-breadcrumbs-level-").concat(t)}),o.createElement(h,{color:a&&"textLite","data-testid":"".concat(r,"-breadcrumbs-level-").concat(t),withHover:!!c},0!==t&&" / ",n))}))))}},88059:(e,t,a)=>{a.r(t),a.d(t,{default:()=>pe});var l=a(96540),n=a(47444),r=a(51074),c=a(83084),o=a(96935),i=a(99292),s=(a(62953),a(10058)),d=a(67990),u=a(99739),m=a(64118),g=a(23452),h=a(28738),f=(a(41393),a(81454),a(58168)),b=a(8711),C=a(40267),E=a(33195);const y=(0,b.default)(s.Text).attrs({whiteSpace:"normal",wordBreak:"break-word"}).withConfig({displayName:"tableSchema__TextCell",componentId:"sc-u3gyvm-0"})([""]),v=e=>t=>{let{getValue:a}=t;return l.createElement(y,e,a())},p=(0,b.default)(s.Icon).withConfig({displayName:"tableSchema__StyledIcon",componentId:"sc-u3gyvm-1"})(["vertical-align:middle;"]),A=e=>{let{flavour:t,value:a,...n}=e;return l.createElement(s.Flex,(0,f.A)({padding:[0,2]},n,{justifyContent:"center"}),0===a?l.createElement(y,{textAlign:"center"},"-"):l.createElement(C.A,{flavour:t,"data-testid":"alertView-alertPill-".concat(t)},a))},w={id:"chevron",header:"",cell:()=>l.createElement(p,{rotate:2,name:"chevron_left",color:"textDescription"})},I={displayName:!1},x=[{id:"summary",accessorKey:"summary",header:"Alert",cell:e=>{let{getValue:t}=e;return l.createElement(y,{"data-testid":"alertName"},t())},fullWidth:!0},{id:"nodesRunningAlert",accessorKey:"nodeCount",header:"Nodes Running Alert",cell:e=>{let{getValue:t}=e;return l.createElement(y,{textAlign:"center","data-testid":"nodesRunningAlert"},t())}},{id:"alertInstances",accessorKey:"instanceCount",header:"Alert Instances",cell:e=>{let{getValue:t}=e;return l.createElement(y,{textAlign:"center","data-testid":"alertInstances"},t())}},{id:"criticalNodes",accessorKey:"criticalCount",header:"Critical",cell:e=>{let{getValue:t}=e;return l.createElement(A,{flavour:"critical",value:t(),"data-testid":"criticalNodes"})}},{id:"warningNodes",accessorKey:"warningCount",header:"Warning",cell:e=>{let{getValue:t}=e;return l.createElement(A,{flavour:"warning",value:t(),"data-testid":"warningNodes"})}},{id:"clearNodes",accessorKey:"clearCount",header:"Clear",cell:e=>{let{getValue:t}=e;return l.createElement(A,{flavour:"clear",value:t(),"data-testid":"clearNodes"})}},{id:"errorNodes",accessorKey:"errorCount",header:"Error",cell:e=>{let{getValue:t}=e;return l.createElement(A,{flavour:"neutral",value:t(),"data-testid":"errorNodes"})}},{id:"uniqueConfigs",accessorKey:"configCount",header:"Configs",cell:e=>{let{getValue:t}=e;return l.createElement(y,{textAlign:"center","data-testid":"uniqueConfigs"},t())}},{id:"silencing",accessorKey:"silencing",header:"Silencing",cell:e=>{let{getValue:t}=e;return l.createElement(E.A,{silencing:t()})}},{id:"displayName",accessorKey:"displayName",header:"Name",cell:e=>{let{getValue:t}=e;return l.createElement(y,{"data-testid":"alertName"},t())}}];var N=a(45976),T=a(87815),k=a(47762);const S=(0,b.default)(s.TextSmall).withConfig({displayName:"styled__StyledLinkText",componentId:"sc-1y769u1-0"})(["",""],"\n cursor: pointer;\n overflow-wrap: break-word;\n max-width: 140px;\n &:hover {\n opacity: 0.7;\n }\n"),V=(0,b.default)(s.TextSmall).withConfig({displayName:"styled__StyledText",componentId:"sc-1y769u1-1"})(["&:hover{color:",";text-decoration:underline;}"],(0,s.getColor)("accent"));var K=a(75793),_=a(4659),D=a(29217),R=a(63119),F=a(69418),L=a(73865),B=a(93155);const M=e=>{let{row:t,value:a,openModal:n}=e;const{id:r,info:c}=t.original,o=(0,l.useCallback)((()=>{n({alertId:r})}),[r]);return l.createElement(_.A,{Component:s.TextSmall,flavour:"tableLink",cursor:"pointer",showToolTip:!0,content:c,onClick:o,"data-testid":"alertsTableSchema-alertName-".concat(a),"data-ga":"alerts-table::click-alert::alerts-view::".concat(a)},a)},P=e=>{let{row:t,nodeId:a}=e;const{id:n}=t.original,r=(0,k.xY)(a,"name"),c=(0,k.d3)(a,{alertId:n}),[,,o]=(0,F.A)(),{hasLimitations:i,maxNodes:d,preferredNodes:u}=(0,L.A)(),m=B.bO&&i&&o>d&&!u.includes(a);return l.createElement(s.Flex,{width:35,"data-testid":"alertsTableSchema-nodeName-".concat(r),"data-ga":"alerts-table::click-node::alerts-view::".concat(r)},m?l.createElement(D.A,{content:l.createElement(R.u,{name:r}),align:"bottom",isBasic:!0},l.createElement(s.Flex,{gap:1},l.createElement(s.Icon,{name:"padlock",size:"small",color:"text"}),l.createElement(s.Text,null,l.createElement(K.A,{text:r,TextComponent:s.Text})))):l.createElement(S,{onClick:c},l.createElement(K.A,{text:r,TextComponent:V})))},W=e=>{let{row:t,value:a}=e;const{id:n,nodeId:r,instanceName:c}=t.original,o=(0,k.d3)(r,{alertId:n});return l.createElement(s.Flex,{"data-testid":"alertsTableSchema-chart-id-".concat(a),"data-ga":"alerts-table::click-chartId::alerts-view::".concat(a)},l.createElement(S,{onClick:o},l.createElement(K.A,{TextComponent:V,text:c})))},z={displayName:!1},G=e=>{let{openModal:t}=e;return[{id:"status",accessorKey:"status",header:"Status",cell:e=>{let{getValue:t}=e;return l.createElement(C.A,{flavour:t(),"data-testid":"alertsTable-alertPill","data-ga":"alerts-table::click-status::alerts-view::".concat(t())},t())}},{id:"summary",accessorKey:"summary",header:"Alert",cell:e=>{let{row:a,getValue:n}=e;return l.createElement(M,{row:a,value:n(),openModal:t})},fullWidth:!0},{id:"instance",header:"Instance",accessorKey:"instance",cell:e=>{let{row:t,getValue:a}=e;return l.createElement(W,{row:t,value:a()})}},{id:"nodeName",header:"Node",accessorKey:"nodeId",cell:e=>{let{row:t,getValue:a}=e;return l.createElement(P,{row:t,nodeId:a()})}},{id:"value",header:"Latest value",accessorKey:"value",cell:e=>{let{row:t,getValue:a}=e;const{status:n,units:r}=t.original;return l.createElement(N.A,{loaded:!0,status:n,units:r,value:a(),"data-testid":"alertsTableSchema-alertValue","data-ga":"alerts-table::click-alert-value::alerts-view"})}},{id:"lastUpdated",header:"Updated at",accessorKey:"lastUpdated",cell:e=>{let{getValue:t}=e;return l.createElement(T.A,{rawTime:t(),secs:!0,"data-testid":"alertsTableSchema-latestUpdated"})}},{id:"lastStatusChangeValue",header:"Triggered value",accessorKey:"lastStatusChangeValue",cell:e=>{let{row:t,getValue:a}=e;const{status:n,units:r}=t.original;return l.createElement(N.A,{loaded:!0,status:n,units:r,value:a(),"data-testid":"alertsTableSchema-triggeredValue","data-ga":"alerts-table::click-triggered-value::alerts-view"})}},{id:"lastStatusChange",header:"Triggered at",accessorKey:"lastStatusChange",cell:e=>{let{getValue:t}=e;return l.createElement(T.A,{rawTime:t(),secs:!0,"data-testid":"alertsTableSchema-lastStatusChange"})}},{id:"displayName",accessorKey:"displayName",header:"Name",cell:e=>{let{row:a,getValue:n}=e;return l.createElement(M,{row:a,value:n(),openModal:t})}},{id:"silencing",accessorKey:"silencing",header:"Silencing",cell:e=>{let{getValue:t}=e;return l.createElement(E.A,{silencing:t()})}}]},j=[{id:"summary",accessorKey:"summary",header:"Alert",cell:v({"data-testid":"alertInstanceName"}),fullWidth:!0},{id:"instance",header:"Instance",accessorKey:"instance",cell:e=>{let{row:t,getValue:a}=e;return l.createElement(W,{row:t,value:a()})}},{id:"status",accessorKey:"status",header:"Status",cell:e=>{let{getValue:t}=e;return l.createElement(s.Flex,{padding:[0,2]},l.createElement(C.A,{flavour:t(),"data-testid":"alertView-alertPill-value",border:void 0},t()))},size:80},{id:"lastStatusChangeValue",accessorKey:"lastStatusChangeValue",header:"Triggered value",cell:e=>{let{getValue:t,row:a}=e;const{status:n,units:r}=a.original;return l.createElement(N.A,{loaded:!0,status:n,units:r,value:t(),"data-testid":"alertsTableSchema-alertValue"})}},{id:"lastStatusChange",accessorKey:"lastStatusChange",header:"Triggered at",cell:e=>{let{getValue:t}=e;return l.createElement(T.A,{rawTime:t(),secs:!0,nowrap:!0})}},{id:"displayName",accessorKey:"displayName",header:"Name",cell:v({"data-testid":"alertInstanceName"})}];var q=a(92136);const U={right:["actions"]},H=()=>{const[{alertName:e,nodeId:t}]=(0,m.DV)(),a=(0,m.q1)(e,t),[n,r,,c]=(0,q.A)(),o=(0,l.useCallback)((e=>r({alertId:e.data.id})),[e,t]);return l.createElement(l.Fragment,null,l.createElement(s.Table,{data:a,dataColumns:j,onClickRow:o,enableSorting:!0,enableColumnVisibility:!0,enableResizing:!0,columnPinning:U}),n&&c)};a(14905),a(98992),a(8872),a(25509),a(65223),a(60321),a(41927),a(11632),a(64377),a(66771),a(12516),a(68931),a(52514),a(35694),a(52774),a(49536),a(21926),a(94483),a(16215);var J=a(54830);const O=[{id:"nodeName",accessorKey:"nodeId",header:"Node",cell:e=>{let{getValue:t,row:a}=e;const[,,n]=(0,F.A)(),{hasLimitations:r,maxNodes:c,preferredNodes:o}=(0,L.A)(),i=r&&n>c,s=(0,k.xY)(t(),"name");return l.createElement(J.A,{nodeId:a.original.nodeId,name:s,preferredNodes:o,showLockedNodes:i})}},{id:"nodes",accessorKey:"nodeCount",header:"Node Instances",cell:v({"data-testid":"nodes",textAlign:"center"})},{id:"instances",accessorKey:"instanceCount",header:"Alert Instances",cell:v({"data-testid":"instances",textAlign:"center"})},{id:"critical",accessorKey:"criticalCount",header:"Critical",cell:e=>{let{getValue:t}=e;return l.createElement(A,{flavour:"critical",value:t()})}},{id:"warning",accessorKey:"warningCount",header:"Warning",cell:e=>{let{getValue:t}=e;return l.createElement(A,{flavour:"warning",value:t()})}},{id:"clear",accessorKey:"clearCount",header:"Clear",cell:e=>{let{getValue:t}=e;return l.createElement(A,{flavour:"clear",value:t()})}},{id:"error",accessorKey:"errorCount",header:"Error",cell:e=>{let{getValue:t}=e;return l.createElement(A,{flavour:"neutral",value:t(),"data-testid":"errors"})}},{id:"configs",accessorKey:"configCount",header:"Configs",cell:v({"data-testid":"configs",textAlign:"center"})},w],Y={right:["actions"]},Q=()=>{const[{alertName:e},t]=(0,m.DV)(),a=(0,m.q1)(e),n=(0,l.useCallback)((a=>{t({alertName:e,nodeId:a.data.nodeId})}),[e,t]),r=(0,l.useMemo)((()=>Object.values(a.reduce(((e,t)=>{switch(e[t.nodeId]||(e[t.nodeId]={nodeId:t.nodeId,nodeCount:1,instanceCount:0,criticalCount:0,warningCount:0,clearCount:0,errorCount:0,configCount:0,configs:new Set}),e[t.nodeId].instanceCount=e[t.nodeId].instanceCount+1,t.status){case"warning":e[t.nodeId].warningCount=e[t.nodeId].warningCount+1;break;case"critical":e[t.nodeId].criticalCount=e[t.nodeId].criticalCount+1;break;case"clear":e[t.nodeId].clearCount=e[t.nodeId].clearCount+1;break;default:t.value||(e[t.nodeId].errorCount=e[t.nodeId].errorCount+1)}return e[t.nodeId].configCount=e[t.nodeId].configs.add(t.aci).size,e}),{}))),[a]);return l.createElement(s.Table,{data:r,dataColumns:O,onClickRow:n,enableSorting:!0,enableColumnVisibility:!0,enableResizing:!0,columnPinning:Y})};var Z=a(62232);const $=()=>{var e;const[{alertName:t,nodeId:a},n]=(0,m.DV)(),r=(0,k.Gt)(a?[a]:[]),c=null===r||void 0===r||null===(e=r[0])||void 0===e?void 0:e.name,o=(0,l.useMemo)((()=>c?[{name:"All Alert Configs",onClick:()=>{n({alertName:null,nodeId:null})}},{name:t,onClick:()=>{n({alertName:t,nodeId:null})}},{name:c}]:t?[{name:"All Alert Configs",onClick:()=>{n({alertName:null,nodeId:null})}},{name:t}]:null),[t,c,n]);return l.createElement(Z.A,{padding:[2,0,0],items:o,testid:"alertConfigurations"})};var X=a(3914),ee=a(69765),te=a(51913);const ae=()=>l.createElement(s.Text,null,"Loading..."),le={right:["actions"]},ne=(0,l.memo)((()=>{const e=(0,m.oU)(),[{alertName:t,nodeId:a},n]=(0,m.DV)(),[,r]=(0,te.Ws)(),c=(0,l.useCallback)((e=>{n({alertName:e.data.name})}),[]),{rowActions:o}=(()=>{const e=(0,ee.ID)(),[,t]=(0,te.bg)(),[,a]=(0,m.DV)(),n=(0,X.dg)();return{rowActions:(0,l.useMemo)((()=>({goto:{handleAction:e=>{let{name:t}=e;return a({alertName:t})},icon:"chevron_right",tooltipText:"Show configuration"},...!n&&{info:{handleAction:a=>t({roomId:e,alert:a}),tooltipText:"Get some help from Netdata Assistant",icon:"netdataAssistant",iconColor:"primary",neutral:!1,dataGa:"alerts::click-assistant-icon::active-alerts-table"}}})),[n,t])}})();return(0,l.useEffect)((()=>{const t=e.map((e=>{let{name:t}=e;return{name:t}}));r(t)}),[e]),l.createElement(s.Flex,{column:!0,gap:4,height:"calc(100% - 100px)",overflow:"hidden"},l.createElement($,null),a&&l.createElement(l.Suspense,{fallback:l.createElement(ae,null)},l.createElement(H,null)),!a&&t&&l.createElement(l.Suspense,{fallback:l.createElement(ae,null)},l.createElement(Q,null)),!a&&!t&&l.createElement(s.Table,{data:e,dataColumns:x,enableSorting:!0,enableColumnVisibility:!0,columnPinning:le,enableColumnPinning:!0,enableResizing:!0,rowActions:o,onClickRow:c,columnVisibility:I}))})),re=ne;var ce=a(47767),oe=a(21875);const ie=[{id:"lastStatusChange",desc:!0}],se={right:["actions"]},de=()=>{const e=(0,g.QD)({extraKey:"alerts"}),[,t]=(0,te.Ws)(),[a,n,,r]=(0,q.A)(),{rowActions:c}=(()=>{const e=(0,ce.Zp)(),t=(0,X.bq)(),a=(0,ee.ID)(),[,n]=(0,te.bg)(),r=(0,X.dg)(),[,c]=(0,oe.v7)();return{rowActions:(0,l.useMemo)((()=>r?{}:{...B.tv?{alertConfiguration:{handleAction:e=>{let{id:t}=e;c({alertId:t})},icon:"alarm_bell",tooltipText:"Alert configuration",confirmation:!1}}:{},goto:{handleAction:a=>{const{name:l,nodeId:n,instance:r}=a,c={alertName:l,instance:r,nodeId:n};e("/spaces/".concat(t,"/settings/notifications#notificationsActiveTab=1&silencingRulePrefill=").concat(JSON.stringify(c)))},tooltipText:"Add new silencing rule",icon:"alarm_off",flavour:"hollow",neutral:!1,dataGa:"alerts-table::click-link-to-manager::active-alerts-table"},info:{handleAction:e=>n({roomId:a,alert:e}),tooltipText:"Get some help from Netdata Assistant",icon:"netdataAssistant",iconColor:"primary",neutral:!1,dataGa:"alerts::click-assistant-icon::active-alerts-table"}}),[r,n])}})();return(0,l.useEffect)((()=>{t(e)}),[e]),l.createElement(l.Fragment,null,l.createElement(s.Table,{enableSorting:!0,enableColumnVisibility:!0,columnVisibility:z,data:e,dataColumns:G({openModal:n}),rowActions:c,sortBy:ie,columnPinning:se,enableColumnPinning:!0,enableResizing:!0}),a&&r)};var ue=a(21290);const me=()=>{const e=(()=>{const{localeTimeString:e,localeDateString:t}=(0,ue.$j)(),a=(0,r.s)("updatedAt");return(0,l.useMemo)((()=>{if(!a)return;const l=new Date(a);return"".concat(t(l,{long:!0})," ").concat(e(l,{secs:!0}))}),[a,e,t])})();return l.createElement(s.Flex,{column:!0,justifyContent:"center",alignItems:"center",gap:4},l.createElement(s.Icon,{name:"checkmark",width:"168px",height:"168px",margin:[13,0,0]}),l.createElement(s.H3,{margin:[10,0,0]},"This room has no active alerts, you are all good!"),l.createElement(s.Text,{margin:[2,0,0,0]},"Visit later or check your notifications"),l.createElement(s.TextSmall,{color:"textLite"},"Last updated at: ",e))},ge=(0,l.memo)(me);var he=a(68831);const fe=()=>l.createElement(s.Flex,{column:!0,justifyContent:"center",alignItems:"center",margin:[12,0,0]},l.createElement("img",{src:"".concat(he.A.assetsBaseURL,"/img/no-filter-results.png"),alt:"No Filter Results",title:"No Filter Results"}),l.createElement(s.H3,null,"There are no results for these filtering criteria")),be=(0,l.memo)(fe);var Ce=a(63314);const Ee=e=>{let{count:t}=e;const a=(0,r.s)("ids"),n=(0,r.s)("loaded"),c=(0,m.Gq)(a).length;return n?c?t?l.createElement(Ce.Ay,{feature:"AlertsActive",mode:"AlertsTable"},l.createElement(de,null)):l.createElement(Ce.Ay,{feature:"AlertsActive",mode:"NoFilterResultsIndication"},l.createElement(be,null)):l.createElement(Ce.Ay,{feature:"AlertsActive",mode:"NoAlertsIndication"},l.createElement(ge,null)):l.createElement(h.A,{title:"Loading alerts..."})},ye=()=>{const[e,t]=(0,n.L4)(o.J7),a=(0,m.ud)(),r=(0,l.useCallback)((l=>{l===e&&a(),t(l)}),[e,t]),c=(0,g.QD)({extraKey:"alerts"}).length,i=(0,m.zu)();return(0,d.nj)()&&!i.length?l.createElement(Ce.Ay,{feature:"Alerts",mode:"NoNodesView"},l.createElement(u.A,null)):l.createElement(s.Tabs,{selected:e,onChange:r,height:"100%",padding:[4,4,0]},l.createElement(s.Tab,{label:l.createElement(s.Text,null,"Active (",c,")"),maxWidth:"100%","data-testid":"alertTabs-activeAlerts"},l.createElement(Ee,{count:c})),l.createElement(s.Tab,{label:l.createElement(s.Text,null,"Alert Configurations"),maxWidth:"100%","data-testid":"alertTabs-configurations"},l.createElement(l.Suspense,{fallback:l.createElement(h.A,{title:"Loading alert configurations..."})},l.createElement(Ce.Ay,{feature:"AlertsConfiguration"},l.createElement(re,null)))))},ve=["chartIndexing","alerts","info","config"],pe=()=>{const e=(0,r.s)("ids"),t=(0,n.vc)(o.J7),a=!!e.length&&1!==t;return l.createElement(c.A,{sidebar:a&&l.createElement(i.Ay,{title:"Alerts",flavour:"alerts",loaded:!0,hasSearch:!1,hiddenTabs:ve})},l.createElement(ye,null))}}}]); \ No newline at end of file