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
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
MyCard
srvpro
Commits
6e1792c1
Commit
6e1792c1
authored
Nov 17, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add query conditions
parent
581339d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
5 deletions
+27
-5
replay-dashboard.html
replay-dashboard.html
+27
-5
No files found.
replay-dashboard.html
View file @
6e1792c1
...
@@ -34,12 +34,24 @@
...
@@ -34,12 +34,24 @@
</div>
</div>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"row buttons"
>
<div
class=
"row buttons"
>
<div
class=
"col-lg-
12
"
>
<div
class=
"col-lg-
4
"
>
<button
class=
"btn btn-default"
id=
"open_button"
>
刷新
</button>
<button
class=
"btn btn-default"
id=
"open_button"
>
刷新
</button>
<button
class=
"btn btn-default"
id=
"empty_button"
>
清空记录
</button>
<button
class=
"btn btn-default"
id=
"empty_button"
>
清空记录
</button>
<button
class=
"btn btn-default"
id=
"pack_button"
>
打包下载录像
</button>
<button
class=
"btn btn-default"
id=
"pack_button"
>
打包下载录像
</button>
共有
<span
id=
"num"
>
0
</span>
场决斗
共有
<span
id=
"num"
>
0
</span>
场决斗
</div>
</div>
<div
class=
"col-lg-3"
>
<input
type=
"text"
class=
"form-control"
id=
"roomname"
value=
""
placeholder=
"房名"
>
</div>
<div
class=
"col-lg-1"
>
<input
type=
"text"
class=
"form-control"
id=
"duelcount"
value=
""
placeholder=
"决斗局数"
>
</div>
<div
class=
"col-lg-3"
>
<input
type=
"text"
class=
"form-control"
id=
"playername"
value=
""
placeholder=
"玩家名"
>
</div>
<div
class=
"col-lg-1"
>
<input
type=
"text"
class=
"form-control"
id=
"score"
value=
""
placeholder=
"分数"
>
</div>
</div>
</div>
</div>
</div>
<div
class=
"container"
>
<div
class=
"container"
>
...
@@ -74,7 +86,11 @@ $(function(){
...
@@ -74,7 +86,11 @@ $(function(){
$
(
"
#ip
"
).
val
(
params
[
"
ip
"
]);
$
(
"
#ip
"
).
val
(
params
[
"
ip
"
]);
$
(
"
#port
"
).
val
(
params
[
"
port
"
]);
$
(
"
#port
"
).
val
(
params
[
"
port
"
]);
$
(
"
#password
"
).
val
(
params
[
"
password
"
]);
$
(
"
#password
"
).
val
(
params
[
"
password
"
]);
$
(
"
#username
"
).
val
(
params
[
"
username
"
]);
$
(
"
#username
"
).
val
(
params
[
"
username
"
]);
$
(
"
#roomname
"
).
val
(
params
[
"
roomname
"
]);
$
(
"
#duelcount
"
).
val
(
params
[
"
duelcount
"
]);
$
(
"
#playername
"
).
val
(
params
[
"
playername
"
]);
$
(
"
#score
"
).
val
(
params
[
"
score
"
]);
});
});
function
parseQueryString
()
{
function
parseQueryString
()
{
...
@@ -98,22 +114,28 @@ function get_value(name) {
...
@@ -98,22 +114,28 @@ function get_value(name) {
return
encodeURIComponent
(
$
(
name
).
val
());
return
encodeURIComponent
(
$
(
name
).
val
());
}
}
function
getPossibleTextValue
(
fieldName
,
realQueryKey
)
{
const
fullFieldName
=
`#
${
fieldName
}
`
;
const
realQueryKey
=
queryKey
||
fieldName
;
return
(
get_value
(
fullFieldName
)
?
`&
${
realQueryKey
}
=
${
get_value
(
fullFieldName
)}
`
:
""
);
}
function
loadreplays
()
{
function
loadreplays
()
{
var
url
=
get_http
()
+
"
/api/duellog?callback=?
"
+
(
get_value
(
"
#username
"
)
?
"
&username=
"
+
get_value
(
"
#username
"
)
:
""
)
+
(
get_value
(
"
#password
"
)
?
"
&pass=
"
+
get_value
(
"
#password
"
)
:
"
"
);
var
url
=
get_http
()
+
"
/api/duellog?callback=?
"
+
getPossibleTextValue
(
"
username
"
)
+
getPossibleTextValue
(
"
password
"
,
"
pass
"
)
+
getPossibleTextValue
(
"
roomname
"
)
+
getPossibleTextValue
(
"
duelcount
"
)
+
getPossibleTextValue
(
"
playername
"
)
+
getPossibleTextValue
(
"
score
"
);
$
.
getJSON
(
url
,
listreplay
);
$
.
getJSON
(
url
,
listreplay
);
$
(
"
#open_button
"
).
removeClass
(
"
btn-success
"
);
$
(
"
#open_button
"
).
removeClass
(
"
btn-success
"
);
}
}
function
clearreplays
()
{
function
clearreplays
()
{
if
(
confirm
(
"
确实要清空记录吗?
"
))
{
if
(
confirm
(
"
确实要清空记录吗?
"
))
{
var
url
=
get_http
()
+
"
/api/clearlog?callback=?
"
+
(
get_value
(
"
#username
"
)
?
"
&username=
"
+
get_value
(
"
#username
"
)
:
""
)
+
(
get_value
(
"
#password
"
)
?
"
&pass=
"
+
get_value
(
"
#password
"
)
:
"
"
);
var
url
=
get_http
()
+
"
/api/clearlog?callback=?
"
+
getPossibleTextValue
(
"
username
"
)
+
getPossibleTextValue
(
"
password
"
,
"
pass
"
);
$
.
getJSON
(
url
,
clearreplays_success
);
$
.
getJSON
(
url
,
clearreplays_success
);
$
(
"
#empty_button
"
).
removeClass
(
"
btn-success
"
);
$
(
"
#empty_button
"
).
removeClass
(
"
btn-success
"
);
}
}
}
}
function
packreplays
()
{
function
packreplays
()
{
window
.
open
(
get_http
()
+
"
/api/archive.zip?
username=
"
+
get_value
(
"
#username
"
)
+
"
&pass=
"
+
get_value
(
"
#password
"
)
);
window
.
open
(
get_http
()
+
"
/api/archive.zip?
placeholder=1
"
+
getPossibleTextValue
(
"
username
"
)
+
getPossibleTextValue
(
"
password
"
,
"
pass
"
)
+
getPossibleTextValue
(
"
roomname
"
)
+
getPossibleTextValue
(
"
duelcount
"
)
+
getPossibleTextValue
(
"
playername
"
))
+
getPossibleTextValue
(
"
score
"
);
}
}
function
clearreplays_success
()
{
function
clearreplays_success
()
{
...
...
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