Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
toiletcoin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
atichat
toiletcoin
Commits
211586c7
Commit
211586c7
authored
May 13, 2020
by
Chaiwith Santaweesuk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update double value
parent
b71aea95
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
45 deletions
+34
-45
.firebase/hosting.YnVpbGQ.cache
+15
-15
src/Pages/Home.js
+19
-28
src/components/DataTable.js
+0
-2
No files found.
.firebase/hosting.YnVpbGQ.cache
View file @
211586c7
asset-manifest.json,1586767280049,e9abd3df369b80eb7724d345d5ef142fd5ed83313bc45dc8c16fa5e7fcc6b821
index.html,1586767280049,77f6e410464b553e98f63f76951d37df5b35ace584858226fa00080f50d26fde
home.png,1581659498317,d3b21fd280b3304b29b980aab96dce3fb728c5a6c31f04c8dcf94480770e19ef
asset-manifest.json,1589226426781,3368565f050e5c19ffedc52ab2295cf8238c394a647a533c28d36cdc7592e0ba
index.html,1589226426781,30a7527cbe756d259d45608b6ed3918bfe505215008dea185007cbb98ef4337f
precache-manifest.668ced5463d68a6a5949715e47c88c64.js,1589226426781,26cc0e01978de096aa0b97e6abc3648c3c10223d3e3add65482921eaf7630bf1
service-worker.js,1589226426781,a2623f567ecb58cb214c4b390d066ffef9636111cca8bd8338f8e00ad33fbb3a
manifest.json,1581659498318,851311324495b7eadd44a9e70f013e60f6ac9965a5a155cb4734894fd0e7dd5f
precache-manifest.2a672c8e37bb8aaa233f48e33d2bd61c.js,1586767280049,f201740a9958484f523e45efdb9a9bfd77931e0cc592f39ddd3520adfe769e2b
service-worker.js,1586767280049,e9e7dd9db863de48e5324eb403f971f1aec18a4865aaa563df4c516c5c875250
static/css/2.38695c78.chunk.css,1586767280055,df7c74b70fea8b04fd0985d5d2a2a2e7d14eb9920dbd0f99d131abbaf3fd44ce
static/css/2.38695c78.chunk.css.map,1586767280131,aee7adea8d3da5aba91a0208f66abdbbfcad0c53c36e3e69a24c51de68e4f62d
static/js/runtime~main.a8a9905a.js,1586767280131,e1af5f94fdd13901b2e433d0d7607e27c01458151c35b1fe4b7feda2a32b7aa9
static/js/runtime~main.a8a9905a.js.map,1586767280139,c337bf8b58896da637a6e50ab8cfc779eb1ec42c55f8ec429030a03454a549db
static/js/main.4ae1e93f.chunk.js,1586767280131,81844471fa2a72c86b8a050f673448371f5a416a45e44b8be4e0fdd04ab91306
static/css/main.93c33a43.chunk.css,1586767280131,20bf61433c569ccd069908c4e498759cb46dfccb12d8bf1aba9ccb8e61bd8b86
static/js/main.4ae1e93f.chunk.js.map,1586767280132,acb4006c420d27ad16485ce5698929055b1298ad4d70b0f3ed964f0baf6f12e5
static/css/main.93c33a43.chunk.css.map,1586767280131,a48d1e6da1a0ce76bde9786f2a1e10b880e0c11d0a38b09e296cfe0c4ac41c87
static/js/2.186a91dc.chunk.js,1586767280064,000d797529029197f835136af981e23d365d8765d9e6349a8c232d30d070e73f
static/js/2.186a91dc.chunk.js.map,1586767280139,6b57fb017c77e244464ce70b5ff3c1eb08354ce93ec43e08bc432220c2ebc135
home.png,1581659498317,d3b21fd280b3304b29b980aab96dce3fb728c5a6c31f04c8dcf94480770e19ef
static/css/2.38695c78.chunk.css.map,1589226427007,aee7adea8d3da5aba91a0208f66abdbbfcad0c53c36e3e69a24c51de68e4f62d
static/js/runtime~main.a8a9905a.js,1589226426985,e1af5f94fdd13901b2e433d0d7607e27c01458151c35b1fe4b7feda2a32b7aa9
static/css/2.38695c78.chunk.css,1589226426985,df7c74b70fea8b04fd0985d5d2a2a2e7d14eb9920dbd0f99d131abbaf3fd44ce
static/js/runtime~main.a8a9905a.js.map,1589226427007,c337bf8b58896da637a6e50ab8cfc779eb1ec42c55f8ec429030a03454a549db
static/js/main.813028d3.chunk.js,1589226426799,34a45346a567c923639d93e6887b9e465978650aba2ed8094d3148c13c646c16
static/css/main.93c33a43.chunk.css,1589226426790,20bf61433c569ccd069908c4e498759cb46dfccb12d8bf1aba9ccb8e61bd8b86
static/js/main.813028d3.chunk.js.map,1589226427006,9b249ad26d694e5380d2920d7811a01ab2b9d7c2f8aefcdba4e143ab3b9882b3
static/css/main.93c33a43.chunk.css.map,1589226427000,a48d1e6da1a0ce76bde9786f2a1e10b880e0c11d0a38b09e296cfe0c4ac41c87
static/js/2.186a91dc.chunk.js,1589226426988,000d797529029197f835136af981e23d365d8765d9e6349a8c232d30d070e73f
static/js/2.186a91dc.chunk.js.map,1589226427006,6b57fb017c77e244464ce70b5ff3c1eb08354ce93ec43e08bc432220c2ebc135
src/Pages/Home.js
View file @
211586c7
...
...
@@ -270,7 +270,6 @@ class Home extends Component {
let
feedlist
=
[]
for
(
let
data_index
=
0
;
data_index
<
data
.
length
;
data_index
++
)
{
var
allValues
=
[];
var
multistation
=
false
for
(
let
feed_index
=
0
;
feed_index
<
data
[
data_index
].
length
;
feed_index
++
)
{
if
(
data_index
==
0
)
{
feedlist
[
feedlist
.
length
]
=
data
[
data_index
][
feed_index
].
deviceId
...
...
@@ -279,7 +278,6 @@ class Home extends Component {
data
[
data_index
][
feed_index
].
value
[
index
]
=
[
data
[
data_index
][
feed_index
].
value
[
index
][
0
],
data
[
data_index
][
feed_index
].
value
[
index
][
1
],
data
[
data_index
][
feed_index
].
deviceId
];
}
allValues
=
allValues
.
concat
(
data
[
data_index
][
feed_index
].
value
);
if
(
feed_index
>
0
)
multistation
=
true
;
}
let
mapValues
=
[];
for
(
let
index
=
0
;
index
<
allValues
.
length
;
index
++
)
{
...
...
@@ -300,40 +298,33 @@ class Home extends Component {
}
const
timestamp
=
key
.
valueOf
().
toString
().
substring
(
0
,
8
)
+
"00000"
;
if
(
Object
.
keys
(
mapValues
).
includes
(
timestamp
))
{
// if (multistation === false) {
if
(
feedlist
.
length
===
1
)
{
if
(
data_index
===
5
)
{
mapValues
[
timestamp
][
0
]
=
allValues
[
index
][
1
];
}
else
{
mapValues
[
timestamp
][
0
]
=
mapValues
[
timestamp
][
0
]
+
allValues
[
index
][
1
];
}
}
else
{
if
(
data_index
===
5
)
{
mapValues
[
timestamp
][
feedlist
.
indexOf
(
allValues
[
index
][
2
])]
=
allValues
[
index
][
1
];
}
else
{
mapValues
[
timestamp
][
feedlist
.
indexOf
(
allValues
[
index
][
2
])]
=
mapValues
[
timestamp
][
0
]
+
allValues
[
index
][
1
];
}
// }
// else {
// let indexfeed = 0
// if (index > allValues.length / 2) {
// indexfeed = 1
// }
// if (data_index === 5) {
// mapValues[timestamp][indexfeed] = allValues[index][1];
// }
// else {
// if (mapValues[timestamp][indexfeed]) {
// mapValues[timestamp][indexfeed] = mapValues[timestamp][indexfeed] + allValues[index][1];
// }
// else {
// mapValues[timestamp][indexfeed] = allValues[index][1];
// }
// }
// }
if
(
mapValues
[
timestamp
][
feedlist
.
indexOf
(
allValues
[
index
][
2
])])
{
mapValues
[
timestamp
][
feedlist
.
indexOf
(
allValues
[
index
][
2
])]
=
mapValues
[
timestamp
][
feedlist
.
indexOf
(
allValues
[
index
][
2
])]
+
allValues
[
index
][
1
];
}
else
{
mapValues
[
timestamp
][
feedlist
.
indexOf
(
allValues
[
index
][
2
])]
=
allValues
[
index
][
1
];
}
}
}
}
else
{
if
(
feedlist
.
length
===
1
)
{
mapValues
[
timestamp
]
=
[
allValues
[
index
][
1
]];
}
else
{
// let indexfeed = 0
// if (index > allValues.length / 2) {
// indexfeed = 1
// }
if
(
feedlist
.
indexOf
(
allValues
[
index
][
2
])
===
0
)
{
mapValues
[
timestamp
]
=
[
allValues
[
index
][
1
],
0
];
}
...
...
@@ -345,7 +336,6 @@ class Home extends Component {
}
feeds
.
push
(
mapValues
);
}
Object
.
keys
(
feeds
[
0
]).
sort
().
map
(
key
=>
{
const
row
=
[];
for
(
let
i
=
0
;
i
<
data
[
0
].
length
;
i
++
)
{
...
...
@@ -372,6 +362,7 @@ class Home extends Component {
timestamp
:
timestampFormat
,
};
row
.
push
(
v
);
}
table
.
push
(
row
);
})
...
...
src/components/DataTable.js
View file @
211586c7
...
...
@@ -36,7 +36,6 @@ export default class DataTable extends Component {
var
renderItem
=
[];
var
headerItem
=
[];
const
csvData
=
[]
if
(
this
.
props
.
dataType
==
"door"
)
{
if
(
this
.
props
.
size
<=
1
)
{
data
.
map
(
value
=>
value
.
map
(
v
=>
csvData
.
push
(
v
)));
...
...
@@ -131,7 +130,6 @@ export default class DataTable extends Component {
<
th
>
Timestamp
<
/th
>
<
/tr>
)
}
renderItem
=
currentItem
.
map
((
item
,
index
)
=>
{
let
tds
=
[];
tds
.
push
(
<
td
key
=
{
`name
${
index
}
`
}
>
{
item
[
0
]
?
item
[
0
].
site
:
""
}
<
/td>
)
;
...
...
Write
Preview
Markdown
is supported
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