From 05f1d5d9813332bdd456cb358517e56168a24224 Mon Sep 17 00:00:00 2001
From: GitLab Bot
Date: Tue, 7 Jan 2020 12:07:55 +0000
Subject: Add latest changes from gitlab-org/gitlab@master
---
app/assets/javascripts/clusters/clusters_bundle.js | 3 ++
.../clusters/components/applications.vue | 51 ++++++++++++++++++++--
.../javascripts/clusters/stores/clusters_store.js | 5 +++
3 files changed, 56 insertions(+), 3 deletions(-)
(limited to 'app/assets/javascripts/clusters')
diff --git a/app/assets/javascripts/clusters/clusters_bundle.js b/app/assets/javascripts/clusters/clusters_bundle.js
index d990d2677a8..b764348eb3c 100644
--- a/app/assets/javascripts/clusters/clusters_bundle.js
+++ b/app/assets/javascripts/clusters/clusters_bundle.js
@@ -53,6 +53,7 @@ export default class Clusters {
helpPath,
ingressHelpPath,
ingressDnsHelpPath,
+ ingressModSecurityHelpPath,
environmentsHelpPath,
clustersHelpPath,
deployBoardsHelpPath,
@@ -69,6 +70,7 @@ export default class Clusters {
helpPath,
ingressHelpPath,
ingressDnsHelpPath,
+ ingressModSecurityHelpPath,
environmentsHelpPath,
clustersHelpPath,
deployBoardsHelpPath,
@@ -169,6 +171,7 @@ export default class Clusters {
ingressHelpPath: this.state.ingressHelpPath,
managePrometheusPath: this.state.managePrometheusPath,
ingressDnsHelpPath: this.state.ingressDnsHelpPath,
+ ingressModSecurityHelpPath: this.state.ingressModSecurityHelpPath,
cloudRunHelpPath: this.state.cloudRunHelpPath,
providerType: this.state.providerType,
preInstalledKnative: this.state.preInstalledKnative,
diff --git a/app/assets/javascripts/clusters/components/applications.vue b/app/assets/javascripts/clusters/components/applications.vue
index 99844a356c8..af50ca7361d 100644
--- a/app/assets/javascripts/clusters/components/applications.vue
+++ b/app/assets/javascripts/clusters/components/applications.vue
@@ -56,6 +56,11 @@ export default {
required: false,
default: '',
},
+ ingressModSecurityHelpPath: {
+ type: String,
+ required: false,
+ default: '',
+ },
cloudRunHelpPath: {
type: String,
required: false,
@@ -112,6 +117,9 @@ export default {
ingressInstalled() {
return this.applications.ingress.status === APPLICATION_STATUS.INSTALLED;
},
+ ingressEnableModsecurity() {
+ return this.applications.ingress.modsecurity_enabled;
+ },
ingressExternalEndpoint() {
return this.applications.ingress.externalIp || this.applications.ingress.externalHostname;
},
@@ -127,6 +135,18 @@ export default {
enableClusterApplicationElasticStack() {
return gon.features && gon.features.enableClusterApplicationElasticStack;
},
+ ingressModSecurityDescription() {
+ const escapedUrl = _.escape(this.ingressModSecurityHelpPath);
+
+ return sprintf(
+ s__('ClusterIntegration|Learn more about %{startLink}ModSecurity%{endLink}'),
+ {
+ startLink: ``,
+ endLink: '',
+ },
+ false,
+ );
+ },
ingressDescription() {
return sprintf(
_.escape(
@@ -135,9 +155,9 @@ export default {
),
),
{
- pricingLink: `
- ${_.escape(s__('ClusterIntegration|pricing'))}`,
+ ${_.escape(s__('ClusterIntegration|pricing'))}`,
},
false,
);
@@ -311,6 +331,9 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
:request-reason="applications.ingress.requestReason"
:installed="applications.ingress.installed"
:install-failed="applications.ingress.installFailed"
+ :install-application-request-params="{
+ modsecurity_enabled: applications.ingress.modsecurity_enabled,
+ }"
:uninstallable="applications.ingress.uninstallable"
:uninstall-successful="applications.ingress.uninstallSuccessful"
:uninstall-failed="applications.ingress.uninstallFailed"
@@ -326,6 +349,26 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
}}
+
+
+
+
diff --git a/app/assets/javascripts/clusters/stores/clusters_store.js b/app/assets/javascripts/clusters/stores/clusters_store.js
index 35dbf951551..9c8563e8f77 100644
--- a/app/assets/javascripts/clusters/stores/clusters_store.js
+++ b/app/assets/javascripts/clusters/stores/clusters_store.js
@@ -52,6 +52,7 @@ export default class ClusterStore {
ingress: {
...applicationInitialState,
title: s__('ClusterIntegration|Ingress'),
+ modsecurity_enabled: false,
externalIp: null,
externalHostname: null,
},
@@ -108,6 +109,7 @@ export default class ClusterStore {
helpPath,
ingressHelpPath,
ingressDnsHelpPath,
+ ingressModSecurityHelpPath,
environmentsHelpPath,
clustersHelpPath,
deployBoardsHelpPath,
@@ -116,6 +118,7 @@ export default class ClusterStore {
this.state.helpPath = helpPath;
this.state.ingressHelpPath = ingressHelpPath;
this.state.ingressDnsHelpPath = ingressDnsHelpPath;
+ this.state.ingressModSecurityHelpPath = ingressModSecurityHelpPath;
this.state.environmentsHelpPath = environmentsHelpPath;
this.state.clustersHelpPath = clustersHelpPath;
this.state.deployBoardsHelpPath = deployBoardsHelpPath;
@@ -207,6 +210,8 @@ export default class ClusterStore {
if (appId === INGRESS) {
this.state.applications.ingress.externalIp = serverAppEntry.external_ip;
this.state.applications.ingress.externalHostname = serverAppEntry.external_hostname;
+ this.state.applications.ingress.modsecurity_enabled =
+ serverAppEntry.modsecurity_enabled || this.state.applications.ingress.modsecurity_enabled;
} else if (appId === CERT_MANAGER) {
this.state.applications.cert_manager.email =
this.state.applications.cert_manager.email || serverAppEntry.email;
--
cgit v1.2.1