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

(-)a/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/DriveWizard.js (-3 / +3 lines)
 Lines 112-118   define([ Link Here 
112
						required: true,
112
						required: true,
113
						label: _('Filename'),
113
						label: _('Filename'),
114
						validator: lang.hitch(this, function(val) {
114
						validator: lang.hitch(this, function(val) {
115
							var regExp = /^[^./][^/]*$/;
115
							var regExp = /^[^.\/][^\/]*$/;
116
							return regExp.test(val) && (!this._volumes || !(val in this._volumes));
116
							return regExp.test(val) && (!this._volumes || !(val in this._volumes));
117
						}),
117
						}),
118
						invalidMessage: _('A valid filename cannot contain "/", may not start with "." and may not already exist in the storage pool.'),
118
						invalidMessage: _('A valid filename cannot contain "/", may not start with "." and may not already exist in the storage pool.'),
 Lines 253-261   define([ Link Here 
253
				volumeType: mode
253
				volumeType: mode
254
			};
254
			};
255
			if (mode === 'new') {
255
			if (mode === 'new') {
256
				values['source'] = null; // trigger volume creation
256
				values.source = null; // trigger volume creation
257
			} else {
257
			} else {
258
				values['source'] = values['volumeFilename'];
258
				values.source = values.volumeFilename;
259
			}
259
			}
260
			return values;
260
			return values;
261
		},
261
		},
(-)a/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/InterfaceWizard.js (-1 / +1 lines)
 Lines 111-117   define([ Link Here 
111
		},
111
		},
112
112
113
		_setInitialValues: function() {
113
		_setInitialValues: function() {
114
			this.getPage('interface').set('headerText', _('Edit network interface'))
114
			this.getPage('interface').set('headerText', _('Edit network interface'));
115
			this.getWidget('interface', 'type').set('value', this.values.type);
115
			this.getWidget('interface', 'type').set('value', this.values.type);
116
			this.getWidget('interface', 'model').set('value', this.values.model);
116
			this.getWidget('interface', 'model').set('value', this.values.model);
117
			this.getWidget('interface', 'source').set('value', this.values.source);
117
			this.getWidget('interface', 'source').set('value', this.values.source);
(-)a/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/SnapshotGrid.js (-1 / +1 lines)
 Lines 111-117   define([ Link Here 
111
			if (!snapshots_possible) {
111
			if (!snapshots_possible) {
112
				dialog.alert(_('Creating a snapshots is not possible, because the domain contains writeable raw images!'));
112
				dialog.alert(_('Creating a snapshots is not possible, because the domain contains writeable raw images!'));
113
				return;
113
				return;
114
			} else if (qcow2_images == 0 && this.domain.state != 'SHUTOFF') {
114
			} else if (qcow2_images === 0 && this.domain.state != 'SHUTOFF') {
115
				dialog.alert(_('Creating a snapshot is not possible, because the domain does not have at least one qcow2 image!'));
115
				dialog.alert(_('Creating a snapshot is not possible, because the domain does not have at least one qcow2 image!'));
116
				return;
116
				return;
117
			}
117
			}
(-)a/branches/ucs-3.1/ucs/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm/types.js (-8 / +12 lines)
 Lines 88-99   define([ Link Here 
88
			switch (unit) {
88
			switch (unit) {
89
				case 'P': case 'p':
89
				case 'P': case 'p':
90
					mem *= 1024;
90
					mem *= 1024;
91
					/* falls through */
91
				case 'T': case 't':
92
				case 'T': case 't':
92
					mem *= 1024;
93
					mem *= 1024;
94
					/* falls through */
93
				case 'G': case 'g':
95
				case 'G': case 'g':
94
					mem *= 1024;
96
					mem *= 1024;
97
					/* falls through */
95
				case 'M': case 'm':
98
				case 'M': case 'm':
96
					mem *= 1024;
99
					mem *= 1024;
100
					/* falls through */
97
				case 'K': case 'k':
101
				case 'K': case 'k':
98
					mem *= 1024;
102
					mem *= 1024;
99
			}
103
			}
 Lines 227-233   define([ Link Here 
227
			'writethrough': _('Read caching, forced sync (write-through)'),
231
			'writethrough': _('Read caching, forced sync (write-through)'),
228
			'writeback': _('Read/write caching, no forced sync (write-back)'),
232
			'writeback': _('Read/write caching, no forced sync (write-back)'),
229
			'directsync': _('No host caching, forced sync (direct-sync)'),
233
			'directsync': _('No host caching, forced sync (direct-sync)'),
230
			'unsafe': _('Read/write caching, sync filtered out (unsafe)'),
234
			'unsafe': _('Read/write caching, sync filtered out (unsafe)')
231
		},
235
		},
232
		POOLS_RW: { // storage pools which support creating new volumes
236
		POOLS_RW: { // storage pools which support creating new volumes
233
			dir: true,
237
			dir: true,
 Lines 284-303   define([ Link Here 
284
				return [];
288
				return [];
285
			});
289
			});
286
		},
290
		},
291
		ISO: {id: 'iso', label: _('ISO format (iso)')},
292
		RAW: {id: 'raw', label: _('Simple format (raw)')},
293
		QCOW2: {id: 'qcow2', label: _('Extended format (qcow2)'), preselected: true},
287
		getImageFormat: function(options) {
294
		getImageFormat: function(options) {
288
			ISO = {id: 'iso', label: _('ISO format (iso)')};
289
			RAW = {id: 'raw', label: _('Simple format (raw)')};
290
			QCOW2 = {id: 'qcow2', label: _('Extended format (qcow2)'), preselected: true};
291
			var list = [];
295
			var list = [];
292
			if (options.type == 'cdrom') {
296
			if (options.type == 'cdrom') {
293
				list.push(ISO);
297
				list.push(self.ISO);
294
			} else if (options.type == 'floppy') {
298
			} else if (options.type == 'floppy') {
295
				list.push(RAW);
299
				list.push(self.RAW);
296
			} else {
300
			} else {
297
				list.push(RAW);
301
				list.push(self.RAW);
298
				if (options.domain_type == 'kvm') { // TODO: Check self.POOLS_FILE
302
				if (options.domain_type == 'kvm') { // TODO: Check self.POOLS_FILE
299
					// add qcow2 as pre-selected item
303
					// add qcow2 as pre-selected item
300
					list.push(QCOW2);
304
					list.push(self.QCOW2);
301
				}
305
				}
302
			}
306
			}
303
			return list;
307
			return list;

Return to bug 30897