Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
srvpro
Commits
aa285789
Commit
aa285789
authored
May 23, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes to replay dashboard
parent
236959cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
replay-dashboard.html
replay-dashboard.html
+12
-4
No files found.
replay-dashboard.html
View file @
aa285789
...
...
@@ -90,22 +90,30 @@ function parseQueryString() {
return
objURL
;
}
function
get_http
()
{
return
$
(
"
#http
"
).
val
()
+
"
://
"
+
$
(
"
#ip
"
).
val
()
+
(
$
(
"
#port
"
).
val
()
?
(
"
:
"
+
$
(
"
#port
"
).
val
())
:
""
);
}
function
get_value
(
name
)
{
return
encodeURIComponent
(
$
(
name
).
val
());
}
function
loadreplays
()
{
var
url
=
$
(
"
#http
"
).
val
()
+
"
://
"
+
$
(
"
#ip
"
).
val
()
+
"
:
"
+
$
(
"
#port
"
).
val
()
+
"
/api/duellog?callback=?
"
+
(
$
(
"
#username
"
).
val
()
?
"
&username=
"
+
$
(
"
#username
"
).
val
()
:
""
)
+
(
$
(
"
#password
"
).
val
()
?
"
&pass=
"
+
$
(
"
#password
"
).
val
(
)
:
""
);
var
url
=
get_http
()
+
"
/api/duellog?callback=?
"
+
(
get_value
(
"
#username
"
)
?
"
&username=
"
+
get_value
(
"
#username
"
)
:
""
)
+
(
get_value
(
"
#password
"
)
?
"
&pass=
"
+
get_value
(
"
#password
"
)
:
""
);
$
.
getJSON
(
url
,
listreplay
);
$
(
"
#open_button
"
).
removeClass
(
"
btn-success
"
);
}
function
clearreplays
()
{
if
(
confirm
(
"
确实要清空记录吗?
"
))
{
var
url
=
$
(
"
#http
"
).
val
()
+
"
://
"
+
$
(
"
#ip
"
).
val
()
+
"
:
"
+
$
(
"
#port
"
).
val
()
+
"
/api/clearlog?callback=?
"
+
(
$
(
"
#username
"
).
val
()
?
"
&username=
"
+
$
(
"
#username
"
).
val
()
:
""
)
+
(
$
(
"
#password
"
).
val
()
?
"
&pass=
"
+
$
(
"
#password
"
).
val
(
)
:
""
);
var
url
=
get_http
()
+
"
/api/clearlog?callback=?
"
+
(
get_value
(
"
#username
"
)
?
"
&username=
"
+
get_value
(
"
#username
"
)
:
""
)
+
(
get_value
(
"
#password
"
)
?
"
&pass=
"
+
get_value
(
"
#password
"
)
:
""
);
$
.
getJSON
(
url
,
clearreplays_success
);
$
(
"
#empty_button
"
).
removeClass
(
"
btn-success
"
);
}
}
function
packreplays
()
{
window
.
open
(
$
(
"
#http
"
).
val
()
+
"
://
"
+
$
(
"
#ip
"
).
val
()
+
"
:
"
+
$
(
"
#port
"
).
val
()
+
"
/api/archive.zip?username=
"
+
$
(
"
#username
"
).
val
()
+
"
&pass=
"
+
$
(
"
#password
"
).
val
(
));
window
.
open
(
get_http
()
+
"
/api/archive.zip?username=
"
+
get_value
(
"
#username
"
)
+
"
&pass=
"
+
get_value
(
"
#password
"
));
}
function
clearreplays_success
()
{
...
...
@@ -135,7 +143,7 @@ function listreplay(data) {
tr
.
append
(
$
(
"
<td>
"
+
((
duellog
.
players
)
?
(
duellog
.
players
[
2
].
winner
?
"
<span class='glyphicon glyphicon-bookmark'></span>
"
:
""
)
+
duellog
.
players
[
2
].
name
+
"
<br>
"
+
duellog
.
players
[
3
].
name
:
""
)
+
"
</td>
"
));
}
tr
.
append
(
$
(
"
<td>
"
+
duellog
.
cloud_replay_id
+
"
</td>
"
));
tr
.
append
(
$
(
"
<td><a href='
"
+
$
(
"
#http
"
).
val
()
+
"
://
"
+
$
(
"
#ip
"
).
val
()
+
"
:
"
+
$
(
"
#port
"
).
val
()
+
"
/api/replay/
"
+
duellog
.
replay_filename
+
"
?username=
"
+
$
(
"
#username
"
).
val
()
+
"
&pass=
"
+
$
(
"
#password
"
).
val
(
)
+
"
' download><span class='glyphicon glyphicon-download-alt'></span></a></td>
"
));
tr
.
append
(
$
(
"
<td><a href='
"
+
get_http
()
+
"
/api/replay/
"
+
duellog
.
replay_filename
+
"
?username=
"
+
get_value
(
"
#username
"
)
+
"
&pass=
"
+
get_value
(
"
#password
"
)
+
"
' download><span class='glyphicon glyphicon-download-alt'></span></a></td>
"
));
tbody
.
append
(
tr
);
...
...
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