Skip to content

Commit

Permalink
Specify version number of the dashboard in footer (#3447)
Browse files Browse the repository at this point in the history
* PBENCH-1092
Specify version number
Include the version number in the footer
  • Loading branch information
MVarshini authored Jun 2, 2023
1 parent 1dbad11 commit 6b25590
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
16 changes: 16 additions & 0 deletions dashboard/src/modules/components/FooterComponent/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import "./index.less";

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

const Footer = () => {
const { endpoints } = useSelector((state) => state.apiEndpoint);

return (
<div className="footer-container">
Version @ <span> {endpoints?.identification}</span>
</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: 0.85em;
overflow-x: hidden;
text-align: center;

span {
font-style: italic;
}
}
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

0 comments on commit 6b25590

Please sign in to comment.