提交 3b8b4f0f 编写于 作者: U Ufuk Celebi 提交者: Stephan Ewen

[FLINK-2769] [dashboard] Remove hard coded job server URL

This closes #1185
上级 8d2289ea
......@@ -22,7 +22,7 @@ angular.module('flinkApp')
@loadConfig = ->
deferred = $q.defer()
$http.get flinkConfig.jobServer + "/config"
$http.get "/config"
.success (data, status, headers, config) ->
deferred.resolve(data)
......
......@@ -29,8 +29,6 @@ angular.module('flinkApp', ['ui.router', 'angularMoment'])
# --------------------------------------
.value 'flinkConfig', {
jobServer: 'http://localhost:8081'
# jobServer: 'http://localhost:3000/new-server'
"refresh-interval": 10000
}
......
......@@ -86,7 +86,7 @@ angular.module('flinkApp')
@listJobs = ->
deferred = $q.defer()
$http.get flinkConfig.jobServer + "/joboverview"
$http.get "/joboverview"
.success (data, status, headers, config) =>
angular.forEach data, (list, listKey) =>
switch listKey
......@@ -110,12 +110,12 @@ angular.module('flinkApp')
currentJob = null
deferreds.job = $q.defer()
$http.get flinkConfig.jobServer + "/jobs/" + jobid
$http.get "/jobs/" + jobid
.success (data, status, headers, config) =>
@setEndTimes(data.vertices)
@processVertices(data)
$http.get flinkConfig.jobServer + "/jobs/" + jobid + "/config"
$http.get "/jobs/" + jobid + "/config"
.success (jobConfig) ->
data = angular.extend(data, jobConfig)
......@@ -157,7 +157,7 @@ angular.module('flinkApp')
deferreds.job.promise.then (data) =>
vertex = @seekVertex(vertexid)
$http.get flinkConfig.jobServer + "/jobs/" + currentJob.jid + "/vertices/" + vertexid + "/subtasktimes"
$http.get "/jobs/" + currentJob.jid + "/vertices/" + vertexid + "/subtasktimes"
.success (data) =>
# TODO: change to subtasktimes
vertex.subtasks = data.subtasks
......@@ -172,7 +172,7 @@ angular.module('flinkApp')
deferreds.job.promise.then (data) =>
# vertex = @seekVertex(vertexid)
$http.get flinkConfig.jobServer + "/jobs/" + currentJob.jid + "/vertices/" + vertexid
$http.get "/jobs/" + currentJob.jid + "/vertices/" + vertexid
.success (data) ->
subtasks = data.subtasks
......@@ -186,11 +186,11 @@ angular.module('flinkApp')
deferreds.job.promise.then (data) =>
# vertex = @seekVertex(vertexid)
$http.get flinkConfig.jobServer + "/jobs/" + currentJob.jid + "/vertices/" + vertexid + "/accumulators"
$http.get "/jobs/" + currentJob.jid + "/vertices/" + vertexid + "/accumulators"
.success (data) ->
accumulators = data['user-accumulators']
$http.get flinkConfig.jobServer + "/jobs/" + currentJob.jid + "/vertices/" + vertexid + "/subtasks/accumulators"
$http.get "/jobs/" + currentJob.jid + "/vertices/" + vertexid + "/subtasks/accumulators"
.success (data) ->
subtaskAccumulators = data.subtasks
......@@ -203,7 +203,7 @@ angular.module('flinkApp')
deferreds.job.promise.then (data) =>
$http.get flinkConfig.jobServer + "/jobs/" + currentJob.jid + "/exceptions"
$http.get "/jobs/" + currentJob.jid + "/exceptions"
.success (exceptions) ->
currentJob.exceptions = exceptions
......
......@@ -24,7 +24,7 @@ angular.module('flinkApp')
@loadOverview = ->
deferred = $q.defer()
$http.get(flinkConfig.jobServer + "/overview")
$http.get("/overview")
.success (data, status, headers, config) ->
overview = data
deferred.resolve(data)
......
......@@ -22,7 +22,7 @@ angular.module('flinkApp')
@loadManagers = ->
deferred = $q.defer()
$http.get(flinkConfig.jobServer + "/taskmanagers")
$http.get("/taskmanagers")
.success (data, status, headers, config) ->
deferred.resolve(data['taskmanagers'])
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册