|
1 | 1 | import { Input, Label, Select } from "@canonical/react-components";
|
2 |
| -import { MainTableRow } from "@canonical/react-components/dist/components/MainTable/MainTable"; |
3 | 2 | import { getConfigurationRowBase } from "components/ConfigurationRow";
|
4 | 3 | import { LxdProxyDevice } from "types/device";
|
5 | 4 | import { ensureEditMode } from "./instanceEdit";
|
6 | 5 | import { proxyAddressTypeOptions } from "./instanceOptions";
|
7 | 6 | import { InstanceAndProfileFormikProps } from "components/forms/instanceAndProfileFormValues";
|
| 7 | +import { MainTableRow } from "@canonical/react-components/dist/components/MainTable/MainTable"; |
8 | 8 |
|
9 | 9 | type ConnectionType = "listen" | "connect";
|
10 | 10 |
|
@@ -129,35 +129,35 @@ export const getProxyAddress = (
|
129 | 129 | }),
|
130 | 130 | );
|
131 | 131 |
|
132 |
| - deviceType === "unix" |
133 |
| - ? null |
134 |
| - : customRows.push( |
135 |
| - getConfigurationRowBase({ |
136 |
| - className: "no-border-top inherited-with-form", |
137 |
| - configuration: ( |
138 |
| - <Label forId={`devices.${index}.${connectionType}.port`} required> |
139 |
| - Port |
140 |
| - </Label> |
141 |
| - ), |
| 132 | + if (deviceType !== "unix") { |
| 133 | + customRows.push( |
| 134 | + getConfigurationRowBase({ |
| 135 | + className: "no-border-top inherited-with-form", |
| 136 | + configuration: ( |
| 137 | + <Label forId={`devices.${index}.${connectionType}.port`} required> |
| 138 | + Port |
| 139 | + </Label> |
| 140 | + ), |
142 | 141 |
|
143 |
| - inherited: ( |
144 |
| - <Input |
145 |
| - id={`devices.${index}.${connectionType}.port`} |
146 |
| - onChange={(e) => { |
147 |
| - ensureEditMode(formik); |
148 |
| - const newPort = e.target.value; |
149 |
| - void formik.setFieldValue( |
150 |
| - `devices.${index}.${connectionType}`, |
151 |
| - `${deviceType}:${deviceAddress}:${newPort}`, |
152 |
| - ); |
153 |
| - }} |
154 |
| - value={devicePort} |
155 |
| - placeholder="00[-00]" |
156 |
| - type="text" |
157 |
| - className="u-no-margin--bottom" |
158 |
| - /> |
159 |
| - ), |
160 |
| - override: "", |
161 |
| - }), |
162 |
| - ); |
| 142 | + inherited: ( |
| 143 | + <Input |
| 144 | + id={`devices.${index}.${connectionType}.port`} |
| 145 | + onChange={(e) => { |
| 146 | + ensureEditMode(formik); |
| 147 | + const newPort = e.target.value; |
| 148 | + void formik.setFieldValue( |
| 149 | + `devices.${index}.${connectionType}`, |
| 150 | + `${deviceType}:${deviceAddress}:${newPort}`, |
| 151 | + ); |
| 152 | + }} |
| 153 | + value={devicePort} |
| 154 | + placeholder="00[-00]" |
| 155 | + type="text" |
| 156 | + className="u-no-margin--bottom" |
| 157 | + /> |
| 158 | + ), |
| 159 | + override: "", |
| 160 | + }), |
| 161 | + ); |
| 162 | + } |
163 | 163 | };
|
0 commit comments