Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Melodic
melodic-frontend
Commits
81e0832b
Commit
81e0832b
authored
Feb 02, 2022
by
Marta Różańska
Browse files
Merge branch 'openstack' into 'morphemic-rc1.5'
fix See merge request
!29
parents
2766f7d8
3eab65a6
Pipeline
#19359
passed with stages
in 6 minutes and 5 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/app/deploying-application/service/deployment.service.ts
View file @
81e0832b
...
...
@@ -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
);
}
}
src/app/provider/cloud-definition-form/cloud-definition-form.component.html
View file @
81e0832b
...
...
@@ -71,6 +71,9 @@
'visibility'}}
</mat-icon>
</mat-form-field>
<mat-form-field
*ngIf=
"isOpenstack(apiForm)"
>
<input
matInput
formControlName=
"domain"
placeholder=
"domain"
>
</mat-form-field>
</form>
</mat-card>
...
...
@@ -89,6 +92,20 @@
{{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>
...
...
src/app/provider/cloud-definition-form/cloud-definition-form.component.ts
View file @
81e0832b
...
...
@@ -75,13 +75,17 @@ 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
,
...
...
@@ -204,6 +208,10 @@ 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
);
...
...
src/app/provider/model/cloud-configuration.ts
View file @
81e0832b
...
...
@@ -2,10 +2,17 @@ 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
;
}
}
src/app/provider/model/credential.ts
View file @
81e0832b
...
...
@@ -2,4 +2,5 @@ export class Credential {
id
?:
number
;
user
:
string
;
secret
:
string
;
domain
:
string
;
}
src/app/provider/model/view/cloud-configuration-for-read.ts
View file @
81e0832b
...
...
@@ -4,4 +4,7 @@ export class CloudConfigurationForRead {
id
?:
number
;
nodeGroup
:
string
;
properties
:
Array
<
ParentProperty
>
;
identityVersion
:
string
;
scopePrefix
:
string
;
scopeValue
:
string
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment