mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
sysutils/smart: fix ACL
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<name>Services: SMART</name>
|
||||
<patterns>
|
||||
<pattern>ui/smart/*</pattern>
|
||||
<pattern>api/smart/*</pattern>
|
||||
<pattern>api/smart/service/*</pattern>
|
||||
</patterns>
|
||||
</page-services-smart>
|
||||
</acl>
|
||||
|
||||
@@ -44,7 +44,7 @@ export default class Smart extends BaseTableWidget {
|
||||
if (this.disks && this.disks.devices) {
|
||||
for (const device of this.disks.devices) {
|
||||
try {
|
||||
const data = await ajaxCall("/api/smart/service/info", { type: "H", device });
|
||||
const data = await this.ajaxCall('/api/smart/service/info', { type: "H", device });
|
||||
const health = data.output.includes("PASSED");
|
||||
$(`#${device}`).css({ color: health ? "green" : "red", fontSize: '150%' });
|
||||
$(`#${device}`).text(health ? "OK" : "FAILED");
|
||||
@@ -57,7 +57,7 @@ export default class Smart extends BaseTableWidget {
|
||||
|
||||
async onMarkupRendered() {
|
||||
try {
|
||||
this.disks = await ajaxCall("/api/smart/service/list", {});
|
||||
this.disks = await this.ajaxCall('/api/smart/service/list', {});
|
||||
const rows = [];
|
||||
for (const device of this.disks.devices) {
|
||||
const field = $(`<span id="${device}">`).prop('outerHTML');
|
||||
|
||||
Reference in New Issue
Block a user