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

assets.7914.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([[7914],{17914:function(e,t,n){n.r(t);var a=n(70655),r=n(56256),i=n(94199),l=n(71577),c=n(71230),u=n(15746),o=n(96486),s=n(67294),d=n(68432),m=n(15137),f=n(76),p=n(38780),v=n(8645),h=n(92342),b=n(26396),g=n(71112),y=n(37565),E=n(22087),Z=n(76709),C=n(62761),x=n(92693),w=n(5397),k=n(61105),N=n(64632),S=n(55538),R=n(502),T=n(802),I=n(1600),P=n(24671),A=n(96840),B=n(46321);t.default=function(){var e,t=(0,d.$)().t,n=(0,m.k6)(),D=(0,a.CR)((0,s.useState)(!0),2),G=D[0],J=D[1],L=(0,a.CR)((0,s.useState)([]),2),_=L[0],z=L[1],K=(0,a.CR)((0,s.useState)(),2),O=K[0],Y=K[1],Q=(0,T.C)(),j=Q.pageSize,H=Q.currentPage,M=Q.handlePageChange,U=Q.handlePageSizeChange,V=Q.handlePagingChange,$=Q.showPagination,F=Q.paging,W=(0,w.o)().getResourceLimit,q=(0,s.useCallback)((function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var n,r,i;return(0,a.Jh)(this,(function(a){switch(a.label){case 0:J(!0),a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,(0,I.BN)({after:null==e?void 0:e.after,before:null==e?void 0:e.before,limit:j,alertType:S.NK.Observability})];case 2:return n=a.sent(),r=n.data,i=n.paging,z(r.filter((function(e){return e.provider!==S.lP.System}))),V(i),[3,5];case 3:return a.sent(),(0,B.Eo)(t("server.entity-fetch-error",{entity:t("label.alert-plural")})),[3,5];case 4:return J(!1),[7];case 5:return[2]}}))}))}),[j]);(0,s.useEffect)((function(){q()}),[j]);var X=(0,s.useCallback)((function(){return(0,a.mG)(void 0,void 0,void 0,(function(){var e;return(0,a.Jh)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),Y(void 0),[4,W("eventsubscription",!0,!0)];case 1:return t.sent(),q(),[3,3];case 2:return e=t.sent(),(0,B.Eo)(e),[3,3];case 3:return[2]}}))}))}),[q]),ee=(0,s.useCallback)((function(e){var t,n=e.cursorType,a=e.currentPage;n&&(q(((t={})[n]=F[n],t)),M(a))}),[F]),te=(0,s.useMemo)((function(){return[{title:t("label.name"),dataIndex:"name",width:"200px",key:"name",render:function(e,t){var n;return s.createElement(f.Link,{"data-testid":"alert-name",to:(0,A.mD)(null!==(n=t.fullyQualifiedName)&&void 0!==n?n:"")},e)}},{title:t("label.trigger"),dataIndex:["filteringRules","resources"],width:"200px",key:"FilteringRules.resources",render:function(e){return(null==e?void 0:e.join(", "))||"--"}},{title:t("label.description"),dataIndex:"description",flex:!0,key:"description",render:function(e){return(0,o.isEmpty)(e)?s.createElement(r.Z.Text,{className:"text-grey-muted"},t("label.no-entity",{entity:t("label.description")})):e}},{title:t("label.action-plural"),dataIndex:"fullyQualifiedName",width:120,key:"fullyQualifiedName",render:function(e,n){return s.createElement("div",{className:"d-flex flex-center"},s.createElement(i.Z,{placement:"bottom",title:t("label.edit")},s.createElement(f.Link,{to:(0,A.bk)(e)},s.createElement(l.Z,{className:"flex flex-center","data-testid":"alert-edit-"+n.name,icon:s.createElement(p.ReactComponent,{width:16}),type:"text"}))),s.createElement(i.Z,{placement:"bottom",title:t("label.delete")},s.createElement(l.Z,{className:"flex flex-center","data-testid":"alert-delete-"+n.name,disabled:n.provider===S.lP.System,icon:s.createElement(v.ReactComponent,{height:16,width:16}),type:"text",onClick:function(){return Y(n)}})))}}]}),[X]),ne=(0,s.useMemo)((function(){return{header:t("label.observability"),subHeader:t("message.alerts-description")}}),[]);return s.createElement(Z.Z,{pageTitle:t("label.alert-plural")},s.createElement(c.Z,{className:"p-x-lg p-t-md",gutter:[0,16]},s.createElement(u.Z,{span:24},s.createElement("div",{className:"d-flex justify-between"},s.createElement(E.Z,{data:ne}),s.createElement(R.Z,{resource:"eventsubscription"},s.createElement(l.Z,{"data-testid":"create-observability",type:"primary",onClick:function(){return n.push(C.Z6.ADD_OBSERVABILITY_ALERTS)}},t("label.add-entity",{entity:t("label.alert")}))))),s.createElement(u.Z,{span:24},s.createElement(y.Z,{bordered:!0,columns:te,dataSource:_,loading:G,locale:{emptyText:s.createElement(b.Z,{permission:!0,className:"p-y-md",doc:x.co,heading:t("label.alert"),type:k.Wx.CREATE,onClick:function(){return n.push(C.Z6.ADD_OBSERVABILITY_ALERTS)}})},pagination:!1,rowKey:"id",size:"small"})),s.createElement(u.Z,{span:24},$&&s.createElement(g.Z,{currentPage:H,pageSize:j,paging:F,pagingHandler:ee,onShowSizeChange:U}),s.createElement(h.Z,{afterDeleteAction:X,allowSoftDelete:!1,entityId:null!==(e=null==O?void 0:O.id)&&void 0!==e?e:"",entityName:(0,P.C_)(O),entityType:N.py.SUBSCRIPTION,visible:Boolean(O),onCancel:function(){Y(void 0)}}))))}},1600:function(e,t,n){n.d(t,{$K:function(){return u},BN:function(){return o},NY:function(){return d},UT:function(){return m},hm:function(){return s}});var a=n(70655),r=n(2598),i=n(55538),l=n(40734),c="/events/subscriptions",u=function(e,t){return(0,a.mG)(void 0,void 0,void 0,(function(){return(0,a.Jh)(this,(function(n){switch(n.label){case 0:return[4,r.Z.get(c+"/name/"+(0,l.Yd)(e),{params:(0,a.pi)((0,a.pi)({},t),{include:"all"})})];case 1:return[2,n.sent().data]}}))}))},o=function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){return(0,a.Jh)(this,(function(t){switch(t.label){case 0:return[4,r.Z.get(c,{params:(0,a.pi)({},e)})];case 1:return[2,t.sent().data]}}))}))},s=function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){return(0,a.Jh)(this,(function(t){switch(t.label){case 0:return[4,r.Z.post(c,e)];case 1:return[2,t.sent().data]}}))}))},d=function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){return(0,a.Jh)(this,(function(t){switch(t.label){case 0:return[4,r.Z.put(c,e)];case 1:return[2,t.sent().data]}}))}))},m=function(){return(0,a.mG)(void 0,void 0,void 0,(function(){return(0,a.Jh)(this,(function(e){switch(e.label){case 0:return[4,r.Z.get(c+"/"+i.NK.Notification+"/resources")];case 1:return[2,e.sent().data]}}))}))}}}]);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy