12345678 |
- (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["kamaji-0.1.2"]=e():t["kamaji-0.1.2"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var a=e[r]={i:r,l:!1,exports:{}};return t[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(r,a,function(e){return t[e]}.bind(null,a));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="1c25")}({"0b4b":function(t,e,n){var r=n("5eaa");e=r(!1),e.push([t.i,".card[data-v-1cc1b31b]{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-1cc1b31b]:hover{background-color:#add8e6}.card h3[data-v-1cc1b31b]{color:#000}.card .open-link[data-v-1cc1b31b]{position:absolute;top:1rem;right:1rem}",""]),t.exports=e},"0ed3":function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},a=0;a<e.length;a++){var o=e[a],i=o[0],s=o[1],c=o[2],l=o[3],u={id:t+":"+a,css:s,media:c,sourceMap:l};r[i]?r[i].parts.push(u):n.push(r[i]={id:i,parts:[u]})}return n}n.r(e),n.d(e,"default",(function(){return f}));var a="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!a)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 o={},i=a&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,l=!1,u=function(){},d=null,h="data-vue-ssr-id",p="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(t,e,n,a){l=n,d=a||{};var i=r(t,e);return m(i),function(e){for(var n=[],a=0;a<i.length;a++){var s=i[a],c=o[s.id];c.refs--,n.push(c)}e?(i=r(t,e),m(i)):i=[];for(a=0;a<n.length;a++){c=n[a];if(0===c.refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete o[c.id]}}}}function m(t){for(var e=0;e<t.length;e++){var n=t[e],r=o[n.id];if(r){r.refs++;for(var a=0;a<r.parts.length;a++)r.parts[a](n.parts[a]);for(;a<n.parts.length;a++)r.parts.push(v(n.parts[a]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var i=[];for(a=0;a<n.parts.length;a++)i.push(v(n.parts[a]));o[n.id]={id:n.id,refs:1,parts:i}}}}function _(){var t=document.createElement("style");return t.type="text/css",i.appendChild(t),t}function v(t){var e,n,r=document.querySelector("style["+h+'~="'+t.id+'"]');if(r){if(l)return u;r.parentNode.removeChild(r)}if(p){var a=c++;r=s||(s=_()),e=E.bind(null,r,a,!1),n=E.bind(null,r,a,!0)}else r=_(),e=y.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}var g=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function E(t,e,n,r){var a=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=g(e,a);else{var o=document.createTextNode(a),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(o,i[e]):t.appendChild(o)}}function y(t,e){var n=e.css,r=e.media,a=e.sourceMap;if(r&&t.setAttribute("media",r),d.ssrId&&t.setAttribute(h,e.id),a&&(n+="\n/*# sourceURL="+a.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}},"1c25":function(t,e,n){"use strict";if(n.r(e),"undefined"!==typeof window){var r=window.document.currentScript,a=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}function o(t){}var i=function(){var t=this,e=t._self._c;return t.hasUrl?e("Console",{attrs:{url:t.consoleUrl}}):e("Install")},s=[];const c="count",l="networking.k8s.io.ingress",u="pod",d="service",h={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:p,CRON_JOB:f,JOB:m,..._}=h,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",POD_SECURITY_POLICY_TEMPLATE:"management.cattle.io.podsecuritypolicytemplate",PSP_TEMPLATE_BINDING:"management.cattle.io.podsecuritypolicytemplateprojectbinding",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 t=this,e=t._self._c;return e("div",[e("h2",[t._v("Overview")]),t._m(0),e("a",{staticClass:"card",attrs:{href:t.computedUrl,target:"_blank"}},[e("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"}},[e("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"}})]),e("svg",{attrs:{id:"E",xmlns:"http://www.w3.org/2000/svg",width:"60px",viewBox:"0 0 800 800"}},[e("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"}})]),t._m(1)])])},E=[function(){var t=this,e=t._self._c;return e("p",[t._v("Powered by: "),e("a",{attrs:{href:"https://clastix.io/",target:"_blank"}},[t._v("Clastix")])])},function(){var t=this,e=t._self._c;return e("div",[e("h3",[t._v("Kamaji Console")]),e("p",[t._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("362a");function T(t,e,n,r,a,o,i,s){var c,l="function"===typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),i?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},l._ssrRegister=c):a&&(c=s?function(){a.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:a),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,e){return c.call(e),u(t,e)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:l}}var R=T(b,g,E,!1,null,"1cc1b31b",null),N=R.exports,O=function(){var t=this,e=t._self._c;return e("div",{staticClass:"main"},[e("h2",[t._v("Kamaji and Kamaji Console are not installed")]),t._m(0),e("div",{staticClass:"install-checks"},[e("div",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.certManagerInstalled,expression:"certManagerInstalled"}],attrs:{type:"checkbox",id:"cert-manager",disabled:""},domProps:{checked:Array.isArray(t.certManagerInstalled)?t._i(t.certManagerInstalled,null)>-1:t.certManagerInstalled},on:{change:function(e){var n=t.certManagerInstalled,r=e.target,a=!!r.checked;if(Array.isArray(n)){var o=null,i=t._i(n,o);r.checked?i<0&&(t.certManagerInstalled=n.concat([o])):i>-1&&(t.certManagerInstalled=n.slice(0,i).concat(n.slice(i+1)))}else t.certManagerInstalled=a}}}),e("label",{attrs:{for:"cert-manager"}},[t._v("cert-manager")])]),e("div",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.kamajiInstalled,expression:"kamajiInstalled"}],attrs:{type:"checkbox",id:"cert-manager",disabled:""},domProps:{checked:Array.isArray(t.kamajiInstalled)?t._i(t.kamajiInstalled,null)>-1:t.kamajiInstalled},on:{change:function(e){var n=t.kamajiInstalled,r=e.target,a=!!r.checked;if(Array.isArray(n)){var o=null,i=t._i(n,o);r.checked?i<0&&(t.kamajiInstalled=n.concat([o])):i>-1&&(t.kamajiInstalled=n.slice(0,i).concat(n.slice(i+1)))}else t.kamajiInstalled=a}}}),e("label",{attrs:{for:"cert-manager"}},[t._v("kamaji")])]),e("div",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.console,expression:"console"}],attrs:{type:"checkbox",id:"cert-manager",disabled:""},domProps:{checked:Array.isArray(t.console)?t._i(t.console,null)>-1:t.console},on:{change:function(e){var n=t.console,r=e.target,a=!!r.checked;if(Array.isArray(n)){var o=null,i=t._i(n,o);r.checked?i<0&&(t.console=n.concat([o])):i>-1&&(t.console=n.slice(0,i).concat(n.slice(i+1)))}else t.console=a}}}),e("label",{attrs:{for:"cert-manager"}},[t._v("kamaji console")])])])])},I=[function(){var t=this,e=t._self._c;return e("p",[t._v(" Please complete the installation process "),e("a",{attrs:{href:"https://kamaji.clastix.io/",target:"_blank"}},[t._v(" following this guide ")]),t._v(". ")])}],S=n("9ce4");async function A(t,e){const n=Object.keys(t),r=Object.values(t),a=await Promise[e](r),o={};for(let i=0;i<n.length;i++)o[n[i]]=a[i];return o}function C(t){return A(t,"all")}const M={enabled:!1,enabledInterval:!0,interval:300,enabledOnNavigate:!0,ageThreshold:120,countThreshold:500},w={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_TOKEN_TTL_MINUTES:"kubeconfig-token-ttl-minutes",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",THEME:"ui-theme",SYSTEM_NAMESPACES:"system-namespaces",CLUSTER_AGENT_DEFAULT_AFFINITY:"cluster-agent-default-affinity",FLEET_AGENT_DEFAULT_AFFINITY:"fleet-agent-default-affinity"},L=(w.CA_CERTS,w.ENGINE_URL,w.ENGINE_ISO_URL,w.PASSWORD_MIN_LENGTH,w.INGRESS_IP_DOMAIN,w.AUTH_USER_INFO_MAX_AGE_SECONDS,w.AUTH_USER_SESSION_TTL_MINUTES,w.AUTH_TOKEN_MAX_TTL_MINUTES,w.KUBECONFIG_GENERATE_TOKEN,w.KUBECONFIG_TOKEN_TTL_MINUTES,w.KUBECONFIG_DEFAULT_TOKEN_TTL_MINUTES,w.AUTH_USER_INFO_RESYNC_CRON,w.SERVER_URL,w.RKE_METADATA_CONFIG,w.SYSTEM_DEFAULT_REGISTRY,w.UI_INDEX,w.UI_DASHBOARD_INDEX,w.UI_OFFLINE_PREFERRED,w.BRAND,w.CLUSTER_TEMPLATE_ENFORCEMENT,w.TELEMETRY,w.HIDE_LOCAL_CLUSTER,{inactivity:{enabled:!1,threshold:900},incrementalLoading:{enabled:!0,threshold:1500},manualRefresh:{enabled:!1,threshold:1500},disableWebsocketNotification:!0,garbageCollection:M,forceNsFilterV2:{enabled:!1},advancedWorker:{enabled:!1}}),U="ns",k="project",x=U+"://",j=k+"://",F="ResourceList",P=t=>{const e=t["management/byId"](v.SETTING,w.UI_PERFORMANCE);let n={};if(null!==e&&void 0!==e&&e.value)try{n=JSON.parse(e.value)}catch(r){console.warn("ui-performance setting contains invalid data")}return Object.assign(L,n||{})};class D{isApplicable(t){return Array.isArray(t.namespaced)}isEnabled(t){var e;const n=t["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=P(t);return!(null===(e=r.forceNsFilterV2)||void 0===e||!e.enabled)}checkAndCreateParam(t){return this.isApplicable(t)?this.createParam(t.namespaced):""}createParam(t){if(!t||!t.length)return"";const e=t.map(t=>t.replace(x,"").replace(j,"")).join(",");return`${D.param}=${e}`}}D.param="projectsornamespaces";var $=new D,G={data(){return{forceUpdateLiveAndDelayed:0}},computed:{...Object(S["a"])(["currentProduct","currentCluster","namespaceFilters"]),namespaceFilterRequired(){return this.__namespaceRequired&&!this.__validFilter},namespaceFilter(){return this.__namespaceRequired?this.__validFilter:""},__validFilter(){const t=this.namespaceFilters.length&&this.namespaceFilters.every(t=>t.startsWith(U)||t.startsWith(k));return t?this.namespaceFilters:null},__namespaceRequired(){return!!$.isEnabled(this.$store.getters)&&this.__areResourcesNamespaced},__areResourcesNamespaced(){return"cluster"===this.currentProduct.inStore&&(this.loadResources||[]).every(t=>{var e;const n=this.$store.getters["cluster/schemaFor"](t);return null===n||void 0===n||null===(e=n.attributes)||void 0===e?void 0:e.namespaced})}},watch:{async namespaceFilter(t){t&&(this.$options.name!==F&&this.$fetch&&await this.$fetch(),this.forceUpdateLiveAndDelayed=(new Date).getTime())}}};const B=4;var H={mixins:[G],data(){const t=this.$store.getters["management/byId"](v.SETTING,w.UI_PERFORMANCE);let e={};if(t&&t.value)try{e=JSON.parse(t.value)}catch(n){console.warn("ui-performance setting contains invalid data")}else e=L;return{perfConfig:e,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(t=>{this.$store.dispatch(t.currStore+"/incrementLoadCounter",t.type)}))},computed:{...Object(S["a"])({refreshFlag:"resource-fetch/refreshFlag"}),rows(){const t=this.fetchedResourceType.find(t=>t.type===this.resource);return t?this.$store.getters[t.currStore+"/all"](this.resource):[]},loading(){return!this.rows.length&&this.$fetchState.pending}},watch:{refreshFlag(t){this.init&&t&&this.$fetch()}},methods:{$initializeFetchData(t,e=[],n){if(!this.init){const r=n||this.$store.getters["currentStore"]();this.__gatherResourceFetchData(t,e,r),this.watch||(this.force=!0),this.isTooManyItemsToAutoUpdate&&(this.hasManualRefresh=!0)}},$fetchType(t,e=[],n){var r;const a=n||this.$store.getters["currentStore"]();this.$initializeFetchData(t,e,a),this.fetchedResourceType.find(e=>e.type===t)||this.fetchedResourceType.push({type:t,currStore:a});let o=0;if(this.incremental){const e=this.__getCountForResources([t],this.namespaceFilter,a);o=Math.ceil(e/B)}const i={incremental:o,watch:this.watch,force:this.force,hasManualRefresh:this.hasManualRefresh},s=this.$store.getters[a+"/schemaFor"](t);return null!==s&&void 0!==s&&null!==(r=s.attributes)&&void 0!==r&&r.namespaced&&(i.namespaced=this.namespaceFilter),this.$store.dispatch(a+"/findAll",{type:t,opt:i})},__getCountForResources(t,e,n){const r=n||this.$store.getters["currentStore"]();return t.reduce((t,n)=>t+this.__getCountForResource(n,e,r),0)},__getCountForResource(t,e,n){var r,a,o;const i=null===(r=this.$store.getters[n+"/all"](c)[0])||void 0===r?void 0:r.counts[""+t],s=e&&null!==i&&void 0!==i&&i.namespaces?null===i||void 0===i||null===(a=i.namespaces[e])||void 0===a?void 0:a.count:null===i||void 0===i||null===(o=i.summary)||void 0===o?void 0:o.count;return s||0},__gatherResourceFetchData(t,e,n){var r,a,o,i,s,c,l,u;this.init=!0;const d=null===(r=this.perfConfig)||void 0===r||null===(a=r.manualRefresh)||void 0===a?void 0:a.enabled,h=parseInt((null===(o=this.perfConfig)||void 0===o||null===(i=o.manualRefresh)||void 0===i?void 0:i.threshold)||"0",10),p=null===(s=this.perfConfig)||void 0===s||null===(c=s.incrementalLoading)||void 0===c?void 0:c.enabled,f=parseInt((null===(l=this.perfConfig)||void 0===l||null===(u=l.incrementalLoading)||void 0===u?void 0:u.threshold)||"0",10);this.multipleResources=e;let m=0,_=!0,v=!1,g=!1;const E=this.multipleResources.length?this.multipleResources:[t];m=this.__getCountForResources(E,this.namespaceFilter,n),d&&m>=h&&(_=!1,v=!0),g=p&&f>0&&m>=f,this.$store.dispatch("resource-fetch/updateIsTooManyItems",v),this.watch=_,this.isTooManyItemsToAutoUpdate=v,this.incremental=g}}},K={async fetch(){const t=[this.$fetchType(d)];await C(t)},mixins:[H],data(){return{console:!1}},computed:{...Object(S["a"])(["currentCluster","currentProduct"]),...Object(S["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")}}},V=K,Y=(n("f498"),T(V,O,I,!1,null,null,null)),J=Y.exports,W={name:"Dashboard",layout:"single",async beforeMount(){var t;const e=await this.$store.dispatch("cluster/findMatching",{type:l,selector:"app=kamaji-console"}),n=e[0];this.consoleUrl=null===n||void 0===n||null===(t=n.spec.rules[0])||void 0===t?void 0:t.host},components:{Console:N,Install:J},data(){return{consoleUrl:""}},computed:{hasUrl(){return!!this.consoleUrl}}},X=W,Z=T(X,i,s,!1,null,null,null),q=Z.exports,z=n("90cd");const Q=[{name:`c-cluster-${z["a"]}-dashboard`,path:"/c/:cluster/:product/dashboard",component:q}];var tt=function(t){o(t),t.metadata=n("9224"),t.addProduct(n("85d6")),t.addRoutes(Q)};e["default"]=tt},"362a":function(t,e,n){"use strict";n("f84c")},"43ca":function(t,e,n){t.exports=n.p+"img/icon.ccfe9b3e.svg"},"5eaa":function(t,e,n){"use strict";function r(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"===typeof btoa){var o=a(r),i=r.sources.map((function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")}));return[n].concat(i).concat([o]).join("\n")}return[n].join("\n")}function a(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(e);return"/*# ".concat(n," */")}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=r(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"===typeof t&&(t=[[null,t,""]]);var a={};if(r)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(a[i]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);r&&a[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},"7bce":function(t,e,n){var r=n("5eaa");e=r(!1),e.push([t.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%}",""]),t.exports=e},"7d15":function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},"85d6":function(t,e,n){"use strict";n.r(e),n.d(e,"init",(function(){return o}));var r=n("90cd");const a=n("43ca");function o(t,e){const{product:n,virtualType:o,basicType:i}=t.DSL(e,r["b"]);n({inStore:"cluster",inExplorer:!0,icon:a,removeable:!1,showNamespaceFilter:!0}),o({label:r["a"],name:r["a"],namespaced:!1,weight:99,overview:!0,route:{name:`c-cluster-${r["a"]}-dashboard`}}),i([r["a"]])}},"90cd":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return a}));const r="Multitenancy Management",a="kamaji"},9224:function(t){t.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.1.2","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"]}')},"9ce4":function(t,e,n){"use strict";(function(t){
- /*!
- * vuex v3.6.2
- * (c) 2021 Evan You
- * @license MIT
- */
- function r(t){var e=Number(t.version.split(".")[0]);if(e>=2)t.mixin({beforeCreate:r});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[r].concat(t.init):r,n.call(this,t)}}function r(){var t=this.$options;t.store?this.$store="function"===typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}n.d(e,"a",(function(){return w}));var a="undefined"!==typeof window?window:"undefined"!==typeof t?t:{},o=a.__VUE_DEVTOOLS_GLOBAL_HOOK__;function i(t){o&&(t._devtoolHook=o,o.emit("vuex:init",t),o.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){o.emit("vuex:mutation",t,e)}),{prepend:!0}),t.subscribeAction((function(t,e){o.emit("vuex:action",t,e)}),{prepend:!0}))}function s(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function c(t){return null!==t&&"object"===typeof t}function l(t){return t&&"function"===typeof t.then}function u(t,e){return function(){return t(e)}}var d=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"===typeof n?n():n)||{}},h={namespaced:{configurable:!0}};h.namespaced.get=function(){return!!this._rawModule.namespaced},d.prototype.addChild=function(t,e){this._children[t]=e},d.prototype.removeChild=function(t){delete this._children[t]},d.prototype.getChild=function(t){return this._children[t]},d.prototype.hasChild=function(t){return t in this._children},d.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},d.prototype.forEachChild=function(t){s(this._children,t)},d.prototype.forEachGetter=function(t){this._rawModule.getters&&s(this._rawModule.getters,t)},d.prototype.forEachAction=function(t){this._rawModule.actions&&s(this._rawModule.actions,t)},d.prototype.forEachMutation=function(t){this._rawModule.mutations&&s(this._rawModule.mutations,t)},Object.defineProperties(d.prototype,h);var p=function(t){this.register([],t,!1)};function f(t,e,n){if(e.update(n),n.modules)for(var r in n.modules){if(!e.getChild(r))return void 0;f(t.concat(r),e.getChild(r),n.modules[r])}}p.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},p.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return e=e.getChild(n),t+(e.namespaced?n+"/":"")}),"")},p.prototype.update=function(t){f([],this.root,t)},p.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var a=new d(e,n);if(0===t.length)this.root=a;else{var o=this.get(t.slice(0,-1));o.addChild(t[t.length-1],a)}e.modules&&s(e.modules,(function(e,a){r.register(t.concat(a),e,n)}))},p.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1],r=e.getChild(n);r&&r.runtime&&e.removeChild(n)},p.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return!!e&&e.hasChild(n)};var m;var _=function(t){var e=this;void 0===t&&(t={}),!m&&"undefined"!==typeof window&&window.Vue&&M(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var r=t.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 p(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new m,this._makeLocalGettersCache=Object.create(null);var a=this,o=this,s=o.dispatch,c=o.commit;this.dispatch=function(t,e){return s.call(a,t,e)},this.commit=function(t,e,n){return c.call(a,t,e,n)},this.strict=r;var l=this._modules.root.state;b(this,l,[],this._modules.root),y(this,l),n.forEach((function(t){return t(e)}));var u=void 0!==t.devtools?t.devtools:m.config.devtools;u&&i(this)},v={state:{configurable:!0}};function g(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function E(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;b(t,n,[],t._modules.root,!0),y(t,n,e)}function y(t,e,n){var r=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var a=t._wrappedGetters,o={};s(a,(function(e,n){o[n]=u(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var i=m.config.silent;m.config.silent=!0,t._vm=new m({data:{$$state:e},computed:o}),m.config.silent=i,t.strict&&S(t),r&&(n&&t._withCommit((function(){r._data.$$state=null})),m.nextTick((function(){return r.$destroy()})))}function b(t,e,n,r,a){var o=!n.length,i=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[i],t._modulesNamespaceMap[i]=r),!o&&!a){var s=A(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit((function(){m.set(s,c,r.state)}))}var l=r.context=T(t,i,n);r.forEachMutation((function(e,n){var r=i+n;N(t,r,e,l)})),r.forEachAction((function(e,n){var r=e.root?n:i+n,a=e.handler||e;O(t,r,a,l)})),r.forEachGetter((function(e,n){var r=i+n;I(t,r,e,l)})),r.forEachChild((function(r,o){b(t,e,n.concat(o),r,a)}))}function T(t,e,n){var r=""===e,a={dispatch:r?t.dispatch:function(n,r,a){var o=C(n,r,a),i=o.payload,s=o.options,c=o.type;return s&&s.root||(c=e+c),t.dispatch(c,i)},commit:r?t.commit:function(n,r,a){var o=C(n,r,a),i=o.payload,s=o.options,c=o.type;s&&s.root||(c=e+c),t.commit(c,i,s)}};return Object.defineProperties(a,{getters:{get:r?function(){return t.getters}:function(){return R(t,e)}},state:{get:function(){return A(t.state,n)}}}),a}function R(t,e){if(!t._makeLocalGettersCache[e]){var n={},r=e.length;Object.keys(t.getters).forEach((function(a){if(a.slice(0,r)===e){var o=a.slice(r);Object.defineProperty(n,o,{get:function(){return t.getters[a]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}function N(t,e,n,r){var a=t._mutations[e]||(t._mutations[e]=[]);a.push((function(e){n.call(t,r.state,e)}))}function O(t,e,n,r){var a=t._actions[e]||(t._actions[e]=[]);a.push((function(e){var a=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e);return l(a)||(a=Promise.resolve(a)),t._devtoolHook?a.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):a}))}function I(t,e,n,r){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)})}function S(t){t._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}function A(t,e){return e.reduce((function(t,e){return t[e]}),t)}function C(t,e,n){return c(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function M(t){m&&t===m||(m=t,r(m))}v.state.get=function(){return this._vm._data.$$state},v.state.set=function(t){0},_.prototype.commit=function(t,e,n){var r=this,a=C(t,e,n),o=a.type,i=a.payload,s=(a.options,{type:o,payload:i}),c=this._mutations[o];c&&(this._withCommit((function(){c.forEach((function(t){t(i)}))})),this._subscribers.slice().forEach((function(t){return t(s,r.state)})))},_.prototype.dispatch=function(t,e){var n=this,r=C(t,e),a=r.type,o=r.payload,i={type:a,payload:o},s=this._actions[a];if(s){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(i,n.state)}))}catch(l){0}var c=s.length>1?Promise.all(s.map((function(t){return t(o)}))):s[0](o);return new Promise((function(t,e){c.then((function(e){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(i,n.state)}))}catch(l){0}t(e)}),(function(t){try{n._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(i,n.state,t)}))}catch(l){0}e(t)}))}))}},_.prototype.subscribe=function(t,e){return g(t,this._subscribers,e)},_.prototype.subscribeAction=function(t,e){var n="function"===typeof t?{before:t}:t;return g(n,this._actionSubscribers,e)},_.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch((function(){return t(r.state,r.getters)}),e,n)},_.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},_.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"===typeof t&&(t=[t]),this._modules.register(t,e),b(this,this.state,t,this._modules.get(t),n.preserveState),y(this,this.state)},_.prototype.unregisterModule=function(t){var e=this;"string"===typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=A(e.state,t.slice(0,-1));m.delete(n,t[t.length-1])})),E(this)},_.prototype.hasModule=function(t){return"string"===typeof t&&(t=[t]),this._modules.isRegistered(t)},_.prototype.hotUpdate=function(t){this._modules.update(t),E(this,!0)},_.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(_.prototype,v);k((function(t,e){var n={};return L(e).forEach((function(e){var r=e.key,a=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=x(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"===typeof a?a.call(this,e,n):e[a]},n[r].vuex=!0})),n})),k((function(t,e){var n={};return L(e).forEach((function(e){var r=e.key,a=e.val;n[r]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var r=this.$store.commit;if(t){var o=x(this.$store,"mapMutations",t);if(!o)return;r=o.context.commit}return"function"===typeof a?a.apply(this,[r].concat(e)):r.apply(this.$store,[a].concat(e))}})),n}));var w=k((function(t,e){var n={};return L(e).forEach((function(e){var r=e.key,a=e.val;a=t+a,n[r]=function(){if(!t||x(this.$store,"mapGetters",t))return this.$store.getters[a]},n[r].vuex=!0})),n}));k((function(t,e){var n={};return L(e).forEach((function(e){var r=e.key,a=e.val;n[r]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var o=x(this.$store,"mapActions",t);if(!o)return;r=o.context.dispatch}return"function"===typeof a?a.apply(this,[r].concat(e)):r.apply(this.$store,[a].concat(e))}})),n}));function L(t){return U(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function U(t){return Array.isArray(t)||c(t)}function k(t){return function(e,n){return"string"!==typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function x(t,e,n){var r=t._modulesNamespaceMap[n];return r}}).call(this,n("7d15"))},a29f:function(t,e,n){var r=n("7bce");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var a=n("0ed3").default;a("a0e30642",r,!0,{sourceMap:!1,shadowMode:!1})},f498:function(t,e,n){"use strict";n("a29f")},f84c:function(t,e,n){var r=n("0b4b");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var a=n("0ed3").default;a("76b1dfb6",r,!0,{sourceMap:!1,shadowMode:!1})}})}));
- //# sourceMappingURL=kamaji-0.1.2.umd.min.js.map
|