@@ -19,7 +19,7 @@ import { Theme } from "@mui/material/styles";
1919import createStyles from "@mui/styles/createStyles" ;
2020import withStyles from "@mui/styles/withStyles" ;
2121import { Link } from "react-router-dom" ;
22- import { CircularProgress , IconButton } from "@mui/material" ;
22+ import { Box , CircularProgress , IconButton } from "@mui/material" ;
2323import PageHeader from "../../../Common/PageHeader/PageHeader" ;
2424import { containerForHeader } from "../../../Common/FormComponents/common/styleLibrary" ;
2525import ExitToAppIcon from "@mui/icons-material/ExitToApp" ;
@@ -46,15 +46,20 @@ const styles = (theme: Theme) =>
4646 divContainer : {
4747 position : "absolute" ,
4848 left : 0 ,
49- top : 77 ,
50- height : "calc(100vh - 77px )" ,
49+ top : 80 ,
50+ height : "calc(100vh - 81px )" ,
5151 width : "100%" ,
5252 } ,
5353 loader : {
5454 width : 100 ,
5555 margin : "auto" ,
5656 marginTop : 80 ,
5757 } ,
58+
59+ pageHeader : {
60+ borderBottom : "1px solid #dedede" ,
61+ } ,
62+
5863 ...containerForHeader ( theme . spacing ( 4 ) ) ,
5964 } ) ;
6065
@@ -66,72 +71,76 @@ const Hop = ({ classes, match }: IHopSimple) => {
6671 const consoleFrame = React . useRef < HTMLIFrameElement > ( null ) ;
6772
6873 return (
69- < React . Fragment >
70- < PageHeader
71- label = {
72- < Fragment >
73- < Link to = { "/tenants" } className = { classes . breadcrumLink } >
74- Tenants
75- </ Link >
76- { ` > ` }
77- < Link
78- to = { `/namespaces/${ tenantNamespace } /tenants/${ tenantName } ` }
79- className = { classes . breadcrumLink }
80- >
81- { match . params [ "tenantName" ] }
82- </ Link >
83- { ` > Management` }
84- </ Fragment >
85- }
86- actions = {
87- < React . Fragment >
88- < IconButton
89- color = "primary"
90- aria-label = "Refresh List"
91- component = "span"
92- onClick = { ( ) => {
93- if (
94- consoleFrame !== null &&
95- consoleFrame . current !== null &&
96- consoleFrame . current . contentDocument !== null
97- ) {
98- const loc =
99- consoleFrame . current . contentDocument . location . toString ( ) ;
74+ < Fragment >
75+ < Box className = { classes . pageHeader } >
76+ < PageHeader
77+ label = {
78+ < Fragment >
79+ < Link to = { "/tenants" } className = { classes . breadcrumLink } >
80+ Tenants
81+ </ Link >
82+ { ` > ` }
83+ < Link
84+ to = { `/namespaces/${ tenantNamespace } /tenants/${ tenantName } ` }
85+ className = { classes . breadcrumLink }
86+ >
87+ { match . params [ "tenantName" ] }
88+ </ Link >
89+ { ` > Management` }
90+ </ Fragment >
91+ }
92+ actions = {
93+ < React . Fragment >
94+ < IconButton
95+ color = "primary"
96+ aria-label = "Refresh List"
97+ component = "span"
98+ onClick = { ( ) => {
99+ if (
100+ consoleFrame !== null &&
101+ consoleFrame . current !== null &&
102+ consoleFrame . current . contentDocument !== null
103+ ) {
104+ const loc =
105+ consoleFrame . current . contentDocument . location . toString ( ) ;
100106
101- let add = "&" ;
107+ let add = "&" ;
102108
103- if ( loc . indexOf ( "?" ) < 0 ) {
104- add = `?` ;
105- }
109+ if ( loc . indexOf ( "?" ) < 0 ) {
110+ add = `?` ;
111+ }
106112
107- if ( loc . indexOf ( "cp=y" ) < 0 ) {
108- const next = `${ loc } ${ add } cp=y` ;
109- consoleFrame . current . contentDocument . location . replace ( next ) ;
110- } else {
111- consoleFrame . current . contentDocument . location . reload ( ) ;
113+ if ( loc . indexOf ( "cp=y" ) < 0 ) {
114+ const next = `${ loc } ${ add } cp=y` ;
115+ consoleFrame . current . contentDocument . location . replace (
116+ next
117+ ) ;
118+ } else {
119+ consoleFrame . current . contentDocument . location . reload ( ) ;
120+ }
112121 }
113- }
114- } }
115- size = "large"
116- >
117- < RefreshIcon / >
118- </ IconButton >
119- < IconButton
120- color = "primary "
121- aria-label = "Refresh List "
122- component = "span"
123- onClick = { ( ) => {
124- history . push (
125- `/namespaces/ ${ tenantNamespace } /tenants/ ${ tenantName } `
126- ) ;
127- } }
128- size = "large"
129- >
130- < ExitToAppIcon / >
131- </ IconButton >
132- </ React . Fragment >
133- }
134- / >
122+ } }
123+ size = "large"
124+ >
125+ < RefreshIcon / >
126+ </ IconButton >
127+ < IconButton
128+ color = "primary"
129+ aria-label = "Refresh List "
130+ component = "span "
131+ onClick = { ( ) => {
132+ history . push (
133+ `/namespaces/ ${ tenantNamespace } /tenants/ ${ tenantName } `
134+ ) ;
135+ } }
136+ size = "large"
137+ >
138+ < ExitToAppIcon / >
139+ </ IconButton >
140+ </ React . Fragment >
141+ }
142+ />
143+ </ Box >
135144 < div className = { classes . divContainer } >
136145 { loading && (
137146 < div className = { classes . loader } >
@@ -148,7 +157,7 @@ const Hop = ({ classes, match }: IHopSimple) => {
148157 } }
149158 />
150159 </ div >
151- </ React . Fragment >
160+ </ Fragment >
152161 ) ;
153162} ;
154163
0 commit comments