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

assets.4453.ab93aa0b3c8cc8fe9f8a.js Maven / Gradle / Ivy

There is a newer version: 1.5.4
Show newest version
"use strict";(self.webpackChunkopen_metadata=self.webpackChunkopen_metadata||[]).push([[4453],{55538:function(e,t,n){var r,i,a,c,o,u,l;n.d(t,{NK:function(){return r},Qe:function(){return o},Qm:function(){return i},bH:function(){return u},lP:function(){return a},zn:function(){return l}}),function(e){e.ChangeEvent="ChangeEvent",e.DataInsightReport="DataInsightReport",e.TaskConversationAnnouncement="Task/Conversation/Announcement"}(r||(r={})),function(e){e.Exclude="exclude",e.Include="include"}(i||(i={})),function(e){e.System="system",e.User="user"}(a||(a={})),function(e){e.Active="active",e.AwaitingRetry="awaitingRetry",e.Disabled="disabled",e.Failed="failed",e.RetryLimitReached="retryLimitReached"}(c||(c={})),function(e){e.ActivityFeed="ActivityFeed",e.DataInsight="DataInsight",e.Email="Email",e.GChatWebhook="GChatWebhook",e.GenericWebhook="GenericWebhook",e.MSTeamsWebhook="MsTeamsWebhook",e.SlackWebhook="SlackWebhook"}(o||(o={})),function(e){e.Custom="Custom",e.Daily="Daily",e.Monthly="Monthly",e.Weekly="Weekly"}(u||(u={})),function(e){e.RealTime="RealTime",e.Scheduled="Scheduled"}(l||(l={}))},94453:function(e,t,n){n.r(t);var r=n(70655),i=n(56256),a=n(94199),c=n(71577),o=n(71230),u=n(15746),l=n(96486),s=n(67294),d=n(68432),f=n(15137),m=n(76),h=n(38780),v=n(78410),p=n(83716),b=n(71112),g=n(37565),y=n(84065),E=n(92693),C=n(96162),k=n(61105),Z=n(64632),S=n(55538),w=n(802),x=n(1600),T=n(24671),I=n(96840),R=n(38212),N=n(46321);t.default=function(){var e,t=(0,d.$)().t,n=(0,f.k6)(),A=(0,r.CR)((0,s.useState)(!0),2),D=A[0],G=A[1],P=(0,r.CR)((0,s.useState)([]),2),J=P[0],W=P[1],L=(0,r.CR)((0,s.useState)(),2),F=L[0],z=L[1],M=(0,w.C)(),O=M.pageSize,_=M.currentPage,B=M.handlePageChange,H=M.handlePageSizeChange,j=M.handlePagingChange,K=M.showPagination,U=M.paging,Q=(0,s.useCallback)((function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){var n,i,a;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:G(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,(0,x.BN)({after:null==e?void 0:e.after,before:null==e?void 0:e.before,limit:O})];case 2:return n=r.sent(),i=n.data,a=n.paging,W(i.filter((function(e){return e.provider!==S.lP.System}))),j(a),[3,5];case 3:return r.sent(),(0,N.Eo)(t("server.entity-fetch-error",{entity:t("label.alert-plural")})),[3,5];case 4:return G(!1),[7];case 5:return[2]}}))}))}),[O]);(0,s.useEffect)((function(){Q()}),[O]);var $=(0,s.useCallback)((function(){return(0,r.mG)(void 0,void 0,void 0,(function(){return(0,r.Jh)(this,(function(e){try{z(void 0),Q()}catch(e){(0,N.Eo)(e)}return[2]}))}))}),[Q]),q=(0,s.useCallback)((function(e){var t,n=e.cursorType,r=e.currentPage;n&&(Q(((t={})[n]=U[n],t)),B(r))}),[U]),V=(0,s.useMemo)((function(){return[{title:t("label.name"),dataIndex:"name",width:"200px",key:"name",render:function(e,t){return s.createElement(m.Link,{to:"alert/"+t.id},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,l.isEmpty)(e)?s.createElement(i.Z.Text,{className:"text-grey-muted"},t("label.no-entity",{entity:t("label.description")})):e}},{title:t("label.action-plural"),dataIndex:"id",width:120,key:"id",render:function(e,n){return s.createElement("div",{className:"d-flex items-center"},s.createElement(a.Z,{placement:"bottom",title:t("label.edit")},s.createElement(m.Link,{to:"edit-alert/"+e},s.createElement(c.Z,{className:"d-inline-flex items-center justify-center","data-testid":"alert-edit-"+n.name,icon:s.createElement(h.ReactComponent,{width:16}),type:"text"}))),s.createElement(a.Z,{placement:"bottom",title:t("label.delete")},s.createElement(c.Z,{"data-testid":"alert-delete-"+n.name,disabled:n.provider===S.lP.System,icon:s.createElement(R.ZP,{className:"w-4",icon:R.PJ.DELETE}),type:"text",onClick:function(){return z(n)}})))}}]}),[$]),X=(0,s.useMemo)((function(){return{header:t("label.alert-plural"),subHeader:t("message.alerts-description")}}),[]);return s.createElement(s.Fragment,null,s.createElement(o.Z,{gutter:[16,16]},s.createElement(u.Z,{span:24},s.createElement("div",{className:"d-flex justify-between"},s.createElement(y.Z,{data:X}),s.createElement(m.Link,{to:(0,I.si)(C.CZ.NOTIFICATIONS,C.lx.ADD_ALERTS)},s.createElement(c.Z,{"data-testid":"create-alert",type:"primary"},t("label.create-entity",{entity:"alert"}))))),s.createElement(u.Z,{span:24},s.createElement(g.Z,{bordered:!0,columns:V,dataSource:J,loading:D,locale:{emptyText:s.createElement(p.Z,{permission:!0,className:"p-y-md",doc:E.co,heading:t("label.alert"),type:k.Wx.CREATE,onClick:function(){return n.push((0,I.si)(C.CZ.NOTIFICATIONS,C.lx.ADD_ALERTS))}})},pagination:!1,rowKey:"id",size:"small"})),s.createElement(u.Z,{span:24},K&&s.createElement(b.Z,{currentPage:_,pageSize:O,paging:U,pagingHandler:q,onShowSizeChange:H}),s.createElement(v.Z,{afterDeleteAction:$,allowSoftDelete:!1,entityId:null!==(e=null==F?void 0:F.id)&&void 0!==e?e:"",entityName:(0,T.C_)(F),entityType:Z.py.SUBSCRIPTION,visible:Boolean(F),onCancel:function(){z(void 0)}}))))}},1600:function(e,t,n){n.d(t,{$K:function(){return o},BN:function(){return u},Cr:function(){return s},JH:function(){return m},UT:function(){return f},Zt:function(){return c},aI:function(){return d},el:function(){return l}});var r=n(70655),i=n(2598),a="/events/subscriptions",c=function(e,t){return(0,r.mG)(void 0,void 0,void 0,(function(){return(0,r.Jh)(this,(function(n){switch(n.label){case 0:return[4,i.Z.get(a+"/"+e,{params:(0,r.pi)((0,r.pi)({},t),{include:"all"})})];case 1:return[2,n.sent().data]}}))}))},o=function(e,t){return(0,r.mG)(void 0,void 0,void 0,(function(){return(0,r.Jh)(this,(function(n){switch(n.label){case 0:return[4,i.Z.get(a+"/name/"+e,{params:(0,r.pi)((0,r.pi)({},t),{include:"all"})})];case 1:return[2,n.sent().data]}}))}))},u=function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){return(0,r.Jh)(this,(function(t){switch(t.label){case 0:return[4,i.Z.get(a,{params:(0,r.pi)({},e)})];case 1:return[2,t.sent().data]}}))}))},l=function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){return(0,r.Jh)(this,(function(t){switch(t.label){case 0:return[4,i.Z.post(a,e)];case 1:return[2,t.sent().data]}}))}))},s=function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){return(0,r.Jh)(this,(function(t){switch(t.label){case 0:return[4,i.Z.put(a,e)];case 1:return[2,t.sent().data]}}))}))},d=function(){return(0,r.mG)(void 0,void 0,void 0,(function(){return(0,r.Jh)(this,(function(e){switch(e.label){case 0:return[4,i.Z.get(a+"/functions")];case 1:return[2,e.sent().data]}}))}))},f=function(){return(0,r.mG)(void 0,void 0,void 0,(function(){return(0,r.Jh)(this,(function(e){switch(e.label){case 0:return[4,i.Z.get(a+"/resources")];case 1:return[2,e.sent().data]}}))}))},m=function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){return(0,r.Jh)(this,(function(t){switch(t.label){case 0:return[4,i.Z.put(a+"/trigger/"+e)];case 1:return[2,t.sent().data]}}))}))}}}]);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy