You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Zhou Z Xing <xi...@cn.ibm.com> on 2016/07/19 23:45:46 UTC

[WEBUI] Update WebUI to use new operator v1 API - javascript cross domain request issue

Dear developers,

We are planning to update WebUI to use our new operator V1 API, please find
the details in MESOS-5735.

WebUI needs to request data from different sources, e.g. master and
different agents, and we encountered a javascript cross domain request
issue. Now, WebUI uses jsonp and 'GET' request to collect all the
information from back-end, like state or metrics information. For new
operator V1 API, we only support 'POST' request for now, and jsonp seems
does not support 'POST' request. There are some other solutions to help
resolve cross domain visit issue on 'POST' request, like CORS or iframe,
but we are not sure whether they can be used in our case.

If you have any ideas or suggestions on this issue, please let use know,
thanks for your attentions and helps!

Thanks & Best Wishes,

Tom Xing(邢舟)
Emerging Technology Institute, IBM China Software Development Lab
----------------------
IBM China Software Development Laboratory (CSDL)
Notes ID:Zhou Z Xing/China/IBM
Phone   :86-10-82450442
e-Mail  :xingzhou@cn.ibm.com
Address :Building No.28, ZhongGuanCun Software Park, No.8 Dong Bei Wang
West Road, Haidian District, Beijing, P.R.China 100193
地址    :中国北京市海淀区东北旺西路8号 中关村软件园28号楼 100193

Re: [WEBUI] Update WebUI to use new operator v1 API - javascript cross domain request issue

Posted by tommy xiao <xi...@gmail.com>.
yes. Access-Control-Allow-xxx is key way

2016-07-22 8:53 GMT+08:00 Zhou Z Xing <xi...@cn.ibm.com>:

> yes, `Access-Control-Allow-xxx` should be kind of CORS solution I guess?
>
> Thanks & Best Wishes,
>
> Tom Xing(邢舟)
> Emerging Technology Institute, IBM China Software Development Lab
> ----------------------
> IBM China Software Development Laboratory (CSDL)
> Notes ID:Zhou Z Xing/China/IBM
> Phone :86-10-82450442
> e-Mail :xingzhou@cn.ibm.com
> Address :Building No.28, ZhongGuanCun Software Park, No.8 Dong Bei Wang
> West Road, Haidian District, Beijing, P.R.China 100193
> 地址 :中国北京市海淀区东北旺西路8号 中关村软件园28号楼 100193
>
>
> [image: Inactive hide details for haosdent ---2016-07-21 上午 10:08:21---I
> think have to resolve it by adding Access-Control-Allow-x]haosdent
> ---2016-07-21 上午 10:08:21---I think have to resolve it by adding
> `Access-Control-Allow-xxx` headers in agent response now.
>
> From: haosdent <ha...@gmail.com>
> To: dev <de...@mesos.apache.org>
> Date: 2016-07-21 上午 10:08
> Subject: Re: [WEBUI] Update WebUI to use new operator v1 API - javascript
> cross domain request issue
> ------------------------------
>
>
>
> I think have to resolve it by adding `Access-Control-Allow-xxx` headers in
> agent response now.
> A long term solution may be proxy agent request via master, so the cross
> domain request issue does not exist.
>
> On Wed, Jul 20, 2016 at 7:45 AM, Zhou Z Xing <xi...@cn.ibm.com> wrote:
>
> >
> > Dear developers,
> >
> > We are planning to update WebUI to use our new operator V1 API, please
> find
> > the details in MESOS-5735.
> >
> > WebUI needs to request data from different sources, e.g. master and
> > different agents, and we encountered a javascript cross domain request
> > issue. Now, WebUI uses jsonp and 'GET' request to collect all the
> > information from back-end, like state or metrics information. For new
> > operator V1 API, we only support 'POST' request for now, and jsonp seems
> > does not support 'POST' request. There are some other solutions to help
> > resolve cross domain visit issue on 'POST' request, like CORS or iframe,
> > but we are not sure whether they can be used in our case.
> >
> > If you have any ideas or suggestions on this issue, please let use know,
> > thanks for your attentions and helps!
> >
> > Thanks & Best Wishes,
> >
> > Tom Xing(邢舟)
> > Emerging Technology Institute, IBM China Software Development Lab
> > ----------------------
> > IBM China Software Development Laboratory (CSDL)
> > Notes ID:Zhou Z Xing/China/IBM
> > Phone   :86-10-82450442
> > e-Mail  :xingzhou@cn.ibm.com
> > Address :Building No.28, ZhongGuanCun Software Park, No.8 Dong Bei Wang
> > West Road, Haidian District, Beijing, P.R.China 100193
> > 地址    :中国北京市海淀区东北旺西路8号 中关村软件园28号楼 100193
> >
>
>
>
> --
> Best Regards,
> Haosdent Huang
>
>
>
>


