Skip to content
Snippets Groups Projects
Commit 7dbcd3e7 authored by Mike Greiling's avatar Mike Greiling Committed by Thong Kuah
Browse files

Hide project-specific cluster apps in non-project clusters

parent 284f4dfd
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -31,6 +31,7 @@ export default class Clusters {
installKnativePath,
installPrometheusPath,
managePrometheusPath,
clusterType,
clusterStatus,
clusterStatusReason,
helpPath,
Loading
Loading
@@ -67,7 +68,7 @@ export default class Clusters {
initDismissableCallout('.js-cluster-security-warning');
initSettingsPanels();
setupToggleButtons(document.querySelector('.js-cluster-enable-toggle-area'));
this.initApplications();
this.initApplications(clusterType);
 
if (this.store.state.status !== 'created') {
this.updateContainer(null, this.store.state.status, this.store.state.statusReason);
Loading
Loading
@@ -79,7 +80,7 @@ export default class Clusters {
}
}
 
initApplications() {
initApplications(type) {
const { store } = this;
const el = document.querySelector('#js-cluster-applications');
 
Loading
Loading
@@ -93,6 +94,7 @@ export default class Clusters {
render(createElement) {
return createElement(Applications, {
props: {
type,
applications: this.state.applications,
helpPath: this.state.helpPath,
ingressHelpPath: this.state.ingressHelpPath,
Loading
Loading
Loading
Loading
@@ -21,6 +21,11 @@ export default {
clipboardButton,
},
props: {
type: {
type: String,
required: false,
default: 'project_type',
},
applications: {
type: Object,
required: false,
Loading
Loading
@@ -59,6 +64,9 @@ export default {
prometheusLogo,
}),
computed: {
isProjectCluster() {
return this.type === 'project_type';
},
helmInstalled() {
return (
this.applications.helm.status === APPLICATION_STATUS.INSTALLED ||
Loading
Loading
@@ -281,6 +289,7 @@ export default {
</div>
</application-row>
<application-row
v-if="isProjectCluster"
id="prometheus"
:logo-url="prometheusLogo"
:title="applications.prometheus.title"
Loading
Loading
@@ -299,6 +308,7 @@ export default {
</div>
</application-row>
<application-row
v-if="isProjectCluster"
id="runner"
:logo-url="gitlabLogo"
:title="applications.runner.title"
Loading
Loading
@@ -317,6 +327,7 @@ export default {
</div>
</application-row>
<application-row
v-if="isProjectCluster"
id="jupyter"
:logo-url="jupyterhubLogo"
:title="applications.jupyter.title"
Loading
Loading
Loading
Loading
@@ -15,6 +15,7 @@
install_jupyter_path: clusterable.install_applications_cluster_path(@cluster, :jupyter),
install_knative_path: clusterable.install_applications_cluster_path(@cluster, :knative),
toggle_status: @cluster.enabled? ? 'true': 'false',
cluster_type: @cluster.cluster_type,
cluster_status: @cluster.status_name,
cluster_status_reason: @cluster.status_reason,
help_path: help_page_path('user/project/clusters/index.md', anchor: 'installing-applications'),
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment