Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
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
Gabriel Monnerat
slapos.toolbox
Commits
d29efb23
Commit
d29efb23
authored
Oct 02, 2013
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
javascript now handle connexion and account creation using
basic auth
parent
05913751
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
slapos/runner/static/js/scripts/account.js
slapos/runner/static/js/scripts/account.js
+3
-1
slapos/runner/static/js/scripts/login.js
slapos/runner/static/js/scripts/login.js
+3
-1
slapos/runner/templates/login.html
slapos/runner/templates/login.html
+0
-1
No files found.
slapos/runner/static/js/scripts/account.js
View file @
d29efb23
...
@@ -43,6 +43,8 @@ $(document).ready(function () {
...
@@ -43,6 +43,8 @@ $(document).ready(function () {
return
false
;
return
false
;
}
}
send
=
true
;
send
=
true
;
var
base_url
=
'
https://
'
+
$
(
"
input#username
"
).
val
()
+
'
:
'
+
$
(
"
input#password
"
).
val
()
+
'
@
'
+
location
.
host
$
.
ajax
({
$
.
ajax
({
type
:
"
POST
"
,
type
:
"
POST
"
,
url
:
$SCRIPT_ROOT
+
((
hasAccount
)
?
'
/updateAccount
'
:
'
/configAccount
'
),
url
:
$SCRIPT_ROOT
+
((
hasAccount
)
?
'
/updateAccount
'
:
'
/configAccount
'
),
...
@@ -55,7 +57,7 @@ $(document).ready(function () {
...
@@ -55,7 +57,7 @@ $(document).ready(function () {
},
},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
code
===
1
)
{
if
(
data
.
code
===
1
)
{
window
.
location
.
href
=
$SCRIPT_ROOT
+
"
/
"
;
window
.
location
.
href
=
base_url
+
$SCRIPT_ROOT
+
'
/
'
;
}
else
{
}
else
{
$
(
"
#error
"
).
Popup
(
data
.
result
,
{
type
:
'
error
'
,
duration
:
5000
});
$
(
"
#error
"
).
Popup
(
data
.
result
,
{
type
:
'
error
'
,
duration
:
5000
});
}
}
...
...
slapos/runner/static/js/scripts/login.js
View file @
d29efb23
...
@@ -27,7 +27,9 @@ $(document).ready(function () {
...
@@ -27,7 +27,9 @@ $(document).ready(function () {
$
(
"
#login
"
).
removeClass
(
"
button
"
).
addClass
(
"
dsblebutton
"
);
$
(
"
#login
"
).
removeClass
(
"
button
"
).
addClass
(
"
dsblebutton
"
);
$
.
post
(
url
,
param
,
function
(
data
)
{
$
.
post
(
url
,
param
,
function
(
data
)
{
if
(
data
.
code
===
1
)
{
if
(
data
.
code
===
1
)
{
window
.
location
.
href
=
$SCRIPT_ROOT
+
'
/
'
;
url
=
'
https://
'
+
param
.
clogin
+
'
:
'
+
param
.
cpwd
+
'
@
'
+
location
.
host
+
$SCRIPT_ROOT
+
'
/
'
;
window
.
location
.
href
=
url
;
}
else
{
}
else
{
$
(
"
#error
"
).
Popup
(
data
.
result
,
{
type
:
'
alert
'
,
duration
:
3000
});
$
(
"
#error
"
).
Popup
(
data
.
result
,
{
type
:
'
alert
'
,
duration
:
3000
});
}
}
...
...
slapos/runner/templates/login.html
View file @
d29efb23
...
@@ -18,6 +18,5 @@
...
@@ -18,6 +18,5 @@
<input
type=
"reset"
class=
"button"
value=
"reset"
/>
<input
type=
"reset"
class=
"button"
value=
"reset"
/>
<input
type=
"submit"
class=
"button"
id=
"login"
value=
"login"
/>
<input
type=
"submit"
class=
"button"
id=
"login"
value=
"login"
/>
</div>
</div>
<p><a
href=
"https://nwavrant:nicolas@[2001:67c:1254:3b:fc93:4aff:feca:66ac]:50005/"
>
Next
</a></p>
</form>
</form>
{% endblock %}
{% endblock %}
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