Revision e213881d ci/utils.py
b/ci/utils.py | ||
---|---|---|
790 | 790 |
self.logger.info("Downloaded debian packages to %s" % |
791 | 791 |
_green(dest)) |
792 | 792 |
|
793 |
def x2go_plugin(self, dest=None): |
|
794 |
"""Produce an html page which will use the x2goplugin |
|
795 |
|
|
796 |
Arguments: |
|
797 |
dest -- The file where to save the page (String) |
|
798 |
|
|
799 |
""" |
|
800 |
output_str = """ |
|
801 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|
802 |
<html> |
|
803 |
<head> |
|
804 |
<title>X2Go SynnefoCI Service</title> |
|
805 |
</head> |
|
806 |
<body onload="checkPlugin()"> |
|
807 |
<div id="x2goplugin"> |
|
808 |
<object |
|
809 |
src="location" |
|
810 |
type="application/x2go" |
|
811 |
name="x2goplugin" |
|
812 |
palette="background" |
|
813 |
height="100%" |
|
814 |
hspace="0" |
|
815 |
vspace="0" |
|
816 |
width="100%" |
|
817 |
x2goconfig=" |
|
818 |
session=X2Go-SynnefoCI-Session |
|
819 |
server={0} |
|
820 |
user={1} |
|
821 |
sshport={2} |
|
822 |
published=true |
|
823 |
autologin=true |
|
824 |
"> |
|
825 |
</object> |
|
826 |
</div> |
|
827 |
</body> |
|
828 |
</html> |
|
829 |
""".format(self.read_temp_config('server_ip'), |
|
830 |
self.read_temp_config('server_user'), |
|
831 |
self.read_temp_config('server_port')) |
|
832 |
if dest is None: |
|
833 |
dest = self.config.get('Global', 'x2go_plugin_file') |
|
834 |
|
|
835 |
self.logger.info("Writting x2go plugin html file to %s" % dest) |
|
836 |
fid = open(dest, 'w') |
|
837 |
fid.write(output_str) |
|
838 |
fid.close() |
|
839 |
|
|
793 | 840 |
|
794 | 841 |
def parse_typed_option(option, value): |
795 | 842 |
"""Parsed typed options (flavors and images)""" |
Also available in: Unified diff