chore: re-format code

This commit is contained in:
Julien Fontanet 2018-11-07 18:37:23 +01:00
parent 4ff6eeb424
commit 90923c657d
59 changed files with 685 additions and 747 deletions

View File

@ -53,9 +53,7 @@ export default ({
fromCallback(cb =>
transporter.sendMail(
{
subject: evalTemplate(
subject,
key =>
subject: evalTemplate(subject, key =>
key === 'level'
? NAMES[log.level]
: key === 'time'

View File

@ -410,8 +410,7 @@ class P {
static text (text) {
const { length } = text
return new P(
(input, pos) =>
return new P((input, pos) =>
input.startsWith(text, pos)
? new Success(pos + length, text)
: new Failure(pos, `'${text}'`)
@ -478,8 +477,7 @@ class P {
}
}
P.eof = new P(
(input, pos, end) =>
P.eof = new P((input, pos, end) =>
pos < end ? new Failure(pos, 'end of input') : new Success(pos)
)
@ -487,8 +485,8 @@ P.eof = new P(
const parser = P.grammar({
default: r =>
P.seq(r.ws, r.term.repeat(), P.eof).map(
([, terms]) => (terms.length === 0 ? new Null() : new And(terms))
P.seq(r.ws, r.term.repeat(), P.eof).map(([, terms]) =>
terms.length === 0 ? new Null() : new And(terms)
),
globPattern: new P((input, pos, end) => {
let value = ''

View File

@ -228,8 +228,7 @@ export default class Vhd {
return this._read(
sectorsToBytes(blockAddr),
onlyBitmap ? this.bitmapSize : this.fullBlockSize
).then(
buf =>
).then(buf =>
onlyBitmap
? { id: blockId, bitmap: buf }
: {

View File

@ -251,9 +251,7 @@ function getTop (objects, options) {
function computePercentage (curr, prev, options) {
return zipObject(
options,
map(
options,
opt =>
map(options, opt =>
prev[opt] === 0 || prev[opt] === null
? 'NONE'
: `${((curr[opt] - prev[opt]) * 100) / prev[opt]}`

View File

@ -4,7 +4,7 @@ export async function add ({ autoConnect = true, ...props }) {
const server = await this.registerXenServer(props)
if (autoConnect) {
;this.connectXenServer(server.id)::ignoreErrors()
this.connectXenServer(server.id)::ignoreErrors()
}
return server.id
@ -105,7 +105,7 @@ set.params = {
// -------------------------------------------------------------------
export async function connect ({ id }) {
;this.updateXenServer(id, { enabled: true })::ignoreErrors()
this.updateXenServer(id, { enabled: true })::ignoreErrors()
await this.connectXenServer(id)
}
@ -122,7 +122,7 @@ connect.params = {
// -------------------------------------------------------------------
export async function disconnect ({ id }) {
;this.updateXenServer(id, { enabled: false })::ignoreErrors()
this.updateXenServer(id, { enabled: false })::ignoreErrors()
await this.disconnectXenServer(id)
}

View File

@ -6,7 +6,7 @@ import { diffItems } from '../utils'
// TODO: move into vm and rename to removeInterface
async function delete_ ({ vif }) {
;this.allocIpAddresses(
this.allocIpAddresses(
vif.id,
null,
vif.allowedIpv4Addresses.concat(vif.allowedIpv6Addresses)

View File

@ -374,7 +374,7 @@ async function delete_ ({
vm.type === 'VM' && // only regular VMs
xapi.xo.getData(vm._xapiId, 'resourceSet') != null
) {
;this.setVmResourceSet(vm._xapiId, null)::ignoreErrors()
this.setVmResourceSet(vm._xapiId, null)::ignoreErrors()
}
return xapi.deleteVm(

View File

@ -78,8 +78,7 @@ export default class Redis extends Collection {
.then(keys => keys.length !== 0 && redis.del(keys))
).then(() =>
asyncMap(redis.smembers(idsIndex), id =>
redis.hgetall(`${prefix}:${id}`).then(
values =>
redis.hgetall(`${prefix}:${id}`).then(values =>
values == null
? redis.srem(idsIndex, id) // entry no longer exists
: asyncMap(indexes, index => {

View File

@ -208,8 +208,8 @@ export default class Xapi extends XapiBase {
}
const loop = () =>
this._waitObject(idOrUuidOrRef).then(
object => (predicate(object) ? object : loop())
this._waitObject(idOrUuidOrRef).then(object =>
predicate(object) ? object : loop()
)
return loop()
@ -877,7 +877,7 @@ export default class Xapi extends XapiBase {
//
// The snapshot must not exist otherwise it could break the
// next export.
;this._deleteVdi(vdi)::ignoreErrors()
this._deleteVdi(vdi)::ignoreErrors()
return
}
@ -1128,7 +1128,7 @@ export default class Xapi extends XapiBase {
])
if (deleteBase && baseVm) {
;this._deleteVm(baseVm)::ignoreErrors()
this._deleteVm(baseVm)::ignoreErrors()
}
await Promise.all([
@ -1316,7 +1316,7 @@ export default class Xapi extends XapiBase {
}
if (onVmCreation != null) {
;this._waitObject(
this._waitObject(
obj =>
obj != null &&
obj.current_operations != null &&
@ -1654,12 +1654,12 @@ export default class Xapi extends XapiBase {
await this._startVm(vm)
} finally {
;this._setObjectProperties(vm, {
this._setObjectProperties(vm, {
PV_bootloader: bootloader,
})::ignoreErrors()
forEach(bootables, ([vbd, bootable]) => {
;this._setObjectProperties(vbd, { bootable })::ignoreErrors()
this._setObjectProperties(vbd, { bootable })::ignoreErrors()
})
}
}

View File

@ -511,8 +511,7 @@ export default {
...(await Promise.all(
mapFilter(this.objects.all, host => {
if (host.$type === 'host') {
return this._listMissingPoolPatchesOnHost(host).then(
patches =>
return this._listMissingPoolPatchesOnHost(host).then(patches =>
host.license_params.sku_type !== 'free'
? pickBy(patches, { upgrade: false })
: pickBy(patches, { paid: false, upgrade: false })

View File

@ -435,9 +435,9 @@ export default {
if (snapshot.snapshot_info['power-state-at-snapshot'] === 'Running') {
const vm = snapshot.$snapshot_of
if (vm.power_state === 'Halted') {
;this.startVm(vm.$id)::ignoreErrors()
this.startVm(vm.$id)::ignoreErrors()
} else if (vm.power_state === 'Suspended') {
;this.resumeVm(vm.$id)::ignoreErrors()
this.resumeVm(vm.$id)::ignoreErrors()
}
}
},

View File

@ -181,7 +181,7 @@ export default class {
token = token.properties
if (!(token.expiration > Date.now())) {
;this._tokens.remove(id)::ignoreErrors()
this._tokens.remove(id)::ignoreErrors()
throw noSuchAuthenticationToken(id)
}

View File

@ -445,17 +445,17 @@ export default class {
// Once done, (asynchronously) remove the (now obsolete) local
// base.
if (localBaseUuid) {
;promise.then(() => srcXapi.deleteVm(localBaseUuid))::ignoreErrors()
promise.then(() => srcXapi.deleteVm(localBaseUuid))::ignoreErrors()
}
if (toRemove !== undefined) {
;promise
promise
.then(() => asyncMap(toRemove, _ => targetXapi.deleteVm(_.$id)))
::ignoreErrors()
}
// (Asynchronously) Identify snapshot as future base.
;promise
promise
.then(() => {
return srcXapi._updateObjectMapProperty(srcVm, 'other_config', {
[TAG_LAST_BASE_DELTA]: delta.vm.uuid,
@ -593,7 +593,7 @@ export default class {
base => base.snapshot_time
)
forEach(bases, base => {
;xapi.deleteVdi(base.$id)::ignoreErrors()
xapi.deleteVdi(base.$id)::ignoreErrors()
})
// Export full or delta backup.
@ -652,7 +652,7 @@ export default class {
)
const baseVm = bases.pop()
forEach(bases, base => {
;xapi.deleteVm(base.$id)::ignoreErrors()
xapi.deleteVm(base.$id)::ignoreErrors()
})
// Check backup dirs.
@ -780,7 +780,7 @@ export default class {
await this._removeOldDeltaVmBackups(xapi, { vm, handler, dir, retention })
if (baseVm) {
;xapi.deleteVm(baseVm.$id)::ignoreErrors()
xapi.deleteVm(baseVm.$id)::ignoreErrors()
}
return {

View File

@ -328,7 +328,7 @@ export default class Jobs {
app.emit('job:terminated', undefined, job, schedule, runJobId)
throw error
} finally {
;this.updateJob({ id, runId: null })::ignoreErrors()
this.updateJob({ id, runId: null })::ignoreErrors()
delete runningJobs[id]
delete runs[runJobId]
if (session !== undefined) {

View File

@ -44,7 +44,7 @@ export default class LevelDbLogger extends AbstractLogger {
return promise.then(() => key)
}
;promise::ignoreErrors()
promise::ignoreErrors()
return key
}

View File

@ -57,9 +57,7 @@ const normalize = set => ({
id: set.id,
ipPools: set.ipPools || [],
limits: set.limits
? map(
set.limits,
limit =>
? map(set.limits, limit =>
isObject(limit)
? limit
: {

View File

@ -10,9 +10,7 @@ import { forEach, isFunction, promisify } from '../utils'
const _levelHas = function has (key, cb) {
if (cb) {
return this.get(
key,
(error, value) =>
return this.get(key, (error, value) =>
error ? (error.notFound ? cb(null, false) : cb(error)) : cb(null, true)
)
}

View File

@ -104,7 +104,7 @@ export default class {
.getAuthenticationTokensForUser(id)
.then(tokens => {
forEach(tokens, token => {
;this._xo.deleteAuthenticationToken(id)::ignoreErrors()
this._xo.deleteAuthenticationToken(id)::ignoreErrors()
})
})
::ignoreErrors()
@ -112,13 +112,13 @@ export default class {
// Remove ACLs for this user.
this._xo.getAclsForSubject(id).then(acls => {
forEach(acls, acl => {
;this._xo.removeAcl(id, acl.object, acl.action)::ignoreErrors()
this._xo.removeAcl(id, acl.object, acl.action)::ignoreErrors()
})
})
// Remove the user from all its groups.
forEach(user.groups, groupId => {
;this.getGroup(groupId)
this.getGroup(groupId)
.then(group => this._removeUserFromGroup(id, group))
::ignoreErrors()
})
@ -264,13 +264,13 @@ export default class {
// Remove ACLs for this group.
this._xo.getAclsForSubject(id).then(acls => {
forEach(acls, acl => {
;this._xo.removeAcl(id, acl.object, acl.action)::ignoreErrors()
this._xo.removeAcl(id, acl.object, acl.action)::ignoreErrors()
})
})
// Remove the group from all its users.
forEach(group.users, userId => {
;this.getUser(userId)
this.getUser(userId)
.then(user => this._removeGroupFromUser(id, user))
::ignoreErrors()
})

View File

@ -82,7 +82,7 @@ export default class {
}
async unregisterXenServer (id) {
;this.disconnectXenServer(id)::ignoreErrors()
this.disconnectXenServer(id)::ignoreErrors()
if (!(await this._servers.remove(id))) {
throw noSuchObject(id, 'xenServer')

View File

@ -15,9 +15,7 @@ export { Ellipsis as default }
export const EllipsisContainer = ({ children }) => (
<div style={ellipsisContainerStyle}>
{React.Children.map(
children,
child =>
{React.Children.map(children, child =>
child == null ||
child.type === Ellipsis ||
(child.type != null && child.type.originalRender === Ellipsis) ? (

View File

@ -107,8 +107,7 @@ export default class IsoDevice extends Component {
icon='vm-eject'
/>
</span>
{mountedIso &&
!cdDrive.device && (
{mountedIso && !cdDrive.device && (
<Tooltip content={_('cdDriveNotInstalled')}>
<a
className='text-warning btn btn-link'

View File

@ -384,8 +384,7 @@ const GenericXoItem = connectStore(() => {
return (state, props) => ({
xoItem: getObject(state, props),
})
})(
({ xoItem, ...props }) =>
})(({ xoItem, ...props }) =>
xoItem ? renderXoItem(xoItem, props) : renderXoUnknownItem()
)

View File

@ -620,10 +620,7 @@ export const SelectVdi = makeStoreSelect(
)
const getVdis = createGetObjectsOfType('VDI')
.filter(
createSelector(
getSrs,
getPredicate,
(srs, predicate) =>
createSelector(getSrs, getPredicate, (srs, predicate) =>
predicate
? vdi => srs[vdi.$SR] && predicate(vdi)
: vdi => srs[vdi.$SR]

View File

@ -146,8 +146,7 @@ export const createFilter = (collection, predicate) =>
_create2(
collection,
predicate,
_createCollectionWrapper(
(collection, predicate) =>
_createCollectionWrapper((collection, predicate) =>
predicate === false
? isArrayLike(collection)
? EMPTY_ARRAY

View File

@ -502,8 +502,8 @@ export default class SortedTable extends Component {
) {
this.setState({
highlighted:
(itemIndex + visibleItems.length + 1) %
visibleItems.length || 0,
(itemIndex + visibleItems.length + 1) % visibleItems.length ||
0,
})
}
break
@ -515,8 +515,8 @@ export default class SortedTable extends Component {
) {
this.setState({
highlighted:
(itemIndex + visibleItems.length - 1) %
visibleItems.length || 0,
(itemIndex + visibleItems.length - 1) % visibleItems.length ||
0,
})
}
break

View File

@ -149,7 +149,7 @@ class XoWeekChart extends Component {
.selectAll('path')
.remove()
forEach(splittedData, data => {
;svg
svg
.select('.horizon-area')
.append('path')
.datum(data)

View File

@ -66,8 +66,7 @@ export default class ChooseSrForEachVdisModal extends Component {
value={mainSr}
/>
<br />
{props.vdis != null &&
mainSr != null && (
{props.vdis != null && mainSr != null && (
<Collapsible
buttonText={_('chooseSrForEachVdisModalSelectSr')}
collapsible={props.vdis.length >= 3}

View File

@ -214,7 +214,9 @@ const createSubscription = cb => {
}
running = true
_signIn.then(() => cb()).then(
_signIn
.then(() => cb())
.then(
result => {
running = false

View File

@ -73,8 +73,7 @@ export default class InstallPoolPatchesModalBody extends Component {
return (
<Container>
{!needDefaultSr &&
!someCdsInserted && (
{!needDefaultSr && !someCdsInserted && (
<SingleLineRow>
<Col>{_('confirmPoolPatch')}</Col>
</SingleLineRow>

View File

@ -236,8 +236,7 @@ export default class MigrateVmModalBody extends BaseComponent {
</Col>
</SingleLineRow>
</div>
{host &&
!doNotMigrateVdis && (
{host && !doNotMigrateVdis && (
<div className={styles.groupBlock}>
<SingleLineRow>
<Col size={12}>

View File

@ -287,8 +287,7 @@ export default class MigrateVmsModalBody extends BaseComponent {
</SingleLineRow>
</div>
)}
{host &&
(!intraPool || !noVdisMigration) && (
{host && (!intraPool || !noVdisMigration) && (
<div key='sr' style={LINE_STYLE}>
<SingleLineRow>
<Col size={6}>
@ -306,9 +305,7 @@ export default class MigrateVmsModalBody extends BaseComponent {
<Icon
icon={defaultSrId !== undefined ? 'alarm' : 'info'}
className={
defaultSrId !== undefined
? 'text-warning'
: 'text-info'
defaultSrId !== undefined ? 'text-warning' : 'text-info'
}
size='lg'
/>
@ -325,8 +322,7 @@ export default class MigrateVmsModalBody extends BaseComponent {
</SingleLineRow>
</div>
)}
{host &&
!intraPool && (
{host && !intraPool && (
<div key='network' style={LINE_STYLE}>
<SingleLineRow>
<Col size={6}>{_('migrateVmsSelectNetwork')}</Col>

View File

@ -10,8 +10,7 @@ import { isAdmin } from 'selectors'
const Upgrade = connectStore({
isAdmin,
})(
({ available, children, isAdmin, place, required = available }) =>
})(({ available, children, isAdmin, place, required = available }) =>
process.env.XOA_PLAN < required ? (
<Card>
<CardHeader>{_('upgradeNeeded')}</CardHeader>

View File

@ -81,8 +81,7 @@ const ThinProvisionedTip = ({ label }) => (
const normalizeTagValues = values => resolveIds(values).map(value => [value])
const normalizeSettings = ({ settings, exportMode, copyMode, snapshotMode }) =>
settings.map(
setting =>
settings.map(setting =>
defined(
setting.copyRetention,
setting.exportRetention,
@ -597,8 +596,7 @@ export default decorate([
srPredicate: ({ srs }) => sr => isSrWritable(sr) && !includes(srs, sr.id),
remotePredicate: ({ remotes }) => ({ id }) => !includes(remotes, id),
propSettings: (_, { job }) =>
Map(get(() => job.settings)).map(
setting =>
Map(get(() => job.settings)).map(setting =>
defined(
setting.copyRetention,
setting.exportRetention,

View File

@ -108,8 +108,7 @@ export default class HostItem extends Component {
/>
</Ellipsis>
&nbsp;
{container &&
host.id === container.master && (
{container && host.id === container.master && (
<span className='tag tag-pill tag-info'>
{_('pillMaster')}
</span>

View File

@ -1056,9 +1056,7 @@ export default class Home extends Component {
<Icon icon='tags' /> {_('homeAllTags')}
</Button>
</OverlayTrigger>
{showResourceSetsSelector &&
isAdmin &&
!noResourceSets && (
{showResourceSetsSelector && isAdmin && !noResourceSets && (
<OverlayTrigger
trigger='click'
rootClose

View File

@ -88,9 +88,8 @@ const isRunning = host => host && host.power_state === 'Running'
const getHostPatches = createSelector(
createGetObjectsOfType('pool_patch'),
createGetObjectsOfType('host_patch').pick(
createSelector(
getHost,
host => (isString(host.patches[0]) ? host.patches : [])
createSelector(getHost, host =>
isString(host.patches[0]) ? host.patches : []
)
),
(poolsPatches, hostsPatches) =>

View File

@ -149,14 +149,11 @@ export default ({
</Col>
</Row>
<Row>
{pool &&
host.id === pool.master && (
{pool && host.id === pool.master && (
<Row className='text-xs-center'>
<Col>
<h3>
<span className='tag tag-pill tag-info'>
{_('pillMaster')}
</span>
<span className='tag tag-pill tag-info'>{_('pillMaster')}</span>
</h3>
</Col>
</Row>

View File

@ -196,8 +196,7 @@ const LOG_RESTORE_COLUMNS = [
itemRenderer: ({ id, vm, status }) => (
<div>
{vm !== undefined && <VmItem id={vm.id} link newTab />}
{vm === undefined &&
status === 'success' && (
{vm === undefined && status === 'success' && (
<span className='text-warning'>{_('logsVmNotFound')}</span>
)}{' '}
<span style={{ fontSize: '0.5em' }} className='text-muted'>
@ -321,9 +320,8 @@ export default decorate([
logs: cb =>
subscribeBackupNgLogs(logs =>
cb(
groupBy(
logs,
log => (log.message === 'restore' ? 'restore' : 'backup')
groupBy(logs, log =>
log.message === 'restore' ? 'restore' : 'backup'
)
)
),

View File

@ -82,8 +82,7 @@ export default decorate([
title='Backup job failed'
/>
)}
{state.jobFailed &&
log.scheduleId !== undefined && (
{state.jobFailed && log.scheduleId !== undefined && (
<ActionButton
handler={effects.restartFailedVms}
icon='run'

View File

@ -1111,8 +1111,7 @@ export default class NewVm extends BaseComponent {
</Button>
</span>
</span>
{this.props.userSshKeys &&
this.props.userSshKeys.length > 0 && (
{this.props.userSshKeys && this.props.userSshKeys.length > 0 && (
<span className={styles.fixedWidth}>
<SelectSshKey
disabled={installMethod !== 'SSH'}
@ -1680,8 +1679,7 @@ export default class NewVm extends BaseComponent {
</Item>
</SectionContent>
),
template &&
template.virtualizationMode === 'hvm' && (
template && template.virtualizationMode === 'hvm' && (
<SectionContent>
<Item label={_('vmVgpu')}>
<SelectVgpuType

View File

@ -223,8 +223,7 @@ class Plugin extends Component {
</div>
</form>
)}
{expanded &&
props.testable && (
{expanded && props.testable && (
<form id={this.testFormId}>
{props.testSchema && (
<GenericInput

View File

@ -44,8 +44,7 @@ const UnhealthyVdiChains = flowRight(
createSelector((_, props) => props.chains, keys)
),
}))
)(
({ chains, vdis }) =>
)(({ chains, vdis }) =>
isEmpty(vdis) ? null : (
<div>
<h3>{_('srUnhealthyVdiTitle', { total: sum(values(chains)) })}</h3>

View File

@ -300,8 +300,7 @@ class Node extends Component {
]}
</div>,
<div>
{status &&
status.length !== 0 && (
{status && status.length !== 0 && (
<Row className='mt-1'>
<Col>
<table className='table' style={{ maxWidth: '50em' }}>
@ -329,9 +328,7 @@ class Node extends Component {
)}
</div>,
<div>
{heal &&
heal.file &&
heal.file.length !== 0 && (
{heal && heal.file && heal.file.length !== 0 && (
<div>
<h4>{_('xosanFilesNeedingHealing')}</h4>
{map(heal.file, file => (
@ -812,8 +809,7 @@ export default class TabXosan extends Component {
/>{' '}
{_('xosanAdvanced')}
</h2>
{strippedVolumeInfo &&
showAdvanced && (
{strippedVolumeInfo && showAdvanced && (
<div>
<h3>{_('xosanVolume')}</h3>
<Container>

View File

@ -51,8 +51,7 @@ const vmActionBarByState = {
pending={includes(vm.current_operations, 'snapshot')}
/>
)}
{!isSelfUser &&
canAdministrate && (
{!isSelfUser && canAdministrate && (
<Action
handler={exportVm}
icon='export'
@ -60,8 +59,7 @@ const vmActionBarByState = {
pending={includes(vm.current_operations, 'export')}
/>
)}
{!isSelfUser &&
canAdministrate && (
{!isSelfUser && canAdministrate && (
<Action
handler={copyVm}
icon='vm-copy'
@ -79,8 +77,7 @@ const vmActionBarByState = {
label={_('startVmLabel')}
pending={includes(vm.current_operations, 'start')}
/>
{!isSelfUser &&
canAdministrate && (
{!isSelfUser && canAdministrate && (
<Action
handler={cloneVm}
icon='vm-fast-clone'
@ -107,8 +104,7 @@ const vmActionBarByState = {
pending={includes(vm.current_operations, 'snapshot')}
/>
)}
{!isSelfUser &&
canAdministrate && (
{!isSelfUser && canAdministrate && (
<Action
handler={exportVm}
icon='export'
@ -116,8 +112,7 @@ const vmActionBarByState = {
pending={includes(vm.current_operations, 'export')}
/>
)}
{!isSelfUser &&
canAdministrate && (
{!isSelfUser && canAdministrate && (
<Action
handler={copyVm}
icon='vm-copy'
@ -143,8 +138,7 @@ const vmActionBarByState = {
pending={includes(vm.current_operations, 'snapshot')}
/>
)}
{!isSelfUser &&
canAdministrate && (
{!isSelfUser && canAdministrate && (
<Action
handler={exportVm}
icon='export'
@ -152,8 +146,7 @@ const vmActionBarByState = {
pending={includes(vm.current_operations, 'export')}
/>
)}
{!isSelfUser &&
canAdministrate && (
{!isSelfUser && canAdministrate && (
<Action
handler={copyVm}
icon='vm-copy'

View File

@ -190,8 +190,7 @@ export default class Vm extends BaseComponent {
onChange={this._setNameDescription}
/>
<span className='text-muted'>
{vm.power_state === 'Running' &&
container && (
{vm.power_state === 'Running' && container && (
<span>
<span> - </span>
<Select

View File

@ -67,8 +67,7 @@ export default class TabConsole extends Component {
return (
<Container>
{!minimalLayout &&
statsOverview && (
{!minimalLayout && statsOverview && (
<Row className='text-xs-center'>
<Col mediumSize={3}>
<p>

View File

@ -165,8 +165,7 @@ export default connectStore(() => {
</BlockLink>
</Col>
</Row>
{!vm.xenTools &&
vm.power_state === 'Running' && (
{!vm.xenTools && vm.power_state === 'Running' && (
<Row className='text-xs-center'>
<Col>
<Icon icon='error' />

View File

@ -34,8 +34,7 @@ const HEADER = (
const Xoa = routes('xoa', {
update: Update,
licenses: Licenses,
})(
({ children }) =>
})(({ children }) =>
+process.env.XOA_PLAN === 5 ? (
<Container>
<h2 className='text-danger'>{_('noUpdaterCommunity')}</h2>

View File

@ -427,8 +427,7 @@ const Updates = decorate([
{state.isTrialConsumed && <p>{_('trialConsumed')}</p>}
</div>
)}
{process.env.XOA_PLAN > 1 &&
process.env.XOA_PLAN < 5 && (
{process.env.XOA_PLAN > 1 && process.env.XOA_PLAN < 5 && (
<div>
{xoaTrialState.state === 'trustedTrial' && (
<p>{xoaTrialState.message}</p>

View File

@ -180,11 +180,8 @@ const XOSAN_COLUMNS = [
{_('xosanLicenseExpiresDate', {
date: <ShortDate timestamp={license.expires} />,
})}{' '}
{expiresSoon &&
isAdmin && (
<Link to='/xoa/licenses'>
{_('xosanUpdateLicenseMessage')}
</Link>
{expiresSoon && isAdmin && (
<Link to='/xoa/licenses'>{_('xosanUpdateLicenseMessage')}</Link>
)}
</span>
)}
@ -398,7 +395,7 @@ export default class Xosan extends Component {
}
if (!this._isXosanRegistered()) {
;registerXosan()::ignoreErrors()
registerXosan()::ignoreErrors()
}
this.setState({ showNewXosanForm: true })