chore: format with Prettier
This commit is contained in:
parent
8eb0bdbda7
commit
6665d6a8e6
@ -13,12 +13,15 @@ describe('decorateWith', () => {
|
||||
const expectedFn = Function.prototype
|
||||
const newFn = () => {}
|
||||
|
||||
const decorator = decorateWith(function wrapper(fn, ...args) {
|
||||
assert.deepStrictEqual(fn, expectedFn)
|
||||
assert.deepStrictEqual(args, expectedArgs)
|
||||
const decorator = decorateWith(
|
||||
function wrapper(fn, ...args) {
|
||||
assert.deepStrictEqual(fn, expectedFn)
|
||||
assert.deepStrictEqual(args, expectedArgs)
|
||||
|
||||
return newFn
|
||||
}, ...expectedArgs)
|
||||
return newFn
|
||||
},
|
||||
...expectedArgs
|
||||
)
|
||||
|
||||
const descriptor = {
|
||||
configurable: true,
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -66,8 +66,8 @@ onUnmounted(() => {
|
||||
store.value?.unsubscribe(subscriptionId);
|
||||
});
|
||||
|
||||
const record = computed<ObjectTypeToRecord<HandledTypes> | undefined>(() =>
|
||||
store.value?.getByUuid(props.uuid as any)
|
||||
const record = computed<ObjectTypeToRecord<HandledTypes> | undefined>(
|
||||
() => store.value?.getByUuid(props.uuid as any)
|
||||
);
|
||||
|
||||
const isReady = computed(() => {
|
||||
|
@ -12,12 +12,12 @@ export type MixinAbstractConstructor<T = unknown> = abstract new (
|
||||
|
||||
export type MixinFunction<
|
||||
T extends MixinConstructor | MixinAbstractConstructor = MixinConstructor,
|
||||
R extends T = T & MixinConstructor
|
||||
R extends T = T & MixinConstructor,
|
||||
> = (Base: T) => R;
|
||||
|
||||
export type MixinReturnValue<
|
||||
T extends MixinConstructor | MixinAbstractConstructor,
|
||||
M extends MixinFunction<T, any>[]
|
||||
M extends MixinFunction<T, any>[],
|
||||
> = UnionToIntersection<
|
||||
| T
|
||||
| {
|
||||
@ -27,7 +27,7 @@ export type MixinReturnValue<
|
||||
|
||||
export default function mixin<
|
||||
T extends MixinConstructor | MixinAbstractConstructor,
|
||||
M extends MixinFunction<T, any>[]
|
||||
M extends MixinFunction<T, any>[],
|
||||
>(Base: T, ...mixins: M): MixinReturnValue<T, M> {
|
||||
return mixins.reduce(
|
||||
(mix, applyMixin) => applyMixin(mix),
|
||||
|
@ -38,7 +38,7 @@ type StoreToRefs<SS extends Store<any, any, any, any>> = ToRefs<
|
||||
|
||||
type Output<
|
||||
S extends StoreDefinition<any, any, any, any>,
|
||||
Defer extends boolean
|
||||
Defer extends boolean,
|
||||
> = Omit<S, keyof StoreToRefs<S> | IgnoredProperties> &
|
||||
StoreToRefs<S> &
|
||||
(Defer extends true
|
||||
@ -54,7 +54,7 @@ export const createUseCollection = <
|
||||
infer A
|
||||
>
|
||||
? Store<Id, S, G, A>
|
||||
: never
|
||||
: never,
|
||||
>(
|
||||
useStore: SD
|
||||
) => {
|
||||
|
@ -110,19 +110,19 @@ const template = computed(() => {
|
||||
]"
|
||||
>
|
||||
<${componentName} v-bind="properties"${
|
||||
slotsNames.length > 0
|
||||
? `>\n ${slotsNames
|
||||
.map((name) =>
|
||||
name === "default"
|
||||
? `{{ settings.${camel(name)}SlotContent }}`
|
||||
: `<template #${name}>{{ settings.${camel(
|
||||
name
|
||||
)}SlotContent }}</template>`
|
||||
)
|
||||
.join("\n ")}
|
||||
slotsNames.length > 0
|
||||
? `>\n ${slotsNames
|
||||
.map((name) =>
|
||||
name === "default"
|
||||
? `{{ settings.${camel(name)}SlotContent }}`
|
||||
: `<template #${name}>{{ settings.${camel(
|
||||
name
|
||||
)}SlotContent }}</template>`
|
||||
)
|
||||
.join("\n ")}
|
||||
</${componentName}>`
|
||||
: ` />`
|
||||
}
|
||||
: ` />`
|
||||
}
|
||||
</ComponentStory>
|
||||
</template>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
> Users must be able to say: “Nice enhancement, I'm eager to test it”
|
||||
|
||||
- [Netbox] Don't delete VMs that have been created manually in XO-synced cluster [Forum#7639](https://xcp-ng.org/forum/topic/7639) (PR [#7008](https://github.com/vatesfr/xen-orchestra/pull/7008))
|
||||
- [Kubernetes] *Search domains* field is now optional [#7028](https://github.com/vatesfr/xen-orchestra/pull/7028)
|
||||
- [Kubernetes] _Search domains_ field is now optional [#7028](https://github.com/vatesfr/xen-orchestra/pull/7028)
|
||||
- [Patches] Support new XenServer Updates system. See [our documentation](https://xen-orchestra.com/docs/updater.html#xenserver-updates). (PR [#7044](https://github.com/vatesfr/xen-orchestra/pull/7044))
|
||||
- [REST API] Hosts' audit and system logs can be downloaded [#3968](https://github.com/vatesfr/xen-orchestra/issues/3968) (PR [#7048](https://github.com/vatesfr/xen-orchestra/pull/7048))
|
||||
- [Host/Advanced] New button to download system logs [#3968](https://github.com/vatesfr/xen-orchestra/issues/3968) (PR [#7048](https://github.com/vatesfr/xen-orchestra/pull/7048))
|
||||
|
@ -6,7 +6,6 @@ ISC License may be found here: https://www.isc.org/licenses/
|
||||
The texts of the two licenses are inserted at the root of this repo.
|
||||
Below is the list of the various components and their corresponding licenses, AGPL or ISC.
|
||||
|
||||
|
||||
- @xen-orchestra/audit-core - AGPL-3.0-or-later
|
||||
- @xen-orchestra/babel-config - AGPL-3.0-or-later
|
||||
- @xen-orchestra/backups - AGPL-3.0-or-later
|
||||
@ -51,7 +50,6 @@ Below is the list of the various components and their corresponding licenses, AG
|
||||
- xo-vmdk-to-vhd - AGPL-3.0-or-later
|
||||
- xo-web - AGPL-3.0-or-later
|
||||
|
||||
|
||||
- @vates/async-each - ISC
|
||||
- @vates/cached-dns.lookup - ISC
|
||||
- @vates/coalesce-calls - ISC
|
||||
|
@ -654,7 +654,7 @@ List of the VMs with more than the recommended amount of snapshots (3). There is
|
||||
|
||||
### Duplicated MAC addresses
|
||||
|
||||
Machines with the same MAC addresses on a network will result in unexpected behavior if they run simultaneously.
|
||||
Machines with the same MAC addresses on a network will result in unexpected behavior if they run simultaneously.
|
||||
|
||||
### Guest Tools status
|
||||
|
||||
|
@ -96,8 +96,11 @@ describe('VhdDirectory', async () => {
|
||||
for await (const block of vhd.blocks()) {
|
||||
await compressedVhd.writeEntireBlock(block)
|
||||
}
|
||||
await Promise
|
||||
.all[(await compressedVhd.writeHeader(), await compressedVhd.writeFooter(), await compressedVhd.writeBlockAllocationTable())]
|
||||
await Promise.all[
|
||||
(await compressedVhd.writeHeader(),
|
||||
await compressedVhd.writeFooter(),
|
||||
await compressedVhd.writeBlockAllocationTable())
|
||||
]
|
||||
|
||||
// compressed vhd have a metadata file
|
||||
assert.equal(await fs.exists(`${tempDir}/compressed.vhd/chunk-filters.json`), true)
|
||||
|
@ -285,9 +285,11 @@ execPromise(async function main() {
|
||||
const require = (await import('module')).createRequire(import.meta.url)
|
||||
|
||||
// eslint-disable-next-line n/no-extraneous-require
|
||||
const { repair } = require(require.resolve('level', {
|
||||
paths: [require.resolve('level-party')],
|
||||
}))
|
||||
const { repair } = require(
|
||||
require.resolve('level', {
|
||||
paths: [require.resolve('level-party')],
|
||||
})
|
||||
)
|
||||
await new Promise((resolve, reject) => {
|
||||
repair(`${config.datadir}/leveldb`, error => {
|
||||
if (error) {
|
||||
|
@ -252,12 +252,15 @@ export default class XapiStats {
|
||||
})
|
||||
|
||||
// clear cache when too old
|
||||
setTimeout(() => {
|
||||
// only if it has not been updated
|
||||
if (this.#hostCache[hostUuid]?.[step]?.timestamp === timestamp) {
|
||||
delete this.#hostCache[hostUuid][step]
|
||||
}
|
||||
}, (step + 1) * 1000)
|
||||
setTimeout(
|
||||
() => {
|
||||
// only if it has not been updated
|
||||
if (this.#hostCache[hostUuid]?.[step]?.timestamp === timestamp) {
|
||||
delete this.#hostCache[hostUuid][step]
|
||||
}
|
||||
},
|
||||
(step + 1) * 1000
|
||||
)
|
||||
|
||||
this.#hostCache[hostUuid][step] = {
|
||||
timestamp,
|
||||
|
@ -68,9 +68,7 @@ export default class IpPools {
|
||||
|
||||
if (await store.has(id)) {
|
||||
await Promise.all(
|
||||
(
|
||||
await this._app.getAllResourceSets()
|
||||
).map(async set => {
|
||||
(await this._app.getAllResourceSets()).map(async set => {
|
||||
await this._app.removeLimitFromResourceSet(`ipPool:${id}`, set.id)
|
||||
return this._app.removeIpPoolFromResourceSet(id, set.id)
|
||||
})
|
||||
|
@ -196,9 +196,7 @@ export default class {
|
||||
await Promise.all(
|
||||
difference(set.subjects, subjects).map(async subjectId =>
|
||||
Promise.all(
|
||||
(
|
||||
await this._app.getAclsForSubject(subjectId)
|
||||
).map(async acl => {
|
||||
(await this._app.getAclsForSubject(subjectId)).map(async acl => {
|
||||
try {
|
||||
const object = this._app.getObject(acl.object)
|
||||
if ((object.type === 'VM' || object.type === 'VM-snapshot') && object.resourceSet === id) {
|
||||
|
@ -6,7 +6,7 @@ import React from 'react'
|
||||
import omit from 'lodash/omit.js'
|
||||
|
||||
const STYLE = {
|
||||
marginBottom: 0
|
||||
marginBottom: 0,
|
||||
}
|
||||
|
||||
export default class SelectFiles extends Component {
|
||||
|
@ -11,7 +11,10 @@
|
||||
padding: 8px 21px;
|
||||
pointer-events: none;
|
||||
position: fixed;
|
||||
transition: opacity 0.3s ease-out, margin-top 0.3s ease-out, margin-left 0.3s ease-out;
|
||||
transition:
|
||||
opacity 0.3s ease-out,
|
||||
margin-top 0.3s ease-out,
|
||||
margin-left 0.3s ease-out;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
|
@ -72,12 +72,11 @@ const getInitialState = () => ({
|
||||
})
|
||||
|
||||
export default decorate([
|
||||
New => props =>
|
||||
(
|
||||
<Upgrade place='newMetadataBackup' required={3}>
|
||||
<New {...props} />
|
||||
</Upgrade>
|
||||
),
|
||||
New => props => (
|
||||
<Upgrade place='newMetadataBackup' required={3}>
|
||||
<New {...props} />
|
||||
</Upgrade>
|
||||
),
|
||||
addSubscriptions({
|
||||
remotes: subscribeRemotes,
|
||||
}),
|
||||
|
@ -282,22 +282,21 @@ const AttachedVdisTable = decorate([
|
||||
vdiSnapshots: createGetObjectsOfType('VDI-snapshot'),
|
||||
}),
|
||||
({ columns, rowTransform }) =>
|
||||
({ pools, srs, vbds, vdis, vdiSnapshots }) =>
|
||||
(
|
||||
<NoObjects
|
||||
actions={CONTROL_DOMAIN_VDIS_ACTIONS}
|
||||
collection={vbds}
|
||||
columns={columns}
|
||||
component={SortedTable}
|
||||
data-pools={pools}
|
||||
data-srs={srs}
|
||||
data-vdis={vdis}
|
||||
data-vdiSnapshots={vdiSnapshots}
|
||||
emptyMessage={_('noControlDomainVdis')}
|
||||
rowTransform={rowTransform}
|
||||
stateUrlParam='s_controldomain'
|
||||
/>
|
||||
),
|
||||
({ pools, srs, vbds, vdis, vdiSnapshots }) => (
|
||||
<NoObjects
|
||||
actions={CONTROL_DOMAIN_VDIS_ACTIONS}
|
||||
collection={vbds}
|
||||
columns={columns}
|
||||
component={SortedTable}
|
||||
data-pools={pools}
|
||||
data-srs={srs}
|
||||
data-vdis={vdis}
|
||||
data-vdiSnapshots={vdiSnapshots}
|
||||
emptyMessage={_('noControlDomainVdis')}
|
||||
rowTransform={rowTransform}
|
||||
stateUrlParam='s_controldomain'
|
||||
/>
|
||||
),
|
||||
{
|
||||
columns: [
|
||||
{
|
||||
|
@ -533,12 +533,11 @@ export default decorate([
|
||||
},
|
||||
optionRenderer:
|
||||
({ countByStatus }) =>
|
||||
({ label, value }) =>
|
||||
(
|
||||
<span>
|
||||
{_(label)} ({countByStatus[value] || 0})
|
||||
</span>
|
||||
),
|
||||
({ label, value }) => (
|
||||
<span>
|
||||
{_(label)} ({countByStatus[value] || 0})
|
||||
</span>
|
||||
),
|
||||
countByStatus: ({ preFilteredTasksLogs }) => ({
|
||||
all: get(() => preFilteredTasksLogs.length),
|
||||
...countBy(preFilteredTasksLogs, 'status'),
|
||||
|
@ -285,7 +285,7 @@ export default class NewVm extends BaseComponent {
|
||||
() => this.props.resourceSets,
|
||||
createSelector(
|
||||
() => this.props.location.query.resourceSet,
|
||||
resourceSetId => resourceSet => resourceSet !== undefined ? resourceSetId === resourceSet.id : undefined
|
||||
resourceSetId => resourceSet => (resourceSet !== undefined ? resourceSetId === resourceSet.id : undefined)
|
||||
)
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user