View | Details | Raw Unified | Return to bug 37537
Collapse All | Expand All

(-)a/ucs-4.0-1/base/univention-system-setup/conffiles/var/www/ucs-overview/welcome.json (+23 lines)
Line 0    Link Here 
1
@!@
2
import json
3
import univention.management.console.modules.setup.network
4
data = {}
5
for key in ('server/role', 'hostname', 'domainname'):
6
	data[key] = configRegistry.get(key)
7
8
for key, value in configRegistry.items():
9
	if key.startswith('umc/web/appliance/'):
10
		data[key] = value
11
12
all_ip4s = set()
13
all_ip6s = set()
14
interfaces = univention.management.console.modules.setup.network.Interfaces()
15
for interface in interfaces.values():
16
	all_ip4s.update(a[0] for a in interface.ip4)
17
	all_ip6s.update(a[0] for a in interface.ip6)
18
19
data['ip_addresses'] = list(all_ip4s)
20
data['ip6_addresses'] = list(all_ip6s)
21
22
print json.dumps(data, indent=2)
23
@!@
(-)a/ucs-4.0-1/base/univention-system-setup/debian/control (+16 lines)
 Lines 128-130   Description: UMC module for Univention System Setup Link Here 
128
 integrated, directory driven solution for managing
128
 integrated, directory driven solution for managing
129
 corporate environments. For more information about UCS,
129
 corporate environments. For more information about UCS,
130
 refer to: http://www.univention.de/
130
 refer to: http://www.univention.de/
131
132
Package: univention-system-setup-greeter
133
Architecture: all
134
Depends: ${misc:Depends}, ${python:Depends},
135
 passwd,
136
 univention-management-console-module-setup (= ${source:Version}),
137
 shell-univention-lib (>= 3.0.1-1),
138
 python-univention-lib (>= 4.0.5-2),
139
Recommends: firefox-en | firefox-de | firefox | iceweasel,
140
Description: UCS System Setup greeter
141
 This package provides FIXME
142
 .
143
 It is part of Univention Corporate Server (UCS), an
144
 integrated, directory driven solution for managing
145
 corporate environments. For more information about UCS,
146
 refer to: http://www.univention.de/
(-)a/ucs-4.0-1/base/univention-system-setup/debian/univention-system-setup-greeter.install (+1 lines)
Line 0    Link Here 
1
greeter/ucs-overview var/www/
(-)a/ucs-4.0-1/base/univention-system-setup/debian/univention-system-setup-greeter.univention-config-registry (+7 lines)
Line 0    Link Here 
1
Type: file
2
File: var/www/ucs-overview/welcome.json
3
Variables: interfaces/.*
4
Variables: server/role
5
Variables: hostname
6
Variables: domainname
7
Variables: umc/web/appliance/.*
(-)a/ucs-4.0-1/base/univention-system-setup/greeter/ucs-overview/css/welcome.css (+65 lines)
Line 0    Link Here 
1
.welcome-image {
2
	position: relative;
3
	margin: 0 auto;
4
	background-image: url("../welcome/welcome.png");
5
	background-repeat: no-repeat;
6
	width: 652px;
7
	height: 200px;
8
}
9
10
.welcome-url {
11
	position: absolute;
12
	top: 88px;
13
	left: 250px;
14
	width: 163px;
15
	height: 22px;
16
	line-height: 22px;
17
}
18
19
.welcome-url-alternative {
20
	position: absolute;
21
	top: 120px;
22
	left: 250px;
23
}
24
25
.welcome-url-alternative span {
26
	display: block;
27
}
28
29
.welcome-url-alternative span:first-child {
30
	margin-left: -20px;
31
}
32
33
.welcome-text {
34
	display: block;
35
	margin: 0 auto;
36
	font-size: 1.1em;
37
	width: 652px;
38
	padding: 15px 10px;
39
}
40
41
.welcome-command {
42
	background-image: url("../welcome/command.svg");
43
}
44
.welcome-desktop {
45
	background-image: url("../welcome/desktop.svg");
46
}
47
.welcome-command, .welcome-desktop {
48
	background-repeat: no-repeat;
49
	background-size: 30px;
50
	padding: 5px 30px 0;
51
	line-height: 20px;
52
	display: block;
53
}
54
55
#welcome-appliance-logo {
56
	margin: 10px;
57
	height: 67px;
58
	width: 155px;
59
	position: absolute;
60
	left: 230px;
61
	top: 0;
62
	background-position: center;
63
	background-size: contain;
64
	background-repeat: no-repeat;
