Commit 97ccfa47 authored by Marta Różańska's avatar Marta Różańska
Browse files

Merge branch 'uf-creator' into 'morphemic-rc2.0'

Uf creator

See merge request !26
parents 34b2deae 4cf0608e
Pipeline #19048 passed with stages
in 5 minutes and 58 seconds
......@@ -24,7 +24,7 @@ build-ui-docker:
- rc3.1
- morphemic-rc1.5
- morphemic-rc2.0
- byonfix
- uf-creator
image: docker:19.03.1
services:
- docker:19.03.1-dind
......
......@@ -26,8 +26,7 @@
"src/styles.css",
"src/theme.scss"
],
"scripts": [],
"es5BrowserSupport": true
"scripts": []
},
"configurations": {
"production": {
......
This diff is collapsed.
......@@ -4,4 +4,5 @@ export interface AppConfig {
grafanaUrl: string;
webSshUrl: string;
kibanaUrl: string;
ufcreatorUrl: string;
}
......@@ -37,6 +37,7 @@ export class AppConfigService {
grafanaUrl = environment.grafanaUrl;
webSshUrl = environment.webSshUrl;
kibanaUrl = environment.kibanaUrl;
ufcreatorUrl = environment.ufcreatorUrl;
}();
resolve();
}
......
......@@ -3,7 +3,8 @@ import {RouterModule, Routes} from '@angular/router';
import {DeployingMainComponent} from '../deploying-main/deploying-main.component';
const routes: Routes = [
{path: '', component: DeployingMainComponent}
{path: '', component: DeployingMainComponent},
];
@NgModule({
......
......@@ -99,8 +99,7 @@ export class DeploymentService {
private mapCloudConfForReadToCloudConf(cloudConf: CloudConfigurationForRead): CloudConfiguration {
const chosenProperty = cloudConf.properties.filter(value => value.checked);
return new CloudConfiguration(cloudConf.nodeGroup, chosenProperty);
return new CloudConfiguration(cloudConf.nodeGroup, chosenProperty, cloudConf.scopePrefix, cloudConf.scopeValue, cloudConf.identityVersion);
}
}
......@@ -67,6 +67,11 @@
</mat-card>
</div>
<button button mat-raised-button color="primary" (click)="onUfCreatorClick()" class="monitoring-button">
<mat-icon>forward</mat-icon>
Uf Creator
</button>
</mat-card-content>
</mat-card>
</div>
......@@ -7,6 +7,7 @@ import {SensitiveVariablesDialogComponent} from '../../file-uploader/sensitive-v
import {SecureVariablesService} from '../../file-uploader/service/secure-variables.service';
import {SecureVariable} from '../../file-uploader/model/secure-variable';
import {MenuComponent} from '../../common-template/menu/menu.component';
import {Router} from "@angular/router";
@Component({
......@@ -29,6 +30,7 @@ export class UploaderXmiComponent implements OnInit {
constructor(private snackBar: MatSnackBar,
private dialog: MatDialog,
private router: Router,
private deploymentService: DeploymentService,
private secureVariablesService: SecureVariablesService,
private menuComponent: MenuComponent) {
......@@ -171,4 +173,10 @@ export class UploaderXmiComponent implements OnInit {
this.secureVariablesUploadingInProgress = false;
this.menuComponent.unblockUIView();
}
onUfCreatorClick() {
console.log(`Click for uf-creator redirection`);
window.open(AppConfigService.settings.ufcreatorUrl);
}
}
......@@ -71,10 +71,14 @@
'visibility'}}
</mat-icon>
</mat-form-field>
<mat-form-field *ngIf="isOpenstack(apiForm)">
<input matInput formControlName="domain" placeholder="domain">
</mat-form-field>
</form>
</mat-card>
<mat-card>
<form [formGroup]="cloudConfigurationForm">
<mat-form-field>
......@@ -89,6 +93,19 @@
{{getNodeGroupPatternMsg()}}
</mat-error>
</mat-form-field>
<div *ngIf="isOpenstack(apiForm)">
<mat-form-field>
<input matInput formControlName="identityVersion" placeholder="identityVersion" >
</mat-form-field>
<mat-form-field>
<input matInput formControlName="scopePrefix" placeholder="scopePrefix" >
</mat-form-field>
<mat-form-field>
<input matInput formControlName="scopeValue" placeholder="scopeValue" >
</mat-form-field>
</div>
<mat-card-subtitle><h3>Cloud properties</h3></mat-card-subtitle>
......
import {Component, Inject, OnInit, Optional} from '@angular/core';
import {FormBuilder, FormControl, FormGroup, NgForm, Validators} from '@angular/forms';
import {FormBuilder, FormControl, FormGroup, FormGroupDirective, NgForm, Validators} from '@angular/forms';
import {MAT_DIALOG_DATA, MatDialog, MatDialogRef, MatSnackBar, MatTableDataSource} from '@angular/material';
import {CloudDefinition} from '../model/cloud-definition';
import {CloudType} from '../model/cloud-type';
......@@ -75,13 +75,19 @@ export class CloudDefinitionFormComponent implements OnInit {
[Validators.required])
: ['', [Validators.required]],
secret: this.cloudData ? new FormControl({value: this.cloudData.credential.secret, disabled: this.isReadMode})
: ['', Validators.required]
: ['', Validators.required],
domain: this.cloudData.credential.domain
});
this.cloudConfigurationForm = this.formBuilder.group({
id: this.cloudData ? this.cloudData.cloudConfiguration.id : null,
nodeGroup: this.cloudData ? new FormControl({value: this.cloudData.cloudConfiguration.nodeGroup, disabled: this.isReadMode})
: ['', [Validators.required, Validators.pattern(this.nodeGroupPattern)]],
properties: this.cloudData ? this.cloudData.cloudConfiguration.properties : this.cloudProperties
properties: this.cloudData ? this.cloudData.cloudConfiguration.properties : this.cloudProperties,
identityVersion: this.cloudData.cloudConfiguration.identityVersion,
scopePrefix: this.cloudData.cloudConfiguration.scopePrefix,
scopeValue: this.cloudData.cloudConfiguration.scopeValue
});
this.cloudDefinitionForm = this.formBuilder.group({
id: this.cloudData ? this.cloudData.id : null,
......@@ -138,7 +144,7 @@ export class CloudDefinitionFormComponent implements OnInit {
return 'Required min 3 sings length. Only lowercase and digits are allowed.';
}
saveCloudDefinition(cloudForm: NgForm) {
saveCloudDefinition(cloudForm: FormGroupDirective) {
this.cloudConfigurationFormControl.properties.setValue(this.cloudProperties);
const cloudDefinition = <CloudDefinition> cloudForm.value;
this.dialogRef.close(cloudDefinition);
......@@ -204,6 +210,9 @@ export class CloudDefinitionFormComponent implements OnInit {
});
}
isOpenstack(apiForm: FormGroup) {
return apiForm.value.providerName === 'openstack';
}
private deleteCloudProperty(row: ParentProperty) {
const deletedPropertyId = this.cloudProperties.findIndex(value => value.id === row.id);
this.cloudProperties.splice(deletedPropertyId, 1);
......
......@@ -2,10 +2,18 @@ export class CloudConfiguration {
id?: number;
nodeGroup: string;
properties: {};
scopePrefix: string;
scopeValue: string;
identityVersion: string;
constructor(nodeGroupArg: string, propertiesArg: {}, idArg?: number) {
constructor(nodeGroupArg: string, propertiesArg: {}, scopePrefixArg: string,
scopeValueArg: string, identityVersionArg: string, idArg?: number) {
this.id = idArg;
this.nodeGroup = nodeGroupArg;
this.properties = propertiesArg;
this.scopePrefix = scopePrefixArg;
this.scopeValue = scopeValueArg;
this.identityVersion = identityVersionArg;
}
}
......@@ -2,4 +2,5 @@ export class Credential {
id?: number;
user: string;
secret: string;
domain: string;
}
......@@ -4,4 +4,7 @@ export class CloudConfigurationForRead {
id?: number;
nodeGroup: string;
properties: Array<ParentProperty>;
identityVersion: string;
scopePrefix: string;
scopeValue: string;
}
......@@ -3,5 +3,6 @@
"camundaUrl": "${CAMUNDA_URL}",
"grafanaUrl": "${GRAFANA_URL}",
"webSshUrl": "${WEBSSH_URL}",
"kibanaUrl": "${KIBANA_URL}"
"kibanaUrl": "${KIBANA_URL}",
"ufcreatorUrl": "${UFCREATOR_URL}"
}
......@@ -6,5 +6,6 @@ export const environment = {
camundaUrl: 'http://gui-backend:8095',
grafanaUrl: 'http://gui-backend:3000',
webSshUrl: 'https://gui-backend:4433',
kibanaUrl: 'http://gui-backend:5601'
kibanaUrl: 'http://gui-backend:5601',
ufcreatorUrl: 'http://localhost:81'
};
......@@ -10,7 +10,8 @@ export const environment = {
camundaUrl: 'http://localhost:8095',
grafanaUrl: 'http://localhost:3000',
webSshUrl: 'https://localhost:4433',
kibanaUrl: 'http://localhost:5601'
kibanaUrl: 'http://localhost:5601',
ufcreatorUrl: 'http://localhost:81'
};
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment