Commit graph

96 commits

Author SHA1 Message Date
Jo-Philipp Wich
fceabd7446 luci-mod-system: add missing require to none led trigger class
Also convert ES6 to ES5 syntax while we're at it.

Fixes: #5476
Fixes: 5b42cd5b46 ("luci-mod-system: move default option from defaul-on trigger to none trigger")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-10-31 22:27:46 +01:00
Florian Eckert
b710c4a843
Merge pull request #5328 from TDT-AG/pr/20210903-luci-mod-system
luci-mod-system: add led-trigger description
2021-10-28 15:47:44 +02:00
Florian Eckert
5b42cd5b46 luci-mod-system: move default option from defaul-on trigger to none trigger
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-10-28 15:43:50 +02:00
Florian Eckert
bff0878f91 luci-mod-system: add led-trigger description
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-10-27 10:38:34 +02:00
Jo-Philipp Wich
07569c5af2 luci-mod-system: fix time display logic
Use the system/info ubus call to obtain a TZ adjusted epoch value and
format the date time string manually instead of relying on the browsers
local representation.

Fixes: #5454
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-10-19 23:09:46 +02:00
Petr Štetiar
7c943a1d6b luci-mod-system: allow configuration of HTTPS redirection
Add a posibility for easy configuration of HTTPS redirection in uHTTPd.

References: https://lists.infradead.org/pipermail/openwrt-devel/2020-December/032718.html
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2021-09-28 10:46:36 -10:00
Rosen Penev
738f36a1c3 fix wrong ed25519 information
ECDH is not used for the ed25519. The scheme is called EdDSA.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-20 12:11:00 -10:00
Florian Eckert
b5ea85b724 luci-mod-system: add help text to the led-trigger timer
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-09-03 10:00:22 +02:00
Ansuel Smith
82035eec61 luci-mod-system: hide unsupported option on flash.js
Hide unsupported option when /rom is not used in flash.js

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-08-18 13:44:37 +03:00
Fritz D. Ansel
8fb2d82f70 system: more text lines for crontab
10 lines are very few and there is much unused space

Signed-off-by: Fritz D. Ansel <fdansel@yandex.ru>
2021-08-11 09:25:46 +02:00
Ansuel Smith
0f4f6e89f1
luci-mod-system: improve sysupgrade page
- Add missing -k and -u option from sysupgrade page.
- Fix missing check for image verification exit code
- Provide the actual reason of the image verification

Fixes: #4160

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-08-05 15:50:56 +02:00
Jo-Philipp Wich
8d4ac60f7a luci-mod-system: reload crond upon saving crontab
Fixes: #5184
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-07-15 11:58:38 +02:00
Dirk Brenken
8c6a29a45c
luci-mod-system: remove bogus btn class in flash.js
* fixes #4970
* sync translations

Signed-off-by: Dirk Brenken <dev@brenken.org>
2021-04-15 19:52:52 +02:00
Henrique de Moraes Holschuh
80a1a9a555 luci-mod-system: implement system.description, system.notes
Implement two new text "options" for UCI system config, intended to
help humans describe the device.

"system.description" is a short, single-line description suitable for
selector UIs in remote administration applications, or remote UCI (over
ubus RPC), etc.  It would also be suitable as a default for LLDP/SNMP
"system description".

"system.notes" is a multi-line, free-form text field that can be used in
any way the user wishes, e.g. to hold installation notes, or unit serial
number and inventory number, location, etc.

Signed-off-by: Henrique de Moraes Holschuh <henrique@nic.br>
2021-04-06 23:20:26 +03:00
Rui Salvaterra
4bf84e29ea luci-mod-system/zram: remove zram_comp_streams
Zram uses per-CPU compression streams [1]. This is a no-op.

[1] https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=116191eddf9d8ddba61de788824dea442b265936

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-03-14 12:24:16 +00:00
Rui Salvaterra
02cadf67b2 luci-mod-system/zram: replace deflate with zstd
Deflate is just too slow for zram. Replace it with zstd, which is much faster at
similar compression ratios.

As a side note, this is an ugly hack. We're hard-coding compression algorithms
which might not be available in the system. The availability should be parsed
from /sys/block/zram0/comp_algorithm.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-03-14 12:24:15 +00:00
Hannu Nyman
e2ac2e92b0 luci-base: correct button name on flash page help text
Correct the help text in the flash page to match the current
buttons. 'Continue' instead of "Proceed".

Adjust translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-01-12 19:13:52 +02:00
Jo-Philipp Wich
846b89c5bf luci-mod-system: fix parsing SSH pubkeys with options
Also eliminate some duplicate code while we're at it.

