kopia lustrzana https://github.com/backface/turtlestitch
optimize cloud communication
support double the number of web slices, support avoiding encoding projects on the backend sidedev
rodzic
50959c9ea0
commit
be32d755b5
22
cloud.js
22
cloud.js
|
@ -30,7 +30,7 @@
|
|||
/*global modules, IDE_Morph, SnapSerializer, hex_sha512, alert, nop,
|
||||
localize*/
|
||||
|
||||
modules.cloud = '2015-January-12';
|
||||
modules.cloud = '2015-December-04';
|
||||
|
||||
// Global stuff
|
||||
|
||||
|
@ -65,7 +65,7 @@ Cloud.prototype.hasProtocol = function () {
|
|||
};
|
||||
|
||||
Cloud.prototype.setRoute = function (username) {
|
||||
var routes = 10,
|
||||
var routes = 20,
|
||||
userNum = 0,
|
||||
i;
|
||||
|
||||
|
@ -145,13 +145,12 @@ Cloud.prototype.getPublicProject = function (
|
|||
// where the values are url-component encoded
|
||||
// callBack is a single argument function, errorCall take two args
|
||||
var request = new XMLHttpRequest(),
|
||||
responseList,
|
||||
myself = this;
|
||||
try {
|
||||
request.open(
|
||||
"GET",
|
||||
(this.hasProtocol() ? '' : 'http://')
|
||||
+ this.url + 'Public'
|
||||
+ this.url + 'RawPublic'
|
||||
+ '?'
|
||||
+ id,
|
||||
true
|
||||
|
@ -170,12 +169,9 @@ Cloud.prototype.getPublicProject = function (
|
|||
request.responseText
|
||||
);
|
||||
} else {
|
||||
responseList = myself.parseResponse(
|
||||
request.responseText
|
||||
);
|
||||
callBack.call(
|
||||
null,
|
||||
responseList[0].SourceCode
|
||||
request.responseText
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
@ -544,9 +540,13 @@ Cloud.prototype.callService = function (
|
|||
if (serviceName === 'login') {
|
||||
myself.api = myself.parseAPI(request.responseText);
|
||||
}
|
||||
responseList = myself.parseResponse(
|
||||
request.responseText
|
||||
);
|
||||
if (serviceName === 'getRawProject') {
|
||||
responseList = request.responseText;
|
||||
} else {
|
||||
responseList = myself.parseResponse(
|
||||
request.responseText
|
||||
)
|
||||
}
|
||||
callBack.call(null, responseList, service.url);
|
||||
}
|
||||
};
|
||||
|
|
6
gui.js
6
gui.js
|
@ -71,7 +71,7 @@ BlockRemovalDialogMorph*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.gui = '2015-November-16';
|
||||
modules.gui = '2015-December-04';
|
||||
|
||||
// Declarations
|
||||
|
||||
|
@ -5272,11 +5272,11 @@ ProjectDialogMorph.prototype.rawOpenCloudProject = function (proj) {
|
|||
SnapCloud.reconnect(
|
||||
function () {
|
||||
SnapCloud.callService(
|
||||
'getProject',
|
||||
'getRawProject',
|
||||
function (response) {
|
||||
SnapCloud.disconnect();
|
||||
myself.ide.source = 'cloud';
|
||||
myself.ide.droppedText(response[0].SourceCode);
|
||||
myself.ide.droppedText(response);
|
||||
if (proj.Public === 'true') {
|
||||
location.hash = '#present:Username=' +
|
||||
encodeURIComponent(SnapCloud.username) +
|
||||
|
|
|
@ -2689,3 +2689,9 @@ end - bulk of 151116
|
|||
151120
|
||||
------
|
||||
* Lists: fixed linked lists identity loss when showing watchers
|
||||
|
||||
151204
|
||||
------
|
||||
* Cloud: doubled the number of supported backend slices
|
||||
* Cloud, GUI: support new “raw” cloud project services
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue