Commit d36504ae by Chaiwith Santaweesuk

update

parent 997740c0
......@@ -46,16 +46,6 @@ const Data = [
],
},
{
title: 'Fingerprint chart',
backgroundColor: '#5E73F6',
detail: [
{ smtitle: 'Total Fingerprint', smValue: 0 },
{ smtitle: 'Avg. Fingerprint', smValue: 0 },
{ smtitle: 'Max. Fingerprint', smValue: 0, iconType: 'max' },
{ smtitle: 'Min. Fingerprint', smValue: 0, iconType: 'min' },
],
},
{
title: 'Keycard chart',
backgroundColor: '#5E73F6',
detail: [
......@@ -65,6 +55,16 @@ const Data = [
{ smtitle: 'Min. Keycard', smValue: 0, iconType: 'min' },
],
},
{
title: 'Fingerprint chart',
backgroundColor: '#5E73F6',
detail: [
{ smtitle: 'Total Fingerprint', smValue: 0 },
{ smtitle: 'Avg. Fingerprint', smValue: 0 },
{ smtitle: 'Max. Fingerprint', smValue: 0, iconType: 'max' },
{ smtitle: 'Min. Fingerprint', smValue: 0, iconType: 'min' },
],
}
];
class Home extends Component {
......@@ -217,11 +217,19 @@ class Home extends Component {
remoteMax: Math.round(this.getMax(response.data.queries[0].results[2].values) * 100) / 100,
remoteMin: Math.round(this.getMin(response.data.queries[0].results[2].values) * 100) / 100,
remoteAvg: Math.round(this.getAvg(response.data.queries[0].results[2].values) * 100) / 100,
fingerPrintTotal: Math.round(this.getTotal(response.data.queries[0].results[0].values) * 100) / 100,
fingerPrintTotal: Math.round(
response.data.queries[0].results[0].values[
response.data.queries[0].results[0].values.length - 1
][1] * 100
) / 100,
fingerPrintMax: Math.round(this.getMax(response.data.queries[0].results[0].values) * 100) / 100,
fingerPrintMin: Math.round(this.getMin(response.data.queries[0].results[0].values) * 100) / 100,
fingerPrintAvg: Math.round(this.getAvg(response.data.queries[0].results[0].values) * 100) / 100,
keycardTotal: Math.round(this.getTotal(response.data.queries[0].results[3].values) * 100) / 100,
keycardTotal: Math.round(
response.data.queries[0].results[3].values[
response.data.queries[0].results[3].values.length - 1
][1] * 100
) / 100,
keycardMax: Math.round(this.getMax(response.data.queries[0].results[3].values) * 100) / 100,
keycardMin: Math.round(this.getMin(response.data.queries[0].results[3].values) * 100) / 100,
keycardAvg: Math.round(this.getAvg(response.data.queries[0].results[3].values) * 100) / 100,
......@@ -353,16 +361,6 @@ class Home extends Component {
]}
/>
<DataCard
item={Data[5]}
feedData={fingerPrintFeed}
datavalue={[
{ title: 'total', value: this.state.fingerPrintTotal },
{ title: 'avg', value: this.state.fingerPrintAvg },
{ title: 'max', value: this.state.fingerPrintMax },
{ title: 'min', value: this.state.fingerPrintMin },
]}
/>
<DataCard
item={Data[4]}
feedData={keycardFeed}
datavalue={[
......@@ -372,6 +370,16 @@ class Home extends Component {
{ title: 'min', value: this.state.keycardMin },
]}
/>
<DataCard
item={Data[5]}
feedData={fingerPrintFeed}
datavalue={[
{ title: 'total', value: this.state.fingerPrintTotal },
{ title: 'avg', value: this.state.fingerPrintAvg },
{ title: 'max', value: this.state.fingerPrintMax },
{ title: 'min', value: this.state.fingerPrintMin },
]}
/>
</Row>
<Row>
<DataTable table={this.state.table} />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment