Skip to content

Commit

Permalink
luci-app-ddns: show the URL which will be used.
Browse files Browse the repository at this point in the history
  • Loading branch information
adelton committed Jan 11, 2025
1 parent 2520588 commit 7c52aef
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ return view.extend({
return _this.handleGetServiceData(service).then(L.bind(function (service_data) {
s.service_available = true;
s.service_supported = true;
s.url = null;

if (service != '-') {
if (!service_data)
Expand All @@ -594,6 +595,11 @@ return view.extend({
service_data = JSON.parse(service_data);
if (ipv6 == "1" && !service_data.ipv6)
s.service_supported = false;
else if (ipv6 == "1") {
s.url = service_data.ipv6.url;
} else {
s.url = service_data.ipv4.url;
}
}
}

Expand Down Expand Up @@ -674,6 +680,11 @@ return view.extend({
};
}

if (Boolean(s.url)) {
o = s.taboption('basic', form.DummyValue, '_url', _("Update URL"));
o.default = s.url;
}

var service_switch = s.taboption('basic', form.Button, '_switch_proto');
service_switch.modalonly = true;
service_switch.title = _('Really switch service?');
Expand Down

0 comments on commit 7c52aef

Please sign in to comment.