Dashboard.js
14.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
import React from 'react';
import {
Row,
Col,
Progress,
Table,
Label,
Input,
} from 'reactstrap';
import Widget from '../../components/Widget';
/* eslint-disable */
import Calendar from './components/calendar/Calendar';
import Map from './components/mapael-map/MapaelMap';
import Rickshaw from './components/rickshaw/Rickshaw';
/* eslint-enable */
import AnimateNumber from 'react-animated-number';
import s from './Dashboard.module.scss';
import peopleA1 from '../../images/people/a1.jpg';
import peopleA2 from '../../images/people/a2.jpg';
import peopleA5 from '../../images/people/a5.jpg';
import peopleA4 from '../../images/people/a4.jpg';
class Dashboard extends React.Component {
constructor(props) {
super(props);
this.state = {
graph: null,
checkedArr: [false, false, false],
};
this.checkTable = this.checkTable.bind(this);
}
checkTable(id) {
let arr = [];
if (id === 0) {
const val = !this.state.checkedArr[0];
for (let i = 0; i < this.state.checkedArr.length; i += 1) {
arr[i] = val;
}
} else {
arr = this.state.checkedArr;
arr[id] = !arr[id];
}
if (arr[0]) {
let count = 1;
for (let i = 1; i < arr.length; i += 1) {
if (arr[i]) {
count += 1;
}
}
if (count !== arr.length) {
arr[0] = !arr[0];
}
}
this.setState({
checkedArr: arr,
});
}
render() {
return (
<div className={s.root}>
<h1 className="page-title">Dashboard
<small>
<small>The Lucky One</small>
</small>
</h1>
<Row>
<Col lg={7}>
<Widget className="bg-transparent">
<Map />
</Widget>
</Col>
<Col lg={1} />
<Col lg={4}>
<Widget
className="bg-transparent"
title={<h5> Map
<span className="fw-semi-bold"> Statistics</span></h5>} settings refresh close
>
<p>Status: <strong>Live</strong></p>
<p>
<span className="circle bg-warning text-white"><i className="fa fa-map-marker" /></span>
146 Countries, 2759 Cities
</p>
<div className="row progress-stats">
<div className="col-md-9 col-12">
<h6 className="name">Foreign Visits</h6>
<p className="description deemphasize mb-xs">Some Cool Text</p>
<Progress color="primary" value="60" className="bg-white progress-xs" />
</div>
<div className="col-md-3 col-12 text-center">
<span className="status rounded rounded-lg bg-body-light">
<small><AnimateNumber value={75} />%</small>
</span>
</div>
</div>
<div className="row progress-stats">
<div className="col-md-9 col-12">
<h6 className="name">Local Visits</h6>
<p className="description deemphasize mb-xs">P. to C. Conversion</p>
<Progress color="danger" value="39" className="bg-white progress-xs" />
</div>
<div className="col-md-3 col-12 text-center">
<span className="status rounded rounded-lg bg-body-light">
<small><AnimateNumber value={84} />%</small>
</span>
</div>
</div>
<div className="row progress-stats">
<div className="col-md-9 col-12">
<h6 className="name">Sound Frequencies</h6>
<p className="description deemphasize mb-xs">Average Bitrate</p>
<Progress color="success" value="80" className="bg-white progress-xs" />
</div>
<div className="col-md-3 col-12 text-center">
<span className="status rounded rounded-lg bg-body-light">
<small><AnimateNumber value={92} />%</small>
</span>
</div>
</div>
<h6 className="fw-semi-bold mt">Map Distributions</h6>
<p>Tracking: <strong>Active</strong></p>
<p>
<span className="circle bg-warning text-white"><i className="fa fa-cog" /></span>
391 elements installed, 84 sets
</p>
<div className="input-group mt">
<input type="text" className="form-control" placeholder="Search Map" />
<span className="input-group-btn">
<button type="submit" className="btn btn-default">
<i className="fa fa-search text-gray" />
</button>
</span>
</div>
</Widget>
</Col>
</Row>
<Row>
<Col lg={4} xs={12}>
<Widget
title={<h6> USERBASE GROWTH </h6>}
close settings
>
<div className="stats-row">
<div className="stat-item">
<h6 className="name">Overall Growth</h6>
<p className="value">76.38%</p>
</div>
<div className="stat-item">
<h6 className="name">Montly</h6>
<p className="value">10.38%</p>
</div>
<div className="stat-item">
<h6 className="name">24h</h6>
<p className="value">3.38%</p>
</div>
</div>
<Progress color="success" value="60" className="bg-gray-lighter progress-xs" />
<p>
<small>
<span className="circle bg-warning text-white">
<i className="fa fa-chevron-up" />
</span>
</small>
<span className="fw-semi-bold"> 17% higher</span>
than last month
</p>
</Widget>
</Col>
<Col lg={4} xs={12}>
<Widget
title={<h6> TRAFFIC VALUES </h6>}
close settings
>
<div className="stats-row">
<div className="stat-item">
<h6 className="name">Overall Values</h6>
<p className="value">17 567 318</p>
</div>
<div className="stat-item">
<h6 className="name">Montly</h6>
<p className="value">55 120</p>
</div>
<div className="stat-item">
<h6 className="name">24h</h6>
<p className="value">9 695</p>
</div>
</div>
<Progress color="danger" value="60" className="bg-gray-lighter progress-xs" />
<p>
<small><span className="circle bg-warning text-white"><i className="fa fa-chevron-down" /></span></small>
<span className="fw-semi-bold"> 8% lower</span>
than last month
</p>
</Widget>
</Col>
<Col lg={4} xs={12}>
<Widget
title={<h6> RANDOM VALUES </h6>}
close settings
>
<div className="stats-row">
<div className="stat-item">
<h6 className="name fs-sm">Overcome T.</h6>
<p className="value">104.85%</p>
</div>
<div className="stat-item">
<h6 className="name fs-sm">Takeoff Angle</h6>
<p className="value">14.29°</p>
</div>
<div className="stat-item">
<h6 className="name fs-sm">World Pop.</h6>
<p className="value">7,211M</p>
</div>
</div>
<Progress color="bg-primary" value="60" className="bg-gray-lighter progress-xs" />
<p>
<small><span className="circle bg-warning text-white"><i className="fa fa-plus" /></span></small>
<span className="fw-semi-bold"> 8 734 higher</span>
than last month
</p>
</Widget>
</Col>
</Row>
<Row>
<Col lg={4} xs={12}>
<Widget
title={<h6><span className="badge badge-danger">New</span> Messages</h6>}
refresh close
>
<div className="widget-body p-0">
<div className="list-group list-group-lg">
<button className="list-group-item text-left">
<span className="thumb-sm float-left mr">
<img className="rounded-circle" src={peopleA2} alt="..." />
<i className="status status-bottom bg-success" />
</span>
<div>
<h6 className="m-0">Chris Gray</h6>
<p className="help-block text-ellipsis m-0">Hey! What's up? So many times since we</p>
</div>
</button>
<button className="list-group-item text-left">
<span className="thumb-sm float-left mr">
<img className="rounded-circle" src={peopleA4} alt="..." />
<i className="status status-bottom bg-success" />
</span>
<div>
<h6 className="m-0">Jamey Brownlow</h6>
<p className="help-block text-ellipsis m-0">Good news coming tonight. Seems they agreed to
proceed</p>
</div>
</button>
<button className="list-group-item text-left">
<span className="thumb-sm float-left mr">
<img className="rounded-circle" src={peopleA1} alt="..." />
<i className="status status-bottom bg-warning" />
</span>
<div>
<h6 className="m-0">Livia Walsh</h6>
<p className="help-block text-ellipsis m-0">Check my latest email plz!</p>
</div>
</button>
<button className="list-group-item text-left">
<span className="thumb-sm float-left mr">
<img className="rounded-circle" src={peopleA5} alt="..." />
<i className="status status-bottom bg-danger" />
</span>
<div>
<h6 className="m-0">Jaron Fitzroy</h6>
<p className="help-block text-ellipsis m-0">What about summer break?</p>
</div>
</button>
</div>
</div>
<footer className="bg-body-light mt">
<input type="search" className="form-control form-control-sm" placeholder="Search" />
</footer>
</Widget>
</Col>
<Col lg={4} xs={12}>
<Widget
title={<h6> Market <span className="fw-semi-bold">Stats</span></h6>} close
>
<div className="widget-body">
<h3>$720 Earned</h3>
<p className="fs-mini text-muted mb mt-sm">
Target <span className="fw-semi-bold">$820</span> day earnings
is <span className="fw-semi-bold">96%</span> reached.
</p>
</div>
<div className={`widget-table-overflow ${s.table}`}>
<Table striped size="sm">
<thead className="no-bd">
<tr>
<th>
<div className="checkbox abc-checkbox">
<Input
className="mt-0"
id="checkbox210" type="checkbox" onClick={() => this.checkTable(0)}
checked={this.state.checkedArr[0]}
readOnly
/>{' '}
<Label for="checkbox210" />
</div>
</th>
<th> </th>
<th> </th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div className="checkbox abc-checkbox">
<Input
className="mt-0"
id="checkbox212" type="checkbox" onClick={() => this.checkTable(1)}
checked={this.state.checkedArr[1]}
readOnly
/>{' '}
<Label for="checkbox212" />
</div>
</td>
<td>HP Core i7</td>
<td className="text-align-right fw-semi-bold">$346.1</td>
</tr>
<tr>
<td>
<div className="checkbox abc-checkbox">
<Input
className="mt-0"
id="checkbox214" onClick={() => this.checkTable(2)} type="checkbox"
checked={this.state.checkedArr[2]}
readOnly
/>{' '}
<Label for="checkbox214" />
</div>
</td>
<td>Air Pro</td>
<td className="text-align-right fw-semi-bold">$533.1</td>
</tr>
</tbody>
</Table>
</div>
<div className="widget-body mt-xlg chart-overflow-bottom" style={{ height: '100px' }}>
<Rickshaw height={100} />
</div>
</Widget>
</Col>
<Col lg={4} xs={12}>
<Widget title={<h6>Calendar</h6>} settings close bodyClass="p-0">
<Calendar />
<div className="list-group fs-mini">
<button className="list-group-item text-ellipsis">
<span className="badge badge-pill badge-warning float-right">6:45</span>
Weed out the flower bed
</button>
<button className="list-group-item text-ellipsis">
<span className="badge badge-pill badge-success float-right">9:41</span>
Stop world water pollution
</button>
</div>
</Widget>
</Col>
</Row>
</div>
);
}
}
export default Dashboard;