Skip to content

Attempt to resolve #1166 with displayTree=BOD in URL#1177

Merged
sei-ahouseholder merged 8 commits into
mainfrom
defaultTree
Jun 12, 2026
Merged

Attempt to resolve #1166 with displayTree=BOD in URL#1177
sei-ahouseholder merged 8 commits into
mainfrom
defaultTree

Conversation

@sei-vsarvepalli

Copy link
Copy Markdown
Contributor

Resolves Issue #1166 when you use the new code you can specify the defaultTree in url, a matching tree will be displayed as the default for both Explorer and Calculator tools.

This pull request updates the default decision tree selection logic in both the ssvc-calc and ssvc-explorer tools. The main improvement is allowing the default decision tree to be specified via a URL parameter, with better handling when the specified tree is not found. Additionally, version numbers for both tools have been incremented.

Default Decision Tree Selection Improvements:

  • Added support for specifying the default decision tree using a defaultTree URL parameter in both ssvc-calc (ssvc.js) and ssvc-explorer (simple.js). If the parameter is present, it overrides the previous hardcoded default. [1] [2]
  • Updated logic to select the decision tree whose name matches the defaultTree value, instead of always matching "Deployer". [1] [2]
  • Improved fallback behavior: if no matching tree is found, the first tree in the list is selected and a warning is logged. [1] [2]

Version Updates:

  • Bumped version number in ssvc-calc/ssvc.js from 6.0.2 to 6.1.1.
  • Bumped version number in ssvc-explorer/simple.js from 1.0.12 to 1.0.13.

Copilot AI review requested due to automatic review settings June 11, 2026 20:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables both the SSVC Calculator (ssvc-calc) and Explorer (ssvc-explorer) to choose the initial/default decision tree based on a defaultTree URL parameter, with a fallback to a default selection when no match is found.

Changes:

  • Added defaultTree URL parameter parsing in both tools to drive the initial tree selection.
  • Updated selection logic to match on the provided defaultTree string (instead of hardcoding a “Deployer” match).
  • Added fallback behavior and bumped tool version strings.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docs/ssvc-explorer/simple.js Adds URL-driven default tree selection and fallback selection logic for Explorer.
docs/ssvc-calc/ssvc.js Adds URL-driven default tree selection and fallback selection logic for Calculator; bumps version.

Comment thread docs/ssvc-calc/ssvc.js Outdated
Comment thread docs/ssvc-explorer/simple.js
Comment thread docs/ssvc-calc/ssvc.js Outdated
$(function () {
/* document.ready() */
reset_form();
let defaultTree = "Deployer Patch Application Priority";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My opinion only, for what it's worth:

"default" would be the thing that displays when no url parameter is set.
so the parameter will override the default, and could just be something like "tree" or "displayTree"

e.g., https://.../ssvc-calc/?tree=Foo

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or rather ?display=Foo (avoid tree since we want to be consistent calling them tables now

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay made it possible for both display and displayTree as potential URL parameters that can be used for displaying the right tree.

sei-vsarvepalli and others added 3 commits June 12, 2026 11:40
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sei-vsarvepalli sei-vsarvepalli marked this pull request as draft June 12, 2026 15:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread docs/ssvc-explorer/simple.js
Comment thread docs/ssvc-calc/ssvc.js
sei-vsarvepalli and others added 2 commits June 12, 2026 12:04
security fix for exception handling.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
exception handling for top.location - good idea.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sei-vsarvepalli sei-vsarvepalli marked this pull request as ready for review June 12, 2026 16:07
@sei-vsarvepalli sei-vsarvepalli changed the title Attempt to resolve #1166 with defaultTree=BOD in URL Attempt to resolve #1166 with displayTree=BOD in URL Jun 12, 2026
@sei-ahouseholder sei-ahouseholder self-requested a review June 12, 2026 18:41
@sei-ahouseholder sei-ahouseholder merged commit d6e4408 into main Jun 12, 2026
5 checks passed
@sei-ahouseholder sei-ahouseholder deleted the defaultTree branch June 12, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants