Last active
August 29, 2015 14:05
-
-
Save hobbes3/9e2fbc495b39912504d8 to your computer and use it in GitHub Desktop.
splunkjs template js
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 | |
) { | |
function submit_and_update_url() { | |
submitted_tokens.set(unsubmitted_tokens.toJSON()); | |
mvc.Components.get('url').saveOnlyWithPrefix('form\\.', unsubmitted_tokens.toJSON(), { | |
replaceState: false | |
}); | |
} | |
var unsubmitted_tokens = mvc.Components.get('default'); | |
var submitted_tokens = mvc.Components.get('submitted'); | |
// Your JS code here. | |
require(['splunkjs/ready!'], function() { | |
// Custom SimpleSplunkView (ie d3 vizs) are loaded in here. | |
// So unless you're using a custom JS viz, you probably don't need this block. | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment