Merge pull request #689 from rabbitmq/hide-SAC-lable

Hide SAC label if x-single-active-consumer=false
This commit is contained in:
Karl Nilsson 2019-04-11 17:31:07 +01:00 committed by GitHub
commit 3809a3c9d5
1 changed files with 10 additions and 1 deletions

View File

@ -144,7 +144,7 @@ function args_to_features(obj) {
var res = {};
for (var k in obj.arguments) {
if (k in KNOWN_ARGS) {
res[k] = fmt_escape_html(obj.arguments[k]);
res[k] = fmt_escape_feature(obj.arguments[k]);
}
else {
if (res.arguments == undefined) res.arguments = {};
@ -488,6 +488,15 @@ function fmt_strip_tags(txt) {
return ("" + txt).replace(/<(?:.|\n)*?>/gm, '');
}
function fmt_escape_feature(txt) {
// Exclude SAC which is the only boolean feature
if(txt === false) {
return undefined;
} else {
return fmt_escape_html0(txt).replace(/\n/g, '<br/>');
}
}
function fmt_escape_html(txt) {
return fmt_escape_html0(txt).replace(/\n/g, '<br/>');
}