65
}
(-)a/ucs-4.0-1/base/univention-system-setup/greeter/ucs-overview/js/welcome/ucs.js (+9 lines)
Line 0    Link Here 
1
var _callback = dojoConfig.callback;
2
dojoConfig.callback = function() {
3
	try {
4
		_callback();
5
	} catch(err) {};
6
	require(["welcome/welcome", "dojo/domReady!"], function(welcome) {
7
		welcome.start();
8
	});
9
}
(-)a/ucs-4.0-1/base/univention-system-setup/greeter/ucs-overview/js/welcome/welcome.js (+95 lines)
Line 0    Link Here 
1
/*
2
 * Copyright 2015 Univention GmbH
3
 *
4
 * http://www.univention.de/
5
 *
6
 * All rights reserved.
7
 *
8
 * The source code of this program is made available
9
 * under the terms of the GNU Affero General Public License version 3
10
 * (GNU AGPL V3) as published by the Free Software Foundation.
11
 *
12
 * Binary versions of this program provided by Univention to you as
13
 * well as other copyrighted, protected or trademarked materials like
14
 * Logos, graphics, fonts, specific documentations and configurations,
15
 * cryptographic keys etc. are subject to a license agreement between
16
 * you and Univention and not subject to the GNU AGPL V3.
17
 *
18
 * In the case you use this program under the terms of the GNU AGPL V3,
19
 * the program is provided in the hope that it will be useful,
20
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
 * GNU Affero General Public License for more details.
23
 *
24
 * You should have received a copy of the GNU Affero General Public
25
 * License with the Debian GNU/Linux or Univention distribution in file
26
 * /usr/share/common-licenses/AGPL-3; if not, see
27
 * <http://www.gnu.org/licenses/>.
28
 */
29
/*global define require console window */
30
31
define([
32
	"dojo/_base/lang",
33
	"dojo/_base/kernel",
34
	"dojo/_base/array",
35
	"dojo/io-query",
36
	"dojo/query",
37
	"dojo/dom",
38
	"dojo/dom-construct",
39
	"dojo/dom-attr",
40
	"dojo/dom-style",
41
	"dojo/dom-class",
42
	"dojo/dom-geometry",
43
	"../ucs/text!/ucs-overview/welcome.json",
44
	"../ucs/i18n!welcome,ucs"
45
], function(lang, kernel, array, ioQuery, query, dom, domConstruct, domAttr, domStyle, domClass, domGeometry, data, _) {
46
	return {
47
		start: function() {
48
			this.replaceTitle();
49
			this.addApplianceLogo();
50
			this.insertLinks();
51
52
		},
53
54
		replaceTitle: function() {
55
			if (data['umc/web/appliance/name']) {
56
				var title = _('Welcome to the {0} appliance with Univention Corporate Server', [data['umc/web/appliance/name']]);
57
				var titleNode = query('h1', 'title')[0];
58
				domAttr.set(titleNode, 'data-i18n', title);
59
				titleNode.innerHTML = title;
60
				query('title')[0].innerHTML = title;
61
			}
62
		},
63
64
		addApplianceLogo: function() {
65
			if (data['umc/web/appliance/logo']) {
66
				var path = data['umc/web/appliance/logo'];
67
				if (path[0] !== '/') {
68
					path = '/univention-management-console/js/dijit/themes/umc/' + path;
69
				}
70
				domStyle.set('welcome-appliance-logo', 'background-image', lang.replace('url({0})', [path]));
71
			}
72
		},
73
74
		insertLinks: function() {
75
			var alternatives = dom.byId('welcome-url-alternative');
76
			array.forEach(data['ip_addresses'].concat([data['hostname'] + '.' + data['domainname']]).concat(data['ip6_addresses']), function(address, i, arr) {
77
				address = this.formatUrl(address, data['ip6_addresses'].indexOf(address) !== -1);
78
				if (i == 0) {
79
					dom.byId('welcome-url').innerHTML = address;
80
				} else {
81
					domClass.toggle(alternatives, 'dijitHidden', false);
82
					domConstruct.create('span', {innerHTML: address}, alternatives);
83
				}
84
			}, this);
85
		
86
		},
87
88
		formatUrl: function(url, ip6) {
89
			if (ip6) {
90
				url = '[' + url + ']';
91
			}
92
			return 'https://' + url + '/';
93
		}
94
	};
95
});
(-)a/ucs-4.0-1/base/univention-system-setup/greeter/ucs-overview/welcome.html (+73 lines)
Line 0    Link Here 
1
<!DOCTYPE html>
2
<html>
3
	<head>
