Browse Source

17.3.0 release

David Benson 3 years ago
parent
commit
e91e491561

+ 11 - 1
ChangeLog

@@ -1,8 +1,18 @@
+30-MAR-2022: 17.3.0
+
+- [conf cloud] Enables RT on all domains
+- [jira cloud] Fixes conf auth when multiple sites are allowed
+- Adds enableHtmlEditOption in EditorUi [DID-4610]
+
+30-MAR-2022: 17.2.6
+
+- [jira cloud] Adds Configuration page with re-indexing functionality
+
 29-MAR-2022: 17.2.5
 
 - Adds lazy parsing of file data for shadow pages
 - Adds selection option in print dialog for one page
-- Changes token generation to use SecureRandom.
+- Changes token generation to use SecureRandom
 - [conf cloud] Increases timeout after successful write to next write
 
 25-MAR-2022: 17.2.4

+ 1 - 1
VERSION

@@ -1 +1 @@
-17.2.5
+17.3.0

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


+ 20 - 6
src/main/webapp/js/diagramly/DrawioFile.js

@@ -549,14 +549,18 @@ DrawioFile.prototype.checksumError = function(error, patches, details, etag, fun
 			EditorUi.logError('Checksum Error in ' + functionName + ' ' + this.getId(),
 				null, this.getMode() + '.' + this.getId(),
 				'user_' + uid + ((this.sync != null) ?
-				'-client_' + this.sync.clientId : '-nosync'));
+				'-client_' + this.sync.clientId : '-nosync') +
+				'-bytes_' + JSON.stringify(patches).length +
+				'-patches_' + patches.length);
 			
 			// Logs checksum error for file
 			try
 			{
 				EditorUi.logEvent({category: 'CHECKSUM-ERROR-SYNC-FILE-' + this.getHash(),
 					action: functionName, label: 'user_' + uid + ((this.sync != null) ?
-					'-client_' + this.sync.clientId : '-nosync')});
+					'-client_' + this.sync.clientId : '-nosync') +
+					'-bytes_' + JSON.stringify(patches).length +
+					'-patches_' + patches.length});
 			}
 			catch (e)
 			{
@@ -836,6 +840,11 @@ DrawioFile.prototype.save = function(revision, success, error, unloading, overwr
 {
 	try
 	{
+		EditorUi.debug('DrawioFile.save', [this], 'revision', revision,
+			'unloading', unloading, 'overwrite', overwrite, 'manual', manual,
+			'saving', this.savingFile, 'editable', this.isEditable(),
+			'invalidChecksum', this.invalidChecksum);
+
 		if (!this.isEditable())
 		{
 			if (error != null)
@@ -1925,6 +1934,9 @@ DrawioFile.prototype.handleFileSuccess = function(saved)
 	
 	if (this.ui.getCurrentFile() == this)
 	{
+		EditorUi.debug('DrawioFile.handleFileSuccess', [this],
+			'saved', saved, 'modified', this.isModified());
+
 		if (this.isModified())
 		{
 			this.fileChanged();
@@ -2292,8 +2304,9 @@ DrawioFile.prototype.autosave = function(delay, maxDelay, success, error)
 		}
 
 		EditorUi.debug('DrawioFile.autosave', [this],
-			'thread', thread, 'modified', this.isModified(),
-			'autosaveNow', this.isAutosaveNow());
+			'thread', thread, 'saving', this.savingFile,
+			'modified', this.isModified(),
+			'now', this.isAutosaveNow());
 		
 		// Workaround for duplicate save if UI is blocking
 		// after save while pending autosave triggers
@@ -2336,8 +2349,9 @@ DrawioFile.prototype.autosave = function(delay, maxDelay, success, error)
 		}
 	}), tmp);
 
-	EditorUi.debug('DrawioFile.autosave',
-		[this], 'thread', thread);
+	EditorUi.debug('DrawioFile.autosave', [this],
+		'thread', thread, 'delay', tmp,
+		'saving', this.savingFile);
 
 	this.autosaveThread = thread;
 };

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

@@ -100,6 +100,11 @@
 	 */
 	EditorUi.scratchpadHelpLink = 'https://www.diagrams.net/doc/faq/scratchpad';
 
+	/**
+	 * Specifies if the edit option should be shown in the HTML export dialog.
+	 */
+	EditorUi.enableHtmlEditOption = true;
+ 
 	/**
 	 * Default Mermaid config without using foreign objects in flowcharts.
 	 */
@@ -264,10 +269,7 @@
 				
 				for (var i = 0; i < arguments.length; i++)
 			    {
-					if (arguments[i] != null)
-					{
-						args.push(arguments[i]);
-					}
+					args.push(arguments[i]);
 			    }
 			    
 				console.log.apply(console, args);
