Skip to content

Commit

Permalink
NAS-131610: Cannot migrate apps to a new pool (#10829)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKarpov98 authored Oct 9, 2024
1 parent 86110de commit 4da3b68
Show file tree
Hide file tree
Showing 91 changed files with 0 additions and 135 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ <h1 matDialogTitle>
[options]="pools$"
></ix-select>

@if (canMigrateApplications) {
<ix-checkbox
formControlName="migrateApplications"
[label]="'Migrate applications to the new pool' | translate"
></ix-checkbox>
}

<ix-form-actions>
<button mat-button type="button" ixTest="cancel" [matDialogClose]="false">
{{ 'Cancel' | translate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,42 +73,6 @@ describe('SelectPoolDialogComponent', () => {
expect(spectator.inject(MatDialogRef).close).toHaveBeenCalledWith(true);
});

it('shows migrate checkbox when existing pool is changed to a new one', async () => {
const dockerStore = spectator.inject(DockerStore);
Object.defineProperty(dockerStore, 'selectedPool$', {
value: of('pool1'),
});
spectator.component.ngOnInit();

await form.fillForm({
Pool: 'pool2',
});

const migrateCheckbox = await form.getControl('Migrate applications to the new pool');
expect(migrateCheckbox).toBeTruthy();
});

it('sets new pool and migrates applications when form is submitted', async () => {
const dockerStore = spectator.inject(DockerStore);
Object.defineProperty(dockerStore, 'selectedPool$', {
value: of('pool1'),
});
spectator.component.ngOnInit();

await form.fillForm(
{
Pool: 'pool2',
'Migrate applications to the new pool': true,
},
);

const chooseButton = await loader.getHarness(MatButtonHarness.with({ text: 'Choose' }));
await chooseButton.click();

expect(spectator.inject(DockerStore).setDockerPool).toHaveBeenCalledWith('pool2');
expect(spectator.inject(MatDialogRef).close).toHaveBeenCalledWith(true);
});

it('shows a warning when no pools are available and takes user to create one', () => {
const appService = spectator.inject(ApplicationsService);
jest.spyOn(appService, 'getPoolList').mockReturnValue(of([] as Pool[]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ export class SelectPoolDialogComponent implements OnInit {
private dockerStore: DockerStore,
) { }

get canMigrateApplications(): boolean {
return Boolean(this.selectedPool) && this.selectedPool !== this.form.value.pool;
}

ngOnInit(): void {
this.loadPools();
}
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/af.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/ast.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/az.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/be.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/bn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/br.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/bs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2069,7 +2069,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -1838,7 +1838,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/dsb.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/en-au.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/en-gb.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/eo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/es-ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Minimum Memory": "",
"Minimum Memory Size": "",
"Minimum Passive Port": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/es-co.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/es-mx.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/es-ni.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/es-ve.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2372,7 +2372,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum Memory": "",
"Minimum Memory Size": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/et.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/eu.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -3133,7 +3133,6 @@
"Method of snapshot transfer:<ul> <li><i>SSH</i> is supported by most systems. It requires a previously created connection in <b>System > SSH Connections</b>.</li> <li><i>SSH+NETCAT</i> uses SSH to establish a connection to the destination system, then uses <a href=\"https://github.com/truenas/py-libzfs\" target=\"_blank\">py-libzfs</a> to send an unencrypted data stream for higher transfer speeds. This only works when replicating to a TrueNAS, or other system with <i>py-libzfs</i> installed.</li> <li><i>LOCAL</i> efficiently replicates snapshots to another dataset on the same system without using the network.</li> <li><i>LEGACY</i> uses the legacy replication engine from FreeNAS 11.2 and earlier.</li></ul>": "Méthode de transfert d'instantané :<ul> <li><i>SSH</i> est pris en charge par la plupart des systèmes. Il nécessite une connexion préalablement créée dans <b>Système > Connexions SSH</b>.</li> <li><i>SSH+NETCAT</i> utilise SSH pour établir une connexion avec le système de destination, puis utilise <a href=\"https://github.com/truenas/py-libzfs\" target=\"_blank\">py-libzfs</a> pour envoyer un flux de données non chiffré pour des vitesses de transfert plus élevées. Cela ne fonctionne que lors de la réplication vers un TrueNAS ou un autre système sur lequel <i>py-libzfs</i> est installé.</li> <li><i>LOCAL</i> réplique efficacement les instantanés vers un autre dataset sur le même système sans utiliser le réseau.</li> <li><i>LEGACY</i> utilise le moteur de réplication hérité de FreeNAS 11.2 et versions antérieures.</li></ul>",
"MiB. Units smaller than MiB are not allowed.": "Mib. Les unités plus petites que le MiB ne sont pas autorisées.",
"Microsoft Onedrive <a href=\"https://docs.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/authentication\" target=\"_blank\">Access Token</a>. Log in to the Microsoft account to add an access token.": "<a href=\"https://docs.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/authentication\" target=\"_blank\">Jeton d'accès</a> Microsoft Onedrive. Connectez-vous au compte Microsoft pour ajouter un jeton d'accès.",
"Migrate applications to the new pool": "Migrer les applications vers le nouveau volume",
"Min Poll": "Poll Min",
"Minimum": "Minimum",
"Minimum Memory": "Mémoire minimale",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/fy.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/ga.json
Original file line number Diff line number Diff line change
Expand Up @@ -2664,7 +2664,6 @@
"Middleware": "Meán-earraí",
"Middleware - Credentials": "Middleware - Dintiúir",
"Middleware - Method": "Meán-earraí - Modh",
"Migrate applications to the new pool": "Iarratais a aistriú chuig an linn nua",
"Min Poll": "Mo Vótaíocht",
"Minimum": "íosmhéid",
"Minimum Memory": "Cuimhne Íosta",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/gd.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/gl.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/hr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/hsb.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/ia.json
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,6 @@
"Middleware": "",
"Middleware - Credentials": "",
"Middleware - Method": "",
"Migrate applications to the new pool": "",
"Min Poll": "",
"Minimum": "",
"Minimum Memory": "",
Expand Down
Loading

0 comments on commit 4da3b68

Please sign in to comment.