Splunk submit button (submitButton) does not refresh dashboard if no inputs are changed - splunk

I have a dashboard with a submit button (submitButton). The search isn't run until the button is pressed which is exactly what I want (the search takes a long time). I don't want the search starting as the user changes the other dropdowns (time), environment (Prod vs. QA), etc.
HOWEVER, sometimes it would be nice to hit the submit button and perform the search again without changing any of the other fields (time, environment, etc.). In this case the submit button does nothing! I can tell the underlying data has changed via searches, but the dashboard is not updated. Simply changing any of the fields, doing a search, and then changing them back and searching again solves the problem, but surely the submit button should just work w/o this workaround?
Thanks

If "nothing" has changed, then Submit is supposed to "do nothing".
If you want to refresh the page with all the parameters as set, you should be able to click the URL bar and press return (so long as there are no hidden tokens, they'll all get set in the query portion of the URL).

Each panel in the dashboard should (automatically) have a refresh button you can click to refresh the display without changing inputs.

Unfortunately, this is intended behavior.
I also wish that the submit button would rerun dashboard searches. I opened a post on Splunk ideas about this issue:
https://ideas.splunk.com/ideas/EID-I-739
If you have a splunk.com account, you can vote for this idea.

I've browsed through Internet and found some solution that with some modifications worked for me fine
<form>
..
<html>
<style>
div.fieldset.dashboard-form-globalfieldset div.dashboard-element.html.dashboard-element-html {
display: inline-block;
}
</style>
Refresh
</html>
...
<form/>
so basiclu im refreshing page with all of its attributes and passing attributes values form current ones chosen using tokens. splunk code didn't like & so replaced it with & and it worked fine. <> - can be found in your splunk page address.

Related

Make The Different Register Page Url Stable and Get Rid of Double Click Logout On Woocommerce

I am using one of the woodmart built-in themes and have 2 issues (I think they are so easy to do but couldn’t find any solution on internet which works well) one is about register page link on the sidebar login are and the logout confirmation.
When you go to our website which is http://www.fitovision.com and click on Login/Register button on the right top of the page a sidebar widget comes out. I have changed the Create An Account link to my custom page but because I did this on the integration page of woocommerce to the theme, when I get any update it goes back. So looking for a hook or function codes to add to the child theme functions page to keep it there forever even if I get any update. Could you please tell me how to do that? I have asked this to the theme editors support page but they said it belongs to woocommerce so asked me to open a ticket here.
Second one is when you login to the page we have an dropdown menu on the top on the place of Login/Register link. And there is Log Out link on the at dropdown menu. When I click it it goes to My Account page and when I click there again it logs out. I have read and applied too many ways to bypass the logout confirmation on first click but none of them worked as I realised that they were all old dated posts. So I thought after some time and your updates it should be forced by the wocoommerce to do it. But my clients definitely do not want it. Is there again anything else I can do for that to log out on the first click? And keep it there with adding to the child theme functions page?
Thank you for replies instead.
Emre GOKTEPE

Contact form 7 is not working with Safari due file-upload button

As you already know; the contact form, build with the CF7 plugin, can not be submitted when using Safari and when the contact form contains a file upload button. The problem only occurs when the user is leaving the upload field blank, so without selecting a file.
For me, the best solution for this problem is to remove the file upload button when there is no file selected. I've partly succeeded in doing this through the following Jquery script:
jQuery(document).on('submit', '.wpcf7-form', function (e) {
jQuery('input.wpcf7-file').each(function() {
if (jQuery(this).val() == '') jQuery(this).remove();
});
});
There is only one problem left… When the form is submitted with the upload field left blank, the button is being removed but the spinning arrow icon keeps spinning and nothing happens. ONLY, when the user is submitting the form for a second time, the submission will succeed.
So I want to expand the code shown above with a few lines which is automatically submitting the contact form a second time in case the file upload field is left blank. Because of this the user would not have to submit the contact form twice which can be VERY confusing…
Can someone help me out with this? I think this is also a good solution for many other users because I have read many topics from people having the same problem.
Thanks in advance & have a nice day!
Best regards
I think your problem stems from the fact that the "submit" method is firing after the form submission starts (or at least after the form fields are collected). So on a second click it re-submits the form without the empty fields.
I've implemented a version of your script but binding to the click on the submit button, rather than the submit method of the form. So far - it seems to be working.
I experimented with making it only trigger on the affected browses (using nagivator.userAgent.match()) but without much luck in the brief time I'm looking.
<script>
jQuery(document).on('click', '.wpcf7-form [type=submit]', function (e) {
jQuery('input.wpcf7-file').each(function() {
if (jQuery(this).val() == '') jQuery(this).remove();
});
});
</script>

Allow natural back button behaviour with use case of dynamically-added query parameters

I have the case that I push some parameters to the nuxt router (https://router.vuejs.org/guide/essentials/navigation.html) whenever somebody visits a page without any parameters.
Example:
somebody visits: /program it will end up in /program/first-event?year=2018&month=6
(First the view filters the program for current events (therefore the parameters for this year and this month) and then from the filtered events it will set the first event as active post (also by pushing it to the router).
This is all wanted and good. BUT now I detected the following problem:
Somebody is visiting /aboutus and then navigates to /program, the router will automatically change to /program/url-of-event-post?year=2018&month=6.
Assuming the user wants to go back to /aboutus he clicks on the browser back button. This will bring him back to: /program which automatically adds the post and the parameters again (effectively moving one step forward again).
Means the user is caught in clicking endlessly on the back button.
My approach would be to try to register if a user clicks on the back button and if so, I would not add the parameters. But I don't know how to do this.
I thought the router would provide some 'from' property, but so far I did not find anything.
I would be very happy to hear some thoughts on this. Thank you heaps in advance.
You need use router.replace.
https://router.vuejs.org/guide/essentials/navigation.html#router-replace-location-oncomplete-onabort

How to detect if user has switched Rails 3

A user logs into my application in a tab in a browser
They get an email and click a link which opens a new tab in the same browser and logs them in under a different email say.
If they go back to the first tab they are no longer the same user and I want the page to automatically detect this and then reload or redirect them if they are unauthorized to view the page.
Anyway to do this?
Or, if you really want to know when user is switched the tab, try this library:
visibility.js
As stated by #Hck:
add javascript code to reload page periodically (for example once per 30 seconds) – Hck
JavaScript is pretty much the only way to make pages do stuff after they're loaded. Note that in pretty much any user authentication system, a given browser will only be logged in as one user at a time, so as soon as the second tab opens, that browser will be acting as the second user - they can still see the current content of the first tab, but links (for instance) will no longer work unless the second user was also authorized to use them.
There are some JQuery plugins that do this sort of thing, like PeriodicalUpdater, or you can write your own (an example).

Where can I read how to make web notifiers such as the StackExchange at the top left side of StackOverflow screen?

I'm not even sure what the name of that is to be able to make a search... but I would like to make those kind of things. Facebook has that too with the messages, notifications and friends requests. Thanks
I'm not sure if you expect anyone to give you a complete tutorial with source code included? :) You should probably do some digging around yourself, since a concrete answer on this could mean to write a few pages :)
How can you dig around?
Thé tool for a job like that is Firebug (IMO).
With bigger tasks like these it makes sense to try to split it up in smaller pieces.
Let's say you go for a widget like the user profile popup on SO.
you need some HTML to display in a popup: right click on any html element on the popup and click the 'inspect element' menu item. This brings you to the HTML tab in firebug. This allows you to figure out how the HTML is structured
you need some CSS to style that popup: when you're browsing the html structure, you might already have noticed that on the right side of it is the CSS that is applied to the active element
you might want to use some animation effects: for that you could use jquery. Have a look here to find out more on which effects are available and how they can be triggered. Fading is used in the profile popup on SO.
then you might ask yourself the question where SO get's that html structure from, right? To find out more about which server calls are made you can use the 'NET' tab in Firebug. (When you hover over your user name (only the first time?), then you should notice there's a call made to something like: http://stackoverflow.com/users/profile-link-stats?_=someLongNumberHere
In firebug you can then inspect the request and response. You should notice that the response is some HTML structure. This HTML structure is then inserted into the DOM.
Sooooo you can kinda glue it all together now:
the user hovers over his user name
the hovering triggers a server call (see step 4): use jquery hover to attach a handler to the user link. (subsequent hovers don't trigger that server call, so there needs to be a check to see if that profile popup was already loaded or not)
when the server call successfully returns (see jquery get), the returned html is inserted into the DOM and a fadeIn effect is triggered.
it seems a mouseout is used to fadeOut the popup
I HOPE this is the answer you were looking for. It took me a while ;)
You probably need to check out stackapps