summaryrefslogtreecommitdiffstats
path: root/modules-available/passthrough/page.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2021-09-30 17:44:30 +0200
committerSimon Rettberg2022-03-09 15:06:54 +0100
commitd736e75ade7a4472aefb72af9036f86016adcb42 (patch)
tree39e38d5dd687bc6d25cb1de45ce4b78423aa7984 /modules-available/passthrough/page.inc.php
parent[passthrough] New module for managing hardware passthrough for QEMU (diff)
downloadslx-admin-d736e75ade7a4472aefb72af9036f86016adcb42.tar.gz
slx-admin-d736e75ade7a4472aefb72af9036f86016adcb42.tar.xz
slx-admin-d736e75ade7a4472aefb72af9036f86016adcb42.zip
[statistics] Adapt hw-data parsing to new json format for display
Diffstat (limited to 'modules-available/passthrough/page.inc.php')
-rw-r--r--modules-available/passthrough/page.inc.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules-available/passthrough/page.inc.php b/modules-available/passthrough/page.inc.php
index 3ab0696e..7dcc8215 100644
--- a/modules-available/passthrough/page.inc.php
+++ b/modules-available/passthrough/page.inc.php
@@ -68,6 +68,7 @@ class Page_Passthrough extends Page
$q = new HardwareQuery(HardwareInfo::PCI_DEVICE, null, false);
$q->addGlobalColumn('vendor');
$q->addGlobalColumn('device');
+ $q->addGlobalColumn('rev');
$q->addGlobalColumn('class');
$q->addGlobalColumn('@PASSTHROUGH');
$rows = [];
@@ -110,10 +111,11 @@ class Page_Passthrough extends Page
$missing[$row['vendor'] . ':' . $row['device']] = true;
}
}
- Render::addTemplate('hardware-list', [
- 'list' => $finalRows,
- 'missing_ids' => json_encode(array_keys($missing)),
- ]);
+ Render::addTemplate('hardware-list', ['list' => $finalRows]);
+ if (!empty($missing)) {
+ Render::addTemplate('js-pciquery',
+ ['missing_ids' => json_encode(array_keys($missing))], 'statistics');
+ }
}
/*