Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ windowskey 2, ldap 6, oidc 8, capone 2, subnetgroup 1 -- are declared in
core's map and applied by a step in each plugin's own `schema()` in
`FOGProject/fog-plugins`.

**126 of the map's 141 relationships are declared.** The other 15 are not
**127 of the map's 143 relationships are declared.** The other 16 are not
pending work: they carry action `none`, which the map's docblock defines as a
decision rather than an omission. Nine are audit rows, which MUST NOT
decision rather than an omission. Ten are audit rows, which MUST NOT
constrain the thing they record (ADR 0021, `schema.php` step 341); six are
polymorphic columns whose target table is chosen by a sibling column, where
no constraint is expressible at all. Nothing in the map is waiting on a
Expand Down
2 changes: 1 addition & 1 deletion docs/development/foreign-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ half-converted column.
## Phase D — plugins, and the direction rule

18 plugin tables ship in `FOGProject/fog-plugins`. All 18 clone cleanly into
the survey and 29 of the map's 141 relationships live in them.
the survey and 29 of the map's 143 relationships live in them.

### Direction is the whole rule

Expand Down
5 changes: 5 additions & 0 deletions packages/web/commons/schema-constraints.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,11 @@
['child' => 'hostSoftware', 'column' => 'hsHostID', 'parent' => 'hosts', 'pcolumn' => 'hostID', 'class' => 'satellite', 'action' => 'CASCADE', 'enabled' => true, 'group' => 14],
['child' => 'hostUserSession', 'column' => 'husHostID', 'parent' => 'hosts', 'pcolumn' => 'hostID', 'class' => 'satellite', 'action' => 'CASCADE', 'enabled' => true, 'group' => 14],
['child' => 'hostFactState', 'column' => 'hfsHostID', 'parent' => 'hosts', 'pcolumn' => 'hostID', 'class' => 'satellite', 'action' => 'CASCADE', 'enabled' => true, 'group' => 14],
// Performance Test results (fos#55). A satellite of the host: CASCADE.
// The task id is audit, like taskLog.taskID: a result records something
// that happened and must not constrain the task row.
['child' => 'hostPerfTests', 'column' => 'hptHostID', 'parent' => 'hosts', 'pcolumn' => 'hostID', 'class' => 'satellite', 'action' => 'CASCADE', 'enabled' => true, 'group' => 14],
['child' => 'hostPerfTests', 'column' => 'hptTaskID', 'parent' => 'tasks', 'pcolumn' => 'taskID', 'class' => 'audit', 'action' => 'none'],
['child' => 'hostDirectory', 'column' => 'hdHostID', 'parent' => 'hosts', 'pcolumn' => 'hostID', 'class' => 'satellite', 'action' => 'CASCADE', 'enabled' => true, 'group' => 14],
['child' => 'hostPrinter', 'column' => 'hpHostID', 'parent' => 'hosts', 'pcolumn' => 'hostID', 'class' => 'satellite', 'action' => 'CASCADE', 'enabled' => true, 'group' => 14],
['child' => 'hostSpooler', 'column' => 'hspHostID', 'parent' => 'hosts', 'pcolumn' => 'hostID', 'class' => 'satellite', 'action' => 'CASCADE', 'enabled' => true, 'group' => 14],
Expand Down
19 changes: 19 additions & 0 deletions packages/web/commons/schema-expected.php
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,25 @@
'hnObservedAt' => 'datetime DEFAULT NULL',
],
],
'hostPerfTests' => [
'create' => 'CREATE TABLE IF NOT EXISTS `hostPerfTests` ( `hptID` int(11) NOT NULL AUTO_INCREMENT, `hptHostID` int(11) NOT NULL, `hptTaskID` int(11) NOT NULL DEFAULT 0, `hptDateTime` datetime DEFAULT NULL, `hptDisk` varchar(64) NOT NULL DEFAULT \'\', `hptDiskMBps` int(10) unsigned NOT NULL DEFAULT 0, `hptNetMBps` int(10) unsigned NOT NULL DEFAULT 0, `hptCpuMBps` int(10) unsigned NOT NULL DEFAULT 0, `hptRatio` int(10) unsigned NOT NULL DEFAULT 0, `hptFormat` varchar(8) NOT NULL DEFAULT \'\', `hptSample` varchar(255) NOT NULL DEFAULT \'\', `hptBottleneck` varchar(16) NOT NULL DEFAULT \'\', `hptKernel` varchar(64) NOT NULL DEFAULT \'\', `hptInit` varchar(32) NOT NULL DEFAULT \'\', PRIMARY KEY (`hptID`), KEY `hptHostID` (`hptHostID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC',
'columns' => [
'hptID' => 'int(11) NOT NULL',
'hptHostID' => 'int(11) NOT NULL',
'hptTaskID' => 'int(11) NOT NULL DEFAULT 0',
'hptDateTime' => 'datetime DEFAULT NULL',
'hptDisk' => 'varchar(64) NOT NULL DEFAULT \'\'',
'hptDiskMBps' => 'int(10) unsigned NOT NULL DEFAULT 0',
'hptNetMBps' => 'int(10) unsigned NOT NULL DEFAULT 0',
'hptCpuMBps' => 'int(10) unsigned NOT NULL DEFAULT 0',
'hptRatio' => 'int(10) unsigned NOT NULL DEFAULT 0',
'hptFormat' => 'varchar(8) NOT NULL DEFAULT \'\'',
'hptSample' => 'varchar(255) NOT NULL DEFAULT \'\'',
'hptBottleneck' => 'varchar(16) NOT NULL DEFAULT \'\'',
'hptKernel' => 'varchar(64) NOT NULL DEFAULT \'\'',
'hptInit' => 'varchar(32) NOT NULL DEFAULT \'\'',
],
],
'hostPrinter' => [
'create' => 'CREATE TABLE IF NOT EXISTS `hostPrinter` ( `hpID` int(11) NOT NULL AUTO_INCREMENT, `hpHostID` int(11) NOT NULL, `hpName` varchar(255) NOT NULL DEFAULT \'\', `hpURI` varchar(1024) NOT NULL DEFAULT \'\', `hpDriver` varchar(255) NOT NULL DEFAULT \'\', `hpDefault` tinyint(1) NOT NULL DEFAULT 0, `hpShared` tinyint(1) NOT NULL DEFAULT 0, `hpObservedAt` datetime DEFAULT NULL, PRIMARY KEY (`hpID`), UNIQUE KEY `hpHostName` (`hpHostID`,`hpName`), KEY `hpName` (`hpName`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC',
'columns' => [
Expand Down
48 changes: 48 additions & 0 deletions packages/web/commons/schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -11998,3 +11998,51 @@ function () {
. "JOIN `groupModuleAssoc` g ON g.`gmaGroupID` = gm.`gmGroupID` "
. "WHERE gm.`gmHostID` = h.`hostID` AND g.`gmaModuleID` = m.`id`)",
];

// 444
$this->schema[] = [
// The Performance Test task type (fos#55). FOS boots with
// mode=perftest, times the disk, the network and decompression, and
// reports the result to service/perftest.php. The task changes
// nothing on the disk.
//
// ttID 27 is the next free id (26 is the Secure Boot test task).
// Deleted ids are not reused. ttIsAdvanced '1': a diagnostic, not a
// fleet operation, so it sits behind the Advanced toggle. It needs no
// image, so getTasking() treats it like the wipes.
"INSERT IGNORE INTO `taskTypes` "
. "(`ttID`,`ttName`,`ttDescription`,`ttIcon`,`ttKernel`,"
. "`ttKernelArgs`,`ttType`,`ttIsAdvanced`,`ttIsAccess`) "
. "VALUES "
. "(27,'Performance Test','Times the disk, network and decompression "
. "speed of the client to find what limits imaging. It changes nothing "
. "on the disk.','gauge-high','','mode=perftest','fog','1','both')",
// One row per reported run, newest first on the host page.
//
// hptHostID is a satellite of the host: the rows go with the host
// (CASCADE in commons/schema-constraints.php, group 14, like
// hostUserSession). hptTaskID is an audit reference: a result records
// something that happened and must not constrain the task row, the
// same as taskLog.taskID.
//
// A rate of 0 means FOS did not measure it. hptRatio is the
// compression ratio times 100, so 250 is 2.50:1.
"CREATE TABLE IF NOT EXISTS `hostPerfTests` ( "
. "`hptID` int(11) NOT NULL AUTO_INCREMENT, "
. "`hptHostID` int(11) NOT NULL, "
. "`hptTaskID` int(11) NOT NULL DEFAULT 0, "
. "`hptDateTime` datetime DEFAULT NULL, "
. "`hptDisk` varchar(64) NOT NULL DEFAULT '', "
. "`hptDiskMBps` int(10) unsigned NOT NULL DEFAULT 0, "
. "`hptNetMBps` int(10) unsigned NOT NULL DEFAULT 0, "
. "`hptCpuMBps` int(10) unsigned NOT NULL DEFAULT 0, "
. "`hptRatio` int(10) unsigned NOT NULL DEFAULT 0, "
. "`hptFormat` varchar(8) NOT NULL DEFAULT '', "
. "`hptSample` varchar(255) NOT NULL DEFAULT '', "
. "`hptBottleneck` varchar(16) NOT NULL DEFAULT '', "
. "`hptKernel` varchar(64) NOT NULL DEFAULT '', "
. "`hptInit` varchar(32) NOT NULL DEFAULT '', "
. "PRIMARY KEY (`hptID`), "
. "KEY `hptHostID` (`hptHostID`) "
. ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC",
];
39 changes: 39 additions & 0 deletions packages/web/management/js/fog/host/fog.host.edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,45 @@
}
});

