kamaji-0.2.0.umd.min.js 36 KB

12345678
  1. (function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["kamaji-0.2.0"]=t():e["kamaji-0.2.0"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="1c25")}({"0ed3":function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},i=0;i<t.length;i++){var a=t[i],o=a[0],s=a[1],c=a[2],u=a[3],l={id:e+":"+i,css:s,media:c,sourceMap:u};r[o]?r[o].parts.push(l):n.push(r[o]={id:o,parts:[l]})}return n}n.r(t),n.d(t,"default",(function(){return h}));var i="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var a={},o=i&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,u=!1,l=function(){},d=null,p="data-vue-ssr-id",f="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(e,t,n,i){u=n,d=i||{};var o=r(e,t);return m(o),function(t){for(var n=[],i=0;i<o.length;i++){var s=o[i],c=a[s.id];c.refs--,n.push(c)}t?(o=r(e,t),m(o)):o=[];for(i=0;i<n.length;i++){c=n[i];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete a[c.id]}}}}function m(e){for(var t=0;t<e.length;t++){var n=e[t],r=a[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(v(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var o=[];for(i=0;i<n.parts.length;i++)o.push(v(n.parts[i]));a[n.id]={id:n.id,refs:1,parts:o}}}}function _(){var e=document.createElement("style");return e.type="text/css",o.appendChild(e),e}function v(e){var t,n,r=document.querySelector("style["+p+'~="'+e.id+'"]');if(r){if(u)return l;r.parentNode.removeChild(r)}if(f){var i=c++;r=s||(s=_()),t=E.bind(null,r,i,!1),n=E.bind(null,r,i,!0)}else r=_(),t=y.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var g=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function E(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=g(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function y(e,t){var n=t.css,r=t.media,i=t.sourceMap;if(r&&e.setAttribute("media",r),d.ssrId&&e.setAttribute(p,t.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{while(e.firstChild)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},"1c25":function(e,t,n){"use strict";if(n.r(t),"undefined"!==typeof window){var r=window.document.currentScript,i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}function a(e){}var o=function(){var e=this,t=e._self._c;return e.hasUrl?t("Console",{attrs:{url:e.consoleUrl}}):t("Install")},s=[];const c="count",u="networking.k8s.io.ingress",l="pod",d="service",p={DEPLOYMENT:"apps.deployment",CRON_JOB:"batch.cronjob",DAEMON_SET:"apps.daemonset",JOB:"batch.job",STATEFUL_SET:"apps.statefulset",REPLICA_SET:"apps.replicaset",REPLICATION_CONTROLLER:"replicationcontroller"},{DAEMON_SET:f,CRON_JOB:h,JOB:m,..._}=p,v={AUTH_CONFIG:"management.cattle.io.authconfig",CATALOG_TEMPLATE:"management.cattle.io.catalogtemplate",CLUSTER:"management.cattle.io.cluster",CLUSTER_ROLE_TEMPLATE_BINDING:"management.cattle.io.clusterroletemplatebinding",FEATURE:"management.cattle.io.feature",KONTAINER_DRIVER:"management.cattle.io.kontainerdriver",MULTI_CLUSTER_APP:"management.cattle.io.multiclusterapp",NODE:"management.cattle.io.node",NODE_DRIVER:"management.cattle.io.nodedriver",NODE_POOL:"management.cattle.io.nodepool",NODE_TEMPLATE:"management.cattle.io.nodetemplate",PROJECT:"management.cattle.io.project",PROJECT_ROLE_TEMPLATE_BINDING:"management.cattle.io.projectroletemplatebinding",ROLE_TEMPLATE:"management.cattle.io.roletemplate",SETTING:"management.cattle.io.setting",USER:"management.cattle.io.user",TOKEN:"management.cattle.io.token",GLOBAL_ROLE:"management.cattle.io.globalrole",GLOBAL_ROLE_BINDING:"management.cattle.io.globalrolebinding",PSA:"management.cattle.io.podsecurityadmissionconfigurationtemplate",MANAGED_CHART:"management.cattle.io.managedchart",USER_NOTIFICATION:"management.cattle.io.rancherusernotification",GLOBAL_DNS_PROVIDER:"management.cattle.io.globaldnsprovider",RKE_TEMPLATE:"management.cattle.io.clustertemplate",RKE_TEMPLATE_REVISION:"management.cattle.io.clustertemplaterevision"};var g=function(){var e=this,t=e._self._c;return t("div",[t("h2",[e._v("Overview")]),e._m(0),t("a",{staticClass:"card",attrs:{href:e.computedUrl,target:"_blank"}},[t("svg",{staticClass:"open-link",attrs:{width:"1.5rem",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"}},[t("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"}})]),t("svg",{attrs:{id:"E",xmlns:"http://www.w3.org/2000/svg",width:"60px",viewBox:"0 0 800 800"}},[t("path",{attrs:{color:"currentColor",d:"m400,56.72c-192.15,0-348.5,154.01-348.5,343.26s156.35,343.3,348.5,343.3,348.5-154.01,348.5-343.3S592.15,56.72,400,56.72ZM117.24,267.04c50.56-103.58,158.3-175.27,282.76-175.27s232.2,71.69,282.76,175.27c1.3,2.7-2.31,5.01-4.16,2.7-58.85-74.81-161.62-124.36-278.6-124.36s-219.75,49.55-278.6,124.36c-1.85,2.31-5.46,0-4.16-2.7Zm523.66,20.6c-5.2,5.71-16.79,3.63-25.89-4.65-9.1-8.28-12.26-19.63-7.05-25.34,5.2-5.71,16.79-3.63,25.89,4.65s12.26,19.63,7.05,25.34Zm-46.33-45.12c-5.78,11.64-23.35,14.67-39.24,6.77-15.89-7.9-24.08-23.73-18.3-35.37s23.35-14.67,39.24-6.77c15.89,7.9,24.08,23.73,18.3,35.37Zm-92.35,47.6c0,23.77-19.31,43.11-43.11,43.11s-43.11-19.34-43.11-43.11,19.34-43.11,43.11-43.11,43.11,19.34,43.11,43.11Zm-118.21,0c0,23.77-19.34,43.11-43.11,43.11s-43.14-19.34-43.14-43.11,19.34-43.11,43.14-43.11,43.11,19.34,43.11,43.11Zm217.8,345.57c-54.59,45.22-125.01,72.53-201.8,72.53s-147.21-27.31-201.8-72.53c-2.34-1.98.26-5.66,2.89-4.03,55.37,34.04,124.26,54.23,198.91,54.23s143.54-20.19,198.91-54.23c2.63-1.63,5.23,2.05,2.89,4.03Zm26.95-173.84c.1.03,10.27,3.87,21.62,13.26-4.45-.52-9.53-.94-14.01-.81l-10.01.29,8.03,6.01c.23.16,21.46,16.13,34.92,27.93-15.77-3.12-46.91-8.71-71.75-10.05l-9.2-.46,6.57,6.47c.19.2,19.96,19.9,30.11,42.07-6.4-3.48-15.18-8-21.82-10.34l-7.9-2.76,3.54,7.58c.06.13,5.59,11.9,9.92,21.62-8.75-4.23-22.82-11.02-30.5-14.24l-13.43-5.66,9.36,11.15s15.61,18.5,26.46,31.44c-20.55-7.15-65.77-24.29-82.03-41.68l-17.52-18.73,11.83,22.76c.13.23,11.77,22.53,22.21,39.57-11.18-8.36-26.33-20.29-34.5-29.29l-12.61-13.92,6.76,17.56c.03.13,4.45,11.57,9.56,22.99-21-20.22-62.65-62.23-101.6-112.69l-2.76-3.58-2.76,3.58c-38.95,50.46-80.6,92.46-101.6,112.69,5.1-11.41,9.53-22.86,9.56-22.99l6.76-17.56-12.62,13.92c-8.16,9.01-23.31,20.94-34.5,29.29,10.44-17.04,22.08-39.34,22.21-39.6l11.83-22.73-17.52,18.73c-16.26,17.39-61.48,34.53-82.03,41.68,10.89-12.94,26.47-31.44,26.47-31.44l9.36-11.15-13.43,5.66c-7.51,3.19-20.97,9.62-30.5,14.24,4.32-9.72,9.85-21.49,9.92-21.62l3.54-7.58-7.9,2.76c-6.63,2.34-15.41,6.86-21.82,10.34,10.14-22.17,29.88-41.88,30.11-42.07l6.57-6.47-9.23.46c-24.81,1.33-55.95,6.93-71.72,10.05,13.46-11.8,34.69-27.77,34.92-27.93l8.03-6.01-10.01-.29c-4.45-.13-9.56.29-14.01.81,11.35-9.4,21.52-13.23,21.62-13.26l12.16-4.49-12.75-2.24c-13.79-2.44-40.54-1.5-55.34-.91,17.82-13.56,47.92-28.68,48.22-28.81l6.27-3.15-6.27-3.12c-9.49-4.78-27.86-9.88-41.68-13.36,11.96-.98,23.57-1.11,23.7-1.11l12.39-.13-10.63-6.4c-14.99-8.97-30.79-15.22-41.71-18.95,31.67-4.06,67.24-1.85,67.63-1.82l17.62,1.14-15.87-7.8c-6.01-2.96-12.39-5.62-18.99-8,23.25-3.28,47.6-3.35,47.86-3.35h15.51l-13.98-6.66c-12.48-5.95-35.63-13.53-51.14-18.37,23.93-1.53,45.71-1.95,45.97-1.95l8.81-.16-6.5-5.95c-1.95-1.76-4.39-3.61-7.32-5.56,124.85,12.35,202.26,55.76,203.07,56.21l1.72.98,1.72-.98c.81-.45,78.22-43.86,203.07-56.21-2.93,1.95-5.36,3.8-7.32,5.56l-6.5,5.95,8.81.16c.23,0,22.04.42,45.97,1.95-15.51,4.84-38.66,12.42-51.14,18.37l-13.98,6.66h15.51c.26,0,24.61.07,47.89,3.35-5.2,1.85-11.96,4.52-19.02,8l-15.87,7.8,17.62-1.14c.39-.03,35.93-2.24,67.63,1.82-10.92,3.74-26.72,9.98-41.71,18.95l-10.63,6.4,12.39.13c.13,0,11.74.13,23.7,1.11-13.82,3.48-32.19,8.62-41.68,13.36l-6.27,3.12,6.27,3.15c.29.13,30.4,15.25,48.15,29-14.73-.78-41.49-1.72-55.27.72l-12.74,2.24,12.16,4.49Z"}})]),e._m(1)])])},E=[function(){var e=this,t=e._self._c;return t("p",[e._v("Powered by: "),t("a",{attrs:{href:"https://clastix.io/",target:"_blank"}},[e._v("Clastix")])])},function(){var e=this,t=e._self._c;return t("div",[t("h3",[e._v("Kamaji Console")]),t("p",[e._v(" Deploys and operates Kubernetes Control Plane at scale with a fraction of the operational burden ")])])}],y={props:{url:String},components:{},data(){return{computedUrl:`https://${this.url}/ui`}}},b=y;n("9344");function R(e,t,n,r,i,a,o,s){var c,u="function"===typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),o?(c=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(e,t){return c.call(t),l(e,t)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,c):[c]}return{exports:e,options:u}}var T=R(b,g,E,!1,null,"43f234ee",null),N=T.exports,S=function(){var e=this,t=e._self._c;return t("div",{staticClass:"main"},[t("h2",[e._v("Kamaji and Kamaji Console are not installed")]),e._m(0),t("div",{staticClass:"install-checks"},[t("div",[t("input",{directives:[{name:"model",rawName:"v-model",value:e.certManagerInstalled,expression:"certManagerInstalled"}],attrs:{id:"cert-manager",type:"checkbox",disabled:""},domProps:{checked:Array.isArray(e.certManagerInstalled)?e._i(e.certManagerInstalled,null)>-1:e.certManagerInstalled},on:{change:function(t){var n=e.certManagerInstalled,r=t.target,i=!!r.checked;if(Array.isArray(n)){var a=null,o=e._i(n,a);r.checked?o<0&&(e.certManagerInstalled=n.concat([a])):o>-1&&(e.certManagerInstalled=n.slice(0,o).concat(n.slice(o+1)))}else e.certManagerInstalled=i}}}),t("label",{attrs:{for:"cert-manager"}},[e._v("cert-manager")])]),t("div",[t("input",{directives:[{name:"model",rawName:"v-model",value:e.kamajiInstalled,expression:"kamajiInstalled"}],attrs:{id:"cert-manager",type:"checkbox",disabled:""},domProps:{checked:Array.isArray(e.kamajiInstalled)?e._i(e.kamajiInstalled,null)>-1:e.kamajiInstalled},on:{change:function(t){var n=e.kamajiInstalled,r=t.target,i=!!r.checked;if(Array.isArray(n)){var a=null,o=e._i(n,a);r.checked?o<0&&(e.kamajiInstalled=n.concat([a])):o>-1&&(e.kamajiInstalled=n.slice(0,o).concat(n.slice(o+1)))}else e.kamajiInstalled=i}}}),t("label",{attrs:{for:"cert-manager"}},[e._v("kamaji")])]),t("div",[t("input",{directives:[{name:"model",rawName:"v-model",value:e.console,expression:"console"}],attrs:{id:"cert-manager",type:"checkbox",disabled:""},domProps:{checked:Array.isArray(e.console)?e._i(e.console,null)>-1:e.console},on:{change:function(t){var n=e.console,r=t.target,i=!!r.checked;if(Array.isArray(n)){var a=null,o=e._i(n,a);r.checked?o<0&&(e.console=n.concat([a])):o>-1&&(e.console=n.slice(0,o).concat(n.slice(o+1)))}else e.console=i}}}),t("label",{attrs:{for:"cert-manager"}},[e._v("kamaji console")])])])])},O=[function(){var e=this,t=e._self._c;return t("p",[e._v(" Please complete the installation process "),t("a",{attrs:{href:"https://kamaji.clastix.io/",target:"_blank"}},[e._v(" following this guide ")]),e._v(". ")])}],I=n("9ce4");async function A(e,t){const n=Object.keys(e),r=Object.values(e),i=await Promise[t](r),a={};for(let o=0;o<n.length;o++)a[n[o]]=i[o];return a}function C(e){return A(e,"all")}const w={enabled:!1,enabledInterval:!0,interval:300,enabledOnNavigate:!0,ageThreshold:120,countThreshold:500},L={VERSION_RANCHER:"server-version",VERSION_CLI:"cli-version",VERSION_MACHINE:"machine-version",VERSION_HELM:"helm-version",CLI_URL:{DARWIN:"cli-url-darwin",WINDOWS:"cli-url-windows",LINUX:"cli-url-linux"},API_HOST:"api-host",CA_CERTS:"cacerts",HIDE_LOCAL_CLUSTER:"hide-local-cluster",AUTH_TOKEN_MAX_TTL_MINUTES:"auth-token-max-ttl-minutes",KUBECONFIG_GENERATE_TOKEN:"kubeconfig-generate-token",KUBECONFIG_DEFAULT_TOKEN_TTL_MINUTES:"kubeconfig-default-token-ttl-minutes",ENGINE_URL:"engine-install-url",ENGINE_ISO_URL:"engine-iso-url",FIRST_LOGIN:"first-login",INGRESS_IP_DOMAIN:"ingress-ip-domain",SERVER_URL:"server-url",RKE_METADATA_CONFIG:"rke-metadata-config",TELEMETRY:"telemetry-opt",EULA_AGREED:"eula-agreed",AUTH_USER_INFO_MAX_AGE_SECONDS:"auth-user-info-max-age-seconds",AUTH_USER_SESSION_TTL_MINUTES:"auth-user-session-ttl-minutes",AUTH_USER_INFO_RESYNC_CRON:"auth-user-info-resync-cron",AUTH_LOCAL_VALIDATE_DESC:"auth-password-requirements-description",PASSWORD_MIN_LENGTH:"password-min-length",CLUSTER_TEMPLATE_ENFORCEMENT:"cluster-template-enforcement",UI_INDEX:"ui-index",UI_DASHBOARD_INDEX:"ui-dashboard-index",UI_DASHBOARD_HARVESTER_LEGACY_PLUGIN:"ui-dashboard-harvester-legacy-plugin",UI_OFFLINE_PREFERRED:"ui-offline-preferred",SYSTEM_DEFAULT_REGISTRY:"system-default-registry",UI_ISSUES:"ui-issues",PL:"ui-pl",PL_RANCHER_VALUE:"rancher",SUPPORTED:"has-support",BANNERS:"ui-banners",ISSUES:"ui-issues",BRAND:"ui-brand",LOGO_LIGHT:"ui-logo-light",LOGO_DARK:"ui-logo-dark",PRIMARY_COLOR:"ui-primary-color",LINK_COLOR:"ui-link-color",COMMUNITY_LINKS:"ui-community-links",FAVICON:"ui-favicon",UI_PERFORMANCE:"ui-performance",UI_CUSTOM_LINKS:"ui-custom-links",UI_SUPPORTED_K8S_VERSIONS:"ui-k8s-supported-versions-range",THEME:"ui-theme",SYSTEM_NAMESPACES:"system-namespaces",CLUSTER_AGENT_DEFAULT_AFFINITY:"cluster-agent-default-affinity",FLEET_AGENT_DEFAULT_AFFINITY:"fleet-agent-default-affinity",ADD_EXTENSION_REPOS_BANNER_DISPLAY:"display-add-extension-repos-banner"},M=(L.CA_CERTS,L.ENGINE_URL,L.ENGINE_ISO_URL,L.PASSWORD_MIN_LENGTH,L.INGRESS_IP_DOMAIN,L.AUTH_USER_INFO_MAX_AGE_SECONDS,L.AUTH_USER_SESSION_TTL_MINUTES,L.AUTH_TOKEN_MAX_TTL_MINUTES,L.KUBECONFIG_GENERATE_TOKEN,L.KUBECONFIG_DEFAULT_TOKEN_TTL_MINUTES,L.AUTH_USER_INFO_RESYNC_CRON,L.SERVER_URL,L.RKE_METADATA_CONFIG,L.SYSTEM_DEFAULT_REGISTRY,L.UI_INDEX,L.UI_DASHBOARD_INDEX,L.UI_OFFLINE_PREFERRED,L.BRAND,L.CLUSTER_TEMPLATE_ENFORCEMENT,L.TELEMETRY,L.HIDE_LOCAL_CLUSTER,{inactivity:{enabled:!1,threshold:900},incrementalLoading:{enabled:!0,threshold:1500},manualRefresh:{enabled:!1,threshold:1500},disableWebsocketNotification:!0,garbageCollection:w,forceNsFilterV2:{enabled:!1},advancedWorker:{enabled:!1},kubeAPI:{warningHeader:{separator:"299 - ",notificationBlockList:["299 - unknown field"]}}}),U="ns",k="project",x=U+"://",j=k+"://",P="ResourceList",D=e=>{const t=e["management/byId"](v.SETTING,L.UI_PERFORMANCE);let n={};if(null!==t&&void 0!==t&&t.value)try{n=JSON.parse(t.value)}catch(r){console.warn("ui-performance setting contains invalid data")}return Object.assign(M,n||{})};function F(e,t,n){return t=$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e){var t=G(e,"string");return"symbol"===typeof t?t:String(t)}function G(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class H{isApplicable(e){return Array.isArray(e.namespaced)}isEnabled(e){var t;const n=e["currentProduct"];if("cluster"!==(null===n||void 0===n?void 0:n.inStore))return!1;if(null!==n&&void 0!==n&&n.showWorkspaceSwitcher)return!1;const r=D(e);return!(null===(t=r.forceNsFilterV2)||void 0===t||!t.enabled)}checkAndCreateParam(e){return this.isApplicable(e)?this.createParam(e.namespaced):""}createParam(e){if(!e||!e.length)return"";const t=e.map(e=>e.replace(x,"").replace(j,"")).join(",");return`${H.param}=${t}`}}F(H,"param","projectsornamespaces");var B=new H,K={data(){return{forceUpdateLiveAndDelayed:0}},computed:{...Object(I["a"])(["currentProduct","currentCluster","namespaceFilters"]),namespaceFilterRequired(){return this.__namespaceRequired&&!this.__validFilter},namespaceFilter(){return this.__namespaceRequired?this.__validFilter:""},__validFilter(){const e=this.namespaceFilters.length&&this.namespaceFilters.every(e=>e.startsWith(U)||e.startsWith(k));return e?this.namespaceFilters:null},__namespaceRequired(){return!!B.isEnabled(this.$store.getters)&&this.__areResourcesNamespaced},__areResourcesNamespaced(){return"cluster"===this.currentProduct.inStore&&(this.loadResources||[]).every(e=>{var t;const n=this.$store.getters["cluster/schemaFor"](e);return null===n||void 0===n||null===(t=n.attributes)||void 0===t?void 0:t.namespaced})}},watch:{async namespaceFilter(e){e&&(this.$options.name!==P&&this.$fetch&&await this.$fetch(),this.forceUpdateLiveAndDelayed=(new Date).getTime())}}};const V=4;var Y={mixins:[K],data(){const e=this.$store.getters["management/byId"](v.SETTING,L.UI_PERFORMANCE);let t={};if(e&&e.value)try{t=JSON.parse(e.value)}catch(n){console.warn("ui-performance setting contains invalid data")}else t=M;return{perfConfig:t,init:!1,multipleResources:[],loadResources:[this.resource],hasManualRefresh:!1,watch:!0,isTooManyItemsToAutoUpdate:!1,force:!1,incremental:!1,fetchedResourceType:[]}},beforeDestroy(){this.init&&(this.$store.dispatch("resource-fetch/clearData"),this.fetchedResourceType.forEach(e=>{this.$store.dispatch(e.currStore+"/incrementLoadCounter",e.type)}))},computed:{...Object(I["a"])({refreshFlag:"resource-fetch/refreshFlag"}),rows(){const e=this.fetchedResourceType.find(e=>e.type===this.resource);return e?this.$store.getters[e.currStore+"/all"](this.resource):[]},loading(){return!this.rows.length&&this.$fetchState.pending}},watch:{refreshFlag(e){this.init&&e&&this.$fetch()}},methods:{$initializeFetchData(e,t=[],n){if(!this.init){const r=n||this.$store.getters["currentStore"]();this.__gatherResourceFetchData(e,t,r),this.watch||(this.force=!0),this.isTooManyItemsToAutoUpdate&&(this.hasManualRefresh=!0)}},$fetchType(e,t=[],n){var r;const i=n||this.$store.getters["currentStore"]();this.$initializeFetchData(e,t,i),this.fetchedResourceType.find(t=>t.type===e)||this.fetchedResourceType.push({type:e,currStore:i});let a=0;if(this.incremental){const t=this.__getCountForResources([e],this.namespaceFilter,i);a=Math.ceil(t/V)}const o={incremental:a,watch:this.watch,force:this.force,hasManualRefresh:this.hasManualRefresh},s=this.$store.getters[i+"/schemaFor"](e);return null!==s&&void 0!==s&&null!==(r=s.attributes)&&void 0!==r&&r.namespaced&&(o.namespaced=this.namespaceFilter),this.$store.dispatch(i+"/findAll",{type:e,opt:o})},__getCountForResources(e,t,n){const r=n||this.$store.getters["currentStore"]();return e.reduce((e,n)=>e+this.__getCountForResource(n,t,r),0)},__getCountForResource(e,t,n){var r,i,a;const o=null===(r=this.$store.getters[n+"/all"](c)[0])||void 0===r?void 0:r.counts[""+e],s=t&&null!==o&&void 0!==o&&o.namespaces?null===o||void 0===o||null===(i=o.namespaces[t])||void 0===i?void 0:i.count:null===o||void 0===o||null===(a=o.summary)||void 0===a?void 0:a.count;return s||0},__gatherResourceFetchData(e,t,n){var r,i,a,o,s,c,u,l;this.init=!0;const d=null===(r=this.perfConfig)||void 0===r||null===(i=r.manualRefresh)||void 0===i?void 0:i.enabled,p=parseInt((null===(a=this.perfConfig)||void 0===a||null===(o=a.manualRefresh)||void 0===o?void 0:o.threshold)||"0",10),f=null===(s=this.perfConfig)||void 0===s||null===(c=s.incrementalLoading)||void 0===c?void 0:c.enabled,h=parseInt((null===(u=this.perfConfig)||void 0===u||null===(l=u.incrementalLoading)||void 0===l?void 0:l.threshold)||"0",10);this.multipleResources=t;let m=0,_=!0,v=!1,g=!1;const E=this.multipleResources.length?this.multipleResources:[e];m=this.__getCountForResources(E,this.namespaceFilter,n),d&&m>=p&&(_=!1,v=!0),g=f&&h>0&&m>=h,this.$store.dispatch("resource-fetch/updateIsTooManyItems",v),this.watch=_,this.isTooManyItemsToAutoUpdate=v,this.incremental=g}}},X={async fetch(){const e=[this.$fetchType(d)];await C(e)},mixins:[Y],data(){return{console:!1}},computed:{...Object(I["a"])(["currentCluster","currentProduct"]),...Object(I["a"])({allRepos:"catalog/repos"}),certManagerInstalled(){return!!this.$store.getters[this.currentProduct.inStore+"/schemaFor"]("cert-manager.io.certificate")},kamajiInstalled(){return!!this.$store.getters[this.currentProduct.inStore+"/schemaFor"]("kamaji.clastix.io.tenantcontrolplane")}}},J=X,W=(n("f666"),R(J,S,O,!1,null,null,null)),Z=W.exports,q={name:"KamajiDashboard",async beforeMount(){var e;const t=await this.$store.dispatch("cluster/findMatching",{type:u,selector:"app=kamaji-console"}),n=t[0];this.consoleUrl=null===n||void 0===n||null===(e=n.spec.rules[0])||void 0===e?void 0:e.host},components:{Console:N,Install:Z},data(){return{consoleUrl:""}},computed:{hasUrl(){return!!this.consoleUrl}}},z=q,Q=R(z,o,s,!1,null,null,null),ee=Q.exports,te=n("90cd");const ne=[{name:"c-cluster-"+te["b"],path:"/c/:cluster/"+te["b"],meta:{product:te["b"],pkg:te["b"]},component:ee}];var re=function(e){a(e),e.metadata=n("9224"),e.addProduct(n("85d6")),e.addRoutes(ne)};t["default"]=re},"43ca":function(e,t,n){e.exports=n.p+"img/icon.ccfe9b3e.svg"},"5eaa":function(e,t,n){"use strict";function r(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"===typeof btoa){var a=i(r),o=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(o).concat([a]).join("\n")}return[n].join("\n")}function i(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(n," */")}e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=r(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"===typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(i[o]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);r&&i[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},"7d15":function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},"85d6":function(e,t,n){"use strict";n.r(t),n.d(t,"init",(function(){return a}));var r=n("90cd");const i=n("43ca");function a(e,t){const{product:n,virtualType:a,basicType:o}=e.DSL(t,r["b"]);n({inStore:"cluster",inExplorer:!0,icon:i,removeable:!1,showNamespaceFilter:!0}),a({name:r["a"],namespaced:!1,weight:99,overview:!0,route:{name:"c-cluster-"+r["b"],params:{product:r["b"]},meta:{product:r["b"],pkg:r["b"]}}}),o([r["a"]])}},8985:function(e,t,n){var r=n("8a7f");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var i=n("0ed3").default;i("53ec0e80",r,!0,{sourceMap:!1,shadowMode:!1})},"8a7f":function(e,t,n){var r=n("5eaa");t=r(!1),t.push([e.i,"pre{text-align:left}.main{text-align:center;margin:0 auto;width:100%}.install-checks{margin:20px auto;gap:20px;font-size:medium;display:flex;justify-content:center;align-items:center;width:100%}",""]),e.exports=t},"90cd":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));const r="dashboard",i="kamaji"},9224:function(e){e.exports=JSON.parse('{"name":"kamaji","description":"Deploys and operates Kubernetes Control Plane at scale with a fraction of the operational burden","icon":"https://raw.githubusercontent.com/clastix/rancher-extension-clastix/main/pkg/kamaji/assets/icon-kamaji.svg","version":"0.2.0","private":false,"rancher":true,"scripts":{"dev":"./node_modules/.bin/nuxt dev","nuxt":"./node_modules/.bin/nuxt"},"engines":{"node":">=12"},"devDependencies":{"@vue/cli-plugin-babel":"4.5.18","@vue/cli-service":"4.5.18","@vue/cli-plugin-typescript":"4.5.18"},"browserslist":["> 1%","last 2 versions","not dead"]}')},9344:function(e,t,n){"use strict";n("a516")},"9ce4":function(e,t,n){"use strict";(function(e){
  2. /*!
  3. * vuex v3.6.2
  4. * (c) 2021 Evan You
  5. * @license MIT
  6. */
  7. function r(e){var t=Number(e.version.split(".")[0]);if(t>=2)e.mixin({beforeCreate:r});else{var n=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[r].concat(e.init):r,n.call(this,e)}}function r(){var e=this.$options;e.store?this.$store="function"===typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}}n.d(t,"a",(function(){return L}));var i="undefined"!==typeof window?window:"undefined"!==typeof e?e:{},a=i.__VUE_DEVTOOLS_GLOBAL_HOOK__;function o(e){a&&(e._devtoolHook=a,a.emit("vuex:init",e),a.on("vuex:travel-to-state",(function(t){e.replaceState(t)})),e.subscribe((function(e,t){a.emit("vuex:mutation",e,t)}),{prepend:!0}),e.subscribeAction((function(e,t){a.emit("vuex:action",e,t)}),{prepend:!0}))}function s(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function c(e){return null!==e&&"object"===typeof e}function u(e){return e&&"function"===typeof e.then}function l(e,t){return function(){return e(t)}}var d=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"===typeof n?n():n)||{}},p={namespaced:{configurable:!0}};p.namespaced.get=function(){return!!this._rawModule.namespaced},d.prototype.addChild=function(e,t){this._children[e]=t},d.prototype.removeChild=function(e){delete this._children[e]},d.prototype.getChild=function(e){return this._children[e]},d.prototype.hasChild=function(e){return e in this._children},d.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},d.prototype.forEachChild=function(e){s(this._children,e)},d.prototype.forEachGetter=function(e){this._rawModule.getters&&s(this._rawModule.getters,e)},d.prototype.forEachAction=function(e){this._rawModule.actions&&s(this._rawModule.actions,e)},d.prototype.forEachMutation=function(e){this._rawModule.mutations&&s(this._rawModule.mutations,e)},Object.defineProperties(d.prototype,p);var f=function(e){this.register([],e,!1)};function h(e,t,n){if(t.update(n),n.modules)for(var r in n.modules){if(!t.getChild(r))return void 0;h(e.concat(r),t.getChild(r),n.modules[r])}}f.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},f.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return t=t.getChild(n),e+(t.namespaced?n+"/":"")}),"")},f.prototype.update=function(e){h([],this.root,e)},f.prototype.register=function(e,t,n){var r=this;void 0===n&&(n=!0);var i=new d(t,n);if(0===e.length)this.root=i;else{var a=this.get(e.slice(0,-1));a.addChild(e[e.length-1],i)}t.modules&&s(t.modules,(function(t,i){r.register(e.concat(i),t,n)}))},f.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],r=t.getChild(n);r&&r.runtime&&t.removeChild(n)},f.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var m;var _=function(e){var t=this;void 0===e&&(e={}),!m&&"undefined"!==typeof window&&window.Vue&&w(window.Vue);var n=e.plugins;void 0===n&&(n=[]);var r=e.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new f(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new m,this._makeLocalGettersCache=Object.create(null);var i=this,a=this,s=a.dispatch,c=a.commit;this.dispatch=function(e,t){return s.call(i,e,t)},this.commit=function(e,t,n){return c.call(i,e,t,n)},this.strict=r;var u=this._modules.root.state;b(this,u,[],this._modules.root),y(this,u),n.forEach((function(e){return e(t)}));var l=void 0!==e.devtools?e.devtools:m.config.devtools;l&&o(this)},v={state:{configurable:!0}};function g(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function E(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;b(e,n,[],e._modules.root,!0),y(e,n,t)}function y(e,t,n){var r=e._vm;e.getters={},e._makeLocalGettersCache=Object.create(null);var i=e._wrappedGetters,a={};s(i,(function(t,n){a[n]=l(t,e),Object.defineProperty(e.getters,n,{get:function(){return e._vm[n]},enumerable:!0})}));var o=m.config.silent;m.config.silent=!0,e._vm=new m({data:{$$state:t},computed:a}),m.config.silent=o,e.strict&&I(e),r&&(n&&e._withCommit((function(){r._data.$$state=null})),m.nextTick((function(){return r.$destroy()})))}function b(e,t,n,r,i){var a=!n.length,o=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[o],e._modulesNamespaceMap[o]=r),!a&&!i){var s=A(t,n.slice(0,-1)),c=n[n.length-1];e._withCommit((function(){m.set(s,c,r.state)}))}var u=r.context=R(e,o,n);r.forEachMutation((function(t,n){var r=o+n;N(e,r,t,u)})),r.forEachAction((function(t,n){var r=t.root?n:o+n,i=t.handler||t;S(e,r,i,u)})),r.forEachGetter((function(t,n){var r=o+n;O(e,r,t,u)})),r.forEachChild((function(r,a){b(e,t,n.concat(a),r,i)}))}function R(e,t,n){var r=""===t,i={dispatch:r?e.dispatch:function(n,r,i){var a=C(n,r,i),o=a.payload,s=a.options,c=a.type;return s&&s.root||(c=t+c),e.dispatch(c,o)},commit:r?e.commit:function(n,r,i){var a=C(n,r,i),o=a.payload,s=a.options,c=a.type;s&&s.root||(c=t+c),e.commit(c,o,s)}};return Object.defineProperties(i,{getters:{get:r?function(){return e.getters}:function(){return T(e,t)}},state:{get:function(){return A(e.state,n)}}}),i}function T(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,r)===t){var a=i.slice(r);Object.defineProperty(n,a,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function N(e,t,n,r){var i=e._mutations[t]||(e._mutations[t]=[]);i.push((function(t){n.call(e,r.state,t)}))}function S(e,t,n,r){var i=e._actions[t]||(e._actions[t]=[]);i.push((function(t){var i=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},t);return u(i)||(i=Promise.resolve(i)),e._devtoolHook?i.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):i}))}function O(e,t,n,r){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return n(r.state,r.getters,e.state,e.getters)})}function I(e){e._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}function A(e,t){return t.reduce((function(e,t){return e[t]}),e)}function C(e,t,n){return c(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}function w(e){m&&e===m||(m=e,r(m))}v.state.get=function(){return this._vm._data.$$state},v.state.set=function(e){0},_.prototype.commit=function(e,t,n){var r=this,i=C(e,t,n),a=i.type,o=i.payload,s=(i.options,{type:a,payload:o}),c=this._mutations[a];c&&(this._withCommit((function(){c.forEach((function(e){e(o)}))})),this._subscribers.slice().forEach((function(e){return e(s,r.state)})))},_.prototype.dispatch=function(e,t){var n=this,r=C(e,t),i=r.type,a=r.payload,o={type:i,payload:a},s=this._actions[i];if(s){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(o,n.state)}))}catch(u){0}var c=s.length>1?Promise.all(s.map((function(e){return e(a)}))):s[0](a);return new Promise((function(e,t){c.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(o,n.state)}))}catch(u){0}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(o,n.state,e)}))}catch(u){0}t(e)}))}))}},_.prototype.subscribe=function(e,t){return g(e,this._subscribers,t)},_.prototype.subscribeAction=function(e,t){var n="function"===typeof e?{before:e}:e;return g(n,this._actionSubscribers,t)},_.prototype.watch=function(e,t,n){var r=this;return this._watcherVM.$watch((function(){return e(r.state,r.getters)}),t,n)},_.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},_.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"===typeof e&&(e=[e]),this._modules.register(e,t),b(this,this.state,e,this._modules.get(e),n.preserveState),y(this,this.state)},_.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=A(t.state,e.slice(0,-1));m.delete(n,e[e.length-1])})),E(this)},_.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),this._modules.isRegistered(e)},_.prototype.hotUpdate=function(e){this._modules.update(e),E(this,!0)},_.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(_.prototype,v);k((function(e,t){var n={};return M(t).forEach((function(t){var r=t.key,i=t.val;n[r]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var r=x(this.$store,"mapState",e);if(!r)return;t=r.context.state,n=r.context.getters}return"function"===typeof i?i.call(this,t,n):t[i]},n[r].vuex=!0})),n})),k((function(e,t){var n={};return M(t).forEach((function(t){var r=t.key,i=t.val;n[r]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var r=this.$store.commit;if(e){var a=x(this.$store,"mapMutations",e);if(!a)return;r=a.context.commit}return"function"===typeof i?i.apply(this,[r].concat(t)):r.apply(this.$store,[i].concat(t))}})),n}));var L=k((function(e,t){var n={};return M(t).forEach((function(t){var r=t.key,i=t.val;i=e+i,n[r]=function(){if(!e||x(this.$store,"mapGetters",e))return this.$store.getters[i]},n[r].vuex=!0})),n}));k((function(e,t){var n={};return M(t).forEach((function(t){var r=t.key,i=t.val;n[r]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var r=this.$store.dispatch;if(e){var a=x(this.$store,"mapActions",e);if(!a)return;r=a.context.dispatch}return"function"===typeof i?i.apply(this,[r].concat(t)):r.apply(this.$store,[i].concat(t))}})),n}));function M(e){return U(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function U(e){return Array.isArray(e)||c(e)}function k(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function x(e,t,n){var r=e._modulesNamespaceMap[n];return r}}).call(this,n("7d15"))},a516:function(e,t,n){var r=n("e673");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var i=n("0ed3").default;i("08a9f9c0",r,!0,{sourceMap:!1,shadowMode:!1})},e673:function(e,t,n){var r=n("5eaa");t=r(!1),t.push([e.i,".card[data-v-43f234ee]{background-color:#fff;color:#000!important;position:relative;color:inherit;text-decoration:none;margin-top:10px;border:1px solid #eee;border-radius:1rem;padding:1rem;border-left:1rem solid #add8e6;display:grid;grid-template-columns:auto 1fr;gap:10px;max-width:30rem}.card[data-v-43f234ee]:hover{background-color:#add8e6}.card h3[data-v-43f234ee]{color:#000}.card .open-link[data-v-43f234ee]{position:absolute;top:1rem;right:1rem}",""]),e.exports=t},f666:function(e,t,n){"use strict";n("8985")}})}));
  8. //# sourceMappingURL=kamaji-0.2.0.umd.min.js.map