diff --git a/assets/app-launcher/app-launcher-0.1.1.tgz b/assets/app-launcher/app-launcher-0.1.1.tgz index 39a92d1..6681ff7 100644 Binary files a/assets/app-launcher/app-launcher-0.1.1.tgz and b/assets/app-launcher/app-launcher-0.1.1.tgz differ diff --git a/assets/index.yaml b/assets/index.yaml index 91f5f18..392ff97 100644 --- a/assets/index.yaml +++ b/assets/index.yaml @@ -12,9 +12,9 @@ entries: catalog.cattle.io/ui-component: plugins apiVersion: v2 appVersion: 0.1.1 - created: "2023-08-10T20:25:39.468536988Z" + created: "2023-08-15T17:30:43.76251234Z" description: app-launcher plugin - digest: 80528230d6be8e0a976afb221f6e5be895a44a9ebd44efc4b06677863d0517a3 + digest: f84e697c573ebf885a7ad273fc381d9b93d29b67ec0a35f678662c476d23b574 name: app-launcher type: application urls: @@ -32,12 +32,12 @@ entries: catalog.cattle.io/ui-component: plugins apiVersion: v2 appVersion: 0.1.1 - created: "2023-08-10T20:25:39.468858592Z" + created: "2023-08-15T17:30:43.762849338Z" description: pirate-locale plugin - digest: 70f5d88c2ce29f4860faae25ef7c41fd460c431366cf371e954473fefa156d05 + digest: 86d5da4dd4fdcc9e946a613bcec0d03e62fbb7405be0e74d7907e5e7c932973a name: pirate-locale type: application urls: - assets/pirate-locale/pirate-locale-0.1.1.tgz version: 0.1.1 -generated: "2023-08-10T20:25:39.467958279Z" +generated: "2023-08-15T17:30:43.761788245Z" diff --git a/assets/pirate-locale/pirate-locale-0.1.1.tgz b/assets/pirate-locale/pirate-locale-0.1.1.tgz index 1923033..75cf70a 100644 Binary files a/assets/pirate-locale/pirate-locale-0.1.1.tgz and b/assets/pirate-locale/pirate-locale-0.1.1.tgz differ diff --git a/extensions/app-launcher/0.1.1/plugin/app-launcher-0.1.1.umd.min.2.js b/extensions/app-launcher/0.1.1/plugin/app-launcher-0.1.1.umd.min.2.js index 4905ec5..262129f 100644 --- a/extensions/app-launcher/0.1.1/plugin/app-launcher-0.1.1.umd.min.2.js +++ b/extensions/app-launcher/0.1.1/plugin/app-launcher-0.1.1.umd.min.2.js @@ -1,2 +1,2 @@ -(("undefined"!==typeof self?self:this)["webpackJsonpapp_launcher_0_1_1"]=("undefined"!==typeof self?self:this)["webpackJsonpapp_launcher_0_1_1"]||[]).push([[2],{4473:function(e,t,a){"use strict";a("9f29")},"84d7":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return Boolean(!1)?t(a.Loading):t("div",e._l(a.servicesByCluster,(function(n){return t("div",{key:n.id,staticStyle:{"margin-bottom":"2rem"}},[t("h1",{staticClass:"cluster-header hack-to-keep-header-above-app-launcher-card-dropdown-button"},[e._v(" "+e._s(n.name)+" ")]),t("div",{staticClass:"services-by-cluster-grid"},e._l(n.services,(function(e){return t(a.AppLauncherCard,{key:e.id,attrs:{"cluster-id":n.id,service:e}})})),1)])})),0)},r=[],o=a("8bbf"),s=a("907c"),i=a("15ca"),l=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t(a.Card,{attrs:{"show-highlight-border":!1,sticky:!0},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticStyle:{width:"100%"}},[t("p",{staticStyle:{"font-size":"1.2rem"}},[e._v(" "+e._s(a.computedServiceName)+" ")]),t("div",{staticStyle:{color:"var(--input-label)",display:"flex","justify-content":"space-between","margin-top":"4px"}},[void 0!==a.kubernetesVersion?t("p",[e._v(" "+e._s(a.kubernetesVersion)+" ")]):e._e(),void 0!==a.helmChart?t("p",[e._v(" "+e._s(a.helmChart)+" ")]):e._e()])])]},proxy:!0},{key:"body",fn:function(){return[t("p",[e._v(e._s(a.namespace)+"/"+e._s(a.name))])]},proxy:!0},{key:"actions",fn:function(){var n,r,o,s,i;return[(null!==(n=null===(r=a.endpoints)||void 0===r?void 0:r.length)&&void 0!==n?n:0)<=1?t("a",{staticClass:"btn role-primary",attrs:{disabled:!(null!==(o=a.endpoints)&&void 0!==o&&o.length),href:null===(s=a.endpoints[0])||void 0===s?void 0:s.value,target:"_blank",rel:"noopener noreferrer nofollow",title:0===(null===(i=a.endpoints)||void 0===i?void 0:i.length)?e.t("appLauncher.noEndpointFoundForApp"):e.t("appLauncher.launchEndpoint",{endpoint:a.endpoints[0].label})}},[e._v(" "+e._s(e.t("appLauncher.launch"))+" ")]):t(a.ButtonDropDown,{attrs:{"button-label":e.t("appLauncher.launch"),"dropdown-options":a.endpoints,title:e.t("appLauncher.launchAnEndpointFromSelection")},on:{"click-action":e=>a.openLink(e.value)}})]},proxy:!0}])})},c=[],p=a("7b9e"),d=a("4975"),u=a("4048");const v={layout:"plain"};var h=Object(o["defineComponent"])({...v,__name:"AppLauncherCard",props:{clusterId:null,service:null},setup(e){const t=e,a=Object(o["computed"])(()=>{var e,a;return null!==(e=null===(a=t.service.spec.ports)||void 0===a?void 0:a.map(e=>{const a=`${Object(u["a"])(e.port,e.protocol)?"https":"http"}:${t.service.metadata.name}:${e.port}`;return{label:`${a}${"UDP"===e.protocol?" (UDP)":""}`,value:`k8s/clusters/${t.clusterId}/api/v1/namespaces/${t.service.metadata.namespace}/services/${a}/proxy`}}))&&void 0!==e?e:[]}),n=Object(o["computed"])(()=>{var e;return null!==(e=t.service.metadata.labels)&&void 0!==e&&e["app.kubernetes.io/component"]?t.service.metadata.labels["app.kubernetes.io/component"]:t.service.metadata.name}),r=Object(o["computed"])(()=>{var e;return null===(e=t.service.metadata.labels)||void 0===e?void 0:e["helm.sh/chart"]}),s=Object(o["computed"])(()=>{var e;return null===(e=t.service.metadata.labels)||void 0===e?void 0:e["app.kubernetes.io/version"]}),i=Object(o["computed"])(()=>t.service.metadata.name),l=Object(o["computed"])(()=>t.service.metadata.namespace),c=e=>{window.open(e)};return{__sfc:!0,props:t,endpoints:a,computedServiceName:n,helmChart:r,kubernetesVersion:s,name:i,namespace:l,openLink:c,Card:p["a"],ButtonDropDown:d["a"]}}}),b=h,m=a("d802"),f=Object(m["a"])(b,l,c,!1,null,null,null),_=f.exports;const y={layout:"plain"};var g=Object(o["defineComponent"])({...y,__name:"app-launcher",setup(e){var t;const a=null===(t=Object(o["getCurrentInstance"])())||void 0===t?void 0:t.proxy.$store,n=Object(o["ref"])([]),r=async()=>{const e=await a.dispatch("management/findAll",{type:s["a"].CLUSTER});n.value=await Promise.all(e.filter(e=>e.isReady).map(async e=>({name:`${a.getters["i18n/t"]("nav.group.cluster")} ${e.spec.displayName}`,id:e.id,services:(await a.dispatch("cluster/request",{url:`/k8s/clusters/${e.id}/v1/services`})).data})))};return Object(o["onMounted"])(()=>{r()}),{__sfc:!0,store:a,servicesByCluster:n,fetchServicesByCluster:r,Loading:i["a"],AppLauncherCard:_}}}),k=g,C=(a("4473"),Object(m["a"])(k,n,r,!1,null,"e23b720e",null));t["default"]=C.exports},"9f29":function(e,t,a){var n=a("b07b");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var r=a("0ed3").default;r("029c8d6f",n,!0,{sourceMap:!1,shadowMode:!1})},b07b:function(e,t,a){var n=a("5eaa");t=n(!1),t.push([e.i,".services-by-cluster-grid[data-v-e23b720e]{display:grid;grid-gap:1rem;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.cluster-header[data-v-e23b720e]{align-items:center;background:var(--header-bg);border-bottom:var(--header-border-size) solid var(--header-border);display:flex;height:var(--header-height);position:sticky;top:0}.hack-to-keep-header-above-app-launcher-card-dropdown-button[data-v-e23b720e]{z-index:1}",""]),e.exports=t}}]); +(("undefined"!==typeof self?self:this)["webpackJsonpapp_launcher_0_1_1"]=("undefined"!==typeof self?self:this)["webpackJsonpapp_launcher_0_1_1"]||[]).push([[2],{"84d7":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return Boolean(!1)?t(a.Loading):t("div",e._l(a.servicesByCluster,(function(n){return t("div",{key:n.id,staticStyle:{"margin-bottom":"2rem"}},[t("h1",{staticClass:"cluster-header hack-to-keep-header-above-app-launcher-card-dropdown-button"},[e._v(" "+e._s(n.name)+" ")]),t("div",{staticClass:"services-by-cluster-grid"},e._l(n.services,(function(e){return t(a.AppLauncherCard,{key:e.id,attrs:{"cluster-id":n.id,service:e}})})),1)])})),0)},r=[],o=a("8bbf"),s=a("907c"),i=a("15ca"),c=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t(a.Card,{attrs:{"show-highlight-border":!1,sticky:!0},scopedSlots:e._u([{key:"title",fn:function(){return[t("div",{staticStyle:{width:"100%"}},[t("p",{staticStyle:{"font-size":"1.2rem"}},[e._v(" "+e._s(a.computedServiceName)+" ")]),t("div",{staticStyle:{color:"var(--input-label)",display:"flex","justify-content":"space-between","margin-top":"4px"}},[void 0!==a.kubernetesVersion?t("p",[e._v(" "+e._s(a.kubernetesVersion)+" ")]):e._e(),void 0!==a.helmChart?t("p",[e._v(" "+e._s(a.helmChart)+" ")]):e._e()])])]},proxy:!0},{key:"body",fn:function(){return[t("p",[e._v(e._s(a.namespace)+"/"+e._s(a.name))])]},proxy:!0},{key:"actions",fn:function(){var n,r,o,s,i;return[(null!==(n=null===(r=a.endpoints)||void 0===r?void 0:r.length)&&void 0!==n?n:0)<=1?t("a",{staticClass:"btn role-primary",attrs:{disabled:!(null!==(o=a.endpoints)&&void 0!==o&&o.length),href:null===(s=a.endpoints[0])||void 0===s?void 0:s.value,target:"_blank",rel:"noopener noreferrer nofollow",title:0===(null===(i=a.endpoints)||void 0===i?void 0:i.length)?e.t("appLauncher.noEndpointFoundForApp"):e.t("appLauncher.launchEndpoint",{endpoint:a.endpoints[0].label})}},[e._v(" "+e._s(e.t("appLauncher.launch"))+" ")]):t(a.ButtonDropDown,{attrs:{"button-label":e.t("appLauncher.launch"),"dropdown-options":a.endpoints,title:e.t("appLauncher.launchAnEndpointFromSelection")},on:{"click-action":e=>a.openLink(e.value)}})]},proxy:!0}])})},l=[],p=a("7b9e"),d=a("4975"),u=a("4048");const v={layout:"plain"};var h=Object(o["defineComponent"])({...v,__name:"AppLauncherCard",props:{clusterId:null,service:null},setup(e){const t=e,a=Object(o["computed"])(()=>{var e,a;return null!==(e=null===(a=t.service.spec.ports)||void 0===a?void 0:a.map(e=>{const a=`${Object(u["a"])(e.port,e.protocol)?"https":"http"}:${t.service.metadata.name}:${e.port}`;return{label:`${a}${"UDP"===e.protocol?" (UDP)":""}`,value:`k8s/clusters/${t.clusterId}/api/v1/namespaces/${t.service.metadata.namespace}/services/${a}/proxy`}}))&&void 0!==e?e:[]}),n=Object(o["computed"])(()=>{var e;return null!==(e=t.service.metadata.labels)&&void 0!==e&&e["app.kubernetes.io/component"]?t.service.metadata.labels["app.kubernetes.io/component"]:t.service.metadata.name}),r=Object(o["computed"])(()=>{var e;return null===(e=t.service.metadata.labels)||void 0===e?void 0:e["helm.sh/chart"]}),s=Object(o["computed"])(()=>{var e;return null===(e=t.service.metadata.labels)||void 0===e?void 0:e["app.kubernetes.io/version"]}),i=Object(o["computed"])(()=>t.service.metadata.name),c=Object(o["computed"])(()=>t.service.metadata.namespace),l=e=>{window.open(e)};return{__sfc:!0,props:t,endpoints:a,computedServiceName:n,helmChart:r,kubernetesVersion:s,name:i,namespace:c,openLink:l,Card:p["a"],ButtonDropDown:d["a"]}}}),b=h,m=a("d802"),f=Object(m["a"])(b,c,l,!1,null,null,null),_=f.exports;const y={layout:"plain"};var g=Object(o["defineComponent"])({...y,__name:"app-launcher",setup(e){var t;const a=null===(t=Object(o["getCurrentInstance"])())||void 0===t?void 0:t.proxy.$store,n=Object(o["ref"])([]),r=async()=>{const e=await a.dispatch("management/findAll",{type:s["a"].CLUSTER});n.value=await Promise.all(e.filter(e=>e.isReady).map(async e=>({name:`${a.getters["i18n/t"]("nav.group.cluster")} ${e.spec.displayName}`,id:e.id,services:(await a.dispatch("cluster/request",{url:`/k8s/clusters/${e.id}/v1/services`})).data})))};return Object(o["onMounted"])(()=>{r()}),{__sfc:!0,store:a,servicesByCluster:n,fetchServicesByCluster:r,Loading:i["a"],AppLauncherCard:_}}}),k=g,C=(a("bd92"),Object(m["a"])(k,n,r,!1,null,"1a3d3b0e",null));t["default"]=C.exports},"96c8":function(e,t,a){var n=a("ce7b");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var r=a("0ed3").default;r("e44400f0",n,!0,{sourceMap:!1,shadowMode:!1})},bd92:function(e,t,a){"use strict";a("96c8")},ce7b:function(e,t,a){var n=a("5eaa");t=n(!1),t.push([e.i,".services-by-cluster-grid[data-v-1a3d3b0e]{display:grid;grid-gap:1rem;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.cluster-header[data-v-1a3d3b0e]{align-items:center;background:var(--header-bg);border-bottom:var(--header-border-size) solid var(--header-border);display:flex;height:var(--header-height);position:sticky;top:0}.hack-to-keep-header-above-app-launcher-card-dropdown-button[data-v-1a3d3b0e]{z-index:1}",""]),e.exports=t}}]); //# sourceMappingURL=app-launcher-0.1.1.umd.min.2.js.map \ No newline at end of file diff --git a/extensions/app-launcher/0.1.1/plugin/app-launcher-0.1.1.umd.min.2.js.map b/extensions/app-launcher/0.1.1/plugin/app-launcher-0.1.1.umd.min.2.js.map index e6b3fd4..d093f4f 100644 --- a/extensions/app-launcher/0.1.1/plugin/app-launcher-0.1.1.umd.min.2.js.map +++ b/extensions/app-launcher/0.1.1/plugin/app-launcher-0.1.1.umd.min.2.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://app-launcher-0.1.1/./pages/app-launcher.vue?38cf","webpack://app-launcher-0.1.1/./pages/app-launcher.vue","webpack://app-launcher-0.1.1/./components/AppLauncherCard.vue","webpack://app-launcher-0.1.1/./components/AppLauncherCard.vue?3174","webpack://app-launcher-0.1.1/./components/AppLauncherCard.vue?ae63","webpack://app-launcher-0.1.1/./components/AppLauncherCard.vue?9a8e","webpack://app-launcher-0.1.1/./pages/app-launcher.vue?074a","webpack://app-launcher-0.1.1/./pages/app-launcher.vue?a157","webpack://app-launcher-0.1.1/./pages/app-launcher.vue?b28f","webpack://app-launcher-0.1.1/./pages/app-launcher.vue?d06c","webpack://app-launcher-0.1.1/./pages/app-launcher.vue?eb01"],"names":["render","_vm","this","_c","_self","_setup","_setupProxy","Boolean","Loading","_l","servicesByCluster","cluster","key","id","staticStyle","staticClass","_v","_s","name","services","service","AppLauncherCard","attrs","staticRenderFns","Card","scopedSlots","_u","fn","computedServiceName","undefined","kubernetesVersion","_e","helmChart","proxy","namespace","_setup$endpoints$leng","_setup$endpoints","_setup$endpoints2","_setup$endpoints$","_setup$endpoints3","endpoints","length","value","t","endpoint","label","ButtonDropDown","on","o","openLink","__default__","layout","_defineComponent","__name","props","clusterId","setup","__props","computed","_props$service$spec$p","_props$service$spec$p2","spec","ports","map","port","isMaybeSecure","protocol","metadata","_props$service$metada","labels","_props$service$metada2","_props$service$metada3","link","window","open","__sfc","component","_getCurrentInstance","store","getCurrentInstance","$store","ref","fetchServicesByCluster","async","allClusters","dispatch","type","MANAGEMENT","CLUSTER","Promise","all","filter","isReady","getters","displayName","url","data","onMounted","content","__esModule","default","module","i","locals","exports","add","___CSS_LOADER_API_IMPORT___","push"],"mappings":"mMAAA,W,2CCAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAGE,EAAOJ,EAAIG,MAAME,YAAY,OAAQC,SAAQ,GAAQJ,EAAGE,EAAOG,SAASL,EAAG,MAAMF,EAAIQ,GAAIJ,EAAOK,mBAAmB,SAASC,GAAS,OAAOR,EAAG,MAAM,CAACS,IAAID,EAAQE,GAAGC,YAAY,CAAC,gBAAgB,SAAS,CAACX,EAAG,KAAK,CAACY,YAAY,8EAA8E,CAACd,EAAIe,GAAG,IAAIf,EAAIgB,GAAGN,EAAQO,MAAM,OAAOf,EAAG,MAAM,CAACY,YAAY,4BAA4Bd,EAAIQ,GAAIE,EAAQQ,UAAU,SAASC,GAAS,OAAOjB,EAAGE,EAAOgB,gBAAgB,CAACT,IAAIQ,EAAQP,GAAGS,MAAM,CAAC,aAAaX,EAAQE,GAAG,QAAUO,Q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,gBACQ2D,EAAMO,SAAS,kBAAmB,CACtCU,IAAK,iBAAiBpF,EAAQE,oBAEhCmF,UASV,OAJAC,uBAAU,KACRf,MAGK,CAAEP,OAAO,EAAKG,QAAOpE,oBAAmBwE,yBAAwB1E,eAASa,sBClDkX,ICQ9b,G,UAAY,eACd,EACArB,EACAuB,GACA,EACA,KACA,WACA,OAIa,e,gCChBf,IAAI2E,EAAU,EAAQ,QACnBA,EAAQC,aAAYD,EAAUA,EAAQE,SACnB,kBAAZF,IAAsBA,EAAU,CAAC,CAACG,EAAOC,EAAIJ,EAAS,MAC7DA,EAAQK,SAAQF,EAAOG,QAAUN,EAAQK,QAE5C,IAAIE,EAAM,EAAQ,QAAkEL,QACvEK,EAAI,WAAYP,GAAS,EAAM,CAAC,WAAY,EAAM,YAAa,K,qBCR5E,IAAIQ,EAA8B,EAAQ,QAC1CF,EAAUE,GAA4B,GAEtCF,EAAQG,KAAK,CAACN,EAAOC,EAAI,6aAA8a,KAEvcD,EAAOG,QAAUA","file":"app-launcher-0.1.1.umd.min.2.js","sourcesContent":["export * from \"-!../../../node_modules/vue-style-loader/index.js??ref--10-oneOf-1-0!../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-3!../../../node_modules/sass-loader/dist/cjs.js??ref--10-oneOf-1-4!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./app-launcher.vue?vue&type=style&index=0&id=e23b720e&prod&lang=scss&scoped=true&\"","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return (Boolean(false))?_c(_setup.Loading):_c('div',_vm._l((_setup.servicesByCluster),function(cluster){return _c('div',{key:cluster.id,staticStyle:{\"margin-bottom\":\"2rem\"}},[_c('h1',{staticClass:\"cluster-header hack-to-keep-header-above-app-launcher-card-dropdown-button\"},[_vm._v(\" \"+_vm._s(cluster.name)+\" \")]),_c('div',{staticClass:\"services-by-cluster-grid\"},_vm._l((cluster.services),function(service){return _c(_setup.AppLauncherCard,{key:service.id,attrs:{\"cluster-id\":cluster.id,\"service\":service}})}),1)])}),0)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c(_setup.Card,{attrs:{\"show-highlight-border\":false,\"sticky\":true},scopedSlots:_vm._u([{key:\"title\",fn:function(){return [_c('div',{staticStyle:{\"width\":\"100%\"}},[_c('p',{staticStyle:{\"font-size\":\"1.2rem\"}},[_vm._v(\" \"+_vm._s(_setup.computedServiceName)+\" \")]),_c('div',{staticStyle:{\"color\":\"var(--input-label)\",\"display\":\"flex\",\"justify-content\":\"space-between\",\"margin-top\":\"4px\"}},[(_setup.kubernetesVersion !== undefined)?_c('p',[_vm._v(\" \"+_vm._s(_setup.kubernetesVersion)+\" \")]):_vm._e(),(_setup.helmChart !== undefined)?_c('p',[_vm._v(\" \"+_vm._s(_setup.helmChart)+\" \")]):_vm._e()])])]},proxy:true},{key:\"body\",fn:function(){return [_c('p',[_vm._v(_vm._s(_setup.namespace)+\"/\"+_vm._s(_setup.name))])]},proxy:true},{key:\"actions\",fn:function(){return [((_setup.endpoints?.length ?? 0) <= 1)?_c('a',{staticClass:\"btn role-primary\",attrs:{\"disabled\":!_setup.endpoints?.length,\"href\":_setup.endpoints[0]?.value,\"target\":\"_blank\",\"rel\":\"noopener noreferrer nofollow\",\"title\":_setup.endpoints?.length === 0\n ? _vm.t('appLauncher.noEndpointFoundForApp')\n : _vm.t('appLauncher.launchEndpoint', {\n endpoint: _setup.endpoints[0].label,\n })}},[_vm._v(\" \"+_vm._s(_vm.t('appLauncher.launch'))+\" \")]):_c(_setup.ButtonDropDown,{attrs:{\"button-label\":_vm.t('appLauncher.launch'),\"dropdown-options\":_setup.endpoints,\"title\":_vm.t('appLauncher.launchAnEndpointFromSelection')},on:{\"click-action\":(o) => _setup.openLink(o.value)}})]},proxy:true}])})\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { defineComponent as _defineComponent } from 'vue'\n\n// TODO(cjshearer): see if there are existing type definitions for k8s services\n// that we can use instead of manually providing the ones we need.\nexport type AppLauncherService = {\n id: string;\n metadata: {\n labels?: {\n /**\n * Helm chart name that created this app (if relevant).\n */\n 'helm.sh/chart'?: string;\n /**\n * The component of the app.\n *\n * See `app.kubernetes.io/component` from:\n * https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels\n */\n 'app.kubernetes.io/component'?: string;\n /**\n * The version of the app.\n *\n * See `app.kubernetes.io/version` from:\n * https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels\n */\n 'app.kubernetes.io/version'?: string;\n };\n /**\n * The name of the app.\n *\n * See `app.kubernetes.io/name` from:\n * https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels\n */\n name: string;\n /**\n * The namespace of the app.\n */\n namespace: string;\n };\n spec: {\n ports?: {\n name?: string;\n port: number;\n protocol: string;\n }[];\n };\n};\nconst __default__ = {\n layout: 'plain',\n};\n\nimport { Card } from '@components/Card';\nimport ButtonDropDown from '@shell/components/ButtonDropdown';\nimport { isMaybeSecure } from '@shell/utils/url';\nimport { computed } from 'vue';\n\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'AppLauncherCard',\n props: {\n clusterId: null,\n service: null\n },\n setup(__props: any) {\n\nconst props = __props as {\n clusterId: string;\n service: AppLauncherService;\n}\n\n\n\nconst endpoints = computed(\n () =>\n props.service.spec.ports?.map((port) => {\n const endpoint = `${\n isMaybeSecure(port.port, port.protocol) ? 'https' : 'http'\n }:${props.service.metadata.name}:${port.port}`;\n\n return {\n label: `${endpoint}${port.protocol === 'UDP' ? ' (UDP)' : ''}`,\n value: `k8s/clusters/${props.clusterId}/api/v1/namespaces/${props.service.metadata.namespace}/services/${endpoint}/proxy`,\n };\n }) ?? []\n);\n\nconst computedServiceName = computed(() => {\n if (props.service.metadata.labels?.['app.kubernetes.io/component']) {\n return props.service.metadata.labels['app.kubernetes.io/component'];\n }\n\n return props.service.metadata.name;\n});\n\nconst helmChart = computed(\n () => props.service.metadata.labels?.['helm.sh/chart']\n);\n\nconst kubernetesVersion = computed(\n () => props.service.metadata.labels?.['app.kubernetes.io/version']\n);\n\nconst name = computed(() => props.service.metadata.name);\n\nconst namespace = computed(() => props.service.metadata.namespace);\n\nconst openLink = (link: string) => {\n window.open(link);\n};\n\nreturn { __sfc: true,props, endpoints, computedServiceName, helmChart, kubernetesVersion, name, namespace, openLink, Card, ButtonDropDown }\n}\n\n})","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./AppLauncherCard.vue?vue&type=script&lang=ts&setup=true&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./AppLauncherCard.vue?vue&type=script&lang=ts&setup=true&\"","import { render, staticRenderFns } from \"./AppLauncherCard.vue?vue&type=template&id=32e07534&\"\nimport script from \"./AppLauncherCard.vue?vue&type=script&lang=ts&setup=true&\"\nexport * from \"./AppLauncherCard.vue?vue&type=script&lang=ts&setup=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import { defineComponent as _defineComponent } from 'vue'\n\nconst __default__ = {\n layout: 'plain',\n};\n\nimport { MANAGEMENT } from '@shell/config/types';\nimport { ref, onMounted, getCurrentInstance } from 'vue';\nimport Loading from '@shell/components/Loading';\nimport AppLauncherCard from '../components/AppLauncherCard.vue';\nimport type { AppLauncherService } from '../components/AppLauncherCard.vue';\n\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'app-launcher',\n setup(__props) {\n\nconst store = getCurrentInstance()?.proxy.$store;\n\nconst servicesByCluster = ref<\n { id: string; name: string; services: AppLauncherService[] }[]\n>([]);\n\nconst fetchServicesByCluster = async () => {\n const allClusters = await store.dispatch(`management/findAll`, {\n type: MANAGEMENT.CLUSTER,\n });\n\n servicesByCluster.value = await Promise.all(\n allClusters\n .filter((cluster) => cluster.isReady)\n .map(async (cluster) => ({\n name: `${store.getters['i18n/t']('nav.group.cluster')} ${\n cluster.spec.displayName\n }`,\n id: cluster.id,\n services: (\n await store.dispatch('cluster/request', {\n url: `/k8s/clusters/${cluster.id}/v1/services`,\n })\n ).data,\n }))\n );\n};\n\nonMounted(() => {\n fetchServicesByCluster();\n});\n\nreturn { __sfc: true,store, servicesByCluster, fetchServicesByCluster, Loading, AppLauncherCard }\n}\n\n})","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./app-launcher.vue?vue&type=script&lang=ts&setup=true&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./app-launcher.vue?vue&type=script&lang=ts&setup=true&\"","import { render, staticRenderFns } from \"./app-launcher.vue?vue&type=template&id=e23b720e&scoped=true&\"\nimport script from \"./app-launcher.vue?vue&type=script&lang=ts&setup=true&\"\nexport * from \"./app-launcher.vue?vue&type=script&lang=ts&setup=true&\"\nimport style0 from \"./app-launcher.vue?vue&type=style&index=0&id=e23b720e&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"e23b720e\",\n null\n \n)\n\nexport default component.exports","// style-loader: Adds some css to the DOM by adding a