mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ross Allen" <ross+arch...@mesosphere.io>
Subject Re: Review Request 15198: Added a flash service for UI alerts after redirects.
Date Wed, 06 Nov 2013 01:04:08 GMT


> On Nov. 5, 2013, 10:08 p.m., Ben Mahler wrote:
> > src/webui/master/static/js/services.js, lines 23-27
> > <https://reviews.apache.org/r/15198/diff/2/?file=376995#file376995line23>
> >
> >     Rather than a String or an Object, what if we only take an Object and allow
the omission of title / bullets?
> >     
> >     Is it possible to make it as simple as the Ruby flash you've based this on?
Taking one string, possibly allowing some formatting if someone wants it? Or do you see the
title / message / bullets as a one-size-fits-all format?

I let it take a String so it would be as simple as the Rails Flash object. I didn't want to
accept raw HTML since that really belongs in templates, so I chose title and bullets since
it fit the current need.

The 4 use cases fit well into this structure.


- Ross


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


On Nov. 2, 2013, 8:41 p.m., Ross Allen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15198/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2013, 8:41 p.m.)
> 
> 
> Review request for mesos.
> 
> 
> 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 9780d07a23ca196c541a44a85499c2f44a574b9c 
>   src/webui/master/static/index.html 47403d8dc407a454e011262d3614197e49f159ca 
>   src/webui/master/static/js/app.js b918799c0ce82f9427143161cb0bccaed63b9557 
>   src/webui/master/static/js/controllers.js 0c930a2101af2d95bd003d8860602f9e3dd26fba

>   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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message