@@ -21,7 +21,7 @@ import PropTypes from 'prop-types';
21
21
import cockpit from 'cockpit' ;
22
22
23
23
import { Button } from "@patternfly/react-core/dist/esm/components/Button" ;
24
- import { Card , CardBody , CardHeader , CardTitle } from '@patternfly/react-core/dist/esm/components/Card' ;
24
+ import { Card , CardHeader , CardTitle } from '@patternfly/react-core/dist/esm/components/Card' ;
25
25
import { Divider } from "@patternfly/react-core/dist/esm/components/Divider" ;
26
26
import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput" ;
27
27
import { Gallery } from "@patternfly/react-core/dist/esm/layouts/Gallery" ;
@@ -154,63 +154,61 @@ const HostVmsList = ({ vms, config, ui, storagePools, actions, networks, onAddEr
154
154
< CardHeader actions = { { actions : toolBar } } >
155
155
< CardTitle component = "h2" > { _ ( "Virtual machines" ) } </ CardTitle >
156
156
</ CardHeader >
157
- < CardBody className = "contains-list" >
158
- < ListingTable aria-label = { _ ( "Virtual machines" ) }
159
- variant = 'compact'
160
- columns = { [
161
- { title : _ ( "Name" ) , header : true , props : { width : 25 } } ,
162
- { title : _ ( "Connection" ) , props : { width : 25 } } ,
163
- { title : _ ( "State" ) , props : { width : 25 } } ,
164
- { title : "" , props : { width : 25 , "aria-label" : _ ( "Actions" ) } } ,
165
- ] }
166
- emptyCaption = { _ ( "No VM is running or defined on this host" ) }
167
- rows = { combinedVmsFiltered
168
- . sort ( sortFunction )
169
- . map ( vm => {
170
- const vmActions = (
171
- < VmActions
157
+ < ListingTable aria-label = { _ ( "Virtual machines" ) }
158
+ variant = 'compact'
159
+ columns = { [
160
+ { title : _ ( "Name" ) , header : true , props : { width : 25 } } ,
161
+ { title : _ ( "Connection" ) , props : { width : 25 } } ,
162
+ { title : _ ( "State" ) , props : { width : 25 } } ,
163
+ { title : "" , props : { width : 25 , "aria-label" : _ ( "Actions" ) } } ,
164
+ ] }
165
+ emptyCaption = { _ ( "No VM is running or defined on this host" ) }
166
+ rows = { combinedVmsFiltered
167
+ . sort ( sortFunction )
168
+ . map ( vm => {
169
+ const vmActions = (
170
+ < VmActions
172
171
vm = { vm }
173
172
vms = { vms }
174
173
config = { config }
175
174
storagePools = { storagePools }
176
175
onAddErrorNotification = { onAddErrorNotification }
177
- />
178
- ) ;
176
+ />
177
+ ) ;
179
178
180
- return {
181
- columns : [
182
- {
183
- title : < Button id = { `${ vmId ( vm . name ) } -${ vm . connectionName } -name` }
179
+ return {
180
+ columns : [
181
+ {
182
+ title : < Button id = { `${ vmId ( vm . name ) } -${ vm . connectionName } -name` }
184
183
variant = "link"
185
184
isInline
186
185
isDisabled = { vm . isUi && ! vm . createInProgress }
187
186
component = "a"
188
187
href = { '#' + cockpit . format ( "vm?name=$0&connection=$1" , encodeURIComponent ( vm . name ) , vm . connectionName ) }
189
188
className = "vm-list-item-name" > { vm . name } </ Button >
190
- } ,
191
- { title : rephraseUI ( 'connections' , vm . connectionName ) } ,
192
- {
193
- title : (
194
- < VmState vm = { vm }
189
+ } ,
190
+ { title : rephraseUI ( 'connections' , vm . connectionName ) } ,
191
+ {
192
+ title : (
193
+ < VmState vm = { vm }
195
194
vms = { vms }
196
195
dismissError = { ( ) => store . dispatch ( updateVm ( {
197
196
connectionName : vm . connectionName ,
198
197
name : vm . name ,
199
198
error : null
200
199
} ) ) } />
201
- ) ,
200
+ ) ,
201
+ } ,
202
+ { title : vmActions } ,
203
+ ] ,
204
+ props : {
205
+ key : cockpit . format ( "$0-$1-row" , vmId ( vm . name ) , vm . connectionName ) ,
206
+ 'data-row-id' : cockpit . format ( "$0-$1" , vmId ( vm . name ) , vm . connectionName ) ,
207
+ 'data-vm-transient' : ! vm . persistent ,
202
208
} ,
203
- { title : vmActions } ,
204
- ] ,
205
- props : {
206
- key : cockpit . format ( "$0-$1-row" , vmId ( vm . name ) , vm . connectionName ) ,
207
- 'data-row-id' : cockpit . format ( "$0-$1" , vmId ( vm . name ) , vm . connectionName ) ,
208
- 'data-vm-transient' : ! vm . persistent ,
209
- } ,
210
- } ;
211
- } ) }
212
- />
213
- </ CardBody >
209
+ } ;
210
+ } ) }
211
+ />
214
212
</ Card >
215
213
</ Gallery >
216
214
</ PageSection >
0 commit comments