File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
openbas-front/src/admin/components Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ const Dashboard = () => {
154
154
< Grid item xs = { 3 } >
155
155
< PaperMetric
156
156
title = { t ( 'Scenarios' ) }
157
+ subTitle = { t ( '(last 180 days)' ) }
157
158
icon = { < MovieFilterOutlined /> }
158
159
number = { statistics ?. scenarios_count ?. global_count }
159
160
progression = { statistics ?. scenarios_count ?. progression_count }
@@ -162,6 +163,7 @@ const Dashboard = () => {
162
163
< Grid item xs = { 3 } >
163
164
< PaperMetric
164
165
title = { t ( 'Simulations' ) }
166
+ subTitle = { t ( '(last 180 days)' ) }
165
167
icon = { < HubOutlined /> }
166
168
number = { statistics ?. exercises_count ?. global_count }
167
169
progression = { statistics ?. exercises_count ?. progression_count }
@@ -170,6 +172,7 @@ const Dashboard = () => {
170
172
< Grid item xs = { 3 } >
171
173
< PaperMetric
172
174
title = { t ( 'Players' ) }
175
+ subTitle = { t ( '(last 180 days)' ) }
173
176
icon = { < PersonOutlined /> }
174
177
number = { statistics ?. users_count ?. global_count }
175
178
progression = { statistics ?. users_count ?. progression_count }
@@ -178,6 +181,7 @@ const Dashboard = () => {
178
181
< Grid item xs = { 3 } >
179
182
< PaperMetric
180
183
title = { t ( 'Assets' ) }
184
+ subTitle = { t ( '(last 180 days)' ) }
181
185
icon = { < ComputerOutlined /> }
182
186
number = { statistics ?. assets_count ?. global_count }
183
187
progression = { statistics ?. assets_count ?. progression_count }
Original file line number Diff line number Diff line change @@ -10,8 +10,13 @@ import type { Theme } from '../../../../components/Theme';
10
10
const useStyles = makeStyles ( ( theme : Theme ) => ( {
11
11
title : {
12
12
textTransform : 'uppercase' ,
13
- fontSize : 12 ,
14
- fontWeight : 500 ,
13
+ fontSize : theme . typography . h4 . fontSize ,
14
+ fontWeight : theme . typography . h4 . fontWeight ,
15
+ color : theme . palette . text ?. secondary ,
16
+ } ,
17
+ subtitle : {
18
+ fontSize : theme . typography . h4 . fontSize ,
19
+ fontWeight : theme . typography . h4 . fontWeight ,
15
20
color : theme . palette . text ?. secondary ,
16
21
} ,
17
22
number : {
@@ -29,13 +34,15 @@ const useStyles = makeStyles((theme: Theme) => ({
29
34
30
35
interface Props {
31
36
title : string ;
37
+ subTitle : string ;
32
38
icon : React . ReactElement ;
33
39
number ?: number ;
34
40
progression ?: number ;
35
41
}
36
42
37
43
const PaperMetric : FunctionComponent < Props > = ( {
38
44
title,
45
+ subTitle,
39
46
icon,
40
47
number,
41
48
progression,
@@ -47,7 +54,13 @@ const PaperMetric: FunctionComponent<Props> = ({
47
54
return (
48
55
< Paper variant = "outlined" className = { classes . container } >
49
56
< div >
50
- < div className = { classes . title } > { t ( title ) } </ div >
57
+ < div >
58
+ < span className = { classes . title } > { t ( title ) } </ span >
59
+ < span className = { classes . subtitle } >
60
+
61
+ { t ( subTitle ) }
62
+ </ span >
63
+ </ div >
51
64
< div className = { classes . number } >
52
65
{ number ?? '-' }
53
66
</ div >
You can’t perform that action at this time.
0 commit comments