... ... @@ -19,7 +19,6 @@ import applicationRow from './application_row.vue';
import clipboardButton from ' ../../vue_shared/components/clipboard_button.vue ' ;
import KnativeDomainEditor from ' ./knative_domain_editor.vue ' ;
import { CLUSTER_TYPE , PROVIDER_TYPE , APPLICATION_STATUS , INGRESS } from ' ../constants ' ;
import LoadingButton from ' ~/vue_shared/components/loading_button.vue ' ;
import eventHub from ' ~/clusters/event_hub ' ;
import CrossplaneProviderStack from ' ./crossplane_provider_stack.vue ' ;
... ... @@ -27,7 +26,6 @@ export default {
components : {
applicationRow ,
clipboardButton ,
LoadingButton ,
GlLoadingIcon ,
KnativeDomainEditor ,
CrossplaneProviderStack ,
... ... @@ -58,6 +56,11 @@ export default {
required : false ,
default : '' ,
},
ingressModSecurityHelpPath : {
type : String ,
required : false ,
default : '' ,
},
cloudRunHelpPath : {
type : String ,
required : false ,
... ... @@ -114,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 ;
},
... ... @@ -123,12 +129,21 @@ export default {
crossplaneInstalled () {
return this . applications . crossplane . status === APPLICATION_STATUS . INSTALLED ;
},
enableClusterApplicationCrossplane () {
return gon . features && gon . features . enableClusterApplicationCrossplane ;
},
enableClusterApplicationElasticStack () {
return gon . features && gon . features . enableClusterApplicationElasticStack ;
},
ingressModSecurityDescription () {
const escapedUrl = _ . escape ( this . ingressModSecurityHelpPath );
return sprintf (
s__ ( ' ClusterIntegration|Learn more about %{startLink}ModSecurity%{endLink} ' ),
{
startLink : `<a href=" ${ escapedUrl } " target="_blank" rel="noopener noreferrer">` ,
endLink : ' </a> ' ,
},
false ,
);
},
ingressDescription () {
return sprintf (
_ . escape (
... ... @@ -137,9 +152,9 @@ export default {
),
),
{
pricingLink : `<strong>< a href="https://cloud.google.com/compute/pricing#lb"
pricingLink : `<a href="https://cloud.google.com/compute/pricing#lb"
target="_blank" rel="noopener noreferrer">
${ _ . escape ( s__ ( ' ClusterIntegration|pricing ' ))} </a></strong> ` ,
${ _ . escape ( s__ ( ' ClusterIntegration|pricing ' ))} </a>` ,
},
false ,
);
... ... @@ -204,9 +219,6 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
elasticStackInstalled () {
return this . applications . elastic_stack . status === APPLICATION_STATUS . INSTALLED ;
},
elasticStackKibanaHostname () {
return this . applications . elastic_stack . kibana_hostname ;
},
knative () {
return this . applications . knative ;
},
... ... @@ -313,6 +325,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"
... ... @@ -328,6 +343,26 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
}}
</p>
<template>
<div class= "form-group" >
<div class= "form-check form-check-inline" >
<input
v-model= "applications.ingress.modsecurity_enabled"
:disabled= "ingressInstalled"
type= "checkbox"
autocomplete= "off"
class= "form-check-input"
/>
<label class= "form-check-label label-bold" for= "ingress-enable-modsecurity" >
{{ s__ ( ' ClusterIntegration|Enable Web Application Firewall ' ) }}
</label>
</div>
<p class= "form-text text-muted" >
<strong v-html= "ingressModSecurityDescription" ></strong>
</p>
</div>
</ template >
< template v-if= "ingressInstalled" >
<div class= "form-group" >
<label for= "ingress-endpoint" > {{ s__ ( ' ClusterIntegration|Ingress Endpoint ' ) }} </label>
... ... @@ -377,7 +412,9 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
</p>
</ template >
< template v-if= "!ingressInstalled" >
<div class= "bs-callout bs-callout-info" v-html= "ingressDescription" ></div>
<div class= "bs-callout bs-callout-info" >
<strong v-html= "ingressDescription" ></strong>
</div>
</ template >
</div>
</application-row>
... ... @@ -479,7 +516,6 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
</div>
</application-row>
<application-row
v-if= "enableClusterApplicationCrossplane"
id= "crossplane"
:logo-url= "crossplaneLogo"
:title= "applications.crossplane.title"
... ... @@ -638,9 +674,6 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
:uninstall-successful= "applications.elastic_stack.uninstallSuccessful"
:uninstall-failed= "applications.elastic_stack.uninstallFailed"
:disabled= "!helmInstalled"
:install-application-request-params= "{
kibana_hostname: applications.elastic_stack.kibana_hostname,
}"
title-link= "https://github.com/helm/charts/tree/master/stable/elastic-stack"
>
<div slot= "description" >
... ... @@ -651,40 +684,6 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
)
}}
</p>
< template v-if= "ingressExternalEndpoint" >
<div class= "form-group" >
<label for= "elastic-stack-kibana-hostname" > {{
s__ ( ' ClusterIntegration|Kibana Hostname ' )
}} </label>
<div class= "input-group" >
<input
v-model= "applications.elastic_stack.kibana_hostname"
:readonly= "elasticStackInstalled"
type= "text"
class= "form-control js-hostname"
/>
<span class= "input-group-btn" >
<clipboard-button
:text= "elasticStackKibanaHostname"
:title= "s__('ClusterIntegration|Copy Kibana Hostname')"
class= "js-clipboard-btn"
/>
</span>
</div>
<p v-if= "ingressInstalled" class= "form-text text-muted" >
{{
s__ ( `ClusterIntegration|Replace this with your own hostname if you want.
If you do so, point hostname to Ingress IP Address from above.` )
}}
<a :href= "ingressDnsHelpPath" target= "_blank" rel= "noopener noreferrer" >
{{ __ ( ' More information ' ) }}
</a>
</p>
</div>
</ template >
</div>
</application-row>
</div>
... ...
... ...