View | Details | Raw Unified | Return to bug 23701 | Differences between
and this patch

Collapse All | Expand All

(-)umc/python/join/de.po (-6 / +6 lines)
 Lines 4-10    Link Here 
4
msgstr ""
4
msgstr ""
5
"Project-Id-Version: univention-management-console-module-join\n"
5
"Project-Id-Version: univention-management-console-module-join\n"
6
"Report-Msgid-Bugs-To: packages@univention.de\n"
6
"Report-Msgid-Bugs-To: packages@univention.de\n"
7
"POT-Creation-Date: 2011-09-20 12:07+0200\n"
7
"POT-Creation-Date: 2011-10-04 17:21+0200\n"
8
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
9
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
10
"Language-Team: LANGUAGE <LL@li.org>\n"
10
"Language-Team: LANGUAGE <LL@li.org>\n"
 Lines 13-23    Link Here 
13
"Content-Type: text/plain; charset=UTF-8\n"
13
"Content-Type: text/plain; charset=UTF-8\n"
14
"Content-Transfer-Encoding: 8bit\n"
14
"Content-Transfer-Encoding: 8bit\n"
15
15
16
#: umc/python/join/__init__.py:213
16
#: umc/python/join/__init__.py:214
17
msgid "Another join operation is in progress"
17
msgid "Another join operation is in progress"
18
msgstr "Es wird gerade eine andere Join Operation ausgeführt"
18
msgstr "Es wird gerade eine andere Join Operation ausgeführt"
19
19
20
#: umc/python/join/__init__.py:408
20
#: umc/python/join/__init__.py:403
21
#, python-format
21
#, python-format
22
msgid "Removing temp file: %s"
22
msgid "Removing temp file: %s"
23
msgstr "Lösche temporäre Datei: "
23
msgstr "Lösche temporäre Datei: "
 Lines 26-40    Link Here 
26
msgid "due"
26
msgid "due"
27
msgstr "fällig"
27
msgstr "fällig"
28
28
29
#: umc/python/join/__init__.py:353
29
#: umc/python/join/__init__.py:351
30
msgid "never run"
30
msgid "never run"
31
msgstr "noch nie ausgeführt"
31
msgstr "noch nie ausgeführt"
32
32
33
#: umc/python/join/__init__.py:336
33
#: umc/python/join/__init__.py:335
34
msgid "not installed"
34
msgid "not installed"
35
msgstr "nicht installiert"
35
msgstr "nicht installiert"
36
36
37
#: umc/python/join/__init__.py:326 umc/python/join/__init__.py:355
37
#: umc/python/join/__init__.py:326 umc/python/join/__init__.py:352
38
msgid "run"
38
msgid "run"
39
msgstr "ausführen"
39
msgstr "ausführen"
40
40
(-)umc/python/join/__init__.py (-8 / +3 lines)
 Lines 51-58    Link Here 
51
class Instance(umcm.Base):
51
class Instance(umcm.Base):
52
	def init(self):
52
	def init(self):
53
		MODULE.warn("Initializing 'join' module with LANG = '%s'" % self.locale)
53
		MODULE.warn("Initializing 'join' module with LANG = '%s'" % self.locale)
54
		global _
54
# should not be needed anymore?
55
		_ = umc.Translation('univention-management-console-module-join',self.locale).translate
55
#		global _
56
#		_ = umc.Translation('univention-management-console-module-join',self.locale).translate
56
57
57
		# some constants
58
		# some constants
58
		self._instdir		= '/usr/lib/univention-install'				# where to find *.inst files
59
		self._instdir		= '/usr/lib/univention-install'				# where to find *.inst files
 Lines 322-340    Link Here 
322
							next								# ... ignore this entry
323
							next								# ... ignore this entry
323
					files[fname]['last'] = version
324
					files[fname]['last'] = version
324
					if files[fname]['last'] < files[fname]['current']:
325
					if files[fname]['last'] < files[fname]['current']:
325
						files[fname]['icon'] = 'join-run'
326
						files[fname]['action'] = _('run')
326
						files[fname]['action'] = _('run')
327
						files[fname]['status'] = _('due')
327
						files[fname]['status'] = _('due')
328
					else:
328
					else:
329
						files[fname]['status'] = _('successful')
329
						files[fname]['status'] = _('successful')
330
						files[fname]['icon'] = 'join-success'
331
						files[fname]['action'] = ''
330
						files[fname]['action'] = ''
332
				else:
331
				else:
333
					MODULE.warn("  Script '%s' has no package" % fname)
332
					MODULE.warn("  Script '%s' has no package" % fname)
334
					e = {}
333
					e = {}
335
					e['script'] = fname
334
					e['script'] = fname
336
					e['status'] = _('not installed')
335
					e['status'] = _('not installed')
337
					e['icon'] = 'join-error'
338
					e['last'] = version
336
					e['last'] = version
339
					files[fname] = e
337
					files[fname] = e
340
		except Exception,ex:
338
		except Exception,ex:
 Lines 351-365    Link Here 
