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

Specify version number of the dashboard in footer #3447

Merged
merged 2 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions dashboard/src/modules/components/FooterComponent/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import "./index.less";

import React from "react";
import { useSelector } from "react-redux";

const Footer = () => {
const { endpoints } = useSelector((state) => state.apiEndpoint);
const versionNumber = endpoints?.identification
?.split(" ")
dbutenhof marked this conversation as resolved.
Show resolved Hide resolved
.slice(-1)
.join("");
return (
<div className="footer-container">
Version @ <span> {versionNumber}</span>
dbutenhof marked this conversation as resolved.
Show resolved Hide resolved
</div>
);
};

export default Footer;
13 changes: 13 additions & 0 deletions dashboard/src/modules/components/FooterComponent/index.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.footer-container {
width: 100%;
padding: 1.5rem;
background: #151515;
color: #ffffff;
font-size: .85em;
overflow-x: hidden;
text-align: center;

span {
font-style: italic;
}
}
dbutenhof marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 2 additions & 0 deletions dashboard/src/modules/containers/MainLayout/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import "./index.less";
import { Outlet, useNavigate } from "react-router-dom";
import { Page, PageSection, PageSectionVariants } from "@patternfly/react-core";

import Footer from "modules/components/FooterComponent";
import HeaderComponent from "modules/components/HeaderComponent";
import LoadingComponent from "modules/components/LoadingComponent";
import React from "react";
Expand All @@ -24,6 +25,7 @@ const MainLayout = () => {
<LoadingComponent>
<Outlet context={navigate} />
</LoadingComponent>
<Footer />
</PageSection>
</Page>
</>
Expand Down