@@ -5765,10 +5767,18 @@
 		var layers = this.addCheckbox(div, mxResources.get('layers'), true);
 		var tags = this.addCheckbox(div, mxResources.get('tags'), true);
 		var lightbox = this.addCheckbox(div, mxResources.get('lightbox'), true);
-		
-		var editSection = this.addEditButton(div, lightbox);
+
+		// Writes to dummy div if disabled
+		var c = (EditorUi.enableHtmlEditOption) ? div : div.cloneNode();
+		var editSection = this.addEditButton(c, lightbox);
 		var edit = editSection.getEditInput();
 		edit.style.marginBottom = '16px';
+		var h = 430;
+
+		if (!EditorUi.enableHtmlEditOption)
+		{
+			h -= 50;
+		}
 		
 		mxEvent.addListener(lightbox, 'change', function()
 		{
@@ -5795,7 +5805,7 @@
 		{
 			fn((publicUrlRadio.checked) ? publicUrl : null, zoom.checked, zoomInput.value, linkSection.getTarget(),
 				linkSection.getColor(), fit.checked, allPages.checked, layers.checked, tags.checked,
-				lightbox.checked, editSection.getLink());
+				lightbox.checked, (EditorUi.enableHtmlEditOption) ? editSection.getLink() : null);
 		}), null, btnLabel, helpLink);
 		this.showDialog(dlg.container, 340, 430, true, true);
 		copyRadio.focus();

File diff suppressed because it is too large
+ 199 - 198
src/main/webapp/js/integrate.min.js


File diff suppressed because it is too large
+ 208 - 207
src/main/webapp/js/viewer-static.min.js


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


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


+ 11 - 29
src/main/webapp/plugins/cConf-1-4-8.js

@@ -1302,7 +1302,7 @@ Draw.loadPlugin(function(ui)
 	 * Workaround for changing etag after save is higher autosave delay to allow
 	 * for preflight etag update and decrease possible conflicts on file save.
 	 */
-	EmbedFile.prototype.autosaveDelay = 500;
+	EmbedFile.prototype.autosaveDelay = 3500;
 
 	/**
 	 * Delay for last save in ms.
@@ -1357,7 +1357,7 @@ Draw.loadPlugin(function(ui)
 
 	EmbedFile.prototype.isRealtimeSupported = function()
 	{
-		return (xdm_e == 'https://drawio-rt.atlassian.net') || (xdm_e == 'https://team-drawio.atlassian.net');
+		return true;
 	};
 	
 	/**
@@ -1390,6 +1390,8 @@ Draw.loadPlugin(function(ui)
 	 */
 	EmbedFile.prototype.saveFile = function(title, revision, success, error, unloading, overwrite)
 	{
+		EditorUi.debug('EmbedFile.saveFile', [this], 'savingFile', this.savingFile);
+
 		try
 		{
 			if (!this.isEditable())
@@ -1495,18 +1497,23 @@ Draw.loadPlugin(function(ui)
 										
 										if (this.sync != null)
 										{
-											this.sync.maxCatchupRetries = 6;
+											this.sync.maxCatchupRetries = 12;
 											this.savingFile = true;
 											
 											this.sync.fileConflict(desc, mxUtils.bind(this, function()
 											{
 												// Adds random cool-off
+												var delay = 300 + Math.random() * 300;
+
 												window.setTimeout(mxUtils.bind(this, function()
 												{
 													this.updateFileData();
 													this.setShadowModified(false);
 													doSave(realOverwrite, true);
-												}), 100 + Math.random() * 500 + (err.isLocked? 500 : 0));
+												}), delay);
+
+												EditorUi.debug('EmbedFile.saveFile.conflict',
+													[this], 'err', err, 'delay', delay);
 											}), mxUtils.bind(this, function()
 											{
 												this.savingFile = false;
@@ -1560,10 +1567,6 @@ Draw.loadPlugin(function(ui)
 					doSave(overwrite, revision);				
 				}));
 			}
-			else
-			{
-				this.missedSave = true;
-			}
 		}
 		catch (e)
 		{
@@ -1578,27 +1581,6 @@ Draw.loadPlugin(function(ui)
 		}
 	};
 
-	EmbedFile.prototype.fileChanged = function()
-	{
-		var me = this, args = arguments;
-
-		function doFileChanged()
-		{
-			DrawioFile.prototype.fileChanged.apply(me, args);
-		}
-
-		if (this.missedSave)
-		{
-			 //Do a random delay to give others a chance to acquire the lock
-			window.setTimeout(doFileChanged, 1500 + Math.random() * 500);
-			this.missedSave = false;
-		}
-		else
-		{
-			doFileChanged()
-		}
-	};
-
 	/**
 	 * 
 	 */

File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/service-worker.js


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/service-worker.js.map