351
				entry['last'] = '--'
349
				entry['last'] = '--'
352
				if 'current' in entry:
350
				if 'current' in entry:
353
					entry['status'] = _('never run')
351
					entry['status'] = _('never run')
354
					entry['icon'] = 'join-run'
355
					entry['action'] = _('run')
352
					entry['action'] = _('run')
356
			# to avoid double expressions in the JS code, checking for
353
			# to avoid double expressions in the JS code, checking for
357
			# definedness and non-emptiness of strings: We set all empty
354
			# definedness and non-emptiness of strings: We set all empty
358
			# properties to the empty string.
355
			# properties to the empty string.
359
			if not 'action' in entry:
356
			if not 'action' in entry:
360
				entry['action'] = ''
357
				entry['action'] = ''
361
			if not 'icon' in entry:
362
				entry['icon'] = ''
363
			# Return only entries that have a 'current' property.
358
			# Return only entries that have a 'current' property.
364
			if 'current' in entry:
359
			if 'current' in entry:
365
				result.append(entry)
360
				result.append(entry)
(-)umc/js/de.po (-57 / +58 lines)
 Lines 1-10    Link Here 
1
# This file is auto-generated by the dh-umc tools and should not be edited!
1
# This file is auto-generated by the dh-umc tools and should not be edited!
2
#, fuzzy
3
msgid ""
2
msgid ""
4
msgstr ""
3
msgstr ""
5
"Project-Id-Version: univention-management-console-module-join\n"
4
"Project-Id-Version: univention-management-console-module-join\n"
6
"Report-Msgid-Bugs-To: packages@univention.de\n"
5
"Report-Msgid-Bugs-To: packages@univention.de\n"
7
"POT-Creation-Date: 2011-08-30 18:03+0200\n"
6
"POT-Creation-Date: 2011-10-04 18:06+0200\n"
8
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
7
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
9
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
10
"Language-Team: LANGUAGE <LL@li.org>\n"
9
"Language-Team: LANGUAGE <LL@li.org>\n"
 Lines 13-104    Link Here 
