mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/wol: change this back, bug in getArp()
This commit is contained in:
@@ -69,15 +69,7 @@ class WolController extends ApiMutableModelControllerBase
|
||||
|
||||
public function searchHostAction()
|
||||
{
|
||||
$ret = $this->searchBase('wolentry', ['interface', 'mac', 'descr']);
|
||||
|
||||
foreach ($ret['rows'] ?? [] as $idx => $wol) {
|
||||
/* not entirely accurate naming but it's too much effor to unwind this API */
|
||||
$ret['rows'][$idx]['identifier'] =
|
||||
(string)$this->getModel()->getNodeByReference('wolentry.' . $wol['uuid'])->interface;
|
||||
}
|
||||
|
||||
return $ret;
|
||||
return $this->searchBase('wolentry', ['interface', 'mac', 'descr']);
|
||||
}
|
||||
|
||||
public function getHostAction($uuid = null)
|
||||
|
||||
@@ -50,10 +50,10 @@ export default class WakeOnLan extends BaseTableWidget {
|
||||
const data = await this.ajaxCall('/api/wol/wol/searchHost');
|
||||
|
||||
let rows = [];
|
||||
if (data.total == 0) {
|
||||
if (data.total == 0) {
|
||||
const empty_list = [`<b>${this.translations.msg_empty_wol}</b>`];
|
||||
rows.push(empty_list);
|
||||
} else {
|
||||
} else {
|
||||
const header = [`<b>${this.translations.h_device}</b>`,
|
||||
`<b>${this.translations.h_interface}</b>`,
|
||||
`<b>${this.translations.h_status}</b>`,
|
||||
@@ -66,7 +66,7 @@ export default class WakeOnLan extends BaseTableWidget {
|
||||
|
||||
for(let it = 0; it < data.rows.length; it++){
|
||||
const item = data.rows[it];
|
||||
let is_active = this.checkActive(arp, item.mac, item.identifier);
|
||||
let is_active = this.checkActive(arp, item.mac, item.interface);
|
||||
let row = [
|
||||
`${item.descr.length !== 0 ? item.descr + '<br/>': ''} ${item.mac}`,
|
||||
`${item.interface}`,
|
||||
|
||||
Reference in New Issue
Block a user