From 30bd67748eb5924acdc92b6f68dfeeb27322bf07 Mon Sep 17 00:00:00 2001 From: pengpengshui Date: Wed, 26 Jul 2017 03:51:47 +0800 Subject: [PATCH] fix #2853 about replication rule link issue --- .../total-replication-page.component.html | 2 +- .../total-replication-page.component.ts | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ui_ng/src/app/replication/total-replication/total-replication-page.component.html b/src/ui_ng/src/app/replication/total-replication/total-replication-page.component.html index e4c28b783..b93ec2ca3 100644 --- a/src/ui_ng/src/app/replication/total-replication/total-replication-page.component.html +++ b/src/ui_ng/src/app/replication/total-replication/total-replication-page.component.html @@ -1,3 +1,3 @@
- +
\ No newline at end of file diff --git a/src/ui_ng/src/app/replication/total-replication/total-replication-page.component.ts b/src/ui_ng/src/app/replication/total-replication/total-replication-page.component.ts index a6662673e..fc4417eff 100644 --- a/src/ui_ng/src/app/replication/total-replication/total-replication-page.component.ts +++ b/src/ui_ng/src/app/replication/total-replication/total-replication-page.component.ts @@ -12,10 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. import { Component } from '@angular/core'; +import {ReplicationRule} from "../../../../lib/src/service/interface"; +import {Router} from "@angular/router"; @Component({ selector: 'total-replication', templateUrl: 'total-replication-page.component.html' }) export class TotalReplicationPageComponent { + + rule: ReplicationRule[]; + constructor(private router: Router){} + customRedirect(rule: ReplicationRule): void { + if (rule) { + this.router.navigateByUrl(`/harbor/projects/${rule.project_id}/replications`); + } + } } \ No newline at end of file