Graphite Live Graph URL in Nagios - auto-update

I would like to embed a Graphite live graph in Nagios.
So I create it in the Graphite Composer. Click on "Auto-Refresh" and put "Select Recent Data" to e. g. 5 days.
Then I copy the short direct URL to this graph to the pasteboard and insert it as the "Action URL" in Nagios.
When I then click on the Action URL in Nagios, the whole Graphite Dashboard is displayed and no Auto-Update is made.
How could I have just the graph (and not the whole Dashboard) and have it auto-updated?

The Composer is a user interface for helping "compose" your graph. The UI itself is basically a frame containing the generated PNG image. If you right-click on the PNG image you can grab the URL for the image and embed it elsewhere, but you'll still need to manually refresh the image or write some JavaScript to refresh it automatically.

Related

Is there a certain page I should be fetching my API data from within my Chrome Extension Project?

I am making a chrome extension that fetched JSON data from CoinMarketCap.com API and currently I have it running in the background script. I'm not 100% sure what the purpose of the page is really. I was wondering if I could simply fetch the data from the popup script after I click a button within my popup?
Each button represents a different coin. I basically want to get the price of a chosen coin and display it on whatever page the user is on when they double click the coin in a text article. Eventually I want to make it so you can double click any coin and have it show a live price conversion while you're on the web-page.
The point of a background page is to be always available (running if persistent: true, woken up / recreated for registered events if persistent: false).
A popup's lifetime is determined by its visibility. The moment the user clicks away and closes it, the page is closed (as if the tab with it was closed), so it can no longer process any events and its state is lost.
As long as:
The data you need fetched is to be received/processed while the popup is open
Any state you need to persist between popups being shown can be stored in chrome.storage
Then you don't need the background page to do the fetching. Popup page has the same level of access to Chrome APIs.
However, consider this scenario: suppose you want the data to be ready as soon as popup is opened (at least, you want it to be fresher than "since last time"). You may want to do periodic updates even while the popup is closed to refresh the data. You can only do that reliably with a background page (and, say, chrome.alarms API). Then you can cache the latest available data in chrome.storage and use that in the popup.
Background pages have their uses as some code that can run periodically regardless of user actions, and to be able to always react to events.
According to Changes to Cross-Origin Requests in Chrome Extension Content Scripts now you have to do your fetches in Background Script. Not in Content Script.

Can I track button clicks without Google Tag Manager?

I want to track button clicks, which lead to external website. I want to put them in Google Analytics Goals.
Is there any option to this without Google Tag Manager?
You can include a separate .js file that listens for all link clicks on your website. Whenever a link click occurs check if the hostname matches your website. If not use the global ga() object (If you have added the analytics.js library snippet in your site) and send an event to google Analytics. The command will look like the one below
ga('send', 'event', 'outbound link', '{link text} - {link href}');
where {link text} is the text of the link and
{link href} is the href that the link points to.
Rather than write a bunch of extra code, you can follow this guide. Pretty simple. Your link text could be (most likely will be) different throughout your entire website. GTM will simply track every single click and report on it.
http://mediacause.org/track-button-clicks-google-tag-manager/

WordPress - Click download link to display popup form

Our website is currently being created on WordPress, and we will soon have a large resource centre for PDF downloads. We need to be able to capture user data before customers download the PDF files - however we need to keep the forms hidden and only display the download title, before clicking on the link.
Is there a plugin or some code already created that can do the following:
Using download monitor (or another plugin), add an extra checkbox field labelled 'Request a form'
If the 'Request a form' checkbox is ticked, when a user clicks on that download link, an overlay form will appear
Once they've filled in the form details their download will automatically be emailed to them.
Any help would be much appreciated, or any other suggestions!
Looking for the same thing, any progress? Im looking for the same Form to Download Link protection, for each link to a download file to pop-up a contact form before you can download.

How can I add a second developer to a File Action in Box?

When I create a new App in Box with a file action, it automatically gets added to my box account and I have access to the file actions when I right-click on a file. I need another developer to have access to the same file action so we can develop and test it before we ask to put it live.
In the "Edit a Box Application" page I can add developers so that they can edit the application. I type their name into the box and save it, then they are able to get into the same screen and edit the details of the application. The problem is that when they right click on a file the file action is not presented as an option. When we look at the list of apps on their Box account our app in development is not there, which explains why they cannot see the file action.
How do we add our application to their account so that they can see the file action without having to set the application as publicly available?
They have to install the application onto their Box account. Have them go to https://cloud.app.box.com/services/ and they should be able to click the "+ Add" button to add the app to their Box account. That will let them have the UI components show up in their Box account.
Go to https:developers.box.com --> Click "My Box Apps" --> click "name of your app" --> copy the url from the browser--> tell your buddy to navigate to that URL.

Duplicate a tab in Chrome without Reloading the Page?

Is there any way to completely duplicate the state of a current tab in Google Chrome? I want an exact copy of the current state of the page without having to reload the page in another tab.
An example use case:
While browsing a "slideshow" on a news website, I want to preserve the current slide that I'm on, but create a duplicate so that I can continue viewing the next slide. If I simply Right-Click and "Duplicate" the tab, the new page will completely Reload, reprocessing all of the Javascript and running the pre-slideshow advertisement again.
In short "NO" you can't.
I am not expert on this
but a similar behavior can be achieved in some ways i know :
Dump the whole DOM
Never tried this though. You can convert the DOM to a string, pass it to the new window and then parse it as a document. This will let you lose your DOM events and State manipulation javascript. (But that's good for your case)
var dtab = window.open('about:blank', 'duplicate_a_tab');
dtab.document.open();
dtab.document.write("... yout html string ..");
dtab.document.close();
Develop an extension
Let the users continue on the current tab with the current state, your extension should be able to capture the screenshot of that area and open that screenshot in new tab. There are plenty of screenshot taking extensions are available in the market.
If that website is your own
You can develop your services that uses state locally like progressive web apps. Give a link separately to 'duplicate' which will eventually open the same URL in different tab with the same local state and with the flag do-not-sync.
This will not work when the user uses browser inbuilt duplicate
feature.