1
- import Box from "@material-ui/core/Box"
2
- import Paper from "@material-ui/core/Paper"
3
1
import { makeStyles } from "@material-ui/core/styles"
4
2
import Typography from "@material-ui/core/Typography"
5
- import CloudCircleIcon from "@material-ui/icons/CloudCircle"
6
3
import React from "react"
7
- import { Link } from "react-router-dom"
8
4
import * as Types from "../../api/types"
9
5
import { WorkspaceSchedule } from "../WorkspaceSchedule/WorkspaceSchedule"
10
6
import { WorkspaceSection } from "../WorkspaceSection/WorkspaceSection"
11
- import * as Constants from "./constants "
7
+ import { WorkspaceStatusBar } from "../WorkspaceStatusBar/WorkspaceStatusBar "
12
8
13
9
export interface WorkspaceProps {
14
10
organization : Types . Organization
@@ -25,7 +21,7 @@ export const Workspace: React.FC<WorkspaceProps> = ({ organization, template, wo
25
21
return (
26
22
< div className = { styles . root } >
27
23
< div className = { styles . vertical } >
28
- < WorkspaceHeader organization = { organization } template = { template } workspace = { workspace } />
24
+ < WorkspaceStatusBar organization = { organization } template = { template } workspace = { workspace } />
29
25
< div className = { styles . horizontal } >
30
26
< div className = { styles . sidebarContainer } >
31
27
< WorkspaceSection title = "Applications" >
@@ -55,40 +51,6 @@ export const Workspace: React.FC<WorkspaceProps> = ({ organization, template, wo
55
51
)
56
52
}
57
53
58
- /**
59
- * Component for the header at the top of the workspace page
60
- */
61
- export const WorkspaceHeader : React . FC < WorkspaceProps > = ( { organization, template, workspace } ) => {
62
- const styles = useStyles ( )
63
-
64
- const templateLink = `/templates/${ organization . name } /${ template . name } `
65
-
66
- return (
67
- < Paper elevation = { 0 } className = { styles . section } >
68
- < div className = { styles . horizontal } >
69
- < WorkspaceHeroIcon />
70
- < div className = { styles . vertical } >
71
- < Typography variant = "h4" > { workspace . name } </ Typography >
72
- < Typography variant = "body2" color = "textSecondary" >
73
- < Link to = { templateLink } > { template . name } </ Link >
74
- </ Typography >
75
- </ div >
76
- </ div >
77
- </ Paper >
78
- )
79
- }
80
-
81
- /**
82
- * Component to render the 'Hero Icon' in the header of a workspace
83
- */
84
- export const WorkspaceHeroIcon : React . FC = ( ) => {
85
- return (
86
- < Box mr = "1em" >
87
- < CloudCircleIcon width = { Constants . TitleIconSize } height = { Constants . TitleIconSize } />
88
- </ Box >
89
- )
90
- }
91
-
92
54
/**
93
55
* Temporary placeholder component until we have the sections implemented
94
56
* Can be removed once the Workspace page has all the necessary sections
@@ -115,12 +77,6 @@ export const useStyles = makeStyles((theme) => {
115
77
display : "flex" ,
116
78
flexDirection : "column" ,
117
79
} ,
118
- section : {
119
- border : `1px solid ${ theme . palette . divider } ` ,
120
- borderRadius : Constants . CardRadius ,
121
- padding : Constants . CardPadding ,
122
- margin : theme . spacing ( 1 ) ,
123
- } ,
124
80
sidebarContainer : {
125
81
display : "flex" ,
126
82
flexDirection : "column" ,
@@ -129,9 +85,5 @@ export const useStyles = makeStyles((theme) => {
129
85
timelineContainer : {
130
86
flex : 1 ,
131
87
} ,
132
- icon : {
133
- width : Constants . TitleIconSize ,
134
- height : Constants . TitleIconSize ,
135
- } ,
136
88
}
137
89
} )
0 commit comments