Browse Source

10.0.29 release

Gaudenz Alder 6 years ago
parent
commit
bed4c31a32

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+10-JAN-2019: 10.0.29
+
+- Improved error handling for CSV import
+- Uses mxGraph 3.9.13 beta 5
+
 10-JAN-2019: 10.0.28
 
 - Uses mxGraph 3.9.13 beta 4

+ 1 - 1
VERSION

@@ -1 +1 @@
-10.0.28
+10.0.29

File diff suppressed because it is too large
+ 1 - 1
etc/mxgraph/mxClient.js


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

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 01/10/2019 12:38 PM
+# 01/10/2019 04:12 PM
 
 app.html
 index.html?offline=1

File diff suppressed because it is too large
+ 706 - 705
src/main/webapp/js/app.min.js


File diff suppressed because it is too large
+ 333 - 332
src/main/webapp/js/atlas-viewer.min.js


File diff suppressed because it is too large
+ 134 - 133
src/main/webapp/js/atlas.min.js


+ 42 - 14
src/main/webapp/js/diagramly/DrawioFile.js

@@ -387,7 +387,7 @@ DrawioFile.prototype.compressReportData = function(data, limit, max)
 /**
  * Adds the listener for automatically saving the diagram for local changes.
  */
-DrawioFile.prototype.checksumError = function(error, patches, details)
+DrawioFile.prototype.checksumError = function(error, patches, details, etag)
 {
 	this.stats.checksumErrors++;
 	this.inConflictState = true;
@@ -413,18 +413,46 @@ DrawioFile.prototype.checksumError = function(error, patches, details)
 				this.ui.anonymizePatch(patches[i]);
 			}
 		}
-
-		var data = this.compressReportData(
-			this.getAnonymizedXmlForPages(
-			this.shadowPages), 20000);
-		var json = this.compressReportData(
-			JSON.stringify(patches, null, 2));
 		
-		this.sendErrorReport(
-			'Checksum Error',
-			((details != null) ? (details) : '') +
-			'\n\nPatches:\n' + json +
-			'\n\nData:\n' + data);
+		var fn = mxUtils.bind(this, function(file)
+		{
+			var data = this.compressReportData(
+				this.getAnonymizedXmlForPages(
+				this.shadowPages), 25000);
+			var json = this.compressReportData(
+				JSON.stringify(patches, null, 2));
+			var remote = (file != null) ? this.compressReportData(
+				this.getAnonymizedXmlForPages(
+				this.ui.getPagesForNode(
+				mxUtils.parseXml(file.data).documentElement)), 25000) : 'n/a';
+			
+			this.sendErrorReport(
+				'Checksum Error',
+				((details != null) ? (details) : '') +
+				'\n\nPatches:\n' + json +
+				'\n\nLocal:\n' + data +
+				((remote != null) ? ('\nRemote:\n' + remote) : ''),
+				null, 70000);
+		});
+
+		if (etag == null)
+		{
+			fn(null);
+		}
+		else
+		{
+			this.getLatestVersion(mxUtils.bind(this, function(file)
+			{
+				if (file != null && file.getCurrentEtag() == etag)
+				{
+					fn(file);
+				}
+				else
+				{
+					fn(null);
+				}
+			}), function() {});
+		}
 	}
 	catch (e)
 	{
@@ -435,7 +463,7 @@ DrawioFile.prototype.checksumError = function(error, patches, details)
 /**
  * Adds the listener for automatically saving the diagram for local changes.
  */
-DrawioFile.prototype.sendErrorReport = function(title, details, error)
+DrawioFile.prototype.sendErrorReport = function(title, details, error, max)
 {
 	try
 	{
@@ -470,7 +498,7 @@ DrawioFile.prototype.sendErrorReport = function(title, details, error)
 			'\nSync=' + DrawioFile.SYNC +
 			'\n\nStats:\n' + JSON.stringify(this.stats, null, 2) +
 			((details != null) ? ('\n\n' + details) : '') +
-			'\n\nStack:\n' + stack);
+			'\n\nStack:\n' + stack, max);
 	}
 	catch (e)
 	{

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

@@ -897,7 +897,7 @@ DrawioFileSync.prototype.merge = function(patches, checksum, etag, success, erro
 						details.join(', ')) : '') +
 					'\nCurrent: ' + current +
 					((currentDetails != null) ? ('\nCurrent Details: ' +
-						JSON.stringify(currentDetails)) : ''));
+						JSON.stringify(currentDetails)) : ''), etag);
 				
 				// Abnormal termination
 				return;

+ 7 - 1
src/main/webapp/js/diagramly/EditorUi.js

@@ -10810,7 +10810,13 @@
 		    		{
     	    			var values = this.editor.csvToArray(lines[i]);
     	    			
-	    				if (values.length == keys.length)
+    	    			if (values == null)
+    	    			{
+    	    				var short = (lines[i].length > 40) ? lines[i].substring(0, 40) + '...' : lines[i];
+    	    				
+    	    				throw new Error(i + ' (' + short + ') ' + mxResources.get('containsValidationErrors'));
+    	    			}
+    	    			else if (values.length == keys.length)
 		    			{
 	    					var cell = null;
 	    					var id = (identityIndex != null) ? namespace + values[identityIndex] : null;

File diff suppressed because it is too large
+ 2 - 2
src/main/webapp/js/embed-static.min.js


File diff suppressed because it is too large
+ 2 - 2
src/main/webapp/js/reader.min.js


File diff suppressed because it is too large
+ 333 - 332
src/main/webapp/js/viewer.min.js