diff --git a/src/main/resources/webview/main/index.js b/src/main/resources/webview/main/index.js index 826bc79b2..a3eb49c01 100644 --- a/src/main/resources/webview/main/index.js +++ b/src/main/resources/webview/main/index.js @@ -675,7 +675,7 @@ gap: 8px; padding: 8px; overflow: auto; -`},6518:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalErrorsList=void 0;const a=n(74848),s=n(96540),l=n(29370),c=n(22379),u=n(2569),d=n(47611),p=n(47989),m=n(36972),f=n(38492),g=n(64136),h=n(5098),b=n(27857),_=n(86428),y=n(14782),v=n(76936),E=n(15700),S=n(46394),T=n(85990),C=n(14583),O=n(72782),x=n(83348),w=n(48681),I=n(61484),A=i(n(7518));t.GlobalErrorsList=()=>{const{goTo:e}=(0,S.useHistory)(),[t,n]=(0,s.useState)(!1),r=(0,s.useRef)(null),{environment:o}=(0,u.useConfigSelector)(),{globalErrorsSearch:i,globalErrorsSorting:R,globalErrorsPage:N,globalErrorsPageSize:k,globalErrorsList:D,globalErrorsTotalCount:P}=(0,p.useErrorsSelector)(),{setGlobalErrorsData:j,setGlobalErrorsSearch:M,setGlobalErrorsSorting:L,setGlobalErrorsPage:F,resetGlobalErrors:B}=m.useStore.getState(),U=o?.id,G=Object.values(d.GLOBAL_ERROR_SORTING_CRITERION).map((e=>({id:e,label:e,onClick:()=>Y(e)}))),$=(0,s.useMemo)((()=>({requestAction:O.actions.GET_GLOBAL_ERRORS_DATA,responseAction:O.actions.SET_GLOBAL_ERRORS_DATA,refreshWithInterval:!0,refreshOnPayloadChange:!0,isEnabled:Boolean(U)})),[U]),H=(0,s.useMemo)((()=>({environment:U??"",searchCriteria:i,sortBy:R,page:N,pageSize:d.PAGE_SIZE})),[U,i,R,N]),{data:z}=(0,l.useFetchData)($,H);(0,s.useEffect)((()=>{z&&j(z)}),[z,j]),(0,s.useEffect)((()=>{F(0)}),[U,i,F]),(0,s.useEffect)((()=>{r.current&&r.current.scrollTo(0,0)}),[U,i,R,N]),(0,c.useMount)((()=>()=>{B()}));const V=t=>{e(t)},Y=e=>{(0,f.sendUserActionTrackingEvent)(I.trackingEvents.GLOBAL_ERRORS_VIEW_SORTING_CHANGE),L(e),n(!1)},W=i;return(0,a.jsx)(A.Container,{children:D?D.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(A.ToolbarContainer,{children:[(0,a.jsx)(_.SearchInput,{value:i,onChange:e=>{(0,f.sendUserActionTrackingEvent)(I.trackingEvents.GLOBAL_ERRORS_VIEW_SEARCH_CHANGED),M(e)}}),(0,a.jsx)(b.NewPopover,{isOpen:t,onOpenChange:n,content:(0,a.jsx)(C.Popup,{children:(0,a.jsx)(T.MenuList,{items:G})}),placement:"bottom-end",children:(0,a.jsx)(y.NewButton,{icon:()=>(0,a.jsx)(A.SortButtonIconContainer,{children:(0,a.jsx)(g.OppositeArrowsIcon,{size:12,color:"currentColor"})}),label:"Sort",buttonType:"secondary",onClick:()=>{(0,f.sendUserActionTrackingEvent)(I.trackingEvents.GLOBAL_ERRORS_VIEW_SORTING_CHANGE),n(!t)}})})]}),(0,a.jsx)(A.ListContainer,{ref:r,children:D.map((e=>(0,a.jsx)(x.NewErrorCard,{data:e,onSourceLinkClick:V},e.id)))}),(0,a.jsx)(E.Pagination,{itemsCount:P,page:N,pageSize:k,onPageChange:e=>{(0,f.sendUserActionTrackingEvent)(I.trackingEvents.GLOBAL_ERRORS_VIEW_PAGE_CHANGE),F(e)},extendedNavigation:!0,withDescription:!0})]}):W?(0,a.jsx)(v.NewEmptyState,{icon:h.CardsColoredIcon,title:"No errors",content:(0,a.jsxs)(A.EmptyStateContent,{children:[(0,a.jsx)("span",{children:"No data is available for the selected filters. Try resetting your filters."}),(0,a.jsx)(y.NewButton,{label:"Reset filters",onClick:()=>{(0,f.sendUserActionTrackingEvent)(I.trackingEvents.GLOBAL_ERRORS_VIEW_RESET_FILTERS_BUTTON_CLICKED),M(""),F(0)}})]})}):(0,a.jsx)(w.NoDataEmptyState,{}):null})}},7518:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SortButtonIconContainer=t.EmptyStateContent=t.EmptyStateContainer=t.ListContainer=t.ToolbarContainer=t.Container=void 0;const o=r(n(59616)),i=n(49086);t.Container=o.default.div` +`},6518:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalErrorsList=void 0;const a=n(74848),s=n(96540),l=n(29370),c=n(22379),u=n(2569),d=n(47611),p=n(47989),m=n(36972),f=n(38492),g=n(64136),h=n(5098),b=n(27857),_=n(86428),y=n(14782),v=n(76936),E=n(15700),S=n(46394),T=n(85990),C=n(14583),O=n(72782),x=n(83348),w=n(48681),I=n(61484),A=i(n(7518));t.GlobalErrorsList=()=>{const{goTo:e}=(0,S.useHistory)(),[t,n]=(0,s.useState)(!1),r=(0,s.useRef)(null),{environment:o}=(0,u.useConfigSelector)(),{globalErrorsSearch:i,globalErrorsSorting:R,globalErrorsPage:N,globalErrorsPageSize:k,globalErrorsList:D,globalErrorsTotalCount:P}=(0,p.useErrorsSelector)(),{setGlobalErrorsData:j,setGlobalErrorsSearch:M,setGlobalErrorsSorting:L,setGlobalErrorsPage:F,resetGlobalErrors:B}=m.useStore.getState(),U=o?.id,G=Object.values(d.GLOBAL_ERROR_SORTING_CRITERION).map((e=>({id:e,label:e,onClick:()=>Y(e)}))),$=(0,s.useMemo)((()=>({requestAction:O.actions.GET_GLOBAL_ERRORS_DATA,responseAction:O.actions.SET_GLOBAL_ERRORS_DATA,refreshWithInterval:!0,refreshOnPayloadChange:!0,isEnabled:Boolean(U)})),[U]),H=(0,s.useMemo)((()=>({environment:U??"",searchCriteria:i,sortBy:R,page:N,pageSize:d.PAGE_SIZE})),[U,i,R,N]),{data:z}=(0,l.useFetchData)($,H);(0,s.useEffect)((()=>{z&&j(z)}),[z,j]),(0,s.useEffect)((()=>{F(0)}),[U,i,F]),(0,s.useEffect)((()=>{r.current&&r.current.scrollTo(0,0)}),[U,i,R,N]),(0,c.useMount)((()=>()=>{B()}));const V=t=>{e(t)},Y=e=>{(0,f.sendUserActionTrackingEvent)(I.trackingEvents.GLOBAL_ERRORS_VIEW_SORTING_CHANGE),L(e),n(!1)},W=i;return(0,a.jsx)(A.Container,{children:D?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(A.ToolbarContainer,{children:[(0,a.jsx)(_.SearchInput,{value:i,onChange:e=>{(0,f.sendUserActionTrackingEvent)(I.trackingEvents.GLOBAL_ERRORS_VIEW_SEARCH_CHANGED),M(e)}}),(0,a.jsx)(b.NewPopover,{isOpen:t,onOpenChange:n,content:(0,a.jsx)(C.Popup,{children:(0,a.jsx)(T.MenuList,{items:G})}),placement:"bottom-end",children:(0,a.jsx)(y.NewButton,{icon:()=>(0,a.jsx)(A.SortButtonIconContainer,{children:(0,a.jsx)(g.OppositeArrowsIcon,{size:12,color:"currentColor"})}),label:"Sort",buttonType:"secondary",onClick:()=>{(0,f.sendUserActionTrackingEvent)(I.trackingEvents.GLOBAL_ERRORS_VIEW_SORTING_CHANGE),n(!t)}})})]}),D.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(A.ListContainer,{ref:r,children:D.map((e=>(0,a.jsx)(x.NewErrorCard,{data:e,onSourceLinkClick:V},e.id)))}),(0,a.jsx)(E.Pagination,{itemsCount:P,page:N,pageSize:k,onPageChange:e=>{(0,f.sendUserActionTrackingEvent)(I.trackingEvents.GLOBAL_ERRORS_VIEW_PAGE_CHANGE),F(e)},extendedNavigation:!0,withDescription:!0})]}):W?(0,a.jsx)(v.NewEmptyState,{icon:h.CardsColoredIcon,title:"No errors",content:(0,a.jsxs)(A.EmptyStateContent,{children:[(0,a.jsx)("span",{children:"No data is available for the selected filters. Try resetting your filters."}),(0,a.jsx)(y.NewButton,{label:"Reset filters",onClick:()=>{(0,f.sendUserActionTrackingEvent)(I.trackingEvents.GLOBAL_ERRORS_VIEW_RESET_FILTERS_BUTTON_CLICKED),M(""),F(0)}})]})}):(0,a.jsx)(w.NoDataEmptyState,{})]}):null})}},7518:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SortButtonIconContainer=t.EmptyStateContent=t.EmptyStateContainer=t.ListContainer=t.ToolbarContainer=t.Container=void 0;const o=r(n(59616)),i=n(49086);t.Container=o.default.div` display: flex; flex-direction: column; padding: 8px; @@ -708,7 +708,7 @@ color: ${({theme:e})=>e.colors.v3.text.tertiary}; `,t.SortButtonIconContainer=o.default.div` color: ${({theme:e})=>e.colors.v3.icon.tertiary}; -`},83348:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.NewErrorCard=void 0;const a=n(74848),s=n(96540),l=n(51094),c=n(38492),u=n(55529),d=n(57493),p=n(41936),m=n(61484),f=i(n(16872));t.NewErrorCard=({data:e,onSourceLinkClick:t})=>{const{id:n,affectedEndpoints:r,score:o,errorType:i,fromDisplayName:g,fromFullyQualifiedName:h,status:b}=e,_=(e=>"High number of errors"===e?"highSeverity":"Escalating"===e?"mediumSeverity":e.includes("Recent")?"lowSeverity":"default")(b),y=(0,s.useMemo)((()=>r.map((e=>({route:e.displayName,serviceName:e.service,spanCodeObjectId:e.spanCodeObjectId})))),[r]),[v,E]=(0,s.useState)(y.length>0?y[0]:void 0),S=o.score>p.HIGH_SEVERITY_SCORE_THRESHOLD,T=v?(0,u.getEndpointKey)(v):void 0;return(0,a.jsxs)(f.Container,{$isCritical:S,children:[(0,a.jsxs)(f.Header,{children:[(0,a.jsxs)(f.TitleContainer,{children:[(0,a.jsx)(d.Tooltip,{title:i,children:(0,a.jsx)(f.Title,{children:i})}),(0,a.jsx)(d.Tooltip,{title:h??g,children:(0,a.jsx)(f.SourceLink,{onClick:()=>{(0,c.sendUserActionTrackingEvent)(m.trackingEvents.ERROR_CARD_SOURCE_LINK_CLICKED),t(n)},children:g})})]}),(0,a.jsx)(f.StatusTag,{content:b,title:b,type:_})]}),y.length>0&&(0,a.jsxs)(f.AffectedEndpointsContainer,{children:["Affected Endpoints (",y.length,")",(0,a.jsx)(u.AffectedEndpointsSelector,{onChange:e=>{(0,c.sendUserActionTrackingEvent)(m.trackingEvents.ERROR_CARD_SELECTED_AFFECTED_ENDPOINT_CHANGED);const t=e?y.find((t=>t.serviceName===e.serviceName&&t.spanCodeObjectId===e.spanCodeObjectId)):void 0;E(t)},onAssetLinkClick:e=>{(0,c.sendUserActionTrackingEvent)(m.trackingEvents.ERROR_CARD_AFFECTED_ENDPOINT_LINK_CLICKED),(0,l.changeScope)({span:{spanCodeObjectId:e}})},value:T,options:y})]})]})}},16872:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AffectedEndpointsContainer=t.SourceLink=t.StatusTag=t.Title=t.TitleContainer=t.Header=t.Container=void 0;const o=r(n(59616)),i=n(49086),a=n(63932),s=n(57564);t.Container=o.default.div` +`},83348:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.NewErrorCard=void 0;const a=n(74848),s=n(96540),l=n(51094),c=n(38492),u=n(55529),d=n(57493),p=n(41936),m=n(61484),f=i(n(16872));t.NewErrorCard=({data:e,onSourceLinkClick:t})=>{const{id:n,affectedEndpoints:r,score:o,errorType:i,fromDisplayName:g,fromFullyQualifiedName:h,status:b}=e,_=(e=>{const t=e.toLowerCase();return t.localeCompare("high number of errors")?"highSeverity":t.localeCompare("escalating")?"mediumSeverity":t.includes("recent")?"lowSeverity":"default"})(b),y=(0,s.useMemo)((()=>r.map((e=>({route:e.displayName,serviceName:e.service,spanCodeObjectId:e.spanCodeObjectId})))),[r]),[v,E]=(0,s.useState)(y.length>0?y[0]:void 0),S=o.score>p.HIGH_SEVERITY_SCORE_THRESHOLD,T=v?(0,u.getEndpointKey)(v):void 0;return(0,a.jsxs)(f.Container,{$isCritical:S,children:[(0,a.jsxs)(f.Header,{children:[(0,a.jsxs)(f.TitleContainer,{children:[(0,a.jsx)(d.Tooltip,{title:i,children:(0,a.jsx)(f.Title,{children:i})}),(0,a.jsx)(d.Tooltip,{title:h??g,children:(0,a.jsx)(f.SourceLink,{onClick:()=>{(0,c.sendUserActionTrackingEvent)(m.trackingEvents.ERROR_CARD_SOURCE_LINK_CLICKED),t(n)},children:g})})]}),(0,a.jsx)(f.StatusTag,{content:b,title:b,type:_})]}),y.length>0&&(0,a.jsxs)(f.AffectedEndpointsContainer,{children:["Affected Endpoints (",y.length,")",(0,a.jsx)(u.AffectedEndpointsSelector,{onChange:e=>{(0,c.sendUserActionTrackingEvent)(m.trackingEvents.ERROR_CARD_SELECTED_AFFECTED_ENDPOINT_CHANGED);const t=e?y.find((t=>t.serviceName===e.serviceName&&t.spanCodeObjectId===e.spanCodeObjectId)):void 0;E(t)},onAssetLinkClick:e=>{(0,c.sendUserActionTrackingEvent)(m.trackingEvents.ERROR_CARD_AFFECTED_ENDPOINT_LINK_CLICKED),(0,l.changeScope)({span:{spanCodeObjectId:e}})},value:T,options:y})]})]})}},16872:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AffectedEndpointsContainer=t.SourceLink=t.StatusTag=t.Title=t.TitleContainer=t.Header=t.Container=void 0;const o=r(n(59616)),i=n(49086),a=n(63932),s=n(57564);t.Container=o.default.div` display: flex; flex-direction: column; gap: 16px; @@ -3067,6 +3067,7 @@ ${t.ServiceName} { flex-shrink: 0; width: 151px; + max-width: none; } `}