mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-30 06:03:45 +01:00
fix #2853 about replication rule link issue
This commit is contained in:
parent
a047c1fe96
commit
30bd67748e
@ -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>
|
@ -12,10 +12,20 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
import {ReplicationRule} from "../../../../lib/src/service/interface";
|
||||||
|
import {Router} from "@angular/router";
|
||||||
|
|
||||||
@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 {
|
||||||
|
|
||||||
|
rule: ReplicationRule[];
|
||||||
|
constructor(private router: Router){}
|
||||||
|
customRedirect(rule: ReplicationRule): void {
|
||||||
|
if (rule) {
|
||||||
|
this.router.navigateByUrl(`/harbor/projects/${rule.project_id}/replications`);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user