13
"Content-Type: text/plain; charset=UTF-8\n"
12
"Content-Type: text/plain; charset=UTF-8\n"
14
"Content-Transfer-Encoding: 8bit\n"
13
"Content-Transfer-Encoding: 8bit\n"
15
14
16
#: umc/js/join.js:396
15
#: umc/js/join.js:427
17
#, fuzzy, python-format
16
#, python-format
18
msgid "%d join scripts are currently running"
17
msgid "%d join scripts are currently running"
19
msgstr "Momentan werden %d Skripte ausgeführt."
18
msgstr "Momentan werden %d Skripte ausgeführt."
20
19
21
#: umc/js/join.js:357
20
#: umc/js/join.js:376
22
#, python-format
21
#, python-format
23
msgid "%d scripts are due to be run"
22
msgid "%d scripts are due to be run."
24
msgstr "Insgesamt können %d Skripte ausgeführt werden."
23
msgstr "Insgesamt können %d Skripte ausgeführt werden."
25
24
26
#: umc/js/join.js:348
25
#: umc/js/join.js:367
27
#, python-format
26
#, python-format
28
msgid "%d scripts selected"
27
msgid "%d scripts selected"
29
msgstr "%d Skripte ausgewählt"
28
msgstr "%d Skripte ausgewählt"
30
29
31
#: umc/js/join.js:597
30
#: umc/js/join.js:611
32
msgid "... loading log ..."
31
msgid "... loading log ..."
33
msgstr "... Protokoll wird geladen ..."
32
msgstr "... Protokoll wird geladen ..."
34
33
35
#: umc/js/join.js:347
34
#: umc/js/join.js:366
36
msgid "1 script selected"
35
msgid "1 script selected"
37
msgstr "1 Skript ausgewählt"
36
msgstr "1 Skript ausgewählt"
38
37
39
#: umc/js/join.js:479
38
#: umc/js/join.js:436 umc/js/join.js:708
40
msgid "Action"
41
msgstr "Aktion"
42
43
#: umc/js/join.js:404 umc/js/join.js:696
44
msgid "Can't start join: "
39
msgid "Can't start join: "
45
msgstr "Kann Join-Prozess nicht starten: "
40
msgstr "Kann Join-Prozess nicht starten: "
46
41
47
#: umc/js/join.js:428
42
#: umc/js/join.js:460
48
#, fuzzy
49
msgid "Current status"
43
msgid "Current status"
50
msgstr "Aktueller Status"
44
msgstr "Aktueller Status"
51
45
52
#: umc/js/join.js:455
46
#: umc/js/join.js:507
53
msgid "Current version"
47
msgid "Current version"
54
msgstr "Aktuelle Version"
48
msgstr "Aktuelle Version"
55
49
56
#: umc/js/join.js:258
50
#: umc/js/join.js:267
57
msgid ""
51
msgid ""
58
"Currently some join scripts are running. You may watch the log file until "
52
"Currently some join scripts are running. You may watch the log file until "
59
"they are finished."
53
"they are finished."
60
msgstr ""
54
msgstr ""
55
"Momentan werden Join-Skripte abgearbeitet. Sie können den Fortschritt im Log-"
56
"File verfolgen, bis der Vorgang abgeschlossen ist."
61
57
62
#: umc/js/join.js:720
58
#: umc/js/join.js:732
63
msgid "DC Hostname"
59
msgid "DC Hostname"
64
msgstr "Name des Domaincontroller-Computers"
60
msgstr "Name des Domaincontroller-Computers"
65
61
66
#: umc/js/join.js:161 umc/js/join.js:164
62
#: umc/js/join.js:479
63
msgid "Execute"
64
msgstr "Ausführen"
65
66
#: umc/js/join.js:480
67
msgid "Execute this join script"
68
msgstr "Diesen Join-Skript ausführen"
69
70
#: umc/js/join.js:166
67
msgid "Join Protocol"
71
msgid "Join Protocol"
68
msgstr "Protokoll aller Join-Skripte"
72
msgstr "Protokoll aller Join-Skripte"
69
73
70
#: umc/js/join.js:421
74
#: umc/js/join.js:453
71
msgid "Join status"
75
msgid "Join status"
72
msgstr "Join-Status"
76
msgstr "Join-Status"
73
77
74
#: umc/js/join.js:363
78
#: umc/js/join.js:388
75
msgid "Join status ok, nothing to do."
79
msgid "Join status ok, nothing to do."
76
msgstr ""
80
msgstr ""
77
"Domänenbeitritt ist komplett; es sind keine Skripte übrig, die ausgeführt "
81
"Domänenbeitritt ist komplett; es sind keine Skripte übrig, die ausgeführt "
78
"werden müßten."
82
"werden müßten."
79
83
80
#: umc/js/join.js:462
84
#: umc/js/join.js:514
81
msgid "Last version"
85
msgid "Last version"
82
msgstr "Letzte Version"
86
msgstr "Letzte Version"
83
87
84
#: umc/js/join.js:456
88
#: umc/js/join.js:508
85
msgid "Latest script version ready for execution"
89
msgid "Latest script version ready for execution"
86
msgstr "Neuester Skript, der ausgeführt werden kann"
90
msgstr "Neuester Skript, der ausgeführt werden kann"
87
91
88
#: umc/js/join.js:463
92
#: umc/js/join.js:515
89
msgid "Latest script version that was executed successfully"
93
msgid "Latest script version that was executed successfully"
90
msgstr "Letzter Skript, der erfolgreich ausgeführt wurde"
94
msgstr "Letzter Skript, der erfolgreich ausgeführt wurde"
91
95
92
#: umc/js/join.js:734
96
#: umc/js/join.js:423
97
msgid "One join script is currently running"
98
msgstr "Ein Skript wird momentan ausgeführt."
99
100
#: umc/js/join.js:379
101
msgid "One script is due to be run."
102
msgstr "Ein Skript steht zur Ausführung an."
103
104
#: umc/js/join.js:746
93
msgid "Password"
105
msgid "Password"
94
msgstr "Passwort"
106
msgstr "Passwort"
95
107
96
#: umc/js/join.js:735
108
#: umc/js/join.js:747
97
msgid "Password of the Domain Administrator"
109
msgid "Password of the Domain Administrator"
98
msgstr "Passwort des Domänen-Administrators"
110
msgstr "Passwort des Domänen-Administrators"
99
111
100
#: umc/js/join.js:714
112
#: umc/js/join.js:726
101
#, fuzzy
102
msgid ""
113
msgid ""
103
"Please enter the required information below and click the 'Start Join' "
114
"Please enter the required information below and click the 'Start Join' "
104
"button. This will join your system into the domain."
115
"button. This will join your system into the domain."
 Lines 107-146    Link Here 
