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
require([ | |
'jquery', | |
'underscore', | |
'splunkjs/mvc', | |
// The ready! requirement makes sure the code below runs after Splunk initialize all the objects on the dashboards | |
// Without it the Javascript may try to act on a Splunk object that doesn't exist yet (like trying to hide a panel before the panel is created | |
'splunkjs/mvc/simplexml/ready!' | |
], | |
function( | |
$, |
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 |
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
require([ | |
'jquery', | |
'underscore', | |
'splunkjs/mvc', | |
'splunkjs/mvc/simplexml/ready!' | |
], function( | |
$, | |
_, | |
mvc | |
) { |
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
require([ | |
'jquery', | |
'underscore', | |
'splunkjs/mvc', | |
'splunkjs/mvc/simplexml/ready!' | |
], | |
function( | |
$, | |
_, | |
mvc |
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
require([ | |
'jquery', | |
'underscore', | |
'splunkjs/mvc', | |
'splunkjs/mvc/simplexml/ready!' | |
], function( | |
$, | |
_, | |
mvc | |
) { |
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
#sticky.stick { | |
position: fixed; | |
top: 0; | |
z-index: 1000; /* Splunk modals are 1050 */ | |
margin-top: 10px; | |
} |
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
require([ | |
'jquery', | |
'underscore', | |
'splunkjs/mvc', | |
'splunkjs/mvc/simplexml/ready!' | |
], function( | |
$, | |
_, | |
mvc | |
) { |
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
// Needed for Splunk 6.1 since the "depends" attributes in <chart>, <table>, etc. doesn't hide the inputs in that panel | |
// I was told that the inputs within the panel can be hidden in Simple XML in Splunk 6.2 | |
require([ | |
'jquery', | |
'underscore', | |
'splunkjs/mvc', | |
'splunkjs/mvc/simplexml/ready!' | |
], | |
function( | |
$, |
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
require([ | |
'jquery', | |
'underscore', | |
'splunkjs/mvc', | |
'splunkjs/mvc/simplexml/ready!' | |
], function( | |
$, | |
_, | |
mvc | |
) { |
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 sure if it works with event view 100% of the time | |
function move_paginator_to_top(panel_id) { | |
var paginator = $("#" + panel_id).find("div.splunk-paginator"); | |
var results_table = $("#" + panel_id).find("div.shared-resultstable-resultstablemaster"); | |
$(results_table).css("clear", "both"); | |
$(paginator).css("clear", "both"); | |
$(results_table).before($(paginator)); | |
} |
OlderNewer