-- 
Deshi Xiao
Twitter: xds2000
E-mail: xiaods(AT)gmail.com

Re: [WEBUI] Update WebUI to use new operator v1 API - javascript cross domain request issue

Posted by Zhou Z Xing <xi...@cn.ibm.com>.
yes, `Access-Control-Allow-xxx` should be kind of CORS solution I guess?

Thanks & Best Wishes,

Tom Xing(邢舟)
Emerging Technology Institute, IBM China Software Development Lab
----------------------
IBM China Software Development Laboratory (CSDL)
Notes ID:Zhou Z Xing/China/IBM
Phone   :86-10-82450442
e-Mail  :xingzhou@cn.ibm.com
Address :Building No.28, ZhongGuanCun Software Park, No.8 Dong Bei Wang
West Road, Haidian District, Beijing, P.R.China 100193
地址    :中国北京市海淀区东北旺西路8号 中关村软件园28号楼 100193




From:	haosdent <ha...@gmail.com>
To:	dev <de...@mesos.apache.org>
Date:	2016-07-21 上午 10:08
Subject:	Re: [WEBUI] Update WebUI to use new operator v1 API -
            javascript cross domain request issue



I think have to resolve it by adding `Access-Control-Allow-xxx` headers in
agent response now.
A long term solution may be proxy agent request via master, so the cross
domain request issue does not exist.

On Wed, Jul 20, 2016 at 7:45 AM, Zhou Z Xing <xi...@cn.ibm.com> wrote:

>
> Dear developers,
>
> We are planning to update WebUI to use our new operator V1 API, please
find
> the details in MESOS-5735.
>
> WebUI needs to request data from different sources, e.g. master and
> different agents, and we encountered a javascript cross domain request
> issue. Now, WebUI uses jsonp and 'GET' request to collect all the
> information from back-end, like state or metrics information. For new
> operator V1 API, we only support 'POST' request for now, and jsonp seems
> does not support 'POST' request. There are some other solutions to help
> resolve cross domain visit issue on 'POST' request, like CORS or iframe,
> but we are not sure whether they can be used in our case.
>
> If you have any ideas or suggestions on this issue, please let use know,
> thanks for your attentions and helps!
>
> Thanks & Best Wishes,
>
> Tom Xing(邢舟)
> Emerging Technology Institute, IBM China Software Development Lab
> ----------------------
> IBM China Software Development Laboratory (CSDL)
> Notes ID:Zhou Z Xing/China/IBM
> Phone   :86-10-82450442
> e-Mail  :xingzhou@cn.ibm.com
> Address :Building No.28, ZhongGuanCun Software Park, No.8 Dong Bei Wang
> West Road, Haidian District, Beijing, P.R.China 100193
> 地址    :中国北京市海淀区东北旺西路8号 中关村软件园28号楼 100193
>



--
Best Regards,
Haosdent Huang



Re: [WEBUI] Update WebUI to use new operator v1 API - javascript cross domain request issue

Posted by haosdent <ha...@gmail.com>.
I think have to resolve it by adding `Access-Control-Allow-xxx` headers in
agent response now.
A long term solution may be proxy agent request via master, so the cross
domain request issue does not exist.

On Wed, Jul 20, 2016 at 7:45 AM, Zhou Z Xing <xi...@cn.ibm.com> wrote:

>
> Dear developers,
>
> We are planning to update WebUI to use our new operator V1 API, please find
> the details in MESOS-5735.
>
> WebUI needs to request data from different sources, e.g. master and
> different agents, and we encountered a javascript cross domain request
> issue. Now, WebUI uses jsonp and 'GET' request to collect all the
> information from back-end, like state or metrics information. For new
> operator V1 API, we only support 'POST' request for now, and jsonp seems
> does not support 'POST' request. There are some other solutions to help
> resolve cross domain visit issue on 'POST' request, like CORS or iframe,
> but we are not sure whether they can be used in our case.
>
> If you have any ideas or suggestions on this issue, please let use know,
> thanks for your attentions and helps!
>
> Thanks & Best Wishes,
>
> Tom Xing(邢舟)
> Emerging Technology Institute, IBM China Software Development Lab
> ----------------------
> IBM China Software Development Laboratory (CSDL)
> Notes ID:Zhou Z Xing/China/IBM
> Phone   :86-10-82450442
> e-Mail  :xingzhou@cn.ibm.com
> Address :Building No.28, ZhongGuanCun Software Park, No.8 Dong Bei Wang
> West Road, Haidian District, Beijing, P.R.China 100193
> 地址    :中国北京市海淀区东北旺西路8号 中关村软件园28号楼 100193
>



-- 
Best Regards,
Haosdent Huang