// ---------------------------------------------------------------
// PERFORMANCE TAB (read only)
//
// One row per Performance Test run, newest first. The server formats the
// rates and the ratio (getPerfTests), so every column only escapes. The
// empty-state sentence is translated server side and handed over in a
// hidden element.
var hostPerfTestTable = $('#host-perftest-table').registerTable(null, {
columns: [
$.escapedColumn('date'),
$.escapedColumn('disk'),
$.escapedColumn('diskMBps'),
$.escapedColumn('netMBps'),
$.escapedColumn('cpuMBps'),
$.escapedColumn('ratio'),
$.escapedColumn('format'),
$.escapedColumn('bottleneck'),
$.escapedColumn('kernel'),
$.escapedColumn('init')
],
order: [
[0, 'desc']
],
rowId: 'id',
processing: true,
serverSide: true,
select: false,
language: {
emptyTable: $('#host-perftest-empty').text()
},
ajax: {
url: '../management/index.php?node='
+ Common.node
+ '&sub=getPerfTests&id='
+ Common.id,
type: 'post'
}
});

// FOG CLIENT AREA
// ---------------------------------------------------------------
// CLIENT SETTINGS TAB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2746,6 +2746,9 @@ msgstr "Debug"
msgid "Decided."
msgstr ""

msgid "Decompress MB/s"
msgstr ""

