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

graph/index.html: Add onclick listener to fix navbar #51

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

c4rt0
Copy link
Member

@c4rt0 c4rt0 commented Jan 27, 2025

@c4rt0 c4rt0 requested a review from jbtrystram January 27, 2025 18:03
@dustymabe
Copy link
Member

I don't think we should hardcode the URL in this file.. we should try to use relative URLs when possible (i.e. for one it makes development easier):

Something like this gets me closer but I really shouldn't have the index.html in there

diff --git a/graph/index.html b/graph/index.html
index 51c0057..4520b56 100644
--- a/graph/index.html
+++ b/graph/index.html
@@ -59,7 +59,7 @@ function zeroStream() {
 <!-- Navbar -->
 <nav class="navbar is-light" role="navigation" aria-label="main navigation">
   <div class="navbar-brand">
-    <a class="navbar-item" href="https://builds.coreos.fedoraproject.org/graph?stream=stable&basearch=x86_64"><img src="https://fedoraproject.org/assets/images/coreos-logo-light.png"/></a>
+    <a class="navbar-item" href="."><img src="https://fedoraproject.org/assets/images/coreos-logo-light.png"/></a>
   </div>
 
   <div class="navbar-end">
@@ -171,7 +171,7 @@ document.querySelectorAll('.navbar-item.has-dropdown a').forEach(item => {
 });
 
 function navigateToLink() {
-  const url = `https://builds.coreos.fedoraproject.org/graph?stream=${selectedStream}&basearch=x86_64&infra=prod`;
+  const url = `./index.html?stream=${selectedStream}&basearch=x86_64&infra=prod`;
   window.location.href = url; // executes the above and goes to the URL
 }
 // Return Cincinnati URL.

@dustymabe
Copy link
Member

is it possible to make the architecture selectable too?

Copy link
Contributor

@jbtrystram jbtrystram left a comment

Choose a reason for hiding this comment

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

thanks for tackling that ! Can you update the others selectors as well, like arch and add one for oci ?

graph/index.html Outdated
Comment on lines 81 to 84
<a class="navbar-link">Infrastructure</a>
<div class="navbar-dropdown">
<a class="navbar-item">Production</a>
<a class="navbar-item">Staging</a>
<!-- <a class="navbar-item">Staging</a> -> Removing / unavaialbe -->
Copy link
Contributor

Choose a reason for hiding this comment

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

if only production works, lets remove the whole selector

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I needed a second opinion on this, hence commenting it out :) Will do!

Copy link
Contributor

@jbtrystram jbtrystram left a comment

Choose a reason for hiding this comment

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

thanks for tackling that ! Can you update the others selectors as well, like arch and add one for oci ?

@c4rt0
Copy link
Member Author

c4rt0 commented Feb 5, 2025

is it possible to make the architecture selectable too?

Sure! Implemented in 82ff875

@c4rt0 c4rt0 marked this pull request as draft February 5, 2025 11:53
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.

Broken navbar menu on the browser for FCOS update graph
3 participants