Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Dec 14, 2018
2 parents b1601c1 + 6d5a3d3 commit c991070
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 30 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@


#### Bug Fixes

* **Application:** fixed ram gb

#### Features

* **Application:**
* if without faciltiy approve
* vo can approve without facility


------
#### Bug Fixes
* **volume:** fixed volume bug
* **development:** remove nvmrc file
Expand Down
18 changes: 9 additions & 9 deletions src/app/applications/applications.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ <h1>Applications Overview</h1>
<td>RAM</td>
<td>{{
application.RamPerVM
}}
}} GB
</td>
</tr>
<tr *ngIf="application.OpenStackProject && application.TotalRam != 0">
<td>RAM</td>
<td>{{
application.TotalRam}}
application.TotalRam}} GB
</td>
</tr>
<tr>
Expand Down Expand Up @@ -259,7 +259,7 @@ <h1>Applications Overview</h1>
class="form-control"
#selectedComputeCenter>

<!--option value="undefined" selected> no center</option-->
<option value="undefined" selected> no center</option>
<option *ngFor="let computeCenter of computeCenters"
value="{{computeCenter.FacilityId}}">
{{computeCenter.Name}}
Expand All @@ -279,7 +279,7 @@ <h1>Applications Overview</h1>
type="button"
class="btn btn-secondary">
<i class="fa fa-check"></i>&nbsp;
Approve
Assign
</button>
<button
*ngIf="application.Status == 6 && application.ComputeCenter?.FacilityId"
Expand Down Expand Up @@ -472,14 +472,14 @@ <h1>Applications Overview</h1>
<tr *ngIf="application.OpenStackProject && application.TotalRam == 0">
<td>RAM</td>
<td>{{
application.RamPerVM
}}
application.RamPerVM
}} GB
</td>
</tr>
<tr *ngIf="application.OpenStackProject && application.TotalRam != 0">
<td>RAM</td>
<td>{{
application.TotalRam}}
application.TotalRam}} GB
</td>
</tr>
<tr>
Expand Down Expand Up @@ -690,13 +690,13 @@ <h1>Applications Overview</h1>
<td>RAM</td>
<td>{{
application.RamPerVM
}}
}} GB
</td>
</tr>
<tr *ngIf="application.OpenStackProject && application.TotalRam != 0">
<td>RAM</td>
<td>{{
application.TotalRam}}
application.TotalRam}} GB
</td>
</tr>
<tr>
Expand Down
72 changes: 54 additions & 18 deletions src/app/applications/applications.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -738,32 +738,65 @@ export class ApplicationsComponent extends AbstractBaseClasse {
this.groupservice.addAdmin(new_group_id, manager_member_user_id, compute_center).subscribe(res => {
this.groupservice.setPerunGroupAttributes(application_id, new_group_id).subscribe(res => {
this.groupservice.assignGroupToResource(new_group_id.toString(), compute_center).subscribe(res => {
this.applicationstatusservice.setApplicationStatus(application_id, this.application_statuses.WAIT_FOR_CONFIRMATION, compute_center).subscribe(result => {
if (result['Error']) {
this.updateNotificationModal("Failed", result['Error'], true, "danger");
if (compute_center != 'undefined') {

}
else {
this.updateNotificationModal("Success", "The new project was created", true, "success");
}
for (let app of this.user_applications) {
if (app.Id == application_id) {
this.getUserApplication(app);
break;
this.applicationstatusservice.setApplicationStatus(application_id, this.application_statuses.WAIT_FOR_CONFIRMATION, compute_center).subscribe(result => {
if (result['Error']) {
this.updateNotificationModal("Failed", result['Error'], true, "danger");

}
else {
this.updateNotificationModal("Success", "The new project was created", true, "success");
}
for (let app of this.user_applications) {
if (app.Id == application_id) {
this.getUserApplication(app);
break;

}

}
for (let app of this.all_applications) {
if (app.Id == application_id) {
this.getApplication(app);
break;

}
for (let app of this.all_applications) {
if (app.Id == application_id) {
this.getApplication(app);
break;

}
}
}
}
)
)
} else {
this.groupservice.setPerunGroupStatus(new_group_id, this.application_statuses.APPROVED).subscribe(res => {
this.applicationstatusservice.setApplicationStatus(application_id, this.application_statuses.APPROVED, compute_center).subscribe(result => {
if (result['Error']) {
this.updateNotificationModal("Failed", result['Error'], true, "danger");

}
else {
this.updateNotificationModal("Success", "The new project was created", true, "success");
}
for (let app of this.user_applications) {
if (app.Id == application_id) {
this.getUserApplication(app);
break;

}


}
for (let app of this.all_applications) {
if (app.Id == application_id) {
this.getApplication(app);
break;

}
}
})

})

}
});
})

Expand Down Expand Up @@ -879,6 +912,9 @@ export class ApplicationsComponent extends AbstractBaseClasse {
this.updateNotificationModal("Failed", "Project could not be created!", true, "danger");
});
}
else {
this.updateNotificationModal("Failed", "You need to select an compute center!", true, "danger");
}

}

Expand Down
7 changes: 4 additions & 3 deletions src/app/shared_modules/baseClass/filter-base-class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export abstract class FilterBaseClass extends AbstractBaseClasse {

isFilterProjectStatus(status_number: number, lifetime_reached: number): boolean {
let status: string;
let lifetime_status: string;
switch (status_number) {
case this.project_statuses.ACTIVE:
status = this.project_statuses[this.project_statuses.ACTIVE];
Expand All @@ -93,14 +94,14 @@ export abstract class FilterBaseClass extends AbstractBaseClasse {
}
switch (lifetime_reached) {
case this.lifetime_statuses.EXPIRED:
status = this.lifetime_statuses[this.lifetime_statuses.EXPIRED];
lifetime_status = this.lifetime_statuses[this.lifetime_statuses.EXPIRED];
break;
case this.lifetime_statuses.EXPIRES_SOON:
status = this.lifetime_statuses[this.lifetime_statuses.EXPIRES_SOON];
lifetime_status = this.lifetime_statuses[this.lifetime_statuses.EXPIRES_SOON];break;
}


if (this.filterstatus_list[status]
if (this.filterstatus_list[status] || this.filterstatus_list[lifetime_status]
) {

return true
Expand Down

0 comments on commit c991070

Please sign in to comment.