Skip to content

Commit

Permalink
Default Disk Unit Fix in VM Reconfigure Form
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidResende0 committed Nov 28, 2023
1 parent c465111 commit 414ce13
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const unitField = (data) => ({
id: 'unit',
name: 'unit',
label: __('Unit'),
initialValue: data.form.action === TYPES.RESIZE ? getCellData(data.editingRow, 'unit') : '',
initialValue: data.form.action === TYPES.RESIZE ? getCellData(data.editingRow, 'unit') : __('GB'),
options: restructureOptions([__('GB'), __('MB')]),
});

Expand Down Expand Up @@ -103,7 +103,7 @@ const bootableField = (data, roles) => ({
offText: __('No'),
isReadOnly: data.form.action !== 'add',
hideField: !roles.isRedhat,
initialValue: data.form.action === TYPES.RESIZE ? getSwitchData(data.editingRow, 'bootable') : '',
initialValue: data.form.action === TYPES.RESIZE ? getSwitchData(data.editingRow, 'bootable') : false,
});

export const diskFormFields = (data, roles, options, memory) => ([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13005,7 +13005,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "select",
"id": "unit",
"initialValue": "",
"initialValue": "GB",
"label": "Unit",
"name": "unit",
"options": Array [
Expand Down Expand Up @@ -13086,7 +13086,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "switch",
"hideField": false,
"initialValue": "",
"initialValue": false,
"isReadOnly": false,
"label": "Bootable",
"name": "bootable",
Expand Down Expand Up @@ -13229,7 +13229,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "select",
"id": "unit",
"initialValue": "",
"initialValue": "GB",
"label": "Unit",
"name": "unit",
"options": Array [
Expand Down Expand Up @@ -13310,7 +13310,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "switch",
"hideField": false,
"initialValue": "",
"initialValue": false,
"isReadOnly": false,
"label": "Bootable",
"name": "bootable",
Expand Down Expand Up @@ -13446,7 +13446,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "select",
"id": "unit",
"initialValue": "",
"initialValue": "GB",
"label": "Unit",
"name": "unit",
"options": Array [
Expand Down Expand Up @@ -13527,7 +13527,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "switch",
"hideField": false,
"initialValue": "",
"initialValue": false,
"isReadOnly": false,
"label": "Bootable",
"name": "bootable",
Expand Down Expand Up @@ -13662,7 +13662,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "select",
"id": "unit",
"initialValue": "",
"initialValue": "GB",
"label": "Unit",
"name": "unit",
"options": Array [
Expand Down Expand Up @@ -13743,7 +13743,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "switch",
"hideField": false,
"initialValue": "",
"initialValue": false,
"isReadOnly": false,
"label": "Bootable",
"name": "bootable",
Expand Down Expand Up @@ -13825,7 +13825,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "select",
"id": "unit",
"initialValue": "",
"initialValue": "GB",
"label": "Unit",
"name": "unit",
"options": Array [
Expand Down Expand Up @@ -13906,7 +13906,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "switch",
"hideField": false,
"initialValue": "",
"initialValue": false,
"isReadOnly": false,
"label": "Bootable",
"name": "bootable",
Expand Down Expand Up @@ -13992,7 +13992,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "select",
"id": "unit",
"initialValue": "",
"initialValue": "GB",
"label": "Unit",
"name": "unit",
"options": Array [
Expand Down Expand Up @@ -14073,7 +14073,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "switch",
"hideField": false,
"initialValue": "",
"initialValue": false,
"isReadOnly": false,
"label": "Bootable",
"name": "bootable",
Expand Down Expand Up @@ -14156,7 +14156,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "select",
"id": "unit",
"initialValue": "",
"initialValue": "GB",
"label": "Unit",
"name": "unit",
"options": Array [
Expand Down Expand Up @@ -14237,7 +14237,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "switch",
"hideField": false,
"initialValue": "",
"initialValue": false,
"isReadOnly": false,
"label": "Bootable",
"name": "bootable",
Expand Down Expand Up @@ -14323,7 +14323,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "select",
"id": "unit",
"initialValue": "",
"initialValue": "GB",
"label": "Unit",
"name": "unit",
"options": Array [
Expand Down Expand Up @@ -14404,7 +14404,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "switch",
"hideField": false,
"initialValue": "",
"initialValue": false,
"isReadOnly": false,
"label": "Bootable",
"name": "bootable",
Expand Down Expand Up @@ -14480,7 +14480,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "select",
"id": "unit",
"initialValue": "",
"initialValue": "GB",
"label": "Unit",
"name": "unit",
"options": Array [
Expand Down Expand Up @@ -14561,7 +14561,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "switch",
"hideField": false,
"initialValue": "",
"initialValue": false,
"isReadOnly": false,
"label": "Bootable",
"name": "bootable",
Expand Down Expand Up @@ -14641,7 +14641,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "select",
"id": "unit",
"initialValue": "",
"initialValue": "GB",
"label": "Unit",
"name": "unit",
"options": Array [
Expand Down Expand Up @@ -14722,7 +14722,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "switch",
"hideField": false,
"initialValue": "",
"initialValue": false,
"isReadOnly": false,
"label": "Bootable",
"name": "bootable",
Expand Down Expand Up @@ -15357,7 +15357,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
<SingleField
component="select"
id="unit"
initialValue=""
initialValue="GB"
key="unit"
label="Unit"
name="unit"
Expand All @@ -15379,7 +15379,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
Object {
"component": "select",
"id": "unit",
"initialValue": "",
"initialValue": "GB",
"label": "Unit",
"name": "unit",
"options": Array [
Expand All @@ -15401,7 +15401,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
<SelectWithOnChange
component="select"
id="unit"
initialValue=""
initialValue="GB"
label="Unit"
name="unit"
options={
Expand All @@ -15421,7 +15421,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
<Select
component="select"
id="unit"
initialValue=""
initialValue="GB"
label="Unit"
loadingMessage="Loading..."
name="unit"
Expand Down Expand Up @@ -15469,7 +15469,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
placeholder="<Choose>"
pluckSingleValue={true}
simpleValue={false}
value=""
value="GB"
>
<ClearedSelect
className=""
Expand Down Expand Up @@ -15500,7 +15500,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
]
}
placeholder="<Choose>"
value=""
value="GB"
>
<Select
className=""
Expand All @@ -15516,7 +15516,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
value=""
value="GB"
>
<div
className="bx--form-item"
Expand All @@ -15541,7 +15541,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
value=""
value="GB"
>
<SelectItem
disabled={false}
Expand Down Expand Up @@ -16434,7 +16434,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
<SingleField
component="switch"
hideField={false}
initialValue=""
initialValue={false}
isReadOnly={false}
key="bootable"
label="Bootable"
Expand All @@ -16446,7 +16446,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
field={
Object {
"component": "switch",
"initialValue": "",
"initialValue": false,
"isReadOnly": false,
"label": "Bootable",
"name": "bootable",
Expand All @@ -16460,7 +16460,7 @@ exports[`Reconfigure VM form component should render reconfigure form and show d
>
<Switch
component="switch"
initialValue=""
initialValue={false}
isReadOnly={false}
label="Bootable"
name="bootable"
Expand Down

0 comments on commit 414ce13

Please sign in to comment.