提交 ee76fc45 编写于 作者: G Greg Hogan 提交者: Robert Metzger

[FLINK-3437] [web-dashboard] Fix UI router state for job plan

Transitive dependency EvEmitter updated to 1.0.2

This closes #1661
上级 db6fda6a
......@@ -50,7 +50,7 @@ nav.navbar.navbar-default.navbar-fixed-top.navbar-main(ng-if="job")
nav.navbar.navbar-default.navbar-fixed-top.navbar-main-additional(ng-if="job")
ul.nav.nav-tabs
li(ui-sref-active='active')
a(ui-sref=".plan.subtasks") Plan
a(ui-sref=".plan") Plan
//- li(ui-sref-active='active' ng-if="job['end-time'] > -1")
li(ui-sref-active='active')
......
......@@ -54,6 +54,14 @@ angular.module('flinkApp', ['ui.router', 'angularMoment'])
# --------------------------------------
.run ($rootScope, $state) ->
$rootScope.$on '$stateChangeStart', (event, toState, toParams, fromState) ->
if toState.redirectTo
event.preventDefault()
$state.go toState.redirectTo, toParams
# --------------------------------------
.config ($stateProvider, $urlRouterProvider) ->
$stateProvider.state "overview",
url: "/overview"
......@@ -86,7 +94,7 @@ angular.module('flinkApp', ['ui.router', 'angularMoment'])
.state "single-job.plan",
url: ""
abstract: true
redirectTo: "single-job.plan.subtasks"
views:
details:
templateUrl: "partials/jobs/job.plan.html"
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -37,7 +37,7 @@ limitations under the License.
</nav>
<nav ng-if="job" class="navbar navbar-default navbar-fixed-top navbar-main-additional">
<ul class="nav nav-tabs">
<li ui-sref-active="active"><a ui-sref=".plan.subtasks">Plan</a></li>
<li ui-sref-active="active"><a ui-sref=".plan">Plan</a></li>
<li ui-sref-active="active"><a ui-sref=".timeline">Timeline</a></li>
<li ui-sref-active="active"><a ui-sref=".exceptions">Exceptions</a></li>
<li ui-sref-active="active"><a ui-sref=".properties">Properties</a></li>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册