mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
www/caddy: Some small UX tweaks (#4442)
* www/caddy: Remove HTTP from terminology. It was added when Layer4 Proxy was still in the same tabs to distinguish the HTTP Proxy from the Layer4 Proxy. Now that everything has its own pages it improves readability and follows the caddy syntax more closely. * www/caddy: Do not auto hide the access settings, its annoying * www/caddy: Remove hints that are no real defaults or can change dynamically depending on configuration.
This commit is contained in:
@@ -119,14 +119,12 @@
|
||||
<type>select_multiple</type>
|
||||
<style>tokenize</style>
|
||||
<allownew>true</allownew>
|
||||
<hint>192.168.1.1</hint>
|
||||
<help><![CDATA[Enter a domain name or IP address of the upstream destination. If multiple are chosen, they will be load balanced with the default random policy. A health check can be activated by populating "Upstream Fail Duration" in advanced mode. When directive is "redir", only the first domain will be evaluated.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<id>handle.ToPort</id>
|
||||
<label>Upstream Port</label>
|
||||
<type>text</type>
|
||||
<hint>80</hint>
|
||||
<help><![CDATA[Leave empty to use the default port or choose a custom port for the upstream destination.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
|
||||
@@ -25,14 +25,12 @@
|
||||
<id>reverse.FromDomain</id>
|
||||
<label>Domain</label>
|
||||
<type>text</type>
|
||||
<hint>example.com</hint>
|
||||
<help><![CDATA[Enter a domain name. For a base domain, use "example.com" or "opn.example.com". For a wildcard domain, use "*.example.com". Using a wildcard domain with subdomains requires a "DNS Provider" and the "DNS-01 Challenge" or a custom certificate.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<id>reverse.FromPort</id>
|
||||
<label>Port</label>
|
||||
<type>text</type>
|
||||
<hint>443</hint>
|
||||
<help><![CDATA[Leave empty to use ports 80 and 443 with automatic redirection from HTTP to HTTPS or choose a custom port. Don't forget to allow these ports with a Firewall rule. If the default ports have been changed in "General Settings", leaving this empty will use the chosen alternative ports instead.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
@@ -65,7 +63,6 @@
|
||||
<field>
|
||||
<type>header</type>
|
||||
<label>Access</label>
|
||||
<collapse>true</collapse>
|
||||
</field>
|
||||
<field>
|
||||
<id>reverse.accesslist</id>
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
<field>
|
||||
<type>header</type>
|
||||
<label>Access</label>
|
||||
<collapse>true</collapse>
|
||||
</field>
|
||||
<field>
|
||||
<id>subdomain.accesslist</id>
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
<description type="DescriptionField"/>
|
||||
<DnsChallenge type="BooleanField"/>
|
||||
<CustomCertificate type="CertificateField">
|
||||
<BlankDesc>ACME (HTTP-01, TLS-ALPN-01)</BlankDesc>
|
||||
<BlankDesc>ACME</BlankDesc>
|
||||
</CustomCertificate>
|
||||
<AccessLog type="BooleanField"/>
|
||||
<DynDns type="BooleanField"/>
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
toggleVisibility(currentTab);
|
||||
});
|
||||
|
||||
// Add click event listener for "Add HTTP Handler" button
|
||||
// Add click event listener for "Add Handler" button
|
||||
$("#addHandleBtn").on("click", function() {
|
||||
if ($('#maintabs .active a').attr('href') === "#handlesTab") {
|
||||
$("#addReverseHandleBtn").click();
|
||||
@@ -317,9 +317,9 @@
|
||||
|
||||
<ul class="nav nav-tabs" data-tabs="tabs" id="maintabs">
|
||||
<li id="tab-domains" class="active"><a data-toggle="tab" href="#domainsTab">{{ lang._('Domains') }}</a></li>
|
||||
<li id="tab-handlers"><a data-toggle="tab" href="#handlesTab">{{ lang._('HTTP Handlers') }}</a></li>
|
||||
<li id="tab-access"><a data-toggle="tab" href="#accessTab">{{ lang._('HTTP Access') }}</a></li>
|
||||
<li id="tab-headers"><a data-toggle="tab" href="#headerTab">{{ lang._('HTTP Headers') }}</a></li>
|
||||
<li id="tab-handlers"><a data-toggle="tab" href="#handlesTab">{{ lang._('Handlers') }}</a></li>
|
||||
<li id="tab-access"><a data-toggle="tab" href="#accessTab">{{ lang._('Access') }}</a></li>
|
||||
<li id="tab-headers"><a data-toggle="tab" href="#headerTab">{{ lang._('Headers') }}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content content-box">
|
||||
@@ -328,7 +328,7 @@
|
||||
<!-- Button group on the left -->
|
||||
<div>
|
||||
<button id="addDomainBtn" type="button" class="btn btn-secondary">{{ lang._('Step 1: Add Domain') }}</button>
|
||||
<button id="addHandleBtn" type="button" class="btn btn-secondary">{{ lang._('Step 2: Add HTTP Handler') }}</button>
|
||||
<button id="addHandleBtn" type="button" class="btn btn-secondary">{{ lang._('Step 2: Add Handler') }}</button>
|
||||
</div>
|
||||
<!-- Selectpicker and Clear All on the right -->
|
||||
<div class="filter-actions" style="display: flex; flex-direction: column; align-items: flex-end;">
|
||||
@@ -418,7 +418,7 @@
|
||||
<!-- Handle Tab -->
|
||||
<div id="handlesTab" class="tab-pane fade">
|
||||
<div style="padding-left: 16px;">
|
||||
<h1 class="custom-header">{{ lang._('HTTP Handlers') }}</h1>
|
||||
<h1 class="custom-header">{{ lang._('Handlers') }}</h1>
|
||||
<div style="display: block;"> <!-- Common container -->
|
||||
<table id="reverseHandleGrid" class="table table-condensed table-hover table-striped" data-editDialog="DialogHandle" data-editAlert="ConfigurationChangeMessage">
|
||||
<thead>
|
||||
@@ -538,7 +538,7 @@
|
||||
<!-- Header Tab -->
|
||||
<div id="headerTab" class="tab-pane fade">
|
||||
<div style="padding-left: 16px;">
|
||||
<h1 class="custom-header">{{ lang._('HTTP Headers') }}</h1>
|
||||
<h1 class="custom-header">{{ lang._('Headers') }}</h1>
|
||||
<div style="display: block;"> <!-- Common container -->
|
||||
<table id="reverseHeaderGrid" class="table table-condensed table-hover table-striped" data-editDialog="DialogHeader" data-editAlert="ConfigurationChangeMessage">
|
||||
<thead>
|
||||
@@ -593,7 +593,7 @@
|
||||
|
||||
{{ partial("layout_partials/base_dialog",['fields':formDialogReverseProxy,'id':'DialogReverseProxy','label':lang._('Edit Domain')])}}
|
||||
{{ partial("layout_partials/base_dialog",['fields':formDialogSubdomain,'id':'DialogSubdomain','label':lang._('Edit Subdomain')])}}
|
||||
{{ partial("layout_partials/base_dialog",['fields':formDialogHandle,'id':'DialogHandle','label':lang._('Edit HTTP Handler')])}}
|
||||
{{ partial("layout_partials/base_dialog",['fields':formDialogHandle,'id':'DialogHandle','label':lang._('Edit Handler')])}}
|
||||
{{ partial("layout_partials/base_dialog",['fields':formDialogAccessList,'id':'DialogAccessList','label':lang._('Edit Access List')])}}
|
||||
{{ partial("layout_partials/base_dialog",['fields':formDialogBasicAuth,'id':'DialogBasicAuth','label':lang._('Edit Basic Auth')])}}
|
||||
{{ partial("layout_partials/base_dialog",['fields':formDialogHeader,'id':'DialogHeader','label':lang._('Edit HTTP Header')])}}
|
||||
{{ partial("layout_partials/base_dialog",['fields':formDialogHeader,'id':'DialogHeader','label':lang._('Edit Header')])}}
|
||||
|
||||
Reference in New Issue
Block a user