@kong-ui-public/entities-data-plane-nodes 0.3.14 → 0.3.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -80,9 +80,10 @@ class fe {
80
80
  borrowConcurrentToken() {
81
81
  if (this.concurrentTokenSet.size > 0) {
82
82
  const e = this.concurrentTokenSet.values().next().value;
83
- return this.concurrentTokenSet.delete(e), () => {
84
- this.returnConcurrentToken(e);
85
- };
83
+ if (e)
84
+ return this.concurrentTokenSet.delete(e), () => {
85
+ this.returnConcurrentToken(e);
86
+ };
86
87
  }
87
88
  throw new Error("BUG: No available token to borrow");
88
89
  }
@@ -1 +1 @@
1
- (function(s,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared"),require("@kong/icons")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n","@kong-ui-public/entities-shared","@kong/icons"],e):(s=typeof globalThis<"u"?globalThis:s||self,e(s["kong-ui-public-entities-data-plane-nodes"]={},s.Vue,s["kong-ui-public-i18n"],s["kong-ui-public-entities-shared"],s.KongIcons))})(this,function(s,e,k,A,S){"use strict";var ue=Object.defineProperty;var ge=(s,e,k)=>e in s?ue(s,e,{enumerable:!0,configurable:!0,writable:!0,value:k}):s[e]=k;var C=(s,e,k)=>ge(s,typeof e!="symbol"?e+"":e,k);const P={modal:{action_button:{confirm:"Confirm",submitting:"Submitting...",ok:"OK"},change_log_level:{title:"Change Log Level ({summary})",summary_with_name:"Node {name}",summary_with_number:"{number} Nodes"},dp_list:{header:{host:"Host",action:"Action",status:"Status"},status:{failed:"Failure",loading:"Loading",pending:"Pending",succeed:"Succeed",not_supported:"Not Supported"}},log_level_disk_space_warning:"If left on for extended periods of time, can result in excess disk space consumption.",log_level_explanation:{debug:"Provides debug information about the plugin’s run loop and each individual plugin or other components.",info:"Provides messages that provide a record of the normal operation of the system.",notice:"Provides messages that provide a record of the normal operation of the system, but also alerts conditions that may require monitoring. Kong does not make a large difference between info and notice.",warn:"Is used to log any abnormal behavior that doesn’t result in dropped transactions but requires further investigation.",error:"Is used for logging errors that result in a request being dropped.",crit:"Is used when Kong is working under critical conditions and not working properly, thus affecting several clients."},revert_to_default_after:{label:"Revert to default after",hours:"hour",minutes:"min",seconds:"seconds"},select_log_level_title:"Select Log Level"},log_level:{debug:"Debug",info:"Info",notice:"Notice",warn:"Warn",error:"Error",crit:"Critical",not_applicable:"N/A"}};function N(){const o=k.createI18n("en-us",P);return{i18n:o,i18nT:k.i18nTComponent(o)}}var h=(o=>(o.Debug="debug",o.Info="info",o.Notice="notice",o.Warn="warn",o.Error="error",o.Critical="crit",o))(h||{});class M{constructor(n){C(this,"concurrentTokenSet",new Set);C(this,"concurrentTokenBorrowQueue",[]);for(let t=0;t<n;++t)this.concurrentTokenSet.add(Symbol(`token-${t}`))}hasAvailableConcurrentToken(){return this.concurrentTokenSet.size>0}borrowConcurrentToken(){if(this.concurrentTokenSet.size>0){const n=this.concurrentTokenSet.values().next().value;return this.concurrentTokenSet.delete(n),()=>{this.returnConcurrentToken(n)}}throw new Error("BUG: No available token to borrow")}returnConcurrentToken(n){if(this.concurrentTokenSet.has(n))throw new Error("Token already returned");const t=this.concurrentTokenBorrowQueue.shift();t?t[0](()=>this.returnConcurrentToken(n)):this.concurrentTokenSet.add(n)}async borrowToken(){return this.hasAvailableConcurrentToken()?this.borrowConcurrentToken():new Promise((n,t)=>{this.concurrentTokenBorrowQueue.push([n,t])})}clearWaitingQueue(n){for(;this.concurrentTokenBorrowQueue.length>0;){const[,t]=this.concurrentTokenBorrowQueue.shift();t(n)}}}class x extends Error{constructor(n,t){super(n,t),this.name="AsyncAbortException"}}class v{constructor(n){C(this,"tokenBucket",null);C(this,"schedule",async n=>{let t;this.tokenBucket&&(t=await this.tokenBucket.borrowToken());try{const a=await n();return t==null||t(),a}catch(a){throw t==null||t(),a}});C(this,"cancelAll",(n,t)=>{var a;(a=this.tokenBucket)==null||a.clearWaitingQueue(new x(n,t))});n.maxConcurrentAsyncs>0&&(this.tokenBucket=new M(n.maxConcurrentAsyncs))}}const K=Object.freeze(Object.defineProperty({__proto__:null,AsyncAbortException:x,AsyncScheduler:v,useAsyncScheduler:o=>o instanceof v?o:o===null?new v({maxConcurrentAsyncs:0}):new v(o)},Symbol.toStringTag,{value:"Module"})),V=[h.Debug,h.Info,h.Notice,h.Warn,h.Error,h.Critical],f={useI18n:N,...Object.freeze(Object.defineProperty({__proto__:null,supportedLevels:V,useDataPlaneLogLevelChecker:o=>{const n=o.requestExecutor??(r=>r()),{getDataPlaneLogLevel:t,setDataPlaneLogLevel:a}=o,{getMessageFromError:l}=A.useErrors();return{checkDataPlaneLogLevel:(r,i)=>{const d=e.ref(e.toValue(i==null?void 0:i.currentLogLevelHint)??null);d.value===null&&n(async()=>{d.value=await t(r)}).catch(g=>{g instanceof x||console.error("Failed to get data plane log level",g)}),i!=null&&i.currentLogLevelHint&&e.watch(()=>e.toValue(i.currentLogLevelHint),g=>{g&&(d.value=g)});const u=e.ref("pending"),L=e.ref(null);return{currentLogLevel:d,updateStatus:u,updateErrorMessage:L,updateLogLevel:async(g,b)=>{u.value="loading",L.value=null;try{await n(()=>a(r,g,b)),d.value=g,u.value="success"}catch(w){L.value=l(w),u.value="error"}}}}}},useFriendlyRevertTime:o=>{const{i18n:n}=N();return e.computed(()=>{const t=e.toValue(o);if(isNaN(t)||t<=0)return"";let a="";const l=t%60;l!==0&&(a+=`${l} ${n.t("modal.revert_to_default_after.seconds")}`);const c=Math.floor(t/60)%60;c!==0&&(a=`${c} ${n.t("modal.revert_to_default_after.minutes")} ${a}`);const r=Math.floor(t/3600);return r!==0&&(a=`${r} ${n.t("modal.revert_to_default_after.hours")} ${a}`),a})},useLogLevelCandidateSelectItems:o=>{const{i18n:n}=N();return e.computed(()=>{const t=e.toValue(o==null?void 0:o.disabled)??[];return V.map(a=>({label:n.t(`log_level.${a}`),value:a,selected:(o==null?void 0:o.initialSelected)===a,disabled:t.includes(a)}))})},useLogLevelExplanation:o=>{const n=[h.Debug],{i18n:t}=N();return e.computed(()=>{const a=e.toValue(o);return{explanation:t.t(`modal.log_level_explanation.${a}`),warning:n.includes(a)?t.t("modal.log_level_disk_space_warning"):void 0}})}},Symbol.toStringTag,{value:"Module"})),...K},q={"data-testid":"log-change-action"},F={key:0},R={"data-testid":"log-change-action-current-level"},H={key:0},j={"data-testid":"log-change-action-target-level"},O={"data-testid":"log-change-status"},Q=e.defineComponent({__name:"CLLModalNodeRow",props:{dataPlaneId:{},hostname:{},hasDllCapability:{type:Boolean},targetLogLevel:{},checkLogLevel:{},logLevelHint:{}},setup(o,{expose:n}){const t=o,{i18n:a}=f.useI18n();let l=e.ref("not_supported"),c=e.ref("not_supported"),r=e.ref(null),i=async()=>{};t.hasDllCapability&&({currentLogLevel:l,updateStatus:c,updateErrorMessage:r,updateLogLevel:i}=t.checkLogLevel(t.dataPlaneId,{currentLogLevelHint:()=>t.logLevelHint??null})),n({updateLogLevel:i});const d=e.computed(()=>{switch(c.value){case"success":return"success";case"error":return"danger";case"loading":case"pending":return"warning";default:return"neutral"}}),u=e.computed(()=>{switch(c.value){case"success":return a.t("modal.dp_list.status.succeed");case"error":return a.t("modal.dp_list.status.failed");case"pending":return a.t("modal.dp_list.status.pending");case"loading":return a.t("modal.dp_list.status.loading");default:return a.t("modal.dp_list.status.not_supported")}}),L=e.computed(()=>{switch(c.value){case"success":return S.CheckCircleIcon;case"error":case"not_supported":return S.ClearIcon;case"loading":return S.ProgressIcon;default:return S.EqualIcon}});return(y,g)=>{const b=e.resolveComponent("KSkeleton"),w=e.resolveComponent("KBadge"),B=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("tr",null,[e.createElementVNode("td",null,e.toDisplayString(y.hostname),1),e.createElementVNode("td",q,[e.unref(l)==="not_supported"?(e.openBlock(),e.createElementBlock("span",F,e.toDisplayString(e.unref(a).t("log_level.not_applicable")),1)):e.unref(l)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("span",R,e.toDisplayString(e.unref(a).t(`log_level.${e.unref(l)}`)),1),e.unref(l)!==y.targetLogLevel?(e.openBlock(),e.createElementBlock("span",H,[e.createTextVNode(" → "),e.createElementVNode("span",j,e.toDisplayString(e.unref(a).t(`log_level.${y.targetLogLevel}`)),1)])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(b,{key:1,type:"spinner"}))]),e.createElementVNode("td",O,[e.unref(r)?(e.openBlock(),e.createBlock(B,{key:0,text:e.unref(r)},{default:e.withCtx(()=>[e.createVNode(w,{appearance:d.value,class:"badge-cell"},{icon:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L.value)))]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(u.value),1)]),_:1},8,["appearance"])]),_:1},8,["text"])):(e.openBlock(),e.createBlock(w,{key:1,appearance:d.value,class:"badge-cell"},{icon:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L.value)))]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(u.value),1)]),_:1},8,["appearance"]))])])}}}),T=(o,n)=>{const t=o.__vccOpts||o;for(const[a,l]of n)t[a]=l;return t},W=T(Q,[["__scopeId","data-v-ac7205dd"]]),z={class:"explanation-wrapper"},U={key:0,class:"warning-message","data-testid":"log-level-warning-message"},G={class:"revert-after-wrapper"},J={class:"time"},X={class:"seconds"},Y={class:"formatted-time","data-testid":"log-level-timeout-formatted"},Z={class:"data-plane-node-list","data-testid":"data-plane-node-list"},ee={style:{width:"40%"}},te={style:{width:"40%"}},ne=T(e.defineComponent({name:"ChangeLogLevelModal",__name:"ChangeLogLevelModal",props:e.mergeModels({instanceList:{},instanceLogLevel:{},requests:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(o){const n=o,t=e.useModel(o,"visible"),a=h.Notice,{i18n:l}=f.useI18n(),c=e.ref("edit"),r=e.ref(a),i=e.ref("60"),d=e.computed(()=>Math.floor(Number(i.value))),u=e.computed(()=>n.instanceList.filter(_=>_.hasDLLCapability!==!1)),L=e.computed(()=>{const _=u.value.length===1?l.t("modal.change_log_level.summary_with_name",{name:u.value[0].hostname}):l.t("modal.change_log_level.summary_with_number",{number:`${u.value.length}`});return l.t("modal.change_log_level.title",{summary:_})}),y=e.computed(()=>c.value==="submitting"||isNaN(d.value)||d.value<=0||u.value.length===0),g=f.useLogLevelCandidateSelectItems({initialSelected:a}),b=f.useLogLevelExplanation(r),w=f.useFriendlyRevertTime(d),B=f.useAsyncScheduler(n.requests.scheduler===void 0?{maxConcurrentAsyncs:10}:n.requests.scheduler),{checkDataPlaneLogLevel:oe}=f.useDataPlaneLogLevelChecker({getDataPlaneLogLevel:n.requests.getDataPlaneLogLevel,setDataPlaneLogLevel:n.requests.setDataPlaneLogLevel,requestExecutor:B.schedule}),E=new Map,ae=(_,m)=>{m===null?E.delete(_):E.set(_,m)},le=async()=>{if(c.value!=="edit"){D();return}c.value="submitting";const _=Array.from(E.values()).map(m=>m.updateLogLevel(r.value,d.value));try{await Promise.all(_)}catch(m){console.error("Failed to update log level",m)}finally{c.value="submitted"}},D=()=>{t.value=!1,i.value="60",c.value="edit",r.value=a},re=e.computed(()=>{switch(c.value){case"submitting":return l.t("modal.action_button.submitting");case"submitted":return l.t("modal.action_button.ok");default:return l.t("modal.action_button.confirm")}});return(_,m)=>{const se=e.resolveComponent("KSelect"),I=e.resolveComponent("KLabel"),ce=e.resolveComponent("KInput"),ie=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(ie,{"action-button-disabled":y.value,"action-button-text":re.value,"data-testid":"change-log-level-modal","hide-cancel-button":!0,"hide-close-icon":c.value==="submitting","max-width":"640px",title:L.value,visible:t.value,onCancel:D,onProceed:le},{default:e.withCtx(()=>[c.value==="edit"?(e.openBlock(),e.createBlock(se,{key:0,modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=p=>r.value=p),class:"log-level-select","data-testid":"log-level-select",items:e.unref(g),label:e.unref(l).t("modal.select_log_level_title")},null,8,["modelValue","items","label"])):e.createCommentVNode("",!0),e.createElementVNode("div",z,[e.createVNode(I,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l).t(`log_level.${r.value}`)),1)]),_:1}),e.createElementVNode("div",null,e.toDisplayString(e.unref(b).explanation),1),e.unref(b).warning?(e.openBlock(),e.createElementBlock("div",U,e.toDisplayString(e.unref(b).warning),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",G,[e.createVNode(I,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l).t("modal.revert_to_default_after.label")),1)]),_:1}),e.createElementVNode("div",J,[e.createVNode(ce,{modelValue:i.value,"onUpdate:modelValue":m[1]||(m[1]=p=>i.value=p),class:"time-input","data-testid":"log-level-timeout",disabled:c.value!=="edit",error:d.value<=0||isNaN(d.value),min:"1",type:"number"},null,8,["modelValue","disabled","error"]),e.createElementVNode("span",X,e.toDisplayString(e.unref(l).t("modal.revert_to_default_after.seconds")),1),e.createElementVNode("span",Y,e.toDisplayString(e.unref(w)),1)])]),e.createElementVNode("table",Z,[e.createElementVNode("thead",null,[e.createElementVNode("th",ee,e.toDisplayString(e.unref(l).t("modal.dp_list.header.host")),1),e.createElementVNode("th",te,e.toDisplayString(e.unref(l).t("modal.dp_list.header.action")),1),e.createElementVNode("th",null,e.toDisplayString(e.unref(l).t("modal.dp_list.header.status")),1)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.instanceList,p=>{var $;return e.openBlock(),e.createBlock(W,{key:p.id,ref_for:!0,ref:de=>ae(p.id,de),"check-log-level":e.unref(oe),"data-plane-id":p.id,"data-testid":`data-plane-node-list-row-${p.id}`,"has-dll-capability":p.hasDLLCapability??!0,hostname:p.hostname,"log-level-hint":($=n.instanceLogLevel)==null?void 0:$.get(p.id),"target-log-level":r.value},null,8,["check-log-level","data-plane-id","data-testid","has-dll-capability","hostname","log-level-hint","target-log-level"])}),128))])])]),_:1},8,["action-button-disabled","action-button-text","hide-close-icon","title","visible"])}}}),[["__scopeId","data-v-983a59ac"]]);s.ChangeLogLevelModal=ne,s.LogLevel=h,s.composables=f,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
1
+ (function(s,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared"),require("@kong/icons")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n","@kong-ui-public/entities-shared","@kong/icons"],e):(s=typeof globalThis<"u"?globalThis:s||self,e(s["kong-ui-public-entities-data-plane-nodes"]={},s.Vue,s["kong-ui-public-i18n"],s["kong-ui-public-entities-shared"],s.KongIcons))})(this,function(s,e,k,A,S){"use strict";var ue=Object.defineProperty;var ge=(s,e,k)=>e in s?ue(s,e,{enumerable:!0,configurable:!0,writable:!0,value:k}):s[e]=k;var C=(s,e,k)=>ge(s,typeof e!="symbol"?e+"":e,k);const P={modal:{action_button:{confirm:"Confirm",submitting:"Submitting...",ok:"OK"},change_log_level:{title:"Change Log Level ({summary})",summary_with_name:"Node {name}",summary_with_number:"{number} Nodes"},dp_list:{header:{host:"Host",action:"Action",status:"Status"},status:{failed:"Failure",loading:"Loading",pending:"Pending",succeed:"Succeed",not_supported:"Not Supported"}},log_level_disk_space_warning:"If left on for extended periods of time, can result in excess disk space consumption.",log_level_explanation:{debug:"Provides debug information about the plugin’s run loop and each individual plugin or other components.",info:"Provides messages that provide a record of the normal operation of the system.",notice:"Provides messages that provide a record of the normal operation of the system, but also alerts conditions that may require monitoring. Kong does not make a large difference between info and notice.",warn:"Is used to log any abnormal behavior that doesn’t result in dropped transactions but requires further investigation.",error:"Is used for logging errors that result in a request being dropped.",crit:"Is used when Kong is working under critical conditions and not working properly, thus affecting several clients."},revert_to_default_after:{label:"Revert to default after",hours:"hour",minutes:"min",seconds:"seconds"},select_log_level_title:"Select Log Level"},log_level:{debug:"Debug",info:"Info",notice:"Notice",warn:"Warn",error:"Error",crit:"Critical",not_applicable:"N/A"}};function N(){const o=k.createI18n("en-us",P);return{i18n:o,i18nT:k.i18nTComponent(o)}}var h=(o=>(o.Debug="debug",o.Info="info",o.Notice="notice",o.Warn="warn",o.Error="error",o.Critical="crit",o))(h||{});class M{constructor(n){C(this,"concurrentTokenSet",new Set);C(this,"concurrentTokenBorrowQueue",[]);for(let t=0;t<n;++t)this.concurrentTokenSet.add(Symbol(`token-${t}`))}hasAvailableConcurrentToken(){return this.concurrentTokenSet.size>0}borrowConcurrentToken(){if(this.concurrentTokenSet.size>0){const n=this.concurrentTokenSet.values().next().value;if(n)return this.concurrentTokenSet.delete(n),()=>{this.returnConcurrentToken(n)}}throw new Error("BUG: No available token to borrow")}returnConcurrentToken(n){if(this.concurrentTokenSet.has(n))throw new Error("Token already returned");const t=this.concurrentTokenBorrowQueue.shift();t?t[0](()=>this.returnConcurrentToken(n)):this.concurrentTokenSet.add(n)}async borrowToken(){return this.hasAvailableConcurrentToken()?this.borrowConcurrentToken():new Promise((n,t)=>{this.concurrentTokenBorrowQueue.push([n,t])})}clearWaitingQueue(n){for(;this.concurrentTokenBorrowQueue.length>0;){const[,t]=this.concurrentTokenBorrowQueue.shift();t(n)}}}class x extends Error{constructor(n,t){super(n,t),this.name="AsyncAbortException"}}class v{constructor(n){C(this,"tokenBucket",null);C(this,"schedule",async n=>{let t;this.tokenBucket&&(t=await this.tokenBucket.borrowToken());try{const a=await n();return t==null||t(),a}catch(a){throw t==null||t(),a}});C(this,"cancelAll",(n,t)=>{var a;(a=this.tokenBucket)==null||a.clearWaitingQueue(new x(n,t))});n.maxConcurrentAsyncs>0&&(this.tokenBucket=new M(n.maxConcurrentAsyncs))}}const K=Object.freeze(Object.defineProperty({__proto__:null,AsyncAbortException:x,AsyncScheduler:v,useAsyncScheduler:o=>o instanceof v?o:o===null?new v({maxConcurrentAsyncs:0}):new v(o)},Symbol.toStringTag,{value:"Module"})),V=[h.Debug,h.Info,h.Notice,h.Warn,h.Error,h.Critical],f={useI18n:N,...Object.freeze(Object.defineProperty({__proto__:null,supportedLevels:V,useDataPlaneLogLevelChecker:o=>{const n=o.requestExecutor??(r=>r()),{getDataPlaneLogLevel:t,setDataPlaneLogLevel:a}=o,{getMessageFromError:l}=A.useErrors();return{checkDataPlaneLogLevel:(r,i)=>{const d=e.ref(e.toValue(i==null?void 0:i.currentLogLevelHint)??null);d.value===null&&n(async()=>{d.value=await t(r)}).catch(g=>{g instanceof x||console.error("Failed to get data plane log level",g)}),i!=null&&i.currentLogLevelHint&&e.watch(()=>e.toValue(i.currentLogLevelHint),g=>{g&&(d.value=g)});const u=e.ref("pending"),L=e.ref(null);return{currentLogLevel:d,updateStatus:u,updateErrorMessage:L,updateLogLevel:async(g,b)=>{u.value="loading",L.value=null;try{await n(()=>a(r,g,b)),d.value=g,u.value="success"}catch(w){L.value=l(w),u.value="error"}}}}}},useFriendlyRevertTime:o=>{const{i18n:n}=N();return e.computed(()=>{const t=e.toValue(o);if(isNaN(t)||t<=0)return"";let a="";const l=t%60;l!==0&&(a+=`${l} ${n.t("modal.revert_to_default_after.seconds")}`);const c=Math.floor(t/60)%60;c!==0&&(a=`${c} ${n.t("modal.revert_to_default_after.minutes")} ${a}`);const r=Math.floor(t/3600);return r!==0&&(a=`${r} ${n.t("modal.revert_to_default_after.hours")} ${a}`),a})},useLogLevelCandidateSelectItems:o=>{const{i18n:n}=N();return e.computed(()=>{const t=e.toValue(o==null?void 0:o.disabled)??[];return V.map(a=>({label:n.t(`log_level.${a}`),value:a,selected:(o==null?void 0:o.initialSelected)===a,disabled:t.includes(a)}))})},useLogLevelExplanation:o=>{const n=[h.Debug],{i18n:t}=N();return e.computed(()=>{const a=e.toValue(o);return{explanation:t.t(`modal.log_level_explanation.${a}`),warning:n.includes(a)?t.t("modal.log_level_disk_space_warning"):void 0}})}},Symbol.toStringTag,{value:"Module"})),...K},q={"data-testid":"log-change-action"},F={key:0},R={"data-testid":"log-change-action-current-level"},H={key:0},j={"data-testid":"log-change-action-target-level"},O={"data-testid":"log-change-status"},Q=e.defineComponent({__name:"CLLModalNodeRow",props:{dataPlaneId:{},hostname:{},hasDllCapability:{type:Boolean},targetLogLevel:{},checkLogLevel:{},logLevelHint:{}},setup(o,{expose:n}){const t=o,{i18n:a}=f.useI18n();let l=e.ref("not_supported"),c=e.ref("not_supported"),r=e.ref(null),i=async()=>{};t.hasDllCapability&&({currentLogLevel:l,updateStatus:c,updateErrorMessage:r,updateLogLevel:i}=t.checkLogLevel(t.dataPlaneId,{currentLogLevelHint:()=>t.logLevelHint??null})),n({updateLogLevel:i});const d=e.computed(()=>{switch(c.value){case"success":return"success";case"error":return"danger";case"loading":case"pending":return"warning";default:return"neutral"}}),u=e.computed(()=>{switch(c.value){case"success":return a.t("modal.dp_list.status.succeed");case"error":return a.t("modal.dp_list.status.failed");case"pending":return a.t("modal.dp_list.status.pending");case"loading":return a.t("modal.dp_list.status.loading");default:return a.t("modal.dp_list.status.not_supported")}}),L=e.computed(()=>{switch(c.value){case"success":return S.CheckCircleIcon;case"error":case"not_supported":return S.ClearIcon;case"loading":return S.ProgressIcon;default:return S.EqualIcon}});return(y,g)=>{const b=e.resolveComponent("KSkeleton"),w=e.resolveComponent("KBadge"),B=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("tr",null,[e.createElementVNode("td",null,e.toDisplayString(y.hostname),1),e.createElementVNode("td",q,[e.unref(l)==="not_supported"?(e.openBlock(),e.createElementBlock("span",F,e.toDisplayString(e.unref(a).t("log_level.not_applicable")),1)):e.unref(l)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("span",R,e.toDisplayString(e.unref(a).t(`log_level.${e.unref(l)}`)),1),e.unref(l)!==y.targetLogLevel?(e.openBlock(),e.createElementBlock("span",H,[e.createTextVNode(" → "),e.createElementVNode("span",j,e.toDisplayString(e.unref(a).t(`log_level.${y.targetLogLevel}`)),1)])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(b,{key:1,type:"spinner"}))]),e.createElementVNode("td",O,[e.unref(r)?(e.openBlock(),e.createBlock(B,{key:0,text:e.unref(r)},{default:e.withCtx(()=>[e.createVNode(w,{appearance:d.value,class:"badge-cell"},{icon:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L.value)))]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(u.value),1)]),_:1},8,["appearance"])]),_:1},8,["text"])):(e.openBlock(),e.createBlock(w,{key:1,appearance:d.value,class:"badge-cell"},{icon:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L.value)))]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(u.value),1)]),_:1},8,["appearance"]))])])}}}),T=(o,n)=>{const t=o.__vccOpts||o;for(const[a,l]of n)t[a]=l;return t},W=T(Q,[["__scopeId","data-v-ac7205dd"]]),z={class:"explanation-wrapper"},U={key:0,class:"warning-message","data-testid":"log-level-warning-message"},G={class:"revert-after-wrapper"},J={class:"time"},X={class:"seconds"},Y={class:"formatted-time","data-testid":"log-level-timeout-formatted"},Z={class:"data-plane-node-list","data-testid":"data-plane-node-list"},ee={style:{width:"40%"}},te={style:{width:"40%"}},ne=T(e.defineComponent({name:"ChangeLogLevelModal",__name:"ChangeLogLevelModal",props:e.mergeModels({instanceList:{},instanceLogLevel:{},requests:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(o){const n=o,t=e.useModel(o,"visible"),a=h.Notice,{i18n:l}=f.useI18n(),c=e.ref("edit"),r=e.ref(a),i=e.ref("60"),d=e.computed(()=>Math.floor(Number(i.value))),u=e.computed(()=>n.instanceList.filter(_=>_.hasDLLCapability!==!1)),L=e.computed(()=>{const _=u.value.length===1?l.t("modal.change_log_level.summary_with_name",{name:u.value[0].hostname}):l.t("modal.change_log_level.summary_with_number",{number:`${u.value.length}`});return l.t("modal.change_log_level.title",{summary:_})}),y=e.computed(()=>c.value==="submitting"||isNaN(d.value)||d.value<=0||u.value.length===0),g=f.useLogLevelCandidateSelectItems({initialSelected:a}),b=f.useLogLevelExplanation(r),w=f.useFriendlyRevertTime(d),B=f.useAsyncScheduler(n.requests.scheduler===void 0?{maxConcurrentAsyncs:10}:n.requests.scheduler),{checkDataPlaneLogLevel:oe}=f.useDataPlaneLogLevelChecker({getDataPlaneLogLevel:n.requests.getDataPlaneLogLevel,setDataPlaneLogLevel:n.requests.setDataPlaneLogLevel,requestExecutor:B.schedule}),E=new Map,ae=(_,m)=>{m===null?E.delete(_):E.set(_,m)},le=async()=>{if(c.value!=="edit"){D();return}c.value="submitting";const _=Array.from(E.values()).map(m=>m.updateLogLevel(r.value,d.value));try{await Promise.all(_)}catch(m){console.error("Failed to update log level",m)}finally{c.value="submitted"}},D=()=>{t.value=!1,i.value="60",c.value="edit",r.value=a},re=e.computed(()=>{switch(c.value){case"submitting":return l.t("modal.action_button.submitting");case"submitted":return l.t("modal.action_button.ok");default:return l.t("modal.action_button.confirm")}});return(_,m)=>{const se=e.resolveComponent("KSelect"),I=e.resolveComponent("KLabel"),ce=e.resolveComponent("KInput"),ie=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(ie,{"action-button-disabled":y.value,"action-button-text":re.value,"data-testid":"change-log-level-modal","hide-cancel-button":!0,"hide-close-icon":c.value==="submitting","max-width":"640px",title:L.value,visible:t.value,onCancel:D,onProceed:le},{default:e.withCtx(()=>[c.value==="edit"?(e.openBlock(),e.createBlock(se,{key:0,modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=p=>r.value=p),class:"log-level-select","data-testid":"log-level-select",items:e.unref(g),label:e.unref(l).t("modal.select_log_level_title")},null,8,["modelValue","items","label"])):e.createCommentVNode("",!0),e.createElementVNode("div",z,[e.createVNode(I,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l).t(`log_level.${r.value}`)),1)]),_:1}),e.createElementVNode("div",null,e.toDisplayString(e.unref(b).explanation),1),e.unref(b).warning?(e.openBlock(),e.createElementBlock("div",U,e.toDisplayString(e.unref(b).warning),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",G,[e.createVNode(I,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l).t("modal.revert_to_default_after.label")),1)]),_:1}),e.createElementVNode("div",J,[e.createVNode(ce,{modelValue:i.value,"onUpdate:modelValue":m[1]||(m[1]=p=>i.value=p),class:"time-input","data-testid":"log-level-timeout",disabled:c.value!=="edit",error:d.value<=0||isNaN(d.value),min:"1",type:"number"},null,8,["modelValue","disabled","error"]),e.createElementVNode("span",X,e.toDisplayString(e.unref(l).t("modal.revert_to_default_after.seconds")),1),e.createElementVNode("span",Y,e.toDisplayString(e.unref(w)),1)])]),e.createElementVNode("table",Z,[e.createElementVNode("thead",null,[e.createElementVNode("th",ee,e.toDisplayString(e.unref(l).t("modal.dp_list.header.host")),1),e.createElementVNode("th",te,e.toDisplayString(e.unref(l).t("modal.dp_list.header.action")),1),e.createElementVNode("th",null,e.toDisplayString(e.unref(l).t("modal.dp_list.header.status")),1)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.instanceList,p=>{var $;return e.openBlock(),e.createBlock(W,{key:p.id,ref_for:!0,ref:de=>ae(p.id,de),"check-log-level":e.unref(oe),"data-plane-id":p.id,"data-testid":`data-plane-node-list-row-${p.id}`,"has-dll-capability":p.hasDLLCapability??!0,hostname:p.hostname,"log-level-hint":($=n.instanceLogLevel)==null?void 0:$.get(p.id),"target-log-level":r.value},null,8,["check-log-level","data-plane-id","data-testid","has-dll-capability","hostname","log-level-hint","target-log-level"])}),128))])])]),_:1},8,["action-button-disabled","action-button-text","hide-close-icon","title","visible"])}}}),[["__scopeId","data-v-983a59ac"]]);s.ChangeLogLevelModal=ne,s.LogLevel=h,s.composables=f,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
@@ -1,25 +1,25 @@
1
1
  import composables from '../composables';
2
2
  import type { LogLevel } from '../types';
3
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
3
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
4
4
  dataPlaneId: string;
5
5
  hostname: string;
6
6
  hasDllCapability: boolean;
7
7
  targetLogLevel: LogLevel;
8
- checkLogLevel: ReturnType<typeof composables.useDataPlaneLogLevelChecker>['checkDataPlaneLogLevel'];
9
- logLevelHint?: LogLevel | null | undefined;
8
+ checkLogLevel: ReturnType<typeof composables.useDataPlaneLogLevelChecker>["checkDataPlaneLogLevel"];
9
+ logLevelHint?: LogLevel | null;
10
10
  }>, {
11
11
  updateLogLevel: (level: LogLevel, revertAfter: number) => Promise<void>;
12
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
13
13
  dataPlaneId: string;
14
14
  hostname: string;
15
15
  hasDllCapability: boolean;
16
16
  targetLogLevel: LogLevel;
17
- checkLogLevel: ReturnType<typeof composables.useDataPlaneLogLevelChecker>['checkDataPlaneLogLevel'];
18
- logLevelHint?: LogLevel | null | undefined;
17
+ checkLogLevel: ReturnType<typeof composables.useDataPlaneLogLevelChecker>["checkDataPlaneLogLevel"];
18
+ logLevelHint?: LogLevel | null;
19
19
  }>>>, {}, {}>;
20
20
  export default _default;
21
21
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
- type __VLS_TypePropsToRuntimeProps<T> = {
22
+ type __VLS_TypePropsToOption<T> = {
23
23
  [K in keyof T]-?: {} extends Pick<T, K> ? {
24
24
  type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
25
25
  } : {
@@ -1 +1 @@
1
- {"version":3,"file":"CLLModalNodeRow.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CLLModalNodeRow.vue.ts"],"names":[],"mappings":"AAGA,OAAO,WAAW,MAAM,gBAAgB,CAAA;AAKxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;;iBA2UzB,MAAM;cACT,MAAM;sBACE,OAAO;oBACT,QAAQ;mBACT,WAAW,OAAO,YAAY,2BAA2B,CAAC,CAAC,wBAAwB,CAAC;;;;;iBAJtF,MAAM;cACT,MAAM;sBACE,OAAO;oBACT,QAAQ;mBACT,WAAW,OAAO,YAAY,2BAA2B,CAAC,CAAC,wBAAwB,CAAC;;;AAXrG,wBAcG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
1
+ {"version":3,"file":"CLLModalNodeRow.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CLLModalNodeRow.vue"],"names":[],"mappings":"AA0JA,OAAO,WAAW,MAAM,gBAAgB,CAAA;AAKxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;;iBAOzB,MAAM;cACT,MAAM;sBACE,OAAO;oBACT,QAAQ;mBACT,UAAU,CAAC,OAAO,WAAW,CAAC,2BAA2B,CAAC,CAAC,wBAAwB,CAAC;mBACpF,QAAQ,GAAG,IAAI;;;;iBALjB,MAAM;cACT,MAAM;sBACE,OAAO;oBACT,QAAQ;mBACT,UAAU,CAAC,OAAO,WAAW,CAAC,2BAA2B,CAAC,CAAC,wBAAwB,CAAC;mBACpF,QAAQ,GAAG,IAAI;;AAsMhC,wBAOG;AAKH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,45 +1,32 @@
1
1
  import { LogLevel, type DataPlaneNodeCommon } from '../types';
2
2
  import type { AsyncScheduler, AsyncSchedulerOptions } from '../composables';
3
- declare const _default: import("vue").DefineComponent<{
4
- visible: import("vue").PropType<boolean>;
5
- instanceList: {
6
- type: import("vue").PropType<(Pick<DataPlaneNodeCommon, "hostname" | "id"> & {
7
- hasDLLCapability?: boolean | undefined;
8
- })[]>;
9
- required: true;
10
- };
11
- instanceLogLevel: {
12
- type: import("vue").PropType<Map<string, LogLevel>>;
13
- required: true;
14
- };
3
+ declare let __VLS_typeProps: {
4
+ instanceList: (Pick<DataPlaneNodeCommon, 'id' | 'hostname'> & {
5
+ hasDLLCapability?: boolean;
6
+ })[];
7
+ instanceLogLevel: Map<string, LogLevel>;
15
8
  requests: {
16
- type: import("vue").PropType<{
17
- scheduler?: AsyncSchedulerOptions | AsyncScheduler | null | undefined;
18
- getDataPlaneLogLevel: (instanceId: string) => Promise<LogLevel>;
19
- setDataPlaneLogLevel: (instanceId: string, logLevel: LogLevel, revertAfter: number) => Promise<void>;
20
- }>;
21
- required: true;
22
- };
23
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
24
- visible: import("vue").PropType<boolean>;
25
- instanceList: {
26
- type: import("vue").PropType<(Pick<DataPlaneNodeCommon, "hostname" | "id"> & {
27
- hasDLLCapability?: boolean | undefined;
28
- })[]>;
29
- required: true;
30
- };
31
- instanceLogLevel: {
32
- type: import("vue").PropType<Map<string, LogLevel>>;
33
- required: true;
9
+ scheduler?: AsyncScheduler | AsyncSchedulerOptions | null;
10
+ getDataPlaneLogLevel: (instanceId: string) => Promise<LogLevel>;
11
+ setDataPlaneLogLevel: (instanceId: string, logLevel: LogLevel, revertAfter: number) => Promise<void>;
34
12
  };
35
- requests: {
36
- type: import("vue").PropType<{
37
- scheduler?: AsyncSchedulerOptions | AsyncScheduler | null | undefined;
38
- getDataPlaneLogLevel: (instanceId: string) => Promise<LogLevel>;
39
- setDataPlaneLogLevel: (instanceId: string, logLevel: LogLevel, revertAfter: number) => Promise<void>;
40
- }>;
13
+ };
14
+ type __VLS_PublicProps = {
15
+ 'visible'?: boolean;
16
+ } & typeof __VLS_typeProps;
17
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_PublicProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
+ "update:visible": (visible: boolean) => void;
19
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
20
+ "onUpdate:visible"?: ((visible: boolean) => any) | undefined;
21
+ }, {}, {}>;
22
+ export default _default;
23
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
24
+ type __VLS_TypePropsToOption<T> = {
25
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
26
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
27
+ } : {
28
+ type: import('vue').PropType<T[K]>;
41
29
  required: true;
42
30
  };
43
- }>>, {}, {}>;
44
- export default _default;
31
+ };
45
32
  //# sourceMappingURL=ChangeLogLevelModal.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChangeLogLevelModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ChangeLogLevelModal.vue.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;;;;;;;;;;;;;;;;+CAgbpC,MAAM,KAAK,QAAQ,QAAQ,CAAC;+CAC5B,MAAM,YAAY,QAAQ,eAAe,MAAM,KAAK,QAAQ,IAAI,CAAC;;;;;;;;;;;;;;;;;;;+CADjE,MAAM,KAAK,QAAQ,QAAQ,CAAC;+CAC5B,MAAM,YAAY,QAAQ,eAAe,MAAM,KAAK,QAAQ,IAAI,CAAC;;;;;AAZxG,wBAiBG"}
1
+ {"version":3,"file":"ChangeLogLevelModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ChangeLogLevelModal.vue"],"names":[],"mappings":"AAuQA,OAAO,EAAE,QAAQ,EAAE,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAQ3E,QAAA,IAAI,eAAe,EAAG;IACpB,YAAY,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,IAAI,GAAG,UAAU,CAAC,GAAG;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,EAAE,CAAA;IAC/F,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAmB,QAAQ,CAAC,CAAA;IACxD,QAAQ,EAAE;QACR,SAAS,CAAC,EAAE,cAAc,GAAG,qBAAqB,GAAG,IAAI,CAAA;QACzD,oBAAoB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;QAC/D,oBAAoB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;KACrG,CAAA;CACF,CAAC;AAwGF,KAAK,iBAAiB,GAAG;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,OAAO,eAAe,CAAC;;;;;;AAoL3B,wBAOG;AAKH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -6,22 +6,22 @@ export type { LogLevelExplanation, DataPlaneLogLevel, } from './useLogLevels';
6
6
  declare const _default: {
7
7
  AsyncAbortException: typeof useAsyncScheduler.AsyncAbortException;
8
8
  AsyncScheduler: typeof useAsyncScheduler.AsyncScheduler;
9
- useAsyncScheduler: (opt: useAsyncScheduler.AsyncSchedulerOptions | useAsyncScheduler.AsyncScheduler | null) => useAsyncScheduler.AsyncScheduler;
9
+ useAsyncScheduler: (opt: useAsyncScheduler.AsyncScheduler | useAsyncScheduler.AsyncSchedulerOptions | null) => useAsyncScheduler.AsyncScheduler;
10
10
  supportedLevels: import("..").LogLevel[];
11
11
  useLogLevelCandidateSelectItems: (opt?: {
12
- initialSelected?: import("..").LogLevel | undefined;
13
- disabled?: import("vue").MaybeRefOrGetter<import("..").LogLevel[]> | undefined;
14
- } | undefined) => import("vue").ComputedRef<import("@kong/kongponents/dist/types").SelectItem[]>;
12
+ initialSelected?: import("..").LogLevel;
13
+ disabled?: import("vue").MaybeRefOrGetter<import("..").LogLevel[]>;
14
+ }) => import("vue").ComputedRef<import("@kong/kongponents/dist/types").SelectItem[]>;
15
15
  useLogLevelExplanation: (level: import("vue").MaybeRefOrGetter<import("..").LogLevel>) => import("vue").ComputedRef<useLogLevels.LogLevelExplanation>;
16
16
  useFriendlyRevertTime: (revertTime: import("vue").MaybeRefOrGetter<number>) => import("vue").ComputedRef<string>;
17
17
  useDataPlaneLogLevelChecker: (opt: {
18
18
  getDataPlaneLogLevel: (dataPlaneId: string) => Promise<import("..").LogLevel>;
19
19
  setDataPlaneLogLevel: (dataPlaneId: string, level: import("..").LogLevel, revertAfter: number) => Promise<void>;
20
- requestExecutor?: (<T>(fn: () => Promise<T>) => Promise<T>) | undefined;
20
+ requestExecutor?: <T>(fn: () => Promise<T>) => Promise<T>;
21
21
  }) => {
22
22
  checkDataPlaneLogLevel: (dataPlaneId: string, opt?: {
23
- currentLogLevelHint?: import("vue").MaybeRefOrGetter<import("..").LogLevel | null> | undefined;
24
- } | undefined) => useLogLevels.DataPlaneLogLevel;
23
+ currentLogLevelHint?: import("vue").MaybeRefOrGetter<import("..").LogLevel | null>;
24
+ }) => useLogLevels.DataPlaneLogLevel;
25
25
  };
26
26
  useI18n: typeof useI18n;
27
27
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAA;AAC/B,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAA;AAC9C,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAA;AAExD,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,qBAAqB,CAAA;AAE5B,YAAY,EACV,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,gBAAgB,CAAA;;;;;;;;;;;;;;;;;;;;;;;AAGvB,wBAIC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAA;AAC/B,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAA;AAC9C,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAA;AAExD,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,qBAAqB,CAAA;AAE5B,YAAY,EACV,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,gBAAgB,CAAA;;;;;;;uBAQsE,CAAC;gBAAsB,CAAC;;;;;;;uBAAgsE,CAAC;;;+BAAoT,CAAC;;;;;AAL3mF,wBAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useAsyncScheduler.d.ts","sourceRoot":"","sources":["../../../src/composables/useAsyncScheduler.ts"],"names":[],"mappings":"AA8DA,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;CAIrD;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAA;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,WAAW,CAA2B;gBAElC,GAAG,EAAE,qBAAqB;IAMtC,QAAQ,sDAaP;IAED,SAAS,aAAc,MAAM,YAAY,YAAY,UAEpD;CACF;AAED,eAAO,MAAM,iBAAiB,QAAS,cAAc,GAAG,qBAAqB,GAAG,IAAI,mBAQnF,CAAA"}
1
+ {"version":3,"file":"useAsyncScheduler.d.ts","sourceRoot":"","sources":["../../../src/composables/useAsyncScheduler.ts"],"names":[],"mappings":"AAgEA,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;CAIrD;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAA;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,WAAW,CAA2B;gBAElC,GAAG,EAAE,qBAAqB;IAMtC,QAAQ,GAAU,CAAC,kBAAkB,MAAM,OAAO,CAAC,CAAC,CAAC,KAAG,OAAO,CAAC,CAAC,CAAC,CAajE;IAED,SAAS,aAAc,MAAM,YAAY,YAAY,UAEpD;CACF;AAED,eAAO,MAAM,iBAAiB,QAAS,cAAc,GAAG,qBAAqB,GAAG,IAAI,mBAQnF,CAAA"}
@@ -1,242 +1,9 @@
1
- export default function useI18n(): {
2
- i18n: import("@kong-ui-public/i18n/dist/types/types").IntlShapeEx<{
3
- modal: {
4
- action_button: {
5
- confirm: string;
6
- submitting: string;
7
- ok: string;
8
- };
9
- change_log_level: {
10
- title: string;
11
- summary_with_name: string;
12
- summary_with_number: string;
13
- };
14
- dp_list: {
15
- header: {
16
- host: string;
17
- action: string;
18
- status: string;
19
- };
20
- status: {
21
- failed: string;
22
- loading: string;
23
- pending: string;
24
- succeed: string;
25
- not_supported: string;
26
- };
27
- };
28
- log_level_disk_space_warning: string;
29
- log_level_explanation: {
30
- debug: string;
31
- info: string;
32
- notice: string;
33
- warn: string;
34
- error: string;
35
- crit: string;
36
- };
37
- revert_to_default_after: {
38
- label: string;
39
- hours: string;
40
- minutes: string;
41
- seconds: string;
42
- };
43
- select_log_level_title: string;
44
- };
45
- log_level: {
46
- debug: string;
47
- info: string;
48
- notice: string;
49
- warn: string;
50
- error: string;
51
- crit: string;
52
- not_applicable: string;
53
- };
54
- }>;
55
- i18nT: import("@vue/runtime-core").DefineComponent<{
56
- i18n: {
57
- type: import("@vue/runtime-core").PropType<import("@kong-ui-public/i18n/dist/types/types").IntlShapeEx<{
58
- modal: {
59
- action_button: {
60
- confirm: string;
61
- submitting: string;
62
- ok: string;
63
- };
64
- change_log_level: {
65
- title: string;
66
- summary_with_name: string;
67
- summary_with_number: string;
68
- };
69
- dp_list: {
70
- header: {
71
- host: string;
72
- action: string;
73
- status: string;
74
- };
75
- status: {
76
- failed: string;
77
- loading: string;
78
- pending: string;
79
- succeed: string;
80
- not_supported: string;
81
- };
82
- };
83
- log_level_disk_space_warning: string;
84
- log_level_explanation: {
85
- debug: string;
86
- info: string;
87
- notice: string;
88
- warn: string;
89
- error: string;
90
- crit: string;
91
- };
92
- revert_to_default_after: {
93
- label: string;
94
- hours: string;
95
- minutes: string;
96
- seconds: string;
97
- };
98
- select_log_level_title: string;
99
- };
100
- log_level: {
101
- debug: string;
102
- info: string;
103
- notice: string;
104
- warn: string;
105
- error: string;
106
- crit: string;
107
- not_applicable: string;
108
- };
109
- }>>;
110
- default: null;
111
- };
112
- keypath: {
113
- type: StringConstructor;
114
- required: true;
115
- };
116
- tag: {
117
- type: StringConstructor;
118
- default: string;
119
- };
120
- }, () => import("@vue/runtime-core").VNodeChild, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
121
- i18n: {
122
- type: import("@vue/runtime-core").PropType<import("@kong-ui-public/i18n/dist/types/types").IntlShapeEx<{
123
- modal: {
124
- action_button: {
125
- confirm: string;
126
- submitting: string;
127
- ok: string;
128
- };
129
- change_log_level: {
130
- title: string;
131
- summary_with_name: string;
132
- summary_with_number: string;
133
- };
134
- dp_list: {
135
- header: {
136
- host: string;
137
- action: string;
138
- status: string;
139
- };
140
- status: {
141
- failed: string;
142
- loading: string;
143
- pending: string;
144
- succeed: string;
145
- not_supported: string;
146
- };
147
- };
148
- log_level_disk_space_warning: string;
149
- log_level_explanation: {
150
- debug: string;
151
- info: string;
152
- notice: string;
153
- warn: string;
154
- error: string;
155
- crit: string;
156
- };
157
- revert_to_default_after: {
158
- label: string;
159
- hours: string;
160
- minutes: string;
161
- seconds: string;
162
- };
163
- select_log_level_title: string;
164
- };
165
- log_level: {
166
- debug: string;
167
- info: string;
168
- notice: string;
169
- warn: string;
170
- error: string;
171
- crit: string;
172
- not_applicable: string;
173
- };
174
- }>>;
175
- default: null;
176
- };
177
- keypath: {
178
- type: StringConstructor;
179
- required: true;
180
- };
181
- tag: {
182
- type: StringConstructor;
183
- default: string;
184
- };
185
- }>>, {
186
- i18n: import("@kong-ui-public/i18n/dist/types/types").IntlShapeEx<{
187
- modal: {
188
- action_button: {
189
- confirm: string;
190
- submitting: string;
191
- ok: string;
192
- };
193
- change_log_level: {
194
- title: string;
195
- summary_with_name: string;
196
- summary_with_number: string;
197
- };
198
- dp_list: {
199
- header: {
200
- host: string;
201
- action: string;
202
- status: string;
203
- };
204
- status: {
205
- failed: string;
206
- loading: string;
207
- pending: string;
208
- succeed: string;
209
- not_supported: string;
210
- };
211
- };
212
- log_level_disk_space_warning: string;
213
- log_level_explanation: {
214
- debug: string;
215
- info: string;
216
- notice: string;
217
- warn: string;
218
- error: string;
219
- crit: string;
220
- };
221
- revert_to_default_after: {
222
- label: string;
223
- hours: string;
224
- minutes: string;
225
- seconds: string;
226
- };
227
- select_log_level_title: string;
228
- };
229
- log_level: {
230
- debug: string;
231
- info: string;
232
- notice: string;
233
- warn: string;
234
- error: string;
235
- crit: string;
236
- not_applicable: string;
237
- };
238
- }>;
239
- tag: string;
240
- }, {}>;
241
- };
1
+ import { createI18n, i18nTComponent } from '@kong-ui-public/i18n';
2
+ import english from '../locales/en.json';
3
+ interface UseI18nReturn {
4
+ i18n: ReturnType<typeof createI18n<typeof english>>;
5
+ i18nT: ReturnType<typeof i18nTComponent<typeof english>>;
6
+ }
7
+ export default function useI18n(): UseI18nReturn;
8
+ export {};
242
9
  //# sourceMappingURL=useI18n.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../../src/composables/useI18n.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO9B"}
1
+ {"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../../src/composables/useI18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,OAAO,MAAM,oBAAoB,CAAA;AAExC,UAAU,aAAa;IACrB,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAA;IACnD,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,CAAA;CACzD;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,IAAI,aAAa,CAO/C"}
@@ -21,7 +21,7 @@ export type DataPlaneLogLevel = {
21
21
  export declare const useDataPlaneLogLevelChecker: (opt: {
22
22
  getDataPlaneLogLevel: (dataPlaneId: string) => Promise<LogLevel>;
23
23
  setDataPlaneLogLevel: (dataPlaneId: string, level: LogLevel, revertAfter: number) => Promise<void>;
24
- requestExecutor?: (<T>(fn: () => Promise<T>) => Promise<T>) | undefined;
24
+ requestExecutor?: <T>(fn: () => Promise<T>) => Promise<T>;
25
25
  }) => {
26
26
  checkDataPlaneLogLevel: (dataPlaneId: string, opt?: {
27
27
  currentLogLevelHint?: MaybeRefOrGetter<LogLevel | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"useLogLevels.d.ts","sourceRoot":"","sources":["../../../src/composables/useLogLevels.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAInC,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,eAAO,MAAM,eAAe,EAAE,QAAQ,EAOrC,CAAA;AAED,eAAO,MAAM,+BAA+B,SAAU;IACpD,eAAe,CAAC,EAAE,QAAQ,CAAC;IAC3B,QAAQ,CAAC,EAAE,iBAAiB,QAAQ,EAAE,CAAC,CAAC;CACzC,KAAG,YAAY,UAAU,EAAE,CAa3B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAC3E,eAAO,MAAM,sBAAsB,UAAW,iBAAiB,QAAQ,CAAC,KAAG,YAAY,mBAAmB,CAazG,CAAA;AAED,eAAO,MAAM,qBAAqB,eAAgB,iBAAiB,MAAM,CAAC,KAAG,YAAY,MAAM,CAyB9F,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,eAAe,EAAE,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IACtC,YAAY,EAAE,GAAG,CAAC,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;IAC/D,kBAAkB,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACvC,cAAc,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACzE,CAAA;AAED,eAAO,MAAM,2BAA2B;wCACF,MAAM,KAAK,QAAQ,QAAQ,CAAC;wCAC5B,MAAM,SAAS,QAAQ,eAAe,MAAM,KAAK,QAAQ,IAAI,CAAC;;;0CAQrD,MAAM,QAAQ;QACzD,mBAAmB,CAAC,EAAE,iBAAiB,QAAQ,GAAG,IAAI,CAAC,CAAC;KACzD,KAAG,iBAAiB;CA6CtB,CAAA"}
1
+ {"version":3,"file":"useLogLevels.d.ts","sourceRoot":"","sources":["../../../src/composables/useLogLevels.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAInC,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,eAAO,MAAM,eAAe,EAAE,QAAQ,EAOrC,CAAA;AAED,eAAO,MAAM,+BAA+B,SAAU;IACpD,eAAe,CAAC,EAAE,QAAQ,CAAC;IAC3B,QAAQ,CAAC,EAAE,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAC;CACzC,KAAG,WAAW,CAAC,UAAU,EAAE,CAa3B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAC3E,eAAO,MAAM,sBAAsB,UAAW,gBAAgB,CAAC,QAAQ,CAAC,KAAG,WAAW,CAAC,mBAAmB,CAazG,CAAA;AAED,eAAO,MAAM,qBAAqB,eAAgB,gBAAgB,CAAC,MAAM,CAAC,KAAG,WAAW,CAAC,MAAM,CAyB9F,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,eAAe,EAAE,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IACtC,YAAY,EAAE,GAAG,CAAC,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;IAC/D,kBAAkB,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACvC,cAAc,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACzE,CAAA;AAED,eAAO,MAAM,2BAA2B,QAAS;IAC/C,oBAAoB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjE,oBAAoB,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnG,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;CAC3D;0CAM8C,MAAM,QAAQ;QACzD,mBAAmB,CAAC,EAAE,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;KACzD,KAAG,iBAAiB;CA6CtB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-data-plane-nodes",
3
- "version": "0.3.14",
3
+ "version": "0.3.15",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-data-plane-nodes.umd.js",
6
6
  "module": "./dist/entities-data-plane-nodes.es.js",
@@ -26,7 +26,7 @@
26
26
  "axios": "^1.6.8",
27
27
  "vue": ">= 3.3.13 < 4",
28
28
  "vue-router": "^4.3.3",
29
- "@kong-ui-public/entities-shared": "^3.9.2",
29
+ "@kong-ui-public/entities-shared": "^3.9.3",
30
30
  "@kong-ui-public/i18n": "^2.2.2"
31
31
  },
32
32
  "devDependencies": {
@@ -36,7 +36,7 @@
36
36
  "axios": "^1.7.7",
37
37
  "vue": "^3.4.38",
38
38
  "vue-router": "^4.4.5",
39
- "@kong-ui-public/entities-shared": "^3.9.2",
39
+ "@kong-ui-public/entities-shared": "^3.9.3",
40
40
  "@kong-ui-public/i18n": "^2.2.2"
41
41
  },
42
42
  "repository": {