Get Values from grafana from browser - javascript

I am monitoring grafana dashboard with viewer permission.
Now I have to send reports of recent values of some graphs by placing cursor at the end and note down the values. I want to automate that, I have tried accessing api but no permissions.
I want to get values by injecting some javascript through console, but didn't found anything.
By moving cursor values are visible, so is there a way to move cursor at the end of the graph and get values?

Related

How to prevent reset-timeout in ZingChart

I'm making a dynamic graphic that shows me a variable curve.
I don't want to have the data reloaded. I want then continuously move in the screen.
Of course I can put a very long "reset-timeout" attribute, but sometime it will be reloaded, and I don't want this.
Any help?
Full disclosure, I'm a member of the ZingChart team.
Like you mentioned, just set a really high timeout. What is the graphs purpose and why can't it reset? How reasonable is it for this client side graph to run forever?
You can simply query the chart and save the current data before it resets using our API method getdata.

Possible to inject JavaScript into an existing page to alter a D3JS chart?

If there is a 3rd party web page (not under my control) that uses D3.js to draw charts, is it technically possible to inject JavaScript into that page to modify the chart? For example let's say a page used an animated Bubble Chart and I wanted to modify it so the bubbles left a trail as they moved, could I inject the necessary JavaScript into that page?
And, if the owner of the site appreciated user's desire to perform such customization, would it be possible for them to include a standard text area into which one could enter the customization script, and it would then be run whenever the user visited the site? (Obviously the script would have to be persisted into the user profile and retrieved when that individual user returned to the site.)

Browser got crashed, with continuous drawing path on google map?

I am drawing Real Time path on google map data are comming continuous manner. But after some time browser have been crashed. I am trying to remove
data from array but problem is that all path get removed and I have to redraw it again. My Requirement is that remove data load on browser without temperig
current path, offcourse old path get removed (means till some distance from start point coulld be removed after removing data from array). Similar like pagination.
load only viewble area data and draw on map.Any guidence is very appreciable.thanks.
Looks like it's a memory leak. Try first to profile by your chrome devtools what is happened with memory an objects in tab.
Identifying a Memory Problem with the DevTools Timeline
Create some like codepen or similar page where we can look at your situation with javascript code.

Screen-capture like DOM-capture with javascript?

I'm working on a web-app and I would like to have some first hand experience on how our users actually use our software. This is my idea:
*Use javascript to save the html-DOM and cursor-position. Possibly only the changes to the DOM to reduce the amount of data.
*Save it to the server along with the users browser used.
Do a javascript that updates the DOM according to the recording and an image that replicate the mouse movements in the corresponding browser.
Has this ever been done before?
Would this work in most cases?
As circle73 said, you can use HTML5 to do this via canvas, however, I don't think that would track the mouse position. You could write a JavaScript function to track the mouse coords every x seconds, you'd just have to time it with the screen captures so you can match up the mouse movements with the captured frames.
Your other options would be to do this via an ActiveX control as answered here: Take a screenshot of a webpage with JavaScript?
I would approach this with the following high-level strategy:
Use jQuery mouseover to record the user's mouse positions on the page. Store these positions (x,y coordinates) locally. Send a structured request to your server with these coordinates.
Use a browser automation framework like Selenium to "play" the stored coordinates. You can use the same path as your user, only in development, in order to see what he saw. For example:
void mouseMove(WebElement toElement, long xOffset, long yOffset)
This moves (from the current location) to new coordinates. There's more info here.
Take screenshots with of the page with Selenium WebDriver. More info here.

How to retrieve all positions of a profile, including past ones

I have tried several things to be able to retrieve all positions of a profile, including past ones and somehow it still does not work.
I only manage to get past positions of my direct connections, then even those 2 or 3 degrees away, I only see present positions via the API even though I can see all positions via the website.
I tried the technique described here : https://developer.linkedin.com/documents/accessing-out-network-profiles also, and even for profiles which are 3 degrees away from me (so not out of network), this method keeps only returning the current positions. I used the specified headers and everything, still only current positions returned.
Could you please give me a working example of how to retrieve ALL positions for a 2 or 3 degrees connection via API, ideally REST and also Javascript ?
Is it even possible given the current API ?
I guess it should, since I can see the information via the website, it should be somehow available via API...
Thanks.
The API documentation for the available Profile Fields list which fields are available given the relationship with the viewer. Right at the top, there is a table that states that for anyone other than 1st degree connections, with regards to position data it will only return "Current positions only":
So it looks like the public API only allows you to retrieve past positions for immediate connections.

Categories