Parcourir la source

10.4.1 release

Gaudenz Alder il y a 6 ans
Parent
commit
756668f6d6

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+09-MAR-2019: 10.4.1
+
+- Uses mxGraph 3.9.13 beta 18
+
 09-MAR-2019: 10.4.0
 
 - Handles timeouts in realtime convert tool

+ 1 - 1
VERSION

@@ -1 +1 @@
-10.4.0
+10.4.1

Fichier diff supprimé car celui-ci est trop grand
+ 6 - 6
etc/mxgraph/mxClient.js


+ 1 - 1
src/main/webapp/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 03/09/2019 09:40 AM
+# 03/10/2019 10:43 AM
 
 app.html
 index.html?offline=1

Fichier diff supprimé car celui-ci est trop grand
+ 284 - 284
src/main/webapp/js/app.min.js


+ 2 - 1
src/main/webapp/js/diagramly/DrawioFileSync.js

@@ -1117,7 +1117,8 @@ DrawioFileSync.prototype.getIdParameters = function()
 {
 	var result = 'id=' + this.channelId;
 	
-	if (this.pusher != null && this.pusher.connection != null)
+	if (this.pusher != null && this.pusher.connection != null &&
+		this.pusher.connection.socket_id != null)
 	{
 		result += '&sid=' + this.pusher.connection.socket_id;
 	}

+ 61 - 40
src/main/webapp/js/diagramly/DriveClient.js

@@ -2427,13 +2427,16 @@ DriveClient.prototype.convertRealtimeFiles = function()
 	{
 		this.checkToken(mxUtils.bind(this, function()
 		{
+			var day = new Date().getDay();
+			var isWeekend = (day === 6) || (day === 0);
 			var q = 'mimeType=\'application/vnd.jgraph.mxfile.realtime\'';
-			var convertDelay = 15000;
+			var convertDelay = (isWeekend) ? 2000 : 15000;
 			var convertedIds = {};
 			var converted = 0;
 			var fromJson = 0;
 			var fromXml = 0;
 			var loadFail = 0;
+			var invalid = 0;
 			var saveFail = 0;
 			var failed = 0;
 			var total = 0;
@@ -2463,7 +2466,8 @@ DriveClient.prototype.convertRealtimeFiles = function()
 						'\nUser=' + ((this.user != null) ? this.user.id : 'unknown') +
 						'\nFound=' + total  + ' (Backup: ' + fromXml + ', Realtime: ' + fromJson + ')' +
 						'\nConverted=' + converted +
-						'\nFailed=' + failed  + ' (Load: ' + loadFail + ', Save: ' + saveFail + ')');
+						'\nFailed=' + failed  + ' (Load: ' + loadFail + ', Save: ' +
+							saveFail + ', Invalid: ' + invalid + ')');
 				}
 				catch (e)
 				{
@@ -2471,6 +2475,12 @@ DriveClient.prototype.convertRealtimeFiles = function()
 				}
 			});
 			
+			var getMessage = function(err)
+			{
+				return (err == null) ? '' : ((err.message != null) ? err.message : ((err.error != null &&
+					err.error.message != null) ? err.error.message : ''));
+			};
+			
 			var totals = {'maxResults': 10000, 'q': q, 'includeTeamDriveItems': true, 'supportsTeamDrives': true};
 			
 			this.executeRequest(gapi.client.drive.files.list(totals), mxUtils.bind(this, function(res)
@@ -2480,7 +2490,8 @@ DriveClient.prototype.convertRealtimeFiles = function()
 				
 				if (this.ui.spinner.spin(document.body, 'Converting ' + total + ' file(s)'))
 				{
-					print('Found ' + total + ' file(s). This will take up to ' + Math.ceil((total * convertDelay) / 60000) + ' minute(s). <b>Please do not close this window!</b><br>');
+					print('Found ' + total + ' file(s). This will take up to ' + Math.ceil((total * (convertDelay + 3000)) / 60000) +
+						' minute(s). <b>Please do not close this window!</b><br>');
 					var counter = 0;
 
 					// Does not show picker if there are no folders in the root
@@ -2557,50 +2568,60 @@ DriveClient.prototype.convertRealtimeFiles = function()
 												
 												if (acceptResponse)
 												{
-													if (file.convertedFrom == 'json')
+													if (file.constructor == DriveFile)
 													{
-														fromJson++;
-													}
-													else
-													{
-														fromXml++;
-													}
-													
-													acceptResponse = true;
-													
-													timeoutThread = window.setTimeout(mxUtils.bind(this, function()
-													{
-														acceptResponse = false;
-														
-														failed++;
-														saveFail++;
-														print('<img src="' + this.ui.editor.graph.warningImage.src + '" border="0" valign="absmiddle"/> Timeout');
-														doNextPage();
-													}), this.ui.timeout);
-
-													this.saveFile(file, null, mxUtils.bind(this, function()
-													{
-														window.clearTimeout(timeoutThread);
-														
-														if (acceptResponse)
+														if (file.convertedFrom == 'json')
 														{
-															converted++;
-															print('<img src="' + Editor.checkmarkImage + '" border="0" valign="middle"/>');
-															doNextPage();
+															fromJson++;
 														}
-													}), mxUtils.bind(this, function(err)
-													{
-														window.clearTimeout(timeoutThread);
+														else
+														{
+															fromXml++;
+														}
+														
+														acceptResponse = true;
 														
-														if (acceptResponse)
+														timeoutThread = window.setTimeout(mxUtils.bind(this, function()
 														{
-															var msg = (err != null && err.error != null && err.error.message != null) ? err.error.message : '';
+															acceptResponse = false;
+															
 															failed++;
 															saveFail++;
-															print('<img src="' + this.ui.editor.graph.warningImage.src + '" border="0" valign="absmiddle"/> ' + msg);
+															print('<img src="' + this.ui.editor.graph.warningImage.src + '" border="0" valign="absmiddle"/> Timeout');
 															doNextPage();
-														}
-													}));
+														}), this.ui.timeout);
+	
+														this.saveFile(file, null, mxUtils.bind(this, function()
+														{
+															window.clearTimeout(timeoutThread);
+															
+															if (acceptResponse)
+															{
+																converted++;
+																print('<img src="' + Editor.checkmarkImage + '" border="0" valign="middle"/>');
+																doNextPage();
+															}
+														}), mxUtils.bind(this, function(err)
+														{
+															window.clearTimeout(timeoutThread);
+															
+															if (acceptResponse)
+															{
+																var msg = getMessage(err);
+																failed++;
+																saveFail++;
+																print('<img src="' + this.ui.editor.graph.warningImage.src + '" border="0" valign="absmiddle"/> ' + msg);
+																doNextPage();
+															}
+														}));
+													}
+													else
+													{
+														failed++;
+														invalid++;
+														print('<img src="' + this.ui.editor.graph.warningImage.src + '" border="0" valign="absmiddle"/> Invalid file');
+														doNextPage();
+													}
 												}
 											}), mxUtils.bind(this, function(err)
 											{
@@ -2608,7 +2629,7 @@ DriveClient.prototype.convertRealtimeFiles = function()
 												
 												if (acceptResponse)
 												{
-													var msg = (err != null && err.error != null && err.error.message != null) ? err.error.message : '';
+													var msg = getMessage(err);
 													failed++;
 													loadFail++;
 													print('<img src="' + this.ui.editor.graph.warningImage.src + '" border="0" valign="absmiddle"/> ' + msg);

Fichier diff supprimé car celui-ci est trop grand
+ 6 - 6
src/main/webapp/js/viewer.min.js