"use strict";(globalThis.webpackChunksuperset=globalThis.webpackChunksuperset||[]).push([[8774],{52630:(e,t,a)=>{t.iB=t.YM=void 0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},r=l(a(67294)),s=l(a(45697)),i=a(2371);function l(e){return e&&e.__esModule?e:{default:e}}t.YM=function(e){var t=e.itemTypeToComponent,a=e.WrapperComponent,l=void 0===a?"div":a,o=function(e){var a=e.currentPage,s=e.totalPages,o=e.boundaryPagesRange,d=e.siblingPagesRange,u=e.hideEllipsis,c=e.hidePreviousAndNextPageLinks,g=e.hideFirstAndLastPageLinks,h=e.onChange,p=e.disabled,m=function(e,t){var a={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(a[n]=e[n]);return a}(e,["currentPage","totalPages","boundaryPagesRange","siblingPagesRange","hideEllipsis","hidePreviousAndNextPageLinks","hideFirstAndLastPageLinks","onChange","disabled"]),b=(0,i.getPaginationModel)({currentPage:a,totalPages:s,boundaryPagesRange:o,siblingPagesRange:d,hideEllipsis:u,hidePreviousAndNextPageLinks:c,hideFirstAndLastPageLinks:g}),P=function(e,t,a){return function(s){var i,l,o,d=e[s.type],u=(l=(i=s).value,o=i.isDisabled,function(){!o&&a&&t!==l&&a(l)});return r.default.createElement(d,n({onClick:u},s))}}(t,a,h);return r.default.createElement(l,m,b.map((function(e){return P(n({},e,{isDisabled:!!p}))})))};return o.propTypes={currentPage:s.default.number.isRequired,totalPages:s.default.number.isRequired,boundaryPagesRange:s.default.number,siblingPagesRange:s.default.number,hideEllipsis:s.default.bool,hidePreviousAndNextPageLinks:s.default.bool,hideFirstAndLastPageLinks:s.default.bool,onChange:s.default.func,disabled:s.default.bool},o},t.iB=i.ITEM_TYPES},54070:(e,t,a)=>{a.d(t,{w:()=>l}),a(67294);var n=a(58593),r=a(83379),s=a(61988),i=a(11965);const l=({user:e,date:t})=>{const a=(0,i.tZ)("span",{className:"no-wrap"},t);if(e){const t=(0,r.Z)(e),l=(0,s.t)("Modified by: %s",t);return(0,i.tZ)(n.u,{title:l,placement:"bottom"},a)}return a}},27989:(e,t,a)=>{a.d(t,{Z:()=>p});var n=a(67294),r=a(51995),s=a(61988),i=a(35932),l=a(74069),o=a(4715),d=a(34858),u=a(60972),c=a(11965);const g=r.iK.div`
  display: block;
  color: ${({theme:e})=>e.colors.grayscale.base};
  font-size: ${({theme:e})=>e.typography.sizes.s}px;
`,h=r.iK.div`
  padding-bottom: ${({theme:e})=>2*e.gridUnit}px;
  padding-top: ${({theme:e})=>2*e.gridUnit}px;

  & > div {
    margin: ${({theme:e})=>e.gridUnit}px 0;
  }

  &.extra-container {
    padding-top: 8px;
  }

  .confirm-overwrite {
    margin-bottom: ${({theme:e})=>2*e.gridUnit}px;
  }

  .input-container {
    display: flex;
    align-items: center;

    label {
      display: flex;
      margin-right: ${({theme:e})=>2*e.gridUnit}px;
    }

    i {
      margin: 0 ${({theme:e})=>e.gridUnit}px;
    }
  }

  input,
  textarea {
    flex: 1 1 auto;
  }

  textarea {
    height: 160px;
    resize: none;
  }

  input::placeholder,
  textarea::placeholder {
    color: ${({theme:e})=>e.colors.grayscale.light1};
  }

  textarea,
  input[type='text'],
  input[type='number'] {
    padding: ${({theme:e})=>1.5*e.gridUnit}px
      ${({theme:e})=>2*e.gridUnit}px;
    border-style: none;
    border: 1px solid ${({theme:e})=>e.colors.grayscale.light2};
    border-radius: ${({theme:e})=>e.gridUnit}px;

    &[name='name'] {
      flex: 0 1 auto;
      width: 40%;
    }

    &[name='sqlalchemy_uri'] {
      margin-right: ${({theme:e})=>3*e.gridUnit}px;
    }
  }
`,p=({resourceName:e,resourceLabel:t,passwordsNeededMessage:a,confirmOverwriteMessage:r,onModelImport:p,show:m,onHide:b,passwordFields:P=[],setPasswordFields:f=(()=>{}),sshTunnelPasswordFields:y=[],setSSHTunnelPasswordFields:v=(()=>{}),sshTunnelPrivateKeyFields:_=[],setSSHTunnelPrivateKeyFields:S=(()=>{}),sshTunnelPrivateKeyPasswordFields:E=[],setSSHTunnelPrivateKeyPasswordFields:w=(()=>{})})=>{const[T,Z]=(0,n.useState)(!0),[I,N]=(0,n.useState)({}),[L,k]=(0,n.useState)(!1),[x,A]=(0,n.useState)(!1),[M,F]=(0,n.useState)([]),[R,C]=(0,n.useState)(!1),[K,$]=(0,n.useState)(),[D,O]=(0,n.useState)({}),[H,Y]=(0,n.useState)({}),[U,G]=(0,n.useState)({}),B=()=>{F([]),f([]),N({}),k(!1),A(!1),C(!1),$(""),v([]),S([]),w([]),O({}),Y({}),G({})},{state:{alreadyExists:z,passwordsNeeded:j,sshPasswordNeeded:q,sshPrivateKeyNeeded:V,sshPrivateKeyPasswordNeeded:W},importResource:X}=(0,d.PW)(e,t,(e=>{$(e)}));(0,n.useEffect)((()=>{f(j),j.length>0&&C(!1)}),[j,f]),(0,n.useEffect)((()=>{k(z.length>0),z.length>0&&C(!1)}),[z,k]),(0,n.useEffect)((()=>{v(q),q.length>0&&C(!1)}),[q,v]),(0,n.useEffect)((()=>{S(V),V.length>0&&C(!1)}),[V,S]),(0,n.useEffect)((()=>{w(W),W.length>0&&C(!1)}),[W,w]);return T&&m&&Z(!1),(0,c.tZ)(l.default,{name:"model",className:"import-model-modal",disablePrimaryButton:0===M.length||L&&!x||R,onHandledPrimaryAction:()=>{var e;(null==(e=M[0])?void 0:e.originFileObj)instanceof File&&(C(!0),X(M[0].originFileObj,I,D,H,U,x).then((e=>{e&&(B(),p())})))},onHide:()=>{Z(!0),b(),B()},primaryButtonName:L?(0,s.t)("Overwrite"):(0,s.t)("Import"),primaryButtonType:L?"danger":"primary",width:"750px",show:m,title:(0,c.tZ)("h4",null,(0,s.t)("Import %s",t))},(0,c.tZ)(h,null,(0,c.tZ)(o.gq,{name:"modelFile",id:"modelFile",accept:".yaml,.json,.yml,.zip",fileList:M,onChange:e=>{F([{...e.file,status:"done"}])},onRemove:e=>(F(M.filter((t=>t.uid!==e.uid))),!1),customRequest:()=>{},disabled:R},(0,c.tZ)(i.Z,{loading:R},(0,s.t)("Select file")))),K&&(0,c.tZ)(u.Z,{errorMessage:K,showDbInstallInstructions:P.length>0||y.length>0||_.length>0||E.length>0}),(()=>{if(0===P.length&&0===y.length&&0===_.length&&0===E.length)return null;const e=[...new Set([...P,...y,..._,...E])];return(0,c.tZ)(n.Fragment,null,(0,c.tZ)("h5",null,(0,s.t)("Database passwords")),(0,c.tZ)(g,null,a),e.map((e=>(0,c.tZ)(n.Fragment,null,(null==P?void 0:P.indexOf(e))>=0&&(0,c.tZ)(h,{key:`password-for-${e}`},(0,c.tZ)("div",{className:"control-label"},(0,s.t)("%s PASSWORD",e.slice(10)),(0,c.tZ)("span",{className:"required"},"*")),(0,c.tZ)("input",{name:`password-${e}`,autoComplete:`password-${e}`,type:"password",value:I[e],onChange:t=>N({...I,[e]:t.target.value})})),(null==y?void 0:y.indexOf(e))>=0&&(0,c.tZ)(h,{key:`ssh_tunnel_password-for-${e}`},(0,c.tZ)("div",{className:"control-label"},(0,s.t)("%s SSH TUNNEL PASSWORD",e.slice(10)),(0,c.tZ)("span",{className:"required"},"*")),(0,c.tZ)("input",{name:`ssh_tunnel_password-${e}`,autoComplete:`ssh_tunnel_password-${e}`,type:"password",value:D[e],onChange:t=>O({...D,[e]:t.target.value})})),(null==_?void 0:_.indexOf(e))>=0&&(0,c.tZ)(h,{key:`ssh_tunnel_private_key-for-${e}`},(0,c.tZ)("div",{className:"control-label"},(0,s.t)("%s SSH TUNNEL PRIVATE KEY",e.slice(10)),(0,c.tZ)("span",{className:"required"},"*")),(0,c.tZ)("textarea",{name:`ssh_tunnel_private_key-${e}`,autoComplete:`ssh_tunnel_private_key-${e}`,value:H[e],onChange:t=>Y({...H,[e]:t.target.value})})),(null==E?void 0:E.indexOf(e))>=0&&(0,c.tZ)(h,{key:`ssh_tunnel_private_key_password-for-${e}`},(0,c.tZ)("div",{className:"control-label"},(0,s.t)("%s SSH TUNNEL PRIVATE KEY PASSWORD",e.slice(10)),(0,c.tZ)("span",{className:"required"},"*")),(0,c.tZ)("input",{name:`ssh_tunnel_private_key_password-${e}`,autoComplete:`ssh_tunnel_private_key_password-${e}`,type:"password",value:U[e],onChange:t=>G({...U,[e]:t.target.value})}))))))})(),L?(0,c.tZ)(n.Fragment,null,(0,c.tZ)(h,null,(0,c.tZ)("div",{className:"confirm-overwrite"},r),(0,c.tZ)("div",{className:"control-label"},(0,s.t)('Type "%s" to confirm',(0,s.t)("OVERWRITE"))),(0,c.tZ)("input",{id:"overwrite",type:"text",onChange:e=>{var t,a;const n=null!=(t=null==(a=e.currentTarget)?void 0:a.value)?t:"";A(n.toUpperCase()===(0,s.t)("OVERWRITE"))}}))):null)}},83556:(e,t,a)=>{a.d(t,{P:()=>c});var n=a(67294),r=a(51995),s=a(59361),i=a(58593),l=a(11965);const o=(0,r.iK)(s.Z)`
  ${({theme:e})=>`\n  margin-top: ${e.gridUnit}px;\n  margin-bottom: ${e.gridUnit}px;\n  font-size: ${e.typography.sizes.s}px;\n  `};
`,d=({name:e,id:t,index:a,onDelete:r,editable:s=!1,onClick:d,toolTipTitle:u=e})=>{const c=(0,n.useMemo)((()=>e.length>20),[e])?`${e.slice(0,20)}...`:e;return(0,l.tZ)(n.Fragment,null,s?(0,l.tZ)(i.u,{title:u,key:u},(0,l.tZ)(o,{key:t,closable:s,onClose:()=>a?null==r?void 0:r(a):null,color:"blue"},c)):(0,l.tZ)(i.u,{title:u,key:u},(0,l.tZ)(o,{role:"link",key:t,onClick:d},t?(0,l.tZ)("a",{href:`/superset/all_entities/?id=${t}`,target:"_blank",rel:"noreferrer"},c):c)))},u=r.iK.div`
  max-width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
`,c=({tags:e,editable:t=!1,onDelete:a,maxTags:r})=>{const[s,i]=(0,n.useState)(r),o=e=>{null==a||a(e)},c=(0,n.useMemo)((()=>s?e.length>s:null),[e.length,s]),g=(0,n.useMemo)((()=>"number"==typeof s?e.length-s+1:null),[c,e.length,s]);return(0,l.tZ)(u,{className:"tag-list"},c&&"number"==typeof s?(0,l.tZ)(n.Fragment,null,e.slice(0,s-1).map(((e,a)=>(0,l.tZ)(d,{id:e.id,key:e.id,name:e.name,index:a,onDelete:o,editable:t}))),e.length>s?(0,l.tZ)(d,{name:`+${g}...`,onClick:()=>i(void 0),toolTipTitle:e.map((e=>e.name)).join(", ")}):null):(0,l.tZ)(n.Fragment,null,e.map(((e,a)=>(0,l.tZ)(d,{id:e.id,key:e.id,name:e.name,index:a,onDelete:o,editable:t}))),r&&e.length>r?(0,l.tZ)(d,{name:"...",onClick:()=>i(r)}):null))}},18510:(e,t,a)=>{a.r(t),a.d(t,{default:()=>O});var n,r=a(61988),s=a(51995),i=a(31069),l=a(93185),o=a(28216),d=a(67294),u=a(73727),c=a(15926),g=a.n(c),h=a(40768),p=a(34858),m=a(19259),b=a(83556),P=a(32228),f=a(38703),y=a(86074),v=a(93139),_=a(61337),S=a(14114),E=a(34581),w=a(70707),T=a(17198),Z=a(36674),I=a(20818),N=a(58593),L=a(27989),k=a(12),x=a(79789),A=a(60718),M=a(65043);!function(e){e.PUBLISHED="published",e.DRAFT="draft"}(n||(n={}));var F=a(12617),R=a(54070),C=a(11965);const K=(0,r.t)('The passwords for the databases below are needed in order to import them together with the dashboards. Please note that the "Secure Extra" and "Certificate" sections of the database configuration are not present in export files, and should be added manually after the import if they are needed.'),$=(0,r.t)("You are importing one or more dashboards that already exist. Overwriting might cause you to lose some of your work. Are you sure you want to overwrite?"),D=s.iK.div`
  color: ${({theme:e})=>e.colors.grayscale.base};
`,O=(0,S.ZP)((function(e){var t;const{addDangerToast:a,addSuccessToast:s,user:c}=e,{roles:S}=(0,o.v9)((e=>e.user)),O=(0,F.R)("can_read","Tag",S),{state:{loading:H,resourceCount:Y,resourceCollection:U,bulkSelectEnabled:G},setResourceCollection:B,hasPerm:z,fetchData:j,toggleBulkSelect:q,refreshData:V}=(0,p.Yi)("dashboard",(0,r.t)("dashboard"),a),W=(0,d.useMemo)((()=>U.map((e=>e.id))),[U]),[X,J]=(0,p.NE)("dashboard",W,a),[Q,ee]=(0,d.useState)(null),[te,ae]=(0,d.useState)(null),[ne,re]=(0,d.useState)(!1),[se,ie]=(0,d.useState)([]),[le,oe]=(0,d.useState)(!1),[de,ue]=(0,d.useState)([]),[ce,ge]=(0,d.useState)([]),[he,pe]=(0,d.useState)([]),me=(0,_.OH)(null==c||null==(t=c.userId)?void 0:t.toString(),null),be=z("can_write"),Pe=z("can_write"),fe=z("can_write"),ye=z("can_export"),ve=[{id:"changed_on_delta_humanized",desc:!0}];function _e(e){ee(e)}function Se(e){return i.Z.get({endpoint:`/api/v1/dashboard/${e.id}`}).then((({json:e={}})=>{B(U.map((t=>{var a;if(t.id===(null==e||null==(a=e.result)?void 0:a.id)){const{changed_by_name:a,changed_by:n,dashboard_title:r="",slug:s="",json_metadata:i="",changed_on_delta_humanized:l,url:o="",certified_by:d="",certification_details:u="",owners:c,tags:g}=e.result;return{...t,changed_by_name:a,changed_by:n,dashboard_title:r,slug:s,json_metadata:i,changed_on_delta_humanized:l,url:o,certified_by:d,certification_details:u,owners:c,tags:g}}return t})))}),(0,h.v$)((e=>a((0,r.t)("An error occurred while fetching dashboards: %s",e)))))}const Ee=e=>{const t=e.map((({id:e})=>e));(0,P.Z)("dashboard",t,(()=>{oe(!1)})),oe(!0)},we=(0,d.useMemo)((()=>[{Cell:({row:{original:{id:e}}})=>(null==c?void 0:c.userId)&&(0,C.tZ)(Z.Z,{itemId:e,saveFaveStar:X,isStarred:J[e]}),Header:"",id:"id",disableSortBy:!0,size:"xs",hidden:!(null!=c&&c.userId)},{Cell:({row:{original:{url:e,dashboard_title:t,certified_by:a,certification_details:n}}})=>(0,C.tZ)(u.rU,{to:e},a&&(0,C.tZ)(d.Fragment,null,(0,C.tZ)(x.Z,{certifiedBy:a,details:n})," "),t),Header:(0,r.t)("Name"),accessor:"dashboard_title"},{Cell:({row:{original:{status:e}}})=>e===n.PUBLISHED?(0,r.t)("Published"):(0,r.t)("Draft"),Header:(0,r.t)("Status"),accessor:"published",size:"xl"},{Cell:({row:{original:{tags:e=[]}}})=>(0,C.tZ)(b.P,{tags:e.filter((e=>"TagTypes.custom"===e.type||1===e.type)),maxTags:3}),Header:(0,r.t)("Tags"),accessor:"tags",disableSortBy:!0,hidden:!(0,l.cr)(l.TT.TaggingSystem)},{Cell:({row:{original:{owners:e=[]}}})=>(0,C.tZ)(E.Z,{users:e}),Header:(0,r.t)("Owners"),accessor:"owners",disableSortBy:!0,size:"xl"},{Cell:({row:{original:{changed_on_delta_humanized:e,changed_by:t}}})=>(0,C.tZ)(R.w,{date:e,user:t}),Header:(0,r.t)("Last modified"),accessor:"changed_on_delta_humanized",size:"xl"},{Cell:({row:{original:e}})=>(0,C.tZ)(D,{className:"actions"},fe&&(0,C.tZ)(m.Z,{title:(0,r.t)("Please confirm"),description:(0,C.tZ)(d.Fragment,null,(0,r.t)("Are you sure you want to delete")," ",(0,C.tZ)("b",null,e.dashboard_title),"?"),onConfirm:()=>(0,h.Iu)(e,V,s,a)},(e=>(0,C.tZ)(N.u,{id:"delete-action-tooltip",title:(0,r.t)("Delete"),placement:"bottom"},(0,C.tZ)("span",{role:"button",tabIndex:0,className:"action-button",onClick:e},(0,C.tZ)(w.Z.Trash,null))))),ye&&(0,C.tZ)(N.u,{id:"export-action-tooltip",title:(0,r.t)("Export"),placement:"bottom"},(0,C.tZ)("span",{role:"button",tabIndex:0,className:"action-button",onClick:()=>Ee([e])},(0,C.tZ)(w.Z.Share,null))),Pe&&(0,C.tZ)(N.u,{id:"edit-action-tooltip",title:(0,r.t)("Edit"),placement:"bottom"},(0,C.tZ)("span",{role:"button",tabIndex:0,className:"action-button",onClick:()=>_e(e)},(0,C.tZ)(w.Z.EditAlt,null)))),Header:(0,r.t)("Actions"),id:"actions",hidden:!Pe&&!fe&&!ye,disableSortBy:!0},{accessor:k.J.ChangedBy,hidden:!0}]),[null==c?void 0:c.userId,Pe,fe,ye,X,J,V,s,a]),Te=(0,d.useMemo)((()=>({Header:(0,r.t)("Favorite"),key:"favorite",id:"id",urlDisplay:"favorite",input:"select",operator:v.p.DashboardIsFav,unfilteredLabel:(0,r.t)("Any"),selects:[{label:(0,r.t)("Yes"),value:!0},{label:(0,r.t)("No"),value:!1}]})),[]),Ze=(0,d.useMemo)((()=>[{Header:(0,r.t)("Name"),key:"search",id:"dashboard_title",input:"search",operator:v.p.TitleOrSlug},{Header:(0,r.t)("Status"),key:"published",id:"published",input:"select",operator:v.p.Equals,unfilteredLabel:(0,r.t)("Any"),selects:[{label:(0,r.t)("Published"),value:!0},{label:(0,r.t)("Draft"),value:!1}]},...(0,l.cr)(l.TT.TaggingSystem)&&O?[{Header:(0,r.t)("Tag"),key:"tags",id:"tags",input:"select",operator:v.p.DashboardTags,unfilteredLabel:(0,r.t)("All"),fetchSelects:A.m}]:[],{Header:(0,r.t)("Owner"),key:"owner",id:"owners",input:"select",operator:v.p.RelationManyMany,unfilteredLabel:(0,r.t)("All"),fetchSelects:(0,h.tm)("dashboard","owners",(0,h.v$)((e=>a((0,r.t)("An error occurred while fetching dashboard owner values: %s",e)))),e.user),paginate:!0},...null!=c&&c.userId?[Te]:[],{Header:(0,r.t)("Certified"),key:"certified",id:"id",urlDisplay:"certified",input:"select",operator:v.p.DashboardIsCertified,unfilteredLabel:(0,r.t)("Any"),selects:[{label:(0,r.t)("Yes"),value:!0},{label:(0,r.t)("No"),value:!1}]},{Header:(0,r.t)("Modified by"),key:"changed_by",id:"changed_by",input:"select",operator:v.p.RelationOneMany,unfilteredLabel:(0,r.t)("All"),fetchSelects:(0,h.tm)("dashboard","changed_by",(0,h.v$)((e=>(0,r.t)("An error occurred while fetching dataset datasource values: %s",e))),c),paginate:!0}]),[a,Te,e.user]),Ie=[{desc:!1,id:"dashboard_title",label:(0,r.t)("Alphabetical"),value:"alphabetical"},{desc:!0,id:"changed_on_delta_humanized",label:(0,r.t)("Recently modified"),value:"recently_modified"},{desc:!1,id:"changed_on_delta_humanized",label:(0,r.t)("Least recently modified"),value:"least_recently_modified"}],Ne=(0,d.useCallback)((e=>(0,C.tZ)(M.Z,{dashboard:e,hasPerm:z,bulkSelectEnabled:G,showThumbnails:me?me.thumbnails:(0,l.cr)(l.TT.Thumbnails),userId:null==c?void 0:c.userId,loading:H,openDashboardEditModal:_e,saveFavoriteStatus:X,favoriteStatus:J[e.id],handleBulkDashboardExport:Ee,onDelete:e=>ae(e)})),[G,J,z,H,null==c?void 0:c.userId,X,me]),Le=[];return(fe||ye)&&Le.push({name:(0,r.t)("Bulk select"),buttonStyle:"secondary","data-test":"bulk-select",onClick:q}),be&&(Le.push({name:(0,C.tZ)(d.Fragment,null,(0,C.tZ)("i",{className:"fa fa-plus"})," ",(0,r.t)("Dashboard")),buttonStyle:"primary",onClick:()=>{window.location.assign("/dashboard/new")}}),Le.push({name:(0,C.tZ)(N.u,{id:"import-tooltip",title:(0,r.t)("Import dashboards"),placement:"bottomRight"},(0,C.tZ)(w.Z.Import,null)),buttonStyle:"link",onClick:()=>{re(!0)}})),(0,C.tZ)(d.Fragment,null,(0,C.tZ)(y.Z,{name:(0,r.t)("Dashboards"),buttons:Le}),(0,C.tZ)(m.Z,{title:(0,r.t)("Please confirm"),description:(0,r.t)("Are you sure you want to delete the selected dashboards?"),onConfirm:function(e){return i.Z.delete({endpoint:`/api/v1/dashboard/?q=${g().encode(e.map((({id:e})=>e)))}`}).then((({json:e={}})=>{V(),s(e.message)}),(0,h.v$)((e=>a((0,r.t)("There was an issue deleting the selected dashboards: ",e)))))}},(e=>{const t=[];return fe&&t.push({key:"delete",name:(0,r.t)("Delete"),type:"danger",onSelect:e}),ye&&t.push({key:"export",name:(0,r.t)("Export"),type:"primary",onSelect:Ee}),(0,C.tZ)(d.Fragment,null,Q&&(0,C.tZ)(I.Z,{dashboardId:Q.id,show:!0,onHide:()=>ee(null),onSubmit:Se}),te&&(0,C.tZ)(T.Z,{description:(0,C.tZ)(d.Fragment,null,(0,r.t)("Are you sure you want to delete")," ",(0,C.tZ)("b",null,te.dashboard_title),"?"),onConfirm:()=>{(0,h.Iu)(te,V,s,a,void 0,null==c?void 0:c.userId),ae(null)},onHide:()=>ae(null),open:!!te,title:(0,r.t)("Please confirm")}),(0,C.tZ)(v.Z,{bulkActions:t,bulkSelectEnabled:G,cardSortSelectOptions:Ie,className:"dashboard-list-view",columns:we,count:Y,data:U,disableBulkSelect:q,fetchData:j,refreshData:V,filters:Ze,initialSort:ve,loading:H,pageSize:25,addSuccessToast:s,addDangerToast:a,showThumbnails:me?me.thumbnails:(0,l.cr)(l.TT.Thumbnails),renderCard:Ne,defaultViewMode:(0,l.cr)(l.TT.ListviewsDefaultCardView)?"card":"table",enableBulkTag:!0,bulkTagResourceName:"dashboard"}))})),(0,C.tZ)(L.Z,{resourceName:"dashboard",resourceLabel:(0,r.t)("dashboard"),passwordsNeededMessage:K,confirmOverwriteMessage:$,addDangerToast:a,addSuccessToast:s,onModelImport:()=>{re(!1),V(),s((0,r.t)("Dashboard imported"))},show:ne,onHide:()=>{re(!1)},passwordFields:se,setPasswordFields:ie,sshTunnelPasswordFields:de,setSSHTunnelPasswordFields:ue,sshTunnelPrivateKeyFields:ce,setSSHTunnelPrivateKeyFields:ge,sshTunnelPrivateKeyPasswordFields:he,setSSHTunnelPrivateKeyPasswordFields:pe}),le&&(0,C.tZ)(f.Z,null))}))},83379:(e,t,a)=>{function n(e){return e?`${e.first_name} ${e.last_name}`:""}a.d(t,{Z:()=>n})},56590:(e,t)=>{t.ITEM_TYPES={PAGE:"PAGE",ELLIPSIS:"ELLIPSIS",FIRST_PAGE_LINK:"FIRST_PAGE_LINK",PREVIOUS_PAGE_LINK:"PREVIOUS_PAGE_LINK",NEXT_PAGE_LINK:"NEXT_PAGE_LINK",LAST_PAGE_LINK:"LAST_PAGE_LINK"},t.ITEM_KEYS={FIRST_ELLIPSIS:-1,SECOND_ELLIPSIS:-2,FIRST_PAGE_LINK:-3,PREVIOUS_PAGE_LINK:-4,NEXT_PAGE_LINK:-5,LAST_PAGE_LINK:-6}},53804:(e,t,a)=>{var n=a(56590);t.createFirstEllipsis=function(e){return{type:n.ITEM_TYPES.ELLIPSIS,key:n.ITEM_KEYS.FIRST_ELLIPSIS,value:e,isActive:!1}},t.createSecondEllipsis=function(e){return{type:n.ITEM_TYPES.ELLIPSIS,key:n.ITEM_KEYS.SECOND_ELLIPSIS,value:e,isActive:!1}},t.createFirstPageLink=function(e){var t=e.currentPage;return{type:n.ITEM_TYPES.FIRST_PAGE_LINK,key:n.ITEM_KEYS.FIRST_PAGE_LINK,value:1,isActive:1===t}},t.createPreviousPageLink=function(e){var t=e.currentPage;return{type:n.ITEM_TYPES.PREVIOUS_PAGE_LINK,key:n.ITEM_KEYS.PREVIOUS_PAGE_LINK,value:Math.max(1,t-1),isActive:1===t}},t.createNextPageLink=function(e){var t=e.currentPage,a=e.totalPages;return{type:n.ITEM_TYPES.NEXT_PAGE_LINK,key:n.ITEM_KEYS.NEXT_PAGE_LINK,value:Math.min(a,t+1),isActive:t===a}},t.createLastPageLink=function(e){var t=e.currentPage,a=e.totalPages;return{type:n.ITEM_TYPES.LAST_PAGE_LINK,key:n.ITEM_KEYS.LAST_PAGE_LINK,value:a,isActive:t===a}},t.createPageFunctionFactory=function(e){var t=e.currentPage;return function(e){return{type:n.ITEM_TYPES.PAGE,key:e,value:e,isActive:e===t}}}},1158:(e,t)=>{t.createRange=function(e,t){for(var a=[],n=e;n<=t;n++)a.push(n);return a}},2371:(e,t,a)=>{var n=a(1158),r=a(53804);t.getPaginationModel=function(e){if(null==e)throw new Error("getPaginationModel(): options object should be a passed");var t=Number(e.totalPages);if(isNaN(t))throw new Error("getPaginationModel(): totalPages should be a number");if(t<0)throw new Error("getPaginationModel(): totalPages shouldn't be a negative number");var a=Number(e.currentPage);if(isNaN(a))throw new Error("getPaginationModel(): currentPage should be a number");if(a<0)throw new Error("getPaginationModel(): currentPage shouldn't be a negative number");if(a>t)throw new Error("getPaginationModel(): currentPage shouldn't be greater than totalPages");var s=null==e.boundaryPagesRange?1:Number(e.boundaryPagesRange);if(isNaN(s))throw new Error("getPaginationModel(): boundaryPagesRange should be a number");if(s<0)throw new Error("getPaginationModel(): boundaryPagesRange shouldn't be a negative number");var i=null==e.siblingPagesRange?1:Number(e.siblingPagesRange);if(isNaN(i))throw new Error("getPaginationModel(): siblingPagesRange should be a number");if(i<0)throw new Error("getPaginationModel(): siblingPagesRange shouldn't be a negative number");var l=Boolean(e.hidePreviousAndNextPageLinks),o=Boolean(e.hideFirstAndLastPageLinks),d=Boolean(e.hideEllipsis),u=d?0:1,c=[],g=r.createPageFunctionFactory(e);if(o||c.push(r.createFirstPageLink(e)),l||c.push(r.createPreviousPageLink(e)),1+2*u+2*i+2*s>=t){var h=n.createRange(1,t).map(g);c.push.apply(c,h)}else{var p=s,m=n.createRange(1,p).map(g),b=t+1-s,P=t,f=n.createRange(b,P).map(g),y=Math.min(Math.max(a-i,p+u+1),b-u-2*i-1),v=y+2*i,_=n.createRange(y,v).map(g);if(c.push.apply(c,m),!d){var S=y-1,E=(S===p+1?g:r.createFirstEllipsis)(S);c.push(E)}if(c.push.apply(c,_),!d){var w=v+1,T=(w===b-1?g:r.createSecondEllipsis)(w);c.push(T)}c.push.apply(c,f)}return l||c.push(r.createNextPageLink(e)),o||c.push(r.createLastPageLink(e)),c};var s=a(56590);t.ITEM_TYPES=s.ITEM_TYPES,t.ITEM_KEYS=s.ITEM_KEYS}}]);
//# sourceMappingURL=05b41104c7e15bc2160c.chunk.js.map