> On Jan. 30, 2018, 12:01 a.m., Benjamin Mahler wrote:
> > src/webui/master/static/js/controllers.js
> > Lines 67-69 (patched)
> > <https://reviews.apache.org/r/65246/diff/1/?file=1943092#file1943092line67>
> >
> >     This is a little obscure for me, can you explain it?

`var file = new Blob([fileData], { type : fileType });` creates a file-like 
object of immutable, raw data representing the logs we want to download. The 
type will be used 

This is not enough to show the download prompt, we need a URL for that. As 
defined in the MDN web docs: "The URL.createObjectURL() static method creates a 
DOMString containing a URL representing the object given in the parameter 
[...]. The new object URL represents the specified File object or Blob 
object.". This is exactly what we want and I have thus used this function to 
create a usable URL containing the data we wish to download.


- Armand


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


On Feb. 4, 2018, 7:31 p.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65246/
> -----------------------------------------------------------
> 
> (Updated Feb. 4, 2018, 7:31 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Vinod Kone.
> 
> 
> Bugs: MESOS-8454
>     https://issues.apache.org/jira/browse/MESOS-8454
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   src/webui/master/static/agent.html 908d01d1d28f2a4fc595b581fa16515c5be1410a 
>   src/webui/master/static/home.html df3eef61eb9564dbdfc3d138ecfd18e85f747f11 
>   src/webui/master/static/js/controllers.js 
> 59665869dbea77c00740e42f2590473181dfe2fe 
> 
> 
> Diff: https://reviews.apache.org/r/65246/diff/3/
> 
> 
> Testing
> -------
> 
> Tested using Google Chrome 64.0.3282.119.
> 
> Created an High Availability Mode Mesos cluster locally:
> ```
> $ zkServer start
> $ bash mesos-master.sh --port='5061' --zk='zk://127.0.0.1:2181/mesos' 
> --work_dir='/tmp/master1' --quorum=1 
> --webui_dir='/Users/Armand/Code/apache-mesos/src/webui' 
> --log_dir='/tmp/master1-log'
> $ bash mesos-master.sh --port='5062' --zk='zk://127.0.0.1:2181/mesos' 
> --work_dir='/tmp/master2' --quorum=1 
> --webui_dir='/Users/Armand/Code/apache-mesos/src/webui' 
> --log_dir='/tmp/master2-log'
> $ bash mesos-agent.sh --port='5051' --master='zk://127.0.0.1:2181/mesos' 
> --work_dir='/tmp/agent1' --log_dir='/tmp/agent1-log'
> ```
> Tested the download and streaming features on the home and agents Web UI 
> endpoints, from both `http://localhost:5061/` and `http://localhost:5062/`.
> 
> New UI (masters):
> ![New logs button master](https://i.imgur.com/Uz8aj1H.png)
> 
> New UI (agents):
> ![New logs button](https://i.imgur.com/tmGavCL.png)
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>

Reply via email to