Minor fixes

This commit is contained in:
gSpot 2021-04-09 18:19:33 +03:00
parent 3265543379
commit 098bb4ef12
9 changed files with 45 additions and 46 deletions

View File

@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
PKG_VERSION:=0.3
PKG_RELEASE:=4
PKG_RELEASE:=5
LUCI_TITLE:=Information about connected disk devices (partitions, filesystems, SMART).
LUCI_DEPENDS:=+fdisk +smartmontools +smartmontools-drivedb
LUCI_PKGARCH:=all

View File

@ -5,16 +5,16 @@ OpenWrt >= 19.07.
**Installation notes:**
wget --no-check-certificate -O /tmp/luci-app-disks-info_0.3-4_all.ipk https://github.com/gSpotx2f/luci-app-disks-info/raw/master/packages/19.07/luci-app-disks-info_0.3-4_all.ipk
opkg install /tmp/luci-app-disks-info_0.3-4_all.ipk
rm /tmp/luci-app-disks-info_0.3-4_all.ipk
wget --no-check-certificate -O /tmp/luci-app-disks-info_0.3-5_all.ipk https://github.com/gSpotx2f/luci-app-disks-info/raw/master/packages/19.07/luci-app-disks-info_0.3-5_all.ipk
opkg install /tmp/luci-app-disks-info_0.3-5_all.ipk
rm /tmp/luci-app-disks-info_0.3-5_all.ipk
/etc/init.d/rpcd restart
**i18n-ru:**
wget --no-check-certificate -O /tmp/luci-i18n-disks-info-ru_0.3-4_all.ipk https://github.com/gSpotx2f/luci-app-disks-info/raw/master/packages/19.07/luci-i18n-disks-info-ru_0.3-4_all.ipk
opkg install /tmp/luci-i18n-disks-info-ru_0.3-4_all.ipk
rm /tmp/luci-i18n-disks-info-ru_0.3-4_all.ipk
wget --no-check-certificate -O /tmp/luci-i18n-disks-info-ru_0.3-5_all.ipk https://github.com/gSpotx2f/luci-app-disks-info/raw/master/packages/19.07/luci-i18n-disks-info-ru_0.3-5_all.ipk
opkg install /tmp/luci-i18n-disks-info-ru_0.3-5_all.ipk
rm /tmp/luci-i18n-disks-info-ru_0.3-5_all.ipk
**Screenshots:**

View File

@ -2,6 +2,38 @@
'require fs';
'require ui';
document.head.append(E('style', {'type': 'text/css'},
`
.label-status {
display: inline;
margin: 0 4px !important;
padding: 1px 4px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
text-transform: uppercase;
font-weight: bold;
line-height: 1.6em;
color: #fff !important;
}
.ok {
background-color: #2ea256 !important;
}
.warn {
background-color: #fff7e2 !important;
}
.err {
background-color: #ff4e54 !important;
color: #fff !important;
}
.err .td {
color: #fff !important;
}
.err td {
color: #fff !important;
}
`));
return L.view.extend({
fsSpaceWarning: 90,
@ -667,40 +699,6 @@ return L.view.extend({
},
render: function(devices) {
document.head.append(E('style', {'type': 'text/css'},
`
.label-status {
display: inline;
margin: 0 4px !important;
padding: 1px 4px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
text-transform: uppercase;
font-weight: bold;
line-height: 1.6em;
color: #fff !important;
}
.ok {
background-color: #2ea256 !important;
}
.warn {
background-color: #fff7e2 !important;
}
.err {
background-color: #ff4e54 !important;
color: #fff !important;
}
.err .td {
color: #fff !important;
}
.err td {
color: #fff !important;
}
`
));
let devicesNode = E('div', { 'class': 'cbi-section fade-in' },
E('div', { 'class': 'cbi-section-node' },
E('div', { 'class': 'cbi-value' },
@ -778,6 +776,7 @@ return L.view.extend({
};
if('ata_device_statistics' in smartObject) {
let ssdStatObject = smartObject.ata_device_statistics.pages.find(e => e.number == 7);
if(ssdStatObject) {
let ssdArea = this.createSsdArea(ssdStatObject);
if(ssdArea) {

View File

@ -2,7 +2,7 @@
module('luci.controller.disks-info', package.seeall)
function index()
if nixio.fs.access('/bin/df') and nixio.fs.access('/usr/sbin/fdisk') and nixio.fs.access('/usr/sbin/smartctl') then
entry({'admin', 'services', 'disks-info'}, view('disks-info'), _('Disks info'), 10).acl_depends = { 'luci-app-disks-info' }
end
if nixio.fs.access('/bin/df') and nixio.fs.access('/usr/sbin/fdisk') and nixio.fs.access('/usr/sbin/smartctl') then
entry({'admin', 'services', 'disks-info'}, view('disks-info'), _('Disks info'), 10).acl_depends = { 'luci-app-disks-info' }
end
end

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -134,8 +134,8 @@ msgstr "Нет смонтированных файловых систем"
msgid "No partitions available"
msgstr "Нет доступных разделов"
msgid "Отсутсвует в базе smartctl [подробно: -P showall]"
msgstr ""
msgid "Not in smartctl database [for details use: -P showall]"
msgstr "Отсутствует в базе smartctl [подробно: -P showall]"
msgid "Partitions"
msgstr "Разделы"