Skip to content

Commit 180e7b1

Browse files
committed
Queues with plugins - switch to get_queue_type in Management UI
1 parent de17a77 commit 180e7b1

File tree

1 file changed

+1
-23
lines changed
  • deps/rabbitmq_management/priv/www/js

1 file changed

+1
-23
lines changed

deps/rabbitmq_management/priv/www/js/global.js

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -901,30 +901,8 @@ var oauth;
901901
/// this queue types are very well known to the server, at the very least
902902
/// this collection must be validated in terms of matching server queue
903903
/// types registry. I hope I will have time for this.
904-
905-
/// this one defaults to classic, How can a queue be without type?
906904
var QUEUE_TYPE = function (queue) {
907-
if (queue["arguments"]) {
908-
if (queue["arguments"]["x-queue-type"]) {
909-
return QUEUE_TYPE[queue["arguments"]["x-queue-type"]];
910-
} else {
911-
/// I observed that streams do not have
912-
/// (at least always) x-queue-type
913-
/// but all queues seems to be having
914-
/// type field.
915-
/// curiosuly is_[type] functions in main.js
916-
/// rely on x-queue-type. is_stream might be
917-
/// broken here.
918-
if (queue.hasOwnProperty("type")) {
919-
return QUEUE_TYPE[queue.type];
920-
}
921-
else {
922-
return QUEUE_TYPE["classic"];
923-
}
924-
}
925-
} else {
926-
return QUEUE_TYPE["classic"];
927-
}
905+
return QUEUE_TYPE[get_queue_type(queue)];
928906
}
929907
// TODO: while this allows for custom queues
930908
// the proper way is to follow single source of truth

0 commit comments

Comments
 (0)