You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by uc...@apache.org on 2018/01/09 14:13:28 UTC
[6/6] flink git commit: [FLINK-8352] [web-dashboard] Report error on
jar submission failure
[FLINK-8352] [web-dashboard] Report error on jar submission failure
This closes #5264.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/40ba6261
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/40ba6261
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/40ba6261
Branch: refs/heads/master
Commit: 40ba6261b9b151459b3402087d20bb9ccba73599
Parents: fddedda
Author: Steven Langbroek <st...@digitaaldier.nl>
Authored: Mon Jan 8 17:27:15 2018 +0100
Committer: Ufuk Celebi <uc...@apache.org>
Committed: Tue Jan 9 15:12:55 2018 +0100
----------------------------------------------------------------------
.../web-dashboard/app/partials/submit.jade | 12 +++++-------
.../app/scripts/modules/submit/submit.ctrl.coffee | 3 +++
.../app/scripts/modules/submit/submit.svc.coffee | 2 ++
.../web-dashboard/web/css/vendor.css | 2 +-
.../web-dashboard/web/js/hs/index.js | 4 ++--
flink-runtime-web/web-dashboard/web/js/index.js | 4 ++--
flink-runtime-web/web-dashboard/web/js/vendor.js | 18 +++++++++---------
.../web-dashboard/web/partials/submit.html | 13 ++++---------
8 files changed, 28 insertions(+), 30 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/40ba6261/flink-runtime-web/web-dashboard/app/partials/submit.jade
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/partials/submit.jade b/flink-runtime-web/web-dashboard/app/partials/submit.jade
index 03e10fa..2e3ace4 100644
--- a/flink-runtime-web/web-dashboard/app/partials/submit.jade
+++ b/flink-runtime-web/web-dashboard/app/partials/submit.jade
@@ -35,6 +35,10 @@ nav.navbar.navbar-default.navbar-fixed-top.navbar-main
| to access this functionality.
#content-inner(ng-if="!noaccess && jars && !yarn")
+ div(ng-if="error")
+ h3 We're sorry, something went wrong. The server responded with:
+ pre
+ | {{error}}
.panel.panel-default
.panel-heading
h3.panel-title
@@ -92,6 +96,7 @@ nav.navbar.navbar-default.navbar-fixed-top.navbar-main
label.checkbox-inline
input.checkbox-inline(type="checkbox", ng-model="state['allowNonRestoredState']")
| Allow Non Restored State
+
table.table.table-no-border(ng-if="jid")
tbody
@@ -101,13 +106,6 @@ nav.navbar.navbar-default.navbar-fixed-top.navbar-main
a(href="{{'#/jobs/' + jid}}")
| click here.
- table.table.table-no-border(ng-if="error")
- tbody
- tr
- td
- pre
- | {{error}}
-
.canvas-wrapper(ng-if="plan")
div.main-canvas(job-plan, plan="plan", jobid="{{plan.jid}}", set-node="changeNode(nodeid)")
http://git-wip-us.apache.org/repos/asf/flink/blob/40ba6261/flink-runtime-web/web-dashboard/app/scripts/modules/submit/submit.ctrl.coffee
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/scripts/modules/submit/submit.ctrl.coffee b/flink-runtime-web/web-dashboard/app/scripts/modules/submit/submit.ctrl.coffee
index a268fc3..bfd39b9 100644
--- a/flink-runtime-web/web-dashboard/app/scripts/modules/submit/submit.ctrl.coffee
+++ b/flink-runtime-web/web-dashboard/app/scripts/modules/submit/submit.ctrl.coffee
@@ -112,6 +112,9 @@ angular.module('flinkApp')
$scope.error = data.error
if data.jobid?
$state.go("single-job.plan.subtasks", {jobid: data.jobid})
+ .catch (err) ->
+ $scope.state['submit-button'] = "Submit"
+ $scope.error = err
# job plan display related stuff
$scope.nodeid = null
http://git-wip-us.apache.org/repos/asf/flink/blob/40ba6261/flink-runtime-web/web-dashboard/app/scripts/modules/submit/submit.svc.coffee
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/scripts/modules/submit/submit.svc.coffee b/flink-runtime-web/web-dashboard/app/scripts/modules/submit/submit.svc.coffee
index f4b4aa6..d4a22a4 100644
--- a/flink-runtime-web/web-dashboard/app/scripts/modules/submit/submit.svc.coffee
+++ b/flink-runtime-web/web-dashboard/app/scripts/modules/submit/submit.svc.coffee
@@ -53,6 +53,8 @@ angular.module('flinkApp')
$http.post(flinkConfig.jobServer + "jars/" + encodeURIComponent(id) + "/run", {}, {params: args})
.success (data, status, headers, config) ->
deferred.resolve(data)
+ .error (err) ->
+ deferred.reject(err)
deferred.promise