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
9d3c1957
Commit
9d3c1957
authored
Aug 18, 2022
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update pre log style
parent
5a876b26
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
5 deletions
+30
-5
pre-dashboard.html
pre-dashboard.html
+26
-5
static/style.css
static/style.css
+4
-0
No files found.
pre-dashboard.html
View file @
9d3c1957
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<meta
charset=
"UTF-8"
>
<meta
charset=
"UTF-8"
>
<title>
SRVPro Pre-Release Dashboard
</title>
<title>
SRVPro Pre-Release Dashboard
</title>
<link
rel=
"stylesheet"
href=
"https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-y/twitter-bootstrap/3.4.1/css/bootstrap.min.css"
integrity=
"sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu"
crossorigin=
"anonymous"
>
<link
rel=
"stylesheet"
href=
"https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-y/twitter-bootstrap/3.4.1/css/bootstrap.min.css"
integrity=
"sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu"
crossorigin=
"anonymous"
>
<link
rel=
"stylesheet"
href=
"https://fonts.googleapis.cn/css?family=Noto+Emoji"
crossorigin=
"anonymous"
>
<link
href=
"/static/style.css"
rel=
"stylesheet"
>
<link
href=
"/static/style.css"
rel=
"stylesheet"
>
</head>
</head>
<body>
<body>
...
@@ -107,22 +108,42 @@ function parseQueryString() {
...
@@ -107,22 +108,42 @@ function parseQueryString() {
return
objURL
;
return
objURL
;
}
}
function
ansiRegex
({
onlyFirst
=
false
}
=
{})
{
//https://github.com/chalk/ansi-regex
const
pattern
=
[
'
[
\\
u001B
\\
u009B][[
\\
]()#;?]*(?:(?:(?:(?:;[-a-zA-Z
\\
d
\\
/#&.:=?%@~_]+)*|[a-zA-Z
\\
d]+(?:;[-a-zA-Z
\\
d
\\
/#&.:=?%@~_]*)*)?
\\
u0007)
'
,
'
(?:(?:
\\
d{1,4}(?:;
\\
d{0,4})*)?[
\\
dA-PR-TZcf-nq-uy=><~]))
'
].
join
(
'
|
'
);
return
new
RegExp
(
pattern
,
onlyFirst
?
undefined
:
'
g
'
);
}
function
login
()
{
function
login
()
{
ip
=
$
(
"
#ip
"
).
val
();
ip
=
$
(
"
#ip
"
).
val
();
port
=
$
(
"
#port
"
).
val
();
port
=
$
(
"
#port
"
).
val
();
password
=
$
(
"
#password
"
).
val
();
password
=
$
(
"
#password
"
).
val
();
username
=
$
(
"
#username
"
).
val
();
username
=
$
(
"
#username
"
).
val
();
var
es
=
new
EventSource
(
$
(
"
#http
"
).
val
()
+
"
://
"
+
ip
+
"
:
"
+
port
+
"
/api/msg?username=
"
+
username
+
"
&password=
"
+
password
);
var
es
=
new
EventSource
(
$
(
"
#http
"
).
val
()
+
"
://
"
+
ip
+
"
:
"
+
port
+
"
/api/msg?username=
"
+
username
+
"
&password=
"
+
password
);
es
.
onmessage
=
function
(
e
)
{
es
.
onmessage
=
function
(
e
)
{
if
(
e
.
data
.
toString
().
includes
(
"
\
x1b[2K
"
))
{
var
msg
=
e
.
data
.
toString
();
if
(
msg
.
includes
(
"
+=====
"
))
{
msg
=
"
<pre>
"
+
msg
+
"
</pre>
"
;
}
if
(
msg
.
match
(
/
\x
1B
\[
2K/gu
))
{
$
(
"
#output
"
).
children
().
last
().
remove
();
$
(
"
#output
"
).
children
().
last
().
remove
();
msg
=
msg
.
replace
(
ansiRegex
(),
""
);
}
var
data_li
=
$
(
'
<li>
'
+
msg
+
'
</li>
'
);
if
(
msg
.
match
(
/
\p
{Emoji_Presentation}/gu
))
{
data_li
.
addClass
(
"
emoji
"
);
}
}
var
data_li
=
$
(
'
<li>
'
+
e
.
data
+
'
</li>
'
);
data_li
.
appendTo
(
$
(
"
#output
"
));
data_li
.
appendTo
(
$
(
"
#output
"
));
data_li
[
0
].
scrollIntoView
();
data_li
[
0
].
scrollIntoView
();
if
(
e
.
data
==
"
已连接。
"
)
{
if
(
msg
==
"
已连接。
"
)
{
$
(
"
.row.buttons
"
).
removeClass
(
"
hidden
"
);
$
(
"
.row.buttons
"
).
removeClass
(
"
hidden
"
);
}
}
};
};
...
...
static/style.css
View file @
9d3c1957
...
@@ -309,3 +309,7 @@ div.buttons {
...
@@ -309,3 +309,7 @@ div.buttons {
#output
.add
{
#output
.add
{
background-color
:
#94fbb1
;
background-color
:
#94fbb1
;
}
}
.emoji
{
font-family
:
'Helvetica Neue'
,
Helvetica
,
'Microsoft Yahei'
,
'Hiragino Sans GB'
,
'WenQuanYi Micro Hei'
,
sans-serif
,
'Apple Color Emoji'
,
'Segoe UI Emoji'
,
'Segoe UI Symbol'
,
'Noto Color Emoji'
,
'Noto Emoji'
;
}
\ 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