Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ability to add custom toolbar items to main page nav bar #537

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

phantomjinx
Copy link
Member

@phantomjinx phantomjinx commented Sep 6, 2023

This is an attempt to address the dynamic navbar that displays in hawtio-online. The toolbar dropdown is dynamic in that it changes link target, dependent on which plugin route is active. Therefore, this solution attempts to mirror this functionality.

To test, execute yarn start and click on Example 3 plugin to see the newly added custom toolbar items for that plugin.


  • core.ts

    • Adds optional toolbarItems property to plugin interface
  • HawtioHeader.tsx

    • Picks up the plugins from the context and find the plugin that is currently being displayed. If this plugin has a toolbar item property then pick up the components into a custom toolbar group

@phantomjinx phantomjinx self-assigned this Sep 6, 2023
@phantomjinx phantomjinx marked this pull request as draft September 6, 2023 16:40
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Test Results

    7 files   -   1      7 suites   - 1   44m 23s ⏱️ - 7m 42s
  56 tests +  4    51 ✔️ +  5    5 💤 ±0  0  - 1 
374 runs   - 26  353 ✔️  - 15  21 💤  - 3  0  - 8 

Results for commit a3af32a. ± Comparison against base commit 8e9ffee.

This pull request removes 1 and adds 5 tests. Note that renamed tests count towards both.
Checking the functionality of Help page. ‑ Check that the tabs contain data - Standard Help page tabs - Example #1.6
Checking the functionality of Camel Specific Route page. ‑ Check to add a breakpoint while debugging
Checking the functionality of Camel Specific Route page. ‑ Check to remove a breakpoint while debugging
Checking the functionality of Camel Specific Route page. ‑ Check to start the debugging
Checking the functionality of Camel Specific Route page. ‑ Check to stop the debugging
Checking the functionality of Camel Specific Route page. ‑ Check to view and edit chart of Specific Context

♻️ This comment has been updated with latest results.

@hawtio-ci
Copy link

hawtio-ci bot commented Sep 6, 2023

Test results

Run attempt: 314
Detailed summary

NAME TESTS PASSED ✅ SKIPPED 💤 FAILED ❌ ERRORS 🚫 TIME 🕖
results-quarkus-node(16)-java(11)-firefox 54 51 3 0 0 373.808
results-quarkus-node(16)-java(17)-firefox 54 51 3 0 0 346.701
results-quarkus-node(18)-java(11)-firefox 54 51 3 0 0 427.753
results-springboot-node(16)-java(11)-firefox 53 50 3 0 0 339.469
results-springboot-node(16)-java(17)-firefox 53 50 3 0 0 424.385
results-springboot-node(18)-java(11)-firefox 53 50 3 0 0 409.411
results-springboot-node(18)-java(17)-firefox 53 50 3 0 0 341.56

packages/hawtio/src/ui/page/HawtioHeader.tsx Outdated Show resolved Hide resolved
packages/hawtio/src/ui/page/HawtioHeader.tsx Outdated Show resolved Hide resolved
packages/hawtio/src/ui/page/HawtioHeader.tsx Outdated Show resolved Hide resolved
packages/hawtio/src/ui/page/HawtioHeader.tsx Outdated Show resolved Hide resolved
packages/hawtio/src/core/core.ts Outdated Show resolved Hide resolved
@tadayosi
Copy link
Member

tadayosi commented Sep 7, 2023

Also, please update the description of the Example 3 page body to explain what this example demonstrates (i.e. extending the header with custom actions).

image

@tadayosi
Copy link
Member

tadayosi commented Sep 7, 2023

Also, this should be feat: instead of fix: as it brings a new feature.

* core.ts
 * Adds optional toolbarItems property to plugin interface

* HawtioHeader.tsx
 * Picks up the plugins from the context and find the plugin that is
   currently being displayed. If this plugin has a toolbar item property
   then pick up the components into a custom toolbar group
@phantomjinx phantomjinx marked this pull request as ready for review September 7, 2023 10:37
@phantomjinx phantomjinx merged commit b1929f6 into hawtio:main Sep 7, 2023
12 of 13 checks passed
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.

2 participants