107
"auf den Knopf 'Domänenbeitritt starten'. Dies gliedert Ihr System in die "
118
"auf den Knopf 'Domänenbeitritt starten'. Dies gliedert Ihr System in die "
108
"Domäne ein."
119
"Domäne ein."
109
120
110
#: umc/js/join.js:480
121
#: umc/js/join.js:500
111
msgid "Run this script if it's due or never run"
112
msgstr ""
113
114
#: umc/js/join.js:448
115
msgid "Script (package)"
122
msgid "Script (package)"
116
msgstr "Skript (Paket)"
123
msgstr "Skript (Paket)"
117
124
118
#: umc/js/join.js:449
125
#: umc/js/join.js:501
119
msgid "Script name (the same as the package it belongs to)"
126
msgid "Script name (the same as the package it belongs to)"
120
msgstr "Skriptname (benannt nach dem Paket, zu dem er gehört)"
127
msgstr "Skriptname (benannt nach dem Paket, zu dem er gehört)"
121
128
122
#: umc/js/join.js:683
129
#: umc/js/join.js:694
123
msgid "Start Join"
130
msgid "Start Join"
124
msgstr "Domänenbeitritt starten"
131
msgstr "Domänenbeitritt starten"
125
132
126
#: umc/js/join.js:470
133
#: umc/js/join.js:522
127
msgid "State"
134
msgid "State"
128
msgstr "Status"
135
msgstr "Status"
129
136
130
#: umc/js/join.js:471
137
#: umc/js/join.js:523
131
msgid "Status of this package"
138
msgid "Status of this package"
132
msgstr "Status dieses Paketes"
139
msgstr "Status dieses Paketes"
133
140
134
#: umc/js/join.js:721
141
#: umc/js/join.js:733
135
msgid "The hostname of the DC Master of the domain"
142
msgid "The hostname of the DC Master of the domain"
136
msgstr "Der Computername des Master-Domaincontrollers der Domäne"
143
msgstr "Der Computername des Master-Domaincontrollers der Domäne"
137
144
138
#: umc/js/join.js:728
145
#: umc/js/join.js:740
139
#, fuzzy
140
msgid "The username of the Domain Administrator"
146
msgid "The username of the Domain Administrator"
141
msgstr "Passwort des Domänen-Administrators"
147
msgstr "Nutzername des Domänen-Administrators"
142
148
143
#: umc/js/join.js:422
149
#: umc/js/join.js:454
144
msgid ""
150
msgid ""
145
"This page shows the status of all available join scripts on this system, "
151
"This page shows the status of all available join scripts on this system, "
146
"along with all join-related actions (run selected or all join scripts, or "
152
"along with all join-related actions (run selected or all join scripts, or "
 Lines 149-192    Link Here 
149
"Diese Seite zeigt den Status aller verfügbaren Join-Skripte auf diesem "
155
"Diese Seite zeigt den Status aller verfügbaren Join-Skripte auf diesem "
150
"System, zusammen mit allen Aktionen, die ausgeführt werden können."
156
"System, zusammen mit allen Aktionen, die ausgeführt werden können."
151
157
152
#: umc/js/join.js:116
158
#: umc/js/join.js:117
153
msgid "This system has not been joined yet."
159
msgid "This system has not been joined yet."
154
msgstr "Dieses System ist der Domäne noch nicht beigetreten."
160
msgstr "Dieses System ist der Domäne noch nicht beigetreten."
155
161
156
#: umc/js/join.js:108
162
#: umc/js/join.js:109
157
#, python-format
163
#, python-format
158
msgid "This system joined on %s"
164
msgid "This system joined on %s"
159
msgstr "Dieses System ist der Domäne am %s beigetreten."
165
msgstr "Dieses System ist der Domäne am %s beigetreten."
160
166
161
#: umc/js/join.js:727
167
#: umc/js/join.js:739
162
msgid "Username"
168
msgid "Username"
163
msgstr "Nutzername"
169
msgstr "Nutzername"
164
170
165
#: umc/js/join.js:617
171
#: umc/js/join.js:631
166
msgid "hide log"
172
msgid "hide log"
167
msgstr "Protokoll ausblenden"
173
msgstr "Protokoll ausblenden"
168
174
169
#: umc/js/join.js:169
175
#: umc/js/join.js:170
170
#, fuzzy
171
msgid "last {logcount} lines"
176
msgid "last {logcount} lines"
172
msgstr "letzte {logcount} Zeilen"
177
msgstr "letzte {logcount} Zeilen"
173
178
174
#: umc/js/join.js:358
179
#: umc/js/join.js:383
175
msgid "run all"
180
msgid "run all"
176
msgstr "Alle Skripte ausführen"
181
msgstr "Alle Skripte ausführen"
177
182
178
#: umc/js/join.js:350
183
#: umc/js/join.js:369
179
msgid "run selected scripts"
184
msgid "run selected scripts"
180
msgstr "Ausgewählte Skripte ausführen"
185
msgstr "Ausgewählte Skripte ausführen"
181
186
182
#: umc/js/join.js:624
187
#: umc/js/join.js:638
183
#, fuzzy
184
msgid "show all"
188
msgid "show all"
185
msgstr "Gesamtes Protokoll zeigen"
189
msgstr "Gesamtes Protokoll zeigen"
186
190
187
#: umc/js/join.js:609
191
#: umc/js/join.js:623
188
msgid "show log"
192
msgid "show log"
189
msgstr "Protokoll einblenden"
193
msgstr "Protokoll einblenden"
190
191
#~ msgid "Run this script"
192
#~ msgstr "Diesen Skript ausführen"
(-)umc/js/join.js (-147 / +167 lines)
 Lines 13-20    Link Here 
13
dojo.require("umc.widgets.ContainerForm");
13
dojo.require("umc.widgets.ContainerForm");
14
dojo.require("umc.widgets.Grid");
14
dojo.require("umc.widgets.Grid");
15
dojo.require("umc.widgets.TabbedModule");
15
dojo.require("umc.widgets.TabbedModule");
16
dojo.require("umc.widgets.StandbyMixin");
17
dojo.require("umc.modules._join.Form");
16
dojo.require("dojox.string.sprintf");
18
dojo.require("dojox.string.sprintf");
17
dojo.require("dojox.layout.TableContainer");
18
19
19
// Inheriting from umc.widgets.TabbedModule so any pages being added
20
// Inheriting from umc.widgets.TabbedModule so any pages being added
20
// will become tabs automatically.
21
// will become tabs automatically.
 Lines 22-28    Link Here 
