File tree Expand file tree Collapse file tree 1 file changed +27
-3
lines changed
site/src/components/DeploymentBanner Expand file tree Collapse file tree 1 file changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import { TerminalIcon } from "components/Icons/TerminalIcon"
19
19
import dayjs from "dayjs"
20
20
import CollectedIcon from "@material-ui/icons/Compare"
21
21
import RefreshIcon from "@material-ui/icons/Refresh"
22
+ import Button from "@material-ui/core/Button"
22
23
23
24
export const bannerHeight = 36
24
25
@@ -192,11 +193,20 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = ({
192
193
</ div >
193
194
</ Tooltip >
194
195
195
- < Tooltip title = "A countdown until stats are refetched" >
196
- < div className = { styles . value } >
196
+ < Tooltip title = "A countdown until stats are fetched again. Click to refresh!" >
197
+ < Button
198
+ className = { `${ styles . value } ${ styles . refreshButton } ` }
199
+ title = "Refresh"
200
+ onClick = { ( ) => {
201
+ if ( fetchStats ) {
202
+ fetchStats ( )
203
+ }
204
+ } }
205
+ variant = "text"
206
+ >
197
207
< RefreshIcon />
198
208
{ timeUntilRefresh } s
199
- </ div >
209
+ </ Button >
200
210
</ Tooltip >
201
211
</ div >
202
212
</ div >
@@ -314,4 +324,18 @@ const useStyles = makeStyles((theme) => ({
314
324
alignItems : "center" ,
315
325
gap : theme . spacing ( 2 ) ,
316
326
} ,
327
+ refreshButton : {
328
+ margin : 0 ,
329
+ padding : "0px 8px" ,
330
+ height : "unset" ,
331
+ minHeight : "unset" ,
332
+ fontSize : "unset" ,
333
+ color : "unset" ,
334
+ border : 0 ,
335
+ minWidth : "unset" ,
336
+
337
+ "& svg" : {
338
+ marginRight : theme . spacing ( 0.5 ) ,
339
+ } ,
340
+ } ,
317
341
} ) )
You can’t perform that action at this time.
0 commit comments