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 Jul 27, 2018
2 parents 5fd2474 + 121214c commit cf715fa
Show file tree
Hide file tree
Showing 16 changed files with 300 additions and 149 deletions.
13 changes: 0 additions & 13 deletions Dockerfile-dev

This file was deleted.

23 changes: 18 additions & 5 deletions src/app/api-connector/group.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export class GroupService {
}


setGroupVolumeCounter(group_id: number, value: number) {
setGroupVolumeCounter(group_id: number, value: number) {
let urlSearchParams = new URLSearchParams();
let header = new Headers({
'X-CSRFToken': this.settings.getCSRFToken(),
Expand Down Expand Up @@ -381,9 +381,7 @@ export class GroupService {
}




getVolumesUsed(groupid: string): Observable<any> {
getVolumesUsed(groupid: string): Observable<any> {
return this.http.get(this.settings.getApiBaseURL() + 'project/getUsedVolumes/', {
withCredentials: true,
params: {groupid: groupid}
Expand All @@ -392,7 +390,7 @@ export class GroupService {

}

getVolumeCounter(groupid: string): Observable<any> {
getVolumeCounter(groupid: string): Observable<any> {
return this.http.get(this.settings.getApiBaseURL() + 'project/getVolumesCounter/', {
withCredentials: true,
params: {groupid: groupid}
Expand Down Expand Up @@ -437,4 +435,19 @@ export class GroupService {

}


setPerunGroupAttributes(application_id: number, groupid: number) {
let urlSearchParams = new URLSearchParams();
let header = new Headers({
'X-CSRFToken': this.settings.getCSRFToken(),
});
urlSearchParams.append('groupid', groupid.toString());
urlSearchParams.append('application_id', application_id.toString());
return this.http.post(this.settings.getApiBaseURL() + 'group/setAttributes/', urlSearchParams, {
withCredentials: true,
headers: header
})
}


}
4 changes: 3 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {PerunSettings} from "./perun-connector/connector-settings.service";
import {ApiSettings} from "./api-connector/api-settings.service";
// Routing Module
import {AppRoutingModule} from './app.routing';
import {PaginationModule} from 'ngx-bootstrap/pagination';

// Layouts
import {FullLayoutComponent} from './layouts/full-layout.component';
Expand All @@ -34,7 +35,8 @@ import {UserService} from "./api-connector/user.service";
TabsModule.forRoot(),
ChartsModule,
ModalModule.forRoot(),
PopoverModule
PopoverModule,
PaginationModule.forRoot(),
],
declarations: [
AppComponent,
Expand Down
50 changes: 34 additions & 16 deletions src/app/applications/addcloudapplication.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@
<h5 class="col-md-6 form-control-label">General Information</h5>
</div>
<div class="form-group row">
<label class="col-md-4"><strong>Cloud Project <i class="icon-question" data-toggle="tooltip" data-placement="auto"
title="By choosing this project type you will have your own OpenStack project. This allows you to use any framework available in the cloud computing context."></i>
</strong>
<label class="col-md-4"><strong>Cloud Project <i class="icon-question menu_links"
data-toggle="tooltip"
data-placement="auto" onmouseover=""
style="cursor: pointer;"
title="By choosing this project type you will have your own OpenStack project. This allows you to use any framework available in the cloud computing context."></i>
</strong>
</label>
<div class="col-md-8">
A cloud project is represented by an Openstack project which allows you to manage your
Expand All @@ -33,6 +36,7 @@ <h5 class="col-md-6 form-control-label">General Information</h5>
}">
<label class="col-md-4 form-control-label" for="text-input"><strong>Project
Name* <i class="icon-question" data-toggle="tooltip" data-placement="auto"
onmouseover="" style="cursor: pointer;"
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 @@ -52,6 +56,7 @@ <h5 class="col-md-6 form-control-label">General Information</h5>
}">
<label class="col-md-4 form-control-label" for="text-input"><strong>Project
Short Name* <i class="icon-question" data-toggle="tooltip" data-placement="auto"
onmouseover="" style="cursor: pointer;"
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 @@ -75,7 +80,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" 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 @@ -93,7 +99,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" 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 @@ -118,14 +125,16 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
}">
<label class="col-md-4 form-control-label" for="textarea-input"><strong>Number of
Virtual
Machines* <i class="icon-question" 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">
<input required class="form-control" id="id_project_application_vms_requested"
name="project_application_vms_requested"
placeholder="e.g. 5"
type="number" min="1" step="1" [(ngModel)]="project_application_vms_requested">
type="number" min="1" step="1"
[(ngModel)]="project_application_vms_requested">
<span class="input-group-addon"> VMs
</span>
</div>
Expand All @@ -138,7 +147,8 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
'has-success': f.controls.project_application_cores_per_vm?.valid
}">
<label class="col-md-4 form-control-label" for="textarea-input"><strong>Cores per VM* <i
class="icon-question" data-toggle="tooltip" data-placement="auto"
class="icon-question" onmouseover="" style="cursor: pointer;" data-toggle="tooltip"
data-placement="auto"
title="A CPU core is the processing unit of your virtual machine."></i></strong></label>
<div class="col-md-8">
<div class="input-group">
Expand All @@ -160,7 +170,8 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
'has-success': f.controls.project_application_ram_per_vm?.valid
}">
<label class="col-md-4 form-control-label" for="textarea-input"><strong>RAM per VM* <i
class="icon-question" data-toggle="tooltip" data-placement="auto"
class="icon-question" onmouseover="" style="cursor: pointer;" data-toggle="tooltip"
data-placement="auto"
title="RAM is where data is stored that is accessed by the CPU."></i></strong></label>
<div class="col-md-8">
<div class="input-group">
Expand All @@ -181,7 +192,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" 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 @@ -196,17 +208,18 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
</div>
</div>

<div class="form-group row" [ngClass]="{
<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*
<i
class="icon-question" data-toggle="tooltip" data-placement="auto"
class="icon-question" onmouseover="" style="cursor: pointer;"
data-toggle="tooltip" data-placement="auto"
title="Number of volumes allowed to create. The sum of the volumes size equals the value provided in the storage 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"
<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">
Expand All @@ -223,7 +236,8 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
'has-success': f.controls.project_application_object_storage?.valid
}">
<label class="col-md-4 form-control-label" for="textarea-input">Object Storage <i
class="icon-question" data-toggle="tooltip" data-placement="auto"
class="icon-question" onmouseover="" style="cursor: pointer;" data-toggle="tooltip"
data-placement="auto"
title="Object storage is a method of storing data that does not use a directory tree internally. Object storage combines files with metadata and places it in a flat structure."></i></label>
<div class="col-md-8">
<div class="input-group">
Expand All @@ -241,6 +255,8 @@ <h5 class="col-md-12 form-control-label">Resources</h5>

<div class="form-group row">
<label class="col-md-4 form-control-label">Special Hardware <i class="icon-question"
onmouseover=""
style="cursor: pointer;"
data-toggle="tooltip"
data-placement="auto"
title="GPU means Graphics Processing Unit and is often used for machine learning. A field programmable gate array (FPGA) represents a reconfigurable computing architecture."></i></label>
Expand Down Expand Up @@ -276,7 +292,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" 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 @@ -291,7 +308,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" 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 Down
Loading

0 comments on commit cf715fa

Please sign in to comment.