Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Why is an empty value from a MultiSelectInput deleting ALL the items in my KV Store?

$
0
0
Not sure if this is a bug or what, but if I push the delete button on my dashboard and there are no values selected in the MultSelectInput, all of my kv store values are wiped out. One caveat is that you HAVE to legitimately delete a single value once before this bug shows up. **Typical use would be:** select one value from the MultiSelectInput and then hit the Delete button. **Bugged process:** delete one value, erase MultiSelectInput value so that the input is empty, hit Delete button. All values are now gone. This deletes a single value in the kv store: https://mysplunk.com/en-US/splunkd/__raw/servicesNS/nobody/search/storage/collections/data/mykvstore-test/59e125611177c51dd93f148c?output_mode=json This deletes nothing (happens when I first load the page adn try to delete with a blank MultiSelectInput): https://mysplunk.com/en-US/splunkd/__raw/servicesNS/nobody/search/storage/collections/data/mykvstore-test/59e125611177c51dd93f148c?output_mode=json This deletes everything (happens after I delete one thing, then try to delete again with a blank MultiSelectInput): https://mysplunk.com/en-US/splunkd/__raw/servicesNS/nobody/search/storage/collections/data/mykvstore-test/?output_mode=json I think this is a bug. Can anyone confirm? --------------------------------------------------------------- Here is my input that selects KeyIDs to delete: var input4 = new MultiSelectInput({ "id": "input4", "choices": [], "valueField": "KeyID", "labelField": "KeyID", "value": "$form.KeyID$", "managerid": "search10", "el": $('#input4') }, {tokens: true}).render(); input4.on("change", function(newValue) { FormUtils.handleValueChange(input4); }); And here is my delete button and code: $("#deleteKeyID").click(function() { // Get the value of the key ID field var tokens = mvc.Components.get("default"); var form_keyid = tokens.get("form.KeyID"); // Delete the record that corresponds to the key ID using // the del method to send a DELETE request // to the storage/collections/data/{collection}/ endpoint service.del("storage/collections/data/mykvstore-test/" + encodeURIComponent(form_keyid)) .done(function() { // Run the search again to update the table search1.startSearch(); // Clear the form fields THIS DOESN'T WORK FOR MULTISELECTINPUTS $("#formKeyDeletion input[type=text]").val(""); }); return false; }); // Initialize time tokens to default if (!defaultTokenModel.has('earliest') && !defaultTokenModel.has('latest')) { defaultTokenModel.set({ earliest: '0', latest: '' }); } if (!_.isEmpty(urlTokenModel.toJSON())){ submitTokens(); }

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>