Fixes: #4684
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-12-23 15:33:08 +01:00
Jo-Philipp Wich
03c77dafe3 treewide: transition div tables to actual table markup
Modern browsers allow decomposing table markup equally well as nested div
constructs, therefor migrate our <div> table markup to actual <table> tags
but keep the old table/tr/th/td CSS classes for now to allow for a smooth
theme transition.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-11-27 21:36:40 +01:00
Florian Eckert
a75ae38b6b luci-mod-system: fix uci led option remove callback
fixes #4478

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-10-06 11:30:48 +02:00
Rafał Miłecki
96bb528ccc luci-mod-system: use ubus method for reboot
It's more generic & convenient than hardcoding /sbin/reboot executable
path. procd provides "reboot" method since 2016.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2020-09-10 17:35:07 +02:00
Jo-Philipp Wich
d2d3738d90 luci-mod-system: ignore empty /proc/mtd on flash page
A present, but empty /proc/mtd causes validation on the flash page to fail,
preventing any other operation.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-07-22 10:29:11 +02:00
Huangbin Zhan
6e9b996c63 luci-mod-system: fix button disabled status
Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
2020-05-13 04:26:59 +08:00
Florian Eckert
d6dba39139 luci-mod-system: update LED trigger translations
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-05-04 12:02:36 +02:00
Jo-Philipp Wich
34c06b4704 luci-mod-system: password.js: make event handler attachment more robust
Do not expect a specific markup structure but use querySelector() to locate
the input element.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-05-02 23:53:02 +02:00
Jo-Philipp Wich
111670245e luci-mod-system: system.js: disable timesync buttons on readonly map
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16 15:39:54 +02:00
Jo-Philipp Wich
e822382a98 luci-mod-system: startup.js: disable action buttons on insufficient ACLs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16 15:38:56 +02:00
Jo-Philipp Wich
74e8fb0c8e luci-mod-system: sshkeys.js: make readonly on insufficient ACLs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16 15:38:09 +02:00
Jo-Philipp Wich
d7a17641d3 luci-mod-system: password.js: make readonly on insufficient ACLs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16 15:36:39 +02:00
Jo-Philipp Wich
01129d5297 luci-mod-system: mounts.js: disable umount button in readonly map
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16 15:35:51 +02:00
Jo-Philipp Wich
684f7dd7dc luci-mod-system: flash.js: make readonly on insufficient ACLs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16 15:35:13 +02:00
Jo-Philipp Wich
92902225fb luci-mod-system: crontab.js: disable textarea on insufficient ACLs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16 15:33:02 +02:00
Jo-Philipp Wich
3c4bc228a1 treewide: import utility classes explicitly
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-03 10:00:06 +02:00
Jo-Philipp Wich
3afe606743 luci-mod-system: system.js: rework local time widget markup
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-23 21:58:25 +01:00
Jo-Philipp Wich
90990df3b6 luci-mod-system: use proper CSS class for map description
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-23 21:56:55 +01:00
Jo-Philipp Wich
9706388c42 luci-mod-system: use generic .cbi-section-actions style for row actions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-23 21:53:53 +01:00
Florian Eckert
638f5ce071 luci-mod-system: add led plugin infrastructure
This commit creates the possibility that not only kernel-led-triggers can
be selected but also application-led-triggers from user space.
This is done via a plugin mechanism. The application-led-triggers are scripts
that set kernel-led-triggers on system events or services. Until now this
has not been possible. The package rssileds is a kind of
application-led-trigger.

The following new packages are added:

* luci-app-ledtrig-rssi (application-led-trigger)
* luci-app-ledtrig-switch (kernel-led-trigger) not needed on every most devices
* luci-app-ledtrig-usport (kernel-led-trigger) optional trigger

Since we have now a plugin mechanism I have added the following triggers
as a dependency. So this triggers are now installed per default on LuCI
installation.

* kmod-ledtrig-default-on
* kmod-ledtrig-heartbeat
* kmod-ledtrig-netdev
* kmod-ledtrig-timer

The kernel trigger kmod-ledtrig-usbdev was removed with the commit
d0b50c2770
So I have not ported the relevant code anymore.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-02-27 13:28:03 +01:00
Jo-Philipp Wich
b8f65c340c luci-mod-system: fix zram compression placeholder
Fixes: #3583
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-29 09:00:57 +01:00
Ansuel Smith
5e6ec8562f
luci-base: remove hardcoded cgi-bin path
Currently LuCI can be loaded only when placed in the root of the server as the cgi-bin path are hardcoded. Change the index.html to load the cgi-bin path from the current level.
Also add a new entry in the env Object to make the cgi_base path easily accessible.
This variable will be based on the position of /cgi-bin/luci.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-01-16 15:02:14 +01:00
Jo-Philipp Wich
a3ea891b7e luci-mod-system: sshkeys.js: do not incorrectly filter ecdsa keys on load
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-13 16:55:28 +01:00
Jo-Philipp Wich
0731f7e5e4 luci-mod-system: leds.js: display default state as On/Off
Fixes: #3289
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-11 10:14:03 +01:00
Yousong Zhou
90051b6858 luci-mod-system: validate log_ip as "host" instead of just ipaddr
Fixes FS#2444

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-11-04 02:19:06 +00:00
Jo-Philipp Wich
86f492173d treewide: require ui.js explicitly
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03 21:55:50 +01:00
Jo-Philipp Wich
54163c95e1 luci-mod-system: sshkeys.js: explicitely require ui.js
While ui.js is implicitely autoloaded by other classes, we need to require
it directly in the view to avoid race conditions during rendering.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03 18:03:01 +01:00
Jo-Philipp Wich
af5dc2652e luci-mod-system: flash.js: upon sysupgrade, select reconnect ip by keep state
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:45:00 +01:00
Jo-Philipp Wich
7d84396471 luci-mod-system: flash.js: fix flash erase modal
The firstboot rpc call might not return, therefor do not wait on promise
fullfillment but display modal dialog right away.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:42:48 +01:00
Jo-Philipp Wich
33346dadf4 luci-base, luci-mod-system: move file upload handling to ui.js
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
5ce16764ad luci-base, luci-mod-system: replace luci/setUmount with fs.exec calls
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
c67d2ddc2c luci-base, luci-mod-system: replace luci/setReboot with fs.exec
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Richard Yu
c6d0822793
luci-mod-system: add missing speed_mask option in leds.js
Signed-off-by: Richard Yu <yurichard3839@gmail.com>
2019-10-28 14:57:19 +08:00