Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
commit
1dee2fd13c
@ -50,6 +50,7 @@ var getCacheStats = function (env, server, cb) {
|
|||||||
metaSize: metaSize,
|
metaSize: metaSize,
|
||||||
channel: channelCount,
|
channel: channelCount,
|
||||||
channelSize: channelSize,
|
channelSize: channelSize,
|
||||||
|
memoryUsage: process.memoryUsage(),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -99,7 +99,7 @@ module.exports.create = function (config, cb) {
|
|||||||
paths.staging = keyOrDefaultString('blobStagingPath', './blobstage');
|
paths.staging = keyOrDefaultString('blobStagingPath', './blobstage');
|
||||||
paths.blob = keyOrDefaultString('blobPath', './blob');
|
paths.blob = keyOrDefaultString('blobPath', './blob');
|
||||||
|
|
||||||
Env.defaultStorageLimit = typeof(config.defaultStorageLimit) === 'number' && config.defaultStorageLimit > 0?
|
Env.defaultStorageLimit = typeof(config.defaultStorageLimit) === 'number' && config.defaultStorageLimit >= 0?
|
||||||
config.defaultStorageLimit:
|
config.defaultStorageLimit:
|
||||||
Core.DEFAULT_LIMIT;
|
Core.DEFAULT_LIMIT;
|
||||||
|
|
||||||
|
|||||||
@ -23,8 +23,17 @@ define([
|
|||||||
init: function () {}
|
init: function () {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var mermaidThemeCSS = ".node rect { fill: #DDD; stroke: #AAA; } " +
|
||||||
|
"rect.task, rect.task0, rect.task2 { stroke-width: 1 !important; rx: 0 !important; } " +
|
||||||
|
"g.grid g.tick line { opacity: 0.25; }" +
|
||||||
|
"g.today line { stroke: red; stroke-width: 1; stroke-dasharray: 3; opacity: 0.5; }";
|
||||||
|
|
||||||
require(['mermaid', 'css!/code/mermaid-new.css'], function (_Mermaid) {
|
require(['mermaid', 'css!/code/mermaid-new.css'], function (_Mermaid) {
|
||||||
Mermaid = _Mermaid;
|
Mermaid = _Mermaid;
|
||||||
|
Mermaid.initialize({
|
||||||
|
gantt: { axisFormat: '%m-%d', },
|
||||||
|
"themeCSS": mermaidThemeCSS,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
var highlighter = function () {
|
var highlighter = function () {
|
||||||
@ -351,6 +360,12 @@ define([
|
|||||||
// retrieve the attached source code which it was drawn
|
// retrieve the attached source code which it was drawn
|
||||||
var src = el.getAttribute('mermaid-source');
|
var src = el.getAttribute('mermaid-source');
|
||||||
|
|
||||||
|
/* The new source might have syntax errors that will prevent rendering.
|
||||||
|
It might be preferable to keep the existing state instead of removing it
|
||||||
|
if you don't have something better to display. Ideally we should display
|
||||||
|
the cause of the syntax error so that the user knows what to correct. */
|
||||||
|
//if (!Mermaid.parse(src)) { } // TODO
|
||||||
|
|
||||||
// check if that source exists in the set of charts which are about to be rendered
|
// check if that source exists in the set of charts which are about to be rendered
|
||||||
if (mermaid_source.indexOf(src) === -1) {
|
if (mermaid_source.indexOf(src) === -1) {
|
||||||
// if it's not, then you can remove it
|
// if it's not, then you can remove it
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user