mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 18:55:18 +01:00
fix issue 2759
This commit is contained in:
parent
a1a36a4cc4
commit
fae35add8f
@ -1,6 +1,8 @@
|
|||||||
import { Type } from '@angular/core';
|
import { Type } from '@angular/core';
|
||||||
import { ReplicationComponent } from './replication.component';
|
import { ReplicationComponent } from './replication.component';
|
||||||
|
|
||||||
|
export * from './replication.component';
|
||||||
|
|
||||||
export const REPLICATION_DIRECTIVES: Type<any>[] = [
|
export const REPLICATION_DIRECTIVES: Type<any>[] = [
|
||||||
ReplicationComponent
|
ReplicationComponent
|
||||||
];
|
];
|
@ -31,7 +31,7 @@
|
|||||||
"clarity-icons": "^0.9.8",
|
"clarity-icons": "^0.9.8",
|
||||||
"clarity-ui": "^0.9.8",
|
"clarity-ui": "^0.9.8",
|
||||||
"core-js": "^2.4.1",
|
"core-js": "^2.4.1",
|
||||||
"harbor-ui": "0.2.81",
|
"harbor-ui": "0.2.85",
|
||||||
"intl": "^1.2.5",
|
"intl": "^1.2.5",
|
||||||
"mutationobserver-shim": "^0.3.2",
|
"mutationobserver-shim": "^0.3.2",
|
||||||
"ngx-cookie": "^1.0.0",
|
"ngx-cookie": "^1.0.0",
|
||||||
|
@ -79,7 +79,7 @@ export class ListProjectComponent {
|
|||||||
|
|
||||||
newReplicationRule(p: Project) {
|
newReplicationRule(p: Project) {
|
||||||
if (p) {
|
if (p) {
|
||||||
this.router.navigateByUrl(`/harbor/projects/${p.project_id}/replication?is_create=true`);
|
this.router.navigateByUrl(`/harbor/projects/${p.project_id}/replications?is_create=true`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<div style="margin-top: 24px;">
|
<div style="margin-top: 24px;">
|
||||||
<hbr-replication [projectId]="projectIdentify" [withReplicationJob]='true'></hbr-replication>
|
<hbr-replication #replicationView [projectId]="projectIdentify" [withReplicationJob]='true'></hbr-replication>
|
||||||
</div>
|
</div>
|
@ -11,19 +11,30 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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, OnInit } from '@angular/core';
|
import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
import { ReplicationComponent } from 'harbor-ui';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'replicaton',
|
selector: 'replicaton',
|
||||||
templateUrl: 'replication-page.component.html'
|
templateUrl: 'replication-page.component.html'
|
||||||
})
|
})
|
||||||
export class ReplicationPageComponent implements OnInit {
|
export class ReplicationPageComponent implements OnInit, AfterViewInit {
|
||||||
projectIdentify: string | number;
|
projectIdentify: string | number;
|
||||||
|
@ViewChild("replicationView") replicationView: ReplicationComponent;
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute) { }
|
constructor(private route: ActivatedRoute) { }
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.projectIdentify = +this.route.snapshot.parent.params['id'];
|
this.projectIdentify = +this.route.snapshot.parent.params['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngAfterViewInit(): void {
|
||||||
|
let isCreated: boolean = this.route.snapshot.queryParams['is_create'];
|
||||||
|
if (isCreated) {
|
||||||
|
if (this.replicationView) {
|
||||||
|
this.replicationView.openModal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user