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

When updating dashboard name, the dashboards list won't be updated until refresh of the page #16

Closed
arikfr opened this issue Oct 28, 2013 · 4 comments

Comments

@arikfr
Copy link
Member

arikfr commented Oct 28, 2013

No description provided.

@amirnissim
Copy link
Contributor

created Events service with dashboardchange event [c53f965]

@alonho
Copy link
Contributor

alonho commented Nov 30, 2015

I think the suggested solution with an event isn't bad. The other options I can think of:

  1. Pass a callback into the directive to be fired upon change: on-change="reloadDashboards()".
  2. Trigger the modal from javascript and not html and reload the dashboards upon close of the modal.

@arikfr
Copy link
Member Author

arikfr commented Nov 30, 2015

Any solution for this problem that relies on communication in the view layer will probably lead to maintenance hell.

It's better to have a "single source of truth" and have the views represent its state. When it mutates, mutate the view. Angular makes it easy, as this is its default behavior - you just need to wire things right.

In this case, I would have a dashboards model. This model holds the list of all dashboards, recent dashboards, etc. And it gets notified when you edit/create/delete a dashboard. And for simplicity, there is no need to have an identity map or similar - just notify it, and reload from the whole list(s) from the server.

@arikfr arikfr added this to the v0.12.0 milestone Jul 28, 2016
@arikfr arikfr modified the milestones: v0.12.0, v1.0.0 Oct 24, 2016
@arikfr arikfr closed this as completed in e58f703 Jan 1, 2017
arikfr added a commit that referenced this issue Jan 1, 2017
Fix #16: when updating dashboard name refresh dashboards dropdown
@arikfr
Copy link
Member Author

arikfr commented Jan 1, 2017

I ended up using an event :-\ Binding the list in the template to a function on a service isn't straightforward and introduced its own set of issues. In the spirit of "done is better than perfect", just used an event...

eugenekx pushed a commit to eugenekx/redash that referenced this issue Oct 7, 2023
…hange

move rows with redash-sticky key set to tfoot summary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants