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
fed5d8c7
authored
Feb 06, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
laborgui: Refactor to user nxkey and rdp package
parent
9e248ce5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
miscellaneous/laborclient/store_gui.py
+10
-9
No files found.
miscellaneous/laborclient/store_gui.py
View file @
fed5d8c7
...
...
@@ -4,13 +4,15 @@ import gtk
import
webkit
import
gobject
import
base64
import
subprocess
import
os
import
sys
import
rdp
from
multiprocessing
import
Process
### Settings ###
KEY_DIR
=
"/tmp/"
KEY_FILE
=
KEY_DIR
+
"/id_rsa"
class
KeyGen
:
"""Attributes:
private_key
...
...
@@ -122,11 +124,6 @@ class Browser:
self
.
webview
.
execute_script
(
"resetKey()"
)
gtk
.
main_quit
()
def
parse_remote_login
(
uri
):
#rdp:cloud:qYSv3eQJYY:152.66.243.62:23037
scheme
,
user
,
password
,
host
,
port
=
uri
.
split
(
':'
,
4
)
def
on_navigation_requested
(
self
,
view
,
frame
,
req
,
data
=
None
):
uri
=
req
.
get_uri
()
#print "On nav: " + uri
...
...
@@ -162,6 +159,10 @@ class Browser:
self
.
webview
.
execute_script
(
"document.getElementById(
\"
mount_button
\"
).hidden=false ;"
)
self
.
webview
.
execute_script
(
"document.getElementById(
\"
umount_button
\"
).hidden=true ;"
)
return
True
elif
scheme
==
"nx"
or
scheme
==
"rdp"
or
scheme
==
"shellterm"
:
connection
=
rdp
.
RDP
(
uri
)
Process
(
target
=
connection
.
connect
)
.
start
()
return
True
else
:
return
False
def
mount_sshfs_folder
(
self
,
neptun
,
host
):
...
...
@@ -176,7 +177,7 @@ class Browser:
self
.
webview
.
open
(
"https://login.bme.hu/admin/"
)
def
store
(
self
,
widget
):
self
.
webview
.
open
(
"https://cloud.ik.bme.hu/
store/gui/
"
)
self
.
webview
.
open
(
"https://cloud.ik.bme.hu/"
)
def
load_committed_cb
(
self
,
web_view
,
frame
):
self
.
webview
.
execute_script
(
'document.getElementsByTagName("a")[0].target="";'
)
#uri = frame.get_uri()
...
...
@@ -186,7 +187,7 @@ class Browser:
def
main
(
self
):
gtk
.
main
()
if
__name__
==
"__main__"
:
browser
=
Browser
()
browser
.
main
()
...
...
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