Last active
August 29, 2015 14:05
-
-
Save hobbes3/e6d5b740519ff4c3fef1 to your computer and use it in GitHub Desktop.
move inputs to panel pre 61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Not needed in Splunk >= 6.1 | |
// This function moves a list of input ids (jQuery format) to a panel | |
function move_inputs_to_panel(input_ids, panel_id) { | |
$(panel_id + " .panel-head").after('<div class="fieldset">'); | |
$(panel_id + " .fieldset").append($(input_ids.join(", "))); | |
$(input_ids[0]).css("margin-left", "10px"); | |
} | |
// Hide the first 2 fields | |
// These are placeholders for the following tokens: | |
// web_svc_name and host, respectively | |
// This should be the only line of code needed for Splunk 6.1 | |
$("#field1, #field2").hide(); | |
// This isn't required in Splunk 6.1; simply drag the inputs to the panel under Edit Panels | |
move_inputs_to_panel(["#field3", "#field4", "#field5", "#field6"], "#timechart_main"); | |
move_inputs_to_panel(["#field7"], "#stats_by_web_svc_name"); | |
move_inputs_to_panel(["#field8"], "#stats_by_host"); | |
move_inputs_to_panel(["#field9"], "#pareto_web_svc_name"); | |
move_inputs_to_panel(["#field10"], "#pareto_host"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment