Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Clutch
Commits
762c2f80
Commit
762c2f80
authored
3 years ago
by
Scarlett Perry
Browse files
Options
Download
Email Patches
Plain Diff
add mock cards for PR reviewers
parent
f6e7a827
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/workflows/projectSelector/src/dash.tsx
+124
-2
frontend/workflows/projectSelector/src/dash.tsx
with
124 additions
and
2 deletions
+124
-2
frontend/workflows/projectSelector/src/dash.tsx
+
124
-
2
View file @
762c2f80
import
*
as
React
from
"
react
"
;
import
{
Table
,
TableRow
,
Typography
}
from
"
@clutch-sh/core
"
;
import
styled
from
"
@emotion/styled
"
;
import
{
Box
}
from
"
@material-ui/core
"
;
import
{
Box
,
Grid
as
MuiGrid
}
from
"
@material-ui/core
"
;
import
_
from
"
lodash
"
;
import
Card
from
"
./card
"
;
import
{
DashDispatchContext
,
DashStateContext
}
from
"
./dash-hooks
"
;
import
ProjectSelector
from
"
./project-selector
"
;
import
type
{
DashAction
,
DashState
}
from
"
./types
"
;
...
...
@@ -19,6 +21,10 @@ const CardContainer = styled.div({
overflowY
:
"
scroll
"
,
});
const
BigGrid
=
styled
(
MuiGrid
)({
margin
:
"
7px
"
,
});
const
dashReducer
=
(
state
:
DashState
,
action
:
DashAction
):
DashState
=>
{
switch
(
action
.
type
)
{
case
"
UPDATE_SELECTED
"
:
{
...
...
@@ -40,7 +46,123 @@ const Dash = ({ children }) => {
<
DashDispatchContext
.
Provider
value
=
{
dispatch
}
>
<
DashStateContext
.
Provider
value
=
{
state
}
>
<
ProjectSelector
/>
<
CardContainer
>
{
children
}
</
CardContainer
>
<
CardContainer
>
<
BigGrid
spacing
=
{
3
}
container
direction
=
"row"
justify
=
"flex-start"
alignItems
=
"flex-start"
alignContent
=
"flex-start"
>
<
Card
avatar
=
"🚀"
title
=
"Deploys"
summary
=
{
[
{
title
:
<
Typography
variant
=
"subtitle2"
>
-
</
Typography
>,
subheader
:
"
Last Deploy
"
,
},
{
title
:
(
<
Typography
variant
=
"subtitle2"
color
=
"#3548D4"
>
0
</
Typography
>
),
subheader
:
"
In progress
"
,
},
{
title
:
(
<
Typography
variant
=
"subtitle2"
color
=
"#DB3615"
>
0
</
Typography
>
),
subheader
:
"
Failed Deploys
"
,
},
]
}
>
<
Table
columns
=
{
[
""
,
""
,
""
,
""
]
}
responsive
>
<
TableRow
>
<
div
>
clutch
</
div
>
<
div
>
No commits
</
div
>
<
div
>
0m
</
div
>
<
div
>
✅ 🥚
</
div
>
</
TableRow
>
<
TableRow
>
<
div
>
clutch
</
div
>
<
div
>
No commits
</
div
>
<
div
>
0m
</
div
>
<
div
>
✅ 🥚
</
div
>
</
TableRow
>
<
TableRow
>
<
div
>
clutch
</
div
>
<
div
>
No commits
</
div
>
<
div
>
0m
</
div
>
<
div
>
✅ 🥚
</
div
>
</
TableRow
>
</
Table
>
</
Card
>
<
Card
avatar
=
"🚨"
title
=
"Alerts"
summary
=
{
[
{
title
:
<
Typography
variant
=
"subtitle2"
>
-
</
Typography
>,
subheader
:
"
Last alert
"
,
},
{
title
:
(
<
Typography
variant
=
"subtitle2"
color
=
"#3548D4"
>
0
</
Typography
>
),
subheader
:
"
Open
"
,
},
{
title
:
(
<
Typography
variant
=
"subtitle2"
color
=
"#DB3615"
>
0
</
Typography
>
),
subheader
:
"
Acknowledged
"
,
},
]
}
>
<
Table
columns
=
{
[
""
,
""
,
""
,
""
]
}
responsive
>
<
TableRow
>
<
div
>
clutch
</
div
>
<
div
>
No alerts
</
div
>
<></>
<></>
</
TableRow
>
<
TableRow
>
<
div
>
clutch
</
div
>
<
div
>
No alerts
</
div
>
<></>
<></>
</
TableRow
>
<
TableRow
>
<
div
>
clutch
</
div
>
<
div
>
No alerts
</
div
>
<></>
<></>
</
TableRow
>
</
Table
>
</
Card
>
<
Card
avatar
=
"🌏"
title
=
"Incidents"
>
<
Table
columns
=
{
[
""
,
""
]
}
responsive
>
<
TableRow
>
<
div
>
AWS
</
div
>
<
div
>
Healthy
</
div
>
</
TableRow
>
<
TableRow
>
<
div
>
Github
</
div
>
<
div
>
Healthy
</
div
>
</
TableRow
>
</
Table
>
</
Card
>
</
BigGrid
>
</
CardContainer
>
</
DashStateContext
.
Provider
>
</
DashDispatchContext
.
Provider
>
</
Box
>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help