aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzousar <[email protected]>2026-02-18 23:15:09 -0700
committerzousar <[email protected]>2026-02-18 23:15:09 -0700
commita948ff9570a5a9d8ec424639cba6f973247a0372 (patch)
tree341a975228d1c2f65e53922e33b1255ca5bbdfab
parentupdatefrontend (diff)
downloadzen-a948ff9570a5a9d8ec424639cba6f973247a0372.tar.xz
zen-a948ff9570a5a9d8ec424639cba6f973247a0372.zip
entry.js handles missing/native items more gracefully
-rw-r--r--src/zenserver/frontend/html/pages/cookartifacts.js20
-rw-r--r--src/zenserver/frontend/html/pages/entry.js16
2 files changed, 32 insertions, 4 deletions
diff --git a/src/zenserver/frontend/html/pages/cookartifacts.js b/src/zenserver/frontend/html/pages/cookartifacts.js
index 6c36c7f32..f2ae094b9 100644
--- a/src/zenserver/frontend/html/pages/cookartifacts.js
+++ b/src/zenserver/frontend/html/pages/cookartifacts.js
@@ -261,13 +261,25 @@ export class Page extends ZenPage
{
const row = runtime_table.add_row(dep);
// Make Path clickable to navigate to entry
- row.get_cell(0).text(dep).on_click((opkey) => {
- window.location = `?page=entry&project=${project}&oplog=${oplog}&opkey=${opkey.toLowerCase()}`;
- }, dep);
+ if (this._should_link_dependency(dep))
+ {
+ row.get_cell(0).text(dep).on_click((opkey) => {
+ window.location = `?page=entry&project=${project}&oplog=${oplog}&opkey=${opkey.toLowerCase()}`;
+ }, dep);
+ }
}
}
}
+ _should_link_dependency(name)
+ {
+ // Exclude dependencies starting with /Script/ (code-defined entries) - case insensitive
+ if (name && name.toLowerCase().startsWith("/script/"))
+ return false;
+
+ return true;
+ }
+
_build_dependency_section(parent_section, title, dependencies, stored_key)
{
const section = parent_section.add_section(title);
@@ -338,7 +350,7 @@ export class Page extends ZenPage
const row = table.add_row(...row_values);
// Make Name field clickable for Package, TransitiveBuild, and RedirectionTarget
- if (should_link && name_col_index >= 0 && dep.Name)
+ if (should_link && name_col_index >= 0 && dep.Name && this._should_link_dependency(dep.Name))
{
const project = this.get_param("project");
const oplog = this.get_param("oplog");
diff --git a/src/zenserver/frontend/html/pages/entry.js b/src/zenserver/frontend/html/pages/entry.js
index c4746bf52..f418b17ba 100644
--- a/src/zenserver/frontend/html/pages/entry.js
+++ b/src/zenserver/frontend/html/pages/entry.js
@@ -181,6 +181,22 @@ export class Page extends ZenPage
async _build_page()
{
var entry = await this._entry;
+
+ // Check if entry exists
+ if (!entry || entry.as_object().find("entry") == null)
+ {
+ const opkey = this.get_param("opkey");
+ var section = this.add_section("Entry Not Found");
+ section.tag("p").text(`The entry "${opkey}" is not present in this dataset.`);
+ section.tag("p").text("This could mean:");
+ const list = section.tag("ul");
+ list.tag("li").text("The entry is for an instance defined in code");
+ list.tag("li").text("The entry has not been added to the oplog yet");
+ list.tag("li").text("The entry key is misspelled");
+ list.tag("li").text("The entry was removed or never existed");
+ return;
+ }
+
entry = entry.as_object().find("entry").as_object();
const name = entry.find("key").as_value();