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
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
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
1440075e
Commit
1440075e
authored
Mar 18, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add update dashboard
parent
e4e66c9f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
181 additions
and
0 deletions
+181
-0
index.html
index.html
+1
-0
update-dashboard.html
update-dashboard.html
+180
-0
No files found.
index.html
View file @
1440075e
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
<p><a
href=
"pre-dashboard.html"
>
Pre-Release Dashboard (先行卡更新)
</a></p>
<p><a
href=
"pre-dashboard.html"
>
Pre-Release Dashboard (先行卡更新)
</a></p>
<p><a
href=
"deck-dashboard.html"
>
Deck Dashboard (竞赛模式卡组管理)
</a></p>
<p><a
href=
"deck-dashboard.html"
>
Deck Dashboard (竞赛模式卡组管理)
</a></p>
<p><a
href=
"replay-dashboard.html"
>
Replay Dashboard (竞赛模式录像管理)
</a></p>
<p><a
href=
"replay-dashboard.html"
>
Replay Dashboard (竞赛模式录像管理)
</a></p>
<p><a
href=
"update-dashboard.html"
>
Update Dashboard (更新管理)
</a></p>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
update-dashboard.html
0 → 100644
View file @
1440075e
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<title>
SRVPro Update Dashboard
</title>
<link
href=
"https://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css"
rel=
"stylesheet"
>
<link
href=
"/static/style.css"
rel=
"stylesheet"
>
</head>
<body>
<header
class=
"container"
>
<h1
class=
"title"
>
SRVPro 更新控制台
</h1>
</header>
<div
class=
"container"
>
<div
class=
"row grid"
>
<div
class=
"col-lg-2"
>
<input
type=
"text"
class=
"form-control"
id=
"ip"
value=
""
placeholder=
"IP"
>
</div>
<div
class=
"col-lg-2"
>
<input
type=
"text"
class=
"form-control"
id=
"port"
value=
""
placeholder=
"Port"
>
</div>
<div
class=
"col-lg-2"
>
<input
type=
"password"
class=
"form-control"
id=
"password"
value=
""
placeholder=
"Password"
>
</div>
<div
class=
"col-lg-2"
>
<button
class=
"btn btn-default"
id=
"login_button"
>
登陆
</button>
<button
class=
"btn btn-default"
id=
"clear_button"
>
清屏
</button>
</div>
</div>
<!--div class="row grid buttons hidden">
<div class="col-lg-2">
<button class="btn btn-default" disabled title="暂未实装" action="">复制临时服务端</button>
</div>
<div class="col-lg-2">
<button class="btn btn-default" disabled title="暂未实装" action="">更新临时服务端</button>
</div>
<div class="col-lg-2">
<button class="btn btn-default" disabled title="暂未实装" action="">编译临时服务端</button>
</div>
<div class="col-lg-2">
<button class="btn btn-default" disabled title="暂未实装" action="">替换主要服务端</button>
</div>
<div class="col-lg-2">
<button class="btn btn-default" disabled title="暂未实装" action="">更新主要服务端数据库和脚本</button>
</div>
</div-->
<div
class=
"row grid buttons hidden"
>
<div
class=
"col-lg-2"
>
<button
class=
"btn btn-default"
action=
"fetch_datas"
>
下载最新网页
</button>
</div>
<div
class=
"col-lg-2"
>
<button
class=
"btn btn-default"
action=
"load_db"
>
读取数据库
</button>
</div>
<div
class=
"col-lg-2"
>
<button
class=
"btn btn-default"
action=
"make_changelog"
>
生成更新记录
</button>
</div>
<div
class=
"col-lg-2"
>
<button
class=
"btn btn-default"
action=
"make_more_changelog"
>
更多更新记录
</button>
</div>
<div
class=
"col-lg-2"
>
<button
class=
"btn btn-default"
action=
"update_changelog"
>
写入更新记录
</button>
</div>
<div
class=
"col-lg-2"
>
<button
class=
"btn btn-default"
action=
"push_datas"
>
上传到网页
</button>
</div>
</div>
<div
class=
"row buttons hidden"
>
<div
class=
"col-lg-12"
>
<textarea
class=
"form-control"
rows=
"20"
id=
"message"
value=
""
placeholder=
"update message"
></textarea>
<textarea
class=
"hidden"
id=
"message-head"
value=
""
placeholder=
"update message"
>
服务器升级,与官方版同步,修复一些BUG。
绝大部分修改来自于YGOPro官方开发者和爱好者的贡献。你可以在[GitHub](https://github.com/moecube/ygopro/tree/server)查看修改详情。
</textarea>
<textarea
class=
"hidden"
id=
"message-body"
value=
""
placeholder=
"update message"
>
新增卡片:
- 无
卡片更改:
- 无
</textarea>
<textarea
class=
"hidden"
id=
"message-other"
value=
""
placeholder=
"update message"
>
其他更改:
- 无
</textarea>
</div>
</div>
</div>
<div
class=
"container"
>
<hr>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<ul
id=
"output"
class=
"list-unstyled"
>
</ul>
</div>
</div>
</div>
<script
src=
"https://cdn.bootcss.com/jquery/2.1.4/jquery.min.js"
></script>
<script
src=
"https://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"
></script>
<script>
var
ip
,
port
,
password
;
$
(
function
(){
$
(
"
body
"
).
tooltip
({
selector
:
"
[data-toggle='tooltip']
"
});
$
(
"
#login_button
"
).
click
(
login
);
$
(
"
#clear_button
"
).
click
(
clear
);
$
(
"
.buttons button
"
).
click
(
function
(){
openapi
(
$
(
this
).
attr
(
"
action
"
))});
var
params
=
parseQueryString
();
$
(
"
#ip
"
).
val
(
params
[
"
ip
"
]);
$
(
"
#port
"
).
val
(
params
[
"
port
"
]);
$
(
"
#password
"
).
val
(
params
[
"
password
"
]);
$
(
"
#message
"
).
val
(
$
(
"
#message-head
"
).
val
()
+
$
(
"
#message-body
"
).
val
()
+
$
(
"
#message-other
"
).
val
());
});
function
parseQueryString
()
{
//http://stackoverflow.com/questions/523266/how-can-i-get-a-specific-parameter-from-location-search
var
str
=
window
.
location
.
search
;
var
objURL
=
{};
str
.
replace
(
new
RegExp
(
"
([^?=&]+)(=([^&]*))?
"
,
"
g
"
),
function
(
$0
,
$1
,
$2
,
$3
){
objURL
[
$1
]
=
$3
;
}
);
return
objURL
;
}
function
login
()
{
ip
=
$
(
"
#ip
"
).
val
();
port
=
$
(
"
#port
"
).
val
();
password
=
$
(
"
#password
"
).
val
();
var
es
=
new
EventSource
(
"
http://
"
+
ip
+
"
:
"
+
port
+
"
/api/msg?password=
"
+
password
);
es
.
onmessage
=
function
(
e
)
{
var
data_li
=
$
(
'
<li>
'
+
e
.
data
+
'
</li>
'
);
data_li
.
appendTo
(
$
(
"
#output
"
));
if
(
e
.
data
==
"
已连接。
"
)
{
$
(
"
.row.buttons
"
).
removeClass
(
"
hidden
"
);
}
else
{
try
{
var
resJSON
=
JSON
.
parse
(
e
.
data
);
if
(
resJSON
.
type
==
"
changelog
"
)
{
$
(
"
#message
"
).
val
(
$
(
"
#message-head
"
).
val
()
+
resJSON
.
changelog
.
join
(
"
\n
"
)
+
$
(
"
#message-other
"
).
val
());
}
}
catch
(
e
)
{
}
}
};
es
.
onerror
=
function
(
e
)
{
$
(
"
.row.buttons
"
).
addClass
(
"
hidden
"
);
data_li
=
$
(
'
<li>已断开。</li>
'
);
data_li
.
appendTo
(
$
(
"
#output
"
));
//alert("连接断开!");
es
.
close
();
};
}
function
clear
()
{
$
(
"
#output
"
).
html
(
"
"
);
}
function
openapi
(
api
)
{
$
.
getJSON
(
"
http://
"
+
ip
+
"
:
"
+
port
+
"
/api/
"
+
api
+
"
?password=
"
+
password
+
"
&message=
"
+
$
(
"
#message
"
).
val
().
replace
(
/
\n
/g
,
"
!换行符!
"
)
+
"
&callback=?
"
,
function
(
data
)
{
var
data_li
=
$
(
'
<li>
'
+
data
.
message
+
'
</li>
'
);
data_li
.
appendTo
(
$
(
"
#output
"
));
});
}
</script>
<script
src=
"http://s4.cnzz.com/z_stat.php?id=1255875151&web_id=1255875151"
></script>
</body>
</html>
\ No newline at end of file
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