Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
webssh
Overview
Overview
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
郑天保
webssh
Commits
b3c33ff6
Commit
b3c33ff6
authored
Sep 12, 2018
by
Sheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use form attribute novalidate for debug mode
parent
b372fcbb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
test_app.py
tests/test_app.py
+1
-1
main.js
webssh/static/js/main.js
+3
-3
index.html
webssh/templates/index.html
+4
-4
No files found.
tests/test_app.py
View file @
b3c33ff6
...
@@ -482,7 +482,7 @@ class TestAppInDebug(OtherTestBase):
...
@@ -482,7 +482,7 @@ class TestAppInDebug(OtherTestBase):
def
test_html
(
self
):
def
test_html
(
self
):
response
=
self
.
fetch
(
'/'
,
method
=
'GET'
)
response
=
self
.
fetch
(
'/'
,
method
=
'GET'
)
self
.
assert
NotIn
(
b
'required
>'
,
response
.
body
)
self
.
assert
In
(
b
'novalidate
>'
,
response
.
body
)
class
TestAppMiscell
(
OtherTestBase
):
class
TestAppMiscell
(
OtherTestBase
):
...
...
webssh/static/js/main.js
View file @
b3c33ff6
/*jslint browser:true */
var
jQuery
;
var
jQuery
;
var
wssh
=
{};
var
wssh
=
{};
jQuery
(
function
(
$
){
jQuery
(
function
(
$
){
/*jslint browser:true */
var
status
=
$
(
'#status'
),
var
status
=
$
(
'#status'
),
btn
=
$
(
'.btn-primary'
),
btn
=
$
(
'.btn-primary'
),
style
=
{},
style
=
{},
title_text
=
'WebSSH'
,
title_text
=
'WebSSH'
,
title_element
=
document
.
querySelector
(
'title'
),
title_element
=
document
.
querySelector
(
'title'
),
debug
=
!
document
.
querySelector
(
'#hostname'
).
required
,
debug
=
document
.
querySelector
(
'#connect'
).
noValidate
,
DISCONNECTED
=
0
,
DISCONNECTED
=
0
,
CONNECTING
=
1
,
CONNECTING
=
1
,
CONNECTED
=
2
,
CONNECTED
=
2
,
...
...
webssh/templates/index.html
View file @
b3c33ff6
...
@@ -24,21 +24,21 @@
...
@@ -24,21 +24,21 @@
</head>
</head>
<body>
<body>
<div
class=
"container"
>
<div
class=
"container"
>
<form
id=
"connect"
action=
""
method=
"post"
enctype=
"multipart/form-data"
>
<form
id=
"connect"
action=
""
method=
"post"
enctype=
"multipart/form-data"
{%
if
debug
%}
novalidate
{%
end
%}
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col"
>
<div
class=
"col"
>
<label
for=
"Hostname"
>
Hostname
</label>
<label
for=
"Hostname"
>
Hostname
</label>
<input
class=
"form-control"
type=
"text"
id=
"hostname"
name=
"hostname"
value=
""
{%
if
not
debug
%}
required
{%
end
%}
>
<input
class=
"form-control"
type=
"text"
id=
"hostname"
name=
"hostname"
value=
""
required
>
</div>
</div>
<div
class=
"col"
>
<div
class=
"col"
>
<label
for=
"Port"
>
Port
</label>
<label
for=
"Port"
>
Port
</label>
<input
class=
"form-control"
type=
"number"
id=
"port"
name=
"port"
value=
""
{%
if
not
debug
%}
min=
1
max=
65535
required
{%
end
%}
>
<input
class=
"form-control"
type=
"number"
id=
"port"
name=
"port"
value=
""
min=
1
max=
65535
required
>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col"
>
<div
class=
"col"
>
<label
for=
"Username"
>
Username
</label>
<label
for=
"Username"
>
Username
</label>
<input
class=
"form-control"
type=
"text"
id=
"username"
name=
"username"
value=
""
{%
if
not
debug
%}
required
{%
end
%}
>
<input
class=
"form-control"
type=
"text"
id=
"username"
name=
"username"
value=
""
required
>
</div>
</div>
<div
class=
"col"
>
<div
class=
"col"
>
<label
for=
"Username"
>
Private Key
</label>
<label
for=
"Username"
>
Private Key
</label>
...
...
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