[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/38278ebe Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/38278ebe Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/38278ebe Branch: refs/heads/release-1.4 Commit: 38278ebefe0fcc88448e6770de9c345f16b0d482 Parents: eb63809 Author: Steven Langbroek <[email protected]> Authored: Mon Jan 8 17:27:15 2018 +0100 Committer: zentol <[email protected]> Committed: Thu Jan 25 12:08:19 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 ++ flink-runtime-web/web-dashboard/web/js/hs/index.js | 4 ++-- flink-runtime-web/web-dashboard/web/js/index.js | 4 ++-- .../web-dashboard/web/partials/submit.html | 13 ++++--------- 6 files changed, 18 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/38278ebe/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/38278ebe/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/38278ebe/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