msgid "Default"
msgstr "Standard"

Expand Down Expand Up @@ -2950,6 +2953,12 @@ msgstr "Ausgewählte löschen"
msgid "Disabled items are not displayed. Legacy items are removed."
msgstr ""

msgid "Disk"
msgstr ""

msgid "Disk MB/s"
msgstr ""

msgid "Display"
msgstr "Anzeige"

Expand Down Expand Up @@ -3908,6 +3917,9 @@ msgstr "Ausgewählte löschen"
msgid "Forgotten. Any database tables the plugin created are still there -- what to drop is described by code that is no longer installed."
msgstr ""

msgid "Format"
msgstr ""

#, fuzzy
msgid "Forums"
msgstr "FOG-Forum"
Expand Down Expand Up @@ -4482,6 +4494,10 @@ msgstr "Host Aktualisierung erfolgreich!"
msgid "Host OU Updated!"
msgstr "Host aktualisiert!"

#, fuzzy
msgid "Host Performance Tests"
msgstr "Host-Produkt-Schlüssel"

msgid "Host Primary Disk"
msgstr "Primäre Festplatte Host"

Expand Down Expand Up @@ -5820,6 +5836,10 @@ msgstr "Lizenz"
msgid "Light"
msgstr "Mitternacht"

#, fuzzy
msgid "Limited by"
msgstr "Erstellt von"

msgid "Line"
msgstr "Zeile"

Expand Down Expand Up @@ -6586,6 +6606,9 @@ msgstr "Netzwerkinformationen"
msgid "Network Interface"
msgstr "Netzwerk-Installer"

msgid "Network MB/s"
msgstr ""

msgid "Network Printer"
msgstr "Netzwerk-Drucker"

Expand Down Expand Up @@ -6838,6 +6861,10 @@ msgstr ""
msgid "No payloads for the capability, or not a live row of this host."
msgstr "Keinen aktiven Task gefunden für Host"

#, fuzzy
msgid "No performance tests have run for this host."
msgstr "Keinen aktiven Task gefunden für Host"

#, fuzzy
msgid "No plugin tasks to run"
msgstr "Keine gültigen Tasks gefunden"
Expand Down Expand Up @@ -7540,6 +7567,10 @@ msgstr "Ausstehend..."
msgid "People"
msgstr ""

