This file contains hidden or 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
| /** | |
| * Slide in a panel and slide out the old one. | |
| */ | |
| function slideInPanel(cur_el, next_el, forward){ | |
| // This is the speed of the animation. This should be a sane default. | |
| var speed = 200; | |
| //Define the CSS for the difference between the height and position | |
| var cur = { |
This file contains hidden or 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
| <!-- | |
| This Ant build script contains operations that are useful for building Splunk apps from source-code. | |
| See the following page for some more documentation: https://github.com/LukeMurphey/splunk-ant-build-script/blob/master/README.md | |
| This is licensed under the Apache License Version 2.0 | |
| See https://www.apache.org/licenses/LICENSE-2.0.html | |
| To use it with you app, do the following: |
This file contains hidden or 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
| # readable_duration | |
| # ----------------------------- | |
| # makes a human readable description of a duration | |
| # | |
| [readable_duration(2)] | |
| args = sourceField,destField | |
| definition = eval $destField$ = case( $sourceField$ > (2*86400), round(($sourceField$) / (86400)) . " days", $sourceField$ > (2*3600), round(($sourceField$) / (3600)) . " hours", $sourceField$ > (2*60), round(($sourceField$) / (60)) . " minutes", $sourceField$ > 0, $sourceField$ . " seconds" ) | |
| iseval = 0 |
This file contains hidden or 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', 'bootstrap.tab', 'splunkjs/mvc/simplexml/ready!'], | |
| function($, _, mvc){ | |
| /** | |
| * The below defines the tab handling logic. | |
| */ | |
| // The normal, auto-magical Bootstrap tab processing doesn't work for us since it requires a particular | |
| // layout of HTML that we cannot use without converting the view entirely to simpleXML. So, we are | |
| // going to handle it ourselves. |
This file contains hidden or 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
| #tabs{ | |
| border-bottom: 0px; | |
| } | |
| #tabs > .dashboard-cell > .dashboard-panel{ | |
| margin-bottom: 0px; | |
| border-bottom: 0px; | |
| } | |
| #element1 > .html{ |
This file contains hidden or 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
| import splunk | |
| import json | |
| def updateNotableEvents(sessionKey, comment, status=None, urgency=None, owner=None, eventIDs=None, searchID=None): | |
| """ | |
| Update some notable events. | |
| Arguments: | |
| sessionKey -- The session key to use | |
| comment -- A description of the change or some information about the notable events |
This file contains hidden or 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
| define([ | |
| "underscore", | |
| "backbone", | |
| "splunkjs/mvc", | |
| "jquery", | |
| "splunkjs/mvc/simplesplunkview", | |
| 'text!../app/CHANGEME/js/templates/CHANGEMEView.html', // CHANGE_THIS: Modify the path to use a template | |
| "css!../app/CHANGEME/css/CHANGEMEView.css" // CHANGE_THIS: Modify the path to use a stylesheet | |
| ], function( | |
| _, |
This file contains hidden or 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([ | |
| "splunkjs/mvc", | |
| "underscore", | |
| "jquery", | |
| "splunkjs/mvc/utils" | |
| ], | |
| function( | |
| mvc, | |
| _, | |
| $, |
This file contains hidden or 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
| // ==UserScript== | |
| // @name Splunk AutoLogin | |
| // @namespace http://127.0.0.1:8000/en-US/account/login* | |
| // @description Automatically logs into Splunk | |
| // @include http://127.0.0.1:8000/en-US/account/login* | |
| // @include https://127.0.0.1:8000/en-US/account/login* | |
| // @include */en-US/account/login* | |
| // ==/UserScript== | |
| function splunkLogin(){ |
This file contains hidden or 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
| import logging | |
| from logging import handlers | |
| import traceback | |
| import sys | |
| import re | |
| import os | |
| import json | |
| import socket # Used for IP Address validation | |
| from splunk.appserver.mrsparkle.lib.util import make_splunkhome_path |