-
+
+
+
-
+
\ No newline at end of file
diff --git a/harbor-app/src/app/project/project.component.ts b/harbor-app/src/app/project/project.component.ts
index 148f2c417..bca32cf33 100644
--- a/harbor-app/src/app/project/project.component.ts
+++ b/harbor-app/src/app/project/project.component.ts
@@ -3,6 +3,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { ListProjectComponent } from './list-project/list-project.component';
+import { CreateProjectComponent } from './create-project/create-project.component';
@Component({
selector: 'project',
@@ -13,8 +14,20 @@ export class ProjectComponent implements OnInit {
@ViewChild(ListProjectComponent)
listProjects: ListProjectComponent;
+
+ @ViewChild(CreateProjectComponent)
+ creationProject: CreateProjectComponent;
+
lastFilteredType: number = 0;
+ openModal(): void {
+ this.creationProject.newProject();
+ }
+
+ deleteSelectedProjects(): void {
+ this.listProjects.deleteSelectedProjects();
+ }
+
createProject(created: boolean): void {
console.log('Project has been created:' + created);
this.listProjects.retrieve('', 0);
@@ -32,6 +45,10 @@ export class ProjectComponent implements OnInit {
this.listProjects.retrieve(projectName, this.lastFilteredType);
}
+ actionPerform(performed: boolean): void {
+ this.listProjects.retrieve('', 0);
+ }
+
ngOnInit(): void {
this.listProjects.retrieve('', 0);
}
diff --git a/harbor-app/src/app/project/project.module.ts b/harbor-app/src/app/project/project.module.ts
index e5d006764..d1704bd66 100644
--- a/harbor-app/src/app/project/project.module.ts
+++ b/harbor-app/src/app/project/project.module.ts
@@ -9,12 +9,15 @@ import { ProjectComponent } from './project.component';
import { CreateProjectComponent } from './create-project/create-project.component';
import { SearchProjectComponent } from './search-project/search-project.component';
import { FilterProjectComponent } from './filter-project/filter-project.component';
+import { ActionProjectComponent } from './action-project/action-project.component';
import { ListProjectComponent } from './list-project/list-project.component';
import { ProjectDetailComponent } from './project-detail/project-detail.component';
+
import { MemberComponent } from './member/member.component';
import { ProjectRoutingModule } from './project-routing.module';
import { ProjectService } from './project.service';
+import { DATAGRID_DIRECTIVES } from 'clarity-angular';
@NgModule({
imports: [
@@ -29,9 +32,10 @@ import { ProjectService } from './project.service';
CreateProjectComponent,
SearchProjectComponent,
FilterProjectComponent,
+ ActionProjectComponent,
ListProjectComponent,
ProjectDetailComponent,
- MemberComponent
+ MemberComponent
],
exports: [ ListProjectComponent ],
providers: [ ProjectService ]
diff --git a/harbor-app/src/app/project/project.service.ts b/harbor-app/src/app/project/project.service.ts
index 75ca04356..38f521124 100644
--- a/harbor-app/src/app/project/project.service.ts
+++ b/harbor-app/src/app/project/project.service.ts
@@ -8,6 +8,7 @@ import { BaseService } from '../service/base.service';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/map';
+import 'rxjs/add/observable/throw';
@Injectable()
export class ProjectService extends BaseService {
@@ -29,10 +30,23 @@ export class ProjectService extends BaseService {
createProject(name: string, isPublic: number): Observable