Explorar o código

10.3.5 release

Gaudenz Alder %!s(int64=6) %!d(string=hai) anos
pai
achega
e0df356845

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+05-MAR-2019: 10.3.5
+
+- Reduces possible number 403 errors in Drive
+
 05-MAR-2019: 10.3.4
 
 - Fixes possible NPE in plugin error handler

+ 1 - 1
VERSION

@@ -1 +1 @@
-10.3.4
+10.3.5

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

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 03/05/2019 01:32 PM
+# 03/05/2019 06:52 PM
 
 app.html
 index.html?offline=1

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 412 - 413
src/main/webapp/js/app.min.js


+ 21 - 20
src/main/webapp/js/diagramly/DriveClient.js

@@ -1020,24 +1020,25 @@ DriveClient.prototype.saveFile = function(file, revision, success, error, noChec
 		    	// was possibly not saved is to check the new modified date and
 		    	// compare it to the last known modified date. If it hasn't
 		    	// changed or is before the last date something went wrong.
-		    	this.executeRequest(gapi.client.drive.files.get({'fileId': file.getId(),
-					'fields': 'modifiedDate,headRevisionId,fileSize', 'supportsTeamDrives': true}), 
-					mxUtils.bind(this, function(resp2)
-				{
-			    	file.saveDelay = new Date().getTime() - t0;
-					var delta = new Date(resp2.modifiedDate).getTime() - new Date(mod0).getTime();
-			    	
-					if (delta <= 0)
-					{
-						error({message: mxResources.get('saveNotConfirmed')});
-						
-						EditorUi.logEvent({category: 'UNCONFIRMED-SAVE-GOOGLE',
-							action: 'file-' + file.desc.id + '-old-' + head0 + '.' + size0 +
-							'-new-' + resp2.headRevisionId + '.' + resp2.fileSize + '-delta-' + delta,
-							label: (this.user != null) ? this.user.id : 'unknown-user'});
-					}
-					else
-					{
+				// NOTE: Commented out due to peak in 403 rate limit errors / 5-MAR-2019
+//		    	this.executeRequest(gapi.client.drive.files.get({'fileId': file.getId(),
+//					'fields': 'modifiedDate,headRevisionId,fileSize', 'supportsTeamDrives': true}), 
+//					mxUtils.bind(this, function(resp2)
+//				{
+//			    	var delta = new Date(resp2.modifiedDate).getTime() - new Date(mod0).getTime();
+//			    	
+//					if (delta <= 0)
+//					{
+//						error({message: mxResources.get('saveNotConfirmed')});
+//						
+//						EditorUi.logEvent({category: 'UNCONFIRMED-SAVE-GOOGLE',
+//							action: 'file-' + file.desc.id + '-old-' + head0 + '.' + size0 +
+//							'-new-' + resp2.headRevisionId + '.' + resp2.fileSize + '-delta-' + delta,
+//							label: (this.user != null) ? this.user.id : 'unknown-user'});
+//					}
+//					else
+//					{
+						file.saveDelay = new Date().getTime() - t0;
 				    	success(resp, savedData);
 
 				    	if (prevDesc != null)
@@ -1066,8 +1067,8 @@ DriveClient.prototype.saveFile = function(file, revision, success, error, noChec
 								'-to-' + file.desc.id + '.' + file.desc.headRevisionId + '-',
 								label: (this.user != null) ? this.user.id : 'unknown-user'});
 						}
-					}
-				}));
+//					}
+//				}));
 			});
 
 			var doExecuteRequest = mxUtils.bind(this, function(data, binary)

+ 7 - 2
src/main/webapp/js/diagramly/DriveFile.js

@@ -12,6 +12,11 @@ DriveFile = function(ui, data, desc)
 //Extends mxEventSource
 mxUtils.extend(DriveFile, DrawioFile);
 
+/**
+ * Slower autosave delay to avoid rate limite exceeded.
+ */
+DriveFile.prototype.autosaveDelay = 2000;
+
 /**
  * Delay for last save in ms.
  */
@@ -187,9 +192,9 @@ DriveFile.prototype.saveFile = function(title, revision, success, error, unloadi
 					}
 
 					// Adaptive autosave delay
-					this.autosaveDelay = Math.min(6000,
+					this.autosaveDelay = Math.min(8000,
 						Math.max(this.saveDelay + 500,
-						DrawioFile.prototype.autosaveDelay));
+						DriveFile.prototype.autosaveDelay));
 					this.desc = resp;
 					
 					this.fileSaved(savedData, lastDesc, mxUtils.bind(this, function()

+ 1 - 0
src/main/webapp/js/mxgraph/Format.js

@@ -377,6 +377,7 @@ Format.prototype.refresh = function()
 	if (graph.isSelectionEmpty())
 	{
 		mxUtils.write(label, mxResources.get('diagram'));
+		label.style.borderLeftWidth = '0px';
 		
 		// Adds button to hide the format panel since
 		// people don't seem to find the toolbar button