aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/frontend/html/util/component.js
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2024-11-26 08:53:06 +0100
committerGitHub Enterprise <[email protected]>2024-11-26 08:53:06 +0100
commit642ef2d3606b6a89d0750a88d0f40585965b989d (patch)
tree253f58083014ee902016e42cfe7bda93ea778200 /src/zenserver/frontend/html/util/component.js
parent5.5.14-pre1 (diff)
downloadzen-642ef2d3606b6a89d0750a88d0f40585965b989d.tar.xz
zen-642ef2d3606b6a89d0750a88d0f40585965b989d.zip
Dashboard: display package data sizes in oplog entry and tree views. (#232)
* Wrong divisor for friendly giga-values * We want Explorer style for kilo/kibi units; round up * var -> const - zero idea if this matters * Include sum of an entry's package data sizes in index * Method to enurate all properties of a loaded oplog index * Include bulkdata size in an oplog index * Found a space that was missing * Show package data sizes when viewing an oplog entry * Navigating a component tree would error out at the end of the chain * Parameterise friendly rounding * Added size and rawsize columns to oplog tree view * Sort of parameterised indexer's worker count and page size * Right-align size columns on entry view page * Updated frontend .zip archive * A changelog update
Diffstat (limited to 'src/zenserver/frontend/html/util/component.js')
-rw-r--r--src/zenserver/frontend/html/util/component.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/zenserver/frontend/html/util/component.js b/src/zenserver/frontend/html/util/component.js
index 39a9f2fe6..205aa038e 100644
--- a/src/zenserver/frontend/html/util/component.js
+++ b/src/zenserver/frontend/html/util/component.js
@@ -20,17 +20,20 @@ class ComponentBase
parent()
{
- return this.new_component(this._element.parentElement);
+ const e = this._element.parentElement;
+ return e ? this.new_component(e) : null;
}
first_child()
{
- return this.new_component(this._element.firstElementChild);
+ const e = this._element.firstElementChild;
+ return e ? this.new_component(e) : null;
}
next_sibling()
{
- return this.new_component(this._element.nextElementSibling);
+ const e = this._element.nextElementSibling;
+ return e ? this.new_component(e) : null;
}
destroy()