Skip to content

Commit

Permalink
code cleanup after review and It trad
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeauchamp committed Apr 22, 2022
1 parent 3e82ed6 commit 0279dbd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/xo-web/src/common/dropzone/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export default class Dropzone extends Component {

return (
<ReactDropzone
accept={accept}
activeClassName={styles.activeDropzone}
className={styles.dropzone}
multiple={multiple}
onDrop={onDrop}
accept={accept}
>
<div className={styles.dropzoneText}>{message}</div>
</ReactDropzone>
Expand Down
2 changes: 1 addition & 1 deletion packages/xo-web/src/common/intl/locales/it.js
Original file line number Diff line number Diff line change
Expand Up @@ -3819,7 +3819,7 @@ export default {
diskImportSuccess: 'Importazione del disco riuscita',

// Original text: 'Drop VMDK or VHD files here to import disks.'
dropDisksFiles: 'Rilascia qui i file VMDK o VHD per importare i dischi.',
dropDisksFiles: 'Rilascia qui i file ISO, VMDK o VHD per importare i dischi.',

// Original text: 'To SR'
importToSr: 'A SR',
Expand Down
5 changes: 2 additions & 3 deletions packages/xo-web/src/common/select-objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import {
import { addSubscriptions, connectStore, resolveResourceSets } from './utils'
import {
isSrWritable,
isSrWritableOrIso,
subscribeCloudConfigs,
subscribeCurrentUser,
subscribeGroups,
Expand Down Expand Up @@ -377,12 +376,12 @@ export const SelectPool = makeStoreSelect(
// ===================================================================

export const SelectSr = makeStoreSelect(
(_, { allowIsoSr } = {}) => {
() => {
const getPools = createGetObjectsOfType('pool')
const getHosts = createGetObjectsOfType('host')

const getSrsByContainer = createGetObjectsOfType('SR')
.filter((_, { predicate }) => predicate || (allowIsoSr ? isSrWritableOrIso : isSrWritable))
.filter((_, { predicate }) => predicate || isSrWritable)
.sort()
.groupBy('$container')

Expand Down
3 changes: 2 additions & 1 deletion packages/xo-web/src/xo-app/disk-import/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { InputCol, LabelCol, Row } from 'form-grid'
import { map } from 'lodash'
import { readCapacityAndGrainTable } from 'xo-vmdk-to-vhd'
import { SelectSr } from 'select-objects'
import { isSrWritableOrIso } from '../../common/xo'

const getInitialState = () => ({
disks: [],
Expand Down Expand Up @@ -108,7 +109,7 @@ const DiskImport = decorate([
<Row>
<LabelCol>{_('importToSr')}</LabelCol>
<InputCol>
<SelectSr onChange={effects.onChangeSr} required value={sr} allowIsoSr />
<SelectSr onChange={effects.onChangeSr} required value={sr} predicate={isSrWritableOrIso} />
</InputCol>
</Row>
{sr !== undefined && (
Expand Down

0 comments on commit 0279dbd

Please sign in to comment.