All Downloads are FREE. Search and download functionalities are using the official Maven repository.

assets.6758.9bf1d89926b9972b5b0a.js Maven / Gradle / Ivy

There is a newer version: 1.5.4
Show newest version
"use strict";(self.webpackChunkopen_metadata=self.webpackChunkopen_metadata||[]).push([[6758],{41643:function(e,t,a){a.d(t,{Z:function(){return L}});var n,s=a(70655),i=a(53014),l=a(56256),u=a(94199),r=a(19650),o=a(94184),c=a.n(o),d=a(67294),m=a(38780),p=a(62761),f=a(46481),v=a(7161),C=a(72819),g=a(53429),h=a(24671),y=a(12981),b=a(66219),S=a(49409),E=a(50146),R=a(34041),w=a(96486),Z=a(68432),T=a(97359),I=a(64632);!function(e){e.Duplicates="Duplicates",e.FalsePositive="FalsePositive",e.MissingData="MissingData",e.Other="Other",e.OutOfBounds="OutOfBounds"}(n||(n={}));var N=a(50953),k=a(91054),D=a(8764),x=a(86385),A=a(46321),O=a(48794),F=function(e){var t,a,i=e.open,l=e.data,u=e.testCaseFqn,r=e.onSubmit,o=e.onCancel,c=e.usersList,m=(0,Z.$)().t,f=(0,O.N)().currentUser,v=(0,s.CR)(S.Z.useForm(),1)[0],C=(0,d.useRef)(),g=(0,s.CR)((0,d.useState)(!1),2),y=g[0],b=g[1],F=(0,s.CR)((0,d.useState)([]),2),L=F[0],_=F[1],M=(0,d.useMemo)((function(){var e,t=(null===(e=null==l?void 0:l.testCaseResolutionStatusDetails)||void 0===e?void 0:e.assignee)?(0,x.uu)([l.testCaseResolutionStatusDetails.assignee]):[];return{initialAssignees:t,assigneeOptions:(0,w.unionBy)((0,s.ev)((0,s.ev)([],(0,s.CR)(t)),(0,s.CR)((0,x.uu)(null!=c?c:[]))),"value")}}),[l,c]).assigneeOptions,P=S.Z.useWatch("testCaseResolutionStatusType",v),B=S.Z.useWatch(["testCaseResolutionStatusDetails","assignee"],v),K=(0,d.useMemo)((function(){return((null==l?void 0:l.testCaseResolutionStatusType)===N.IK.Assigned?[N.IK.Assigned,N.IK.Resolved]:Object.values(N.IK)).map((function(e){return{label:e,value:e}}))}),[l]);return(0,d.useEffect)((function(){var e,t=null===(e=null==l?void 0:l.testCaseResolutionStatusDetails)||void 0===e?void 0:e.assignee;(null==l?void 0:l.testCaseResolutionStatusType)===N.IK.Assigned&&t&&v.setFieldValue(["testCaseResolutionStatusDetails","assignee"],[t.id]),_(M)}),[l,M]),d.createElement(E.Z,{cancelText:m("label.cancel"),closable:!1,okButtonProps:{id:"update-status-button",form:"update-status-form",htmlType:"submit",loading:y},okText:m("label.submit"),open:i,title:m("label.update-entity",{entity:m("label.status")}),width:750,onCancel:o},d.createElement(S.Z,{"data-testid":"update-status-form",form:v,id:"update-status-form",initialValues:l,layout:"vertical",validateMessages:p.NG,onFinish:function(e){return(0,s.mG)(void 0,void 0,void 0,(function(){var t,a,n;return(0,s.Jh)(this,(function(i){switch(i.label){case 0:switch(b(!0),t=(0,s.pi)((0,s.pi)({},e),{testCaseReference:u}),e.testCaseResolutionStatusType){case N.IK.Resolved:t.testCaseResolutionStatusDetails=(0,s.pi)((0,s.pi)({},e.testCaseResolutionStatusDetails),{resolvedBy:f?(0,h.hL)(f,I.py.USER):void 0});break;case N.IK.Assigned:B.length>0&&(t.testCaseResolutionStatusDetails=(0,s.pi)((0,s.pi)({},e.testCaseResolutionStatusDetails),{assignee:{name:B[0].name,displayName:B[0].displayName,id:B[0].value,type:I.py.USER}}))}i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,(0,D.Jw)(t)];case 2:return a=i.sent(),r(a),o(),[3,5];case 3:return n=i.sent(),(0,A.Eo)(n),[3,5];case 4:return b(!1),[7];case 5:return[2]}}))}))}},d.createElement(S.Z.Item,{label:m("label.status"),name:"testCaseResolutionStatusType",rules:[{required:!0}]},d.createElement(R.Z,{"data-testid":"test-case-resolution-status-type",options:K,placeholder:m("label.please-select-entity",{entity:m("label.status")})})),P===N.IK.Resolved&&d.createElement(d.Fragment,null,d.createElement(S.Z.Item,{label:m("label.reason"),name:["testCaseResolutionStatusDetails","testCaseFailureReason"],rules:[{required:!0}]},d.createElement(R.Z,{"data-testid":"test-case-failure-reason",placeholder:m("label.please-select-entity",{entity:m("label.reason")})},Object.values(n).map((function(e){return d.createElement(R.Z.Option,{key:e},(0,w.startCase)(e))})))),d.createElement(S.Z.Item,{label:m("label.comment"),name:["testCaseResolutionStatusDetails","testCaseFailureComment"],rules:[{required:!0}]},d.createElement(T.Z,{height:"200px",initialValue:null!==(a=null===(t=null==l?void 0:l.testCaseResolutionStatusDetails)||void 0===t?void 0:t.testCaseFailureComment)&&void 0!==a?a:"",placeHolder:m("message.write-your-text",{text:m("label.comment")}),ref:C,onTextChange:function(e){return v.setFieldValue(["testCaseResolutionStatusDetails","testCaseFailureComment"],e)}}))),P===N.IK.Assigned&&d.createElement(S.Z.Item,{label:m("label.assignee"),name:["testCaseResolutionStatusDetails","assignee"],rules:[{required:!0}]},d.createElement(k.Z,{allowClear:!0,isSingleSelect:!0,options:L,value:B,onChange:function(e){return v.setFieldValue(["testCaseResolutionStatusDetails","assignee"],e)},onSearch:function(e){return(0,x.Od)({query:e,setOptions:_,onlyUsers:!0,initialOptions:M})}}))))},L=(a(29970),function(e){var t,a,n,o=e.data,S=e.onSubmit,E=e.usersList,R=(0,s.CR)((0,d.useState)(!1),2),w=R[0],Z=R[1],T=(0,d.useMemo)((function(){return o.testCaseResolutionStatusType}),[o]),I=(0,f.BL)().permissions,N=(0,d.useMemo)((function(){return(0,y.P_)(C.OX.EditAll,v.A.TEST_CASE,I)}),[I]),k=(0,d.useCallback)((function(){return Z(!0)}),[]),D=(0,d.useCallback)((function(){return Z(!1)}),[]);return T?d.createElement(d.Fragment,null,d.createElement(u.Z,{placement:"bottom",title:(null==o?void 0:o.updatedAt)&&(0,g.p6)(o.updatedAt)+"\n                "+(o.updatedBy?"by "+(0,h.C_)(o.updatedBy):"")},d.createElement(r.Z,{align:"center","data-testid":(null===(t=o.testCaseReference)||void 0===t?void 0:t.name)+"-status"},d.createElement(b.Z,{className:c()("resolution",T.toLocaleLowerCase()),label:T}),N&&d.createElement(i.Z,(0,s.pi)({},p.K$,{component:m.ReactComponent,"data-testid":"edit-resolution-icon",style:{color:p.MJ},onClick:k})))),w&&d.createElement(F,{data:o,open:w,testCaseFqn:null!==(n=null===(a=o.testCaseReference)||void 0===a?void 0:a.fullyQualifiedName)&&void 0!==n?n:"",usersList:E,onCancel:D,onSubmit:S})):d.createElement(l.Z.Text,null,p.lH)})},26758:function(e,t,a){a.r(t);var n=a(70655),s=a(71230),i=a(15746),l=a(56256),u=a(19650),r=a(34041),o=a(25213),c=a(34901),d=a(96486),m=a(80129),p=a.n(m),f=a(67294),v=a(68432),C=a(76),g=a(66981),h=a(16416),y=a(26396),b=a(89368),S=a(71112),E=a(50404),R=a(20642),w=a(64827),Z=a(41643),T=a(76709),I=a(73213),N=a(62761),k=a(43104),D=a(56275),x=a(46481),A=a(61105),O=a(64632),F=a(22653),L=a(50953),_=a(802),M=a(8764),P=a(39117),B=a(17888),K=a(23313),q=a(93895),G=a(53429),V=a(24671),J=a(96840),Q=a(46321),W=a(91054);t.default=function(){var e=(0,f.useMemo)((function(){return{key:"last30days",title:D.CF.last30days.title}}),[]),t=(0,n.CR)((0,f.useState)({data:[],isLoading:!0}),2),a=t[0],m=t[1],j=(0,n.CR)((0,f.useState)({startTs:(0,G.f5)(D.CF.last30days.days),endTs:(0,G.Wi)()}),2),z=j[0],U=j[1],H=(0,n.CR)((0,f.useState)({options:[],selected:[]}),2),$=H[0],Y=H[1],X=(0,n.CR)((0,f.useState)(),2),ee=X[0],te=X[1],ae=(0,n.CR)((0,f.useState)([]),2),ne=ae[0],se=ae[1],ie=(0,v.$)().t,le=(0,x.BL)().permissions.testCase,ue=(0,_.C)(),re=ue.paging,oe=ue.pageSize,ce=ue.currentPage,de=ue.showPagination,me=ue.handlePageChange,pe=ue.handlePagingChange,fe=ue.handlePageSizeChange,ve=(0,f.useCallback)((function(e){return(0,n.mG)(void 0,void 0,void 0,(function(){var t,a,s,i,l;return(0,n.Jh)(this,(function(u){switch(u.label){case 0:m((function(e){return(0,n.pi)((0,n.pi)({},e),{isLoading:!0})})),u.label=1;case 1:return u.trys.push([1,3,4,5]),[4,(0,M.We)((0,n.pi)({limit:oe,latest:!0},e))];case 2:return t=u.sent(),a=t.data,s=t.paging,i=a.reduce((function(e,t){var a,n=null===(a=t.testCaseResolutionStatusDetails)||void 0===a?void 0:a.assignee,s=e.some((function(e){return e.value===(null==n?void 0:n.id)}));return n&&!s&&e.push({label:(0,V.C_)(n),value:n.id,type:n.type,name:n.name}),e}),[]),Y((function(e){return(0,n.pi)((0,n.pi)({},e),{options:i})})),m((function(e){return(0,n.pi)((0,n.pi)({},e),{data:a})})),pe(s),[3,5];case 3:return l=u.sent(),(0,Q.Eo)(l),[3,5];case 4:return m((function(e){return(0,n.pi)((0,n.pi)({},e),{isLoading:!1})})),[7];case 5:return[2]}}))}))}),[oe,m]),Ce=function(e){var t,a=e.cursorType,s=e.currentPage;a&&ve((0,n.pi)((0,n.pi)({},z),((t={})[a]=null==re?void 0:re[a],t.offset=null==re?void 0:re[a],t))),me(s)},ge=(0,f.useMemo)((function(){return{paging:re,currentPage:ce,pagingHandler:Ce,pageSize:oe,onShowSizeChange:fe}}),[re,ce,Ce,oe,fe]),he=function(e){m((function(t){var a=t.data.map((function(t){return t.stateId===e.stateId?e:t}));return(0,n.pi)((0,n.pi)({},t),{data:a})}))},ye=function(e){return void 0===e&&(e=I.m),(0,n.mG)(void 0,void 0,void 0,(function(){return(0,n.Jh)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,(0,B.w4)({pageNumber:1,pageSize:N.bu,searchIndex:F.W.TEST_CASE,query:e,fetchSource:!0,includeFields:["name","displayName","fullyQualifiedName"]})];case 1:return[2,t.sent().hits.hits.map((function(e){return{label:(0,V.C_)(e._source),value:e._source.fullyQualifiedName}}))];case 2:return t.sent(),[2,[]];case 3:return[2]}}))}))};(0,f.useEffect)((function(){(0,n.mG)(void 0,void 0,void 0,(function(){var e;return(0,n.Jh)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,ye()];case 1:return e=t.sent(),te(e),[3,3];case 2:return t.sent(),te([]),[3,3];case 3:return[2]}}))}))}),[]);var be=(0,f.useCallback)((function(){return(0,n.mG)(void 0,void 0,void 0,(function(){var e,t;return(0,n.Jh)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,(0,K.Rf)({limit:N.Ou,isBot:!1})];case 1:return e=a.sent().data,t=(0,V.nP)(e,O.py.USER),se(t),[3,3];case 2:return a.sent(),se([]),[3,3];case 3:return[2]}}))}))}),[]);(0,f.useEffect)((function(){be()}),[]),(0,f.useEffect)((function(){(null==le?void 0:le.ViewAll)||(null==le?void 0:le.ViewBasic)?ve(z):m((function(e){return(0,n.pi)((0,n.pi)({},e),{isLoading:!1})}))}),[le,oe,z]);var Se=(0,f.useMemo)((function(){return[{title:ie("label.test-case-name"),dataIndex:"name",key:"name",width:300,fixed:"left",render:function(e,t){var a,n,s;return f.createElement(C.Link,{className:"m-0 break-all text-primary","data-testid":"test-case-"+(null===(a=t.testCaseReference)||void 0===a?void 0:a.name),style:{maxWidth:280},to:(0,J.xr)(null!==(s=null===(n=t.testCaseReference)||void 0===n?void 0:n.fullyQualifiedName)&&void 0!==s?s:"")},(0,V.C_)(t.testCaseReference))}},{title:ie("label.table"),dataIndex:"testCaseReference",key:"testCaseReference",width:150,render:function(e){var t,a,n=(0,q.Td)(null!==(t=e.fullyQualifiedName)&&void 0!==t?t:"",[O.ih.Service,O.ih.Database,O.ih.Schema,O.ih.Table],".");return f.createElement(C.Link,{"data-testid":"table-link",to:{pathname:(0,N.EK)(O.py.TABLE,n,O.M8.PROFILER),search:p().stringify({activeTab:R.O.DATA_QUALITY})},onClick:function(e){return e.stopPropagation()}},null!==(a=(0,q.AY)(n))&&void 0!==a?a:e.fullyQualifiedName)}},{title:ie("label.execution-time"),dataIndex:"timestamp",key:"timestamp",width:150,render:function(e){return e?(0,G.o0)(e):"--"}},{title:ie("label.status"),dataIndex:"testCaseResolutionStatusType",key:"testCaseResolutionStatusType",width:100,render:function(e,t){return f.createElement(Z.Z,{data:t,usersList:ne,onSubmit:he})}},{title:ie("label.severity"),dataIndex:"severity",key:"severity",width:150,render:function(e,t){return f.createElement(w.Z,{severity:e,onSubmit:function(e){return function(e,t){return(0,n.mG)(void 0,void 0,void 0,(function(){var a,s,i,l;return(0,n.Jh)(this,(function(u){switch(u.label){case 0:a=(0,n.pi)((0,n.pi)({},t),{severity:e}),s=(0,c.qu)(t,a),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,(0,M.nO)(null!==(l=t.id)&&void 0!==l?l:"",s)];case 2:return u.sent(),m((function(e){var t=e.data.map((function(e){return e.id===a.id?a:e}));return(0,n.pi)((0,n.pi)({},e),{data:t})})),[3,4];case 3:return i=u.sent(),(0,Q.Eo)(i),[3,4];case 4:return[2]}}))}))}(e,t)}})}},{title:ie("label.assignee"),dataIndex:"testCaseResolutionStatusDetails",key:"testCaseResolutionStatusDetails",width:150,render:function(e){return f.createElement(E.V,{owners:(null==e?void 0:e.assignee)?[e.assignee]:[],placeHolder:ie("label.no-entity",{entity:ie("label.assignee")})})}}]}),[a.data,ne]);return(null==le?void 0:le.ViewAll)||(null==le?void 0:le.ViewBasic)?f.createElement(T.Z,{pageTitle:"Incident Manager"},f.createElement(s.Z,{className:"p-x-lg p-b-lg p-t-md",gutter:[0,16]},f.createElement(i.Z,{span:24},f.createElement(l.Z.Title,{className:"m-b-md","data-testid":"page-title",level:5},k.j.INCIDENT_MANAGER.header),f.createElement(l.Z.Paragraph,{className:"text-grey-muted","data-testid":"page-sub-title"},k.j.INCIDENT_MANAGER.subHeader)),f.createElement(i.Z,{className:"d-flex justify-between",span:24},f.createElement(u.Z,null,f.createElement(W.Z,{allowClear:!0,isSingleSelect:!0,showArrow:!0,className:"w-min-10",options:$.options,placeholder:ie("label.assignee"),value:$.selected,onChange:function(e){Y((function(t){return(0,n.pi)((0,n.pi)({},t),{selected:null!=e?e:[]})})),U((function(t){var a;return(0,n.pi)((0,n.pi)({},t),{assignee:e?null===(a=e[0])||void 0===a?void 0:a.name:e})}))},onSearch:function(e){return function(e){return(0,n.mG)(void 0,void 0,void 0,(function(){var t,a,s;return(0,n.Jh)(this,(function(i){switch(i.label){case 0:if(!e)return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,(0,P.o8)(e,!0)];case 2:return t=i.sent(),a=t.data.suggest["metadata-suggest"][0].options,s=a.map((function(e){return{label:(0,V.C_)(e._source),value:e._id,type:e._source.entityType,name:e._source.name}})),Y((function(e){return(0,n.pi)((0,n.pi)({},e),{options:s})})),[3,4];case 3:return i.sent(),Y((function(e){return(0,n.pi)((0,n.pi)({},e),{options:[]})})),[3,4];case 4:return[2]}}))}))}(e)}}),f.createElement(r.Z,{allowClear:!0,className:"w-min-10","data-testid":"status-select",placeholder:ie("label.status"),onChange:function(e){return U((function(t){return(0,n.pi)((0,n.pi)({},t),{testCaseResolutionStatusType:e})}))}},Object.values(L.IK).map((function(e){return f.createElement(r.Z.Option,{key:e},(0,d.startCase)(e))}))),f.createElement(g.q,{allowClear:!0,showArrow:!0,showSearch:!0,api:ye,className:"w-min-20","data-testid":"test-case-select",options:ee,placeholder:ie("label.test-case"),suffixIcon:void 0,onChange:function(e){return U((function(t){return(0,n.pi)((0,n.pi)({},t),{testCaseFQN:e})}))}})),f.createElement(h.Z,{showSelectedCustomRange:!0,defaultDateRange:e,handleDateRangeChange:function(e){var t=(0,d.pick)(e,["startTs","endTs"]),a=(0,d.pick)(z,["startTs","endTs"]);(0,d.isEqual)(a,t)||U((function(e){return(0,n.pi)((0,n.pi)({},e),t)}))}})),f.createElement(i.Z,{span:24},f.createElement(o.Z,{bordered:!0,className:"test-case-table-container",columns:Se,"data-testid":"test-case-incident-manager-table",dataSource:a.data,loading:a.isLoading,locale:{emptyText:f.createElement(b.Z,{placeholderText:ie("message.no-incident-found")})},pagination:!1,rowKey:"id",size:"small"})),ge&&de&&f.createElement(i.Z,{span:24},f.createElement(S.Z,(0,n.pi)({},ge))))):f.createElement(y.Z,{type:A.Wx.PERMISSION})}}}]);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy