Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
luna
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
luna
Commits
a8d78e55
Commit
a8d78e55
authored
Dec 26, 2017
by
liuzheng712
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: fast fast fast
parent
bbf18d96
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
mock.py
mock.py
+2
-2
json.component.ts
src/app/replay-page/json/json.component.ts
+5
-5
No files found.
mock.py
View file @
a8d78e55
#!/usr/bin/env python3
from
flask
import
Flask
,
send_from_directory
,
render_template
,
request
,
jsonify
,
send_file
from
flask
import
Flask
,
send_from_directory
,
render_template
,
request
,
jsonify
,
redirect
,
url_for
from
flask_socketio
import
SocketIO
,
Namespace
,
emit
,
join_room
,
leave_room
import
paramiko
import
uuid
...
...
@@ -206,7 +206,7 @@ def asset_groups_assets():
@app.route
(
'/api/terminal/v1/sessions/test/replay/'
)
def
replay
():
return
send_file
(
'test.json'
)
return
redirect
(
"http://jps.ilz.me/media/2017-12-24/ec87a486-0344-4f12-b27a-620321944f7f.gz"
)
if
__name__
==
'__main__'
:
...
...
src/app/replay-page/json/json.component.ts
View file @
a8d78e55
...
...
@@ -37,10 +37,6 @@ export class JsonComponent implements OnInit {
}
}
start
()
{
console
.
log
(
Video
.
timelist
);
}
restart
()
{
clearInterval
(
this
.
timer
);
term
.
term
.
reset
();
...
...
@@ -53,6 +49,7 @@ export class JsonComponent implements OnInit {
}
pause
()
{
console
.
log
(
Video
.
timelist
);
if
(
this
.
toggle
)
{
clearInterval
(
this
.
timer
);
this
.
toggle
=
!
this
.
toggle
;
...
...
@@ -79,6 +76,9 @@ export class JsonComponent implements OnInit {
this
.
toggle
=
!
this
.
toggle
;
clearInterval
(
that
.
timer
);
}
if
(
Video
.
timelist
[
that
.
pos
]
-
Video
.
timelist
[
that
.
pos
-
1
]
>
5
)
{
that
.
time
+=
5000
;
}
that
.
time
+=
that
.
TIMESTEP
;
that
.
setPercent
=
that
.
time
/
Video
.
totalTime
*
100
;
...
...
@@ -100,7 +100,7 @@ export class JsonComponent implements OnInit {
break
;
}
}
this
.
time
=
Video
.
t
imelist
[
this
.
pos
]
;
this
.
time
=
Video
.
t
otalTime
*
this
.
setPercent
/
100
;
}
}
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