File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
app/javascript/components/miq-ae-class Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,11 @@ import { componentTypes } from '@@ddf';
3
3
const createSchema = ( fqname ) => ( {
4
4
fields : [
5
5
{
6
- component : componentTypes . PLAIN_TEXT ,
6
+ component : componentTypes . TEXT_FIELD ,
7
7
name : 'fqname' ,
8
- label : `${ __ ( 'Fully Qualified Name' ) } :\t ${ fqname } ` ,
8
+ label : 'Fully Qualified Name' ,
9
+ value : `${ fqname } ` ,
10
+ disabled : true ,
9
11
} ,
10
12
{
11
13
component : componentTypes . TEXT_FIELD ,
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import miqRedirectBack from '../../helpers/miq-redirect-back';
8
8
import miqFlash from '../../helpers/miq-flash' ;
9
9
10
10
const MiqAeClass = ( { classRecord, fqname } ) => {
11
+ const formattedFqname = fqname . replace ( / \s + / g, '' ) ;
11
12
const [ data , setData ] = useState ( {
12
13
isLoading : true ,
13
14
initialValues : undefined ,
@@ -24,7 +25,7 @@ const MiqAeClass = ({ classRecord, fqname }) => {
24
25
} ) ;
25
26
} else {
26
27
const initialValues = {
27
- fqname ,
28
+ formattedFqname ,
28
29
name : classRecord && classRecord . name ,
29
30
display_name : classRecord && classRecord . display_name ,
30
31
description : classRecord && classRecord . description ,
@@ -86,7 +87,7 @@ const MiqAeClass = ({ classRecord, fqname }) => {
86
87
? (
87
88
< div className = "dialog-provision-form" >
88
89
< MiqFormRenderer
89
- schema = { createSchema ( fqname ) }
90
+ schema = { createSchema ( formattedFqname ) }
90
91
initialValues = { data . initialValues }
91
92
validatorMapper = { customValidatorMapper }
92
93
onSubmit = { onSubmit }
You can’t perform that action at this time.
0 commit comments