22
23
23
	_page:				null,			// umc.widgets.Page
24
	_page:				null,			// umc.widgets.Page
24
	_content:			null,			// umc.widgets.ExpandingTitlePane
25
	_content:			null,			// umc.widgets.ExpandingTitlePane
25
	_split:				null,			// dijit.layout.BorderContainer
26
//	_split:				null,			// dijit.layout.BorderContainer
26
	_grid:				null,			// umc.widgets.Grid
27
	_grid:				null,			// umc.widgets.Grid
27
	_infotext:			null,
28
	_infotext:			null,
28
	
29
	
 Lines 60-66    Link Here 
60
	_switch_log_display: function(code) {
61
	_switch_log_display: function(code) {
61
		if (code == 'hide')
62
		if (code == 'hide')
62
		{
63
		{
63
			this._split.removeChild(this._logview);
64
			this._content.removeChild(this._logview);
64
			this._bottom.addChild(this._b_show);
65
			this._bottom.addChild(this._b_show);
65
			this._bottom.removeChild(this._b_hide);
66
			this._bottom.removeChild(this._b_hide);
66
			this._bottom.removeChild(this._b_full);
67
			this._bottom.removeChild(this._b_full);
 Lines 86-92    Link Here 
86
				this._refresh_log(true);
87
				this._refresh_log(true);
87
				this._bottom.addChild(this._b_hide);
88
				this._bottom.addChild(this._b_hide);
88
				this._bottom.addChild(this._b_full);
89
				this._bottom.addChild(this._b_full);
89
				this._split.addChild(this._logview);
90
				this._content.addChild(this._logview);
90
				this._logview.addChild(this._logtext);
91
				this._logview.addChild(this._logtext);
91
			}
92
			}
92
93
 Lines 106-124    Link Here 
106
				{
107
				{
107
					// show grid with join status, else....
108
					// show grid with join status, else....
108
					this._infotext.set('content',this._("This system joined on %s",result));
109
					this._infotext.set('content',this._("This system joined on %s",result));
109
					this._split.removeChild(this._joinpane);
110
					this._content.removeChild(this._joinpane);
110
					this._split.addChild(this._grid);
111
					this._content.addChild(this._grid);
111
					this._reload_grid();		// force grid reload
112
					this._reload_grid();		// force grid reload
112
				}
113
				}
113
				else
114
				else
114
				{
115
				{
115
					// show affordance to join, nothing more.
116
					// show affordance to join, nothing more.
116
					this._infotext.set('content',this._("This system has not been joined yet."));
117
					this._infotext.set('content',this._("This system has not been joined yet."));
117
					this._split.removeChild(this._grid);
118
					this._content.removeChild(this._grid);
118
					this._split.addChild(this._joinpane);
119
					this._content.addChild(this._joinpane);
119
				}
120
				}
120
			}
121
			}
121
		}));
122
		}),
123
		dojo.hitch(this, function(result) {
124
			console.error("check_join_status ERROR " + result.message);
125
		})
126
		);
122
	},
127
	},
123
	
128
	
124
	// Asynchronously invokes reload of the log lines display. Before fetching real data,
129
	// Asynchronously invokes reload of the log lines display. Before fetching real data,
 Lines 160-169    Link Here 
