var r=Object.defineProperty;var h=(e,a,o)=>a in e?r(e,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[a]=o;var s=(e,a,o)=>(h(e,typeof a!="symbol"?a+"":a,o),o);import{d as m,B as f,S as u,_,o as l,c as i,a as t,f as p,F as b,j as k,t as d,e as c}from"../index.js";class g{constructor(){s(this,"productName","");s(this,"productVersion","");s(this,"serverName","");s(this,"tenantId","");s(this,"configProfilesEnabled",!1)}}class j{constructor(){s(this,"server",new g);s(this,"onHold",[]);s(this,"pools",[]);s(this,"licenseFiles",[])}}class I{constructor(){s(this,"numberOfBackups",0);s(this,"databaseFileSize",0);s(this,"foldersSize",0);s(this,"errors",0);s(this,"mostRecentRunDateTime",new Date)}}class q{constructor(){s(this,"auditDatabaseFileSize",0);s(this,"logsFolderSize",0)}}const v=m({props:{machines:{required:!0,type:Object}},data(){return{moment:f,licensingBaseUrl:u.licensingBaseUrl}},emits:{machineRemoved(e){return e.machineName.length>0}},methods:{takeMachineOffHold(e){fetch(`${this.licensingBaseUrl}/on-hold/machines/${encodeURIComponent(e.toLowerCase())}`,{method:"DELETE"}).then(a=>{a.ok?(this.$emit("machineRemoved",{machineName:e}),this.$notify({type:"info",text:"The machine has been removed from hold."})):this.$notify({type:"error",text:`Could not remove ${e} from hold. Reason: ${a.statusText}`})})}}}),S={class:"onhold card mb-4"},$=t("div",{class:"card-header"},[t("i",{class:"fa fa-desktop"}),c(" Machines on hold ")],-1),y={class:"table table-responsive-sm mb-0"},N={class:"table table-hover mb-0"},B=t("thead",null,[t("th",null,"Machine"),t("th",null,"Release Date"),t("th",null," ")],-1),x={key:0},C=t("td",{class:"text-muted font-italic",colspan:"3"},[t("i",{class:"fa fa-exclamation-circle"}),c(" No machines blocked ")],-1),R=[C],D={class:"align-middle long-table-data-75"},F={class:"machine"},M={class:"align-middle"},T={class:"align-middle"},U=["onClick"],A=t("i",{class:"fa fa-sm fa-play"},null,-1);function E(e,a,o,O,z,H){return l(),i("div",S,[$,t("div",y,[t("table",N,[B,t("tbody",null,[e.machines.length?p("",!0):(l(),i("tr",x,R)),(l(!0),i(b,null,k(e.machines,n=>(l(),i("tr",{key:n.machineName},[t("td",D,[t("span",F,d(n.machineName),1)]),t("td",M,d(e.moment(n.releaseTime).format("llll")),1),t("td",T,[t("button",{onClick:V=>e.takeMachineOffHold(n.machineName),class:"float-right btn btn-sm btn-outline-primary",title:"Unblock this machine"},[A,c(" Unblock ")],8,U)])]))),128))])])])])}const P=_(v,[["render",E]]);export{q as A,I as B,P as M,j as S};