4
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
7
		<title>Welcome to Univention Corporate Server</title>
8
		<link rel="shortcut icon" href="/favicon.ico" />
9
		<link rel="stylesheet" href="js/dijit/themes/dijit.css">
10
		<link rel="stylesheet" href="css/bootstrap.css"/>
11
		<link rel="stylesheet" href="css/ucs.css">
12
		<link rel="stylesheet" href="css/welcome.css">
13
		<script type="text/javascript">
14
			var l10nResources = ['welcome'];
15
		</script>
16
		<script type="text/javascript" src="js/ucs/query.js"></script>
17
		<script type="text/javascript" src="js/welcome/ucs.js"></script> <!-- must be after ucs/query to overwrite dojoConfig -->
18
		<script type="text/javascript" src="js/dojo/dojo.js"></script>
19
	</head>
20
	<body>
21
		<div id="wrapper">
22
			<div id="site-header">
23
				<div id="header-top">
24
					<div id="header-left">
25
					</div>
26
					<div id="header-right">
27
						<div class="dropdown" id="dropDownButton"></div>
28
					</div>
29
				</div>
30
			</div>
31
			<div class="container">
32
				<div id="title" class="dijitHidden">
33
					<h1 data-i18n="Welcome to Univention Corporate Server"></h1>
34
					<h2 data-i18n="{hostname}.{domainname}"></h2>
35
				</div>
36
				<div id="content" class="tab-content">
37
					<span class="welcome-text" data-i18n="Navigate with your browser to the IP address of this system in order to access the management interface of Univention Corporate Server."></span>
38
					<div class="welcome-image">
39
						<div id="welcome-appliance-logo"></div>
40
						<div id="welcome-url" class="welcome-url"></div>
41
						<div class="welcome-url-alternative dijitHidden" id="welcome-url-alternative">
42
							<span data-i18n="Or use an alternative address:"></span>
43
						</div>
44
					</div>
45
46
					<a class="welcome-command" href="#" data-i18n="Looking for a command line?"></a>
47
					<a class="welcome-desktop" href="#" data-i18n="Looking for a desktop?"></a>
48
<!--
49
					<a class="" href="#" data-i18n="[↓] more options"></a>
50
1. UCS version / App appliance name
51
52
2. The current network setting
53
54
3. How to connect the web management interface
55
56
4. A login to the command line
57
58
We could later add a simple interface for changing the network settings.
59
60
TODO: [↓] more options
61
62
KDE-hint
63
64
access UMC in this session directly
65
66
-->
67
68
				</div>
69
			</div>
70
		</div>
71
		<div class="footer " id="footer" role="contentinfo"></div>
72
	</body>
73
</html>
(-)a/ucs-4.0-1/base/univention-system-setup/greeter/ucs-overview/welcome/command.svg (+19 lines)
Line 0    Link Here 
1
<?xml version="1.0" encoding="utf-8"?>
2
3
4
<!-- The icon can be used freely in both personal and commercial projects with no attribution required, but always appreciated. 
5
You may NOT sub-license, resell, rent, redistribute or otherwise transfer the icon without express written permission from iconmonstr.com -->
6
7
8
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
9
10
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
11
12
	 width="512px" height="512px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve">
13
14
<path id="window-command-icon" d="M50,73.5v365h412v-365H50z M412,388.5H100v-218h312V388.5z M241.458,280.395l-75.999,76.397
15
16
	l-27.461-27.332l48.801-49.065l-48.869-49.134l27.461-27.33L241.458,280.395z M376,317.528H262.5v38H376V317.528z"/>
17
18
</svg>
19
(-)a/ucs-4.0-1/base/univention-system-setup/greeter/ucs-overview/welcome/desktop.svg (+12 lines)
Line 0    Link Here 
1
<?xml version="1.0" encoding="utf-8"?>
2
3
<!-- The icon can be used freely in both personal and commercial projects with no attribution required, but always appreciated. 
4
You may NOT sub-license, resell, rent, redistribute or otherwise transfer the icon without express written permission from iconmonstr.com -->
5
6
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
7
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
8
	 width="512px" height="512px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve">
9
<path id="computer-4-icon" d="M225.874,154.845l79.072,61.602l-33.451,5.631l22.025,44.543l-20.699,10.598l-22.135-45.371
10
	l-24.812,23.182V154.845z M50,63.854v300.109h412V63.854H50z M419.891,321.856H92.109l-0.001-215.893l327.782-0.002V321.856z
11
	 M366,423.146v25H146.001v-25H196v-33.762h120v33.762H366z"/>
12
</svg>

Return to bug 37537