Skip to content

Commit

Permalink
luci-app-acme: Acme.sh Wiki instruction link for the DNS provider
Browse files Browse the repository at this point in the history
To help a user to find instruction how to configure the provider we weill generate a link.
Also remove default for DuckDNS

Signed-off-by: Sergey Ponomarev <[email protected]>
  • Loading branch information
stokito committed Jun 7, 2023
1 parent 654964d commit b320381
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ return view.extend({
});
},

_handleCheckService: function(c, event, curVal, newVal) {
document.getElementById("acmeshWikiInstructonUrl").href = "https://github.com/acmesh-official/acme.sh/wiki/dnsapi#" + newVal;
},

render: function (certs) {
console.log(certs);
var m, s, o;

m = new form.Map("acme", _("ACME certificates"),
Expand Down Expand Up @@ -88,6 +91,7 @@ return view.extend({
o.depends("validation_method", "dns");
// List of supported DNS API. Names are same as file names in acme.sh for easier search.
// May be outdated but not changed too often.
o.value("", _("Select"))
o.value("dns_1984hosting", "1984hosting");
o.value("dns_acmedns", "acmedns");
o.value("dns_acmeproxy", "acmeproxy");
Expand Down Expand Up @@ -228,7 +232,13 @@ return view.extend({
o.value("dns_zilore", "zilore");
o.value("dns_zone", "zone");
o.value("dns_zonomi", "zonomi");
o.default = "dns_duckdns"; // The most popular DDNS
o.modalonly = true;
o.onchange = L.bind(this._handleCheckService, o, s);

o = s.taboption('challenge', form.DummyValue, "_wiki_url", _("See instructions"), "");
o.rawhtml = true;
o.default = '<a id="acmeshWikiInstructonUrl" target="_blank" href="https://github.com/acmesh-official/acme.sh/wiki/dnsapi">Acme Wiki DNS API</a>'
o.depends("validation_method", "dns");
o.modalonly = true;

o = s.taboption('challenge', form.DynamicList, "credentials", _("DNS API credentials"),
Expand Down Expand Up @@ -319,5 +329,6 @@ return view.extend({

return m.render()
}

})

0 comments on commit b320381

Please sign in to comment.