mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-27 04:35:16 +01:00
Merge pull request #2861 from pengpengshui/master
fix #2853 about replication rule link issue
This commit is contained in:
commit
7f96ba48bc
@ -1,3 +1,3 @@
|
|||||||
<div style="margin-top: 24px;">
|
<div style="margin-top: 24px;">
|
||||||
<hbr-replication [withReplicationJob]='false'></hbr-replication>
|
<hbr-replication [withReplicationJob]='false' (redirect)="customRedirect($event)"></hbr-replication>
|
||||||
</div>
|
</div>
|
@ -13,9 +13,20 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
import {Router,ActivatedRoute} from "@angular/router";
|
||||||
|
import {ReplicationRule} from "harbor-ui";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'total-replication',
|
selector: 'total-replication',
|
||||||
templateUrl: 'total-replication-page.component.html'
|
templateUrl: 'total-replication-page.component.html'
|
||||||
})
|
})
|
||||||
export class TotalReplicationPageComponent {
|
export class TotalReplicationPageComponent {
|
||||||
|
|
||||||
|
constructor(private router: Router,
|
||||||
|
private activeRoute: ActivatedRoute){}
|
||||||
|
customRedirect(rule: ReplicationRule): void {
|
||||||
|
if (rule) {
|
||||||
|
this.router.navigate(['../../projects', rule.project_id, "replications"], { relativeTo: this.activeRoute });
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user