Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to add info after rendered #8

Open
hrajchert opened this issue Jul 17, 2013 · 3 comments
Open

Ability to add info after rendered #8

hrajchert opened this issue Jul 17, 2013 · 3 comments

Comments

@hrajchert
Copy link

Hi, I've added a small panel that dumps my mongo queries (not really exportable at the moment), and Im planning to do another that can hold messages in the type of console.log, console.debug, etc

Both of my panels are going to require eventually to update the toolbar after an XHR request or even with sockets.io.

Do you offer any js entry point so I can add info dynamically. If not, would you consider adding it?

@devoidfury
Copy link
Owner

Currently there is no functionality to do this, but I've been wanting to add it for some time.

Here is the system I'd like to have:

ID each request
XHR polling to /{mount_point}/info?id={req_id}

  • option to disable interval polling
  • option to set polling interval
  • returns JSON data of each panel item that's configured for polling, ex:
    "session": {},
    "mongo_queries": {}
    }
    
    

Update the frontend JS to do the following:  
* redraw panel data
* add a button for a forced poll

**Other considerations**
* Special mount page should be adjusted to see multiple requests
* The injected frontend of the library doesn't have any dependencies, and I'd like to keep it that way (except *maybe* client-side jade for rendering templates)


I'll be able to work on this in the next week or two, but you're welcome to send a pull request if you'd like to add the functionality sooner =)

Thanks!

@hrajchert
Copy link
Author

I was thinking something more in the lines of a global library call. Like

EDT.addData("panel_name", {data})

Which would re render the panel/s

The idea behind it is that you don't force when on how the data travel, and only the specific panels.
Of course, this could be done in parallel of the idea you are proposing, and having the XHR polling to /{mount_point}/info?id={req_id} to use the EDT.addData.

So if I like to update in real time with socket.io, I can also do it.

@devoidfury
Copy link
Owner

Sure, I'm open the idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants