Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sören Giller authored and Sören Giller committed Aug 2, 2018
2 parents 59cd313 + e59e7ee commit f7705c5
Show file tree
Hide file tree
Showing 31 changed files with 1,109 additions and 512 deletions.
10 changes: 10 additions & 0 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Try to fulfill the following points before the Pull Request is merged:

- [ ] The PR is reviewed by one of the team members.
- [ ] If the PR is merged in the master then a release should be be made.

For releases only:

- [ ] If the review of this PR is approved and the PR is followed by a release then the .env file
in the cloud-portal repo should also be updated.
- [ ] If you are making a release then please sum up the changes since the last release on the release page using the [clog](https://github.com/clog-tool/clog-cli) tool with `clog -F`
1 change: 0 additions & 1 deletion src/app/api-connector/group.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ export class GroupService {
params: {groupid: groupid}
}).map((res: Response) => res.json()).catch((error: any) => Observable.throw(error.json().error || 'Server error'))


}

setPerunId(groupid: string, applicationId: string): Observable<any> {
Expand Down
24 changes: 23 additions & 1 deletion src/app/api-connector/virtualmachine.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class VirtualmachineService {
}


startVM(flavor: string, image: string, servername: string, project: string, projectid: string, diskspace?: string): Observable<Response> {
startVM(flavor: string, image: string, servername: string, project: string, projectid: string,volumename?:string, diskspace?: string): Observable<Response> {

let header = new Headers({
'X-CSRFToken': this.settings.getCSRFToken(),
Expand All @@ -31,6 +31,7 @@ export class VirtualmachineService {
urlSearchParams.append('project', project);
urlSearchParams.append('projectid', projectid);
urlSearchParams.append('diskspace', diskspace);
urlSearchParams.append('volumename',volumename);

return this.http.post(this.baseVmUrl + 'createVm/', urlSearchParams, {
withCredentials: true,
Expand Down Expand Up @@ -152,6 +153,27 @@ export class VirtualmachineService {

}




createVolume(volume_name: string, volume_diskspace: string,vm_openstackid): Observable<Response> {
let header = new Headers({
'X-CSRFToken': this.settings.getCSRFToken(),
});
let urlSearchParams = new URLSearchParams();

urlSearchParams.append('volume_name', volume_name);
urlSearchParams.append('volume_diskspace', volume_diskspace);
urlSearchParams.append('vm_openstackid', vm_openstackid);



return this.http.post(this.settings.getConnectorBaseUrl() + 'volumes/createVolume/', urlSearchParams, {
withCredentials: true,
headers: header,
});
}

attachVolumetoServer(volume_id: string, instance_id: string): Observable<Response> {
let header = new Headers({
'X-CSRFToken': this.settings.getCSRFToken(),
Expand Down
18 changes: 8 additions & 10 deletions src/app/applications/addcloudapplication.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,16 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
<span class="input-group-addon"> GB
</span>
</div>
<span class="help-block">How many extra storage do you need for your Vms?</span>
<span class="help-block">How many extra storage do you need for your VMs?</span>
</div>
</div>

<div class="form-group row" [ngClass]="{
'has-danger': f.controls.project_application_volume_counter?.invalid,
'has-success': f.controls.project_application_volume_counter?.valid
}">
<label class="col-md-4 form-control-label" for="textarea-input"><strong>Volume Counter*
<label class="col-md-4 form-control-label" for="textarea-input"><strong>Number of storage
volumes*
<i
class="icon-question" onmouseover="" style="cursor: pointer;"
data-toggle="tooltip" data-placement="auto"
Expand All @@ -223,8 +224,6 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
name="project_application_volume_counter"
placeholder="e.g. 20"
type="number" min="0" step="1" [ngModel]="project_application_vms_requested">
<span class="input-group-addon"> GB
</span>
</div>
<span class="help-block">How many storage volumes do you want to use?</span>
</div>
Expand Down Expand Up @@ -320,16 +319,15 @@ <h5 class="col-md-6 form-control-label">Institutional Information</h5>

</div>

<div class="form-group row">
<p class="col-md-12 form-control-label">By submitting this application you agree to the
cloud
usage policy.</p>
</div>


</form>
</div>
<div class="card-footer">
<div class="form-group row">
<p class="col-md-12 form-control-label">By submitting this application you agree to the
cloud
usage policy.</p>
</div>
<button (click)="acknowledgemodal.show()"
[disabled]="f.invalid"
class="btn btn-sm btn-primary"><i
Expand Down
48 changes: 28 additions & 20 deletions src/app/applications/addsinglevm.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ <h5 class="col-md-6 form-control-label">General Information</h5>
<label class="col-md-4">
<strong>Single Virtual Machines Project
<i
class="icon-question" onmouseover="" style="cursor: pointer;" data-toggle="tooltip" data-placement="auto"
class="icon-question" onmouseover="" style="cursor: pointer;"
data-toggle="tooltip" data-placement="auto"
title="You will be able to start virtual machines through the portal with minimal
effort and access them via ssh. This project type does not demand knowlegde in cloud
computing."></i>
Expand All @@ -45,7 +46,8 @@ <h5 class="col-md-6 form-control-label">General Information</h5>
'has-success': f.controls.project_application_name?.valid && (f.controls.project_application_name?.dirty || f.controls.project_application_name?.touched)
}">
<label class="col-md-4 form-control-label" for="text-input"><strong>Project
Name* <i class="icon-question" onmouseover="" style="cursor: pointer;" data-toggle="tooltip" data-placement="auto"
Name* <i class="icon-question" onmouseover="" style="cursor: pointer;"
data-toggle="tooltip" data-placement="auto"
title="Full name of your project"></i></strong></label>
<div class="col-md-8">
<input required type="text" id="id_project_application_name"
Expand All @@ -63,7 +65,8 @@ <h5 class="col-md-6 form-control-label">General Information</h5>
'has-success': f.controls.project_application_shortname?.valid && (f.controls.project_application_shortname?.dirty || f.controls.project_application_shortname?.touched)
}">
<label class="col-md-4 form-control-label" for="text-input"><strong>Project
Short Name* <i class="icon-question" onmouseover="" style="cursor: pointer;" data-toggle="tooltip" data-placement="auto"
Short Name* <i class="icon-question" onmouseover="" style="cursor: pointer;"
data-toggle="tooltip" data-placement="auto"
title="Shortname of your project. This name will be referenced in OpenStack and also when you start a new virtual machine. Use between 5 and 15 characters"></i></strong></label>
<div class="col-md-8">
<div *ngIf='wronginput'>
Expand All @@ -87,7 +90,8 @@ <h5 class="col-md-6 form-control-label">General Information</h5>
'has-success': f.controls.project_application_description?.valid && (f.controls.project_application_description?.dirty || f.controls.project_application_description?.touched)
}">
<label class="col-md-4 form-control-label" for="textarea-input"><strong>Project
Description* <i class="icon-question" onmouseover="" style="cursor: pointer;" data-toggle="tooltip" data-placement="auto"
Description* <i class="icon-question" onmouseover="" style="cursor: pointer;"
data-toggle="tooltip" data-placement="auto"
title="Full description of your project including tools you might
are going to use."></i></strong></label>
<div class="col-md-8">
Expand All @@ -105,7 +109,8 @@ <h5 class="col-md-6 form-control-label">General Information</h5>
'has-success': f.controls.project_application_lifetime?.valid && (f.controls.project_application_lifetime?.dirty || f.controls.project_application_lifetime?.touched)
}">
<label class="col-md-4 form-control-label" for="textarea-input"><strong>Desired
lifetime* <i class="icon-question" onmouseover="" style="cursor: pointer;" data-toggle="tooltip" data-placement="auto"
lifetime* <i class="icon-question" onmouseover="" style="cursor: pointer;"
data-toggle="tooltip" data-placement="auto"
title="Lifetime in months of your project"></i></strong></label>
<div class="col-md-8">
<div class="input-group">
Expand All @@ -129,7 +134,8 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
'has-success': f.controls.project_application_vms_requested?.valid
}">
<label class="col-md-4 form-control-label" for="textarea-input"><strong>Number of Virtual
Machines* <i class="icon-question" onmouseover="" style="cursor: pointer;" data-toggle="tooltip" data-placement="auto"
Machines* <i class="icon-question" onmouseover="" style="cursor: pointer;"
data-toggle="tooltip" data-placement="auto"
title="A virtual machine allows you to run operating system of your choice with flexible resource parameters like number of CPUs and RAM."></i></strong></label>
<div class="col-md-8">
<div class="input-group">
Expand All @@ -150,7 +156,8 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
}">
<label class="col-md-4 form-control-label" for="textarea-input"><strong>Storage Limit*
<i
class="icon-question" onmouseover="" style="cursor: pointer;" data-toggle="tooltip" data-placement="auto"
class="icon-question" onmouseover="" style="cursor: pointer;"
data-toggle="tooltip" data-placement="auto"
title="Storage limit is the sum of extra storage provided by volumes."></i></strong></label>
<div class="col-md-8">
<div class="input-group">
Expand All @@ -161,26 +168,26 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
<span class="input-group-addon"> GB
</span>
</div>
<span class="help-block">How many extra storage do you need for your Vms?</span>
<span class="help-block">How many extra storage do you need for your VMs?</span>
</div>
</div>

<div class="form-group row" [ngClass]="{
'has-danger': f.controls.project_application_volume_counter?.invalid,
'has-success': f.controls.project_application_volume_counter?.valid
}">
<label class="col-md-4 form-control-label" for="textarea-input"><strong>Volume Counter*
<label class="col-md-4 form-control-label" for="textarea-input"><strong>Number of storage
volumes*
<i
class="icon-question" onmouseover="" style="cursor: pointer;" data-toggle="tooltip" data-placement="auto"
class="icon-question" onmouseover="" style="cursor: pointer;"
data-toggle="tooltip" data-placement="auto"
title="The number of storage volumes allowed to create. Each vm is allowed to mount only one storage volume. The sum of the volumes size equals the value provided in the sotrage limit field"></i></strong></label>
<div class="col-md-8">
<div class="input-group">
<input required class="form-control" id="id_project_application_volume_counter"
name="project_application_volume_counter"
placeholder="e.g. 20"
type="number" min="0" step="1" [ngModel]="project_application_vms_requested">
<span class="input-group-addon"> GB
</span>
</div>
<span class="help-block">How many storage volumes do you want to use?</span>
</div>
Expand Down Expand Up @@ -219,7 +226,8 @@ <h5 class="col-md-6 form-control-label">Institutional Information</h5>
'has-success': f.controls.project_application_institute?.valid && (f.controls.project_application_institute?.dirty || f.controls.project_application_institute?.touched)
}">
<label class="col-md-4 form-control-label" for="text-input"><strong>Institute Name* <i
class="icon-question" onmouseover="" style="cursor: pointer;" data-toggle="tooltip" data-placement="auto"
class="icon-question" onmouseover="" style="cursor: pointer;" data-toggle="tooltip"
data-placement="auto"
title="Your institute"></i></strong></label>
<div class="col-md-8">
<input required type="text" id="id_project_application_institute"
Expand All @@ -234,7 +242,8 @@ <h5 class="col-md-6 form-control-label">Institutional Information</h5>
'has-success': f.controls.project_application_workgroup?.valid && (f.controls.project_application_workgroup?.dirty || f.controls.project_application_workgroup?.touched)
}">
<label class="col-md-4 form-control-label" for="text-input"><strong>Workgroup Name* <i
class="icon-question" onmouseover="" style="cursor: pointer;" data-toggle="tooltip" data-placement="auto"
class="icon-question" onmouseover="" style="cursor: pointer;" data-toggle="tooltip"
data-placement="auto"
title="Your workgroup"></i></strong></label>
<div class="col-md-8">
<input required type="text" id="id_project_application_workgroup"
Expand All @@ -245,16 +254,15 @@ <h5 class="col-md-6 form-control-label">Institutional Information</h5>

</div>

<div class="form-group row">
<p class="col-md-12 form-control-label">By submitting this application you agree to the
cloud
usage policy.</p>
</div>


</form>
</div>
<div class="card-footer">
<div class="form-group row">
<p class="col-md-12 form-control-label">By submitting this application you agree to the
cloud
usage policy.</p>
</div>
<button (click)="acknowledgemodal.show()"
[disabled]="f.invalid"
class="btn btn-sm btn-primary"><i
Expand Down
Loading

0 comments on commit f7705c5

Please sign in to comment.