Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b4acbe2b
authored
Feb 08, 2013
by
x
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
store: Minimized laborgui page
parent
ddb2d75b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
33 deletions
+8
-33
store/static/store/gui.js
+0
-16
store/templates/store/gui.html
+2
-14
store/views.py
+6
-3
No files found.
store/static/store/gui.js
View file @
b4acbe2b
...
...
@@ -16,22 +16,6 @@ function getCookie(name) {
}
var
csrftoken
=
getCookie
(
'csrftoken'
);
function
postKey
(
key
)
{
$
.
post
(
"/store/gui/"
,
{
"KEY"
:
key
},
function
(
respond
)
{
alert
(
respond
);
}
)
.
error
(
function
(
respond
)
{
alert
(
JSON
.
stringify
(
respond
));
});
}
function
resetKey
()
{
$
.
post
(
"/store/gui/"
,
""
,
function
(
respond
)
{
alert
(
respond
);
}
);
}
$
.
ajaxSetup
({
crossDomain
:
false
,
// obviates need for sameOrigin test
beforeSend
:
function
(
xhr
,
settings
)
{
...
...
store/templates/store/gui.html
View file @
b4acbe2b
...
...
@@ -3,21 +3,9 @@
<head>
<title>
Store Gui
</title>
<script
src=
"/static/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"/static/store/gui.js"
></script>
<script
src=
"/static/store/gui.js"
></script>
</head>
<body>
EZ LESZ A GUI JOL!
<form
action=
"login:{{ username }}:{{ host }}"
>
<input
type=
submit
name=
"login_button"
id=
"login_button"
value=
"login"
/>
</form>
<form
action=
"mount:true"
>
<input
type=
submit
name=
"mount_button"
id=
"mount_button"
value=
"mount"
hidden=
"true"
/>
</form>
<form
action=
"umount:true"
>
<input
type=
submit
name=
"umount_button"
id=
"umount_button"
value=
"umount"
hidden=
"true"
/>
</form>
<form
action=
"logout:{{ username }}:{{ host }}"
>
<input
type=
submit
name=
"logout_button"
id=
"logout_button"
value=
"logout"
hidden=
"true"
/>
</form>
<p>
Személyes adattár csatolása...
</p>
</body>
</html>
store/views.py
View file @
b4acbe2b
...
...
@@ -185,11 +185,14 @@ def gui(request):
lab_key_decoded
=
base64
.
b64decode
(
request
.
POST
[
'KEY'
])
key_list
.
append
(
lab_key_decoded
)
except
:
pass
if
not
StoreApi
.
updateauthorizationinfo
(
user
,
password
,
key_list
):
if
StoreApi
.
updateauthorizationinfo
(
user
,
password
,
key_list
):
return
HttpResponse
(
'Keys resetted succesfully!'
)
else
:
return
HttpResponse
(
'Can not update authorization information!'
)
if
StoreApi
.
updateauthorizationinfo
(
user
,
password
,
key_list
):
return
HttpResponse
(
'https://cloud.ik.bme.hu/?neptun='
+
user
+
"&"
+
"host="
+
StoreApi
.
get_host
())
else
:
return
HttpResponse
(
'
Updated key
information!'
)
return
HttpResponse
(
'
Can not update authorization
information!'
)
else
:
return
HttpResponse
(
'Method not found!'
,
status_code
=
404
)
...
...
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