8000 [BTS-413] (#17923) · cloudhub-js/arangodb@72814ae · GitHub
[go: up one dir, main page]

Skip to content

Commit 72814ae

Browse files
cpjuliajsteemannKVS85
authored
[BTS-413] (arangodb#17923)
Co-authored-by: Jan <jsteemann@users.noreply.github.com> Co-authored-by: Vadim Kondratyev <vadim@arangodb.com>
1 parent 865bd5e commit 72814ae

17 files changed

+161
-62
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
devel
22
-----
33

4+
* BTS-413: Added more explanatory messages for when the user cannot see the
5+
statistics for a node in the UI when in cluster mode.
6+
47
* Updated arangosync to v2.14.0-preview-6.
58

69
* Updated ArangoDB Starter to 0.15.6-preview-2.

js/apps/system/_admin/aardvark/APP/frontend/js/views/dashboardView.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,18 +1157,22 @@
11571157
template: templateEngine.createTemplate('dashboardView.ejs'),
11581158

11591159
checkEnabledStatistics: function () {
1160-
if (!frontendConfig.statisticsEnabled || frontendConfig.db !== '_system') {
1160+
if (frontendConfig.statisticsEnabled && frontendConfig.db !== '_system') {
11611161
$(this.el).html('');
11621162
if (this.server) {
11631163
$(this.el).append(
1164-
'<div style="color: red">Server statistics (' + this.server + ') are disabled.</div>'
1164+
'<div style="color: red">Server statistics for node (' + this.server + ') are disabled in this database. Log into "_system" database to show statistics.</div>'
11651165
);
11661166
} else {
11671167
$(this.el).append(
1168-
'<div style="color: red">Server statistics are disabled.</div>'
1168+
'<div style="color: red">Server statistics are disabled in this database. Log into "_system" database to show statistics.</div>'
11691169
);
11701170
}
1171-
return false;
1171+
} else if (!frontendConfig.statisticsEnabled) {
1172+
$(this.el).html('');
1173+
$(this.el).append(
1174+
'<div style="color: red">Server statistics are currently disabled. They can be enabled with startup option "--server.statistics".</div>'
1175+
);
11721176
} else {
11731177
return true;
11741178
}

js/apps/system/_admin/aardvark/APP/react/build/asset-manifest.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
F438 11
{
22
"main.css": "static/css/main.ddca1ccc.chunk.css",
3-
"main.js": "static/js/main.0dd5f4df.chunk.js",
4-
"main.js.map": "static/js/main.0dd5f4df.chunk.js.map",
3+
"main.js": "static/js/main.7ea01d37.chunk.js",
4+
"main.js.map": "static/js/main.7ea01d37.chunk.js.map",
55
"runtime~main.js": "static/js/runtime~main.b7f3a89c.js",
66
"runtime~main.js.map": "static/js/runtime~main.b7f3a89c.js.map",
77
"static/css/2.58177bfd.chunk.css": "static/css/2.58177bfd.chunk.css",
88
"static/js/2.8eda229f.chunk.js": "static/js/2.8eda229f.chunk.js",
99
"static/js/2.8eda229f.chunk.js.map": "static/js/2.8eda229f.chunk.js.map",
1010
"index.html": "index.html",
1111
"index.html.gz": "index.html.gz",
12-
"precache-manifest.0650c2c921a9123f462a9c97d8c9e76e.js": "precache-manifest.0650c2c921a9123f462a9c97d8c9e76e.js",
13-
"precache-manifest.0650c2c921a9123f462a9c97d8c9e76e.js.gz": "precache-manifest.0650c2c921a9123f462a9c97d8c9e76e.js.gz",
12+
"precache-manifest.e7ee12c313a75dbc14cd652b57251c29.js": "precache-manifest.e7ee12c313a75dbc14cd652b57251c29.js",
13+
"precache-manifest.e7ee12c313a75dbc14cd652b57251c29.js.gz": "precache-manifest.e7ee12c313a75dbc14cd652b57251c29.js.gz",
1414
"service-worker.js": "service-worker.js",
1515
"service-worker.js.gz": "service-worker.js.gz",
1616
"static/css/2.58177bfd.chunk.css.gz": "static/css/2.58177bfd.chunk.css.gz",
@@ -23,10 +23,10 @@
2323
"static/js/2.8eda229f.chunk.js.LICENSE.txt.gz": "static/js/2.8eda229f.chunk.js.LICENSE.txt.gz",
2424
"static/js/2.8eda229f.chunk.js.gz": "static/js/2.8eda229f.chunk.js.gz",
2525
"static/js/2.8eda229f.chunk.js.map.gz": "static/js/2.8eda229f.chunk.js.map.gz",
26-
"static/js/main.0dd5f4df.chunk.js.LICENSE.txt": "static/js/main.0dd5f4df.chunk.js.LICENSE.txt",
27-
"static/js/main.0dd5f4df.chunk.js.LICENSE.txt.gz": "static/js/main.0dd5f4df.chunk.js.LICENSE.txt.gz",
28-
"static/js/main.0dd5f4df.chunk.js.gz": "static/js/main.0dd5f4df.chunk.js.gz",
29-
"static/js/main.0dd5f4df.chunk.js.map.gz": "static/js/main.0dd5f4df.chunk.js.map.gz",
26+
"static/js/main.7ea01d37.chunk.js.LICENSE.txt": "static/js/main.7ea01d37.chunk.js.LICENSE.txt",
27+
"static/js/main.7ea01d37.chunk.js.LICENSE.txt.gz": "static/js/main.7ea01d37.chunk.js.LICENSE.txt.gz",
28+
"static/js/main.7ea01d37.chunk.js.gz": "static/js/main.7ea01d37.chunk.js.gz",
29+
"static/js/main.7ea01d37.chunk.js.map.gz": "static/js/main.7ea01d37.chunk.js.map.gz",
3030
"static/js/runtime~main.b7f3a89c.js.gz": "static/js/runtime~main.b7f3a89c.js.gz",
3131
"static/js/runtime~main.b7f3a89c.js.map.gz": "static/js/runtime~main.b7f3a89c.js.map.gz",
3232
"static/media/style.scss": "static/media/fontawesome-webfont.e6cf7c6e.woff2",

js/apps/system/_admin/aardvark/APP/react/build/assets/src/mode-aql.js

Lines changed: 108 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
8888
var AqlHighlightRules = function() {
8989

9090
var keywords = (
91-
"for|return|filter|search|sort|limit|let|collect|asc|desc|in|into|insert|update|remove|replace|upsert|options|with|and|or|not|distinct|graph|shortest_path|outbound|inbound|any|all|none|at least|aggregate|like|k_shortest_paths|k_paths|all_shortest_paths|prune|window"
91+
"for|return|filter|sort|limit|let|collect|asc|desc|in|into|insert|update|remove|replace|upsert|with|and|or|not|distinct|graph|shortest_path|outbound|inbound|any|all|none|aggregate|like|k_shortest_paths|k_paths|all_shortest_paths|window"
92+
);
93+
94+
var pseudoKeywords = (
95+
"search|keep|to|prune|options"
9296
);
9397

9498
var builtinFunctions = (
@@ -106,7 +110,7 @@ var AqlHighlightRules = function() {
106110
"fail|passthru|v8|sleep|schema_get|schema_validate|shard_id|call_greenspun|version|noopt|noeval|not_null|" +
107111
"first_list|first_document|parse_identifier|current_user|current_database|collection_count|pregel_result|" +
108112
"collections|document|decode_rev|range|union|union_distinct|minus|intersection|flatten|is_same_collection|check_document|" +
109-
"ltrim|rtrim|find_first|find_last|split|substitute|ipv4_to_number|ipv4_from_number|is_ipv4|md5|sha1|sha512|crc32|fnv64|hash|random_token|to_base64|" +
113+
"ltrim|rtrim|find_first|find_last|split|substitute|ipv4_to_number|ipv4_from_number|is_ipv4|md5|sha1|sha256|sha512|crc32|fnv64|hash|random_token|to_base64|" +
110114
"to_hex|encode_uri_component|soundex|assert|warn|is_key|sorted|sorted_unique|count_distinct|count_unique|" +
111115
"levenshtein_distance|levenshtein_match|regex_matches|regex_split|ngram_match|ngram_similarity|ngram_positional_similarity|uuid|" +
112116
"tokens|exists|starts_with|phrase|min_match|bm25|tfidf|boost|analyzer|" +
@@ -115,9 +119,12 @@ var AqlHighlightRules = function() {
115119
"geo_equals|geo_distance|geo_area|geo_in_range"
116120
);
117121

122+
var aqlBindVariablePattern = "@(?:_+[a-zA-Z0-9]+[a-zA-Z0-9_]*|[a-zA-Z0-9][a-zA-Z0-9_]*)";
123+
118124
var keywordMapper = this.createKeywordMapper({
119125
"support.function": builtinFunctions,
120126
"keyword": keywords,
127+
"keyword.other": pseudoKeywords,
121128
"constant.language": "null",
122129
"constant.language.boolean": "true|false"
123130
}, "identifier", true);
@@ -132,44 +139,129 @@ var AqlHighlightRules = function() {
132139
next : "comment_ml"
133140
}, {
134141
token : "string", // " string
135-
regex : '".*?"'
142+
regex : '"',
143+
next: "string_double"
136144
}, {
137145
token : "string", // ' string
138-
regex : "'.*?'"
146+
regex : "'",
147+
next: "string_single"
148+
}, {
149+
token : "variable.other", // ` quoted identifier
150+
regex : "`",
151+
next: "identifier_backtick"
139152
}, {
140-
token : "string", // ` string
141-
regex : "`.*?`"
153+
token : "variable.other", // ´ quoted identifier
154+
regex : "´",
155+
next: "identifier_forwardtick"
142156
}, {
143157
token : "constant.numeric", // binary integer
144-
regex : "0[bB][01]+\\b"
158+
regex : /0[bB][01]+\b/
145159
}, {
146160
token : "constant.numeric", // hexadecimal integer
147-
regex : "0[xX][0-9a-fA-F]+\\b"
161+
regex : /0[xX][0-9a-fA-F]+\b/
148162
}, {
149163
token : "constant.numeric", // float
150-
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
164+
regex : /(?:(?:0|[1-9][0-9]*)(?:\.[0-9]+)?|\.[0-9]+)(?:[eE][\-\+]?[0-9]+)?/
151165
}, {
152-
token : keywordMapper,
153-
regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b"
166+
token : "constant.numeric", // decimal integer
167+
regex : /0|[1-9][0-9]*\b/
168+
}, {
169+
token : "variable.global",
170+
regex : "@" + aqlBindVariablePattern
171+
}, {
172+
token : "variable",
173+
regex : aqlBindVariablePattern
154174
}, {
155175
token : "keyword.operator",
156-
regex : "\\+|\\-|\\/|\\/\\/|%|@>|<@|&&|\\|\\||!|<|>|<=|=>|==|!=|=|\\[\\*\\]"
176+
regex : /=~|!~|==|!=|>=|>|<=|<|=|!|&&|\|\||\+|\-|\*|\/|%|\?|::|:|\.\./
157177
}, {
158178
token : "paren.lparen",
159-
regex : "[\\(\\{]"
179+
regex : /[\(\{\[]/
160180
}, {
161181
token : "paren.rparen",
162-
regex : "[\\)\\}]"
182+
regex : /[\)\}\]]/
183+
}, {
184+
token : "punctuation",
185+
regex : /[\.,]/
186+
}, {
187+
// COLLECT ... WITH COUNT INTO
188+
// BUG: Need to use character classes because caseInsensitive: true
189+
// would affect all other rules, https://github.com/ajaxorg/ace/issues/4887
190+
token : "keyword",
191+
regex : /[Ww][Ii][Tt][Hh]\s+[Cc][Oo][Uu][Nn][Tt]\s+[Ii][Nn][Tt][Oo]\b/
192+
}, {
193+
// AT LEAST (...)
194+
// BUG: See above
195+
token : "keyword",
196+
regex : /[Aa][Tt]\s+[Ll][Ee][Aa][Ss][Tt]\b/
197+
}, {
198+
token : "language.variable", // case sensitive
199+
regex : /(?:CURRENT|NEW|OLD)\b/
200+
}, {
201+
token : keywordMapper,
202+
regex : /(?:\$?|_+)[a-zA-Z]+[_a-zA-Z0-9]*\b/
163203
}, {
164204
token : "text",
165-
regex : "\\s+"
205+
regex : /\s+/
166206
} ],
167207
"comment_ml" : [ {
168208
token : "comment",
169209
regex : /\*\//,
170-
next : "start",
210+
next : "start"
171211
}, {
172212
defaultToken : "comment"
213+
} ],
214+
"string_double" : [ {
215+
token : "constant.character.escape",
216+
regex : /\\u[0-9a-fA-F]{4}/
217+
}, {
218+
token : "constant.character.escape",
219+
regex : /\\["'\\\/bfnrt]/
220+
}, {
221+
token : "string",
222+
regex : '"',
223+
next : "start"
224+
}, {
225+
defaultToken : "string"
226+
} ],
227+
"string_single" : [ {
228+
token : "constant.character.escape",
229+
regex : /\\u[0-9a-fA-F]{4}/
230+
}, {
231+
token : "constant.character.escape",
232+
regex : /\\["'\\\/bfnrt]/
233+
}, {
234+
token : "string",
235+
regex : "'",
236+
next : "start"
237+
}, {
238+
defaultToken : "string"
239+
} ],
240+
"identifier_backtick" : [ {
241+
token : "constant.character.escape",
242+
regex : /\\u[0-9a-fA-F]{4}/
243+
}, {
244+
token : "constant.character.escape",
245+
regex : /\\[`"'\\\/bfnrt]/
246+
}, {
247+
token : "variable.other",
248+
regex : "`",
249+
next : "start"
250+
}, {
251+
defaultToken : "variable.other"
252+
} ],
253+
"identifier_forwardtick" : [ {
254+
token : "constant.character.escape",
255+
regex : /\\u[0-9a-fA-F]{4}/
256+
}, {
257+
token : "constant.character.escape",
258+
regex : /\\[´"'\\\/bfnrt]/
259+
}, {
260+
token : "variable.other",
261+
regex : "´",
262+
next : "start"
263+
}, {
264+
defaultToken : "variable.other"
173265
} ]
174266
};
175267
};

0 commit comments

Comments
 (0)
0