@@ -12,7 +12,11 @@ import FormControlLabel from '@material-ui/core/FormControlLabel';
12
12
import IconButton from '@material-ui/core/IconButton' ;
13
13
import AddIcon from '@material-ui/icons/Add' ;
14
14
import DeleteIcon from '@material-ui/icons/Delete' ;
15
+ import DialogActions from '@material-ui/core/DialogActions' ;
16
+ import DialogContentText from '@material-ui/core/DialogContentText' ;
15
17
import EditIcon from '@material-ui/icons/Edit' ;
18
+ import Link from '@material-ui/core/Link' ;
19
+ import MenuItem from '@material-ui/core/MenuItem' ;
16
20
import Paper from '@material-ui/core/Paper' ;
17
21
import Tab from '@material-ui/core/Tab' ;
18
22
import Table from '@material-ui/core/Table' ;
@@ -30,12 +34,14 @@ import FirstPageIcon from '@material-ui/icons/FirstPage';
30
34
import KeyboardArrowLeft from '@material-ui/icons/KeyboardArrowLeft' ;
31
35
import KeyboardArrowRight from '@material-ui/icons/KeyboardArrowRight' ;
32
36
import LastPageIcon from '@material-ui/icons/LastPage' ;
37
+ import TableFooter from '@material-ui/core/TableFooter' ;
38
+ import TablePagination from '@material-ui/core/TablePagination' ;
39
+ import { Autocomplete } from '@material-ui/lab' ;
33
40
import { Client , Configuration , LoggedUser , Pool , Session , SessionConfiguration , SessionUpdateConfiguration , Template , User , UserConfiguration , UserUpdateConfiguration } from '@substrate/playground-client' ;
34
41
import { CenteredContainer , ErrorSnackbar , LoadingPanel } from '../components' ;
35
42
import { useInterval } from '../hooks' ;
36
43
import { canCustomizeDuration , canCustomizePoolAffinity , hasAdminEditRights } from '../utils' ;
37
- import { DialogActions , DialogContentText , MenuItem , TableFooter , TablePagination } from '@material-ui/core' ;
38
- import { Autocomplete } from '@material-ui/lab' ;
44
+
39
45
40
46
const useStyles = makeStyles ( {
41
47
table : {
@@ -394,6 +400,8 @@ function Sessions({ client, conf, user }: { client: Client, conf: Configuration,
394
400
setPage ( 0 ) ;
395
401
} ;
396
402
403
+ const stopPropagation = ( event : React . SyntheticEvent ) => event . stopPropagation ( ) ;
404
+
397
405
return (
398
406
< Resources < Session > label = "Sessions" callback = { async ( ) => await client . listSessions ( ) } >
399
407
{ ( resources : Record < string , Session > , setSessions : Dispatch < SetStateAction < Record < string , Session > | null > > ) => {
@@ -438,10 +446,10 @@ function Sessions({ client, conf, user }: { client: Client, conf: Configuration,
438
446
/>
439
447
</ TableCell >
440
448
< TableCell component = "th" scope = "row" >
441
- < a href = { `https://github.com/${ id } ` } > { id } </ a >
449
+ < Link href = { `https://github.com/${ id } ` } target = "_blank" rel = "noreferrer" onClick = { stopPropagation } > { id } </ Link >
442
450
</ TableCell >
443
451
< TableCell > { session . template . name } </ TableCell >
444
- < TableCell > < a href = { `//${ session . url } ` } > { session . url } </ a > </ TableCell >
452
+ < TableCell > < Link href = { `//${ session . url } ` } target = "_blank" rel = "noreferrer" onClick = { stopPropagation } > Browse { session . url } </ Link > </ TableCell >
445
453
< TableCell > { session . duration } </ TableCell >
446
454
< TableCell > { session . pod . phase } </ TableCell >
447
455
< TableCell > { session . node } </ TableCell >
0 commit comments