Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/kubernetes formular #6068

Open
wants to merge 25 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,14 @@ <h5 class="col-md-6 form-control-label">General Information</h5>
</strong>
</label>
<div class="col-md-8">
A cloud project is represented by an Openstack project which allows you to manage your virtual machines,
storage and network configurations.
@if (kubernetes_access) {
A cloud project is represented by a Kubernetes project which allows you to manage your virtual
machines, storage and network configurations. If it matches your project requirements, it may be that
Kubernetes is operated on top OpenStack.
} @else {
A cloud project is represented by an Openstack project which allows you to manage your virtual
machines, storage and network configurations.
}
</div>
</div>
<div class="form-group row" *ngIf="simple_vm_project">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import { Userinfo } from '../../userinfo/userinfo.model';
export class ApplicationFormularComponent extends ApplicationBaseClassComponent implements OnInit {
@Input() openstack_project: boolean = false;
@Input() simple_vm_project: boolean = false;
@Input() kubernetes_access: boolean = false;
@Input() title: string;
@Input() application: Application;
@Input() is_validation: boolean = false;
Expand Down Expand Up @@ -169,6 +170,7 @@ export class ApplicationFormularComponent extends ApplicationBaseClassComponent
initiateFormWithApplication(): void {
if (this.application && !this.initiated_validation && this.is_validation) {
this.openstack_project = this.application.project_application_openstack_project;

this.simple_vm_project = !this.openstack_project;
this.searchTermsInEdamTerms();

Expand All @@ -182,6 +184,7 @@ export class ApplicationFormularComponent extends ApplicationBaseClassComponent
} else {
this.application = new Application(null);
this.application.project_application_openstack_project = this.openstack_project;
this.application.project_application_kubernetes_access = this.kubernetes_access;
if (this.openstack_project) {
this.application.project_application_object_storage = 0;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<app-application-formular
[kubernetes_access]="kubernetes_access"
[openstack_project]="openstack_application"
[title]="title"
></app-application-formular>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Component } from '@angular/core';

/**
* This components provides the functions to create a new Kubernetes Cloud Application.
*/
@Component({
selector: 'app-kubernetes-formular',
templateUrl: 'kubernetes-formular.component.html',
styleUrls: ['kubernetes-formular.component.css'],
})
export class KubernetesFormularComponent {
openstack_application: boolean = true;
kubernetes_access: boolean = true;

title: string = 'New Kubernetes Application';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* #flavor-card {cursor: pointer;} */
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ import { Component } from '@angular/core';
templateUrl: 'addcloudapplication.component.html',
styleUrls: ['addcloudapplication.component.css'],
})

export class AddcloudapplicationComponent {
openstack_application: boolean = true;

title: string = 'New OpenStack Application';

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import { Component } from '@angular/core';
templateUrl: 'addsimplevm.component.html',
})
export class AddsimplevmComponent {

simple_vm_application: boolean = true;
title: string = 'New Simple Vm Application';

}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class Application {
project_application_total_gpu: number = 0;
lifetime_extension_request_id: number | string;
modification_extension_request_id: number | string;
project_application_kubernetes_access: boolean = false;

pi_approval_notification_send: boolean;
pi_approval_notification_expired: boolean;
Expand Down
23 changes: 13 additions & 10 deletions src/app/applications/applications-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import { RouterModule, Routes } from '@angular/router';

import { ApplicationsComponent } from './applications.component';

import { AddsimplevmComponent } from './addsimplevm.component';
import { AddcloudapplicationComponent } from './addcloudapplication.component';
import { AddsimplevmComponent } from './application-formular/simplevm-formular/addsimplevm.component';
import { AddcloudapplicationComponent } from './application-formular/openstack-formular/addcloudapplication.component';
import { TypeOverviewComponent } from './type-overview.component';
import { ValidationApplicationComponent } from '../validation-application/validation-application.component';
import { KubernetesFormularComponent } from './application-formular/kubernetes-formular/kubernetes-formular.component';

const routes: Routes = [
{
Expand All @@ -15,23 +16,27 @@ const routes: Routes = [
data: {
title: 'Application overview',
},

},
{
path: 'newCloudApplication',
component: AddcloudapplicationComponent,
data: {
title: 'New Application',
title: 'New OpenStack Application',
},
},
{
path: 'newKubernetesApplication',
component: KubernetesFormularComponent,
data: {
title: 'New Kubernetes Application',
},

},
{
path: 'newSimpleVmApplication',
component: AddsimplevmComponent,
data: {
title: 'New Application',
title: 'New SimpleVM Application',
},

},
{
path: 'type-overview',
Expand All @@ -47,7 +52,6 @@ const routes: Routes = [
title: 'Application Validation',
},
},

];

/**
Expand All @@ -57,5 +61,4 @@ const routes: Routes = [
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class ApplicationsRoutingModule {
}
export class ApplicationsRoutingModule {}
6 changes: 4 additions & 2 deletions src/app/applications/applications.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { NgSelectModule } from '@ng-select/ng-select';
import { BadgeModule } from '@coreui/angular';
import { ApplicationsComponent } from './applications.component';
import { ApplicationsRoutingModule } from './applications-routing.module';
import { AddsimplevmComponent } from './addsimplevm.component';
import { AddcloudapplicationComponent } from './addcloudapplication.component';
import { AddsimplevmComponent } from './application-formular/simplevm-formular/addsimplevm.component';
import { AddcloudapplicationComponent } from './application-formular/openstack-formular/addcloudapplication.component';
import { TypeOverviewComponent } from './type-overview.component';
import { ValidationApplicationComponent } from '../validation-application/validation-application.component';
import { ApplicationDetailComponent } from './application-detail/application-detail.component';
Expand All @@ -26,6 +26,7 @@ import { CreditsExtensionDetailComponent } from './application-detail/credits-ex
import { LifetimeExtensionDetailComponent } from './application-detail/lifetime-extension-detail/lifetime-extension-detail.component';
import { NewsModule } from '../news/news.module';
import { SharedModuleModule } from '../shared/shared_modules/shared-module.module';
import { KubernetesFormularComponent } from './application-formular/kubernetes-formular/kubernetes-formular.component';

/**
* Applications Module.
Expand All @@ -49,6 +50,7 @@ import { SharedModuleModule } from '../shared/shared_modules/shared-module.modul
ApplicationsComponent,
AddsimplevmComponent,
AddcloudapplicationComponent,
KubernetesFormularComponent,
TypeOverviewComponent,
ValidationApplicationComponent,
ApplicationDetailComponent,
Expand Down