diff --git a/html/js/app/mappers/nodes/mediaconnect.js b/html/js/app/mappers/nodes/mediaconnect.js index 07201949..e1641908 100644 --- a/html/js/app/mappers/nodes/mediaconnect.js +++ b/html/js/app/mappers/nodes/mediaconnect.js @@ -11,7 +11,7 @@ define(["jquery", "app/server", "app/connections", "app/regions", "app/model", " return new Promise(function(resolve, reject) { server.get(url + "/cached/mediaconnect-flow/" + regionName, api_key).then(function(flows) { $.each(flows, function(index, cache_entry) { - console.log(cache_entry); + // console.log(cache_entry); map_flow(cache_entry); }); resolve(); diff --git a/html/js/app/ui/selected_item_view.js b/html/js/app/ui/selected_item_view.js index b1d7b991..2fa03031 100644 --- a/html/js/app/ui/selected_item_view.js +++ b/html/js/app/ui/selected_item_view.js @@ -209,11 +209,14 @@ define(["jquery", "app/model", "app/ui/global_view", "app/channels", "app/ui/til }; var tile_view_listener = function(name, members) { - if (tile_view.selected()) { + var selected = tile_view.selected(); + if (selected === name) { // show(); display_selected_tile(name, members); - } else { - display_no_selection(); + } else if (selected) { + channels.retrieve_channel(selected).then((members) => { + display_selected_tile(selected, members); + }); } }; diff --git a/html/js/app/ui/tile_view.js b/html/js/app/ui/tile_view.js index 587f345d..03f18202 100644 --- a/html/js/app/ui/tile_view.js +++ b/html/js/app/ui/tile_view.js @@ -41,6 +41,7 @@ define(["jquery", "app/channels", "app/model", "app/ui/util", "app/events", "app var selection_listener = function(name) { toggle_tile(name); + // select(name); }; var selected = function() { @@ -83,12 +84,12 @@ define(["jquery", "app/channels", "app/model", "app/ui/util", "app/events", "app }; var select = function(name) { + // query = `[data-channel-name][data-channel-name!='${name}']`; + var unselected_tiles = $(".selected-channel-tile"); + unselected_tiles.removeClass("selected-channel-tile"); var query = `[data-channel-name='${name}']`; var selected_tile = $(query); selected_tile.addClass("selected-channel-tile"); - query = `[data-channel-name][data-channel-name!='${name}']`; - var unselected_tiles = $(query); - unselected_tiles.removeClass("selected-channel-tile"); }; var unselect = function(name) { @@ -240,6 +241,7 @@ define(["jquery", "app/channels", "app/model", "app/ui/util", "app/events", "app var name = channel_name; var members = channel_members; return function() { + selection_listener(name, members); click_listeners.forEach(function(f) { f(name, members); }); @@ -485,7 +487,7 @@ define(["jquery", "app/channels", "app/model", "app/ui/util", "app/events", "app schedule_interval(); event_alerts.add_callback(event_alert_callback); alarms.add_callback(alarm_callback); - add_selection_callback(selection_listener); + // add_selection_callback(selection_listener); }); return {