Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/release/v8.3.0' into dev…
Browse files Browse the repository at this point in the history
…elop
  • Loading branch information
konovalovsergey committed Feb 6, 2025
2 parents 714d17e + 2cfc936 commit d141f43
Show file tree
Hide file tree
Showing 14 changed files with 97 additions and 106 deletions.
4 changes: 2 additions & 2 deletions 3DPARTY.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
- pg 8.11.3 ([MIT](https://raw.githubusercontent.com/brianc/node-postgres/master/LICENSE))
- redis 4.6.11 ([MIT](https://raw.githubusercontent.com/redis/node-redis/master/LICENSE))
- retry 0.12.0 ([MIT](https://raw.githubusercontent.com/tim-kos/node-retry/master/License))
- socket.io 4.7.1 ([MIT](https://raw.githubusercontent.com/socketio/socket.io/main/LICENSE))
- socket.io 4.8.1 ([MIT](https://raw.githubusercontent.com/socketio/socket.io/main/LICENSE))
- underscore 1.13.1 ([MIT](https://raw.githubusercontent.com/jashkenas/underscore/master/LICENSE))
- utf7 1.0.2 ([BSD](https://www.npmjs.com/package/utf7))
- windows-locale 1.0.1 ([MIT](https://raw.githubusercontent.com/TiagoDanin/Windows-Locale/master/LICENSE))
- xmlbuilder2 3.0.2 ([MIT](https://raw.githubusercontent.com/oozcitak/xmlbuilder2/master/LICENSE))
- @expo/spawn-async 1.3.0 ([MIT](https://raw.githubusercontent.com/TritonDataCenter/node-spawn-async/master/LICENSE))
- @expo/spawn-async 1.7.2 ([MIT](https://raw.githubusercontent.com/TritonDataCenter/node-spawn-async/master/LICENSE))
- bytes 3.0.0 ([MIT](https://raw.githubusercontent.com/visionmedia/bytes.js/master/LICENSE))
- co 4.6.0 ([MIT](https://raw.githubusercontent.com/tj/co/master/LICENSE))
- config 2.0.1 ([MIT](https://github.com/node-config/node-config/blob/master/LICENSE))
Expand Down
2 changes: 1 addition & 1 deletion Common/config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
"cellEdit": ["xlsx", "xltx", "xlsm", "ods", "csv"],
"slideView": ["ppt", "ppsx", "ppsm", "pps", "potm", "pot", "fodp", "otp", "sxi", "dps", "dpt", "key"],
"slideEdit": ["pptx", "potx", "pptm", "odp"],
"diagramView": ["vsdx", "vstx", "vssx", "vsdm", "vstm", "vssm"],
"diagramView": [],
"diagramEdit": [],
"publicKey": "",
"modulus": "",
Expand Down
1 change: 1 addition & 0 deletions Common/sources/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ exports.CONVERT_ICU = -92;
exports.CONVERT_LIMITS = -93;
exports.CONVERT_TEMPORARY = -94;
exports.CONVERT_DETECT = -95;
exports.CONVERT_CELLLIMITS = -96;
exports.CONVERT_DEAD_LETTER = -99;
exports.UPLOAD = -100;
exports.UPLOAD_CONTENT_LENGTH = -101;
Expand Down
1 change: 1 addition & 0 deletions Common/sources/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ exports.mapAscServerErrorToOldError = function(error) {
var res = -1;
switch (error) {
case constants.NO_ERROR :
case constants.CONVERT_CELLLIMITS :
res = 0;
break;
case constants.TASK_QUEUE :
Expand Down
83 changes: 36 additions & 47 deletions DocService/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion DocService/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"pg": "8.11.3",
"redis": "4.6.11",
"retry": "0.12.0",
"socket.io": "4.7.1",
"socket.io": "4.8.1",
"underscore": "1.13.1",
"utf7": "1.0.2",
"windows-locale": "1.0.1",
Expand Down
6 changes: 3 additions & 3 deletions DocService/sources/DocsCoServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2581,7 +2581,7 @@ exports.install = function(server, callbackFunction) {
upsertRes = yield canvasService.commandOpenStartPromise(ctx, docId, utils.getBaseUrlByConnection(ctx, conn), data.documentCallbackUrl, format);
curIndexUser = upsertRes.insertId;
//todo update additional in commandOpenStartPromise
if ((upsertRes.isInsert || (wopiParams && 2 === curIndexUser)) && (undefined !== data.timezoneOffset || ctx.shardKey || ctx.wopiSrc)) {
if ((upsertRes.isInsert || (wopiParams && 2 === curIndexUser)) && (undefined !== data.timezoneOffset || data.headingsColor || ctx.shardKey || ctx.wopiSrc)) {
//todo insert in commandOpenStartPromise. insert here for database compatibility
if (false === canvasService.hasAdditionalCol) {
let selectRes = yield taskResult.select(ctx, docId);
Expand All @@ -2591,9 +2591,9 @@ exports.install = function(server, callbackFunction) {
let task = new taskResult.TaskResultData();
task.tenant = ctx.tenant;
task.key = docId;
if (undefined !== data.timezoneOffset) {
if (undefined !== data.timezoneOffset || data.headingsColor) {
//todo duplicate created_at because CURRENT_TIMESTAMP uses server timezone
openedAtStr = sqlBase.DocumentAdditional.prototype.setOpenedAt(Date.now(), data.timezoneOffset);
openedAtStr = sqlBase.DocumentAdditional.prototype.setOpenedAt(Date.now(), data.timezoneOffset, data.headingsColor);
task.additional = openedAtStr;
}
if (ctx.shardKey) {
Expand Down
6 changes: 3 additions & 3 deletions DocService/sources/canvasservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ function getOpenedAt(row) {
return;
}
function getOpenedAtJSONParams(row) {
let openedAt = getOpenedAt(row);
if (openedAt) {
return {'documentLayout': {'openedAt': openedAt}};
let documentLayout = row && sqlBase.DocumentAdditional.prototype.getDocumentLayout(row.additional);
if (documentLayout) {
return {'documentLayout': documentLayout};
}
return undefined;
}
Expand Down
15 changes: 13 additions & 2 deletions DocService/sources/databaseConnectors/connectorUtilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ DocumentAdditional.prototype.fromString = function(str) {
return JSON.parse(currentValue);
});
};
DocumentAdditional.prototype.setOpenedAt = function(time, timezoneOffset) {
DocumentAdditional.prototype.setOpenedAt = function(time, timezoneOffset, headingsColor) {
let additional = new DocumentAdditional();
additional.data.push({time: time, timezoneOffset: timezoneOffset});
additional.data.push({time, timezoneOffset, headingsColor});
return additional.toSQLInsert();
};
DocumentAdditional.prototype.getOpenedAt = function(str) {
Expand All @@ -182,6 +182,17 @@ DocumentAdditional.prototype.getOpenedAt = function(str) {
});
return res;
};
DocumentAdditional.prototype.getDocumentLayout = function(str) {
let res;
let val = new DocumentAdditional();
val.fromString(str);
val.data.forEach((elem) => {
if (undefined !== elem.timezoneOffset) {
res = {openedAt: elem.time - (elem.timezoneOffset * 60 * 1000), headingsColor: elem.headingsColor};
}
});
return res;
}

DocumentAdditional.prototype.setShardKey = function(shardKey) {
let additional = new DocumentAdditional();
Expand Down
8 changes: 5 additions & 3 deletions DocService/sources/wopiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ function discovery(req, res) {
const tenWopiCellEdit = ctx.getCfg('wopi.cellEdit', cfgWopiCellEdit);
const tenWopiSlideView = ctx.getCfg('wopi.slideView', cfgWopiSlideView);
const tenWopiSlideEdit = ctx.getCfg('wopi.slideEdit', cfgWopiSlideEdit);
const tenWopiDiagramView = ctx.getCfg('wopi.slideView', cfgWopiDiagramView);
const tenWopiDiagramEdit = ctx.getCfg('wopi.slideEdit', cfgWopiDiagramEdit);
const tenWopiDiagramView = ctx.getCfg('wopi.diagramView', cfgWopiDiagramView);
const tenWopiDiagramEdit = ctx.getCfg('wopi.diagramEdit', cfgWopiDiagramEdit);
const tenWopiForms = ctx.getCfg('wopi.forms', cfgWopiForms);
const tenWopiFavIconUrlWord = ctx.getCfg('wopi.favIconUrlWord', cfgWopiFavIconUrlWord);
const tenWopiFavIconUrlCell = ctx.getCfg('wopi.favIconUrlCell', cfgWopiFavIconUrlCell);
Expand All @@ -185,7 +185,9 @@ function discovery(req, res) {
];
let documentTypes = [`word`, `cell`, `slide`, `pdf`];
//todo check sdkjs-ooxml addon
if (constants.PACKAGE_TYPE_OS !== license.packageType || process.env?.NODE_ENV?.startsWith("development-")) {
let addVisio = (tenWopiDiagramView.length > 0 || tenWopiDiagramEdit.length > 0)
&& (constants.PACKAGE_TYPE_OS !== license.packageType || process.env?.NODE_ENV?.startsWith("development-"));
if (addVisio) {
names.push('Visio');
favIconUrls.push(tenWopiFavIconUrlDiagram);
exts.push({targetext: null, view: tenWopiDiagramView, edit: tenWopiDiagramEdit});
Expand Down
Loading

0 comments on commit d141f43

Please sign in to comment.