This commit is contained in:
Bálint Szekeres
2019-11-10 21:25:59 +01:00
parent 879a63d315
commit c6269ccaa0
10 changed files with 374 additions and 296 deletions

View File

@@ -11,7 +11,7 @@
</li>
</ul>
<div class="tab-pane tab-presets" ng-class="{ 'active': tabs_site[tab_site].slug === 'presets' }">
<div class="text-center" ng-include="'partials/presets.html'"></div>
<div class="text-center" ng-include="'partials/presets-do.html'"></div>
</div>
<div class="tab-pane tab-server" ng-class="{ 'active': tabs_site[tab_site].slug === 'server' }">
<div class="row mb-2">
@@ -57,7 +57,7 @@
<span tooltips tooltip-template="Serve requests without www subdomain.">www subdomain</span>
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].non_www !== defaultData.sites[0].non_www }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].non_www !== defaultData.sites[0].non_www }">
<input class="form-check-input" type="checkbox" id="non_www" ng-model="data.sites[site].non_www" ng-true-value="false" ng-false-value="true">
<label class="form-check-label col-form-label-sm" for="non_www">
enabled <small>({{ isWWW() ? 'www.' : '' }}{{ getDomain() }})</small>
@@ -70,7 +70,7 @@
<span tooltips tooltip-template="Cookie-free CDN subdomain.">CDN subdomain</span>
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].cdn !== defaultData.sites[0].cdn }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].cdn !== defaultData.sites[0].cdn }">
<input class="form-check-input" type="checkbox" id="cdn" ng-model="data.sites[site].cdn">
<label class="form-check-label col-form-label-sm" for="cdn">
enabled <small>(cdn.{{ getDomain() }})</small>
@@ -83,7 +83,7 @@
<span tooltips tooltip-template="Redirect {{ isWWW() ? 'non-www version and ' : '' }}all subdomains to domain.">Redirect {{ isNonWWW() ? 'subdomains' : 'domain, subdomains' }}</span>
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].redirect !== defaultData.sites[0].redirect }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].redirect !== defaultData.sites[0].redirect }">
<input class="form-check-input" type="checkbox" id="redirect" ng-model="data.sites[site].redirect">
<label class="form-check-label col-form-label-sm" for="redirect">
enabled <small>(<code>{{ isNonWWW() ? ('*.' + getDomain() + ' → ' + getDomain()) : (getDomain() + ', *.' + getDomain() + ' → www.' + getDomain()) }}</code>)</small>
@@ -125,7 +125,7 @@
<span tooltips tooltip-template="Provides support for HTTPS.<br><br><i>using Mozilla SSL config</i>">HTTPS</span>
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].https !== defaultData.sites[0].https }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].https !== defaultData.sites[0].https }">
<input class="form-check-input" type="checkbox" id="https" ng-model="data.sites[site].https">
<label class="form-check-label col-form-label-sm" for="https">enabled</label>
</div>
@@ -136,7 +136,7 @@
<span tooltips tooltip-template="Provides support for HTTP/2.">HTTP/2</span>
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].http2 !== defaultData.sites[0].http2 }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].http2 !== defaultData.sites[0].http2 }">
<input class="form-check-input" type="checkbox" id="http2" ng-model="data.sites[site].http2">
<label class="form-check-label col-form-label-sm" for="http2">enabled</label>
</div>
@@ -147,7 +147,7 @@
<span tooltips tooltip-template="Force redirection from HTTP to HTTPS.">Force HTTPS</span>
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].force_https !== defaultData.sites[0].force_https }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].force_https !== defaultData.sites[0].force_https }">
<input class="form-check-input" type="checkbox" id="force_https" ng-model="data.sites[site].force_https">
<label class="form-check-label col-form-label-sm" for="force_https">
enabled <small ng-cloak>(<code >{{ isNonWWW() ? ('http://' + getDomain() + ' → https://' + getDomain()) : ('http://www.' + getDomain() + ' → https://www.' + getDomain()) }}</code>)</small>
@@ -160,15 +160,15 @@
<span tooltips tooltip-template="HTTP Strict Transport Security is a web security policy mechanism which helps to protect websites against protocol downgrade attacks and cookie hijacking.">HSTS</span>
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].hsts !== defaultData.sites[0].hsts }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].hsts !== defaultData.sites[0].hsts }">
<input class="form-check-input" type="checkbox" id="hsts" ng-model="data.sites[site].hsts">
<label class="form-check-label col-form-label-sm" for="hsts">enabled</label>
</div>
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].hsts_subdomains !== defaultData.sites[0].hsts_subdomains, disabled: !isHSTS() }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].hsts_subdomains !== defaultData.sites[0].hsts_subdomains, disabled: !isHSTS() }">
<input class="form-check-input" type="checkbox" id="hsts_subdomains" ng-model="data.sites[site].hsts_subdomains">
<label class="form-check-label col-form-label-sm" for="hsts_subdomains"><code class="small">includeSubDomains</code></label>
</div>
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].hsts_preload !== defaultData.sites[0].hsts_preload, disabled: !isHSTSSubdomains() }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].hsts_preload !== defaultData.sites[0].hsts_preload, disabled: !isHSTSSubdomains() }">
<input class="form-check-input" type="checkbox" id="hsts_preload" ng-model="data.sites[site].hsts_preload">
<label class="form-check-label col-form-label-sm" for="hsts_preload"><code class="small">preload</code></label>
</div>
@@ -178,13 +178,13 @@
<div class="row">
<legend class="col-sm-3 col-form-label col-form-label-sm">Certification type</legend>
<div class="col-sm-9">
<div class="form-check" ng-class="{ 'input-changed': data.sites[site].cert_type !== defaultData.sites[0].cert_type && data.sites[site].cert_type === 'letsencrypt' }">
<div class="form-check form-check-radio" ng-class="{ 'input-changed': data.sites[site].cert_type !== defaultData.sites[0].cert_type && data.sites[site].cert_type === 'letsencrypt' }">
<input class="form-check-input" type="radio" id="letsencrypt" ng-model="data.sites[site].cert_type" value="letsencrypt">
<label class="form-check-label col-form-label-sm" for="letsencrypt">
<span tooltips tooltip-template="Let's Encrypt based SSl.<br><br><i>free, automated, and open Certificate Authority</i>" tooltip-side="top">Let's Encrypt</span>
</label>
</div>
<div class="form-check" ng-class="{ 'input-changed': data.sites[site].cert_type !== defaultData.sites[0].cert_type && data.sites[site].cert_type === 'custom' }">
<div class="form-check form-check-radio" ng-class="{ 'input-changed': data.sites[site].cert_type !== defaultData.sites[0].cert_type && data.sites[site].cert_type === 'custom' }">
<input class="form-check-input" type="radio" id="custom_cert" ng-model="data.sites[site].cert_type" value="custom">
<label class="form-check-label col-form-label-sm" for="custom_cert">custom certificate</label>
</div>
@@ -235,7 +235,7 @@
PHP
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].php !== defaultData.sites[0].php }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].php !== defaultData.sites[0].php }">
<input class="form-check-input" type="checkbox" id="php" ng-model="data.sites[site].php">
<label class="form-check-label col-form-label-sm" for="php">enabled</label>
</div>
@@ -246,7 +246,7 @@
<span tooltips tooltip-template="WordPress security rules and login limiting <i>(if enabled)</i>.">WordPress rules</span>
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].wordpress !== defaultData.sites[0].wordpress }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].wordpress !== defaultData.sites[0].wordpress }">
<input class="form-check-input" type="checkbox" id="wordpress" ng-model="data.sites[site].wordpress">
<label class="form-check-label col-form-label-sm" for="wordpress">enabled</label>
</div>
@@ -257,7 +257,7 @@
<span tooltips tooltip-template="Drupal security rules and login limiting <i>(if enabled)</i>.">Drupal rules</span>
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].drupal !== defaultData.sites[0].drupal }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].drupal !== defaultData.sites[0].drupal }">
<input class="form-check-input" type="checkbox" id="drupal" ng-model="data.sites[site].drupal">
<label class="form-check-label col-form-label-sm" for="drupal">enabled</label>
</div>
@@ -268,7 +268,7 @@
<span tooltips tooltip-template="Magento security rules.">Magento rules</span>
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].magento !== defaultData.sites[0].magento }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].magento !== defaultData.sites[0].magento }">
<input class="form-check-input" type="checkbox" id="magento" ng-model="data.sites[site].magento">
<label class="form-check-label col-form-label-sm" for="magento">enabled</label>
</div>
@@ -281,7 +281,7 @@
Python
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].python !== defaultData.sites[0].python }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].python !== defaultData.sites[0].python }">
<input class="form-check-input" type="checkbox" id="python" ng-model="data.sites[site].python">
<label class="form-check-label col-form-label-sm" for="python">enabled</label>
</div>
@@ -292,7 +292,7 @@
Django rules
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].django !== defaultData.sites[0].django }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].django !== defaultData.sites[0].django }">
<input class="form-check-input" type="checkbox" id="django" ng-model="data.sites[site].django">
<label class="form-check-label col-form-label-sm" for="django">enabled</label>
</div>
@@ -305,7 +305,7 @@
Reverse proxy
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].proxy !== defaultData.sites[0].proxy }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].proxy !== defaultData.sites[0].proxy }">
<input class="form-check-input" type="checkbox" id="proxy" ng-model="data.sites[site].proxy">
<label class="form-check-label col-form-label-sm" for="proxy">enabled</label>
</div>
@@ -340,7 +340,7 @@
<span tooltips tooltip-template="Enable root directive."><code>root</code></span>
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].root !== defaultData.sites[0].root }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].root !== defaultData.sites[0].root }">
<input class="form-check-input" type="checkbox" id="root" ng-model="data.sites[site].root">
<label class="form-check-label col-form-label-sm" for="root">enabled</label>
</div>
@@ -352,11 +352,11 @@
<code tooltips tooltip-template="Defines the file that will be used as an index.">index</code>
</legend>
<div class="col-sm-9">
<div class="form-check" ng-class="{ 'input-changed': data.sites[site].index !== defaultData.sites[0].index && data.sites[site].index === 'index.html' }">
<div class="form-check form-check-radio" ng-class="{ 'input-changed': data.sites[site].index !== defaultData.sites[0].index && data.sites[site].index === 'index.html' }">
<input class="form-check-input" type="radio" id="index.html" ng-model="data.sites[site].index" value="index.html">
<label class="form-check-label col-form-label-sm" for="index.html">index.html</label>
</div>
<div class="form-check" ng-class="{ 'input-changed': data.sites[site].index !== defaultData.sites[0].index && data.sites[site].index === 'index.php' }">
<div class="form-check form-check-radio" ng-class="{ 'input-changed': data.sites[site].index !== defaultData.sites[0].index && data.sites[site].index === 'index.php' }">
<input class="form-check-input" type="radio" id="index.php" ng-model="data.sites[site].index" value="index.php">
<label class="form-check-label col-form-label-sm" for="index.php">index.php</label>
</div>
@@ -394,7 +394,7 @@
<span tooltips tooltip-template="Handle legacy (non-pretty) (<code>foo.php/bar/baz</code>) routes.">Legacy PHP routing</span>
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].php_legacy_routing !== defaultData.sites[0].php_legacy_routing }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].php_legacy_routing !== defaultData.sites[0].php_legacy_routing }">
<input class="form-check-input" type="checkbox" id="php_legacy_routing" ng-model="data.sites[site].php_legacy_routing">
<label class="form-check-label col-form-label-sm" for="php_legacy_routing">enabled</label>
</div>
@@ -407,7 +407,7 @@
<span tooltips tooltip-template="Domain specific access_log."><code>access_log</code> by domain</span>
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].access_log_domain !== defaultData.sites[0].access_log_domain }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].access_log_domain !== defaultData.sites[0].access_log_domain }">
<input class="form-check-input" type="checkbox" id="access_log_domain" ng-model="data.sites[site].access_log_domain">
<label class="form-check-label col-form-label-sm" for="access_log_domain">enabled</label>
</div>
@@ -418,7 +418,7 @@
<span tooltips tooltip-template="Domain specific error_log."><code>error_log</code> by domain</span>
</label>
<div class="col-sm-9">
<div class="form-check form-check-inline" ng-class="{ 'input-changed': data.sites[site].error_log_domain !== defaultData.sites[0].error_log_domain }">
<div class="form-check form-check-checkbox form-check-inline" ng-class="{ 'input-changed': data.sites[site].error_log_domain !== defaultData.sites[0].error_log_domain }">
<input class="form-check-input" type="checkbox" id="error_log_domain" ng-model="data.sites[site].error_log_domain">
<label class="form-check-label col-form-label-sm" for="error_log_domain">enabled</label>
</div>