160
		}).then(dojo.hitch(this,function(result) {
165
		}).then(dojo.hitch(this,function(result) {
161
			var txt = dojox.string.sprintf("<u><b>%s</b></u><br/>\n",this._("Join Protocol"));
166
			var txt = dojox.string.sprintf("<u><b>%s</b></u><br/>\n",this._("Join Protocol"));
162
167
163
			// this is for debugging so we can see the refresh
164
			//var txt = dojox.string.sprintf("<u><b>%s [%d]</b></u><br/>\n",this._("Join Protocol"),this._proto_gen);
165
			//this._proto_gen++;
166
		
167
			if (this._logcount)
168
			if (this._logcount)
168
			{
169
			{
169
				var tmp = this._("last {logcount} lines");
170
				var tmp = this._("last {logcount} lines");
 Lines 188-194    Link Here 
188
		// Establish refresh every second. We keep the last instance of our 'Deferred'
189
		// Establish refresh every second. We keep the last instance of our 'Deferred'
189
		// as an instance member this._refresh_job, thus avoiding to have more than one
190
		// as an instance member this._refresh_job, thus avoiding to have more than one
190
		// refresh running at any time.
191
		// refresh running at any time.
191
		if (! this._refresh_job)
192
		//
193
		// Added here: if this._refresh_time is set to zero we stop the timer.
194
		if ((! this._refresh_job) && (this._refresh_time))
192
		{
195
		{
193
	        var deferred = new dojo.Deferred();
196
	        var deferred = new dojo.Deferred();
194
	        this._refresh_job = deferred;
197
	        this._refresh_job = deferred;
 Lines 239-265    Link Here 
239
			this.moduleStore.query({
242
			this.moduleStore.query({
240
				scope: 'running'
243
				scope: 'running'
241
			}).then(dojo.hitch(this, function(result) {
244
			}).then(dojo.hitch(this, function(result) {
242
				if (result != this._job_running)
245
				try
243
				{
246
				{
244
					this._job_running = result;
247
					if (result != this._job_running)
245
					this._check_join_status();	// switch between join form and script grid
246
					this._reload_grid();		// redo the status query for the grid, effectively triggering
247
												// _check_grid_status() on 'fetchComplete'
248
				}
249
				// for first display: if none of the two widgets (script grid or join form)
250
				// is displayed AND we run into a running job we have to do two things:
251
				//  (1) show a header text that explains the situation
252
				//	(2) switch log display on.
253
				if (this._job_running)
254
				{
255
					var txt = this._infotext.get('content');
256
					if (txt == '')
257
					{
248
					{
258
						this._infotext.set('content',this._("Currently some join scripts are running. You may watch the log file until they are finished."));
249
						this._job_running = result;
259
						this._switch_log_display('show');
250
						if (! result)
251
						{
252
							this._joinform.standby(false);
253
						}
254
						this._check_join_status();	// switch between join form and script grid
255
						this._reload_grid();		// redo the status query for the grid, effectively triggering
256
													// _check_grid_status() on 'fetchComplete'
260
					}
257
					}
258
					// for first display: if none of the two widgets (script grid or join form)
259
					// is displayed AND we run into a running job we have to do two things:
260
					//  (1) show a header text that explains the situation
261
					//	(2) switch log display on.
262
					if (this._job_running)
263
					{
264
						var txt = this._infotext.get('content');
265
						if (txt == '')
266
						{
267
							this._infotext.set('content',this._("Currently some join scripts are running. You may watch the log file until they are finished."));
268
							this._switch_log_display('show');
269
						}
270
					}
261
				}
271
				}
262
			}));
272
				catch(error)
273
				{
274
					console.error('job_polling_loop ERROR: ' + error.message);
275
				}
276
			}),
277
			dojo.hitch(this, function(result) {
278
				this._joinform.standby(false);
279
				this._grid.standby(false);
280
			})
281
			);
263
282
264
			// We should have exactly one such job. If one is underway, we don't
283
			// We should have exactly one such job. If one is underway, we don't
265
			// step on its feet. Otherwise, we start a new one.
284
			// step on its feet. Otherwise, we start a new one.
 Lines 354-360    Link Here 
354
		{
373
		{
355
			if (runnable)
374
			if (runnable)
356
			{
375
			{
357
				this._footers[0].set('content',this._('%d scripts are due to be run',runnable));
376
				var due = this._('%d scripts are due to be run.',runnable);
377
				if (runnable == 1)
378
				{
379
					due = this._("One script is due to be run.");
380
				}
381
				this._footers[0].set('content',due);
382
				
358
				this._multi_action.set('label',this._('run all'));
383
				this._multi_action.set('label',this._('run all'));
359
				this._footers[1].addChild(this._multi_action);
384
				this._footers[1].addChild(this._multi_action);
360
			}
385
			}
 Lines 393-399    Link Here 
393
		{
418
		{
394
        	this._job_running = true;
419
        	this._job_running = true;
395
420
396
			this._footers[0].set('content',this._('%d join scripts are currently running',list.length));
421
        	if (list.length == 1)
422
        	{
423
        		this._footers[0].set('content',this._("One join script is currently running"));
424
        	}
425
        	else
426
        	{
427
        		this._footers[0].set('content',this._('%d join scripts are currently running',list.length));
428
        	}
397
			this._footers[1].removeChild(this._multi_action);
429
			this._footers[1].removeChild(this._multi_action);
398
		
430
		
399
	        this.umcpCommand('join/run',{scripts: list}).then(dojo.hitch(this, function(data) {
431
	        this.umcpCommand('join/run',{scripts: list}).then(dojo.hitch(this, function(data) {
 Lines 432-468    Link Here 
432
		// Trying to give the user a chance to resize the grid <-> logview ratio.
464
		// Trying to give the user a chance to resize the grid <-> logview ratio.
433
		// Even a simple BorderContainer is able to do that: just give some of its
465
		// Even a simple BorderContainer is able to do that: just give some of its
434
		// children a 'splitter: true' property.
466
		// children a 'splitter: true' property.
435
		this._split = new dijit.layout.BorderContainer({
467
//		this._split = new dijit.layout.BorderContainer({
436
		});
468
//		});
437
		this._content.addChild(this._split);
469
//		this._content.addChild(this._split);
438
		
470
		
439
		this._grid = new umc.widgets.Grid({
471
		this._grid = new umc.widgets.Grid({
440
			region:			'center',
472
			region:			'center',
441
			moduleStore:	this.moduleStore,
473
			moduleStore:	this.moduleStore,
442
			//query:			{scope: 'scripts'},
474
			//query:			{scope: 'scripts'},
443
			actions:		{},
475
			actions:
476
			[
477
	         	{
478
	                name:				'run',
479
	                label:				this._( 'Execute' ),
480
	                description:		this._( 'Execute this join script' ),
481
	                isContextAction:	true,
482
	                isStandardAction:	true,
483
	            	canExecute: dojo.hitch(this, function(values) {
484
	            		// Knowledge is in the Python module!
485
	            		return (values['action'] == 'run');
486
	            	}),
487
	                callback: dojo.hitch(this, function(id) {
488
	            		if (dojo.isArray(id))
489
	            		{
490
	            			id = id[0];
491
	            		}
492
	                	this._run_scripts([id]);
493
	                })
494
	            }
495
			],
444
			columns:
496
			columns:
445
			[
497
			[
446
				{
498
				{
447
					name:			'script',
499
					name:			'script',
448
					label:			this._("Script (package)"),
500
					label:			this._("Script (package)"),
449
					description:	this._("Script name (the same as the package it belongs to)"),
501
					description:	this._("Script name (the same as the package it belongs to)"),
450
					editable:		false,
502
					editable:		false
451
					width:			'40%'
503
//					width:			'50%'
452
				},
504
				},
453
				{
505
				{
454
					name:			'current',
506
					name:			'current',
455
					label:			this._("Current version"),
507
					label:			this._("Current version"),
456
					description:	this._("Latest script version ready for execution"),
508
					description:	this._("Latest script version ready for execution"),
457
					editable:		false,
509
					editable:		false,
458
					width:			'14%'
510
					width:			'adjust'
459
				},
511
				},
460
				{
512
				{
461
					name:			'last',
513
					name:			'last',
462
					label:			this._("Last version"),
514
					label:			this._("Last version"),
463
					description:	this._("Latest script version that was executed successfully"),
515
					description:	this._("Latest script version that was executed successfully"),
464
					editable:		false,
516
					editable:		false,
465
					width:			'14%'
517
					width:			'adjust'
466
				},
518
				},
467
				// Status column. Currently only text.
519
				// Status column. Currently only text.
468
				{
520
				{
 Lines 471-514    Link Here 
471
					description:	this._("Status of this package"),
523
					description:	this._("Status of this package"),
472
					editable:		false,
524
					editable:		false,
473
					width:			'12%'
525
					width:			'12%'
474
					// iconField:		'icon'		// deactivated (for now)
475
				},
476
				// Action field
477
				{
478
					name:			'action',
479
					label:			this._("Action"),
480
					description:	this._("Run this script if it's due or never run"),
481
					sortable:		false,
482
					editable:		false,
483
					width:			'10%',
484
					// We turn the value of the field into an action button that will
485
					// invoke the script named by the 'script' field of this row
486
	                formatter: dojo.hitch(this, function(key, rowIndex) {
487
	                	// key = the value of the field, in our case empty or 'run'
488
	                	// rowIndex = needed to retrieve the script name
489
	                	try
490
	                	{
491
	                		if (key != '')
492
	                		{
493
			                	var tmp = this._grid.getRowValues(rowIndex);
494
			                    var script = tmp.script;
495
			                	return new umc.widgets.Button({
496
			                		label:		key,
497
			                		// FIXME style this button by a reasonable CSS class or such.
498
			                		style:		'border:outset 1px;background-color:#A0A0A0;margin:0px;padding:0px;',
499
			                		//'class':	'umcSubmitButton',		// doesn't work, unfortunately.
500
			            			onClick:	dojo.hitch(this, function() {
501
			            				this._run_scripts([script]);
502
			            			})
503
			                	});
504
	                		}
505
	                		return '';
506
	                	}
507
	                	catch(err)
508
	                	{
509
	                    	return '';
510
	                	}
511
	                })
512
				}
526
				}
513
			]
527
			]
514
		});
528
		});
 Lines 655-665    Link Here 
655
			scrollable:		false,
669
			scrollable:		false,
656
			style:			'border:none;'
670
			style:			'border:none;'
657
		});
671
		});
658
		this._split.addChild(info);
672
		this._content.addChild(info);
659
		
673
		
660
		this._infotext = new umc.widgets.Text({
674
		this._infotext = new umc.widgets.Text({
661
			style:			'border:none;margin:.2em;',
675
			style:			'border:none;margin:.2em;',
662
			content:		'',
676
			content:		''
663
		});
677
		});
664
		info.addChild(this._infotext);
678
		info.addChild(this._infotext);
665
		
679
		
 Lines 668-740    Link Here 
668
		// password and for starting the join process. This form is prepared here and stored
682
		// password and for starting the join process. This form is prepared here and stored
669
		// into the this._joinpane variable. The _check_join_status() method will decide
683
		// into the this._joinpane variable. The _check_join_status() method will decide
670
		// which view is to show.
684
		// which view is to show.
671
		this._joinpane = new dojox.layout.TableContainer({
685
		this._joinpane = new umc.widgets.ContainerWidget({
672
			region:				'center',
686
			region:				'center',
673
			cols:				1,
687
			scrollable:			true
674
			style:				'width:50%;',
675
			showLabels:			false
676
		});
688
		});
677
		this._joinform = new umc.widgets.Form({
689
		var buttons = 
678
			scrollable:			true,
690
		[
679
			buttons:
691
			{
680
			[
692
				type:			'submit',
681
				{
693
				'default':		true,
682
					type:			'submit',
694
				label:			this._("Start Join"),
683
					label:			this._("Start Join"),
695
				onClick:		dojo.hitch(this, function() {
684
					onClick:		dojo.hitch(this, function() {
696
					this._joinform.standby(true);
685
						//this._joinform.standby(true);
697
					this._switch_log_display('show');
686
						this._switch_log_display('show');
698
			        this.umcpCommand('join/join',{
687
				        this.umcpCommand('join/join',{
699
						host: this._joinform._widgets['host'].value,
688
							host: this._joinform._widgets['host'].value,
700
						user: this._joinform._widgets['user'].value,
689
							user: this._joinform._widgets['user'].value,
701
						pass: this._joinform._widgets['pass'].value				        	
690
							pass: this._joinform._widgets['pass'].value				        	
702
			        }).then(dojo.hitch(this, function(data) {
691
				        }).then(dojo.hitch(this, function(data) {
703
			        	var result = dojo.getObject('result', false, data);
692
				        	var result = dojo.getObject('result', false, data);
704
			        	if (result != '')
693
				        	if (result != '')
705
			        	{
694
				        	{
706
			        		this._joinform.standby(false);
695
				        		// Note result is already localized
707
			        		// Note result is already localized
696
				        		umc.dialog.alert(this._("Can't start join: ") + result);
708
			        		umc.dialog.alert(this._("Can't start join: ") + result);
697
					        	this._check_join_status();		// sets meaningful messages
709
				        	this._check_join_status();		// sets meaningful messages
698
				        	}
710
			        	}
699
				        	else
711
			        	else
700
				        	{
712
			        	{
701
				        		// Job is started. Now wait for its completion.
713
			        		// Job is started. Now wait for its completion.
702
				        		this._job_polling_loop(true);
714
			        		this._job_polling_loop(true);
703
				        	}
715
			        	}
704
				        }));
716
			        }));
705
					})
717
				})
706
				}
718
			}
707
			],
719
		];
708
			widgets:
720
		var widgets = 
709
			[
721
		[
710
				{
722
			{
711
					type:			'Text',
723
				type:			'Text',
712
					name:			'text',
724
				name:			'text',
713
					style:			'margin-top:1em;margin-bottom:1em;',
725
				style:			'margin-top:1em;margin-bottom:1em;',
714
					content:		this._("Please enter the required information below and click the 'Start Join' button. This will join your system into the domain.")
726
				content:		this._("Please enter the required information below and click the 'Start Join' button. This will join your system into the domain.")
715
				},
727
			},
716
				{
728
			{
717
					type:			'TextBox',
729
				type:			'TextBox',
718
					name:			'host',
730
				name:			'host',
719
					value:			'',
731
				value:			'',
720
					label:			this._('DC Hostname'),
732
				label:			this._('DC Hostname'),
721
					description:	this._('The hostname of the DC Master of the domain')
733
				description:	this._('The hostname of the DC Master of the domain')
722
				},
734
			},
723
				{
735
			{
724
					type:			'TextBox',
736
				type:			'TextBox',
725
					name:			'user',
737
				name:			'user',
726
					value:			'Administrator',
738
				value:			'Administrator',
727
					label:			this._('Username'),
739
				label:			this._('Username'),
728
					description:	this._('The username of the Domain Administrator')
740
				description:	this._('The username of the Domain Administrator')
729
				},
741
			},
730
				{
742
			{
731
					type:		'PasswordBox',
743
				type:		'PasswordBox',
732
					name:		'pass',
744
				name:		'pass',
733
					value:		'',
745
				value:		'',
734
					label: this._( 'Password' ),
746
				label: this._( 'Password' ),
735
					description: this._( 'Password of the Domain Administrator' )
747
				description: this._( 'Password of the Domain Administrator' )
736
				}
748
			}
737
			]
749
		];
750
		this._joinform = new umc.modules._join.Form({
751
			buttons:	buttons,
752
			widgets:	widgets
738
		});
753
		});
739
		this._joinpane.addChild(this._joinform);
754
		this._joinpane.addChild(this._joinform);
740
		
755
		
 Lines 745-750    Link Here 
745
		this._job_polling_loop(true);
760
		this._job_polling_loop(true);
746
				
761
				
747
		this._page.startup();		// start event loop and data gathering
762
		this._page.startup();		// start event loop and data gathering
763
	},
764
	
765
	uninitialize: function() {
748
		
766
		
749
	}	
767
		this.inherited(arguments);
768
		this._refresh_time = 0;
769
	
750
});
770
});

Return to bug 23701