@kong-ui-public/entities-upstreams-targets 3.10.5 → 3.10.6
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.
|
@@ -1235,7 +1235,7 @@ const pe = {
|
|
|
1235
1235
|
for (const [l, n] of R)
|
|
1236
1236
|
i[l] = n;
|
|
1237
1237
|
return i;
|
|
1238
|
-
}, Za = /* @__PURE__ */ me(na, [["__scopeId", "data-v-
|
|
1238
|
+
}, Za = /* @__PURE__ */ me(na, [["__scopeId", "data-v-4c6ace20"]]), Ie = "/v2/control-planes/{controlPlaneId}/core-entities", we = "/{workspace}", qe = {
|
|
1239
1239
|
list: {
|
|
1240
1240
|
konnect: `${Ie}/upstreams/{upstreamId}/targets`,
|
|
1241
1241
|
kongManager: `${we}/upstreams/{upstreamId}/targets`
|
|
@@ -1760,7 +1760,7 @@ const pe = {
|
|
|
1760
1760
|
]);
|
|
1761
1761
|
};
|
|
1762
1762
|
}
|
|
1763
|
-
}), Ya = /* @__PURE__ */ me(ya, [["__scopeId", "data-v-
|
|
1763
|
+
}), Ya = /* @__PURE__ */ me(ya, [["__scopeId", "data-v-47084451"]]), ga = { key: 1 }, ba = /* @__PURE__ */ ne({
|
|
1764
1764
|
__name: "UpstreamsFormGeneralInfo",
|
|
1765
1765
|
props: {
|
|
1766
1766
|
config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(Q,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/entities-shared"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/entities-shared","vue-router","@kong/icons","@kong-ui-public/i18n"],e):(Q=typeof globalThis<"u"?globalThis:Q||self,e(Q["kong-ui-entities-upstreams-targets"]={},Q.Vue,Q["kong-ui-public-entities-shared"],Q.VueRouter,Q.KongIcons,Q["kong-ui-public-i18n"]))})(this,function(Q,e,m,we,ae,Ve){"use strict";const Ye={upstreams:{list:{table_headers:{id:"ID",name:"Name",slots:"Slots",tags:"Tags"},empty_state:{title:"Configure a New Upstream",description:"Upstreams are used to load balance incoming requests."},empty_state_v2:{title:"Configure your first upstream",description:"Upstreams route traffic to multiple backend services, handling load balancing, health checks, and circuit breaking for reliability.",create_cta:"New upstream",group:"Upstreams created in gateways within this group will automatically appear here."},toolbar_actions:{new_upstream:"New upstream"}},title:"Upstreams",search:{placeholder:"Filter by exact name or ID"},actions:{create:"New upstream",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",view:"View Details"},delete:{title:"Delete an Upstream",description:"This action cannot be reversed so make sure to check upstream usage before deleting."},errors:{general:"Upstreams could not be retrieved",delete:"The upstream could not be deleted at this time.",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{errors:{name_required:"Name is required",should_be_integer:"Field should contain an integer",in_range:"Accepts an integer in the range of 10 - 65536"},general_info:{title:"General Information",help:"General information will help identify and manage this Upstream."},load_balancing:{title:"Load Balancing",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},health_check:{title:"Health Checks & Circuit Breakers",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},active_health_check:{title:"Active Health Checks",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},passive_health_check:{title:"Passive Health Checks",help:"Passive health checks, also known as circuit breakers, are checks performed based on the requests being proxied by Kong (HTTP/HTTPS/TCP), with no additional traffic being generated."},buttons:{view_documentation:"View documentation"},algorithms:{round_robin_label:"Round Robin",least_connections_label:"Least Connections",consistent_hashing_label:"Consistent Hashing",latency_label:"Latency",sticky_sessions_label:"Sticky Sessions"},hash_labels:{none:"None",consumer:"Consumer",ip:"IP",header:"Header",cookie:"Cookie",path:"Path",query_argument:"Query Argument",uri_capture:"URI Capture"},hash_tooltips:{hash_on_header:{text:"The header name to take the value from as hash input. Only required when {hash_on} is set to {header}",hash_on:"hash_on",header:"header"},hash_on_uri_capture:{text:"The name of the route URI capture to take the value from as hash input. Only required when {hash_on} is set to {uri_capture}",hash_on:"hash_on",uri_capture:"uri_capture"},hash_on_query_arg:{text:"The name of the query string argument to take the value from as hash input. Only required when {hash_on} is set to {query_arg}",hash_on:"hash_on",query_arg:"query_arg"},hash_on_cookie:{text:"The cookie name to take the value from as hash input. Only required when {hash_on} or {hash_fallback} is set to {cookie}. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response.",hash_on:"hash_on",hash_fallback:"hash_fallback",cookie:"cookie"},hash_on_cookie_path:{text:"The cookie path to set in the response headers. Only required when {hash_on} or {hash_fallback} is set to {cookie}.",hash_on:"hash_on",hash_fallback:"hash_fallback",cookie:"cookie"},slots:{text:"The number of slots in the load balancer algorithm. If {algorithm} is set to {round_robin}, this setting determines the maximum number of slots. If {algorithm} is set to {consistent_hashing}, this setting determines the actual number of slots in the algorithm. Accepts an integer in the range {min}-{max}",algorithm:"algorithm",round_robin:"round-robin",consistent_hashing:"consistent-hashing"},tags:"An optional set of strings associated with the Upstream for grouping and filtering.",hash_fallback:{text:"What to use as hashing input if the primary {hash_on} does not return a hash (eg. header is missing, or no Consumer identified). Not available if {hash_on} is set to {cookie}",hash_on:"hash_on",cookie:"cookie"},hash_fallback_header:{text:"The header name to take the value from as hash input. Only required when {hash_fallback} is set to {header}",hash_fallback:"hash_fallback",header:"header"},hash_fallback_query_arg:{text:"The name of the query string argument to take the value from as hash input. Only required when {hash_fallback} is set to {query_arg}",hash_fallback:"hash_fallback",query_arg:"query_arg"},hash_fallback_uri_capture:{text:"The name of the route URI capture to take the value from as hash input. Only required when {hash_fallback} is set to {uri_capture}",hash_fallback:"hash_fallback",uri_capture:"uri_capture"},host_header:{text:"The hostname to be used as {host} header when proxying requests through Kong.",host:"Host"},client_certificate:"If set, the certificate to be used as client certificate while TLS handshaking to the upstream server."},healthcheck_type_labels:{http:"HTTP",https:"HTTPS",tcp:"TCP",grsp:"gRPC",grsps:"gRPCs"},healthy:{label:"Healthy",help:"The counter thresholds to determine whether targets are healthy."},unhealthy:{label:"Unhealthy",help:"The counter thresholds to determine whether targets are unhealthy."},passive_healthy:{label:"Healthy",help:"The counter thresholds to determine whether targets are healthy."},passive_unhealthy:{label:"Unhealthy",help:"The counter thresholds to determine whether targets are unhealthy."},fields:{name:{label:"Name",placeholder:"Enter or select a host",tooltip:"This is a hostname, which must be equal to the {host} of a Service.",host:"host"},host_header:{label:"Host Header"},client_certificate:{label:"Client Certificate",placeholder:"Select or enter a Certificate ID",tooltip:"If set, the certificate to be used as client certificate while TLS handshaking to the upstream server."},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings associated with the Upstream for grouping and filtering."},algorithm:{label:"Algorithm",tooltip:"Which load balancing algorithm to use."},sticky_sessions_cookie:{label:"Sticky Sessions Cookie",tooltip:"The cookie name to keep sticky sessions."},sticky_sessions_cookie_path:{label:"Sticky Sessions Cookie Path",tooltip:"A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)."},slots:{label:"Slots",help:"Accepts an integer in the range of 10 - 65536"},hash_on:{label:"Hash on",help:"What to use as hashing input.",tooltip:"What to use as hashing input. Using {result} results in a weighted-round-robin scheme with no hashing."},hash_fallback:{label:"Hash Fallback",help:"What to use as hashing input if the primary hash_on does not return a hash",tooltip:"What to use as hashing input if the primary {hash_on} does not return a hash (eg. header is missing, or no Consumer identified). Not available if {hash_on} is set to {cookie}.",hash_on:"hash_on",cookie:"cookie"},active_health_checks:{label:"Active Health Checks",help:"Actively probe the targets for their health."},passive_health_checks:{label:"Passive Health Checks / Circuit Breakers",help:"Checks performed based on the requests being proxied by Kong (HTTP/HTTPS/TCP), with no additional traffic being generated."},healthchecks_threshold:{label:"Healthchecks Threshold"},header:{label:"Header"},headers:{label:"Headers",tooltip_active:"Header values can be separated by commas (value1, value2, value3)."},cookie:{label:"Cookie"},cookie_path:{label:"Cookie Path"},query_argument:{label:"Query Argument"},uri_capture:{label:"URI Capture"},active_healthcheck_type:{label:"Active Health Check Type"},http_path:{label:"HTTP Path"},timeout:{label:"Timeout"},concurrency:{label:"Concurrency"},https_sni:{label:"HTTPS SNI"},verify_ssl:{label:"Verify the SSL certificate when performing active health checks using HTTPS"},interval:{label:"Interval",help:"A value of zero indicates that active probes for healthy targets are disabled."},successes:{label:"Successes"},http_statuses:{label:"HTTP Statuses"},http_failures:{label:"HTTP Failures"},tcp_failures:{label:"TCP Failures"},timeouts:{label:"Timeouts"},passive_health_check_type:{label:"Passive Health Check Type"}}},labels:{created_at:"Created at"}},targets:{list:{table_headers:{id:"ID",target_address:"Target Address",weight:"Weight",tags:"Tags"},empty_state:{title:"Configure a New Target",description:"A target is an IP address/hostname with a port that identifies an instance of a backend service."},toolbar_actions:{new_target:"New Target"}},title:"Targets",actions:{create:"New Target",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",mark_healthy:"Mark Healthy",mark_unhealthy:"Mark Unhealthy"},delete:{title:"Delete a Target",description:"This action cannot be reversed so make sure to check target usage before deleting."},errors:{general:"Targets could not be retrieved",delete:"The target could not be deleted at this time.",copy:"Failed to copy to clipboard",weight:"Value must be in range 0 to 65535"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{create:{title:"New Target"},edit:{title:"Edit Target"},buttons:{save:"Save",cancel:"Cancel"},fields:{target:{label:"Target Address",placeholder:"Enter IP/hostname and port",tooltip:"The target address (IP or hostname) and port. If omitted the port defaults to 8000."},weight:{label:"Weight",tooltip:"The weight of this target in relation to other targets in the upstream. Value must be in range 0 to 65535, defaults to 100."},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3"}}}}};function et(){const a=Ve.createI18n("en-us",Ye);return{i18n:a,i18nT:Ve.i18nTComponent(a)}}function ne(a){const{replaceId:E=!1}=a,o=e.ref([]);return{addedItems:o,trackNewItems:(i,y)=>{if(y){const p={...i};E&&(p.value=i.label),o.value.push(p)}else o.value=o.value.filter(p=>p.value!==i.value)}}}const he=[{label:"100",value:"100"},{label:"101",value:"101"},{label:"102",value:"102"},{label:"103",value:"103"},{label:"200",value:"200"},{label:"201",value:"201"},{label:"202",value:"202"},{label:"203",value:"203"},{label:"204",value:"204"},{label:"205",value:"205"},{label:"206",value:"206"},{label:"207",value:"207"},{label:"208",value:"208"},{label:"226",value:"226"},{label:"300",value:"300"},{label:"301",value:"301"},{label:"302",value:"302"},{label:"303",value:"303"},{label:"304",value:"304"},{label:"305",value:"305"},{label:"306",value:"306"},{label:"307",value:"307"},{label:"308",value:"308"},{label:"400",value:"400"},{label:"401",value:"401"},{label:"402",value:"402"},{label:"403",value:"403"},{label:"404",value:"404"},{label:"405",value:"405"},{label:"406",value:"406"},{label:"407",value:"407"},{label:"408",value:"408"},{label:"409",value:"409"},{label:"410",value:"410"},{label:"411",value:"411"},{label:"412",value:"412"},{label:"413",value:"413"},{label:"414",value:"414"},{label:"415",value:"415"},{label:"416",value:"416"},{label:"417",value:"417"},{label:"418",value:"418"},{label:"419",value:"419"},{label:"420",value:"420"},{label:"421",value:"421"},{label:"422",value:"422"},{label:"423",value:"423"},{label:"424",value:"424"},{label:"425",value:"425"},{label:"426",value:"426"},{label:"428",value:"428"},{label:"429",value:"429"},{label:"430",value:"430"},{label:"431",value:"431"},{label:"440",value:"440"},{label:"444",value:"444"},{label:"449",value:"449"},{label:"450",value:"450"},{label:"451",value:"451"},{label:"460",value:"460"},{label:"463",value:"463"},{label:"494",value:"494"},{label:"495",value:"495"},{label:"496",value:"496"},{label:"497",value:"497"},{label:"498",value:"498"},{label:"499",value:"499"},{label:"500",value:"500"},{label:"501",value:"501"},{label:"502",value:"502"},{label:"503",value:"503"},{label:"504",value:"504"},{label:"505",value:"505"},{label:"506",value:"506"},{label:"507",value:"507"},{label:"508",value:"508"},{label:"509",value:"509"},{label:"510",value:"510"},{label:"511",value:"511"},{label:"520",value:"520"},{label:"521",value:"521"},{label:"522",value:"522"},{label:"523",value:"523"},{label:"524",value:"524"},{label:"525",value:"525"},{label:"526",value:"526"},{label:"527",value:"527"},{label:"529",value:"529"},{label:"530",value:"530"},{label:"561",value:"561"},{label:"598",value:"598"},{label:"599",value:"599"}],Ce=10,_e=65536,tt=0,at=65535,le=0,se=255,Ne=0,xe=255,lt=0,st=65535,He=0,Te=65535,ot=0,rt=2**31,ce=["200","302"],de=["200","201","202","203","204","205","206","207","208","226","300","301","302","303","304","305","306","307","308"],ue=["429","404","500","501","502","503","504","505"],pe=["429","500","503"];function fe(){const a=s=>/^\d+$/.test(s),E=(s,c,b)=>{if(a(s)){const u=Number(s);return u>=c&&u<=b}else return!1},o=s=>s.map(c=>Number(c)),l=s=>s.map(c=>c.toString()),i=s=>{var b,u,t,F,V,d,_,M,I,K,P,k,N,T,f,H,$,z,A,X,U,q,R,G,W,j,w,g,C,S,O,D,h,r,n,J,L,v,ee,te,be,Ie,qe,Fe,Ee,Be,Oe,De,$e,Pe,Ae,Me,Ke,Re,je,Le,Qe,We,Je,ze,Ge,ve,Xe,Ze;return{name:(s==null?void 0:s.name)||"",hostHeader:(s==null?void 0:s.host_header)||"",clientCertificate:((b=s==null?void 0:s.client_certificate)==null?void 0:b.id)||"",tags:((u=s==null?void 0:s.tags)==null?void 0:u.join(", "))||"",algorithm:(s==null?void 0:s.algorithm)||"round-robin",stickySessionsCookie:(s==null?void 0:s.sticky_sessions_cookie)||"",stickySessionsCookiePath:(s==null?void 0:s.sticky_sessions_cookie_path)||"/",slots:((t=s==null?void 0:s.slots)==null?void 0:t.toString())||"10000",hashOn:(s==null?void 0:s.hash_on)||"none",hashFallback:(s==null?void 0:s.hash_fallback)||"none",hashOnHeader:(s==null?void 0:s.hash_on_header)||"",hashOnCookie:(s==null?void 0:s.hash_on_cookie)||"",hashOnCookiePath:(s==null?void 0:s.hash_on_cookie_path)||"/",hashOnQueryArgument:(s==null?void 0:s.hash_on_query_arg)||"",hashOnUriCapture:(s==null?void 0:s.hash_on_uri_capture)||"",hashFallbackHeader:(s==null?void 0:s.hash_fallback_header)||"",hashFallbackQueryArgument:(s==null?void 0:s.hash_fallback_query_arg)||"",hashFallbackUriCapture:(s==null?void 0:s.hash_fallback_uri_capture)||"",activeHealthSwitch:s?((V=(F=s.healthchecks.active)==null?void 0:F.healthy)==null?void 0:V.interval)!==0||((_=(d=s.healthchecks.active)==null?void 0:d.unhealthy)==null?void 0:_.interval)!==0:!1,passiveHealthSwitch:s?((I=(M=s.healthchecks.passive)==null?void 0:M.healthy)==null?void 0:I.successes)!==0||((P=(K=s.healthchecks.passive)==null?void 0:K.unhealthy)==null?void 0:P.timeouts)!==0||((N=(k=s.healthchecks.passive)==null?void 0:k.unhealthy)==null?void 0:N.tcp_failures)!==0||((f=(T=s.healthchecks.passive)==null?void 0:T.unhealthy)==null?void 0:f.http_failures)!==0:!1,healthchecksThreshold:((H=s==null?void 0:s.healthchecks.threshold)==null?void 0:H.toString())||"0",activeHealthCheck:{type:(($=s==null?void 0:s.healthchecks.active)==null?void 0:$.type)||"http",httpPath:((z=s==null?void 0:s.healthchecks.active)==null?void 0:z.http_path)||"/",timeout:((X=(A=s==null?void 0:s.healthchecks.active)==null?void 0:A.timeout)==null?void 0:X.toString())||"1",concurrency:((q=(U=s==null?void 0:s.healthchecks.active)==null?void 0:U.concurrency)==null?void 0:q.toString())||"10",httpsSni:((R=s==null?void 0:s.healthchecks.active)==null?void 0:R.https_sni)||"",verifySsl:((G=s==null?void 0:s.healthchecks.active)==null?void 0:G.https_verify_certificate)||!1,headers:(W=s==null?void 0:s.healthchecks.active)!=null&&W.headers&&Object.entries(s.healthchecks.active.headers).length>0?Object.entries(s.healthchecks.active.headers).map(([zt,Se])=>({key:zt,values:Se==null?void 0:Se.join(", ")})):[{key:"",values:""}],healthy:{interval:((g=(w=(j=s==null?void 0:s.healthchecks.active)==null?void 0:j.healthy)==null?void 0:w.interval)==null?void 0:g.toString())||"0",successes:((O=(S=(C=s==null?void 0:s.healthchecks.active)==null?void 0:C.healthy)==null?void 0:S.successes)==null?void 0:O.toString())||"5",httpStatuses:(h=(D=s==null?void 0:s.healthchecks.active)==null?void 0:D.healthy)!=null&&h.http_statuses?l(s.healthchecks.active.healthy.http_statuses):ce},unhealthy:{interval:((J=(n=(r=s==null?void 0:s.healthchecks.active)==null?void 0:r.unhealthy)==null?void 0:n.interval)==null?void 0:J.toString())||"0",httpFailures:((ee=(v=(L=s==null?void 0:s.healthchecks.active)==null?void 0:L.unhealthy)==null?void 0:v.http_failures)==null?void 0:ee.toString())||"5",tcpFailures:((Ie=(be=(te=s==null?void 0:s.healthchecks.active)==null?void 0:te.unhealthy)==null?void 0:be.tcp_failures)==null?void 0:Ie.toString())||"5",httpStatuses:(Fe=(qe=s==null?void 0:s.healthchecks.active)==null?void 0:qe.unhealthy)!=null&&Fe.http_statuses?l(s.healthchecks.active.unhealthy.http_statuses):ue,timeouts:((Oe=(Be=(Ee=s==null?void 0:s.healthchecks.active)==null?void 0:Ee.unhealthy)==null?void 0:Be.timeouts)==null?void 0:Oe.toString())||"0"}},passiveHealthCheck:{type:((De=s==null?void 0:s.healthchecks.passive)==null?void 0:De.type)||"http",healthy:{successes:((Ae=(Pe=($e=s==null?void 0:s.healthchecks.passive)==null?void 0:$e.healthy)==null?void 0:Pe.successes)==null?void 0:Ae.toString())||"5",httpStatuses:(Ke=(Me=s==null?void 0:s.healthchecks.passive)==null?void 0:Me.healthy)!=null&&Ke.http_statuses?l(s.healthchecks.passive.healthy.http_statuses):de},unhealthy:{timeouts:((Le=(je=(Re=s==null?void 0:s.healthchecks.passive)==null?void 0:Re.unhealthy)==null?void 0:je.timeouts)==null?void 0:Le.toString())||"0",httpFailures:((Je=(We=(Qe=s==null?void 0:s.healthchecks.passive)==null?void 0:Qe.unhealthy)==null?void 0:We.http_failures)==null?void 0:Je.toString())||"5",tcpFailures:((ve=(Ge=(ze=s==null?void 0:s.healthchecks.passive)==null?void 0:ze.unhealthy)==null?void 0:Ge.tcp_failures)==null?void 0:ve.toString())||"5",httpStatuses:(Ze=(Xe=s==null?void 0:s.healthchecks.passive)==null?void 0:Xe.unhealthy)!=null&&Ze.http_statuses?l(s.healthchecks.passive.unhealthy.http_statuses):pe}}}};return{isInteger:a,inRange:E,stringToNumberArray:o,numberToStringArray:l,upstreamsResponseToFields:s=>i(s),getDefaultUpstreamFields:()=>i(),objectsAreEqual:(s,c)=>{try{return JSON.stringify(s)===JSON.stringify(c)}catch{return!1}},cloneDeep:s=>JSON.parse(JSON.stringify(s))}}const Z={useI18n:et,useMultiselectCreation:ne,useHelpers:fe},oe="/v2/control-planes/{controlPlaneId}/core-entities",re="/{workspace}",ie={list:{konnect:`${oe}/upstreams`,kongManager:`${re}/upstreams`},form:{konnect:{getServices:`${oe}/services`,getCertificates:`${oe}/certificates`,validate:`${oe}/schemas/upstreams/validate`,create:`${oe}/upstreams`,edit:`${oe}/upstreams/{id}`},kongManager:{getServices:`${re}/services`,getCertificates:`${re}/certificates`,validate:`${re}/schemas/upstreams/validate`,create:`${re}/upstreams`,edit:`${re}/upstreams/{id}`}}},it="#d60027",nt="#00abd2",ht="24px",ct={class:"kong-ui-entities-upstreams-list"},dt={class:"button-row"},ut={class:"empty-state-icon-gateway"},pt={class:"upstream-name"},ft=e.defineComponent({__name:"UpstreamsList",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||!a.createRoute||!a.getViewRoute||!a.getEditRoute||a.app==="kongManager"&&!a.isExactMatch&&!a.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success"],setup(a,{emit:E}){var w;const o=E,l=a,{i18n:{t:i}}=Z.useI18n(),y=we.useRouter(),{axiosInstance:p}=m.useAxios((w=l.config)==null?void 0:w.axiosRequestConfig),{hasRecords:B,handleStateChange:x}=m.useTableState(()=>F.value),s=e.computed(()=>B.value&&l.config.app==="konnect"),c=e.computed(()=>l.config.app!=="kongManager"||!!l.config.disableSorting),b={name:{label:i("upstreams.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},slots:{label:i("upstreams.list.table_headers.slots"),searchable:!0,sortable:!0},tags:{label:i("upstreams.list.table_headers.tags"),sortable:!1}},u=b,t=e.computed(()=>{var C,S;let g=`${l.config.apiBaseUrl}${ie.list[l.config.app]}`;return l.config.app==="konnect"?g=g.replace(/{controlPlaneId}/gi,((C=l.config)==null?void 0:C.controlPlaneId)||""):l.config.app==="kongManager"&&(g=g.replace(/\/{workspace}/gi,(S=l.config)!=null&&S.workspace?`/${l.config.workspace}`:"")),g}),F=e.ref(""),V=e.computed(()=>{const g=l.config.app==="konnect"||l.config.isExactMatch;if(g)return{isExactMatch:g,placeholder:i("upstreams.search.placeholder")};const{name:C,slots:S}=b;return{isExactMatch:g,fields:{name:C,slots:S},schema:l.config.filterSchema}}),{fetcher:d,fetcherState:_,fetcherCacheKey:M}=m.useFetcher(e.computed(()=>({...l.config,cacheIdentifier:l.cacheIdentifier})),t),I=()=>{F.value=""},K=()=>{M.value++},P=e.ref(null),k=async(g,C)=>{const S=g.id;if(!await C(S)){o("copy:error",{entity:g,field:"id",message:i("upstreams.errors.copy")});return}o("copy:success",{entity:g,field:"id",message:i("upstreams.copy.success",{val:S})})},N=async(g,C)=>{const S=JSON.stringify(g);if(!await C(S)){o("copy:error",{entity:g,message:i("upstreams.errors.copy")});return}o("copy:success",{entity:g,message:i("upstreams.copy.success_brief")})},T=async g=>{var S;await((S=l.canRetrieve)==null?void 0:S.call(l,g))&&y.push(l.config.getViewRoute(g.id))},f=g=>({label:i("upstreams.actions.view"),to:l.config.getViewRoute(g)}),H=g=>({label:i("upstreams.actions.edit"),to:l.config.getEditRoute(g)}),$=e.ref(void 0),z=e.ref(!1),A=e.ref(!1),X=e.ref(""),U=m.useDeleteUrlBuilder(l.config,t.value),q=g=>{$.value=g,z.value=!0},R=()=>{z.value=!1},G=async()=>{var g,C,S;if((g=$.value)!=null&&g.id){A.value=!0;try{await p.delete(U($.value.id)),A.value=!1,z.value=!1,M.value++,o("delete:success",$.value)}catch(O){X.value=((S=(C=O.response)==null?void 0:C.data)==null?void 0:S.message)||O.message||i("upstreams.errors.delete"),o("error",O)}finally{A.value=!1}}},W=()=>{y.push(l.config.createRoute)};e.watch(_,g=>{var C,S,O;if(g.status===m.FetcherStatus.Error){P.value={title:i("upstreams.errors.general")},(O=(S=(C=g.error)==null?void 0:C.response)==null?void 0:S.data)!=null&&O.message&&(P.value.message=g.error.response.data.message),o("error",g.error);return}P.value=null});const j=e.ref({ctaPath:l.config.createRoute,ctaText:void 0,message:`${i("upstreams.list.empty_state.description")}${l.config.additionMessageForEmptyState?` ${l.config.additionMessageForEmptyState}`:""}`,title:i("upstreams.title")});return e.onBeforeMount(async()=>{await l.canCreate()&&(j.value.title=i("upstreams.list.empty_state.title"),j.value.ctaText=i("upstreams.actions.create"))}),(g,C)=>{const S=e.resolveComponent("KButton"),O=e.resolveComponent("KDropdownItem"),D=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",ct,[e.createVNode(e.unref(m.EntityBaseTable),{"cache-identifier":a.cacheIdentifier,"disable-sorting":c.value,"empty-state-options":j.value,"enable-entity-actions":"","error-message":P.value,fetcher:e.unref(d),"fetcher-cache-key":e.unref(M),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-upstreams-list",query:F.value,"table-headers":e.unref(u),onClearSearchInput:I,"onClick:row":C[3]||(C[3]=h=>T(h)),onSort:K,onState:e.unref(x)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(m.EntityFilter),{modelValue:F.value,"onUpdate:modelValue":C[0]||(C[0]=h=>F.value=h),config:V.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!a.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",dt,[s.value?(e.openBlock(),e.createBlock(S,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"upstream-learn-more-button",icon:"",onClick:C[1]||(C[1]=h=>g.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(ae.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canCreate()},{default:e.withCtx(()=>[e.createVNode(S,{appearance:"primary","data-testid":"toolbar-add-upstream",size:a.useActionOutside?"medium":"large",to:a.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(ae.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(i)("upstreams.list.toolbar_actions.new_upstream")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),name:e.withCtx(({rowValue:h})=>[e.createElementVNode("span",pt,e.toDisplayString(h),1)]),tags:e.withCtx(({rowValue:h})=>[e.createVNode(e.unref(m.TableTags),{"tag-max-width":"auto",tags:h},null,8,["tags"])]),actions:e.withCtx(({row:h})=>[e.createVNode(D,null,{default:e.withCtx(({copyToClipboard:r})=>[e.createVNode(O,{"data-testid":"action-entity-copy-id",onClick:n=>k(h,r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("upstreams.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(D,null,{default:e.withCtx(({copyToClipboard:r})=>[e.createVNode(O,{"data-testid":"action-entity-copy-json",onClick:n=>N(h,r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("upstreams.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canRetrieve(h)},{default:e.withCtx(()=>[e.createVNode(O,{"data-testid":"action-entity-view","has-divider":"",item:f(h.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canEdit(h)},{default:e.withCtx(()=>[e.createVNode(O,{"data-testid":"action-entity-edit",item:H(h.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canDelete(h)},{default:e.withCtx(()=>[e.createVNode(O,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:r=>q(h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("upstreams.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!F.value&&a.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var h;return[e.createVNode(e.unref(m.EntityEmptyState),{"action-button-text":e.unref(i)("upstreams.list.empty_state_v2.create_cta"),appearance:"secondary","can-create":()=>a.canCreate(),"data-testid":"upstreams-entity-empty-state",description:e.unref(i)("upstreams.list.empty_state_v2.description"),"learn-more":a.config.app==="konnect",title:e.unref(i)("upstreams.list.empty_state_v2.title"),"onClick:create":W,"onClick:learnMore":C[2]||(C[2]=r=>g.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",ut,[e.createVNode(e.unref(ae.CloudUploadIcon),{color:e.unref(nt),size:e.unref(ht)},null,8,["color","size"])])]),_:2},[(h=a.config)!=null&&h.isControlPlaneGroup?{name:"message",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("upstreams.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"0"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(m.EntityDeleteModal),{"action-pending":A.value,description:e.unref(i)("upstreams.delete.description"),"entity-name":$.value&&($.value.name||$.value.id),"entity-type":e.unref(m.EntityTypes).Upstream,error:X.value,title:e.unref(i)("upstreams.delete.title"),visible:z.value,onCancel:R,onProceed:G},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Y=(a,E)=>{const o=a.__vccOpts||a;for(const[l,i]of E)o[l]=i;return o},mt=Y(ft,[["__scopeId","data-v-18b86085"]]),me="/v2/control-planes/{controlPlaneId}/core-entities",ye="/{workspace}",ge={list:{konnect:`${me}/upstreams/{upstreamId}/targets`,kongManager:`${ye}/upstreams/{upstreamId}/targets`},form:{konnect:{create:`${me}/upstreams/{upstreamId}/targets`,edit:`${me}/upstreams/{upstreamId}/targets/{id}`,validate:`${me}/v1/schemas/json/target/validate`},kongManager:{create:`${ye}/upstreams/{upstreamId}/targets`,edit:`${ye}/upstreams/{upstreamId}/targets/{id}`,validate:`${ye}/schemas/targets/validate`}}},yt={class:"kong-ui-entities-target-form"},gt={class:"target-form-container"},kt={key:0,class:"target-form-info"},Ue=Y(e.defineComponent({__name:"TargetForm",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||a.app==="konnect"&&!a.controlPlaneId||a.app==="kongManager"&&typeof a.workspace!="string"||!a.upstreamId)},isVisible:{type:Boolean,required:!0,default:!1},targetId:{type:String,required:!1,default:""}},emits:["update","error","loading","cancel"],setup(a,{emit:E}){var P;const o=E,l=a,{i18n:{t:i}}=Z.useI18n(),{getMessageFromError:y}=m.useErrors(),{axiosInstance:p}=m.useAxios((P=l.config)==null?void 0:P.axiosRequestConfig),B=e.computed(()=>{var k;return ge.form[l.config.app].edit.replace(/{upstreamId}/gi,((k=l.config)==null?void 0:k.upstreamId)||"")}),x=e.computed(()=>l.targetId?m.EntityBaseFormType.Edit:m.EntityBaseFormType.Create),s=e.computed(()=>x.value===m.EntityBaseFormType.Edit?i("targets.form.edit.title"):i("targets.form.create.title")),c=e.reactive({fields:{target:"",weight:100,tags:""},isReadonly:!1,errorMessage:""}),b=e.reactive({target:"",weight:100,tags:""}),u={target:"",weight:100,tags:""},t=e.computed(()=>{const k=parseInt(c.fields.weight.toString(),10);return k<0||k>65535}),F=e.computed(()=>JSON.stringify(c.fields)!==JSON.stringify(b)&&!!c.fields.target&&!!c.fields.weight&&!t.value),V=k=>{var N;c.fields.target=(k==null?void 0:k.target)||"",c.fields.weight=(k==null?void 0:k.weight)??"",c.fields.tags=((N=k==null?void 0:k.tags)==null?void 0:N.join(", "))||"",Object.assign(b,c.fields)},d=()=>{c.errorMessage="",o("cancel")},_=e.computed(()=>{var N,T;let k=`${l.config.apiBaseUrl}${ge.form[l.config.app].validate}`;return l.config.app==="konnect"?k=k.replace(/{controlPlaneId}/gi,((N=l.config)==null?void 0:N.controlPlaneId)||""):l.config.app==="kongManager"&&(k=k.replace(/\/{workspace}/gi,(T=l.config)!=null&&T.workspace?`/${l.config.workspace}`:"")),k=k.replace(/{id}/gi,l.targetId),k}),M=e.computed(()=>{var N,T,f,H;let k=`${l.config.apiBaseUrl}${ge.form[l.config.app][x.value]}`;return l.config.app==="konnect"?k=k.replace(/{controlPlaneId}/gi,((N=l.config)==null?void 0:N.controlPlaneId)||"").replace(/{upstreamId}/gi,((T=l.config)==null?void 0:T.upstreamId)||""):l.config.app==="kongManager"&&(k=k.replace(/\/{workspace}/gi,(f=l.config)!=null&&f.workspace?`/${l.config.workspace}`:"").replace(/{upstreamId}/gi,((H=l.config)==null?void 0:H.upstreamId)||"")),k=k.replace(/{id}/gi,l.targetId),k}),I=e.computed(()=>{var k,N,T;return{target:c.fields.target,weight:parseInt(c.fields.weight),tags:(T=(N=(k=c.fields.tags)==null?void 0:k.split(","))==null?void 0:N.map(f=>String(f||"").trim()))==null?void 0:T.filter(f=>f!==""),upstream:{id:l.config.upstreamId}}}),K=async()=>{var k,N;try{c.isReadonly=!0,c.errorMessage="";let T;if(await p.post(_.value,I.value),x.value==="create"?T=await p.post(M.value,I.value):x.value==="edit"&&(T=((k=l.config)==null?void 0:k.app)==="konnect"?await p.put(M.value,I.value):await p.patch(M.value,I.value)),T){const{data:f}=T;c.fields.target=(f==null?void 0:f.name)||"",c.fields.weight=(f==null?void 0:f.weight)??100,c.fields.tags=((N=f==null?void 0:f.tags)==null?void 0:N.join(", "))||"",o("update",f),Object.assign(c.fields,u)}}catch(T){c.errorMessage=y(T),o("error",T)}finally{c.isReadonly=!1}};return e.watch(()=>l.targetId,()=>{Object.assign(c.fields,u)}),(k,N)=>{const T=e.resolveComponent("KInput"),f=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(f,{"action-button-disabled":!F.value||c.isReadonly,"action-button-text":e.unref(i)("targets.form.buttons.save"),"cancel-button-text":e.unref(i)("targets.form.buttons.cancel"),title:s.value,visible:a.isVisible,onCancel:d,onProceed:K},{default:e.withCtx(()=>[e.createElementVNode("div",yt,[e.createVNode(e.unref(m.EntityBaseForm),{config:a.config,"edit-id":a.targetId,"entity-type":e.unref(m.SupportedEntityType).Target,"error-message":c.errorMessage,"fetch-url":B.value,"form-fields":I.value,"is-readonly":c.isReadonly,onCancel:d,"onFetch:error":N[3]||(N[3]=H=>k.$emit("error",H)),"onFetch:success":V,onLoading:N[4]||(N[4]=H=>k.$emit("loading",H))},{default:e.withCtx(()=>[e.createElementVNode("div",gt,[k.$slots.info?(e.openBlock(),e.createElementBlock("div",kt,[e.renderSlot(k.$slots,"info",{},void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(T,{modelValue:c.fields.target,"onUpdate:modelValue":N[0]||(N[0]=H=>c.fields.target=H),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-target",label:e.unref(i)("targets.form.fields.target.label"),"label-attributes":{info:e.unref(i)("targets.form.fields.target.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(i)("targets.form.fields.target.placeholder"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),e.createVNode(T,{modelValue:c.fields.weight,"onUpdate:modelValue":N[1]||(N[1]=H=>c.fields.weight=H),autocomplete:"off",class:"target-form-input","data-testid":"target-form-weight",error:t.value,"error-message":e.unref(i)("targets.errors.weight"),label:e.unref(i)("targets.form.fields.weight.label"),"label-attributes":{info:e.unref(i)("targets.form.fields.weight.tooltip"),tooltipAttributes:{maxWidth:"400"}},max:"65535",min:"0",readonly:c.isReadonly,required:"",type:"number"},null,8,["modelValue","error","error-message","label","label-attributes","readonly"]),e.createVNode(T,{modelValue:c.fields.tags,"onUpdate:modelValue":N[2]||(N[2]=H=>c.fields.tags=H),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-tags",help:e.unref(i)("targets.form.fields.tags.help"),label:e.unref(i)("targets.form.fields.tags.label"),placeholder:e.unref(i)("targets.form.fields.tags.placeholder"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","help","label","placeholder","readonly"])])]),_:3},8,["config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])]),_:3},8,["action-button-disabled","action-button-text","cancel-button-text","title","visible"])}}}),[["__scopeId","data-v-b5bbee74"]]),bt={class:"kong-ui-entities-targets-list"},Ct={class:"target-address"},_t=Y(e.defineComponent({__name:"TargetsList",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||!a.upstreamId||a.app==="kongManager"&&(typeof a.canMarkHealthy>"u"||typeof a.canMarkUnhealthy>"u"))},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success","health-actions:healthy","health-actions:unhealthy","create:target","update:target"],setup(a,{emit:E}){var j;const o=E,l=a,{i18n:{t:i}}=Z.useI18n(),{axiosInstance:y}=m.useAxios((j=l.config)==null?void 0:j.axiosRequestConfig),p=e.computed(()=>l.config.app!=="kongManager"||!!l.config.disableSorting),x={target:{label:i("targets.list.table_headers.target_address"),sortable:!0,hidable:!1},weight:{label:i("targets.list.table_headers.weight"),sortable:!0},tags:{label:i("targets.list.table_headers.tags"),sortable:!1}},s=e.computed(()=>{var g,C,S,O;let w=`${l.config.apiBaseUrl}${ge.list[l.config.app]}`;return l.config.app==="konnect"?w=w.replace(/{controlPlaneId}/gi,((g=l.config)==null?void 0:g.controlPlaneId)||"").replace(/{upstreamId}/gi,((C=l.config)==null?void 0:C.upstreamId)||""):l.config.app==="kongManager"&&(w=w.replace(/\/{workspace}/gi,(S=l.config)!=null&&S.workspace?`/${l.config.workspace}`:"").replace(/{upstreamId}/gi,((O=l.config)==null?void 0:O.upstreamId)||"")),w}),{fetcher:c,fetcherState:b,fetcherCacheKey:u}=m.useFetcher(e.computed(()=>({...l.config,cacheIdentifier:l.cacheIdentifier})),s),t=()=>{u.value++},F=e.ref(null),V=()=>{q.value=!0},d=async(w,g)=>{const C=w.id;if(!await g(C)){o("copy:error",{entity:w,field:"id",message:i("targets.errors.copy")});return}o("copy:success",{entity:w,field:"id",message:i("targets.copy.success",{val:C})})},_=async(w,g)=>{const C=JSON.stringify(w);if(!await g(C)){o("copy:error",{entity:w,message:i("targets.errors.copy")});return}o("copy:success",{entity:w,message:i("targets.copy.success_brief")})},M=w=>{U.value=w,q.value=!0},I=w=>l.config.app==="konnect"?!1:l.config.canMarkHealthy(w),K=w=>l.config.app==="konnect"?!1:l.config.canMarkUnhealthy(w),P=e.ref(void 0),k=e.ref(!1),N=e.ref(!1),T=e.ref(""),f=m.useDeleteUrlBuilder(l.config,s.value),H=w=>{P.value=w,k.value=!0},$=()=>{k.value=!1},z=async()=>{var w,g,C;if((w=P.value)!=null&&w.id){N.value=!0;try{await y.delete(f(P.value.id)),N.value=!1,k.value=!1,u.value++,o("delete:success",P.value)}catch(S){T.value=((C=(g=S.response)==null?void 0:g.data)==null?void 0:C.message)||S.message||i("targets.errors.delete"),o("error",S)}finally{N.value=!1}}};e.watch(b,w=>{var g,C,S;if(w.status===m.FetcherStatus.Error){F.value={title:i("targets.errors.general")},(S=(C=(g=w.error)==null?void 0:g.response)==null?void 0:C.data)!=null&&S.message&&(F.value.message=w.error.response.data.message),o("error",w.error);return}F.value=null});const A=e.ref({ctaText:void 0,message:`${i("targets.list.empty_state.description")}${l.config.additionMessageForEmptyState?` ${l.config.additionMessageForEmptyState}`:""}`,title:i("targets.title"),...l.config.createRoute&&{ctaPath:l.config.createRoute}});e.onBeforeMount(async()=>{await l.canCreate()&&(A.value.title=i("targets.list.empty_state.title"),A.value.ctaText=i("targets.actions.create"))});const X=e.computed(()=>({app:l.config.app,apiBaseUrl:l.config.apiBaseUrl,upstreamId:l.config.upstreamId,axiosRequestConfig:l.config.axiosRequestConfig,...l.config.app==="konnect"&&{controlPlaneId:l.config.controlPlaneId},...l.config.app==="kongManager"&&{workspace:l.config.workspace}})),U=e.ref(""),q=e.ref(!1),R=w=>{U.value?o("update:target",w):o("create:target",w),G()},G=()=>{W(),u.value++},W=()=>{q.value=!1,U.value=""};return(w,g)=>{const C=e.resolveComponent("KButton"),S=e.resolveComponent("KDropdownItem"),O=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",bt,[e.createVNode(e.unref(m.EntityBaseTable),{"cache-identifier":a.cacheIdentifier,"disable-sorting":p.value,"empty-state-options":A.value,"enable-entity-actions":"","error-message":F.value,fetcher:e.unref(c),"fetcher-cache-key":e.unref(u),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-targets-list","table-headers":e.unref(x),onEmptyStateCtaClicked:g[1]||(g[1]=()=>l.config.createRoute?void 0:V()),onSort:t},{"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!a.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canCreate()},{default:e.withCtx(()=>[e.createVNode(C,{appearance:"primary","data-testid":"toolbar-new-target",size:a.useActionOutside?"medium":"large",to:l.config.createRoute?l.config.createRoute:void 0,onClick:g[0]||(g[0]=()=>l.config.createRoute?void 0:V())},{default:e.withCtx(()=>[e.createVNode(e.unref(ae.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(i)("targets.list.toolbar_actions.new_target")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])],8,["disabled"]))]),target:e.withCtx(({rowValue:D})=>[e.createElementVNode("span",Ct,e.toDisplayString(D),1)]),tags:e.withCtx(({rowValue:D})=>[e.createVNode(e.unref(m.TableTags),{"tag-max-width":"auto",tags:D},null,8,["tags"])]),actions:e.withCtx(({row:D})=>[e.createVNode(O,null,{default:e.withCtx(({copyToClipboard:h})=>[e.createVNode(S,{"data-testid":"action-entity-copy-id",onClick:r=>d(D,h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(O,null,{default:e.withCtx(({copyToClipboard:h})=>[e.createVNode(S,{"data-testid":"action-entity-copy-json",onClick:r=>_(D,h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canEdit(D)},{default:e.withCtx(()=>[e.createVNode(S,{"data-testid":"action-entity-edit","has-divider":"",onClick:h=>M(D.id)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.edit")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>I(D)},{default:e.withCtx(()=>[e.createVNode(S,{"data-testid":"action-target-mark-healthy",onClick:h=>o("health-actions:healthy",D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.mark_healthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>K(D)},{default:e.withCtx(()=>[e.createVNode(S,{"data-testid":"action-target-mark-unhealthy",onClick:h=>o("health-actions:unhealthy",D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.mark_unhealthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canDelete(D)},{default:e.withCtx(()=>[e.createVNode(S,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:h=>H(D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","table-headers"]),e.createVNode(e.unref(m.EntityDeleteModal),{"action-pending":N.value,description:e.unref(i)("targets.delete.description"),"entity-type":e.unref(m.EntityTypes).Target,error:T.value,"need-confirm":!1,title:e.unref(i)("targets.delete.title"),visible:k.value,onCancel:$,onProceed:z},null,8,["action-pending","description","entity-type","error","title","visible"]),e.createVNode(Ue,{config:X.value,"is-visible":q.value,"target-id":U.value,onCancel:W,onUpdate:R},e.createSlots({_:2},[w.$slots["form-info"]?{name:"info",fn:e.withCtx(()=>[e.renderSlot(w.$slots,"form-info",{},void 0,!0)]),key:"0"}:void 0]),1032,["config","is-visible","target-id"])])}}}),[["__scopeId","data-v-4ecc7a36"]]),St={key:1},wt=Y(e.defineComponent({__name:"UpstreamsFormGeneralInfo",props:{config:{type:Object,required:!0},name:{type:String,required:!0},hostHeader:{type:String,required:!0},clientCertificate:{type:String,required:!0},tags:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:name","update:host-header","update:client-certificate","update:tags"],setup(a,{emit:E}){var $,z,A,X;const{i18nT:o,i18n:{t:l}}=Z.useI18n(),i=a,y=E,{debouncedQueryChange:p,loading:B,loadItems:x,results:s,allRecords:c}=m.useDebouncedFilter(i.config,(z=ie.form[($=i.config)==null?void 0:$.app])==null?void 0:z.getServices,"",{fetchedItemsKey:"data",searchKeys:["host"]}),{debouncedQueryChange:b,loading:u,loadItems:t,results:F}=m.useDebouncedFilter(i.config,(X=ie.form[(A=i.config)==null?void 0:A.app])==null?void 0:X.getCertificates),V=e.ref(""),d=e.computed(()=>{var U;return!!i.name&&!((U=c.value)!=null&&U.some(q=>q.host===i.name))}),_=e.computed(()=>{var q,R,G;const U=d.value&&i.name.includes((q=V.value)==null?void 0:q.toLowerCase());return(G=s.value)==null?void 0:G.map(W=>({label:W.host,value:W.id})).concat(U?[{label:i.name,value:((R=K.value)==null?void 0:R.value)||i.name}]:[])}),M=e.computed(()=>{var U;return(U=F.value)==null?void 0:U.map(q=>({label:q.id,value:q.id}))}),I=e.ref(""),K=e.ref({value:"",label:""}),P=e.computed(()=>{var U,q;return((U=_.value.find(R=>R.value===I.value))==null?void 0:U.label)||((q=K.value)==null?void 0:q.label)}),k=U=>{V.value=U,p(U)},N=U=>{K.value=U},T=()=>{K.value={value:"",label:""}},f=U=>{I.value=U,y("update:name",P.value)},H=e.ref(!1);return e.onBeforeMount(async()=>{var U,q;try{H.value=!0,await x(),i.name&&(I.value=((q=(U=_.value.find(R=>R.label===i.name))==null?void 0:U.value)==null?void 0:q.toString())||i.name),await t()}finally{H.value=!1}}),(U,q)=>{const R=e.resolveComponent("KSkeleton"),G=e.resolveComponent("KSelect"),W=e.resolveComponent("KInput");return e.openBlock(),e.createBlock(e.unref(m.EntityFormSection),{class:"kong-ui-entities-upstreams-general-info",description:e.unref(l)("upstreams.form.general_info.help"),title:e.unref(l)("upstreams.form.general_info.title")},{default:e.withCtx(()=>[H.value?(e.openBlock(),e.createBlock(R,{key:0,type:"form"})):(e.openBlock(),e.createElementBlock("div",St,[e.createVNode(G,{class:"name-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-name","enable-filtering":"","enable-item-creation":"","filter-function":()=>!0,items:_.value,label:e.unref(l)("upstreams.form.fields.name.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},loading:e.unref(B),"model-value":I.value,placeholder:e.unref(l)("upstreams.form.fields.name.placeholder"),readonly:a.readonly,required:"",width:"100%",onItemAdded:N,onItemRemoved:T,onQueryChange:k,"onUpdate:modelValue":f},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(o),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("upstreams.form.fields.name.host")),1)]),_:1})]),_:1},8,["items","label","loading","model-value","placeholder","readonly","onUpdate:modelValue"]),e.createVNode(W,{autocomplete:"off",class:"margin-bottom-6","data-testid":"upstreams-form-host-header",label:e.unref(l)("upstreams.form.fields.host_header.label"),"model-value":a.hostHeader,readonly:a.readonly,type:"text","onUpdate:modelValue":q[0]||(q[0]=j=>y("update:host-header",j))},null,8,["label","model-value","readonly"]),e.createVNode(G,{class:"certificate-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-client-certificate","enable-filtering":"","filter-function":()=>!0,items:M.value,label:e.unref(l)("upstreams.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(l)("upstreams.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},loading:e.unref(u),"model-value":a.clientCertificate,placeholder:e.unref(l)("upstreams.form.fields.client_certificate.placeholder"),readonly:a.readonly,width:"100%",onQueryChange:e.unref(b),"onUpdate:modelValue":q[1]||(q[1]=j=>y("update:client-certificate",j))},null,8,["items","label","label-attributes","loading","model-value","placeholder","readonly","onQueryChange"]),e.createVNode(W,{autocomplete:"off","data-testid":"upstreams-form-tags",help:e.unref(l)("upstreams.form.fields.tags.help"),label:e.unref(l)("upstreams.form.fields.tags.label"),"label-attributes":{info:e.unref(l)("upstreams.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},"model-value":a.tags,placeholder:e.unref(l)("upstreams.form.fields.tags.placeholder"),readonly:a.readonly,type:"text","onUpdate:modelValue":q[2]||(q[2]=j=>y("update:tags",j))},null,8,["help","label","label-attributes","model-value","placeholder","readonly"])]))]),_:1},8,["description","title"])}}}),[["__scopeId","data-v-1a71740c"]]),ke={upstreamObject:"https://developer.konghq.com/gateway/entities/upstream/",loadBalancing:"https://developer.konghq.com/gateway/traffic-control/load-balancing-reference/"},Vt={class:"fields-group-title"},Nt={class:"fields-group-text"},xt={class:"fields-group-title"},Ht={class:"fields-group-text"},Tt=Y(e.defineComponent({__name:"UpstreamsFormLoadBalancing",props:{stickySessionsAvailable:{type:Boolean,required:!1,default:!1},algorithm:{type:String,required:!0},stickySessionsCookie:{type:String,required:!0},stickySessionsCookiePath:{type:String,required:!0},slots:{type:String,required:!0},hashOn:{type:String,required:!0},hashFallback:{type:String,required:!0},hashOnHeader:{type:String,required:!0},hashOnCookie:{type:String,required:!0},hashOnCookiePath:{type:String,required:!0},hashOnQueryArgument:{type:String,required:!0},hashOnUriCapture:{type:String,required:!0},hashFallbackHeader:{type:String,required:!0},hashFallbackQueryArgument:{type:String,required:!0},hashFallbackUriCapture:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:algorithm","update:sticky-sessions-cookie","update:sticky-sessions-cookie-path","update:slots","update:hash-on","update:hash-fallback","update:hash-on-header","update:hash-on-cookie","update:hash-on-cookie-path","update:hash-on-query-argument","update:hash-on-uri-capture","update:hash-fallback-header","update:hash-fallback-query-argument","update:hash-fallback-uri-capture"],setup(a,{emit:E}){const{i18nT:o,i18n:{t:l}}=Z.useI18n(),{inRange:i}=fe(),y=a,p=E,B=e.ref([{label:l("upstreams.form.algorithms.round_robin_label"),value:"round-robin",selected:!1},{label:l("upstreams.form.algorithms.least_connections_label"),value:"least-connections",selected:!1},{label:l("upstreams.form.algorithms.consistent_hashing_label"),value:"consistent-hashing",selected:!1},{label:l("upstreams.form.algorithms.latency_label"),value:"latency",selected:!1},...y.stickySessionsAvailable?[{label:l("upstreams.form.algorithms.sticky_sessions_label"),value:"sticky-sessions",selected:!1}]:[]]),x=e.ref([{label:l("upstreams.form.hash_labels.none"),value:"none",selected:!1},{label:l("upstreams.form.hash_labels.consumer"),value:"consumer",selected:!1},{label:l("upstreams.form.hash_labels.ip"),value:"ip",selected:!1},{label:l("upstreams.form.hash_labels.header"),value:"header",selected:!1},{label:l("upstreams.form.hash_labels.cookie"),value:"cookie",selected:!1},{label:l("upstreams.form.hash_labels.path"),value:"path",selected:!1},{label:l("upstreams.form.hash_labels.query_argument"),value:"query_arg",selected:!1},{label:l("upstreams.form.hash_labels.uri_capture"),value:"uri_capture",selected:!1}]);e.watch(()=>y.hashOn,(b,u)=>{u==="header"&&b!==u&&p("update:hash-on-header",""),u==="cookie"&&b!==u&&(p("update:hash-on-cookie",""),p("update:hash-on-cookie-path","/")),u==="query_arg"&&b!==u&&p("update:hash-on-query-argument",""),u==="uri_capture"&&b!==u&&p("update:hash-on-uri-capture",""),(b==="cookie"||b==="none")&&(p("update:hash-fallback","none"),p("update:hash-fallback-header",""),p("update:hash-fallback-query-argument",""),p("update:hash-fallback-uri-capture",""))}),e.watch(()=>y.hashFallback,(b,u)=>{u==="header"&&b!==u&&p("update:hash-fallback-header",""),u==="cookie"&&b!==u&&(p("update:hash-on-cookie",""),p("update:hash-on-cookie-path","/")),u==="query_arg"&&b!==u&&p("update:hash-fallback-query-argument",""),u==="uri_capture"&&b!==u&&p("update:hash-fallback-uri-capture","")}),e.watch(()=>y.algorithm,b=>{b==="sticky-sessions"&&(p("update:slots","10000"),p("update:hash-on","none"),p("update:hash-fallback","none"),p("update:hash-on-header",""),p("update:hash-on-cookie",""),p("update:hash-on-cookie-path","/"),p("update:hash-on-query-argument",""),p("update:hash-on-uri-capture",""),p("update:hash-fallback-header",""),p("update:hash-fallback-query-argument",""),p("update:hash-fallback-uri-capture",""))},{immediate:!0});const s=e.computed(()=>y.hashOn==="cookie"||y.hashOn==="none"),c=e.computed(()=>y.slots?i(y.slots,Ce,_e)?"":l("upstreams.form.errors.in_range"):"");return(b,u)=>{const t=e.resolveComponent("KExternalLink"),F=e.resolveComponent("KSelect"),V=e.resolveComponent("KInput"),d=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(m.EntityFormSection),{class:"kong-ui-entities-upstreams-load-balancing",title:e.unref(l)("upstreams.form.load_balancing.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.form.load_balancing.help"))+" ",1),e.createVNode(t,{"hide-icon":"",href:e.unref(ke).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(F,{class:"algorithm-select",items:B.value,label:e.unref(l)("upstreams.form.fields.algorithm.label"),"model-value":a.algorithm,readonly:a.readonly,width:"100%","onUpdate:modelValue":u[0]||(u[0]=_=>p("update:algorithm",_))},null,8,["items","label","model-value","readonly"]),a.algorithm==="sticky-sessions"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(V,{autocomplete:"off","data-testid":"upstreams-form-sticky-sessions-cookie",label:e.unref(l)("upstreams.form.fields.sticky_sessions_cookie.label"),"label-attributes":{info:e.unref(l)("upstreams.form.fields.sticky_sessions_cookie.tooltip"),tooltipAttributes:{maxWidth:"400"}},"model-value":a.stickySessionsCookie,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[1]||(u[1]=_=>p("update:sticky-sessions-cookie",_))},null,8,["label","label-attributes","model-value","readonly"]),e.createVNode(V,{autocomplete:"off","data-testid":"upstreams-form-sticky-sessions-cookie-path",label:e.unref(l)("upstreams.form.fields.sticky_sessions_cookie_path.label"),"label-attributes":{info:e.unref(l)("upstreams.form.fields.sticky_sessions_cookie_path.tooltip"),tooltipAttributes:{maxWidth:"400"}},"model-value":a.stickySessionsCookiePath,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[2]||(u[2]=_=>p("update:sticky-sessions-cookie-path",_))},null,8,["label","label-attributes","model-value","readonly"])],64)):e.createCommentVNode("",!0),a.algorithm!=="sticky-sessions"?(e.openBlock(),e.createBlock(V,{key:1,autocomplete:"off","data-testid":"upstreams-form-slots",error:!!c.value,"error-message":c.value,help:e.unref(l)("upstreams.form.fields.slots.help"),label:e.unref(l)("upstreams.form.fields.slots.label"),max:e.unref(_e),min:e.unref(Ce),"model-value":a.slots,readonly:a.readonly,type:"number","onUpdate:modelValue":u[3]||(u[3]=_=>p("update:slots",_))},null,8,["error","error-message","help","label","max","min","model-value","readonly"])):e.createCommentVNode("",!0),a.algorithm!=="sticky-sessions"?(e.openBlock(),e.createBlock(d,{key:2},{default:e.withCtx(()=>[e.createElementVNode("h5",Vt,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_on.label")),1),e.createElementVNode("p",Nt,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_on.help")),1),e.createVNode(F,{class:"hash-on-select",items:x.value,label:e.unref(l)("upstreams.form.fields.hash_on.label"),"model-value":a.hashOn,readonly:a.readonly,width:"100%","onUpdate:modelValue":u[4]||(u[4]=_=>p("update:hash-on",_))},null,8,["items","label","model-value","readonly"]),a.hashOn==="header"?(e.openBlock(),e.createBlock(V,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-header",label:e.unref(l)("upstreams.form.fields.header.label"),"model-value":a.hashOnHeader,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[5]||(u[5]=_=>p("update:hash-on-header",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),a.hashOn==="cookie"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(V,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:e.unref(l)("upstreams.form.fields.cookie.label"),"model-value":a.hashOnCookie,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[6]||(u[6]=_=>p("update:hash-on-cookie",_))},null,8,["label","model-value","readonly"]),e.createVNode(V,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:e.unref(l)("upstreams.form.fields.cookie_path.label"),"model-value":a.hashOnCookiePath,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[7]||(u[7]=_=>p("update:hash-on-cookie-path",_))},null,8,["label","model-value","readonly"])],64)):e.createCommentVNode("",!0),a.hashOn==="query_arg"?(e.openBlock(),e.createBlock(V,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-query-argument",label:e.unref(l)("upstreams.form.fields.query_argument.label"),"model-value":a.hashOnQueryArgument,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[8]||(u[8]=_=>p("update:hash-on-query-argument",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),a.hashOn==="uri_capture"?(e.openBlock(),e.createBlock(V,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-uri-capture",label:e.unref(l)("upstreams.form.fields.uri_capture.label"),"model-value":a.hashOnUriCapture,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[9]||(u[9]=_=>p("update:hash-on-uri-capture",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),a.algorithm!=="sticky-sessions"?(e.openBlock(),e.createBlock(d,{key:3},{default:e.withCtx(()=>[e.createElementVNode("h5",xt,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_fallback.label")),1),e.createElementVNode("p",Ht,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_fallback.help")),1),e.createVNode(F,{class:"hash-fallback-select",disabled:s.value,items:x.value,label:e.unref(l)("upstreams.form.fields.hash_fallback.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},"model-value":a.hashFallback,readonly:a.readonly,width:"100%","onUpdate:modelValue":u[10]||(u[10]=_=>p("update:hash-fallback",_))},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(o),{keypath:"upstreams.form.fields.hash_fallback.tooltip",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_fallback.hash_on")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_fallback.cookie")),1)]),_:1})]),_:1},8,["disabled","items","label","model-value","readonly"]),a.hashFallback==="header"?(e.openBlock(),e.createBlock(V,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-header",label:e.unref(l)("upstreams.form.fields.header.label"),"model-value":a.hashFallbackHeader,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[11]||(u[11]=_=>p("update:hash-fallback-header",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),a.hashFallback==="cookie"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(V,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:e.unref(l)("upstreams.form.fields.cookie.label"),"model-value":a.hashOnCookie,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[12]||(u[12]=_=>p("update:hash-on-cookie",_))},null,8,["label","model-value","readonly"]),e.createVNode(V,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:e.unref(l)("upstreams.form.fields.cookie_path.label"),"model-value":a.hashOnCookiePath,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[13]||(u[13]=_=>p("update:hash-on-cookie-path",_))},null,8,["label","model-value","readonly"])],64)):e.createCommentVNode("",!0),a.hashFallback==="query_arg"?(e.openBlock(),e.createBlock(V,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-query-argument",label:e.unref(l)("upstreams.form.fields.query_argument.label"),"model-value":a.hashFallbackQueryArgument,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[14]||(u[14]=_=>p("update:hash-fallback-query-argument",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),a.hashFallback==="uri_capture"?(e.openBlock(),e.createBlock(V,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-uri-capture",label:e.unref(l)("upstreams.form.fields.uri_capture.label"),"model-value":a.hashFallbackUriCapture,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[15]||(u[15]=_=>p("update:hash-fallback-uri-capture",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["title"])}}}),[["__scopeId","data-v-656aa4f4"]]),Ut={class:"fields-group-title"},It={class:"fields-group-text"},qt={class:"fields-group-title"},Ft={class:"fields-group-text"},Et=Y(e.defineComponent({__name:"UpstreamsFormHealthChecks",props:{activeHealthSwitch:{type:Boolean,required:!0},passiveHealthSwitch:{type:Boolean,required:!0},healthchecksThreshold:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:active-health-switch","update:passive-health-switch","update:healthchecks-threshold"],setup(a,{emit:E}){const{i18n:{t:o}}=Z.useI18n(),l=E;return(i,y)=>{const p=e.resolveComponent("KExternalLink"),B=e.resolveComponent("KInputSwitch"),x=e.resolveComponent("KCard"),s=e.resolveComponent("KInput");return e.openBlock(),e.createBlock(e.unref(m.EntityFormSection),{class:"kong-ui-entities-upstreams-healthchecks",title:e.unref(o)("upstreams.form.health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.health_check.help"))+" ",1),e.createVNode(p,{"hide-icon":"",href:e.unref(ke).loadBalancing},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(x,null,{default:e.withCtx(()=>[e.createElementVNode("h5",Ut,e.toDisplayString(e.unref(o)("upstreams.form.fields.active_health_checks.label")),1),e.createElementVNode("p",It,e.toDisplayString(e.unref(o)("upstreams.form.fields.active_health_checks.help")),1),e.createVNode(B,{class:"active-health-switch","data-testid":"active-health-switch",disabled:a.readonly,"model-value":a.activeHealthSwitch,onChange:y[0]||(y[0]=c=>l("update:active-health-switch",c))},null,8,["disabled","model-value"])]),_:1}),e.createVNode(x,null,{default:e.withCtx(()=>[e.createElementVNode("h5",qt,e.toDisplayString(e.unref(o)("upstreams.form.fields.passive_health_checks.label")),1),e.createElementVNode("p",Ft,e.toDisplayString(e.unref(o)("upstreams.form.fields.passive_health_checks.help")),1),e.createVNode(B,{class:"passive-health-switch","data-testid":"passive-health-switch",disabled:a.readonly,"model-value":a.passiveHealthSwitch,onChange:y[1]||(y[1]=c=>l("update:passive-health-switch",c))},null,8,["disabled","model-value"])]),_:1}),e.createVNode(s,{autocomplete:"off","data-testid":"upstreams-form-healthchecks-threshold",label:e.unref(o)("upstreams.form.fields.healthchecks_threshold.label"),max:e.unref(at),min:e.unref(tt),"model-value":a.healthchecksThreshold,readonly:a.readonly,type:"number","onUpdate:modelValue":y[2]||(y[2]=c=>l("update:healthchecks-threshold",c))},null,8,["label","max","min","model-value","readonly"])]),_:1},8,["title"])}}}),[["__scopeId","data-v-c2ff95ff"]]),Bt={class:"fields-group-title"},Ot={class:"fields-group-text"},Dt={class:"fields-group-title"},$t={class:"fields-group-text"},Pt=Y(e.defineComponent({__name:"UpstreamsFormActiveHealthCheck",props:{config:{type:Object,required:!0},type:{type:String,required:!0},httpPath:{type:String,required:!0},timeout:{type:String,required:!0},concurrency:{type:String,required:!0},httpsSni:{type:String,required:!0},verifySsl:{type:Boolean,required:!0},headers:{type:Array,required:!0},healthyInterval:{type:String,required:!0},healthySuccesses:{type:String,required:!0},healthyHttpStatuses:{type:Array,required:!0},unhealthyInterval:{type:String,required:!0},unhealthyHttpFailures:{type:String,required:!0},unhealthyTcpFailures:{type:String,required:!0},unhealthyHttpStatuses:{type:Array,required:!0},unhealthyTimeouts:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:type","update:http-path","update:timeout","update:concurrency","update:https-sni","update:verify-ssl","update:headers","update:healthy-interval","update:healthy-successes","update:healthy-http-statuses","update:unhealthy-interval","update:unhealthy-http-failures","update:unhealthy-tcp-failures","update:unhealthy-http-statuses","update:unhealthy-timeouts"],setup(a,{emit:E}){const{i18n:{t:o}}=Z.useI18n(),{objectsAreEqual:l}=fe(),i=a,y=E,p=e.ref([{label:o("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),B=e.computed(()=>i.type==="https"||i.type==="grpcs"),x=e.computed(()=>i.type==="tcp"),{trackNewItems:s}=ne({replaceId:!0}),{trackNewItems:c}=ne({replaceId:!0});e.watch(()=>i.type,(V,d)=>{d==="tcp"&&V!==d&&y("update:unhealthy-tcp-failures","5"),(d==="https"||d==="grpcs")&&V!==d&&(y("update:https-sni",""),y("update:verify-ssl",!1)),d!=="tcp"&&V==="tcp"&&(y("update:http-path","/"),y("update:healthy-http-statuses",ce),y("update:unhealthy-http-statuses",ue))});const b=e.ref([{key:"",values:""}]);e.watch(()=>i.headers,V=>{l(b.value,V)||(b.value=[...V])},{immediate:!0,deep:!0});const u=()=>{y("update:headers",b.value)},t=()=>{b.value.push({key:"",values:""}),u()},F=V=>{V===0&&b.value.length===1?b.value[0]={key:"",values:""}:b.value.splice(V,1),u()};return(V,d)=>{const _=e.resolveComponent("KExternalLink"),M=e.resolveComponent("KSelect"),I=e.resolveComponent("KInput"),K=e.resolveComponent("KCheckbox"),P=e.resolveComponent("KLabel"),k=e.resolveComponent("KButton"),N=e.resolveComponent("KMultiselect"),T=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(m.EntityFormSection),{class:"kong-ui-entities-upstreams-active-healthcheck",title:e.unref(o)("upstreams.form.active_health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.active_health_check.help"))+" ",1),e.createVNode(_,{"hide-icon":"",href:e.unref(ke).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(M,{class:"active-healthcheck-type-select",items:p.value,label:e.unref(o)("upstreams.form.fields.active_healthcheck_type.label"),"model-value":a.type,readonly:a.readonly,width:"100%","onUpdate:modelValue":d[0]||(d[0]=f=>y("update:type",f))},null,8,["items","label","model-value","readonly"]),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(I,{key:0,autocomplete:"off","data-testid":"active-healthcheck-http-path",label:e.unref(o)("upstreams.form.fields.http_path.label"),"model-value":a.httpPath,readonly:a.readonly,type:"text","onUpdate:modelValue":d[1]||(d[1]=f=>y("update:http-path",f))},null,8,["label","model-value","readonly"])),e.createVNode(I,{autocomplete:"off","data-testid":"active-healthcheck-timeout",label:e.unref(o)("upstreams.form.fields.timeout.label"),max:e.unref(st),min:e.unref(lt),"model-value":a.timeout,readonly:a.readonly,type:"number","onUpdate:modelValue":d[2]||(d[2]=f=>y("update:timeout",f))},null,8,["label","max","min","model-value","readonly"]),e.createVNode(I,{autocomplete:"off","data-testid":"active-healthcheck-concurrency",label:e.unref(o)("upstreams.form.fields.concurrency.label"),max:e.unref(rt),min:e.unref(ot),"model-value":a.concurrency,readonly:a.readonly,type:"number","onUpdate:modelValue":d[3]||(d[3]=f=>y("update:concurrency",f))},null,8,["label","max","min","model-value","readonly"]),B.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(I,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-https-sni",label:e.unref(o)("upstreams.form.fields.https_sni.label"),"model-value":a.httpsSni,readonly:a.readonly,type:"text","onUpdate:modelValue":d[4]||(d[4]=f=>y("update:https-sni",f))},null,8,["label","model-value","readonly"]),e.createVNode(K,{"data-testid":"active-healthcheck-verify-ssl",disabled:a.readonly,label:e.unref(o)("upstreams.form.fields.verify_ssl.label"),"model-value":a.verifySsl,"onUpdate:modelValue":d[5]||(d[5]=f=>y("update:verify-ssl",f))},null,8,["disabled","label","model-value"])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createVNode(P,{info:e.unref(o)("upstreams.form.fields.headers.tooltip_active"),"tooltip-attributes":{maxWidth:"250px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.fields.headers.label")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(f,H)=>(e.openBlock(),e.createElementBlock("div",{key:`${f.header}_${H}`,class:e.normalizeClass(["headers-row",{"margin-top-6":H>0}])},[e.createVNode(I,{modelValue:b.value[H].key,"onUpdate:modelValue":$=>b.value[H].key=$,autocomplete:"off","data-testid":`active-healthcheck-headers-header-${H+1}`,readonly:a.readonly,type:"text",onBlur:u},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),e.createVNode(I,{modelValue:b.value[H].values,"onUpdate:modelValue":$=>b.value[H].values=$,autocomplete:"off","data-testid":`active-healthcheck-headers-value-${H+1}`,readonly:a.readonly,type:"text",onBlur:u},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),e.createVNode(k,{appearance:"tertiary",class:"btn-remove","data-testid":"btn-remove-header",disabled:b.value.length===1,icon:"",onClick:$=>F(H)},{default:e.withCtx(()=>[e.createVNode(e.unref(ae.TrashIcon),{class:"delete-item",color:b.value.length>1?e.unref(it):void 0},null,8,["color"])]),_:2},1032,["disabled","onClick"]),b.value&&H===b.value.length-1?(e.openBlock(),e.createBlock(k,{key:0,appearance:"tertiary",class:"btn-add-header","data-testid":"btn-add-header",icon:"",onClick:t},{default:e.withCtx(()=>[e.createVNode(e.unref(ae.AddIcon))]),_:1})):e.createCommentVNode("",!0)],2))),128))])]),e.createVNode(T,null,{default:e.withCtx(()=>[e.createElementVNode("h5",Bt,e.toDisplayString(e.unref(o)("upstreams.form.healthy.label")),1),e.createElementVNode("p",Ot,e.toDisplayString(e.unref(o)("upstreams.form.healthy.help")),1),e.createVNode(I,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-healthy-interval",help:e.unref(o)("upstreams.form.fields.interval.help"),label:e.unref(o)("upstreams.form.fields.interval.label"),max:e.unref(Te),min:e.unref(He),"model-value":a.healthyInterval,readonly:a.readonly,type:"number","onUpdate:modelValue":d[6]||(d[6]=f=>y("update:healthy-interval",f))},null,8,["help","label","max","min","model-value","readonly"]),e.createVNode(I,{autocomplete:"off","data-testid":"active-healthcheck-healthy-successes",label:e.unref(o)("upstreams.form.fields.successes.label"),max:e.unref(se),min:e.unref(le),"model-value":a.healthySuccesses,readonly:a.readonly,type:"number","onUpdate:modelValue":d[7]||(d[7]=f=>y("update:healthy-successes",f))},null,8,["label","max","min","model-value","readonly"]),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(N,{key:0,autocomplete:"off",class:"margin-top-6 active-healthcheck-healthy-http-statuses","data-testid":"active-healthcheck-healthy-http-statuses","enable-item-creation":"",items:e.unref(he),label:e.unref(o)("upstreams.form.fields.http_statuses.label"),"model-value":a.healthyHttpStatuses,readonly:a.readonly,width:"100%",onItemAdded:d[8]||(d[8]=f=>e.unref(s)(f,!0)),onItemRemoved:d[9]||(d[9]=f=>e.unref(s)(f,!1)),"onUpdate:modelValue":d[10]||(d[10]=f=>y("update:healthy-http-statuses",f))},null,8,["items","label","model-value","readonly"]))]),_:1}),e.createVNode(T,null,{default:e.withCtx(()=>[e.createElementVNode("h5",Dt,e.toDisplayString(e.unref(o)("upstreams.form.unhealthy.label")),1),e.createElementVNode("p",$t,e.toDisplayString(e.unref(o)("upstreams.form.unhealthy.help")),1),e.createVNode(I,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-unhealthy-interval",help:e.unref(o)("upstreams.form.fields.interval.help"),label:e.unref(o)("upstreams.form.fields.interval.label"),max:e.unref(Te),min:e.unref(He),"model-value":a.unhealthyInterval,readonly:a.readonly,type:"number","onUpdate:modelValue":d[11]||(d[11]=f=>y("update:unhealthy-interval",f))},null,8,["help","label","max","min","model-value","readonly"]),e.createVNode(I,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-unhealthy-tcp-failures",label:e.unref(o)("upstreams.form.fields.tcp_failures.label"),max:e.unref(se),min:e.unref(le),"model-value":a.unhealthyTcpFailures,readonly:a.readonly,type:"number","onUpdate:modelValue":d[12]||(d[12]=f=>y("update:unhealthy-tcp-failures",f))},null,8,["label","max","min","model-value","readonly"]),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(I,{key:0,autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-unhealthy-http-failures",label:e.unref(o)("upstreams.form.fields.http_failures.label"),max:e.unref(se),min:e.unref(le),"model-value":a.unhealthyHttpFailures,readonly:a.readonly,type:"number","onUpdate:modelValue":d[13]||(d[13]=f=>y("update:unhealthy-http-failures",f))},null,8,["label","max","min","model-value","readonly"])),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(N,{key:1,autocomplete:"off",class:"margin-bottom-6 active-healthcheck-unhealthy-http-statuses","data-testid":"active-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:e.unref(he),label:e.unref(o)("upstreams.form.fields.http_statuses.label"),"model-value":a.unhealthyHttpStatuses,readonly:a.readonly,width:"100%",onItemAdded:d[14]||(d[14]=f=>e.unref(c)(f,!0)),onItemRemoved:d[15]||(d[15]=f=>e.unref(c)(f,!1)),"onUpdate:modelValue":d[16]||(d[16]=f=>y("update:unhealthy-http-statuses",f))},null,8,["items","label","model-value","readonly"])),e.createVNode(I,{autocomplete:"off","data-testid":"active-healthcheck-unhealthy-timeouts",label:e.unref(o)("upstreams.form.fields.timeouts.label"),max:e.unref(xe),min:e.unref(Ne),"model-value":a.unhealthyTimeouts,readonly:a.readonly,type:"number","onUpdate:modelValue":d[17]||(d[17]=f=>y("update:unhealthy-timeouts",f))},null,8,["label","max","min","model-value","readonly"])]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-cfc70316"]]),At={class:"fields-group-title"},Mt={class:"fields-group-text"},Kt={class:"fields-group-title"},Rt={class:"fields-group-text"},jt=Y(e.defineComponent({__name:"UpstreamsFormPassiveHealthCheck",props:{type:{type:String,required:!0},healthySuccesses:{type:String,required:!0},healthyHttpStatuses:{type:Array,required:!0},unhealthyTimeouts:{type:String,required:!0},unhealthyHttpFailures:{type:String,required:!0},unhealthyHttpStatuses:{type:Array,required:!0},unhealthyTcpFailures:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:type","update:healthy-successes","update:healthy-http-statuses","update:unhealthy-timeouts","update:unhealthy-http-failures","update:unhealthy-http-statuses","update:unhealthy-tcp-failures"],setup(a,{emit:E}){const{i18n:{t:o}}=Z.useI18n(),l=a,i=E,y=e.ref([{label:o("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),p=e.computed(()=>l.type==="tcp"),{trackNewItems:B}=ne({replaceId:!0}),{trackNewItems:x}=ne({replaceId:!0});return e.watch(()=>l.type,(s,c)=>{c==="tcp"&&s!==c&&i("update:unhealthy-tcp-failures","5"),c!=="tcp"&&s==="tcp"&&(i("update:healthy-http-statuses",de),i("update:unhealthy-http-statuses",pe))}),(s,c)=>{const b=e.resolveComponent("KExternalLink"),u=e.resolveComponent("KSelect"),t=e.resolveComponent("KInput"),F=e.resolveComponent("KMultiselect"),V=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(m.EntityFormSection),{class:"kong-ui-entities-upstreams-passive-healthcheck",title:e.unref(o)("upstreams.form.passive_health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.passive_health_check.help"))+" ",1),e.createVNode(b,{"hide-icon":"",href:e.unref(ke).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(u,{class:"passive-healthcheck-type-select",items:y.value,label:e.unref(o)("upstreams.form.fields.passive_health_check_type.label"),"model-value":a.type,readonly:a.readonly,width:"100%","onUpdate:modelValue":c[0]||(c[0]=d=>i("update:type",d))},null,8,["items","label","model-value","readonly"]),e.createVNode(V,null,{default:e.withCtx(()=>[e.createElementVNode("h5",At,e.toDisplayString(e.unref(o)("upstreams.form.passive_healthy.label")),1),e.createElementVNode("p",Mt,e.toDisplayString(e.unref(o)("upstreams.form.passive_healthy.help")),1),e.createVNode(t,{autocomplete:"off","data-testid":"passive-healthcheck-healthy-successes",label:e.unref(o)("upstreams.form.fields.successes.label"),max:e.unref(se),min:e.unref(le),"model-value":a.healthySuccesses,readonly:a.readonly,type:"number","onUpdate:modelValue":c[1]||(c[1]=d=>i("update:healthy-successes",d))},null,8,["label","max","min","model-value","readonly"]),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F,{key:0,class:"margin-top-6 passive-healthcheck-healthy-http-statuses","enable-item-creation":"",items:e.unref(he),label:e.unref(o)("upstreams.form.fields.http_statuses.label"),"model-value":a.healthyHttpStatuses,readonly:a.readonly,width:"100%",onItemAdded:c[2]||(c[2]=d=>e.unref(B)(d,!0)),onItemRemoved:c[3]||(c[3]=d=>e.unref(B)(d,!1)),"onUpdate:modelValue":c[4]||(c[4]=d=>i("update:healthy-http-statuses",d))},null,8,["items","label","model-value","readonly"]))]),_:1}),e.createVNode(V,null,{default:e.withCtx(()=>[e.createElementVNode("h5",Kt,e.toDisplayString(e.unref(o)("upstreams.form.passive_unhealthy.label")),1),e.createElementVNode("p",Rt,e.toDisplayString(e.unref(o)("upstreams.form.passive_unhealthy.help")),1),e.createVNode(t,{autocomplete:"off","data-testid":"passive-healthcheck-unhealthy-timeouts",label:e.unref(o)("upstreams.form.fields.timeouts.label"),max:e.unref(xe),min:e.unref(Ne),"model-value":a.unhealthyTimeouts,readonly:a.readonly,type:"number","onUpdate:modelValue":c[5]||(c[5]=d=>i("update:unhealthy-timeouts",d))},null,8,["label","max","min","model-value","readonly"]),e.createVNode(t,{autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-unhealthy-tcp-failures",label:e.unref(o)("upstreams.form.fields.tcp_failures.label"),max:e.unref(se),min:e.unref(le),"model-value":a.unhealthyTcpFailures,readonly:a.readonly,type:"number","onUpdate:modelValue":c[6]||(c[6]=d=>i("update:unhealthy-tcp-failures",d))},null,8,["label","max","min","model-value","readonly"]),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(t,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-unhealthy-http-failures",label:e.unref(o)("upstreams.form.fields.http_failures.label"),max:e.unref(se),min:e.unref(le),"model-value":a.unhealthyHttpFailures,readonly:a.readonly,type:"number","onUpdate:modelValue":c[7]||(c[7]=d=>i("update:unhealthy-http-failures",d))},null,8,["label","max","min","model-value","readonly"])),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F,{key:1,autocomplete:"off",class:"margin-top-6 passive-healthcheck-unhealthy-http-statuses","data-testid":"passive-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:e.unref(he),label:e.unref(o)("upstreams.form.fields.http_statuses.label"),"model-value":a.unhealthyHttpStatuses,readonly:a.readonly,width:"100%",onItemAdded:c[8]||(c[8]=d=>e.unref(x)(d,!0)),onItemRemoved:c[9]||(c[9]=d=>e.unref(x)(d,!1)),"onUpdate:modelValue":c[10]||(c[10]=d=>i("update:unhealthy-http-statuses",d))},null,8,["items","label","model-value","readonly"]))]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-7c20c5c5"]]),Lt={class:"kong-ui-entities-upstreams-form"},Qt=Y(e.defineComponent({__name:"UpstreamsForm",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||(a==null?void 0:a.app)==="konnect"&&!(a!=null&&a.controlPlaneId)||(a==null?void 0:a.app)==="kongManager"&&typeof(a==null?void 0:a.workspace)!="string"||!(a!=null&&a.cancelRoute))},upstreamId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(a,{emit:E}){var D;const o=a,l=E,{inRange:i,stringToNumberArray:y,upstreamsResponseToFields:p,getDefaultUpstreamFields:B,objectsAreEqual:x,cloneDeep:s}=fe(),{axiosInstance:c}=m.useAxios((D=o.config)==null?void 0:D.axiosRequestConfig),{getMessageFromError:b}=m.useErrors(),u=we.useRouter(),t=e.reactive({fields:B(),readonly:!1,errorMessage:""}),F=e.reactive(B()),V=e.computed(()=>!x(t.fields,F)),d=h=>{t.fields.activeHealthCheck.healthy.interval=h?"5":"0",t.fields.activeHealthCheck.healthy.successes=h?"5":"0",t.fields.activeHealthCheck.healthy.httpStatuses=h?ce:[],t.fields.activeHealthCheck.unhealthy.httpStatuses=h?ue:[],t.fields.activeHealthCheck.unhealthy.httpFailures=h?"5":"0",t.fields.activeHealthCheck.unhealthy.interval=h?"5":"0",t.fields.activeHealthCheck.unhealthy.tcpFailures=h?"5":"0",t.fields.activeHealthCheck.unhealthy.timeouts=h?"5":"0",t.fields.activeHealthCheck.timeout=h?"1":"0",t.fields.activeHealthCheck.concurrency=h?"10":"0",t.fields.activeHealthCheck.httpPath=h?"/":"",t.fields.activeHealthCheck.httpsSni="",t.fields.activeHealthCheck.type="http"},_=h=>{t.fields.passiveHealthCheck.healthy.successes=h?"80":"0",t.fields.passiveHealthCheck.healthy.httpStatuses=h?de:[],t.fields.passiveHealthCheck.unhealthy.timeouts=h?"5":"0",t.fields.passiveHealthCheck.unhealthy.tcpFailures=h?"5":"0",t.fields.passiveHealthCheck.unhealthy.httpFailures=h?"5":"0",t.fields.passiveHealthCheck.unhealthy.httpStatuses=h?pe:[],t.fields.passiveHealthCheck.type="http"},M=e.computed(()=>t.fields.algorithm!=="sticky-sessions"?!0:!!t.fields.stickySessionsCookie&&!!t.fields.stickySessionsCookiePath),I=e.computed(()=>t.fields.slots?i(t.fields.slots,Ce,_e):!0),K=e.computed(()=>t.fields.hashOn==="header"?!!t.fields.hashOnHeader:!0),P=e.computed(()=>t.fields.hashOn==="cookie"||t.fields.hashFallback==="cookie"?!!t.fields.hashOnCookie:!0),k=e.computed(()=>t.fields.hashOn==="cookie"||t.fields.hashFallback==="cookie"?!!t.fields.hashOnCookiePath:!0),N=e.computed(()=>t.fields.hashOn==="query_arg"?!!t.fields.hashOnQueryArgument:!0),T=e.computed(()=>t.fields.hashOn==="uri_capture"?!!t.fields.hashOnUriCapture:!0),f=e.computed(()=>t.fields.hashFallback==="header"?!!t.fields.hashFallbackHeader:!0),H=e.computed(()=>t.fields.hashFallback==="query_arg"?!!t.fields.hashFallbackQueryArgument:!0),$=e.computed(()=>t.fields.hashFallback==="uri_capture"?!!t.fields.hashFallbackUriCapture:!0),z=e.computed(()=>!!t.fields.name&&M.value&&I.value&&K.value&&P.value&&k.value&&N.value&&T.value&&f.value&&H.value&&$.value),A=e.computed(()=>o.upstreamId?m.EntityBaseFormType.Edit:m.EntityBaseFormType.Create),X=e.computed(()=>{var h,r;return(r=ie.form[(h=o.config)==null?void 0:h.app])==null?void 0:r.edit}),U=h=>{Object.assign(t.fields,p(h)),Object.assign(F,s(t.fields))},q=()=>{var h;u.push(((h=o.config)==null?void 0:h.cancelRoute)||{name:"upstreams-list"})},R=h=>{l("loading",h)},G=h=>{l("error",h)},W=e.computed(()=>{const h=o.config.stickySessionsAvailable?{sticky_sessions_cookie:null,sticky_sessions_cookie_path:null}:{};return t.fields.algorithm==="sticky-sessions"&&(h.sticky_sessions_cookie=t.fields.stickySessionsCookie||null,h.sticky_sessions_cookie_path=t.fields.stickySessionsCookiePath||null),h}),j=e.computed(()=>{const h={};return t.fields.hashOn==="header"&&(h.hash_on_header=t.fields.hashOnHeader),(t.fields.hashOn==="cookie"||t.fields.hashFallback==="cookie")&&(h.hash_on_cookie=t.fields.hashOnCookie,h.hash_on_cookie_path=t.fields.hashOnCookiePath),t.fields.hashOn==="query_arg"&&(h.hash_on_query_arg=t.fields.hashOnQueryArgument),t.fields.hashOn==="uri_capture"&&(h.hash_on_uri_capture=t.fields.hashOnUriCapture),t.fields.hashFallback==="header"&&(h.hash_fallback_header=t.fields.hashFallbackHeader),t.fields.hashFallback==="query_arg"&&(h.hash_fallback_query_arg=t.fields.hashFallbackQueryArgument),t.fields.hashFallback==="uri_capture"&&(h.hash_fallback_uri_capture=t.fields.hashFallbackUriCapture),h}),w=e.computed(()=>{var r,n,J;if(!t.fields.activeHealthSwitch)return((r=o.config)==null?void 0:r.app)==="kongManager"&&A.value===m.EntityBaseFormType.Edit?{type:t.fields.activeHealthCheck.type,headers:{},healthy:{interval:0,successes:0},unhealthy:{interval:0,http_failures:0,tcp_failures:0,timeouts:0}}:void 0;const h={type:t.fields.activeHealthCheck.type,healthy:{interval:Number(t.fields.activeHealthCheck.healthy.interval||"0"),successes:Number(t.fields.activeHealthCheck.healthy.successes||"0")},unhealthy:{interval:Number(t.fields.activeHealthCheck.unhealthy.interval||"0"),timeouts:Number(t.fields.activeHealthCheck.unhealthy.timeouts||"0"),tcp_failures:Number(t.fields.activeHealthCheck.unhealthy.tcpFailures||"0")},timeout:Number(t.fields.activeHealthCheck.timeout||"1"),concurrency:Number(t.fields.activeHealthCheck.concurrency||"10")};if(t.fields.activeHealthCheck.type!=="tcp"){h.http_path=t.fields.activeHealthCheck.httpPath||"/",h.unhealthy.http_failures=Number(t.fields.activeHealthCheck.unhealthy.httpFailures||"5");const L=(n=t.fields.activeHealthCheck.unhealthy.httpStatuses)!=null&&n.length?t.fields.activeHealthCheck.unhealthy.httpStatuses:ue;h.unhealthy.http_statuses=y(L);const v=(J=t.fields.activeHealthCheck.healthy.httpStatuses)!=null&&J.length?t.fields.activeHealthCheck.healthy.httpStatuses:ce;h.healthy.http_statuses=y(v)}return["https","grpcs"].includes(t.fields.activeHealthCheck.type)&&(h.https_sni=t.fields.activeHealthCheck.httpsSni||null,h.https_verify_certificate=t.fields.activeHealthCheck.verifySsl),h.headers=t.fields.activeHealthCheck.headers.reduce((L,v)=>{var ee,te;return v.key?{...L,[v.key]:(te=(ee=v.values.split(","))==null?void 0:ee.map(be=>be.trim()))==null?void 0:te.filter(Boolean)}:L},{}),h}),g=e.computed(()=>{var r,n,J;if(!t.fields.passiveHealthSwitch)return((r=o.config)==null?void 0:r.app)==="kongManager"&&A.value===m.EntityBaseFormType.Edit?{type:t.fields.passiveHealthCheck.type,healthy:{successes:0},unhealthy:{timeouts:0,tcp_failures:0,http_failures:0}}:void 0;const h={type:t.fields.passiveHealthCheck.type,healthy:{successes:Number(t.fields.passiveHealthCheck.healthy.successes||"0")},unhealthy:{timeouts:Number(t.fields.passiveHealthCheck.unhealthy.timeouts||"0"),tcp_failures:Number(t.fields.passiveHealthCheck.unhealthy.tcpFailures||"5")}};if(t.fields.passiveHealthCheck.type!=="tcp"){h.unhealthy.http_failures=Number(t.fields.passiveHealthCheck.unhealthy.httpFailures||"5");const L=(n=t.fields.passiveHealthCheck.healthy.httpStatuses)!=null&&n.length?t.fields.passiveHealthCheck.healthy.httpStatuses:de;h.healthy.http_statuses=y(L);const v=(J=t.fields.passiveHealthCheck.unhealthy.httpStatuses)!=null&&J.length?t.fields.passiveHealthCheck.unhealthy.httpStatuses:pe;h.unhealthy.http_statuses=y(v)}return h}),C=e.computed(()=>{const h={name:t.fields.name,slots:Number(t.fields.slots),algorithm:t.fields.algorithm,hash_on:t.fields.hashOn,hash_fallback:t.fields.hashFallback,healthchecks:{threshold:Number(t.fields.healthchecksThreshold||"0")},host_header:t.fields.hostHeader||null,client_certificate:t.fields.clientCertificate?{id:t.fields.clientCertificate}:null},r=w.value,n=g.value,J={...h,...W.value,healthchecks:{...h.healthchecks,active:r||void 0,passive:n||void 0}};return J.tags=t.fields.tags?t.fields.tags.split(",").map(L=>String(L||"").trim()).filter(L=>L!==""):[],Object.assign(J,j.value),J}),S=h=>{var n,J,L,v,ee,te;let r=`${(n=o.config)==null?void 0:n.apiBaseUrl}${ie.form[(J=o.config)==null?void 0:J.app][h]}`;return((L=o.config)==null?void 0:L.app)==="konnect"?r=r.replace(/{controlPlaneId}/gi,((v=o.config)==null?void 0:v.controlPlaneId)||""):((ee=o.config)==null?void 0:ee.app)==="kongManager"&&(r=r.replace(/\/{workspace}/gi,(te=o.config)!=null&&te.workspace?`/${o.config.workspace}`:"")),r=r.replace(/{id}/gi,o.upstreamId),r},O=async()=>{var h;try{t.readonly=!0,await c.post(S("validate"),C.value);let r;A.value===m.EntityBaseFormType.Create?r=await c.post(S("create"),C.value):A.value===m.EntityBaseFormType.Edit&&(r=((h=o.config)==null?void 0:h.app)==="konnect"?await c.put(S("edit"),C.value):await c.patch(S("edit"),C.value)),l("update",r==null?void 0:r.data)}catch(r){t.errorMessage=b(r),l("error",r)}finally{t.readonly=!1}};return(h,r)=>(e.openBlock(),e.createElementBlock("div",Lt,[e.createVNode(e.unref(m.EntityBaseForm),{"can-submit":z.value&&V.value,config:a.config,"edit-id":a.upstreamId,"entity-type":e.unref(m.SupportedEntityType).Upstream,"error-message":t.errorMessage,"fetch-url":X.value,"form-fields":C.value,"is-readonly":t.readonly,onCancel:q,"onFetch:error":G,"onFetch:success":U,onLoading:R,onSubmit:O},{default:e.withCtx(()=>[e.createVNode(wt,{"client-certificate":t.fields.clientCertificate,"onUpdate:clientCertificate":r[0]||(r[0]=n=>t.fields.clientCertificate=n),"host-header":t.fields.hostHeader,"onUpdate:hostHeader":r[1]||(r[1]=n=>t.fields.hostHeader=n),name:t.fields.name,"onUpdate:name":r[2]||(r[2]=n=>t.fields.name=n),tags:t.fields.tags,"onUpdate:tags":r[3]||(r[3]=n=>t.fields.tags=n),config:a.config,readonly:t.readonly},null,8,["client-certificate","host-header","name","tags","config","readonly"]),e.createVNode(Tt,{algorithm:t.fields.algorithm,"onUpdate:algorithm":r[4]||(r[4]=n=>t.fields.algorithm=n),"hash-fallback":t.fields.hashFallback,"onUpdate:hashFallback":r[5]||(r[5]=n=>t.fields.hashFallback=n),"hash-fallback-header":t.fields.hashFallbackHeader,"onUpdate:hashFallbackHeader":r[6]||(r[6]=n=>t.fields.hashFallbackHeader=n),"hash-fallback-query-argument":t.fields.hashFallbackQueryArgument,"onUpdate:hashFallbackQueryArgument":r[7]||(r[7]=n=>t.fields.hashFallbackQueryArgument=n),"hash-fallback-uri-capture":t.fields.hashFallbackUriCapture,"onUpdate:hashFallbackUriCapture":r[8]||(r[8]=n=>t.fields.hashFallbackUriCapture=n),"hash-on":t.fields.hashOn,"onUpdate:hashOn":r[9]||(r[9]=n=>t.fields.hashOn=n),"hash-on-cookie":t.fields.hashOnCookie,"onUpdate:hashOnCookie":r[10]||(r[10]=n=>t.fields.hashOnCookie=n),"hash-on-cookie-path":t.fields.hashOnCookiePath,"onUpdate:hashOnCookiePath":r[11]||(r[11]=n=>t.fields.hashOnCookiePath=n),"hash-on-header":t.fields.hashOnHeader,"onUpdate:hashOnHeader":r[12]||(r[12]=n=>t.fields.hashOnHeader=n),"hash-on-query-argument":t.fields.hashOnQueryArgument,"onUpdate:hashOnQueryArgument":r[13]||(r[13]=n=>t.fields.hashOnQueryArgument=n),"hash-on-uri-capture":t.fields.hashOnUriCapture,"onUpdate:hashOnUriCapture":r[14]||(r[14]=n=>t.fields.hashOnUriCapture=n),slots:t.fields.slots,"onUpdate:slots":r[15]||(r[15]=n=>t.fields.slots=n),"sticky-sessions-cookie":t.fields.stickySessionsCookie,"onUpdate:stickySessionsCookie":r[16]||(r[16]=n=>t.fields.stickySessionsCookie=n),"sticky-sessions-cookie-path":t.fields.stickySessionsCookiePath,"onUpdate:stickySessionsCookiePath":r[17]||(r[17]=n=>t.fields.stickySessionsCookiePath=n),readonly:t.readonly,"sticky-sessions-available":a.config.stickySessionsAvailable},null,8,["algorithm","hash-fallback","hash-fallback-header","hash-fallback-query-argument","hash-fallback-uri-capture","hash-on","hash-on-cookie","hash-on-cookie-path","hash-on-header","hash-on-query-argument","hash-on-uri-capture","slots","sticky-sessions-cookie","sticky-sessions-cookie-path","readonly","sticky-sessions-available"]),e.createVNode(Et,{"active-health-switch":t.fields.activeHealthSwitch,"onUpdate:activeHealthSwitch":[r[18]||(r[18]=n=>t.fields.activeHealthSwitch=n),d],"healthchecks-threshold":t.fields.healthchecksThreshold,"onUpdate:healthchecksThreshold":r[19]||(r[19]=n=>t.fields.healthchecksThreshold=n),"passive-health-switch":t.fields.passiveHealthSwitch,"onUpdate:passiveHealthSwitch":[r[20]||(r[20]=n=>t.fields.passiveHealthSwitch=n),_],readonly:t.readonly},null,8,["active-health-switch","healthchecks-threshold","passive-health-switch","readonly"]),t.fields.activeHealthSwitch?(e.openBlock(),e.createBlock(Pt,{key:0,concurrency:t.fields.activeHealthCheck.concurrency,"onUpdate:concurrency":r[21]||(r[21]=n=>t.fields.activeHealthCheck.concurrency=n),headers:t.fields.activeHealthCheck.headers,"onUpdate:headers":r[22]||(r[22]=n=>t.fields.activeHealthCheck.headers=n),"healthy-http-statuses":t.fields.activeHealthCheck.healthy.httpStatuses,"onUpdate:healthyHttpStatuses":r[23]||(r[23]=n=>t.fields.activeHealthCheck.healthy.httpStatuses=n),"healthy-interval":t.fields.activeHealthCheck.healthy.interval,"onUpdate:healthyInterval":r[24]||(r[24]=n=>t.fields.activeHealthCheck.healthy.interval=n),"healthy-successes":t.fields.activeHealthCheck.healthy.successes,"onUpdate:healthySuccesses":r[25]||(r[25]=n=>t.fields.activeHealthCheck.healthy.successes=n),"http-path":t.fields.activeHealthCheck.httpPath,"onUpdate:httpPath":r[26]||(r[26]=n=>t.fields.activeHealthCheck.httpPath=n),"https-sni":t.fields.activeHealthCheck.httpsSni,"onUpdate:httpsSni":r[27]||(r[27]=n=>t.fields.activeHealthCheck.httpsSni=n),timeout:t.fields.activeHealthCheck.timeout,"onUpdate:timeout":r[28]||(r[28]=n=>t.fields.activeHealthCheck.timeout=n),type:t.fields.activeHealthCheck.type,"onUpdate:type":r[29]||(r[29]=n=>t.fields.activeHealthCheck.type=n),"unhealthy-http-failures":t.fields.activeHealthCheck.unhealthy.httpFailures,"onUpdate:unhealthyHttpFailures":r[30]||(r[30]=n=>t.fields.activeHealthCheck.unhealthy.httpFailures=n),"unhealthy-http-statuses":t.fields.activeHealthCheck.unhealthy.httpStatuses,"onUpdate:unhealthyHttpStatuses":r[31]||(r[31]=n=>t.fields.activeHealthCheck.unhealthy.httpStatuses=n),"unhealthy-interval":t.fields.activeHealthCheck.unhealthy.interval,"onUpdate:unhealthyInterval":r[32]||(r[32]=n=>t.fields.activeHealthCheck.unhealthy.interval=n),"unhealthy-tcp-failures":t.fields.activeHealthCheck.unhealthy.tcpFailures,"onUpdate:unhealthyTcpFailures":r[33]||(r[33]=n=>t.fields.activeHealthCheck.unhealthy.tcpFailures=n),"unhealthy-timeouts":t.fields.activeHealthCheck.unhealthy.timeouts,"onUpdate:unhealthyTimeouts":r[34]||(r[34]=n=>t.fields.activeHealthCheck.unhealthy.timeouts=n),"verify-ssl":t.fields.activeHealthCheck.verifySsl,"onUpdate:verifySsl":r[35]||(r[35]=n=>t.fields.activeHealthCheck.verifySsl=n),config:a.config,readonly:t.readonly},null,8,["concurrency","headers","healthy-http-statuses","healthy-interval","healthy-successes","http-path","https-sni","timeout","type","unhealthy-http-failures","unhealthy-http-statuses","unhealthy-interval","unhealthy-tcp-failures","unhealthy-timeouts","verify-ssl","config","readonly"])):e.createCommentVNode("",!0),t.fields.passiveHealthSwitch?(e.openBlock(),e.createBlock(jt,{key:1,"healthy-http-statuses":t.fields.passiveHealthCheck.healthy.httpStatuses,"onUpdate:healthyHttpStatuses":r[36]||(r[36]=n=>t.fields.passiveHealthCheck.healthy.httpStatuses=n),"healthy-successes":t.fields.passiveHealthCheck.healthy.successes,"onUpdate:healthySuccesses":r[37]||(r[37]=n=>t.fields.passiveHealthCheck.healthy.successes=n),type:t.fields.passiveHealthCheck.type,"onUpdate:type":r[38]||(r[38]=n=>t.fields.passiveHealthCheck.type=n),"unhealthy-http-failures":t.fields.passiveHealthCheck.unhealthy.httpFailures,"onUpdate:unhealthyHttpFailures":r[39]||(r[39]=n=>t.fields.passiveHealthCheck.unhealthy.httpFailures=n),"unhealthy-http-statuses":t.fields.passiveHealthCheck.unhealthy.httpStatuses,"onUpdate:unhealthyHttpStatuses":r[40]||(r[40]=n=>t.fields.passiveHealthCheck.unhealthy.httpStatuses=n),"unhealthy-tcp-failures":t.fields.passiveHealthCheck.unhealthy.tcpFailures,"onUpdate:unhealthyTcpFailures":r[41]||(r[41]=n=>t.fields.passiveHealthCheck.unhealthy.tcpFailures=n),"unhealthy-timeouts":t.fields.passiveHealthCheck.unhealthy.timeouts,"onUpdate:unhealthyTimeouts":r[42]||(r[42]=n=>t.fields.passiveHealthCheck.unhealthy.timeouts=n),readonly:t.readonly},null,8,["healthy-http-statuses","healthy-successes","type","unhealthy-http-failures","unhealthy-http-statuses","unhealthy-tcp-failures","unhealthy-timeouts","readonly"])):e.createCommentVNode("",!0)]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])]))}}),[["__scopeId","data-v-0d494630"]]),Wt={"data-testid":"client_certificate-plain-text"},Jt=e.defineComponent({__name:"UpstreamsConfigCard",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||a.app==="konnect"&&!a.controlPlaneId||a.app==="kongManager"&&typeof a.workspace!="string"||!a.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(a){const E=a,{i18n:{t:o},i18nT:l}=Z.useI18n(),{getPropValue:i}=m.useHelpers(),y=e.computed(()=>ie.form[E.config.app].edit),p=e.ref({id:{},name:{},created_at:{},updated_at:{},algorithm:{order:5,section:m.ConfigurationSchemaSection.Basic,tooltip:o("upstreams.form.fields.algorithm.tooltip")},slots:{order:6,section:m.ConfigurationSchemaSection.Basic},hash_on:{order:7,section:m.ConfigurationSchemaSection.Basic},hash_on_header:{order:8,section:m.ConfigurationSchemaSection.Basic},hash_on_uri_capture:{order:9,section:m.ConfigurationSchemaSection.Basic},hash_on_query_arg:{order:10,section:m.ConfigurationSchemaSection.Basic,label:`${o("upstreams.form.fields.hash_on.label")} ${o("upstreams.form.hash_labels.query_argument")}`},hash_on_cookie:{order:11,section:m.ConfigurationSchemaSection.Basic},hash_on_cookie_path:{order:12,section:m.ConfigurationSchemaSection.Basic},healthchecks:{order:13,section:m.ConfigurationSchemaSection.Basic,type:m.ConfigurationSchemaType.Json},tags:{order:14,tooltip:o("upstreams.form.hash_tooltips.tags")},hash_fallback:{order:1},hash_fallback_header:{order:2},hash_fallback_query_arg:{order:3,label:`${o("upstreams.form.fields.hash_fallback.label")} ${o("upstreams.form.hash_labels.query_argument")}`},hash_fallback_uri_capture:{order:4},host_header:{order:5},use_srv_name:{order:6},client_certificate:{order:7,tooltip:o("upstreams.form.hash_tooltips.client_certificate")}});return(B,x)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(m.EntityBaseConfigCard),{config:a.config,"config-card-doc":a.configCardDoc,"config-schema":p.value,"entity-type":e.unref(m.SupportedEntityType).Upstream,"fetch-url":y.value,"hide-title":a.hideTitle,"onFetch:error":x[0]||(x[0]=s=>B.$emit("fetch:error",s)),"onFetch:success":x[1]||(x[1]=s=>B.$emit("fetch:success",s)),onLoading:x[2]||(x[2]=s=>B.$emit("loading",s))},{"name-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.fields.name.host")),1)]),_:1})]),"hash_on-label-tooltip":e.withCtx(({row:s})=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.fields.hash_on.tooltip",scope:"global"},{result:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(s.value),1)]),_:2},1024)]),"hash_on_header-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_header.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_header.hash_on")),1)]),header:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_header.header")),1)]),_:1})]),"hash_on_uri_capture-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_uri_capture.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_uri_capture.hash_on")),1)]),uri_capture:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_uri_capture.uri_capture")),1)]),_:1})]),"hash_on_query_arg-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_query_arg.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_query_arg.hash_on")),1)]),query_arg:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_query_arg.query_arg")),1)]),_:1})]),"hash_on_cookie-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie.hash_on")),1)]),hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie.hash_fallback")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie.cookie")),1)]),_:1})]),"hash_on_cookie_path-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie_path.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_on")),1)]),hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_fallback")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie_path.cookie")),1)]),_:1})]),"slots-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.slots.text",scope:"global"},{algorithm:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.slots.algorithm")),1)]),round_robin:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.slots.round_robin")),1)]),consistent_hashing:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.slots.consistent_hashing")),1)]),min:e.withCtx(()=>x[3]||(x[3]=[e.createElementVNode("code",null,"10",-1)])),max:e.withCtx(()=>x[4]||(x[4]=[e.createElementVNode("code",null,"65536",-1)])),_:1})]),"hash_fallback-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_fallback.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback.hash_on")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback.cookie")),1)]),_:1})]),"hash_fallback_header-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_fallback_header.text",scope:"global"},{hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_header.hash_fallback")),1)]),header:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_header.header")),1)]),_:1})]),"hash_fallback_query_arg-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_fallback_query_arg.text",scope:"global"},{hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_query_arg.hash_fallback")),1)]),query_arg:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_query_arg.query_arg")),1)]),_:1})]),"hash_fallback_uri_capture-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_fallback_uri_capture.text",scope:"global"},{hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.hash_fallback")),1)]),uri_capture:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.uri_capture")),1)]),_:1})]),"host_header-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.host_header.text",scope:"global"},{host:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.host_header.host")),1)]),_:1})]),client_certificate:e.withCtx(s=>{var c;return[e.createElementVNode("div",null,[e.createElementVNode("div",Wt,[e.createElementVNode("span",null,e.toDisplayString((c=e.unref(i)("rowValue",s))==null?void 0:c.id),1)])])]}),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});Q.TargetForm=Ue,Q.TargetsList=_t,Q.UpstreamsConfigCard=Jt,Q.UpstreamsForm=Qt,Q.UpstreamsList=mt,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(Q,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/entities-shared"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/entities-shared","vue-router","@kong/icons","@kong-ui-public/i18n"],e):(Q=typeof globalThis<"u"?globalThis:Q||self,e(Q["kong-ui-entities-upstreams-targets"]={},Q.Vue,Q["kong-ui-public-entities-shared"],Q.VueRouter,Q.KongIcons,Q["kong-ui-public-i18n"]))})(this,function(Q,e,m,we,ae,Ve){"use strict";const Ye={upstreams:{list:{table_headers:{id:"ID",name:"Name",slots:"Slots",tags:"Tags"},empty_state:{title:"Configure a New Upstream",description:"Upstreams are used to load balance incoming requests."},empty_state_v2:{title:"Configure your first upstream",description:"Upstreams route traffic to multiple backend services, handling load balancing, health checks, and circuit breaking for reliability.",create_cta:"New upstream",group:"Upstreams created in gateways within this group will automatically appear here."},toolbar_actions:{new_upstream:"New upstream"}},title:"Upstreams",search:{placeholder:"Filter by exact name or ID"},actions:{create:"New upstream",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",view:"View Details"},delete:{title:"Delete an Upstream",description:"This action cannot be reversed so make sure to check upstream usage before deleting."},errors:{general:"Upstreams could not be retrieved",delete:"The upstream could not be deleted at this time.",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{errors:{name_required:"Name is required",should_be_integer:"Field should contain an integer",in_range:"Accepts an integer in the range of 10 - 65536"},general_info:{title:"General Information",help:"General information will help identify and manage this Upstream."},load_balancing:{title:"Load Balancing",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},health_check:{title:"Health Checks & Circuit Breakers",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},active_health_check:{title:"Active Health Checks",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},passive_health_check:{title:"Passive Health Checks",help:"Passive health checks, also known as circuit breakers, are checks performed based on the requests being proxied by Kong (HTTP/HTTPS/TCP), with no additional traffic being generated."},buttons:{view_documentation:"View documentation"},algorithms:{round_robin_label:"Round Robin",least_connections_label:"Least Connections",consistent_hashing_label:"Consistent Hashing",latency_label:"Latency",sticky_sessions_label:"Sticky Sessions"},hash_labels:{none:"None",consumer:"Consumer",ip:"IP",header:"Header",cookie:"Cookie",path:"Path",query_argument:"Query Argument",uri_capture:"URI Capture"},hash_tooltips:{hash_on_header:{text:"The header name to take the value from as hash input. Only required when {hash_on} is set to {header}",hash_on:"hash_on",header:"header"},hash_on_uri_capture:{text:"The name of the route URI capture to take the value from as hash input. Only required when {hash_on} is set to {uri_capture}",hash_on:"hash_on",uri_capture:"uri_capture"},hash_on_query_arg:{text:"The name of the query string argument to take the value from as hash input. Only required when {hash_on} is set to {query_arg}",hash_on:"hash_on",query_arg:"query_arg"},hash_on_cookie:{text:"The cookie name to take the value from as hash input. Only required when {hash_on} or {hash_fallback} is set to {cookie}. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response.",hash_on:"hash_on",hash_fallback:"hash_fallback",cookie:"cookie"},hash_on_cookie_path:{text:"The cookie path to set in the response headers. Only required when {hash_on} or {hash_fallback} is set to {cookie}.",hash_on:"hash_on",hash_fallback:"hash_fallback",cookie:"cookie"},slots:{text:"The number of slots in the load balancer algorithm. If {algorithm} is set to {round_robin}, this setting determines the maximum number of slots. If {algorithm} is set to {consistent_hashing}, this setting determines the actual number of slots in the algorithm. Accepts an integer in the range {min}-{max}",algorithm:"algorithm",round_robin:"round-robin",consistent_hashing:"consistent-hashing"},tags:"An optional set of strings associated with the Upstream for grouping and filtering.",hash_fallback:{text:"What to use as hashing input if the primary {hash_on} does not return a hash (eg. header is missing, or no Consumer identified). Not available if {hash_on} is set to {cookie}",hash_on:"hash_on",cookie:"cookie"},hash_fallback_header:{text:"The header name to take the value from as hash input. Only required when {hash_fallback} is set to {header}",hash_fallback:"hash_fallback",header:"header"},hash_fallback_query_arg:{text:"The name of the query string argument to take the value from as hash input. Only required when {hash_fallback} is set to {query_arg}",hash_fallback:"hash_fallback",query_arg:"query_arg"},hash_fallback_uri_capture:{text:"The name of the route URI capture to take the value from as hash input. Only required when {hash_fallback} is set to {uri_capture}",hash_fallback:"hash_fallback",uri_capture:"uri_capture"},host_header:{text:"The hostname to be used as {host} header when proxying requests through Kong.",host:"Host"},client_certificate:"If set, the certificate to be used as client certificate while TLS handshaking to the upstream server."},healthcheck_type_labels:{http:"HTTP",https:"HTTPS",tcp:"TCP",grsp:"gRPC",grsps:"gRPCs"},healthy:{label:"Healthy",help:"The counter thresholds to determine whether targets are healthy."},unhealthy:{label:"Unhealthy",help:"The counter thresholds to determine whether targets are unhealthy."},passive_healthy:{label:"Healthy",help:"The counter thresholds to determine whether targets are healthy."},passive_unhealthy:{label:"Unhealthy",help:"The counter thresholds to determine whether targets are unhealthy."},fields:{name:{label:"Name",placeholder:"Enter or select a host",tooltip:"This is a hostname, which must be equal to the {host} of a Service.",host:"host"},host_header:{label:"Host Header"},client_certificate:{label:"Client Certificate",placeholder:"Select or enter a Certificate ID",tooltip:"If set, the certificate to be used as client certificate while TLS handshaking to the upstream server."},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings associated with the Upstream for grouping and filtering."},algorithm:{label:"Algorithm",tooltip:"Which load balancing algorithm to use."},sticky_sessions_cookie:{label:"Sticky Sessions Cookie",tooltip:"The cookie name to keep sticky sessions."},sticky_sessions_cookie_path:{label:"Sticky Sessions Cookie Path",tooltip:"A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)."},slots:{label:"Slots",help:"Accepts an integer in the range of 10 - 65536"},hash_on:{label:"Hash on",help:"What to use as hashing input.",tooltip:"What to use as hashing input. Using {result} results in a weighted-round-robin scheme with no hashing."},hash_fallback:{label:"Hash Fallback",help:"What to use as hashing input if the primary hash_on does not return a hash",tooltip:"What to use as hashing input if the primary {hash_on} does not return a hash (eg. header is missing, or no Consumer identified). Not available if {hash_on} is set to {cookie}.",hash_on:"hash_on",cookie:"cookie"},active_health_checks:{label:"Active Health Checks",help:"Actively probe the targets for their health."},passive_health_checks:{label:"Passive Health Checks / Circuit Breakers",help:"Checks performed based on the requests being proxied by Kong (HTTP/HTTPS/TCP), with no additional traffic being generated."},healthchecks_threshold:{label:"Healthchecks Threshold"},header:{label:"Header"},headers:{label:"Headers",tooltip_active:"Header values can be separated by commas (value1, value2, value3)."},cookie:{label:"Cookie"},cookie_path:{label:"Cookie Path"},query_argument:{label:"Query Argument"},uri_capture:{label:"URI Capture"},active_healthcheck_type:{label:"Active Health Check Type"},http_path:{label:"HTTP Path"},timeout:{label:"Timeout"},concurrency:{label:"Concurrency"},https_sni:{label:"HTTPS SNI"},verify_ssl:{label:"Verify the SSL certificate when performing active health checks using HTTPS"},interval:{label:"Interval",help:"A value of zero indicates that active probes for healthy targets are disabled."},successes:{label:"Successes"},http_statuses:{label:"HTTP Statuses"},http_failures:{label:"HTTP Failures"},tcp_failures:{label:"TCP Failures"},timeouts:{label:"Timeouts"},passive_health_check_type:{label:"Passive Health Check Type"}}},labels:{created_at:"Created at"}},targets:{list:{table_headers:{id:"ID",target_address:"Target Address",weight:"Weight",tags:"Tags"},empty_state:{title:"Configure a New Target",description:"A target is an IP address/hostname with a port that identifies an instance of a backend service."},toolbar_actions:{new_target:"New Target"}},title:"Targets",actions:{create:"New Target",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",mark_healthy:"Mark Healthy",mark_unhealthy:"Mark Unhealthy"},delete:{title:"Delete a Target",description:"This action cannot be reversed so make sure to check target usage before deleting."},errors:{general:"Targets could not be retrieved",delete:"The target could not be deleted at this time.",copy:"Failed to copy to clipboard",weight:"Value must be in range 0 to 65535"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{create:{title:"New Target"},edit:{title:"Edit Target"},buttons:{save:"Save",cancel:"Cancel"},fields:{target:{label:"Target Address",placeholder:"Enter IP/hostname and port",tooltip:"The target address (IP or hostname) and port. If omitted the port defaults to 8000."},weight:{label:"Weight",tooltip:"The weight of this target in relation to other targets in the upstream. Value must be in range 0 to 65535, defaults to 100."},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3"}}}}};function et(){const a=Ve.createI18n("en-us",Ye);return{i18n:a,i18nT:Ve.i18nTComponent(a)}}function ne(a){const{replaceId:E=!1}=a,o=e.ref([]);return{addedItems:o,trackNewItems:(i,y)=>{if(y){const p={...i};E&&(p.value=i.label),o.value.push(p)}else o.value=o.value.filter(p=>p.value!==i.value)}}}const he=[{label:"100",value:"100"},{label:"101",value:"101"},{label:"102",value:"102"},{label:"103",value:"103"},{label:"200",value:"200"},{label:"201",value:"201"},{label:"202",value:"202"},{label:"203",value:"203"},{label:"204",value:"204"},{label:"205",value:"205"},{label:"206",value:"206"},{label:"207",value:"207"},{label:"208",value:"208"},{label:"226",value:"226"},{label:"300",value:"300"},{label:"301",value:"301"},{label:"302",value:"302"},{label:"303",value:"303"},{label:"304",value:"304"},{label:"305",value:"305"},{label:"306",value:"306"},{label:"307",value:"307"},{label:"308",value:"308"},{label:"400",value:"400"},{label:"401",value:"401"},{label:"402",value:"402"},{label:"403",value:"403"},{label:"404",value:"404"},{label:"405",value:"405"},{label:"406",value:"406"},{label:"407",value:"407"},{label:"408",value:"408"},{label:"409",value:"409"},{label:"410",value:"410"},{label:"411",value:"411"},{label:"412",value:"412"},{label:"413",value:"413"},{label:"414",value:"414"},{label:"415",value:"415"},{label:"416",value:"416"},{label:"417",value:"417"},{label:"418",value:"418"},{label:"419",value:"419"},{label:"420",value:"420"},{label:"421",value:"421"},{label:"422",value:"422"},{label:"423",value:"423"},{label:"424",value:"424"},{label:"425",value:"425"},{label:"426",value:"426"},{label:"428",value:"428"},{label:"429",value:"429"},{label:"430",value:"430"},{label:"431",value:"431"},{label:"440",value:"440"},{label:"444",value:"444"},{label:"449",value:"449"},{label:"450",value:"450"},{label:"451",value:"451"},{label:"460",value:"460"},{label:"463",value:"463"},{label:"494",value:"494"},{label:"495",value:"495"},{label:"496",value:"496"},{label:"497",value:"497"},{label:"498",value:"498"},{label:"499",value:"499"},{label:"500",value:"500"},{label:"501",value:"501"},{label:"502",value:"502"},{label:"503",value:"503"},{label:"504",value:"504"},{label:"505",value:"505"},{label:"506",value:"506"},{label:"507",value:"507"},{label:"508",value:"508"},{label:"509",value:"509"},{label:"510",value:"510"},{label:"511",value:"511"},{label:"520",value:"520"},{label:"521",value:"521"},{label:"522",value:"522"},{label:"523",value:"523"},{label:"524",value:"524"},{label:"525",value:"525"},{label:"526",value:"526"},{label:"527",value:"527"},{label:"529",value:"529"},{label:"530",value:"530"},{label:"561",value:"561"},{label:"598",value:"598"},{label:"599",value:"599"}],Ce=10,_e=65536,tt=0,at=65535,le=0,se=255,Ne=0,xe=255,lt=0,st=65535,He=0,Te=65535,ot=0,rt=2**31,ce=["200","302"],de=["200","201","202","203","204","205","206","207","208","226","300","301","302","303","304","305","306","307","308"],ue=["429","404","500","501","502","503","504","505"],pe=["429","500","503"];function fe(){const a=s=>/^\d+$/.test(s),E=(s,c,b)=>{if(a(s)){const u=Number(s);return u>=c&&u<=b}else return!1},o=s=>s.map(c=>Number(c)),l=s=>s.map(c=>c.toString()),i=s=>{var b,u,t,F,V,d,_,M,I,K,P,k,N,T,f,H,$,z,A,X,U,q,R,G,W,j,w,g,C,S,O,D,h,r,n,J,L,v,ee,te,be,Ie,qe,Fe,Ee,Be,Oe,De,$e,Pe,Ae,Me,Ke,Re,je,Le,Qe,We,Je,ze,Ge,ve,Xe,Ze;return{name:(s==null?void 0:s.name)||"",hostHeader:(s==null?void 0:s.host_header)||"",clientCertificate:((b=s==null?void 0:s.client_certificate)==null?void 0:b.id)||"",tags:((u=s==null?void 0:s.tags)==null?void 0:u.join(", "))||"",algorithm:(s==null?void 0:s.algorithm)||"round-robin",stickySessionsCookie:(s==null?void 0:s.sticky_sessions_cookie)||"",stickySessionsCookiePath:(s==null?void 0:s.sticky_sessions_cookie_path)||"/",slots:((t=s==null?void 0:s.slots)==null?void 0:t.toString())||"10000",hashOn:(s==null?void 0:s.hash_on)||"none",hashFallback:(s==null?void 0:s.hash_fallback)||"none",hashOnHeader:(s==null?void 0:s.hash_on_header)||"",hashOnCookie:(s==null?void 0:s.hash_on_cookie)||"",hashOnCookiePath:(s==null?void 0:s.hash_on_cookie_path)||"/",hashOnQueryArgument:(s==null?void 0:s.hash_on_query_arg)||"",hashOnUriCapture:(s==null?void 0:s.hash_on_uri_capture)||"",hashFallbackHeader:(s==null?void 0:s.hash_fallback_header)||"",hashFallbackQueryArgument:(s==null?void 0:s.hash_fallback_query_arg)||"",hashFallbackUriCapture:(s==null?void 0:s.hash_fallback_uri_capture)||"",activeHealthSwitch:s?((V=(F=s.healthchecks.active)==null?void 0:F.healthy)==null?void 0:V.interval)!==0||((_=(d=s.healthchecks.active)==null?void 0:d.unhealthy)==null?void 0:_.interval)!==0:!1,passiveHealthSwitch:s?((I=(M=s.healthchecks.passive)==null?void 0:M.healthy)==null?void 0:I.successes)!==0||((P=(K=s.healthchecks.passive)==null?void 0:K.unhealthy)==null?void 0:P.timeouts)!==0||((N=(k=s.healthchecks.passive)==null?void 0:k.unhealthy)==null?void 0:N.tcp_failures)!==0||((f=(T=s.healthchecks.passive)==null?void 0:T.unhealthy)==null?void 0:f.http_failures)!==0:!1,healthchecksThreshold:((H=s==null?void 0:s.healthchecks.threshold)==null?void 0:H.toString())||"0",activeHealthCheck:{type:(($=s==null?void 0:s.healthchecks.active)==null?void 0:$.type)||"http",httpPath:((z=s==null?void 0:s.healthchecks.active)==null?void 0:z.http_path)||"/",timeout:((X=(A=s==null?void 0:s.healthchecks.active)==null?void 0:A.timeout)==null?void 0:X.toString())||"1",concurrency:((q=(U=s==null?void 0:s.healthchecks.active)==null?void 0:U.concurrency)==null?void 0:q.toString())||"10",httpsSni:((R=s==null?void 0:s.healthchecks.active)==null?void 0:R.https_sni)||"",verifySsl:((G=s==null?void 0:s.healthchecks.active)==null?void 0:G.https_verify_certificate)||!1,headers:(W=s==null?void 0:s.healthchecks.active)!=null&&W.headers&&Object.entries(s.healthchecks.active.headers).length>0?Object.entries(s.healthchecks.active.headers).map(([zt,Se])=>({key:zt,values:Se==null?void 0:Se.join(", ")})):[{key:"",values:""}],healthy:{interval:((g=(w=(j=s==null?void 0:s.healthchecks.active)==null?void 0:j.healthy)==null?void 0:w.interval)==null?void 0:g.toString())||"0",successes:((O=(S=(C=s==null?void 0:s.healthchecks.active)==null?void 0:C.healthy)==null?void 0:S.successes)==null?void 0:O.toString())||"5",httpStatuses:(h=(D=s==null?void 0:s.healthchecks.active)==null?void 0:D.healthy)!=null&&h.http_statuses?l(s.healthchecks.active.healthy.http_statuses):ce},unhealthy:{interval:((J=(n=(r=s==null?void 0:s.healthchecks.active)==null?void 0:r.unhealthy)==null?void 0:n.interval)==null?void 0:J.toString())||"0",httpFailures:((ee=(v=(L=s==null?void 0:s.healthchecks.active)==null?void 0:L.unhealthy)==null?void 0:v.http_failures)==null?void 0:ee.toString())||"5",tcpFailures:((Ie=(be=(te=s==null?void 0:s.healthchecks.active)==null?void 0:te.unhealthy)==null?void 0:be.tcp_failures)==null?void 0:Ie.toString())||"5",httpStatuses:(Fe=(qe=s==null?void 0:s.healthchecks.active)==null?void 0:qe.unhealthy)!=null&&Fe.http_statuses?l(s.healthchecks.active.unhealthy.http_statuses):ue,timeouts:((Oe=(Be=(Ee=s==null?void 0:s.healthchecks.active)==null?void 0:Ee.unhealthy)==null?void 0:Be.timeouts)==null?void 0:Oe.toString())||"0"}},passiveHealthCheck:{type:((De=s==null?void 0:s.healthchecks.passive)==null?void 0:De.type)||"http",healthy:{successes:((Ae=(Pe=($e=s==null?void 0:s.healthchecks.passive)==null?void 0:$e.healthy)==null?void 0:Pe.successes)==null?void 0:Ae.toString())||"5",httpStatuses:(Ke=(Me=s==null?void 0:s.healthchecks.passive)==null?void 0:Me.healthy)!=null&&Ke.http_statuses?l(s.healthchecks.passive.healthy.http_statuses):de},unhealthy:{timeouts:((Le=(je=(Re=s==null?void 0:s.healthchecks.passive)==null?void 0:Re.unhealthy)==null?void 0:je.timeouts)==null?void 0:Le.toString())||"0",httpFailures:((Je=(We=(Qe=s==null?void 0:s.healthchecks.passive)==null?void 0:Qe.unhealthy)==null?void 0:We.http_failures)==null?void 0:Je.toString())||"5",tcpFailures:((ve=(Ge=(ze=s==null?void 0:s.healthchecks.passive)==null?void 0:ze.unhealthy)==null?void 0:Ge.tcp_failures)==null?void 0:ve.toString())||"5",httpStatuses:(Ze=(Xe=s==null?void 0:s.healthchecks.passive)==null?void 0:Xe.unhealthy)!=null&&Ze.http_statuses?l(s.healthchecks.passive.unhealthy.http_statuses):pe}}}};return{isInteger:a,inRange:E,stringToNumberArray:o,numberToStringArray:l,upstreamsResponseToFields:s=>i(s),getDefaultUpstreamFields:()=>i(),objectsAreEqual:(s,c)=>{try{return JSON.stringify(s)===JSON.stringify(c)}catch{return!1}},cloneDeep:s=>JSON.parse(JSON.stringify(s))}}const Z={useI18n:et,useMultiselectCreation:ne,useHelpers:fe},oe="/v2/control-planes/{controlPlaneId}/core-entities",re="/{workspace}",ie={list:{konnect:`${oe}/upstreams`,kongManager:`${re}/upstreams`},form:{konnect:{getServices:`${oe}/services`,getCertificates:`${oe}/certificates`,validate:`${oe}/schemas/upstreams/validate`,create:`${oe}/upstreams`,edit:`${oe}/upstreams/{id}`},kongManager:{getServices:`${re}/services`,getCertificates:`${re}/certificates`,validate:`${re}/schemas/upstreams/validate`,create:`${re}/upstreams`,edit:`${re}/upstreams/{id}`}}},it="#d60027",nt="#00abd2",ht="24px",ct={class:"kong-ui-entities-upstreams-list"},dt={class:"button-row"},ut={class:"empty-state-icon-gateway"},pt={class:"upstream-name"},ft=e.defineComponent({__name:"UpstreamsList",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||!a.createRoute||!a.getViewRoute||!a.getEditRoute||a.app==="kongManager"&&!a.isExactMatch&&!a.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success"],setup(a,{emit:E}){var w;const o=E,l=a,{i18n:{t:i}}=Z.useI18n(),y=we.useRouter(),{axiosInstance:p}=m.useAxios((w=l.config)==null?void 0:w.axiosRequestConfig),{hasRecords:B,handleStateChange:x}=m.useTableState(()=>F.value),s=e.computed(()=>B.value&&l.config.app==="konnect"),c=e.computed(()=>l.config.app!=="kongManager"||!!l.config.disableSorting),b={name:{label:i("upstreams.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},slots:{label:i("upstreams.list.table_headers.slots"),searchable:!0,sortable:!0},tags:{label:i("upstreams.list.table_headers.tags"),sortable:!1}},u=b,t=e.computed(()=>{var C,S;let g=`${l.config.apiBaseUrl}${ie.list[l.config.app]}`;return l.config.app==="konnect"?g=g.replace(/{controlPlaneId}/gi,((C=l.config)==null?void 0:C.controlPlaneId)||""):l.config.app==="kongManager"&&(g=g.replace(/\/{workspace}/gi,(S=l.config)!=null&&S.workspace?`/${l.config.workspace}`:"")),g}),F=e.ref(""),V=e.computed(()=>{const g=l.config.app==="konnect"||l.config.isExactMatch;if(g)return{isExactMatch:g,placeholder:i("upstreams.search.placeholder")};const{name:C,slots:S}=b;return{isExactMatch:g,fields:{name:C,slots:S},schema:l.config.filterSchema}}),{fetcher:d,fetcherState:_,fetcherCacheKey:M}=m.useFetcher(e.computed(()=>({...l.config,cacheIdentifier:l.cacheIdentifier})),t),I=()=>{F.value=""},K=()=>{M.value++},P=e.ref(null),k=async(g,C)=>{const S=g.id;if(!await C(S)){o("copy:error",{entity:g,field:"id",message:i("upstreams.errors.copy")});return}o("copy:success",{entity:g,field:"id",message:i("upstreams.copy.success",{val:S})})},N=async(g,C)=>{const S=JSON.stringify(g);if(!await C(S)){o("copy:error",{entity:g,message:i("upstreams.errors.copy")});return}o("copy:success",{entity:g,message:i("upstreams.copy.success_brief")})},T=async g=>{var S;await((S=l.canRetrieve)==null?void 0:S.call(l,g))&&y.push(l.config.getViewRoute(g.id))},f=g=>({label:i("upstreams.actions.view"),to:l.config.getViewRoute(g)}),H=g=>({label:i("upstreams.actions.edit"),to:l.config.getEditRoute(g)}),$=e.ref(void 0),z=e.ref(!1),A=e.ref(!1),X=e.ref(""),U=m.useDeleteUrlBuilder(l.config,t.value),q=g=>{$.value=g,z.value=!0},R=()=>{z.value=!1},G=async()=>{var g,C,S;if((g=$.value)!=null&&g.id){A.value=!0;try{await p.delete(U($.value.id)),A.value=!1,z.value=!1,M.value++,o("delete:success",$.value)}catch(O){X.value=((S=(C=O.response)==null?void 0:C.data)==null?void 0:S.message)||O.message||i("upstreams.errors.delete"),o("error",O)}finally{A.value=!1}}},W=()=>{y.push(l.config.createRoute)};e.watch(_,g=>{var C,S,O;if(g.status===m.FetcherStatus.Error){P.value={title:i("upstreams.errors.general")},(O=(S=(C=g.error)==null?void 0:C.response)==null?void 0:S.data)!=null&&O.message&&(P.value.message=g.error.response.data.message),o("error",g.error);return}P.value=null});const j=e.ref({ctaPath:l.config.createRoute,ctaText:void 0,message:`${i("upstreams.list.empty_state.description")}${l.config.additionMessageForEmptyState?` ${l.config.additionMessageForEmptyState}`:""}`,title:i("upstreams.title")});return e.onBeforeMount(async()=>{await l.canCreate()&&(j.value.title=i("upstreams.list.empty_state.title"),j.value.ctaText=i("upstreams.actions.create"))}),(g,C)=>{const S=e.resolveComponent("KButton"),O=e.resolveComponent("KDropdownItem"),D=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",ct,[e.createVNode(e.unref(m.EntityBaseTable),{"cache-identifier":a.cacheIdentifier,"disable-sorting":c.value,"empty-state-options":j.value,"enable-entity-actions":"","error-message":P.value,fetcher:e.unref(d),"fetcher-cache-key":e.unref(M),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-upstreams-list",query:F.value,"table-headers":e.unref(u),onClearSearchInput:I,"onClick:row":C[3]||(C[3]=h=>T(h)),onSort:K,onState:e.unref(x)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(m.EntityFilter),{modelValue:F.value,"onUpdate:modelValue":C[0]||(C[0]=h=>F.value=h),config:V.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!a.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",dt,[s.value?(e.openBlock(),e.createBlock(S,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"upstream-learn-more-button",icon:"",onClick:C[1]||(C[1]=h=>g.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(ae.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canCreate()},{default:e.withCtx(()=>[e.createVNode(S,{appearance:"primary","data-testid":"toolbar-add-upstream",size:a.useActionOutside?"medium":"large",to:a.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(ae.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(i)("upstreams.list.toolbar_actions.new_upstream")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),name:e.withCtx(({rowValue:h})=>[e.createElementVNode("span",pt,e.toDisplayString(h),1)]),tags:e.withCtx(({rowValue:h})=>[e.createVNode(e.unref(m.TableTags),{"tag-max-width":"auto",tags:h},null,8,["tags"])]),actions:e.withCtx(({row:h})=>[e.createVNode(D,null,{default:e.withCtx(({copyToClipboard:r})=>[e.createVNode(O,{"data-testid":"action-entity-copy-id",onClick:n=>k(h,r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("upstreams.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(D,null,{default:e.withCtx(({copyToClipboard:r})=>[e.createVNode(O,{"data-testid":"action-entity-copy-json",onClick:n=>N(h,r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("upstreams.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canRetrieve(h)},{default:e.withCtx(()=>[e.createVNode(O,{"data-testid":"action-entity-view","has-divider":"",item:f(h.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canEdit(h)},{default:e.withCtx(()=>[e.createVNode(O,{"data-testid":"action-entity-edit",item:H(h.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canDelete(h)},{default:e.withCtx(()=>[e.createVNode(O,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:r=>q(h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("upstreams.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!F.value&&a.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var h;return[e.createVNode(e.unref(m.EntityEmptyState),{"action-button-text":e.unref(i)("upstreams.list.empty_state_v2.create_cta"),appearance:"secondary","can-create":()=>a.canCreate(),"data-testid":"upstreams-entity-empty-state",description:e.unref(i)("upstreams.list.empty_state_v2.description"),"learn-more":a.config.app==="konnect",title:e.unref(i)("upstreams.list.empty_state_v2.title"),"onClick:create":W,"onClick:learnMore":C[2]||(C[2]=r=>g.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",ut,[e.createVNode(e.unref(ae.CloudUploadIcon),{color:e.unref(nt),size:e.unref(ht)},null,8,["color","size"])])]),_:2},[(h=a.config)!=null&&h.isControlPlaneGroup?{name:"message",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("upstreams.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"0"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(m.EntityDeleteModal),{"action-pending":A.value,description:e.unref(i)("upstreams.delete.description"),"entity-name":$.value&&($.value.name||$.value.id),"entity-type":e.unref(m.EntityTypes).Upstream,error:X.value,title:e.unref(i)("upstreams.delete.title"),visible:z.value,onCancel:R,onProceed:G},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Y=(a,E)=>{const o=a.__vccOpts||a;for(const[l,i]of E)o[l]=i;return o},mt=Y(ft,[["__scopeId","data-v-4c6ace20"]]),me="/v2/control-planes/{controlPlaneId}/core-entities",ye="/{workspace}",ge={list:{konnect:`${me}/upstreams/{upstreamId}/targets`,kongManager:`${ye}/upstreams/{upstreamId}/targets`},form:{konnect:{create:`${me}/upstreams/{upstreamId}/targets`,edit:`${me}/upstreams/{upstreamId}/targets/{id}`,validate:`${me}/v1/schemas/json/target/validate`},kongManager:{create:`${ye}/upstreams/{upstreamId}/targets`,edit:`${ye}/upstreams/{upstreamId}/targets/{id}`,validate:`${ye}/schemas/targets/validate`}}},yt={class:"kong-ui-entities-target-form"},gt={class:"target-form-container"},kt={key:0,class:"target-form-info"},Ue=Y(e.defineComponent({__name:"TargetForm",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||a.app==="konnect"&&!a.controlPlaneId||a.app==="kongManager"&&typeof a.workspace!="string"||!a.upstreamId)},isVisible:{type:Boolean,required:!0,default:!1},targetId:{type:String,required:!1,default:""}},emits:["update","error","loading","cancel"],setup(a,{emit:E}){var P;const o=E,l=a,{i18n:{t:i}}=Z.useI18n(),{getMessageFromError:y}=m.useErrors(),{axiosInstance:p}=m.useAxios((P=l.config)==null?void 0:P.axiosRequestConfig),B=e.computed(()=>{var k;return ge.form[l.config.app].edit.replace(/{upstreamId}/gi,((k=l.config)==null?void 0:k.upstreamId)||"")}),x=e.computed(()=>l.targetId?m.EntityBaseFormType.Edit:m.EntityBaseFormType.Create),s=e.computed(()=>x.value===m.EntityBaseFormType.Edit?i("targets.form.edit.title"):i("targets.form.create.title")),c=e.reactive({fields:{target:"",weight:100,tags:""},isReadonly:!1,errorMessage:""}),b=e.reactive({target:"",weight:100,tags:""}),u={target:"",weight:100,tags:""},t=e.computed(()=>{const k=parseInt(c.fields.weight.toString(),10);return k<0||k>65535}),F=e.computed(()=>JSON.stringify(c.fields)!==JSON.stringify(b)&&!!c.fields.target&&!!c.fields.weight&&!t.value),V=k=>{var N;c.fields.target=(k==null?void 0:k.target)||"",c.fields.weight=(k==null?void 0:k.weight)??"",c.fields.tags=((N=k==null?void 0:k.tags)==null?void 0:N.join(", "))||"",Object.assign(b,c.fields)},d=()=>{c.errorMessage="",o("cancel")},_=e.computed(()=>{var N,T;let k=`${l.config.apiBaseUrl}${ge.form[l.config.app].validate}`;return l.config.app==="konnect"?k=k.replace(/{controlPlaneId}/gi,((N=l.config)==null?void 0:N.controlPlaneId)||""):l.config.app==="kongManager"&&(k=k.replace(/\/{workspace}/gi,(T=l.config)!=null&&T.workspace?`/${l.config.workspace}`:"")),k=k.replace(/{id}/gi,l.targetId),k}),M=e.computed(()=>{var N,T,f,H;let k=`${l.config.apiBaseUrl}${ge.form[l.config.app][x.value]}`;return l.config.app==="konnect"?k=k.replace(/{controlPlaneId}/gi,((N=l.config)==null?void 0:N.controlPlaneId)||"").replace(/{upstreamId}/gi,((T=l.config)==null?void 0:T.upstreamId)||""):l.config.app==="kongManager"&&(k=k.replace(/\/{workspace}/gi,(f=l.config)!=null&&f.workspace?`/${l.config.workspace}`:"").replace(/{upstreamId}/gi,((H=l.config)==null?void 0:H.upstreamId)||"")),k=k.replace(/{id}/gi,l.targetId),k}),I=e.computed(()=>{var k,N,T;return{target:c.fields.target,weight:parseInt(c.fields.weight),tags:(T=(N=(k=c.fields.tags)==null?void 0:k.split(","))==null?void 0:N.map(f=>String(f||"").trim()))==null?void 0:T.filter(f=>f!==""),upstream:{id:l.config.upstreamId}}}),K=async()=>{var k,N;try{c.isReadonly=!0,c.errorMessage="";let T;if(await p.post(_.value,I.value),x.value==="create"?T=await p.post(M.value,I.value):x.value==="edit"&&(T=((k=l.config)==null?void 0:k.app)==="konnect"?await p.put(M.value,I.value):await p.patch(M.value,I.value)),T){const{data:f}=T;c.fields.target=(f==null?void 0:f.name)||"",c.fields.weight=(f==null?void 0:f.weight)??100,c.fields.tags=((N=f==null?void 0:f.tags)==null?void 0:N.join(", "))||"",o("update",f),Object.assign(c.fields,u)}}catch(T){c.errorMessage=y(T),o("error",T)}finally{c.isReadonly=!1}};return e.watch(()=>l.targetId,()=>{Object.assign(c.fields,u)}),(k,N)=>{const T=e.resolveComponent("KInput"),f=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(f,{"action-button-disabled":!F.value||c.isReadonly,"action-button-text":e.unref(i)("targets.form.buttons.save"),"cancel-button-text":e.unref(i)("targets.form.buttons.cancel"),title:s.value,visible:a.isVisible,onCancel:d,onProceed:K},{default:e.withCtx(()=>[e.createElementVNode("div",yt,[e.createVNode(e.unref(m.EntityBaseForm),{config:a.config,"edit-id":a.targetId,"entity-type":e.unref(m.SupportedEntityType).Target,"error-message":c.errorMessage,"fetch-url":B.value,"form-fields":I.value,"is-readonly":c.isReadonly,onCancel:d,"onFetch:error":N[3]||(N[3]=H=>k.$emit("error",H)),"onFetch:success":V,onLoading:N[4]||(N[4]=H=>k.$emit("loading",H))},{default:e.withCtx(()=>[e.createElementVNode("div",gt,[k.$slots.info?(e.openBlock(),e.createElementBlock("div",kt,[e.renderSlot(k.$slots,"info",{},void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(T,{modelValue:c.fields.target,"onUpdate:modelValue":N[0]||(N[0]=H=>c.fields.target=H),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-target",label:e.unref(i)("targets.form.fields.target.label"),"label-attributes":{info:e.unref(i)("targets.form.fields.target.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(i)("targets.form.fields.target.placeholder"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),e.createVNode(T,{modelValue:c.fields.weight,"onUpdate:modelValue":N[1]||(N[1]=H=>c.fields.weight=H),autocomplete:"off",class:"target-form-input","data-testid":"target-form-weight",error:t.value,"error-message":e.unref(i)("targets.errors.weight"),label:e.unref(i)("targets.form.fields.weight.label"),"label-attributes":{info:e.unref(i)("targets.form.fields.weight.tooltip"),tooltipAttributes:{maxWidth:"400"}},max:"65535",min:"0",readonly:c.isReadonly,required:"",type:"number"},null,8,["modelValue","error","error-message","label","label-attributes","readonly"]),e.createVNode(T,{modelValue:c.fields.tags,"onUpdate:modelValue":N[2]||(N[2]=H=>c.fields.tags=H),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-tags",help:e.unref(i)("targets.form.fields.tags.help"),label:e.unref(i)("targets.form.fields.tags.label"),placeholder:e.unref(i)("targets.form.fields.tags.placeholder"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","help","label","placeholder","readonly"])])]),_:3},8,["config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])]),_:3},8,["action-button-disabled","action-button-text","cancel-button-text","title","visible"])}}}),[["__scopeId","data-v-b5bbee74"]]),bt={class:"kong-ui-entities-targets-list"},Ct={class:"target-address"},_t=Y(e.defineComponent({__name:"TargetsList",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||!a.upstreamId||a.app==="kongManager"&&(typeof a.canMarkHealthy>"u"||typeof a.canMarkUnhealthy>"u"))},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success","health-actions:healthy","health-actions:unhealthy","create:target","update:target"],setup(a,{emit:E}){var j;const o=E,l=a,{i18n:{t:i}}=Z.useI18n(),{axiosInstance:y}=m.useAxios((j=l.config)==null?void 0:j.axiosRequestConfig),p=e.computed(()=>l.config.app!=="kongManager"||!!l.config.disableSorting),x={target:{label:i("targets.list.table_headers.target_address"),sortable:!0,hidable:!1},weight:{label:i("targets.list.table_headers.weight"),sortable:!0},tags:{label:i("targets.list.table_headers.tags"),sortable:!1}},s=e.computed(()=>{var g,C,S,O;let w=`${l.config.apiBaseUrl}${ge.list[l.config.app]}`;return l.config.app==="konnect"?w=w.replace(/{controlPlaneId}/gi,((g=l.config)==null?void 0:g.controlPlaneId)||"").replace(/{upstreamId}/gi,((C=l.config)==null?void 0:C.upstreamId)||""):l.config.app==="kongManager"&&(w=w.replace(/\/{workspace}/gi,(S=l.config)!=null&&S.workspace?`/${l.config.workspace}`:"").replace(/{upstreamId}/gi,((O=l.config)==null?void 0:O.upstreamId)||"")),w}),{fetcher:c,fetcherState:b,fetcherCacheKey:u}=m.useFetcher(e.computed(()=>({...l.config,cacheIdentifier:l.cacheIdentifier})),s),t=()=>{u.value++},F=e.ref(null),V=()=>{q.value=!0},d=async(w,g)=>{const C=w.id;if(!await g(C)){o("copy:error",{entity:w,field:"id",message:i("targets.errors.copy")});return}o("copy:success",{entity:w,field:"id",message:i("targets.copy.success",{val:C})})},_=async(w,g)=>{const C=JSON.stringify(w);if(!await g(C)){o("copy:error",{entity:w,message:i("targets.errors.copy")});return}o("copy:success",{entity:w,message:i("targets.copy.success_brief")})},M=w=>{U.value=w,q.value=!0},I=w=>l.config.app==="konnect"?!1:l.config.canMarkHealthy(w),K=w=>l.config.app==="konnect"?!1:l.config.canMarkUnhealthy(w),P=e.ref(void 0),k=e.ref(!1),N=e.ref(!1),T=e.ref(""),f=m.useDeleteUrlBuilder(l.config,s.value),H=w=>{P.value=w,k.value=!0},$=()=>{k.value=!1},z=async()=>{var w,g,C;if((w=P.value)!=null&&w.id){N.value=!0;try{await y.delete(f(P.value.id)),N.value=!1,k.value=!1,u.value++,o("delete:success",P.value)}catch(S){T.value=((C=(g=S.response)==null?void 0:g.data)==null?void 0:C.message)||S.message||i("targets.errors.delete"),o("error",S)}finally{N.value=!1}}};e.watch(b,w=>{var g,C,S;if(w.status===m.FetcherStatus.Error){F.value={title:i("targets.errors.general")},(S=(C=(g=w.error)==null?void 0:g.response)==null?void 0:C.data)!=null&&S.message&&(F.value.message=w.error.response.data.message),o("error",w.error);return}F.value=null});const A=e.ref({ctaText:void 0,message:`${i("targets.list.empty_state.description")}${l.config.additionMessageForEmptyState?` ${l.config.additionMessageForEmptyState}`:""}`,title:i("targets.title"),...l.config.createRoute&&{ctaPath:l.config.createRoute}});e.onBeforeMount(async()=>{await l.canCreate()&&(A.value.title=i("targets.list.empty_state.title"),A.value.ctaText=i("targets.actions.create"))});const X=e.computed(()=>({app:l.config.app,apiBaseUrl:l.config.apiBaseUrl,upstreamId:l.config.upstreamId,axiosRequestConfig:l.config.axiosRequestConfig,...l.config.app==="konnect"&&{controlPlaneId:l.config.controlPlaneId},...l.config.app==="kongManager"&&{workspace:l.config.workspace}})),U=e.ref(""),q=e.ref(!1),R=w=>{U.value?o("update:target",w):o("create:target",w),G()},G=()=>{W(),u.value++},W=()=>{q.value=!1,U.value=""};return(w,g)=>{const C=e.resolveComponent("KButton"),S=e.resolveComponent("KDropdownItem"),O=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",bt,[e.createVNode(e.unref(m.EntityBaseTable),{"cache-identifier":a.cacheIdentifier,"disable-sorting":p.value,"empty-state-options":A.value,"enable-entity-actions":"","error-message":F.value,fetcher:e.unref(c),"fetcher-cache-key":e.unref(u),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-targets-list","table-headers":e.unref(x),onEmptyStateCtaClicked:g[1]||(g[1]=()=>l.config.createRoute?void 0:V()),onSort:t},{"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!a.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canCreate()},{default:e.withCtx(()=>[e.createVNode(C,{appearance:"primary","data-testid":"toolbar-new-target",size:a.useActionOutside?"medium":"large",to:l.config.createRoute?l.config.createRoute:void 0,onClick:g[0]||(g[0]=()=>l.config.createRoute?void 0:V())},{default:e.withCtx(()=>[e.createVNode(e.unref(ae.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(i)("targets.list.toolbar_actions.new_target")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])],8,["disabled"]))]),target:e.withCtx(({rowValue:D})=>[e.createElementVNode("span",Ct,e.toDisplayString(D),1)]),tags:e.withCtx(({rowValue:D})=>[e.createVNode(e.unref(m.TableTags),{"tag-max-width":"auto",tags:D},null,8,["tags"])]),actions:e.withCtx(({row:D})=>[e.createVNode(O,null,{default:e.withCtx(({copyToClipboard:h})=>[e.createVNode(S,{"data-testid":"action-entity-copy-id",onClick:r=>d(D,h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(O,null,{default:e.withCtx(({copyToClipboard:h})=>[e.createVNode(S,{"data-testid":"action-entity-copy-json",onClick:r=>_(D,h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canEdit(D)},{default:e.withCtx(()=>[e.createVNode(S,{"data-testid":"action-entity-edit","has-divider":"",onClick:h=>M(D.id)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.edit")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>I(D)},{default:e.withCtx(()=>[e.createVNode(S,{"data-testid":"action-target-mark-healthy",onClick:h=>o("health-actions:healthy",D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.mark_healthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>K(D)},{default:e.withCtx(()=>[e.createVNode(S,{"data-testid":"action-target-mark-unhealthy",onClick:h=>o("health-actions:unhealthy",D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.mark_unhealthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canDelete(D)},{default:e.withCtx(()=>[e.createVNode(S,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:h=>H(D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","table-headers"]),e.createVNode(e.unref(m.EntityDeleteModal),{"action-pending":N.value,description:e.unref(i)("targets.delete.description"),"entity-type":e.unref(m.EntityTypes).Target,error:T.value,"need-confirm":!1,title:e.unref(i)("targets.delete.title"),visible:k.value,onCancel:$,onProceed:z},null,8,["action-pending","description","entity-type","error","title","visible"]),e.createVNode(Ue,{config:X.value,"is-visible":q.value,"target-id":U.value,onCancel:W,onUpdate:R},e.createSlots({_:2},[w.$slots["form-info"]?{name:"info",fn:e.withCtx(()=>[e.renderSlot(w.$slots,"form-info",{},void 0,!0)]),key:"0"}:void 0]),1032,["config","is-visible","target-id"])])}}}),[["__scopeId","data-v-47084451"]]),St={key:1},wt=Y(e.defineComponent({__name:"UpstreamsFormGeneralInfo",props:{config:{type:Object,required:!0},name:{type:String,required:!0},hostHeader:{type:String,required:!0},clientCertificate:{type:String,required:!0},tags:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:name","update:host-header","update:client-certificate","update:tags"],setup(a,{emit:E}){var $,z,A,X;const{i18nT:o,i18n:{t:l}}=Z.useI18n(),i=a,y=E,{debouncedQueryChange:p,loading:B,loadItems:x,results:s,allRecords:c}=m.useDebouncedFilter(i.config,(z=ie.form[($=i.config)==null?void 0:$.app])==null?void 0:z.getServices,"",{fetchedItemsKey:"data",searchKeys:["host"]}),{debouncedQueryChange:b,loading:u,loadItems:t,results:F}=m.useDebouncedFilter(i.config,(X=ie.form[(A=i.config)==null?void 0:A.app])==null?void 0:X.getCertificates),V=e.ref(""),d=e.computed(()=>{var U;return!!i.name&&!((U=c.value)!=null&&U.some(q=>q.host===i.name))}),_=e.computed(()=>{var q,R,G;const U=d.value&&i.name.includes((q=V.value)==null?void 0:q.toLowerCase());return(G=s.value)==null?void 0:G.map(W=>({label:W.host,value:W.id})).concat(U?[{label:i.name,value:((R=K.value)==null?void 0:R.value)||i.name}]:[])}),M=e.computed(()=>{var U;return(U=F.value)==null?void 0:U.map(q=>({label:q.id,value:q.id}))}),I=e.ref(""),K=e.ref({value:"",label:""}),P=e.computed(()=>{var U,q;return((U=_.value.find(R=>R.value===I.value))==null?void 0:U.label)||((q=K.value)==null?void 0:q.label)}),k=U=>{V.value=U,p(U)},N=U=>{K.value=U},T=()=>{K.value={value:"",label:""}},f=U=>{I.value=U,y("update:name",P.value)},H=e.ref(!1);return e.onBeforeMount(async()=>{var U,q;try{H.value=!0,await x(),i.name&&(I.value=((q=(U=_.value.find(R=>R.label===i.name))==null?void 0:U.value)==null?void 0:q.toString())||i.name),await t()}finally{H.value=!1}}),(U,q)=>{const R=e.resolveComponent("KSkeleton"),G=e.resolveComponent("KSelect"),W=e.resolveComponent("KInput");return e.openBlock(),e.createBlock(e.unref(m.EntityFormSection),{class:"kong-ui-entities-upstreams-general-info",description:e.unref(l)("upstreams.form.general_info.help"),title:e.unref(l)("upstreams.form.general_info.title")},{default:e.withCtx(()=>[H.value?(e.openBlock(),e.createBlock(R,{key:0,type:"form"})):(e.openBlock(),e.createElementBlock("div",St,[e.createVNode(G,{class:"name-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-name","enable-filtering":"","enable-item-creation":"","filter-function":()=>!0,items:_.value,label:e.unref(l)("upstreams.form.fields.name.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},loading:e.unref(B),"model-value":I.value,placeholder:e.unref(l)("upstreams.form.fields.name.placeholder"),readonly:a.readonly,required:"",width:"100%",onItemAdded:N,onItemRemoved:T,onQueryChange:k,"onUpdate:modelValue":f},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(o),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("upstreams.form.fields.name.host")),1)]),_:1})]),_:1},8,["items","label","loading","model-value","placeholder","readonly","onUpdate:modelValue"]),e.createVNode(W,{autocomplete:"off",class:"margin-bottom-6","data-testid":"upstreams-form-host-header",label:e.unref(l)("upstreams.form.fields.host_header.label"),"model-value":a.hostHeader,readonly:a.readonly,type:"text","onUpdate:modelValue":q[0]||(q[0]=j=>y("update:host-header",j))},null,8,["label","model-value","readonly"]),e.createVNode(G,{class:"certificate-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-client-certificate","enable-filtering":"","filter-function":()=>!0,items:M.value,label:e.unref(l)("upstreams.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(l)("upstreams.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},loading:e.unref(u),"model-value":a.clientCertificate,placeholder:e.unref(l)("upstreams.form.fields.client_certificate.placeholder"),readonly:a.readonly,width:"100%",onQueryChange:e.unref(b),"onUpdate:modelValue":q[1]||(q[1]=j=>y("update:client-certificate",j))},null,8,["items","label","label-attributes","loading","model-value","placeholder","readonly","onQueryChange"]),e.createVNode(W,{autocomplete:"off","data-testid":"upstreams-form-tags",help:e.unref(l)("upstreams.form.fields.tags.help"),label:e.unref(l)("upstreams.form.fields.tags.label"),"label-attributes":{info:e.unref(l)("upstreams.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},"model-value":a.tags,placeholder:e.unref(l)("upstreams.form.fields.tags.placeholder"),readonly:a.readonly,type:"text","onUpdate:modelValue":q[2]||(q[2]=j=>y("update:tags",j))},null,8,["help","label","label-attributes","model-value","placeholder","readonly"])]))]),_:1},8,["description","title"])}}}),[["__scopeId","data-v-1a71740c"]]),ke={upstreamObject:"https://developer.konghq.com/gateway/entities/upstream/",loadBalancing:"https://developer.konghq.com/gateway/traffic-control/load-balancing-reference/"},Vt={class:"fields-group-title"},Nt={class:"fields-group-text"},xt={class:"fields-group-title"},Ht={class:"fields-group-text"},Tt=Y(e.defineComponent({__name:"UpstreamsFormLoadBalancing",props:{stickySessionsAvailable:{type:Boolean,required:!1,default:!1},algorithm:{type:String,required:!0},stickySessionsCookie:{type:String,required:!0},stickySessionsCookiePath:{type:String,required:!0},slots:{type:String,required:!0},hashOn:{type:String,required:!0},hashFallback:{type:String,required:!0},hashOnHeader:{type:String,required:!0},hashOnCookie:{type:String,required:!0},hashOnCookiePath:{type:String,required:!0},hashOnQueryArgument:{type:String,required:!0},hashOnUriCapture:{type:String,required:!0},hashFallbackHeader:{type:String,required:!0},hashFallbackQueryArgument:{type:String,required:!0},hashFallbackUriCapture:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:algorithm","update:sticky-sessions-cookie","update:sticky-sessions-cookie-path","update:slots","update:hash-on","update:hash-fallback","update:hash-on-header","update:hash-on-cookie","update:hash-on-cookie-path","update:hash-on-query-argument","update:hash-on-uri-capture","update:hash-fallback-header","update:hash-fallback-query-argument","update:hash-fallback-uri-capture"],setup(a,{emit:E}){const{i18nT:o,i18n:{t:l}}=Z.useI18n(),{inRange:i}=fe(),y=a,p=E,B=e.ref([{label:l("upstreams.form.algorithms.round_robin_label"),value:"round-robin",selected:!1},{label:l("upstreams.form.algorithms.least_connections_label"),value:"least-connections",selected:!1},{label:l("upstreams.form.algorithms.consistent_hashing_label"),value:"consistent-hashing",selected:!1},{label:l("upstreams.form.algorithms.latency_label"),value:"latency",selected:!1},...y.stickySessionsAvailable?[{label:l("upstreams.form.algorithms.sticky_sessions_label"),value:"sticky-sessions",selected:!1}]:[]]),x=e.ref([{label:l("upstreams.form.hash_labels.none"),value:"none",selected:!1},{label:l("upstreams.form.hash_labels.consumer"),value:"consumer",selected:!1},{label:l("upstreams.form.hash_labels.ip"),value:"ip",selected:!1},{label:l("upstreams.form.hash_labels.header"),value:"header",selected:!1},{label:l("upstreams.form.hash_labels.cookie"),value:"cookie",selected:!1},{label:l("upstreams.form.hash_labels.path"),value:"path",selected:!1},{label:l("upstreams.form.hash_labels.query_argument"),value:"query_arg",selected:!1},{label:l("upstreams.form.hash_labels.uri_capture"),value:"uri_capture",selected:!1}]);e.watch(()=>y.hashOn,(b,u)=>{u==="header"&&b!==u&&p("update:hash-on-header",""),u==="cookie"&&b!==u&&(p("update:hash-on-cookie",""),p("update:hash-on-cookie-path","/")),u==="query_arg"&&b!==u&&p("update:hash-on-query-argument",""),u==="uri_capture"&&b!==u&&p("update:hash-on-uri-capture",""),(b==="cookie"||b==="none")&&(p("update:hash-fallback","none"),p("update:hash-fallback-header",""),p("update:hash-fallback-query-argument",""),p("update:hash-fallback-uri-capture",""))}),e.watch(()=>y.hashFallback,(b,u)=>{u==="header"&&b!==u&&p("update:hash-fallback-header",""),u==="cookie"&&b!==u&&(p("update:hash-on-cookie",""),p("update:hash-on-cookie-path","/")),u==="query_arg"&&b!==u&&p("update:hash-fallback-query-argument",""),u==="uri_capture"&&b!==u&&p("update:hash-fallback-uri-capture","")}),e.watch(()=>y.algorithm,b=>{b==="sticky-sessions"&&(p("update:slots","10000"),p("update:hash-on","none"),p("update:hash-fallback","none"),p("update:hash-on-header",""),p("update:hash-on-cookie",""),p("update:hash-on-cookie-path","/"),p("update:hash-on-query-argument",""),p("update:hash-on-uri-capture",""),p("update:hash-fallback-header",""),p("update:hash-fallback-query-argument",""),p("update:hash-fallback-uri-capture",""))},{immediate:!0});const s=e.computed(()=>y.hashOn==="cookie"||y.hashOn==="none"),c=e.computed(()=>y.slots?i(y.slots,Ce,_e)?"":l("upstreams.form.errors.in_range"):"");return(b,u)=>{const t=e.resolveComponent("KExternalLink"),F=e.resolveComponent("KSelect"),V=e.resolveComponent("KInput"),d=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(m.EntityFormSection),{class:"kong-ui-entities-upstreams-load-balancing",title:e.unref(l)("upstreams.form.load_balancing.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.form.load_balancing.help"))+" ",1),e.createVNode(t,{"hide-icon":"",href:e.unref(ke).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(F,{class:"algorithm-select",items:B.value,label:e.unref(l)("upstreams.form.fields.algorithm.label"),"model-value":a.algorithm,readonly:a.readonly,width:"100%","onUpdate:modelValue":u[0]||(u[0]=_=>p("update:algorithm",_))},null,8,["items","label","model-value","readonly"]),a.algorithm==="sticky-sessions"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(V,{autocomplete:"off","data-testid":"upstreams-form-sticky-sessions-cookie",label:e.unref(l)("upstreams.form.fields.sticky_sessions_cookie.label"),"label-attributes":{info:e.unref(l)("upstreams.form.fields.sticky_sessions_cookie.tooltip"),tooltipAttributes:{maxWidth:"400"}},"model-value":a.stickySessionsCookie,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[1]||(u[1]=_=>p("update:sticky-sessions-cookie",_))},null,8,["label","label-attributes","model-value","readonly"]),e.createVNode(V,{autocomplete:"off","data-testid":"upstreams-form-sticky-sessions-cookie-path",label:e.unref(l)("upstreams.form.fields.sticky_sessions_cookie_path.label"),"label-attributes":{info:e.unref(l)("upstreams.form.fields.sticky_sessions_cookie_path.tooltip"),tooltipAttributes:{maxWidth:"400"}},"model-value":a.stickySessionsCookiePath,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[2]||(u[2]=_=>p("update:sticky-sessions-cookie-path",_))},null,8,["label","label-attributes","model-value","readonly"])],64)):e.createCommentVNode("",!0),a.algorithm!=="sticky-sessions"?(e.openBlock(),e.createBlock(V,{key:1,autocomplete:"off","data-testid":"upstreams-form-slots",error:!!c.value,"error-message":c.value,help:e.unref(l)("upstreams.form.fields.slots.help"),label:e.unref(l)("upstreams.form.fields.slots.label"),max:e.unref(_e),min:e.unref(Ce),"model-value":a.slots,readonly:a.readonly,type:"number","onUpdate:modelValue":u[3]||(u[3]=_=>p("update:slots",_))},null,8,["error","error-message","help","label","max","min","model-value","readonly"])):e.createCommentVNode("",!0),a.algorithm!=="sticky-sessions"?(e.openBlock(),e.createBlock(d,{key:2},{default:e.withCtx(()=>[e.createElementVNode("h5",Vt,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_on.label")),1),e.createElementVNode("p",Nt,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_on.help")),1),e.createVNode(F,{class:"hash-on-select",items:x.value,label:e.unref(l)("upstreams.form.fields.hash_on.label"),"model-value":a.hashOn,readonly:a.readonly,width:"100%","onUpdate:modelValue":u[4]||(u[4]=_=>p("update:hash-on",_))},null,8,["items","label","model-value","readonly"]),a.hashOn==="header"?(e.openBlock(),e.createBlock(V,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-header",label:e.unref(l)("upstreams.form.fields.header.label"),"model-value":a.hashOnHeader,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[5]||(u[5]=_=>p("update:hash-on-header",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),a.hashOn==="cookie"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(V,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:e.unref(l)("upstreams.form.fields.cookie.label"),"model-value":a.hashOnCookie,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[6]||(u[6]=_=>p("update:hash-on-cookie",_))},null,8,["label","model-value","readonly"]),e.createVNode(V,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:e.unref(l)("upstreams.form.fields.cookie_path.label"),"model-value":a.hashOnCookiePath,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[7]||(u[7]=_=>p("update:hash-on-cookie-path",_))},null,8,["label","model-value","readonly"])],64)):e.createCommentVNode("",!0),a.hashOn==="query_arg"?(e.openBlock(),e.createBlock(V,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-query-argument",label:e.unref(l)("upstreams.form.fields.query_argument.label"),"model-value":a.hashOnQueryArgument,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[8]||(u[8]=_=>p("update:hash-on-query-argument",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),a.hashOn==="uri_capture"?(e.openBlock(),e.createBlock(V,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-uri-capture",label:e.unref(l)("upstreams.form.fields.uri_capture.label"),"model-value":a.hashOnUriCapture,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[9]||(u[9]=_=>p("update:hash-on-uri-capture",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),a.algorithm!=="sticky-sessions"?(e.openBlock(),e.createBlock(d,{key:3},{default:e.withCtx(()=>[e.createElementVNode("h5",xt,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_fallback.label")),1),e.createElementVNode("p",Ht,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_fallback.help")),1),e.createVNode(F,{class:"hash-fallback-select",disabled:s.value,items:x.value,label:e.unref(l)("upstreams.form.fields.hash_fallback.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},"model-value":a.hashFallback,readonly:a.readonly,width:"100%","onUpdate:modelValue":u[10]||(u[10]=_=>p("update:hash-fallback",_))},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(o),{keypath:"upstreams.form.fields.hash_fallback.tooltip",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_fallback.hash_on")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_fallback.cookie")),1)]),_:1})]),_:1},8,["disabled","items","label","model-value","readonly"]),a.hashFallback==="header"?(e.openBlock(),e.createBlock(V,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-header",label:e.unref(l)("upstreams.form.fields.header.label"),"model-value":a.hashFallbackHeader,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[11]||(u[11]=_=>p("update:hash-fallback-header",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),a.hashFallback==="cookie"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(V,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:e.unref(l)("upstreams.form.fields.cookie.label"),"model-value":a.hashOnCookie,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[12]||(u[12]=_=>p("update:hash-on-cookie",_))},null,8,["label","model-value","readonly"]),e.createVNode(V,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:e.unref(l)("upstreams.form.fields.cookie_path.label"),"model-value":a.hashOnCookiePath,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[13]||(u[13]=_=>p("update:hash-on-cookie-path",_))},null,8,["label","model-value","readonly"])],64)):e.createCommentVNode("",!0),a.hashFallback==="query_arg"?(e.openBlock(),e.createBlock(V,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-query-argument",label:e.unref(l)("upstreams.form.fields.query_argument.label"),"model-value":a.hashFallbackQueryArgument,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[14]||(u[14]=_=>p("update:hash-fallback-query-argument",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),a.hashFallback==="uri_capture"?(e.openBlock(),e.createBlock(V,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-uri-capture",label:e.unref(l)("upstreams.form.fields.uri_capture.label"),"model-value":a.hashFallbackUriCapture,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[15]||(u[15]=_=>p("update:hash-fallback-uri-capture",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["title"])}}}),[["__scopeId","data-v-656aa4f4"]]),Ut={class:"fields-group-title"},It={class:"fields-group-text"},qt={class:"fields-group-title"},Ft={class:"fields-group-text"},Et=Y(e.defineComponent({__name:"UpstreamsFormHealthChecks",props:{activeHealthSwitch:{type:Boolean,required:!0},passiveHealthSwitch:{type:Boolean,required:!0},healthchecksThreshold:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:active-health-switch","update:passive-health-switch","update:healthchecks-threshold"],setup(a,{emit:E}){const{i18n:{t:o}}=Z.useI18n(),l=E;return(i,y)=>{const p=e.resolveComponent("KExternalLink"),B=e.resolveComponent("KInputSwitch"),x=e.resolveComponent("KCard"),s=e.resolveComponent("KInput");return e.openBlock(),e.createBlock(e.unref(m.EntityFormSection),{class:"kong-ui-entities-upstreams-healthchecks",title:e.unref(o)("upstreams.form.health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.health_check.help"))+" ",1),e.createVNode(p,{"hide-icon":"",href:e.unref(ke).loadBalancing},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(x,null,{default:e.withCtx(()=>[e.createElementVNode("h5",Ut,e.toDisplayString(e.unref(o)("upstreams.form.fields.active_health_checks.label")),1),e.createElementVNode("p",It,e.toDisplayString(e.unref(o)("upstreams.form.fields.active_health_checks.help")),1),e.createVNode(B,{class:"active-health-switch","data-testid":"active-health-switch",disabled:a.readonly,"model-value":a.activeHealthSwitch,onChange:y[0]||(y[0]=c=>l("update:active-health-switch",c))},null,8,["disabled","model-value"])]),_:1}),e.createVNode(x,null,{default:e.withCtx(()=>[e.createElementVNode("h5",qt,e.toDisplayString(e.unref(o)("upstreams.form.fields.passive_health_checks.label")),1),e.createElementVNode("p",Ft,e.toDisplayString(e.unref(o)("upstreams.form.fields.passive_health_checks.help")),1),e.createVNode(B,{class:"passive-health-switch","data-testid":"passive-health-switch",disabled:a.readonly,"model-value":a.passiveHealthSwitch,onChange:y[1]||(y[1]=c=>l("update:passive-health-switch",c))},null,8,["disabled","model-value"])]),_:1}),e.createVNode(s,{autocomplete:"off","data-testid":"upstreams-form-healthchecks-threshold",label:e.unref(o)("upstreams.form.fields.healthchecks_threshold.label"),max:e.unref(at),min:e.unref(tt),"model-value":a.healthchecksThreshold,readonly:a.readonly,type:"number","onUpdate:modelValue":y[2]||(y[2]=c=>l("update:healthchecks-threshold",c))},null,8,["label","max","min","model-value","readonly"])]),_:1},8,["title"])}}}),[["__scopeId","data-v-c2ff95ff"]]),Bt={class:"fields-group-title"},Ot={class:"fields-group-text"},Dt={class:"fields-group-title"},$t={class:"fields-group-text"},Pt=Y(e.defineComponent({__name:"UpstreamsFormActiveHealthCheck",props:{config:{type:Object,required:!0},type:{type:String,required:!0},httpPath:{type:String,required:!0},timeout:{type:String,required:!0},concurrency:{type:String,required:!0},httpsSni:{type:String,required:!0},verifySsl:{type:Boolean,required:!0},headers:{type:Array,required:!0},healthyInterval:{type:String,required:!0},healthySuccesses:{type:String,required:!0},healthyHttpStatuses:{type:Array,required:!0},unhealthyInterval:{type:String,required:!0},unhealthyHttpFailures:{type:String,required:!0},unhealthyTcpFailures:{type:String,required:!0},unhealthyHttpStatuses:{type:Array,required:!0},unhealthyTimeouts:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:type","update:http-path","update:timeout","update:concurrency","update:https-sni","update:verify-ssl","update:headers","update:healthy-interval","update:healthy-successes","update:healthy-http-statuses","update:unhealthy-interval","update:unhealthy-http-failures","update:unhealthy-tcp-failures","update:unhealthy-http-statuses","update:unhealthy-timeouts"],setup(a,{emit:E}){const{i18n:{t:o}}=Z.useI18n(),{objectsAreEqual:l}=fe(),i=a,y=E,p=e.ref([{label:o("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),B=e.computed(()=>i.type==="https"||i.type==="grpcs"),x=e.computed(()=>i.type==="tcp"),{trackNewItems:s}=ne({replaceId:!0}),{trackNewItems:c}=ne({replaceId:!0});e.watch(()=>i.type,(V,d)=>{d==="tcp"&&V!==d&&y("update:unhealthy-tcp-failures","5"),(d==="https"||d==="grpcs")&&V!==d&&(y("update:https-sni",""),y("update:verify-ssl",!1)),d!=="tcp"&&V==="tcp"&&(y("update:http-path","/"),y("update:healthy-http-statuses",ce),y("update:unhealthy-http-statuses",ue))});const b=e.ref([{key:"",values:""}]);e.watch(()=>i.headers,V=>{l(b.value,V)||(b.value=[...V])},{immediate:!0,deep:!0});const u=()=>{y("update:headers",b.value)},t=()=>{b.value.push({key:"",values:""}),u()},F=V=>{V===0&&b.value.length===1?b.value[0]={key:"",values:""}:b.value.splice(V,1),u()};return(V,d)=>{const _=e.resolveComponent("KExternalLink"),M=e.resolveComponent("KSelect"),I=e.resolveComponent("KInput"),K=e.resolveComponent("KCheckbox"),P=e.resolveComponent("KLabel"),k=e.resolveComponent("KButton"),N=e.resolveComponent("KMultiselect"),T=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(m.EntityFormSection),{class:"kong-ui-entities-upstreams-active-healthcheck",title:e.unref(o)("upstreams.form.active_health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.active_health_check.help"))+" ",1),e.createVNode(_,{"hide-icon":"",href:e.unref(ke).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(M,{class:"active-healthcheck-type-select",items:p.value,label:e.unref(o)("upstreams.form.fields.active_healthcheck_type.label"),"model-value":a.type,readonly:a.readonly,width:"100%","onUpdate:modelValue":d[0]||(d[0]=f=>y("update:type",f))},null,8,["items","label","model-value","readonly"]),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(I,{key:0,autocomplete:"off","data-testid":"active-healthcheck-http-path",label:e.unref(o)("upstreams.form.fields.http_path.label"),"model-value":a.httpPath,readonly:a.readonly,type:"text","onUpdate:modelValue":d[1]||(d[1]=f=>y("update:http-path",f))},null,8,["label","model-value","readonly"])),e.createVNode(I,{autocomplete:"off","data-testid":"active-healthcheck-timeout",label:e.unref(o)("upstreams.form.fields.timeout.label"),max:e.unref(st),min:e.unref(lt),"model-value":a.timeout,readonly:a.readonly,type:"number","onUpdate:modelValue":d[2]||(d[2]=f=>y("update:timeout",f))},null,8,["label","max","min","model-value","readonly"]),e.createVNode(I,{autocomplete:"off","data-testid":"active-healthcheck-concurrency",label:e.unref(o)("upstreams.form.fields.concurrency.label"),max:e.unref(rt),min:e.unref(ot),"model-value":a.concurrency,readonly:a.readonly,type:"number","onUpdate:modelValue":d[3]||(d[3]=f=>y("update:concurrency",f))},null,8,["label","max","min","model-value","readonly"]),B.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(I,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-https-sni",label:e.unref(o)("upstreams.form.fields.https_sni.label"),"model-value":a.httpsSni,readonly:a.readonly,type:"text","onUpdate:modelValue":d[4]||(d[4]=f=>y("update:https-sni",f))},null,8,["label","model-value","readonly"]),e.createVNode(K,{"data-testid":"active-healthcheck-verify-ssl",disabled:a.readonly,label:e.unref(o)("upstreams.form.fields.verify_ssl.label"),"model-value":a.verifySsl,"onUpdate:modelValue":d[5]||(d[5]=f=>y("update:verify-ssl",f))},null,8,["disabled","label","model-value"])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createVNode(P,{info:e.unref(o)("upstreams.form.fields.headers.tooltip_active"),"tooltip-attributes":{maxWidth:"250px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.fields.headers.label")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(f,H)=>(e.openBlock(),e.createElementBlock("div",{key:`${f.header}_${H}`,class:e.normalizeClass(["headers-row",{"margin-top-6":H>0}])},[e.createVNode(I,{modelValue:b.value[H].key,"onUpdate:modelValue":$=>b.value[H].key=$,autocomplete:"off","data-testid":`active-healthcheck-headers-header-${H+1}`,readonly:a.readonly,type:"text",onBlur:u},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),e.createVNode(I,{modelValue:b.value[H].values,"onUpdate:modelValue":$=>b.value[H].values=$,autocomplete:"off","data-testid":`active-healthcheck-headers-value-${H+1}`,readonly:a.readonly,type:"text",onBlur:u},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),e.createVNode(k,{appearance:"tertiary",class:"btn-remove","data-testid":"btn-remove-header",disabled:b.value.length===1,icon:"",onClick:$=>F(H)},{default:e.withCtx(()=>[e.createVNode(e.unref(ae.TrashIcon),{class:"delete-item",color:b.value.length>1?e.unref(it):void 0},null,8,["color"])]),_:2},1032,["disabled","onClick"]),b.value&&H===b.value.length-1?(e.openBlock(),e.createBlock(k,{key:0,appearance:"tertiary",class:"btn-add-header","data-testid":"btn-add-header",icon:"",onClick:t},{default:e.withCtx(()=>[e.createVNode(e.unref(ae.AddIcon))]),_:1})):e.createCommentVNode("",!0)],2))),128))])]),e.createVNode(T,null,{default:e.withCtx(()=>[e.createElementVNode("h5",Bt,e.toDisplayString(e.unref(o)("upstreams.form.healthy.label")),1),e.createElementVNode("p",Ot,e.toDisplayString(e.unref(o)("upstreams.form.healthy.help")),1),e.createVNode(I,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-healthy-interval",help:e.unref(o)("upstreams.form.fields.interval.help"),label:e.unref(o)("upstreams.form.fields.interval.label"),max:e.unref(Te),min:e.unref(He),"model-value":a.healthyInterval,readonly:a.readonly,type:"number","onUpdate:modelValue":d[6]||(d[6]=f=>y("update:healthy-interval",f))},null,8,["help","label","max","min","model-value","readonly"]),e.createVNode(I,{autocomplete:"off","data-testid":"active-healthcheck-healthy-successes",label:e.unref(o)("upstreams.form.fields.successes.label"),max:e.unref(se),min:e.unref(le),"model-value":a.healthySuccesses,readonly:a.readonly,type:"number","onUpdate:modelValue":d[7]||(d[7]=f=>y("update:healthy-successes",f))},null,8,["label","max","min","model-value","readonly"]),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(N,{key:0,autocomplete:"off",class:"margin-top-6 active-healthcheck-healthy-http-statuses","data-testid":"active-healthcheck-healthy-http-statuses","enable-item-creation":"",items:e.unref(he),label:e.unref(o)("upstreams.form.fields.http_statuses.label"),"model-value":a.healthyHttpStatuses,readonly:a.readonly,width:"100%",onItemAdded:d[8]||(d[8]=f=>e.unref(s)(f,!0)),onItemRemoved:d[9]||(d[9]=f=>e.unref(s)(f,!1)),"onUpdate:modelValue":d[10]||(d[10]=f=>y("update:healthy-http-statuses",f))},null,8,["items","label","model-value","readonly"]))]),_:1}),e.createVNode(T,null,{default:e.withCtx(()=>[e.createElementVNode("h5",Dt,e.toDisplayString(e.unref(o)("upstreams.form.unhealthy.label")),1),e.createElementVNode("p",$t,e.toDisplayString(e.unref(o)("upstreams.form.unhealthy.help")),1),e.createVNode(I,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-unhealthy-interval",help:e.unref(o)("upstreams.form.fields.interval.help"),label:e.unref(o)("upstreams.form.fields.interval.label"),max:e.unref(Te),min:e.unref(He),"model-value":a.unhealthyInterval,readonly:a.readonly,type:"number","onUpdate:modelValue":d[11]||(d[11]=f=>y("update:unhealthy-interval",f))},null,8,["help","label","max","min","model-value","readonly"]),e.createVNode(I,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-unhealthy-tcp-failures",label:e.unref(o)("upstreams.form.fields.tcp_failures.label"),max:e.unref(se),min:e.unref(le),"model-value":a.unhealthyTcpFailures,readonly:a.readonly,type:"number","onUpdate:modelValue":d[12]||(d[12]=f=>y("update:unhealthy-tcp-failures",f))},null,8,["label","max","min","model-value","readonly"]),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(I,{key:0,autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-unhealthy-http-failures",label:e.unref(o)("upstreams.form.fields.http_failures.label"),max:e.unref(se),min:e.unref(le),"model-value":a.unhealthyHttpFailures,readonly:a.readonly,type:"number","onUpdate:modelValue":d[13]||(d[13]=f=>y("update:unhealthy-http-failures",f))},null,8,["label","max","min","model-value","readonly"])),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(N,{key:1,autocomplete:"off",class:"margin-bottom-6 active-healthcheck-unhealthy-http-statuses","data-testid":"active-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:e.unref(he),label:e.unref(o)("upstreams.form.fields.http_statuses.label"),"model-value":a.unhealthyHttpStatuses,readonly:a.readonly,width:"100%",onItemAdded:d[14]||(d[14]=f=>e.unref(c)(f,!0)),onItemRemoved:d[15]||(d[15]=f=>e.unref(c)(f,!1)),"onUpdate:modelValue":d[16]||(d[16]=f=>y("update:unhealthy-http-statuses",f))},null,8,["items","label","model-value","readonly"])),e.createVNode(I,{autocomplete:"off","data-testid":"active-healthcheck-unhealthy-timeouts",label:e.unref(o)("upstreams.form.fields.timeouts.label"),max:e.unref(xe),min:e.unref(Ne),"model-value":a.unhealthyTimeouts,readonly:a.readonly,type:"number","onUpdate:modelValue":d[17]||(d[17]=f=>y("update:unhealthy-timeouts",f))},null,8,["label","max","min","model-value","readonly"])]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-cfc70316"]]),At={class:"fields-group-title"},Mt={class:"fields-group-text"},Kt={class:"fields-group-title"},Rt={class:"fields-group-text"},jt=Y(e.defineComponent({__name:"UpstreamsFormPassiveHealthCheck",props:{type:{type:String,required:!0},healthySuccesses:{type:String,required:!0},healthyHttpStatuses:{type:Array,required:!0},unhealthyTimeouts:{type:String,required:!0},unhealthyHttpFailures:{type:String,required:!0},unhealthyHttpStatuses:{type:Array,required:!0},unhealthyTcpFailures:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:type","update:healthy-successes","update:healthy-http-statuses","update:unhealthy-timeouts","update:unhealthy-http-failures","update:unhealthy-http-statuses","update:unhealthy-tcp-failures"],setup(a,{emit:E}){const{i18n:{t:o}}=Z.useI18n(),l=a,i=E,y=e.ref([{label:o("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),p=e.computed(()=>l.type==="tcp"),{trackNewItems:B}=ne({replaceId:!0}),{trackNewItems:x}=ne({replaceId:!0});return e.watch(()=>l.type,(s,c)=>{c==="tcp"&&s!==c&&i("update:unhealthy-tcp-failures","5"),c!=="tcp"&&s==="tcp"&&(i("update:healthy-http-statuses",de),i("update:unhealthy-http-statuses",pe))}),(s,c)=>{const b=e.resolveComponent("KExternalLink"),u=e.resolveComponent("KSelect"),t=e.resolveComponent("KInput"),F=e.resolveComponent("KMultiselect"),V=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(m.EntityFormSection),{class:"kong-ui-entities-upstreams-passive-healthcheck",title:e.unref(o)("upstreams.form.passive_health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.passive_health_check.help"))+" ",1),e.createVNode(b,{"hide-icon":"",href:e.unref(ke).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(u,{class:"passive-healthcheck-type-select",items:y.value,label:e.unref(o)("upstreams.form.fields.passive_health_check_type.label"),"model-value":a.type,readonly:a.readonly,width:"100%","onUpdate:modelValue":c[0]||(c[0]=d=>i("update:type",d))},null,8,["items","label","model-value","readonly"]),e.createVNode(V,null,{default:e.withCtx(()=>[e.createElementVNode("h5",At,e.toDisplayString(e.unref(o)("upstreams.form.passive_healthy.label")),1),e.createElementVNode("p",Mt,e.toDisplayString(e.unref(o)("upstreams.form.passive_healthy.help")),1),e.createVNode(t,{autocomplete:"off","data-testid":"passive-healthcheck-healthy-successes",label:e.unref(o)("upstreams.form.fields.successes.label"),max:e.unref(se),min:e.unref(le),"model-value":a.healthySuccesses,readonly:a.readonly,type:"number","onUpdate:modelValue":c[1]||(c[1]=d=>i("update:healthy-successes",d))},null,8,["label","max","min","model-value","readonly"]),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F,{key:0,class:"margin-top-6 passive-healthcheck-healthy-http-statuses","enable-item-creation":"",items:e.unref(he),label:e.unref(o)("upstreams.form.fields.http_statuses.label"),"model-value":a.healthyHttpStatuses,readonly:a.readonly,width:"100%",onItemAdded:c[2]||(c[2]=d=>e.unref(B)(d,!0)),onItemRemoved:c[3]||(c[3]=d=>e.unref(B)(d,!1)),"onUpdate:modelValue":c[4]||(c[4]=d=>i("update:healthy-http-statuses",d))},null,8,["items","label","model-value","readonly"]))]),_:1}),e.createVNode(V,null,{default:e.withCtx(()=>[e.createElementVNode("h5",Kt,e.toDisplayString(e.unref(o)("upstreams.form.passive_unhealthy.label")),1),e.createElementVNode("p",Rt,e.toDisplayString(e.unref(o)("upstreams.form.passive_unhealthy.help")),1),e.createVNode(t,{autocomplete:"off","data-testid":"passive-healthcheck-unhealthy-timeouts",label:e.unref(o)("upstreams.form.fields.timeouts.label"),max:e.unref(xe),min:e.unref(Ne),"model-value":a.unhealthyTimeouts,readonly:a.readonly,type:"number","onUpdate:modelValue":c[5]||(c[5]=d=>i("update:unhealthy-timeouts",d))},null,8,["label","max","min","model-value","readonly"]),e.createVNode(t,{autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-unhealthy-tcp-failures",label:e.unref(o)("upstreams.form.fields.tcp_failures.label"),max:e.unref(se),min:e.unref(le),"model-value":a.unhealthyTcpFailures,readonly:a.readonly,type:"number","onUpdate:modelValue":c[6]||(c[6]=d=>i("update:unhealthy-tcp-failures",d))},null,8,["label","max","min","model-value","readonly"]),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(t,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-unhealthy-http-failures",label:e.unref(o)("upstreams.form.fields.http_failures.label"),max:e.unref(se),min:e.unref(le),"model-value":a.unhealthyHttpFailures,readonly:a.readonly,type:"number","onUpdate:modelValue":c[7]||(c[7]=d=>i("update:unhealthy-http-failures",d))},null,8,["label","max","min","model-value","readonly"])),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F,{key:1,autocomplete:"off",class:"margin-top-6 passive-healthcheck-unhealthy-http-statuses","data-testid":"passive-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:e.unref(he),label:e.unref(o)("upstreams.form.fields.http_statuses.label"),"model-value":a.unhealthyHttpStatuses,readonly:a.readonly,width:"100%",onItemAdded:c[8]||(c[8]=d=>e.unref(x)(d,!0)),onItemRemoved:c[9]||(c[9]=d=>e.unref(x)(d,!1)),"onUpdate:modelValue":c[10]||(c[10]=d=>i("update:unhealthy-http-statuses",d))},null,8,["items","label","model-value","readonly"]))]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-7c20c5c5"]]),Lt={class:"kong-ui-entities-upstreams-form"},Qt=Y(e.defineComponent({__name:"UpstreamsForm",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||(a==null?void 0:a.app)==="konnect"&&!(a!=null&&a.controlPlaneId)||(a==null?void 0:a.app)==="kongManager"&&typeof(a==null?void 0:a.workspace)!="string"||!(a!=null&&a.cancelRoute))},upstreamId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(a,{emit:E}){var D;const o=a,l=E,{inRange:i,stringToNumberArray:y,upstreamsResponseToFields:p,getDefaultUpstreamFields:B,objectsAreEqual:x,cloneDeep:s}=fe(),{axiosInstance:c}=m.useAxios((D=o.config)==null?void 0:D.axiosRequestConfig),{getMessageFromError:b}=m.useErrors(),u=we.useRouter(),t=e.reactive({fields:B(),readonly:!1,errorMessage:""}),F=e.reactive(B()),V=e.computed(()=>!x(t.fields,F)),d=h=>{t.fields.activeHealthCheck.healthy.interval=h?"5":"0",t.fields.activeHealthCheck.healthy.successes=h?"5":"0",t.fields.activeHealthCheck.healthy.httpStatuses=h?ce:[],t.fields.activeHealthCheck.unhealthy.httpStatuses=h?ue:[],t.fields.activeHealthCheck.unhealthy.httpFailures=h?"5":"0",t.fields.activeHealthCheck.unhealthy.interval=h?"5":"0",t.fields.activeHealthCheck.unhealthy.tcpFailures=h?"5":"0",t.fields.activeHealthCheck.unhealthy.timeouts=h?"5":"0",t.fields.activeHealthCheck.timeout=h?"1":"0",t.fields.activeHealthCheck.concurrency=h?"10":"0",t.fields.activeHealthCheck.httpPath=h?"/":"",t.fields.activeHealthCheck.httpsSni="",t.fields.activeHealthCheck.type="http"},_=h=>{t.fields.passiveHealthCheck.healthy.successes=h?"80":"0",t.fields.passiveHealthCheck.healthy.httpStatuses=h?de:[],t.fields.passiveHealthCheck.unhealthy.timeouts=h?"5":"0",t.fields.passiveHealthCheck.unhealthy.tcpFailures=h?"5":"0",t.fields.passiveHealthCheck.unhealthy.httpFailures=h?"5":"0",t.fields.passiveHealthCheck.unhealthy.httpStatuses=h?pe:[],t.fields.passiveHealthCheck.type="http"},M=e.computed(()=>t.fields.algorithm!=="sticky-sessions"?!0:!!t.fields.stickySessionsCookie&&!!t.fields.stickySessionsCookiePath),I=e.computed(()=>t.fields.slots?i(t.fields.slots,Ce,_e):!0),K=e.computed(()=>t.fields.hashOn==="header"?!!t.fields.hashOnHeader:!0),P=e.computed(()=>t.fields.hashOn==="cookie"||t.fields.hashFallback==="cookie"?!!t.fields.hashOnCookie:!0),k=e.computed(()=>t.fields.hashOn==="cookie"||t.fields.hashFallback==="cookie"?!!t.fields.hashOnCookiePath:!0),N=e.computed(()=>t.fields.hashOn==="query_arg"?!!t.fields.hashOnQueryArgument:!0),T=e.computed(()=>t.fields.hashOn==="uri_capture"?!!t.fields.hashOnUriCapture:!0),f=e.computed(()=>t.fields.hashFallback==="header"?!!t.fields.hashFallbackHeader:!0),H=e.computed(()=>t.fields.hashFallback==="query_arg"?!!t.fields.hashFallbackQueryArgument:!0),$=e.computed(()=>t.fields.hashFallback==="uri_capture"?!!t.fields.hashFallbackUriCapture:!0),z=e.computed(()=>!!t.fields.name&&M.value&&I.value&&K.value&&P.value&&k.value&&N.value&&T.value&&f.value&&H.value&&$.value),A=e.computed(()=>o.upstreamId?m.EntityBaseFormType.Edit:m.EntityBaseFormType.Create),X=e.computed(()=>{var h,r;return(r=ie.form[(h=o.config)==null?void 0:h.app])==null?void 0:r.edit}),U=h=>{Object.assign(t.fields,p(h)),Object.assign(F,s(t.fields))},q=()=>{var h;u.push(((h=o.config)==null?void 0:h.cancelRoute)||{name:"upstreams-list"})},R=h=>{l("loading",h)},G=h=>{l("error",h)},W=e.computed(()=>{const h=o.config.stickySessionsAvailable?{sticky_sessions_cookie:null,sticky_sessions_cookie_path:null}:{};return t.fields.algorithm==="sticky-sessions"&&(h.sticky_sessions_cookie=t.fields.stickySessionsCookie||null,h.sticky_sessions_cookie_path=t.fields.stickySessionsCookiePath||null),h}),j=e.computed(()=>{const h={};return t.fields.hashOn==="header"&&(h.hash_on_header=t.fields.hashOnHeader),(t.fields.hashOn==="cookie"||t.fields.hashFallback==="cookie")&&(h.hash_on_cookie=t.fields.hashOnCookie,h.hash_on_cookie_path=t.fields.hashOnCookiePath),t.fields.hashOn==="query_arg"&&(h.hash_on_query_arg=t.fields.hashOnQueryArgument),t.fields.hashOn==="uri_capture"&&(h.hash_on_uri_capture=t.fields.hashOnUriCapture),t.fields.hashFallback==="header"&&(h.hash_fallback_header=t.fields.hashFallbackHeader),t.fields.hashFallback==="query_arg"&&(h.hash_fallback_query_arg=t.fields.hashFallbackQueryArgument),t.fields.hashFallback==="uri_capture"&&(h.hash_fallback_uri_capture=t.fields.hashFallbackUriCapture),h}),w=e.computed(()=>{var r,n,J;if(!t.fields.activeHealthSwitch)return((r=o.config)==null?void 0:r.app)==="kongManager"&&A.value===m.EntityBaseFormType.Edit?{type:t.fields.activeHealthCheck.type,headers:{},healthy:{interval:0,successes:0},unhealthy:{interval:0,http_failures:0,tcp_failures:0,timeouts:0}}:void 0;const h={type:t.fields.activeHealthCheck.type,healthy:{interval:Number(t.fields.activeHealthCheck.healthy.interval||"0"),successes:Number(t.fields.activeHealthCheck.healthy.successes||"0")},unhealthy:{interval:Number(t.fields.activeHealthCheck.unhealthy.interval||"0"),timeouts:Number(t.fields.activeHealthCheck.unhealthy.timeouts||"0"),tcp_failures:Number(t.fields.activeHealthCheck.unhealthy.tcpFailures||"0")},timeout:Number(t.fields.activeHealthCheck.timeout||"1"),concurrency:Number(t.fields.activeHealthCheck.concurrency||"10")};if(t.fields.activeHealthCheck.type!=="tcp"){h.http_path=t.fields.activeHealthCheck.httpPath||"/",h.unhealthy.http_failures=Number(t.fields.activeHealthCheck.unhealthy.httpFailures||"5");const L=(n=t.fields.activeHealthCheck.unhealthy.httpStatuses)!=null&&n.length?t.fields.activeHealthCheck.unhealthy.httpStatuses:ue;h.unhealthy.http_statuses=y(L);const v=(J=t.fields.activeHealthCheck.healthy.httpStatuses)!=null&&J.length?t.fields.activeHealthCheck.healthy.httpStatuses:ce;h.healthy.http_statuses=y(v)}return["https","grpcs"].includes(t.fields.activeHealthCheck.type)&&(h.https_sni=t.fields.activeHealthCheck.httpsSni||null,h.https_verify_certificate=t.fields.activeHealthCheck.verifySsl),h.headers=t.fields.activeHealthCheck.headers.reduce((L,v)=>{var ee,te;return v.key?{...L,[v.key]:(te=(ee=v.values.split(","))==null?void 0:ee.map(be=>be.trim()))==null?void 0:te.filter(Boolean)}:L},{}),h}),g=e.computed(()=>{var r,n,J;if(!t.fields.passiveHealthSwitch)return((r=o.config)==null?void 0:r.app)==="kongManager"&&A.value===m.EntityBaseFormType.Edit?{type:t.fields.passiveHealthCheck.type,healthy:{successes:0},unhealthy:{timeouts:0,tcp_failures:0,http_failures:0}}:void 0;const h={type:t.fields.passiveHealthCheck.type,healthy:{successes:Number(t.fields.passiveHealthCheck.healthy.successes||"0")},unhealthy:{timeouts:Number(t.fields.passiveHealthCheck.unhealthy.timeouts||"0"),tcp_failures:Number(t.fields.passiveHealthCheck.unhealthy.tcpFailures||"5")}};if(t.fields.passiveHealthCheck.type!=="tcp"){h.unhealthy.http_failures=Number(t.fields.passiveHealthCheck.unhealthy.httpFailures||"5");const L=(n=t.fields.passiveHealthCheck.healthy.httpStatuses)!=null&&n.length?t.fields.passiveHealthCheck.healthy.httpStatuses:de;h.healthy.http_statuses=y(L);const v=(J=t.fields.passiveHealthCheck.unhealthy.httpStatuses)!=null&&J.length?t.fields.passiveHealthCheck.unhealthy.httpStatuses:pe;h.unhealthy.http_statuses=y(v)}return h}),C=e.computed(()=>{const h={name:t.fields.name,slots:Number(t.fields.slots),algorithm:t.fields.algorithm,hash_on:t.fields.hashOn,hash_fallback:t.fields.hashFallback,healthchecks:{threshold:Number(t.fields.healthchecksThreshold||"0")},host_header:t.fields.hostHeader||null,client_certificate:t.fields.clientCertificate?{id:t.fields.clientCertificate}:null},r=w.value,n=g.value,J={...h,...W.value,healthchecks:{...h.healthchecks,active:r||void 0,passive:n||void 0}};return J.tags=t.fields.tags?t.fields.tags.split(",").map(L=>String(L||"").trim()).filter(L=>L!==""):[],Object.assign(J,j.value),J}),S=h=>{var n,J,L,v,ee,te;let r=`${(n=o.config)==null?void 0:n.apiBaseUrl}${ie.form[(J=o.config)==null?void 0:J.app][h]}`;return((L=o.config)==null?void 0:L.app)==="konnect"?r=r.replace(/{controlPlaneId}/gi,((v=o.config)==null?void 0:v.controlPlaneId)||""):((ee=o.config)==null?void 0:ee.app)==="kongManager"&&(r=r.replace(/\/{workspace}/gi,(te=o.config)!=null&&te.workspace?`/${o.config.workspace}`:"")),r=r.replace(/{id}/gi,o.upstreamId),r},O=async()=>{var h;try{t.readonly=!0,await c.post(S("validate"),C.value);let r;A.value===m.EntityBaseFormType.Create?r=await c.post(S("create"),C.value):A.value===m.EntityBaseFormType.Edit&&(r=((h=o.config)==null?void 0:h.app)==="konnect"?await c.put(S("edit"),C.value):await c.patch(S("edit"),C.value)),l("update",r==null?void 0:r.data)}catch(r){t.errorMessage=b(r),l("error",r)}finally{t.readonly=!1}};return(h,r)=>(e.openBlock(),e.createElementBlock("div",Lt,[e.createVNode(e.unref(m.EntityBaseForm),{"can-submit":z.value&&V.value,config:a.config,"edit-id":a.upstreamId,"entity-type":e.unref(m.SupportedEntityType).Upstream,"error-message":t.errorMessage,"fetch-url":X.value,"form-fields":C.value,"is-readonly":t.readonly,onCancel:q,"onFetch:error":G,"onFetch:success":U,onLoading:R,onSubmit:O},{default:e.withCtx(()=>[e.createVNode(wt,{"client-certificate":t.fields.clientCertificate,"onUpdate:clientCertificate":r[0]||(r[0]=n=>t.fields.clientCertificate=n),"host-header":t.fields.hostHeader,"onUpdate:hostHeader":r[1]||(r[1]=n=>t.fields.hostHeader=n),name:t.fields.name,"onUpdate:name":r[2]||(r[2]=n=>t.fields.name=n),tags:t.fields.tags,"onUpdate:tags":r[3]||(r[3]=n=>t.fields.tags=n),config:a.config,readonly:t.readonly},null,8,["client-certificate","host-header","name","tags","config","readonly"]),e.createVNode(Tt,{algorithm:t.fields.algorithm,"onUpdate:algorithm":r[4]||(r[4]=n=>t.fields.algorithm=n),"hash-fallback":t.fields.hashFallback,"onUpdate:hashFallback":r[5]||(r[5]=n=>t.fields.hashFallback=n),"hash-fallback-header":t.fields.hashFallbackHeader,"onUpdate:hashFallbackHeader":r[6]||(r[6]=n=>t.fields.hashFallbackHeader=n),"hash-fallback-query-argument":t.fields.hashFallbackQueryArgument,"onUpdate:hashFallbackQueryArgument":r[7]||(r[7]=n=>t.fields.hashFallbackQueryArgument=n),"hash-fallback-uri-capture":t.fields.hashFallbackUriCapture,"onUpdate:hashFallbackUriCapture":r[8]||(r[8]=n=>t.fields.hashFallbackUriCapture=n),"hash-on":t.fields.hashOn,"onUpdate:hashOn":r[9]||(r[9]=n=>t.fields.hashOn=n),"hash-on-cookie":t.fields.hashOnCookie,"onUpdate:hashOnCookie":r[10]||(r[10]=n=>t.fields.hashOnCookie=n),"hash-on-cookie-path":t.fields.hashOnCookiePath,"onUpdate:hashOnCookiePath":r[11]||(r[11]=n=>t.fields.hashOnCookiePath=n),"hash-on-header":t.fields.hashOnHeader,"onUpdate:hashOnHeader":r[12]||(r[12]=n=>t.fields.hashOnHeader=n),"hash-on-query-argument":t.fields.hashOnQueryArgument,"onUpdate:hashOnQueryArgument":r[13]||(r[13]=n=>t.fields.hashOnQueryArgument=n),"hash-on-uri-capture":t.fields.hashOnUriCapture,"onUpdate:hashOnUriCapture":r[14]||(r[14]=n=>t.fields.hashOnUriCapture=n),slots:t.fields.slots,"onUpdate:slots":r[15]||(r[15]=n=>t.fields.slots=n),"sticky-sessions-cookie":t.fields.stickySessionsCookie,"onUpdate:stickySessionsCookie":r[16]||(r[16]=n=>t.fields.stickySessionsCookie=n),"sticky-sessions-cookie-path":t.fields.stickySessionsCookiePath,"onUpdate:stickySessionsCookiePath":r[17]||(r[17]=n=>t.fields.stickySessionsCookiePath=n),readonly:t.readonly,"sticky-sessions-available":a.config.stickySessionsAvailable},null,8,["algorithm","hash-fallback","hash-fallback-header","hash-fallback-query-argument","hash-fallback-uri-capture","hash-on","hash-on-cookie","hash-on-cookie-path","hash-on-header","hash-on-query-argument","hash-on-uri-capture","slots","sticky-sessions-cookie","sticky-sessions-cookie-path","readonly","sticky-sessions-available"]),e.createVNode(Et,{"active-health-switch":t.fields.activeHealthSwitch,"onUpdate:activeHealthSwitch":[r[18]||(r[18]=n=>t.fields.activeHealthSwitch=n),d],"healthchecks-threshold":t.fields.healthchecksThreshold,"onUpdate:healthchecksThreshold":r[19]||(r[19]=n=>t.fields.healthchecksThreshold=n),"passive-health-switch":t.fields.passiveHealthSwitch,"onUpdate:passiveHealthSwitch":[r[20]||(r[20]=n=>t.fields.passiveHealthSwitch=n),_],readonly:t.readonly},null,8,["active-health-switch","healthchecks-threshold","passive-health-switch","readonly"]),t.fields.activeHealthSwitch?(e.openBlock(),e.createBlock(Pt,{key:0,concurrency:t.fields.activeHealthCheck.concurrency,"onUpdate:concurrency":r[21]||(r[21]=n=>t.fields.activeHealthCheck.concurrency=n),headers:t.fields.activeHealthCheck.headers,"onUpdate:headers":r[22]||(r[22]=n=>t.fields.activeHealthCheck.headers=n),"healthy-http-statuses":t.fields.activeHealthCheck.healthy.httpStatuses,"onUpdate:healthyHttpStatuses":r[23]||(r[23]=n=>t.fields.activeHealthCheck.healthy.httpStatuses=n),"healthy-interval":t.fields.activeHealthCheck.healthy.interval,"onUpdate:healthyInterval":r[24]||(r[24]=n=>t.fields.activeHealthCheck.healthy.interval=n),"healthy-successes":t.fields.activeHealthCheck.healthy.successes,"onUpdate:healthySuccesses":r[25]||(r[25]=n=>t.fields.activeHealthCheck.healthy.successes=n),"http-path":t.fields.activeHealthCheck.httpPath,"onUpdate:httpPath":r[26]||(r[26]=n=>t.fields.activeHealthCheck.httpPath=n),"https-sni":t.fields.activeHealthCheck.httpsSni,"onUpdate:httpsSni":r[27]||(r[27]=n=>t.fields.activeHealthCheck.httpsSni=n),timeout:t.fields.activeHealthCheck.timeout,"onUpdate:timeout":r[28]||(r[28]=n=>t.fields.activeHealthCheck.timeout=n),type:t.fields.activeHealthCheck.type,"onUpdate:type":r[29]||(r[29]=n=>t.fields.activeHealthCheck.type=n),"unhealthy-http-failures":t.fields.activeHealthCheck.unhealthy.httpFailures,"onUpdate:unhealthyHttpFailures":r[30]||(r[30]=n=>t.fields.activeHealthCheck.unhealthy.httpFailures=n),"unhealthy-http-statuses":t.fields.activeHealthCheck.unhealthy.httpStatuses,"onUpdate:unhealthyHttpStatuses":r[31]||(r[31]=n=>t.fields.activeHealthCheck.unhealthy.httpStatuses=n),"unhealthy-interval":t.fields.activeHealthCheck.unhealthy.interval,"onUpdate:unhealthyInterval":r[32]||(r[32]=n=>t.fields.activeHealthCheck.unhealthy.interval=n),"unhealthy-tcp-failures":t.fields.activeHealthCheck.unhealthy.tcpFailures,"onUpdate:unhealthyTcpFailures":r[33]||(r[33]=n=>t.fields.activeHealthCheck.unhealthy.tcpFailures=n),"unhealthy-timeouts":t.fields.activeHealthCheck.unhealthy.timeouts,"onUpdate:unhealthyTimeouts":r[34]||(r[34]=n=>t.fields.activeHealthCheck.unhealthy.timeouts=n),"verify-ssl":t.fields.activeHealthCheck.verifySsl,"onUpdate:verifySsl":r[35]||(r[35]=n=>t.fields.activeHealthCheck.verifySsl=n),config:a.config,readonly:t.readonly},null,8,["concurrency","headers","healthy-http-statuses","healthy-interval","healthy-successes","http-path","https-sni","timeout","type","unhealthy-http-failures","unhealthy-http-statuses","unhealthy-interval","unhealthy-tcp-failures","unhealthy-timeouts","verify-ssl","config","readonly"])):e.createCommentVNode("",!0),t.fields.passiveHealthSwitch?(e.openBlock(),e.createBlock(jt,{key:1,"healthy-http-statuses":t.fields.passiveHealthCheck.healthy.httpStatuses,"onUpdate:healthyHttpStatuses":r[36]||(r[36]=n=>t.fields.passiveHealthCheck.healthy.httpStatuses=n),"healthy-successes":t.fields.passiveHealthCheck.healthy.successes,"onUpdate:healthySuccesses":r[37]||(r[37]=n=>t.fields.passiveHealthCheck.healthy.successes=n),type:t.fields.passiveHealthCheck.type,"onUpdate:type":r[38]||(r[38]=n=>t.fields.passiveHealthCheck.type=n),"unhealthy-http-failures":t.fields.passiveHealthCheck.unhealthy.httpFailures,"onUpdate:unhealthyHttpFailures":r[39]||(r[39]=n=>t.fields.passiveHealthCheck.unhealthy.httpFailures=n),"unhealthy-http-statuses":t.fields.passiveHealthCheck.unhealthy.httpStatuses,"onUpdate:unhealthyHttpStatuses":r[40]||(r[40]=n=>t.fields.passiveHealthCheck.unhealthy.httpStatuses=n),"unhealthy-tcp-failures":t.fields.passiveHealthCheck.unhealthy.tcpFailures,"onUpdate:unhealthyTcpFailures":r[41]||(r[41]=n=>t.fields.passiveHealthCheck.unhealthy.tcpFailures=n),"unhealthy-timeouts":t.fields.passiveHealthCheck.unhealthy.timeouts,"onUpdate:unhealthyTimeouts":r[42]||(r[42]=n=>t.fields.passiveHealthCheck.unhealthy.timeouts=n),readonly:t.readonly},null,8,["healthy-http-statuses","healthy-successes","type","unhealthy-http-failures","unhealthy-http-statuses","unhealthy-tcp-failures","unhealthy-timeouts","readonly"])):e.createCommentVNode("",!0)]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])]))}}),[["__scopeId","data-v-0d494630"]]),Wt={"data-testid":"client_certificate-plain-text"},Jt=e.defineComponent({__name:"UpstreamsConfigCard",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||a.app==="konnect"&&!a.controlPlaneId||a.app==="kongManager"&&typeof a.workspace!="string"||!a.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(a){const E=a,{i18n:{t:o},i18nT:l}=Z.useI18n(),{getPropValue:i}=m.useHelpers(),y=e.computed(()=>ie.form[E.config.app].edit),p=e.ref({id:{},name:{},created_at:{},updated_at:{},algorithm:{order:5,section:m.ConfigurationSchemaSection.Basic,tooltip:o("upstreams.form.fields.algorithm.tooltip")},slots:{order:6,section:m.ConfigurationSchemaSection.Basic},hash_on:{order:7,section:m.ConfigurationSchemaSection.Basic},hash_on_header:{order:8,section:m.ConfigurationSchemaSection.Basic},hash_on_uri_capture:{order:9,section:m.ConfigurationSchemaSection.Basic},hash_on_query_arg:{order:10,section:m.ConfigurationSchemaSection.Basic,label:`${o("upstreams.form.fields.hash_on.label")} ${o("upstreams.form.hash_labels.query_argument")}`},hash_on_cookie:{order:11,section:m.ConfigurationSchemaSection.Basic},hash_on_cookie_path:{order:12,section:m.ConfigurationSchemaSection.Basic},healthchecks:{order:13,section:m.ConfigurationSchemaSection.Basic,type:m.ConfigurationSchemaType.Json},tags:{order:14,tooltip:o("upstreams.form.hash_tooltips.tags")},hash_fallback:{order:1},hash_fallback_header:{order:2},hash_fallback_query_arg:{order:3,label:`${o("upstreams.form.fields.hash_fallback.label")} ${o("upstreams.form.hash_labels.query_argument")}`},hash_fallback_uri_capture:{order:4},host_header:{order:5},use_srv_name:{order:6},client_certificate:{order:7,tooltip:o("upstreams.form.hash_tooltips.client_certificate")}});return(B,x)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(m.EntityBaseConfigCard),{config:a.config,"config-card-doc":a.configCardDoc,"config-schema":p.value,"entity-type":e.unref(m.SupportedEntityType).Upstream,"fetch-url":y.value,"hide-title":a.hideTitle,"onFetch:error":x[0]||(x[0]=s=>B.$emit("fetch:error",s)),"onFetch:success":x[1]||(x[1]=s=>B.$emit("fetch:success",s)),onLoading:x[2]||(x[2]=s=>B.$emit("loading",s))},{"name-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.fields.name.host")),1)]),_:1})]),"hash_on-label-tooltip":e.withCtx(({row:s})=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.fields.hash_on.tooltip",scope:"global"},{result:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(s.value),1)]),_:2},1024)]),"hash_on_header-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_header.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_header.hash_on")),1)]),header:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_header.header")),1)]),_:1})]),"hash_on_uri_capture-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_uri_capture.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_uri_capture.hash_on")),1)]),uri_capture:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_uri_capture.uri_capture")),1)]),_:1})]),"hash_on_query_arg-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_query_arg.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_query_arg.hash_on")),1)]),query_arg:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_query_arg.query_arg")),1)]),_:1})]),"hash_on_cookie-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie.hash_on")),1)]),hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie.hash_fallback")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie.cookie")),1)]),_:1})]),"hash_on_cookie_path-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie_path.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_on")),1)]),hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_fallback")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie_path.cookie")),1)]),_:1})]),"slots-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.slots.text",scope:"global"},{algorithm:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.slots.algorithm")),1)]),round_robin:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.slots.round_robin")),1)]),consistent_hashing:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.slots.consistent_hashing")),1)]),min:e.withCtx(()=>x[3]||(x[3]=[e.createElementVNode("code",null,"10",-1)])),max:e.withCtx(()=>x[4]||(x[4]=[e.createElementVNode("code",null,"65536",-1)])),_:1})]),"hash_fallback-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_fallback.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback.hash_on")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback.cookie")),1)]),_:1})]),"hash_fallback_header-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_fallback_header.text",scope:"global"},{hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_header.hash_fallback")),1)]),header:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_header.header")),1)]),_:1})]),"hash_fallback_query_arg-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_fallback_query_arg.text",scope:"global"},{hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_query_arg.hash_fallback")),1)]),query_arg:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_query_arg.query_arg")),1)]),_:1})]),"hash_fallback_uri_capture-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_fallback_uri_capture.text",scope:"global"},{hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.hash_fallback")),1)]),uri_capture:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.uri_capture")),1)]),_:1})]),"host_header-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.host_header.text",scope:"global"},{host:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.host_header.host")),1)]),_:1})]),client_certificate:e.withCtx(s=>{var c;return[e.createElementVNode("div",null,[e.createElementVNode("div",Wt,[e.createElementVNode("span",null,e.toDisplayString((c=e.unref(i)("rowValue",s))==null?void 0:c.id),1)])])]}),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});Q.TargetForm=Ue,Q.TargetsList=_t,Q.UpstreamsConfigCard=Jt,Q.UpstreamsForm=Qt,Q.UpstreamsList=mt,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-2feb8c2e] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-5f9aa0e8]{align-items:center;border-bottom:var(--2f90d7f7);box-sizing:border-box;display:var(--668a792a);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-5f9aa0e8]{box-sizing:border-box;padding-right:16px;width:var(--5bc9ad14)}.config-card-details-row .config-card-details-label label[data-v-5f9aa0e8]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-5f9aa0e8]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-5f9aa0e8]{min-width:0}.config-card-details-row .config-card-details-value[data-v-5f9aa0e8]{box-sizing:border-box;width:var(--5bc5215e)}.config-card-details-row .config-card-details-value .truncated[data-v-5f9aa0e8]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-5f9aa0e8]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-5f9aa0e8] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-5f9aa0e8]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-5f9aa0e8]{margin-right:4px}.config-card-details-row[data-v-5f9aa0e8] .k-label{margin-bottom:0}.config-card-details-row[data-v-5f9aa0e8] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-5f9aa0e8] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--eca0976a);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-9b9ea6f9]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-9b9ea6f9]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-9b9ea6f9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-9b9ea6f9] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-9b9ea6f9]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-612b1eac]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-612b1eac] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-612b1eac] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-612b1eac] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-612b1eac] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-612b1eac]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-612b1eac] .k-button:last-of-type,.form-actions[data-v-612b1eac] .k-button:nth-last-of-type(2){margin-left:16px}.form-actions-reverted[data-v-612b1eac]{direction:rtl}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-d86d3e31]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-d86d3e31]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-d86d3e31]{display:none}.kong-ui-entity-base-table[data-v-d86d3e31] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-084f7978]{width:100%}.kong-ui-entity-filter-clear[data-v-084f7978]{cursor:pointer}.kong-ui-entity-filter[data-v-084f7978]{display:flex;position:relative}.kong-ui-entity-filter[data-v-084f7978] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-084f7978] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-084f7978]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-084f7978]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-084f7978]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-084f7978]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-084f7978]{color:#232633}.menu-item-expand-icon[data-v-084f7978]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-084f7978]{transform:rotate(180deg)}.menu-item-indicator[data-v-084f7978]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-084f7978]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-084f7978] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-084f7978] .k-input{width:100%}.menu-item-body[data-v-084f7978] .k-select-input .input{font-size:12px}.menu-item-body[data-v-084f7978] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-084f7978]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-084f7978]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-084f7978]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.ff-form-section .header[data-v-cb6d2e95]{align-items:flex-start;display:flex;gap:8px}.ff-form-section .step[data-v-cb6d2e95]{align-items:center;background:#fff;border:1px solid #afb7c5;border-radius:100px;display:flex;flex:0 0 auto;height:32px;justify-content:center;padding:4px;width:32px}.ff-form-section .header-content[data-v-cb6d2e95]{align-items:flex-start;display:flex;flex:1 1 auto;flex-direction:column;gap:8px;padding-top:4px}.ff-form-section .header-title[data-v-cb6d2e95]{color:#000933;font-size:18px;font-weight:700;line-height:24px;margin:0}.ff-form-section .header-description[data-v-cb6d2e95]{color:#52596e;font-size:14px;line-height:20px;margin:0}.ff-form-section .header-extra[data-v-cb6d2e95]{align-items:center;display:flex;flex:0 0 auto;gap:8px;justify-content:flex-end}.ff-form-section .content[data-v-cb6d2e95]{background:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;display:flex;flex-direction:column;gap:20px;margin-left:16px;margin-top:20px;padding:20px 24px}.kong-ui-public-entity-link[data-v-96efdfa5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-96efdfa5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-96efdfa5]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-96efdfa5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-96efdfa5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-b6376b66]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-b6376b66]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-b6376b66]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-b6376b66]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-b6376b66]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-b6376b66]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-b6376b66]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-b6376b66]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-b6376b66]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-b6376b66]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-b6376b66]{width:640px}}.button-row[data-v-18b86085]{align-items:center;display:flex;gap:12px}.kong-ui-entities-upstreams-list .kong-ui-entity-filter-input[data-v-18b86085]{margin-right:12px}.kong-ui-entities-upstreams-list .upstream-name[data-v-18b86085]{font-weight:600}[data-v-b5bbee74] .kong-card{padding:0}[data-v-b5bbee74] .kong-card.border{border:0!important}[data-v-b5bbee74] .kong-card.borderTop{border-top:0!important}.kong-ui-entities-target-form[data-v-b5bbee74]{width:100%}.kong-ui-entities-target-form .target-form-container .target-form-info[data-v-b5bbee74],.kong-ui-entities-target-form .target-form-container .target-form-info p[data-v-b5bbee74],.kong-ui-entities-target-form .target-form-container .target-form-info[data-v-b5bbee74] p{color:#000933;font-size:14px;line-height:20px;margin-bottom:32px}.kong-ui-entities-target-form .target-form-container .target-form-input[data-v-b5bbee74]{margin-bottom:32px}.kong-ui-entities-target-form .target-form-container .target-form-input[data-v-b5bbee74]:last-of-type{margin-bottom:0}.kong-ui-entities-target-form[data-v-b5bbee74] .k-alert{margin-top:20px}.kong-ui-entities-target-form[data-v-b5bbee74] .form-actions{display:none!important}.kong-ui-entities-target-form[data-v-b5bbee74] .k-card.kong-ui-entity-base-form{background-color:transparent;border:none;padding:0}.kong-ui-entities-targets-list .target-address[data-v-4ecc7a36]{font-weight:600}.margin-bottom-6[data-v-1a71740c]{margin-bottom:24px}.fields-group-title[data-v-656aa4f4]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-656aa4f4]{color:#afb7c5;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-top-6[data-v-656aa4f4]{margin-top:24px}.fields-group-title[data-v-c2ff95ff]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-c2ff95ff]{color:#afb7c5;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-bottom-6[data-v-cfc70316]{margin-bottom:24px}.margin-top-6[data-v-cfc70316]{margin-top:24px}.fields-group-title[data-v-cfc70316]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-cfc70316]{color:#afb7c5;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.headers-row[data-v-cfc70316]{align-items:center;column-gap:16px;display:flex}.fields-group-title[data-v-7c20c5c5]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-7c20c5c5]{color:#afb7c5;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-top-6[data-v-7c20c5c5]{margin-top:24px}.kong-ui-entities-upstreams-form[data-v-0d494630]{width:100%}@media screen and (min-width: 1280px){.kong-ui-entities-upstreams-form[data-v-0d494630] .form-section-wrapper{column-gap:64px}}
|
|
1
|
+
.config-card-fieldset[data-v-dc1e39a1]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-dc1e39a1]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-2feb8c2e] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-5f9aa0e8]{align-items:center;border-bottom:var(--2f90d7f7);box-sizing:border-box;display:var(--668a792a);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-5f9aa0e8]{box-sizing:border-box;padding-right:16px;width:var(--5bc9ad14)}.config-card-details-row .config-card-details-label label[data-v-5f9aa0e8]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-5f9aa0e8]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-5f9aa0e8]{min-width:0}.config-card-details-row .config-card-details-value[data-v-5f9aa0e8]{box-sizing:border-box;width:var(--5bc5215e)}.config-card-details-row .config-card-details-value .truncated[data-v-5f9aa0e8]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-5f9aa0e8]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-5f9aa0e8] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-5f9aa0e8]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-5f9aa0e8]{margin-right:4px}.config-card-details-row[data-v-5f9aa0e8] .k-label{margin-bottom:0}.config-card-details-row[data-v-5f9aa0e8] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-5f9aa0e8] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--eca0976a);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-9b9ea6f9]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-9b9ea6f9]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-9b9ea6f9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-9b9ea6f9] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-9b9ea6f9]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-612b1eac]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-612b1eac] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-612b1eac] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-612b1eac] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-612b1eac] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-612b1eac]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-612b1eac] .k-button:last-of-type,.form-actions[data-v-612b1eac] .k-button:nth-last-of-type(2){margin-left:16px}.form-actions-reverted[data-v-612b1eac]{direction:rtl}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-d86d3e31]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-d86d3e31]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-d86d3e31]{display:none}.kong-ui-entity-base-table[data-v-d86d3e31] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-084f7978]{width:100%}.kong-ui-entity-filter-clear[data-v-084f7978]{cursor:pointer}.kong-ui-entity-filter[data-v-084f7978]{display:flex;position:relative}.kong-ui-entity-filter[data-v-084f7978] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-084f7978] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-084f7978]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-084f7978]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-084f7978]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-084f7978]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-084f7978]{color:#232633}.menu-item-expand-icon[data-v-084f7978]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-084f7978]{transform:rotate(180deg)}.menu-item-indicator[data-v-084f7978]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-084f7978]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-084f7978] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-084f7978] .k-input{width:100%}.menu-item-body[data-v-084f7978] .k-select-input .input{font-size:12px}.menu-item-body[data-v-084f7978] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-084f7978]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-084f7978]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-084f7978]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.ff-form-section .header[data-v-cb6d2e95]{align-items:flex-start;display:flex;gap:8px}.ff-form-section .step[data-v-cb6d2e95]{align-items:center;background:#fff;border:1px solid #afb7c5;border-radius:100px;display:flex;flex:0 0 auto;height:32px;justify-content:center;padding:4px;width:32px}.ff-form-section .header-content[data-v-cb6d2e95]{align-items:flex-start;display:flex;flex:1 1 auto;flex-direction:column;gap:8px;padding-top:4px}.ff-form-section .header-title[data-v-cb6d2e95]{color:#000933;font-size:18px;font-weight:700;line-height:24px;margin:0}.ff-form-section .header-description[data-v-cb6d2e95]{color:#52596e;font-size:14px;line-height:20px;margin:0}.ff-form-section .header-extra[data-v-cb6d2e95]{align-items:center;display:flex;flex:0 0 auto;gap:8px;justify-content:flex-end}.ff-form-section .content[data-v-cb6d2e95]{background:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;display:flex;flex-direction:column;gap:20px;margin-left:16px;margin-top:20px;padding:20px 24px}.kong-ui-public-entity-link[data-v-96efdfa5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-96efdfa5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-96efdfa5]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-96efdfa5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-96efdfa5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-b6376b66]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-b6376b66]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-b6376b66]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-b6376b66]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-b6376b66]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-b6376b66]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-b6376b66]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-b6376b66]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-b6376b66]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-b6376b66]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-b6376b66]{width:640px}}.button-row[data-v-4c6ace20]{align-items:center;display:flex;gap:12px}.kong-ui-entities-upstreams-list .kong-ui-entity-filter-input[data-v-4c6ace20]{margin-right:12px}.kong-ui-entities-upstreams-list .upstream-name[data-v-4c6ace20]{font-weight:600}[data-v-b5bbee74] .kong-card{padding:0}[data-v-b5bbee74] .kong-card.border{border:0!important}[data-v-b5bbee74] .kong-card.borderTop{border-top:0!important}.kong-ui-entities-target-form[data-v-b5bbee74]{width:100%}.kong-ui-entities-target-form .target-form-container .target-form-info[data-v-b5bbee74],.kong-ui-entities-target-form .target-form-container .target-form-info p[data-v-b5bbee74],.kong-ui-entities-target-form .target-form-container .target-form-info[data-v-b5bbee74] p{color:#000933;font-size:14px;line-height:20px;margin-bottom:32px}.kong-ui-entities-target-form .target-form-container .target-form-input[data-v-b5bbee74]{margin-bottom:32px}.kong-ui-entities-target-form .target-form-container .target-form-input[data-v-b5bbee74]:last-of-type{margin-bottom:0}.kong-ui-entities-target-form[data-v-b5bbee74] .k-alert{margin-top:20px}.kong-ui-entities-target-form[data-v-b5bbee74] .form-actions{display:none!important}.kong-ui-entities-target-form[data-v-b5bbee74] .k-card.kong-ui-entity-base-form{background-color:transparent;border:none;padding:0}.kong-ui-entities-targets-list .target-address[data-v-47084451]{font-weight:600}.margin-bottom-6[data-v-1a71740c]{margin-bottom:24px}.fields-group-title[data-v-656aa4f4]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-656aa4f4]{color:#afb7c5;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-top-6[data-v-656aa4f4]{margin-top:24px}.fields-group-title[data-v-c2ff95ff]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-c2ff95ff]{color:#afb7c5;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-bottom-6[data-v-cfc70316]{margin-bottom:24px}.margin-top-6[data-v-cfc70316]{margin-top:24px}.fields-group-title[data-v-cfc70316]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-cfc70316]{color:#afb7c5;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.headers-row[data-v-cfc70316]{align-items:center;column-gap:16px;display:flex}.fields-group-title[data-v-7c20c5c5]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-7c20c5c5]{color:#afb7c5;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-top-6[data-v-7c20c5c5]{margin-top:24px}.kong-ui-entities-upstreams-form[data-v-0d494630]{width:100%}@media screen and (min-width: 1280px){.kong-ui-entities-upstreams-form[data-v-0d494630] .form-section-wrapper{column-gap:64px}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upstreams-form.d.ts","sourceRoot":"","sources":["../../../src/types/upstreams-form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AACvH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,cAAc,EAAE,aAAa,CAAC;IAClF,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,WAAW,EAAE,gBAAgB,CAAA;CAC9B;AAED,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,qBAAqB,EAAE,aAAa,CAAC,EAAE,uBAAuB;CAAG;AAE1H,MAAM,WAAW,8BAA+B,SAAQ,IAAI,CAAC,yBAAyB,EAAE,aAAa,CAAC,EAAE,uBAAuB;CAAG;AAElI,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,mBAAmB,GAAG,oBAAoB,GAAG,SAAS,GAAG,iBAAiB,CAAA;AAE1H,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,IAAI,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,aAAa,CAAA;AAElH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAA;AAEzE,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,eAAe,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,uBAAuB,EAAE,CAAA;IAClC,OAAO,EAAE;QACP,QAAQ,EAAE,MAAM,CAAA;QAChB,SAAS,EAAE,MAAM,CAAA;QACjB,YAAY,EAAE,MAAM,EAAE,CAAA;KACvB,CAAA;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,EAAE,MAAM,CAAA;QAChB,WAAW,EAAE,MAAM,CAAA;QACnB,YAAY,EAAE,MAAM,CAAA;QACpB,YAAY,EAAE,MAAM,EAAE,CAAA;KACvB,CAAA;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,eAAe,CAAA;IACrB,OAAO,EAAE;QACP,SAAS,EAAE,MAAM,CAAA;QACjB,YAAY,EAAE,MAAM,EAAE,CAAA;KACvB,CAAA;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,CAAA;QAChB,WAAW,EAAE,MAAM,CAAA;QACnB,YAAY,EAAE,MAAM,CAAA;QACpB,YAAY,EAAE,MAAM,EAAE,CAAA;KACvB,CAAA;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,EAAE,MAAM,CAAA;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,iBAAiB,CAAA;IAC5B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,wBAAwB,EAAE,MAAM,CAAA;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,YAAY,CAAA;IACpB,YAAY,
|
|
1
|
+
{"version":3,"file":"upstreams-form.d.ts","sourceRoot":"","sources":["../../../src/types/upstreams-form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AACvH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,cAAc,EAAE,aAAa,CAAC;IAClF,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,WAAW,EAAE,gBAAgB,CAAA;CAC9B;AAED,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,qBAAqB,EAAE,aAAa,CAAC,EAAE,uBAAuB;CAAG;AAE1H,MAAM,WAAW,8BAA+B,SAAQ,IAAI,CAAC,yBAAyB,EAAE,aAAa,CAAC,EAAE,uBAAuB;CAAG;AAElI,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,mBAAmB,GAAG,oBAAoB,GAAG,SAAS,GAAG,iBAAiB,CAAA;AAE1H,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,IAAI,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,aAAa,CAAA;AAElH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAA;AAEzE,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,eAAe,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,uBAAuB,EAAE,CAAA;IAClC,OAAO,EAAE;QACP,QAAQ,EAAE,MAAM,CAAA;QAChB,SAAS,EAAE,MAAM,CAAA;QACjB,YAAY,EAAE,MAAM,EAAE,CAAA;KACvB,CAAA;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,EAAE,MAAM,CAAA;QAChB,WAAW,EAAE,MAAM,CAAA;QACnB,YAAY,EAAE,MAAM,CAAA;QACpB,YAAY,EAAE,MAAM,EAAE,CAAA;KACvB,CAAA;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,eAAe,CAAA;IACrB,OAAO,EAAE;QACP,SAAS,EAAE,MAAM,CAAA;QACjB,YAAY,EAAE,MAAM,EAAE,CAAA;KACvB,CAAA;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,CAAA;QAChB,WAAW,EAAE,MAAM,CAAA;QACnB,YAAY,EAAE,MAAM,CAAA;QACpB,YAAY,EAAE,MAAM,EAAE,CAAA;KACvB,CAAA;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,EAAE,MAAM,CAAA;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,iBAAiB,CAAA;IAC5B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,wBAAwB,EAAE,MAAM,CAAA;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,YAAY,CAAA;IACpB,YAAY,EAAE,YAAY,CAAA;IAC1B,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,gBAAgB,EAAE,MAAM,CAAA;IACxB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,gBAAgB,EAAE,MAAM,CAAA;IACxB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,yBAAyB,EAAE,MAAM,CAAA;IACjC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,kBAAkB,EAAE,OAAO,CAAA;IAC3B,mBAAmB,EAAE,OAAO,CAAA;IAC5B,qBAAqB,EAAE,MAAM,CAAA;IAC7B,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,kBAAkB,EAAE,kBAAkB,CAAA;CACvC;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,kBAAkB,CAAA;IAC1B,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC;IACpE,KAAK,EAAE,iBAAiB,CAAA;CACzB;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/D,KAAK,EAAE,YAAY,CAAA;CACpB;AAED,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC;IAC1E,KAAK,EAAE,eAAe,CAAA;CACvB;AAED,MAAM,WAAW,4BAA4B;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,eAAe,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,CAAA;IACvC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC,OAAO,EAAE;QACP,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;KACzB,CAAA;IACD,SAAS,EAAE;QACT,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;KACzB,CAAA;CACF;AAED,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC;IACpF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;CACnC;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,eAAe,CAAA;IACrB,OAAO,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;KACzB,CAAA;IACD,SAAS,EAAE;QACT,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;QACxB,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,YAAY,CAAC,EAAE,MAAM,CAAA;KACtB,CAAA;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,iBAAiB,CAAA;IAC5B,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtC,2BAA2B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,kBAAkB,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAC1C,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,YAAY,CAAA;IACrB,aAAa,EAAE,YAAY,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAClC,YAAY,EAAE;QACZ,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,MAAM,CAAC,EAAE,qBAAqB,CAAA;QAC9B,OAAO,CAAC,EAAE,sBAAsB,CAAA;KACjC,CAAA;CACF;AAED,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,mBAAmB,EAAE,cAAc,CAAC;IACjF,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE;QACZ,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,MAAM,CAAC,EAAE,sBAAsB,CAAA;QAC/B,OAAO,CAAC,EAAE,sBAAsB,CAAA;KACjC,CAAA;CACF;AAED,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-upstreams-targets",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-upstreams-targets.umd.js",
|
|
6
6
|
"module": "./dist/entities-upstreams-targets.es.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"axios": "^1.11.0",
|
|
27
27
|
"vue": "^3.5.13",
|
|
28
28
|
"vue-router": "^4.4.5",
|
|
29
|
-
"@kong-ui-public/entities-shared": "^3.27.
|
|
30
|
-
"@kong-ui-public/i18n": "^2.4.
|
|
29
|
+
"@kong-ui-public/entities-shared": "^3.27.4",
|
|
30
|
+
"@kong-ui-public/i18n": "^2.4.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@kong/design-tokens": "^1.18.0",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"axios": "^1.11.0",
|
|
37
37
|
"vue": "^3.5.13",
|
|
38
38
|
"vue-router": "^4.4.5",
|
|
39
|
-
"@kong-ui-public/entities-shared": "^3.27.
|
|
40
|
-
"@kong-ui-public/i18n": "^2.4.
|
|
39
|
+
"@kong-ui-public/entities-shared": "^3.27.4",
|
|
40
|
+
"@kong-ui-public/i18n": "^2.4.2"
|
|
41
41
|
},
|
|
42
42
|
"repository": {
|
|
43
43
|
"type": "git",
|