mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-27 04:35:16 +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;">
|
||||
<hbr-replication [withReplicationJob]='false'></hbr-replication>
|
||||
<hbr-replication [withReplicationJob]='false' (redirect)="customRedirect($event)"></hbr-replication>
|
||||
</div>
|
@ -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`);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user