> On Nov. 4, 2013, 6:38 p.m., Ben Mahler wrote:
> > src/webui/master/static/js/services.js, line 6
> > <https://reviews.apache.org/r/15198/diff/2/?file=376995#file376995line6>
> >
> >     Can we call this service alert? Since that seems to be the standard 
> > terminology for this kind of ui component, and Adobe® Flash® is a thing?
> 
> Ross Allen wrote:
>     I borrowed the terminology from Rails: 
> http://api.rubyonrails.org/classes/ActionDispatch/Flash.html
>     
>     It's named "flash" because the messages it displays are temporary and 
> shown only for one page view. Alerts usually require user interaction to 
> dismiss.
>     
>     Either one works for me, and "$alert.warning", "$alert.danger", etc. 
> sounds cool.
> 
> Ben Mahler wrote:
>     Ok, alert is likely overloaded as well, so I'm fine either way.
>     
>     Is this only useful for errors during a redirect?
> 
> Ross Allen wrote:
>     It currently only supports alerts on the next page view, but it could 
> also let new alerts be appended to the current page. I would want to add 
> alert clearing if we went that route so you can optionally close them if they 
> stack up.

All set. The service is now called "$alert".


- Ross


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15198/#review28126
-----------------------------------------------------------


On Nov. 7, 2013, 11:28 p.m., Ross Allen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15198/
> -----------------------------------------------------------
> 
> (Updated Nov. 7, 2013, 11:28 p.m.)
> 
> 
> Review request for mesos.
> 
> 
> Bugs: MESOS-802
>     https://issues.apache.org/jira/browse/MESOS-802
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Added a flash service for UI alerts after redirects.
> 
> When an error occurs during a redirect, it is useful to show an error
> message on the following page view rather than the current one. In
> particular, when clicking a sandbox link for a slave that is
> inaccessible, the `SlaveExecutorRerouterCtrl` sends a request to the
> desired slave and redirects back to root if an error occurs. It's not
> possible to show an error during the redirect, and so rendering on
> the root view is ideal.
> 
> Flash alerts are rendered once and then cleaned up; they will not
> display more than once.
> 
> Review: http://reviews.apache.org/r/15198
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am a73d6e15a92f97a175116210bd4d03a8faec43d2 
>   src/webui/master/static/index.html 3ba49108a5221d8e97bfe95f48e62b4eec9f9aee 
>   src/webui/master/static/js/app.js b918799c0ce82f9427143161cb0bccaed63b9557 
>   src/webui/master/static/js/controllers.js 
> db015b28bd508715461f00566e7f7fcd83693780 
>   src/webui/master/static/js/services.js PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/15198/diff/
> 
> 
> Testing
> -------
> 
> Ran `make` and `make check`
> 
> Started a slave
> Started a framework + task on the slave
> Killed the slave
> Clicked the sandbox link from task
> Verified the flash alert displayed after the redirect
> 
> 
> File Attachments
> ----------------
> 
> Sample error after dead sandbox link click
>   
> https://reviews.apache.org/media/uploaded/files/2013/11/02/Screen_Shot_2013-11-02_at_10.09.51_AM.png
> 
> 
> Thanks,
> 
> Ross Allen
> 
>

Reply via email to