"use strict";(self.webpackChunkgrafana_lokiexplore_app=self.webpackChunkgrafana_lokiexplore_app||[]).push([[546],{78546:(e,_,l)=>{l.r(_),l.d(_,{default:()=>u});var a=l(85959),o=l.n(a),t=l(87781),n=l(18531),r=l(82007),s=l(34509),d=l(47389),i=l(66854);const c={[t.AbstractLabelOperator.Equal]:i.KQ.Equal,[t.AbstractLabelOperator.NotEqual]:i.KQ.NotEqual,[t.AbstractLabelOperator.EqualRegEx]:i.KQ.RegexEqual,[t.AbstractLabelOperator.NotEqualRegEx]:i.KQ.RegexNotEqual};function u({datasourceUid:e,from:_,renderButton:l,returnToPreviousSource:i,streamSelectors:u,to:g}){const m=(0,n.useReturnToPrevious)(),h=(0,a.useMemo)(()=>{const l=u[0];if(!l||(null==l?void 0:l.operator)!==t.AbstractLabelOperator.Equal)return null;const a=(0,d.uu)(l.value);let o=new URLSearchParams;return e&&(o=(0,d.xh)(d.I8.DatasourceId,e,o)),_&&(o=(0,d.xh)(d.I8.TimeRangeFrom,_,o)),g&&(o=(0,d.xh)(d.I8.TimeRangeTo,g,o)),u.forEach(e=>{o=(0,d.zH)(d.I8.Labels,`${e.name}|${c[e.operator]}|${(0,d.XH)((0,d.vh)(e.value))},${(0,d.XH)((0,d.rx)(e.value))}`,o)}),(0,d.Rk)(`/explore/${l.name}/${a}/logs`,o)},[e,_,g,u]);return h?l?l({href:h}):o().createElement(r.LinkButton,{variant:"secondary",href:h,onClick:()=>{(0,s.EE)(s.NO.service_details,s.ir.service_details.link_button_click),m(i||"previous")}},"Open in Logs Drilldown"):null}},34509:(e,_,l)=>{l.d(_,{EE:()=>t,NO:()=>n,ir:()=>r});var a=l(18531),o=l(62533);const t=(e,_,l,t=!1)=>{const n=((e,_)=>`${o.id.replace(/-/g,"_")}_${e}_${_}`)(e,_);if(t){if(sessionStorage.getItem(n))return;sessionStorage.setItem(n,"1")}(0,a.reportInteraction)(n,l)},n={all:"all",service_details:"service_details",service_selection:"service_selection",default_columns_config:"default_columns_config"},r={[n.service_selection]:{add_to_filters:"add_to_filters",aggregated_metrics_toggled:"aggregated_metrics_toggled",search_services_changed:"search_services_changed",service_selected:"service_selected",add_new_tab:"add_new_tab"},[n.service_details]:{action_view_changed:"action_view_changed",add_to_filters_in_breakdown_clicked:"add_to_filters_in_breakdown_clicked",add_to_filters_in_json_panel:"add_to_filters_in_json_panel",change_line_format_in_json_panel:"change_line_format_in_json_panel",change_viz_type:"change_viz_type",change_query_type:"change_query_type",label_in_panel_summary_clicked:"label_in_panel_summary_clicked",layout_type_changed:"layout_type_changed",level_in_logs_volume_clicked:"level_in_logs_volume_clicked",logs_clear_displayed_fields:"logs_clear_displayed_fields",logs_show_backend_fields:"logs_show_backend_fields",logs_on_query_complete:"logs_on_query_complete",logs_on_query_error:"logs_on_query_error",logs_detail_filter_applied:"logs_detail_filter_applied",logs_popover_line_filter:"logs_popover_line_filter",logs_toggle_displayed_field:"logs_toggle_displayed_field",logs_visualization_toggle:"logs_visualization_toggle",open_in_explore_clicked:"open_in_explore_clicked",pattern_field_clicked:"pattern_field_clicked",pattern_removed:"pattern_removed",pattern_selected:"pattern_selected",search_string_in_logs_changed:"search_string_in_logs_changed",search_string_in_variables_changed:"search_string_in_variables_changed",select_field_in_breakdown_clicked:"select_field_in_breakdown_clicked",toggle_error_panels:"toggle_error_panels",value_breakdown_sort_change:"value_breakdown_sort_change",wasm_not_supported:"wasm_not_supported",embedded_go_to_explore_clicked:"embedded_go_to_explore_clicked",visualization_init:"visualization_init",fields_panel_type_toggle:"fields_panel_type_toggle",table_columns_header_button_reset_width:"table_columns_header_button_reset_width",table_columns_header_button_show_labels:"table_columns_header_button_show_labels",table_columns_header_button_show_text:"table_columns_header_button_show_text",table_columns_header_menu_show:"table_columns_header_menu_show",table_columns_header_menu_reset_width:"table_columns_header_menu_reset_width",table_columns_header_menu_show_labels:"table_columns_header_menu_show_labels",table_columns_header_menu_show_text:"table_columns_header_menu_show_text",table_columns_header_menu_slide_left:"table_columns_header_menu_slide_left",table_columns_header_menu_slide_right:"table_columns_header_menu_slide_right",table_columns_header_menu_hide_column:"table_columns_header_menu_hide_column",embedded_init:"embedded_init",embedded_error:"embedded_error",link_button_click:"link_button_click"},[n.all]:{interval_too_long:"interval_too_long",open_in_explore_menu_clicked:"open_in_explore_menu_clicked"},[n.default_columns_config]:{add_record:"add_record",add_column:"add_column",add_label:"add_label",remove_label:"remove_label",remove_column:"remove_column",delete_record:"delete_record",undo:"undo",save:"save"}}}}]);
//# sourceMappingURL=546.js.map?_cache=d364f53b986c3e3cdc48