summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-usteer/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorRamon Van Gorkom <Ramon00c00@gmail.com>2024-04-29 18:45:18 +0200
committerPaul Donald <itsascambutmailmeanyway+github@gmail.com>2024-05-02 00:49:50 +0200
commit3815d4fc0714169a18763352b6a9c70aef3adcf8 (patch)
tree543205bed82128adf444762b6198d3a955f83fc0 /applications/luci-app-usteer/htdocs/luci-static/resources
parentfa2aeb7d2ff84c0dc022c7432b6123cb950dbd61 (diff)
luci-app-usteer: Allow editing of settings if usteer is not running
Apparently, an invalid parameter can stop usteer from starting. This PR allows the editing of parameters while usteer is stopped. In that case the status tab is not shown. Signed-off-by: Ramon Van Gorkom <Ramon00c00@gmail.com>
Diffstat (limited to 'applications/luci-app-usteer/htdocs/luci-static/resources')
-rw-r--r--applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js18
1 files changed, 11 insertions, 7 deletions
diff --git a/applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js b/applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js
index 166ebcef4b..48ec283b61 100644
--- a/applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js
+++ b/applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js
@@ -368,13 +368,15 @@ return view.extend({
if (!('usteer' in data[0])) {
m = new form.Map('usteer', _('Usteer'),
- _('Usteer is not running. Make sure it is installed and running.') +
+ _('Usteer is not running. Make sure it is installed and running.') +' '+
+ _('An incorrect parameter can cause usteer to fail to start up.') +' '+
_('To start it running try %s').format('<code>/etc/init.d/usteer start</code>')
);
- return m.render();
}
- m = new form.Map('usteer', _('Usteer'));
+ else {
+ m = new form.Map('usteer', _('Usteer'));
+ }
Hosts = data[1];
Remotehosts = data[2];
@@ -389,11 +391,13 @@ return view.extend({
s.tab('hearingmap', _('Hearing map'));
s.tab('settings', _('Settings'));
- o = s.taboption('status', Clientinfooverview);
- o.readonly = true;
+ if (('usteer' in data[0])) {
+ o = s.taboption('status', Clientinfooverview);
+ o.readonly = true;
- o = s.taboption('hearingmap', HearingMap);
- o.readonly = true;
+ o = s.taboption('hearingmap', HearingMap);
+ o.readonly = true;
+ }
o = s.taboption('settings', Settingstitle);
o.readonly = true;