Skip to content

Commit 50775b5

Browse files
author
Daniel Herzog
committed
Fix for DFL-3332: Add contextmenu with "Clear" to Network logger
1 parent 927727f commit 50775b5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/network/network_view.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler)
176176

177177
var template = ["div", templates.network.main(
178178
ctx, entries, this._selected, detail_width, table_template
179-
), "id", "network-outer-container"];
179+
), "id", "network-outer-container",
180+
"data-menu", "network-logger-context"];
180181

181182
if (this._selected)
182183
{
@@ -683,6 +684,14 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler)
683684
this.id = id;
684685
ActionBroker.get_instance().register_handler(this);
685686

687+
var contextmenu = ContextMenu.get_instance();
688+
contextmenu.register("network-logger-context", [
689+
{
690+
label: ui_strings.S_CLEAR_NETWORK_LOG,
691+
handler: this._on_clear_log_bound
692+
}
693+
]);
694+
686695
this._type_filters = ["all"].map(this._map_filter_bound);
687696
this.init(id, name, container_class, html, default_handler);
688697
};

0 commit comments

Comments
 (0)