You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2015/09/29 14:08:34 UTC

[3/8] flink git commit: [FLINK-2769] [dashboard] Remove hard coded job server URL

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

This closes #1185


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/3b8b4f0f
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/3b8b4f0f
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/3b8b4f0f

Branch: refs/heads/master
Commit: 3b8b4f0f8c0600dc851d676ce1bd7f5ab81cb64f
Parents: 8d2289e
Author: Ufuk Celebi <uc...@apache.org>
Authored: Sat Sep 26 14:12:20 2015 +0200
Committer: Stephan Ewen <se...@apache.org>
Committed: Tue Sep 29 12:09:15 2015 +0200

----------------------------------------------------------------------
 .../app/scripts/common/services.coffee          |   2 +-
 .../web-dashboard/app/scripts/index.coffee      |   2 -
 .../app/scripts/modules/jobs/jobs.svc.coffee    |  16 +--
 .../modules/overview/overview.svc.coffee        |   2 +-
 .../taskmanagers/taskmanagers.svc.coffee        |   2 +-
 flink-runtime-web/web-dashboard/web/js/index.js | 101 +++++++++----------
 6 files changed, 61 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/3b8b4f0f/flink-runtime-web/web-dashboard/app/scripts/common/services.coffee
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/scripts/common/services.coffee b/flink-runtime-web/web-dashboard/app/scripts/common/services.coffee
index a54c502..5bb6358 100644
--- a/flink-runtime-web/web-dashboard/app/scripts/common/services.coffee
+++ b/flink-runtime-web/web-dashboard/app/scripts/common/services.coffee
@@ -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)
 

http://git-wip-us.apache.org/repos/asf/flink/blob/3b8b4f0f/flink-runtime-web/web-dashboard/app/scripts/index.coffee
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/scripts/index.coffee b/flink-runtime-web/web-dashboard/app/scripts/index.coffee
index 2bf9075..7154e14 100644
--- a/flink-runtime-web/web-dashboard/app/scripts/index.coffee
+++ b/flink-runtime-web/web-dashboard/app/scripts/index.coffee
@@ -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
 }
 

http://git-wip-us.apache.org/repos/asf/flink/blob/3b8b4f0f/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee b/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
index 685f90f..05996a2 100644
--- a/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
+++ b/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
@@ -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
 

http://git-wip-us.apache.org/repos/asf/flink/blob/3b8b4f0f/flink-runtime-web/web-dashboard/app/scripts/modules/overview/overview.svc.coffee
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/scripts/modules/overview/overview.svc.coffee b/flink-runtime-web/web-dashboard/app/scripts/modules/overview/overview.svc.coffee
index 8ce9d61..9d7269d 100644
--- a/flink-runtime-web/web-dashboard/app/scripts/modules/overview/overview.svc.coffee
+++ b/flink-runtime-web/web-dashboard/app/scripts/modules/overview/overview.svc.coffee
@@ -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)

http://git-wip-us.apache.org/repos/asf/flink/blob/3b8b4f0f/flink-runtime-web/web-dashboard/app/scripts/modules/taskmanagers/taskmanagers.svc.coffee
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/scripts/modules/taskmanagers/taskmanagers.svc.coffee b/flink-runtime-web/web-dashboard/app/scripts/modules/taskmanagers/taskmanagers.svc.coffee
index b75ae79..fcdf2f9 100644
--- a/flink-runtime-web/web-dashboard/app/scripts/modules/taskmanagers/taskmanagers.svc.coffee
+++ b/flink-runtime-web/web-dashboard/app/scripts/modules/taskmanagers/taskmanagers.svc.coffee
@@ -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'])