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
4fbbc1ee
Commit
4fbbc1ee
authored
Aug 08, 2019
by
OuiAtichat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug edit interval to 5min
parent
eda3bc4b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
11 deletions
+6
-11
src/Pages/Home.js
+4
-9
src/components/DataCard.js
+1
-1
src/components/GetDataSelection/GetDataSelection.js
+1
-1
No files found.
src/Pages/Home.js
View file @
4fbbc1ee
...
...
@@ -183,7 +183,7 @@ class Home extends Component {
loopFeedData
=
async
(
deviceId
,
selectedRange
,
breakdown
)
=>
{
clearInterval
(
this
.
looper
);
await
this
.
getFeedData
(
deviceId
,
selectedRange
,
breakdown
);
this
.
looper
=
setInterval
(
async
()
=>
await
this
.
getFeedData
(
deviceId
,
selectedRange
,
breakdown
),
6
0000
);
this
.
looper
=
setInterval
(
async
()
=>
await
this
.
getFeedData
(
deviceId
,
selectedRange
,
breakdown
),
30
0000
);
};
getFeedData
=
async
(
...
...
@@ -193,14 +193,11 @@ class Home extends Component {
)
=>
{
const
{
kairosUrl
,
userToken
}
=
this
.
state
;
const
{
startDate
,
endDate
}
=
selectedRange
;
const
now
=
moment
().
valueOf
();
//
const now = moment().valueOf();
// tags = ['Current Cash']
// ["Revenue", "Reset" ,"Remote" ,"People" ,"Fingerprint"]
const
q_data
=
{
start_absolute
:
startDate
||
now
,
end_absolute
:
endDate
||
now
,
start_absolute
:
startDate
,
end_absolute
:
endDate
,
metrics
:
[
{
name
:
deviceId
||
this
.
state
.
allDevicesId
[
0
],
...
...
@@ -352,10 +349,8 @@ class Home extends Component {
current
:
data
[
3
][
i
][
1
],
timestamp
:
moment
(
data
[
1
][
i
][
0
]).
format
(
'D/M/YY HH:mm'
),
};
table
.
unshift
(
v
);
}
return
table
;
};
...
...
src/components/DataCard.js
View file @
4fbbc1ee
...
...
@@ -38,7 +38,7 @@ const DataCard = props => {
if
(
props
.
feedData
)
{
var
dataObj
=
props
.
feedData
.
map
(
value
=>
({
xAxis
:
moment
(
value
[
0
]).
format
(
'D/M/YY H:mm'
),
xAxis
:
moment
(
value
[
0
]).
format
(
'D/M/YY H
H
:mm'
),
yAxis
:
value
[
1
],
}));
}
...
...
src/components/GetDataSelection/GetDataSelection.js
View file @
4fbbc1ee
...
...
@@ -8,7 +8,7 @@ class GetDataSelection extends PureComponent {
device
:
null
,
range
:
{
startDate
:
moment
()
.
s
ubtract
(
1
,
'days
'
)
.
s
tartOf
(
'day
'
)
.
valueOf
(),
endDate
:
moment
().
valueOf
(),
},
...
...
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