Skip to content

Commit

Permalink
#7568 handle spark status toolbar on multiple notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasz Mitusinski committed Jun 26, 2018
1 parent 7320c39 commit cf5ce4e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions beakerx/beakerx/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ def data_received(self, chunk):

@web.authenticated
@tornado.web.asynchronous
def get(self, id):
def get(self, params):

def handle_response(response):
self.finish(response.body)

url = "http://localhost:4040/api/v1/applications/" + id + "/allexecutors"
addr_port = params.split('/')[2]
app_id = params.split('/')[3]

url = "http://" + addr_port + "/api/v1/applications/" + app_id + "/allexecutors"
req = tornado.httpclient.HTTPRequest(
url=url,
method=self.request.method,
Expand Down
2 changes: 1 addition & 1 deletion js/notebook/src/SparkUI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ export class SparkUIView extends widgets.VBoxView {
}

private setApiCallInterval(api: BeakerXApi): void {
const sparkUrl = `${api.getApiUrl('sparkmetrics/executors')}/${this.sparkAppId}`;
const getMetrict = async () => {
try {
let sparkUrl = `${api.getApiUrl('sparkmetrics/executors')}/${this.sparkUiWebUrl}/${this.sparkAppId}`;
const response = await fetch(sparkUrl, { method: 'GET', credentials: 'include' });

if (!response.ok) {
Expand Down

0 comments on commit cf5ce4e

Please sign in to comment.