#, fuzzy
msgid "Performance"
msgstr "Versuche, anzupingen"

#, fuzzy
msgid "Permission"
msgstr "Version"
Expand Down Expand Up @@ -8158,6 +8189,10 @@ msgstr ""
msgid "RX"
msgstr "RX"

#, fuzzy
msgid "Ratio"
msgstr "Dauer"

msgid "Re-Transmit Hello Interval"
msgstr ""

Expand Down Expand Up @@ -12894,6 +12929,9 @@ msgstr "auf diesem Knoten nicht gefunden"
msgid "not joined"
msgstr ""

msgid "not measured"
msgstr ""

#, fuzzy
msgid "not reachable"
msgstr "Nicht verfügbar"
Expand Down Expand Up @@ -14005,10 +14043,6 @@ msgstr ""
#~ msgid "Pending Mac List"
#~ msgstr "Ausstehende MACs"

#, fuzzy
#~ msgid "Performing ping"
#~ msgstr "Versuche, anzupingen"

#, fuzzy
#~ msgid "Please Enter an admin or mobile lookup name"
#~ msgstr "Bitte geben Sie einen Namen für einen Admin oder einen mobilen Lookup ein."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2748,6 +2748,9 @@ msgstr "Debug"
msgid "Decided."
msgstr ""

msgid "Decompress MB/s"
msgstr ""

msgid "Default"
msgstr "Default"

Expand Down Expand Up @@ -2952,6 +2955,12 @@ msgstr "Delete Selected"
msgid "Disabled items are not displayed. Legacy items are removed."
msgstr ""

msgid "Disk"
msgstr ""

msgid "Disk MB/s"
msgstr ""

msgid "Display"
msgstr "Display"

Expand Down Expand Up @@ -3909,6 +3918,9 @@ msgstr "Delete Selected"
msgid "Forgotten. Any database tables the plugin created are still there -- what to drop is described by code that is no longer installed."
msgstr ""

msgid "Format"
msgstr ""

#, fuzzy
msgid "Forums"
msgstr "FOG Forums"
Expand Down Expand Up @@ -4483,6 +4495,10 @@ msgstr "Install / Update Successful!"
msgid "Host OU Updated!"
msgstr "User updated"

#, fuzzy
msgid "Host Performance Tests"
msgstr "Host Product Key"

msgid "Host Primary Disk"
msgstr "Host Primary Disk"

Expand Down Expand Up @@ -5819,6 +5835,10 @@ msgstr "License"
msgid "Light"
msgstr "Midnight"

#, fuzzy
msgid "Limited by"
msgstr "Created By"

msgid "Line"
msgstr "Line"

Expand Down Expand Up @@ -6597,6 +6617,9 @@ msgstr "Network Information"
msgid "Network Interface"
msgstr "Network Printer"

msgid "Network MB/s"
msgstr ""

msgid "Network Printer"
msgstr "Network Printer"

Expand Down Expand Up @@ -6849,6 +6872,10 @@ msgstr ""
msgid "No payloads for the capability, or not a live row of this host."
msgstr "No Active Task found for Host"

#, fuzzy
msgid "No performance tests have run for this host."
msgstr "No Active Task found for Host"

#, fuzzy
msgid "No plugin tasks to run"
msgstr "No valid class sent"
Expand Down Expand Up @@ -7549,6 +7576,10 @@ msgstr "Pending..."
msgid "People"
msgstr ""

#, fuzzy
msgid "Performance"
msgstr "Attempting to ping"

#, fuzzy
msgid "Permission"
msgstr "Version"
Expand Down Expand Up @@ -8167,6 +8198,10 @@ msgstr ""
msgid "RX"
msgstr "RX"

#, fuzzy
msgid "Ratio"
msgstr "Duration"

msgid "Re-Transmit Hello Interval"
msgstr ""

Expand Down Expand Up @@ -12896,6 +12931,9 @@ msgstr "Image not found on node"
msgid "not joined"
msgstr ""

msgid "not measured"
msgstr ""

#, fuzzy
msgid "not reachable"
msgstr "Not Available"
Expand Down Expand Up @@ -13982,10 +14020,6 @@ msgstr ""
#~ msgid "Pending Mac List"
#~ msgstr "Pending macs"

#, fuzzy
#~ msgid "Performing ping"
#~ msgstr "Attempting to ping"

#, fuzzy
#~ msgid "Please Enter an admin or mobile lookup name"
#~ msgstr "Please enter a name for this location."
Expand Down
Loading
Loading