From 180e7b1c1ca649d241ead3a8e569b871d3d441e7 Mon Sep 17 00:00:00 2001 From: Iliia Khaprov Date: Tue, 25 Mar 2025 09:58:28 +0100 Subject: [PATCH] Queues with plugins - switch to get_queue_type in Management UI --- .../rabbitmq_management/priv/www/js/global.js | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/deps/rabbitmq_management/priv/www/js/global.js b/deps/rabbitmq_management/priv/www/js/global.js index 31fc8a1b5f..03e6c78bb8 100644 --- a/deps/rabbitmq_management/priv/www/js/global.js +++ b/deps/rabbitmq_management/priv/www/js/global.js @@ -901,30 +901,8 @@ var oauth; /// this queue types are very well known to the server, at the very least /// this collection must be validated in terms of matching server queue /// types registry. I hope I will have time for this. - -/// this one defaults to classic, How can a queue be without type? var QUEUE_TYPE = function (queue) { - if (queue["arguments"]) { - if (queue["arguments"]["x-queue-type"]) { - return QUEUE_TYPE[queue["arguments"]["x-queue-type"]]; - } else { - /// I observed that streams do not have - /// (at least always) x-queue-type - /// but all queues seems to be having - /// type field. - /// curiosuly is_[type] functions in main.js - /// rely on x-queue-type. is_stream might be - /// broken here. - if (queue.hasOwnProperty("type")) { - return QUEUE_TYPE[queue.type]; - } - else { - return QUEUE_TYPE["classic"]; - } - } - } else { - return QUEUE_TYPE["classic"]; - } + return QUEUE_TYPE[get_queue_type(queue)]; } // TODO: while this allows for custom queues // the proper way is to follow single source of truth