Ver Fonte

Fix `npm run format` command

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Mihaela Balutoiu há 1 ano atrás
pai
commit
333ec7de4b
100 ficheiros alterados com 583 adições e 582 exclusões
  1. 10 10
      cypress/e2e/dashboard/dashboard.cy.ts
  2. 10 10
      cypress/e2e/deployments/deployments-list.cy.ts
  3. 10 10
      cypress/e2e/endpoints/endpoints-list.cy.ts
  4. 9 9
      cypress/e2e/endpoints/new-endpoint.cy.ts
  5. 7 7
      cypress/e2e/login/login-fails.cy.ts
  6. 3 3
      cypress/e2e/page header/page-header.cy.ts
  7. 8 8
      cypress/e2e/transfers/transfers-list.cy.ts
  8. 4 4
      cypress/support/commands.ts
  9. 46 46
      eslint.config.mjs
  10. 1 1
      public/index.html
  11. 2 2
      server/api/ConfigApi.ts
  12. 6 6
      server/api/LogosApi.ts
  13. 3 3
      server/proxies/azureProxy.ts
  14. 2 2
      src/@types/Endpoint.ts
  15. 2 2
      src/@types/Field.ts
  16. 1 1
      src/@types/InitialSetup.ts
  17. 1 1
      src/@types/MainItem.ts
  18. 1 1
      src/@types/Network.ts
  19. 3 6
      src/components/App.tsx
  20. 8 8
      src/components/modules/DashboardModule/DashboardActivity/DashboardActivity.spec.tsx
  21. 4 4
      src/components/modules/DashboardModule/DashboardActivity/DashboardActivity.tsx
  22. 1 1
      src/components/modules/DashboardModule/DashboardBarChart/BarChartNiceScale.ts
  23. 14 14
      src/components/modules/DashboardModule/DashboardBarChart/DashboardBarChart.spec.tsx
  24. 3 3
      src/components/modules/DashboardModule/DashboardBarChart/DashboardBarChart.tsx
  25. 11 11
      src/components/modules/DashboardModule/DashboardContent/DashboardContent.spec.tsx
  26. 2 2
      src/components/modules/DashboardModule/DashboardContent/DashboardContent.tsx
  27. 23 23
      src/components/modules/DashboardModule/DashboardExecutions/DashboardExecutions.spec.tsx
  28. 3 3
      src/components/modules/DashboardModule/DashboardExecutions/DashboardExecutions.tsx
  29. 8 5
      src/components/modules/DashboardModule/DashboardInfoCount/DashboardInfoCount.spec.tsx
  30. 12 12
      src/components/modules/DashboardModule/DashboardLicence/DashboardLicence.spec.tsx
  31. 6 6
      src/components/modules/DashboardModule/DashboardLicence/DashboardLicence.tsx
  32. 13 13
      src/components/modules/DashboardModule/DashboardPieChart/DashboardPieChart.spec.tsx
  33. 2 2
      src/components/modules/DashboardModule/DashboardPieChart/DashboardPieChart.tsx
  34. 11 11
      src/components/modules/DashboardModule/DashboardTopEndpoints/DashboardTopEndpoints.spec.tsx
  35. 5 5
      src/components/modules/DashboardModule/DashboardTopEndpoints/DashboardTopEndpoints.tsx
  36. 9 9
      src/components/modules/DetailsModule/DetailsContentHeader/DetailsContentHeader.spec.tsx
  37. 0 1
      src/components/modules/DetailsModule/DetailsContentHeader/story.tsx
  38. 3 3
      src/components/modules/DetailsModule/DetailsPageHeader/DetailsPageHeader.spec.tsx
  39. 18 18
      src/components/modules/EndpointModule/ChooseProvider/ChooseProvider.spec.tsx
  40. 8 8
      src/components/modules/EndpointModule/ChooseProvider/ChooseProvider.tsx
  41. 15 15
      src/components/modules/EndpointModule/ChooseProvider/MultipleUploadedEndpoints.spec.tsx
  42. 5 5
      src/components/modules/EndpointModule/ChooseProvider/MultipleUploadedEndpoints.tsx
  43. 10 10
      src/components/modules/EndpointModule/EndpointDetailsContent/EndpointDetailsContent.spec.tsx
  44. 4 4
      src/components/modules/EndpointModule/EndpointDetailsContent/EndpointDetailsContent.tsx
  45. 5 5
      src/components/modules/EndpointModule/EndpointDuplicateOptions/EndpointDuplicateOptions.spec.tsx
  46. 1 1
      src/components/modules/EndpointModule/EndpointDuplicateOptions/EndpointDuplicateOptions.tsx
  47. 2 2
      src/components/modules/EndpointModule/EndpointListItem/EndpointListItem.spec.tsx
  48. 1 1
      src/components/modules/EndpointModule/EndpointListItem/EndpointListItem.tsx
  49. 1 1
      src/components/modules/EndpointModule/EndpointLogos/EndpointLogos.spec.tsx
  50. 2 2
      src/components/modules/EndpointModule/EndpointLogos/EndpointLogos.tsx
  51. 3 3
      src/components/modules/EndpointModule/EndpointLogos/resources/Generic.spec.tsx
  52. 9 9
      src/components/modules/EndpointModule/EndpointModal/EndpointModal.tsx
  53. 10 10
      src/components/modules/EndpointModule/EndpointValidation/EndpointValidation.spec.tsx
  54. 0 1
      src/components/modules/EndpointModule/EndpointValidation/story.tsx
  55. 7 6
      src/components/modules/LicenceModule/LicenceModule.spec.tsx
  56. 3 3
      src/components/modules/LicenceModule/LicenceModule.tsx
  57. 3 3
      src/components/modules/LoginModule/LoginForm/LoginForm.spec.tsx
  58. 1 4
      src/components/modules/LoginModule/LoginFormField/LoginFormField.tsx
  59. 1 1
      src/components/modules/MetalHubModule/MetalHubListHeader/MetalHubListHeader.tsx
  60. 5 5
      src/components/modules/MetalHubModule/MetalHubListItem/MetalHubListItem.spec.tsx
  61. 2 2
      src/components/modules/MetalHubModule/MetalHubListItem/MetalHubListItem.tsx
  62. 12 9
      src/components/modules/MetalHubModule/MetalHubModal/MetalHubModal.spec.tsx
  63. 6 6
      src/components/modules/MetalHubModule/MetalHubModal/MetalHubModal.tsx
  64. 9 9
      src/components/modules/MetalHubModule/MetalHubServerDetailsContent/MetalHubServerDetailsContent.spec.tsx
  65. 8 8
      src/components/modules/MetalHubModule/MetalHubServerDetailsContent/MetalHubServerDetailsContent.tsx
  66. 5 5
      src/components/modules/MinionModule/MinionEndpointModal/MinionEndpointModal.spec.tsx
  67. 31 31
      src/components/modules/MinionModule/MinionEndpointModal/MinionEndpointModal.tsx
  68. 1 1
      src/components/modules/MinionModule/MinionPoolConfirmationModal/MinionPoolConfirmationModal.spec.tsx
  69. 1 1
      src/components/modules/MinionModule/MinionPoolConfirmationModal/MinionPoolConfirmationModal.tsx
  70. 4 4
      src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolDetailsContent.spec.tsx
  71. 1 1
      src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolDetailsContent.tsx
  72. 9 7
      src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolEvents.spec.tsx
  73. 4 4
      src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolEvents.tsx
  74. 8 8
      src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolMachines.spec.tsx
  75. 6 6
      src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolMachines.tsx
  76. 3 3
      src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolMainDetails.spec.tsx
  77. 9 9
      src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolMainDetails.tsx
  78. 3 3
      src/components/modules/MinionModule/MinionPoolListItem/MinionPoolListItem.tsx
  79. 12 12
      src/components/modules/MinionModule/MinionPoolModal/MinionPoolModal.tsx
  80. 2 2
      src/components/modules/MinionModule/MinionPoolModal/MinionPoolModalContent.spec.tsx
  81. 4 4
      src/components/modules/MinionModule/MinionPoolModal/MinionPoolModalContent.tsx
  82. 5 5
      src/components/modules/NavigationModule/Navigation/Navigation.tsx
  83. 2 2
      src/components/modules/NotificationsModule/NotificationsModule.tsx
  84. 5 5
      src/components/modules/ProjectModule/ProjectDetailsContent/ProjectDetailsContent.spec.tsx
  85. 1 1
      src/components/modules/ProjectModule/ProjectDetailsContent/ProjectDetailsContent.tsx
  86. 1 1
      src/components/modules/ProjectModule/ProjectListItem/ProjectListItem.spec.tsx
  87. 1 1
      src/components/modules/ProjectModule/ProjectListItem/ProjectListItem.tsx
  88. 11 11
      src/components/modules/ProjectModule/ProjectMemberModal/ProjectMemberModal.tsx
  89. 5 5
      src/components/modules/ProjectModule/ProjectModal/ProjectModal.tsx
  90. 2 2
      src/components/modules/SetupModule/SetupPageEmailBody/SetupPageEmailBody.spec.tsx
  91. 3 3
      src/components/modules/SetupModule/SetupPageEmailBody/SetupPageEmailBody.tsx
  92. 11 11
      src/components/modules/SetupModule/SetupPageLegal/SetupPageLegal.spec.tsx
  93. 5 5
      src/components/modules/SetupModule/SetupPageLegal/SetupPageLegal.tsx
  94. 4 4
      src/components/modules/SetupModule/SetupPageLicence/SetupPageLicence.spec.tsx
  95. 1 1
      src/components/modules/SetupModule/SetupPageLicence/SetupPageLicence.tsx
  96. 1 1
      src/components/modules/SetupModule/ui/SetupPageBackButton/SetupPageBackButton.spec.tsx
  97. 1 1
      src/components/modules/SetupModule/ui/SetupPagePasswordStrength/SetupPagePasswordStrength.tsx
  98. 1 1
      src/components/modules/TemplateModule/EmptyTemplate/EmptyTemplate.spec.tsx
  99. 1 1
      src/components/modules/TemplateModule/MainTemplate/MainTemplate.spec.tsx
  100. 1 1
      src/components/modules/TemplateModule/WizardTemplate/WizardTemplate.spec.tsx

+ 10 - 10
cypress/e2e/dashboard/dashboard.cy.ts

@@ -43,22 +43,22 @@ describe("Dashboard", () => {
 
     cy.get("*[class^='DashboardActivity__Message']").should(
       "contain.text",
-      "There is no recent activity"
+      "There is no recent activity",
     );
 
     cy.fixture("licences/appliance-status.json").then(applianceStatus => {
       cy.get("*[class^='DashboardLicence__TopInfoDateTop']").should(
         "contain.text",
         `${DateTime.fromISO(
-          applianceStatus.appliance_licence_status.earliest_licence_expiry_time
+          applianceStatus.appliance_licence_status.earliest_licence_expiry_time,
         )
           .toFormat("LLL |yy")
-          .replace("|", "'")}`
+          .replace("|", "'")}`,
       );
 
       cy.get("*[class^='DashboardLicence__ChartHeaderCurrent']").should(
         "contain.text",
-        `${applianceStatus.appliance_licence_status.current_performed_replicas} Used Replica ${applianceStatus.appliance_licence_status.current_performed_migrations} Used Migrations`
+        `${applianceStatus.appliance_licence_status.current_performed_replicas} Used Replica ${applianceStatus.appliance_licence_status.current_performed_migrations} Used Migrations`,
       );
     });
 
@@ -83,15 +83,15 @@ describe("Dashboard", () => {
       results => {
         const [transfersFixture, endpointsFixture] = results;
         const replicasCount = transfersFixture.transfers.filter(
-          transfer => transfer.scenario === "replica"
+          transfer => transfer.scenario === "replica",
         ).length;
         const migrationsCount = transfersFixture.transfers.filter(
-          transfer => transfer.scenario === "live_migration"
+          transfer => transfer.scenario === "live_migration",
         ).length;
 
         cy.get("div[class^='DashboardInfoCount__CountBlock']").should(
           "contain.text",
-          `${replicasCount}Replicas${migrationsCount}Migrations${endpointsFixture.endpoints.length}Endpoints`
+          `${replicasCount}Replicas${migrationsCount}Migrations${endpointsFixture.endpoints.length}Endpoints`,
         );
 
         const checkItem = (type: "transfer", item: any) => {
@@ -99,15 +99,15 @@ describe("Dashboard", () => {
             "contain.text",
             `New ${type} ${item.id.substr(
               0,
-              7
-            )}... status: ${item.last_execution_status.toLowerCase()}`
+              7,
+            )}... status: ${item.last_execution_status.toLowerCase()}`,
           );
         };
 
         transfersFixture.transfers.forEach((transfer: any) => {
           checkItem("transfer", transfer);
         });
-      }
+      },
     );
   });
 });

+ 10 - 10
cypress/e2e/deployments/deployments-list.cy.ts

@@ -31,7 +31,7 @@ describe("Deployments list", () => {
 
     cy.get("div[class^='MainList__EmptyListMessage']").should(
       "contain.text",
-      "don't have any Deployments in this project"
+      "don't have any Deployments in this project",
     );
   });
 
@@ -52,7 +52,7 @@ describe("Deployments list", () => {
         .click();
       cy.get("div[class^='TransferListItem__Wrapper']").should(
         "have.length",
-        deployments.filter(r => r.last_execution_status === "ERROR").length
+        deployments.filter(r => r.last_execution_status === "ERROR").length,
       );
 
       cy.get("div[class^='MainListFilter__FilterItem']")
@@ -60,7 +60,7 @@ describe("Deployments list", () => {
         .click();
       cy.get("div[class^='TransferListItem__Wrapper']").should(
         "have.length",
-        deployments.filter(r => r.last_execution_status === "COMPLETED").length
+        deployments.filter(r => r.last_execution_status === "COMPLETED").length,
       );
 
       cy.get("div[class^='MainListFilter__FilterItem']")
@@ -68,7 +68,7 @@ describe("Deployments list", () => {
         .click();
       cy.get("div[class^='TransferListItem__Wrapper']").should(
         "have.length",
-        deployments.filter(r => r.last_execution_status === "CANCELED").length
+        deployments.filter(r => r.last_execution_status === "CANCELED").length,
       );
 
       cy.get("div[class^='MainListFilter__FilterItem']")
@@ -76,7 +76,7 @@ describe("Deployments list", () => {
         .click();
       cy.get("div[class^='TransferListItem__Wrapper']").should(
         "have.length",
-        deployments.length
+        deployments.length,
       );
 
       cy.get("div[class^='SearchButton__Wrapper']").click();
@@ -84,7 +84,7 @@ describe("Deployments list", () => {
       cy.get("div[class^='TransferListItem__Wrapper']").should(
         "have.length",
         deployments.filter(r => r.instances.find(i => i.includes("ol88-uefi")))
-          .length
+          .length,
       );
       cy.get("div[class^='TextInput__Close']").click();
     });
@@ -103,12 +103,12 @@ describe("Deployments list", () => {
       cy.get("div[class^='TransferListItem__Wrapper']").should(
         "have.length",
         deployments.filter(r => r.instances.find(i => i.includes("ol88-uefi")))
-          .length
+          .length,
       );
       cy.get("div[class*='TransferListItem__Checkbox']").eq(0).click();
       cy.get("div[class*='MainListFilter__SelectionText']").should(
         "contain.text",
-        "2 of 1"
+        "2 of 1",
       );
 
       cy.get("div[class^='ActionDropdown__Wrapper']").click();
@@ -117,13 +117,13 @@ describe("Deployments list", () => {
         .click();
       cy.get("div[class^='AlertModal__Message']").should(
         "contain.text",
-        "Are you sure you want to recreate"
+        "Are you sure you want to recreate",
       );
 
       cy.intercept("POST", routeSelectors.DEPLOYMENTS, req => {
         expect(
           req.body.deployment.transfer_id,
-          "Transfer ID should be present in the request body"
+          "Transfer ID should be present in the request body",
         ).to.exist;
       }).as("deployments-recreate");
 

+ 10 - 10
cypress/e2e/endpoints/endpoints-list.cy.ts

@@ -28,7 +28,7 @@ describe("Endpoints list", () => {
 
     cy.get("div[class^='MainList__EmptyListMessage']").should(
       "contain.text",
-      "don't have any Cloud Endpoints in this project"
+      "don't have any Cloud Endpoints in this project",
     );
     cy.get("button").should("contain.text", "Add Endpoint");
   });
@@ -45,7 +45,7 @@ describe("Endpoints list", () => {
         .click();
       cy.get("div[class^='EndpointListItem__Wrapper']").should(
         "have.length",
-        endpoints.filter(r => r.type === "azure").length
+        endpoints.filter(r => r.type === "azure").length,
       );
 
       cy.get("div[class^='MainListFilter__FilterItem']")
@@ -53,7 +53,7 @@ describe("Endpoints list", () => {
         .click();
       cy.get("div[class^='EndpointListItem__Wrapper']").should(
         "have.length",
-        endpoints.filter(r => r.type === "vmware_vsphere").length
+        endpoints.filter(r => r.type === "vmware_vsphere").length,
       );
 
       cy.get("div[class^='SearchButton__Wrapper']").click();
@@ -61,8 +61,8 @@ describe("Endpoints list", () => {
       cy.get("div[class^='EndpointListItem__Wrapper']").should(
         "have.length",
         endpoints.filter(
-          e => e.type === "vmware_vsphere" && e.name.includes("cor")
-        ).length
+          e => e.type === "vmware_vsphere" && e.name.includes("cor"),
+        ).length,
       );
       cy.get("div[class^='TextInput__Close']").click();
 
@@ -71,14 +71,14 @@ describe("Endpoints list", () => {
         .click();
       cy.get("div[class^='EndpointListItem__Wrapper']").should(
         "have.length",
-        endpoints.length
+        endpoints.length,
       );
 
       cy.get("div[class^='SearchButton__Wrapper']").click();
       cy.get("input[class*='SearchInput']").type("cor");
       cy.get("div[class^='EndpointListItem__Wrapper']").should(
         "have.length",
-        endpoints.filter(e => e.name.includes("cor")).length
+        endpoints.filter(e => e.name.includes("cor")).length,
       );
     });
   });
@@ -90,7 +90,7 @@ describe("Endpoints list", () => {
     cy.get("div[class^='SearchButton__Wrapper']").click();
     cy.get("input[class*='SearchInput']").type("cor");
     cy.get(
-      "div[class^='MainListFilter__Wrapper'] div[class^='Checkbox__Wrapper']"
+      "div[class^='MainListFilter__Wrapper'] div[class^='Checkbox__Wrapper']",
     ).click();
 
     cy.fixture("endpoints/endpoints").then((endpointsFixture: any) => {
@@ -98,7 +98,7 @@ describe("Endpoints list", () => {
       const corEndpoints = endpoints.filter(e => e.name.includes("cor"));
       cy.get("div[class^='MainListFilter__SelectionText']").should(
         "contain.text",
-        `${corEndpoints.length} of ${corEndpoints.length}`
+        `${corEndpoints.length} of ${corEndpoints.length}`,
       );
 
       cy.get("div[class^='ActionDropdown__Wrapper']").click();
@@ -108,7 +108,7 @@ describe("Endpoints list", () => {
 
       cy.get("div[class^='AlertModal__Message']").should(
         "contain.text",
-        "they are in use by replicas or migrations"
+        "they are in use by replicas or migrations",
       );
     });
   });

+ 9 - 9
cypress/e2e/endpoints/new-endpoint.cy.ts

@@ -56,14 +56,14 @@ describe("New endpoint", () => {
   it("shows all providers", () => {
     cy.get("div[class^=Modal__Title]").should(
       "contain.text",
-      "New Cloud Endpoint"
+      "New Cloud Endpoint",
     );
 
     cy.fixture("endpoints/providers").then(providersFixture => {
       const providers = providersFixture.providers;
       cy.get("div[class^=EndpointLogos__Logo]").should(
         "have.length",
-        Object.keys(providers).length
+        Object.keys(providers).length,
       );
 
       cy.get("div[class^=EndpointLogos__Logo]").each(logo => {
@@ -80,7 +80,7 @@ describe("New endpoint", () => {
       cy.get("input[placeholder='Password']").should(
         "have.attr",
         "type",
-        "password"
+        "password",
       );
 
       cy.get("div[class^=FieldInput__Wrapper]")
@@ -89,7 +89,7 @@ describe("New endpoint", () => {
       cy.get("button").contains("Validate and save").click();
       cy.get("div[class^=notifications-wrapper]").should(
         "contain.text",
-        "Please fill all the required fields"
+        "Please fill all the required fields",
       );
       cy.get("div[class^=FieldInput__Wrapper]")
         .contains("Username")
@@ -129,7 +129,7 @@ describe("New endpoint", () => {
         expect(req.body).to.have.property("payload");
         expect(JSON.parse(req.body.payload)).to.have.property(
           "auth_url",
-          "auth url"
+          "auth url",
         );
         req.reply({ fixture: "endpoints/secret-ref" });
       }).as("secrets-post");
@@ -141,7 +141,7 @@ describe("New endpoint", () => {
         expect(req.body.endpoint).to.have.property("connection_info");
         expect(req.body.endpoint.connection_info).to.have.property(
           "secret_ref",
-          "http://127.0.0.1:9311/v1/secrets/secret-ref-1"
+          "http://127.0.0.1:9311/v1/secrets/secret-ref-1",
         );
         req.reply({ fixture: "endpoints/endpoint" });
       }).as("endpoints-post");
@@ -202,7 +202,7 @@ describe("New endpoint", () => {
 
       cy.get("div[class^=EndpointModal__StatusMessage]").should(
         "contain.text",
-        "Validation failed"
+        "Validation failed",
       );
 
       cy.get("span[class^=EndpointModal__ShowErrorButton]").click();
@@ -210,7 +210,7 @@ describe("New endpoint", () => {
       cy.fixture("endpoints/validation-fail").then(validationFailFixture => {
         cy.get("div[class^=EndpointModal__StatusError]").should(
           "contain.text",
-          validationFailFixture["validate-connection"].message
+          validationFailFixture["validate-connection"].message,
         );
       });
     });
@@ -253,7 +253,7 @@ describe("New endpoint", () => {
 
       cy.get("div[class^=EndpointModal__StatusMessage]").should(
         "contain.text",
-        "Endpoint is Valid"
+        "Endpoint is Valid",
       );
     });
   });

+ 7 - 7
cypress/e2e/login/login-fails.cy.ts

@@ -28,7 +28,7 @@ describe("Login fails", () => {
     cy.get("button").click();
     cy.get("*[class='notification-title']").should(
       "contain.text",
-      "Please fill in all fields"
+      "Please fill in all fields",
     );
   });
 
@@ -43,15 +43,15 @@ describe("Login fails", () => {
     cy.get("button").click();
     cy.wait("@auth-post").then(interception => {
       expect(
-        interception.request.body.auth.identity.password.user.name
+        interception.request.body.auth.identity.password.user.name,
       ).to.equal("wrong-user");
       expect(
-        interception.request.body.auth.identity.password.user.password
+        interception.request.body.auth.identity.password.user.password,
       ).to.equal("wrong-pass");
     });
     cy.get("*[class^='LoginForm__LoginErrorText']").should(
       "contain.text",
-      "Request failed, there might be a problem with the connection to the server."
+      "Request failed, there might be a problem with the connection to the server.",
     );
   });
 
@@ -67,15 +67,15 @@ describe("Login fails", () => {
     cy.get("button").click();
     cy.wait("@auth-post").then(interception => {
       expect(
-        interception.request.body.auth.identity.password.user.name
+        interception.request.body.auth.identity.password.user.name,
       ).to.equal("wrong-user");
       expect(
-        interception.request.body.auth.identity.password.user.password
+        interception.request.body.auth.identity.password.user.password,
       ).to.equal("wrong-pass");
     });
     cy.get("*[class^='LoginForm__LoginErrorText']").should(
       "contain.text",
-      "Incorrect credentials."
+      "Incorrect credentials.",
     );
   });
 });

+ 3 - 3
cypress/e2e/page header/page-header.cy.ts

@@ -38,7 +38,7 @@ describe("Page header", () => {
       cy.getCookie("projectId").should(
         "have.property",
         "value",
-        projects.find(p => p.name === "admin").id
+        projects.find(p => p.name === "admin").id,
       );
     });
   });
@@ -76,7 +76,7 @@ describe("Page header", () => {
       const appliances = results[0].appliances;
       cy.get("div[class^='LicenceModule__Wrapper']").should(
         "contain.text",
-        `${appliances[0].id}-licencev2`
+        `${appliances[0].id}-licencev2`,
       );
     });
   });
@@ -93,7 +93,7 @@ describe("Page header", () => {
     cy.get("div[class^='UserDropdown__ListItem']").contains("Help").click();
     cy.get("@winOpen").should(
       "be.calledWith",
-      "https://cloudbase.it/coriolis-overview/"
+      "https://cloudbase.it/coriolis-overview/",
     );
   });
 

+ 8 - 8
cypress/e2e/transfers/transfers-list.cy.ts

@@ -31,7 +31,7 @@ describe("Replicas list", () => {
 
     cy.get("div[class^='MainList__EmptyListMessage']").should(
       "contain.text",
-      "don't have any Transfers in this project"
+      "don't have any Transfers in this project",
     );
     cy.get("button").should("contain.text", "Create a Transfer");
   });
@@ -48,7 +48,7 @@ describe("Replicas list", () => {
       (results: any[]) => {
         const transfers = results[0].transfers;
         schedules = transfers.map((_, index) =>
-          index % 2 === 0 ? results[1].schedules : results[2].schedules
+          index % 2 === 0 ? results[1].schedules : results[2].schedules,
         );
 
         for (const [index, transfer] of transfers.entries()) {
@@ -60,7 +60,7 @@ describe("Replicas list", () => {
           }).as(scheduleAlias);
           scheduleAliases.push(`@${scheduleAlias}`);
         }
-      }
+      },
     );
 
     cy.visit("/transfers");
@@ -104,7 +104,7 @@ describe("Replicas list", () => {
         .click();
       cy.get("div[class^='TransferListItem__Wrapper']").should(
         "have.length",
-        transfers.filter(r => r.last_execution_status === "COMPLETED").length
+        transfers.filter(r => r.last_execution_status === "COMPLETED").length,
       );
 
       cy.get("div[class^='MainListFilter__FilterItem']")
@@ -112,20 +112,20 @@ describe("Replicas list", () => {
         .click();
       cy.get("div[class^='TransferListItem__Wrapper']").should(
         "have.length",
-        transfers.length
+        transfers.length,
       );
 
       cy.get("div[class^='SearchButton__Wrapper']").click();
       cy.get("input[class*='SearchInput']").type("ol88");
       cy.get("div[class^='TransferListItem__Wrapper']").should(
         "have.length",
-        transfers.filter(r => r.instances.find(i => i.includes("ol88"))).length
+        transfers.filter(r => r.instances.find(i => i.includes("ol88"))).length,
       );
 
       cy.get("div[class^='TextInput__Close']").click();
       cy.get("div[class^='TransferListItem__Wrapper']").should(
         "have.length",
-        transfers.length
+        transfers.length,
       );
     });
   });
@@ -141,7 +141,7 @@ describe("Replicas list", () => {
     cy.get("div[class*='TransferListItem__Checkbox']").eq(0).click();
     cy.get("div[class*='MainListFilter__SelectionText']").should(
       "contain.text",
-      "1 of 3"
+      "1 of 3",
     );
 
     cy.get("div[class^='ActionDropdown__Wrapper']").click();

+ 4 - 4
cypress/support/commands.ts

@@ -9,7 +9,7 @@ Cypress.Commands.add(
       fixtures: string[],
       callback: (results: any[]) => void,
       index = 0,
-      results: any[] = []
+      results: any[] = [],
     ) => {
       if (index >= fixtures.length) {
         callback(results);
@@ -21,7 +21,7 @@ Cypress.Commands.add(
       });
     };
     loadFixtures(fixtures, finalCallback);
-  }
+  },
 );
 
 const AUTH_RESOURCES = [
@@ -87,7 +87,7 @@ Cypress.Commands.add(
     for (const resource of resources) {
       cy.wait(`@${resource}`);
     }
-  }
+  },
 );
 
 Cypress.Commands.add("setProjectIdCookie", () => {
@@ -100,7 +100,7 @@ declare global {
     interface Chainable {
       loadFixtures(
         fixtures: string[],
-        finalCallback: (results: any[]) => void
+        finalCallback: (results: any[]) => void,
       ): Chainable<void>;
       mockAuth(options?: { filterResources?: string[] }): Chainable<void>;
       waitMockAuth(options?: { filterResources?: string[] }): Chainable<void>;

+ 46 - 46
eslint.config.mjs

@@ -13,60 +13,60 @@ import { FlatCompat } from "@eslint/eslintrc";
 const __filename = fileURLToPath(import.meta.url);
 const __dirname = path.dirname(__filename);
 const compat = new FlatCompat({
-    baseDirectory: __dirname,
-    recommendedConfig: js.configs.recommended,
-    allConfig: js.configs.all
+  baseDirectory: __dirname,
+  recommendedConfig: js.configs.recommended,
+  allConfig: js.configs.all,
 });
 
 export default defineConfig([
-    globalIgnores(["**/*.svg", "**/*.png", "**/*.jpg", "**/*.jpeg", "**/*.woff"]),
-    {
-        extends: compat.extends(
-            "eslint:recommended",
-            "plugin:react/recommended",
-            "plugin:@typescript-eslint/recommended",
-            "prettier",
-        ),
+  globalIgnores(["**/*.svg", "**/*.png", "**/*.jpg", "**/*.jpeg", "**/*.woff"]),
+  {
+    extends: compat.extends(
+      "eslint:recommended",
+      "plugin:react/recommended",
+      "plugin:@typescript-eslint/recommended",
+      "prettier",
+    ),
 
-        plugins: {
-            react,
-            "@typescript-eslint": typescriptEslint,
-            prettier,
-            "coriolis-web": coriolisWeb,
-        },
+    plugins: {
+      react,
+      "@typescript-eslint": typescriptEslint,
+      prettier,
+      "coriolis-web": coriolisWeb,
+    },
 
-        languageOptions: {
-            globals: {
-                ...globals.browser,
-                ...globals.jest,
-                ...globals.node,
-            },
+    languageOptions: {
+      globals: {
+        ...globals.browser,
+        ...globals.jest,
+        ...globals.node,
+      },
 
-            parser: tsParser,
-            ecmaVersion: "latest",
-            sourceType: "module",
-        },
+      parser: tsParser,
+      ecmaVersion: "latest",
+      sourceType: "module",
+    },
 
-        settings: {
-            "import/resolver": {
-                typescript: {},
-            },
+    settings: {
+      "import/resolver": {
+        typescript: {},
+      },
 
-            react: {
-                version: "detect",
-            },
-        },
+      react: {
+        version: "detect",
+      },
+    },
 
-        rules: {
-            "coriolis-web/import-no-duplicate-name": "error",
-            "@typescript-eslint/ban-ts-comment": "off",
-            "@typescript-eslint/no-explicit-any": "off",
-            "@typescript-eslint/no-non-null-assertion": "off",
-            "@typescript-eslint/no-empty-function": "off",
-            "@typescript-eslint/no-non-null-asserted-optional-chain": "off",
-            "@typescript-eslint/no-unused-vars": "off",
-            "@typescript-eslint/no-unused-expressions": "off",
-            "@typescript-eslint/no-require-imports": "off",
-        },
+    rules: {
+      "coriolis-web/import-no-duplicate-name": "error",
+      "@typescript-eslint/ban-ts-comment": "off",
+      "@typescript-eslint/no-explicit-any": "off",
+      "@typescript-eslint/no-non-null-assertion": "off",
+      "@typescript-eslint/no-empty-function": "off",
+      "@typescript-eslint/no-non-null-asserted-optional-chain": "off",
+      "@typescript-eslint/no-unused-vars": "off",
+      "@typescript-eslint/no-unused-expressions": "off",
+      "@typescript-eslint/no-require-imports": "off",
     },
+  },
 ]);

+ 1 - 1
public/index.html

@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
 <html>
   <head>
     <title>Coriolis</title>

+ 2 - 2
server/api/ConfigApi.ts

@@ -26,7 +26,7 @@ const getBaseUrl = () => {
 
 const modServicesUrls = (
   configServices: Services,
-  servicesMod?: Services
+  servicesMod?: Services,
 ): Services => {
   const services = { ...configServices };
 
@@ -65,7 +65,7 @@ export default (router: express.Router) => {
         });
         config.servicesUrls = modServicesUrls(
           config.servicesUrls,
-          configMod.servicesUrls
+          configMod.servicesUrls,
         );
         res.send({ config, isFirstLaunch });
       } catch (err) {

+ 6 - 6
server/api/LogosApi.ts

@@ -28,12 +28,12 @@ const getModJsonProviders = (jsonPath: string) => {
 const getOptimalLogoHeightKey = (
   availableHeightKeys: string[],
   requestedHeight: number,
-  style?: string | null
+  style?: string | null,
 ): string => {
   let heightKeys = availableHeightKeys;
   if (style) {
     const styledKeys = heightKeys.filter(k =>
-      style ? k.indexOf(style) > -1 : false
+      style ? k.indexOf(style) > -1 : false,
     );
     if (styledKeys.length) {
       heightKeys = styledKeys;
@@ -92,7 +92,7 @@ export default (router: express.Router) => {
       const providerLogosJson = providerJson.logos;
       if (!providerLogosJson) {
         console.log(
-          `No logos specified in MOD_JSON file for '${provider}' provider`
+          `No logos specified in MOD_JSON file for '${provider}' provider`,
         );
         res.sendFile(logoPath);
         return;
@@ -100,7 +100,7 @@ export default (router: express.Router) => {
       const providerLogosKeys = Object.keys(providerLogosJson);
       if (!providerLogosKeys.length) {
         console.log(
-          `No logo heights specified in MOD_JSON file for '${provider}' provider`
+          `No logo heights specified in MOD_JSON file for '${provider}' provider`,
         );
         res.sendFile(logoPath);
         return;
@@ -108,12 +108,12 @@ export default (router: express.Router) => {
       const optimalHeightKey = getOptimalLogoHeightKey(
         providerLogosKeys,
         size,
-        style
+        style,
       );
       const modLogoPath = providerLogosJson[optimalHeightKey].path;
       if (!modLogoPath) {
         console.log(
-          `No logo path specified in MOD_JSON file for '${provider}' provider`
+          `No logo path specified in MOD_JSON file for '${provider}' provider`,
         );
         res.sendFile(logoPath);
         return;

+ 3 - 3
server/proxies/azureProxy.ts

@@ -40,7 +40,7 @@ export default (router: express.Router) => {
       MsRest.loginWithUsernamePassword(
         userCred.username,
         userCred.password,
-        handleResponse
+        handleResponse,
       );
     } else if (
       servicePrin &&
@@ -51,7 +51,7 @@ export default (router: express.Router) => {
         servicePrin.client_id,
         servicePrin.client_secret,
         connInfo.tenant,
-        handleResponse
+        handleResponse,
       );
     } else {
       res.status(401).send(buildError("Azure API authentication error"));
@@ -62,7 +62,7 @@ export default (router: express.Router) => {
     process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
     const url = Buffer.from(
       req.url.substr("/proxy/".length),
-      "base64"
+      "base64",
     ).toString();
     const headers: any = {};
     forwardHeaders.forEach(headerName => {

+ 2 - 2
src/@types/Endpoint.ts

@@ -70,7 +70,7 @@ export type StorageMap = {
 export const EndpointUtils = {
   getBusTypeStorageId: (
     storageBackends: StorageBackend[],
-    id: string | null
+    id: string | null,
   ): { busType: string | null; id: string | null } => {
     const idMatches = /(.*):(.*)/.exec(String(id));
     if (!idMatches) {
@@ -85,7 +85,7 @@ export const EndpointUtils = {
           storageBackends[
             i
           ].additional_provider_properties?.supported_bus_types?.find(
-            p => p === busType
+            p => p === busType,
           )
         ) {
           return { id: actualId, busType };

+ 2 - 2
src/@types/Field.ts

@@ -99,7 +99,7 @@ class FieldHelper {
       let valueName = v;
       if (field && field.enum) {
         const enumObject: any = field.enum.find((e: any) =>
-          e.id ? e.id === v : false
+          e.id ? e.id === v : false,
         );
         if (enumObject && enumObject.name) {
           valueName = enumObject.name;
@@ -125,7 +125,7 @@ class FieldHelper {
         const imageField = migrImageField.properties.find(p => p.name === name);
         if (imageField && imageField.enum) {
           const imageFieldValueObject: any = imageField.enum.find((e: any) =>
-            e.id ? e.id === value : false
+            e.id ? e.id === value : false,
           );
           if (imageFieldValueObject) {
             return imageFieldValueObject.name;

+ 1 - 1
src/@types/InitialSetup.ts

@@ -18,6 +18,6 @@ export type CustomerInfoTrial = {
 export type CustomerInfoFull = CustomerInfoBasic & CustomerInfoTrial;
 
 export const isCustomerInfoFull = (
-  customerInfo: CustomerInfoFull | CustomerInfoBasic
+  customerInfo: CustomerInfoFull | CustomerInfoBasic,
 ): customerInfo is CustomerInfoFull =>
   (<CustomerInfoFull>customerInfo).interestedIn !== undefined;

+ 1 - 1
src/@types/MainItem.ts

@@ -45,7 +45,7 @@ type NetworkMapSourceDest = {
   };
 };
 export const isNetworkMapSecurityGroups = (
-  n: any
+  n: any,
 ): n is NetworkMapSecurityGroups =>
   typeof n !== "string" && n && n.security_groups;
 export const isNetworkMapSourceDest = (n: any): n is NetworkMapSourceDest =>

+ 1 - 1
src/@types/Network.ts

@@ -40,7 +40,7 @@ export type NetworkMap = {
 export const NetworkUtils = {
   getPortKeyNetworkId: (
     networks: Network[],
-    id: string
+    id: string,
   ): { portKey: string | null; id: string } => {
     const idMatches = /(.*):(.*)/.exec(String(id));
     if (!idMatches) {

+ 3 - 6
src/components/App.tsx

@@ -133,10 +133,7 @@ class App extends React.Component<Record<string, unknown>, State> {
       />
     );
 
-    const renderRoute = (
-      path: string,
-      element: React.ReactNode,
-    ) => {
+    const renderRoute = (path: string, element: React.ReactNode) => {
       if (!userStore.loggedUser) {
         return renderMessagePage({
           path,
@@ -160,7 +157,7 @@ class App extends React.Component<Record<string, unknown>, State> {
       }
       const actualPath = `${path || `/${name}`}`;
       const requiresAdmin = Boolean(
-        navigationMenu.find(n => n.value === name && n.requiresAdmin)
+        navigationMenu.find(n => n.value === name && n.requiresAdmin),
       );
       if (!requiresAdmin) {
         return renderRoute(actualPath, element);
@@ -252,7 +249,7 @@ class App extends React.Component<Record<string, unknown>, State> {
             {renderRoute("/streamlog", <LogStreamPage />)}
             {
               // @ts-ignore
-            <Route path="*" element={<MessagePage />} />
+              <Route path="*" element={<MessagePage />} />
             }
           </Routes>
         </Router>

+ 8 - 8
src/components/modules/DashboardModule/DashboardActivity/DashboardActivity.spec.tsx

@@ -21,7 +21,7 @@ import { ThemePalette } from "@src/components/Theme";
 import DashboardActivity from ".";
 
 const encodedProgressImage = encodeURIComponent(
-  progressImage(ThemePalette.grayscale[3], ThemePalette.primary)
+  progressImage(ThemePalette.grayscale[3], ThemePalette.primary),
 );
 
 jest.mock("react-router", () => ({ Link: "a" }));
@@ -54,14 +54,14 @@ describe("DashboardActivity", () => {
   it("renders no recent activity", () => {
     render(<DashboardActivity notificationItems={[]} />);
     expect(
-      TestUtils.select("DashboardActivity__Message")!.textContent
+      TestUtils.select("DashboardActivity__Message")!.textContent,
     ).toContain("There is no recent activity");
   });
 
   it("fires new click", () => {
     const onNewClick = jest.fn();
     render(
-      <DashboardActivity notificationItems={[]} onNewClick={onNewClick} />
+      <DashboardActivity notificationItems={[]} onNewClick={onNewClick} />,
     );
     TestUtils.select("Button__StyledButton")!.click();
     expect(onNewClick).toHaveBeenCalled();
@@ -69,7 +69,7 @@ describe("DashboardActivity", () => {
 
   it("renders loading", () => {
     const { rerender } = render(
-      <DashboardActivity notificationItems={[]} loading />
+      <DashboardActivity notificationItems={[]} loading />,
     );
     expect(TestUtils.select("DashboardActivity__LoadingWrapper")).toBeTruthy();
 
@@ -96,21 +96,21 @@ describe("DashboardActivity", () => {
     expect(itemElement.getAttribute("to")).toBe(href);
 
     const background = window.getComputedStyle(
-      TestUtils.select("StatusIcon__Wrapper", itemElement)!
+      TestUtils.select("StatusIcon__Wrapper", itemElement)!,
     ).background;
     expect(background).toContain(expectedStatusIcon);
 
     expect(
       TestUtils.select("NotificationDropdown__ItemTransferBadge", itemElement)!
-        .textContent
+        .textContent,
     ).toContain(ITEMS[idx].type === "transfer" ? "TR" : "DE");
     expect(
       TestUtils.select("NotificationDropdown__ItemTitle", itemElement)!
-        .textContent
+        .textContent,
     ).toContain(ITEMS[idx].name);
     expect(
       TestUtils.select("NotificationDropdown__ItemDescription", itemElement)!
-        .textContent
+        .textContent,
     ).toContain(ITEMS[idx].description);
   });
 });

+ 4 - 4
src/components/modules/DashboardModule/DashboardActivity/DashboardActivity.tsx

@@ -112,8 +112,8 @@ class DashboardActivity extends React.Component<Props> {
                 ? item.type === "transfer"
                   ? "/executions"
                   : item.type === "deployment"
-                  ? "/tasks"
-                  : ""
+                    ? "/tasks"
+                    : ""
                 : "";
 
             return (
@@ -174,8 +174,8 @@ class DashboardActivity extends React.Component<Props> {
           {this.props.notificationItems.length === 0 && this.props.loading
             ? this.renderLoading()
             : this.props.notificationItems.length
-            ? this.renderList()
-            : this.renderNoItems()}
+              ? this.renderList()
+              : this.renderNoItems()}
         </Module>
       </Wrapper>
     );

+ 1 - 1
src/components/modules/DashboardModule/DashboardBarChart/BarChartNiceScale.ts

@@ -31,7 +31,7 @@ class BarChartNiceScale {
 
   niceNum(localRange: number, round: boolean) {
     const exponent = Math.floor(
-      Math.log10(localRange)
+      Math.log10(localRange),
     ); /** exponent of localRange */
     const fraction =
       localRange / 10 ** exponent; /** fractional part of localRange */

+ 14 - 14
src/components/modules/DashboardModule/DashboardBarChart/DashboardBarChart.spec.tsx

@@ -68,18 +68,18 @@ describe("DashboardBarChart", () => {
           data={DATA}
           yNumTicks={3}
           colors={[ThemePalette.alert, ThemePalette.primary]}
-        />
+        />,
       );
 
       const stackedBarEl = TestUtils.selectAll(
         "DashboardBarChart__StackedBar-",
-        TestUtils.selectAll("DashboardBarChart__Bar-")[barIndex]
+        TestUtils.selectAll("DashboardBarChart__Bar-")[barIndex],
       )[stackedBarIndex];
       const style = window.getComputedStyle(stackedBarEl);
 
       expect(parseFloat(style.height)).toBeCloseTo(expectedHeight);
       expect(TestUtils.rgbToHex(style.background)).toBe(expectedColor);
-    }
+    },
   );
 
   it.each`
@@ -97,19 +97,19 @@ describe("DashboardBarChart", () => {
           data={DATA}
           yNumTicks={3}
           onBarMouseEnter={onBarMouseEnter}
-        />
+        />,
       );
       userEvent.hover(
         TestUtils.selectAll(
           "DashboardBarChart__StackedBar-",
-          TestUtils.selectAll("DashboardBarChart__Bar-")[barIndex]
-        )[stackedBarIndex]
+          TestUtils.selectAll("DashboardBarChart__Bar-")[barIndex],
+        )[stackedBarIndex],
       );
       expect(onBarMouseEnter).toHaveBeenCalledWith(
         { x: 48, y: 65 },
-        expectedData
+        expectedData,
       );
-    }
+    },
   );
 
   it("does not render bars with height of 0%", () => {
@@ -128,11 +128,11 @@ describe("DashboardBarChart", () => {
 
     const firstStackedBars = TestUtils.selectAll(
       "DashboardBarChart__StackedBar-",
-      TestUtils.selectAll("DashboardBarChart__Bar-")[0]
+      TestUtils.selectAll("DashboardBarChart__Bar-")[0],
     );
     const secondStackedBars = TestUtils.selectAll(
       "DashboardBarChart__StackedBar-",
-      TestUtils.selectAll("DashboardBarChart__Bar-")[1]
+      TestUtils.selectAll("DashboardBarChart__Bar-")[1],
     );
 
     expect(firstStackedBars.length).toBe(0);
@@ -168,7 +168,7 @@ describe("DashboardBarChart", () => {
         data={DATA}
         yNumTicks={3}
         onBarMouseLeave={onBarMouseLeave}
-      />
+      />,
     );
 
     const bar = TestUtils.selectAll("DashboardBarChart__StackedBar-")[0];
@@ -184,7 +184,7 @@ describe("DashboardBarChart", () => {
         data={DATA}
         yNumTicks={3}
         onBarMouseEnter={onBarMouseEnter}
-      />
+      />,
     );
 
     const firstBar = TestUtils.selectAll("DashboardBarChart__StackedBar-")[0];
@@ -195,7 +195,7 @@ describe("DashboardBarChart", () => {
 
   it("recalculates ticks when new data is received", () => {
     const { rerender } = render(
-      <DashboardBarChart data={DATA} yNumTicks={3} />
+      <DashboardBarChart data={DATA} yNumTicks={3} />,
     );
 
     const bars = TestUtils.selectAll("DashboardBarChart__Bar-");
@@ -234,7 +234,7 @@ describe("DashboardBarChart", () => {
     render(<DashboardBarChart data={DATA} yNumTicks={3} />);
 
     const firstStackedBar = TestUtils.selectAll(
-      "DashboardBarChart__StackedBar-"
+      "DashboardBarChart__StackedBar-",
     )[0];
     const spy = jest.spyOn(console, "error").mockImplementation(() => {});
 

+ 3 - 3
src/components/modules/DashboardModule/DashboardBarChart/DashboardBarChart.tsx

@@ -99,7 +99,7 @@ type Props = {
   colors?: string[];
   onBarMouseEnter?: (
     position: { x: number; y: number },
-    item: DataItem
+    item: DataItem,
   ) => void;
   onBarMouseLeave?: () => void;
 };
@@ -125,9 +125,9 @@ class DashboardBarChart extends React.Component<Props> {
       (max, item) =>
         Math.max(
           max,
-          item.values.reduce((sum, value) => sum + value, 0)
+          item.values.reduce((sum, value) => sum + value, 0),
         ),
-      1
+      1,
     );
     const niceScale = new BarChartNiceScale(0, this.range, props.yNumTicks);
     this.ticks = [];

+ 11 - 11
src/components/modules/DashboardModule/DashboardContent/DashboardContent.spec.tsx

@@ -61,16 +61,16 @@ describe("DashboardContent", () => {
   it("renders modules for non-admin users", () => {
     render(<DashboardContent {...defaultProps} />);
     expect(
-      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")
+      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel"),
     ).toHaveLength(3);
     expect(
-      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")[0].textContent
+      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")[0].textContent,
     ).toBe("Replicas");
     expect(
-      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")[1].textContent
+      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")[1].textContent,
     ).toBe("Migrations");
     expect(
-      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")[2].textContent
+      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")[2].textContent,
     ).toBe("Endpoints");
   });
 
@@ -78,22 +78,22 @@ describe("DashboardContent", () => {
     render(<DashboardContent {...defaultProps} isAdmin />);
 
     expect(
-      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")
+      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel"),
     ).toHaveLength(5);
     expect(
-      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")[0].textContent
+      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")[0].textContent,
     ).toBe("Replicas");
     expect(
-      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")[1].textContent
+      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")[1].textContent,
     ).toBe("Migrations");
     expect(
-      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")[2].textContent
+      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")[2].textContent,
     ).toBe("Endpoints");
     expect(
-      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")[3].textContent
+      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")[3].textContent,
     ).toBe("Users");
     expect(
-      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")[4].textContent
+      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel")[4].textContent,
     ).toBe("Projects");
   });
 
@@ -102,7 +102,7 @@ describe("DashboardContent", () => {
     render(<DashboardContent {...defaultProps} />);
 
     expect(
-      TestUtils.select("DashboardContent__MiddleMobileLayout")
+      TestUtils.select("DashboardContent__MiddleMobileLayout"),
     ).toBeTruthy();
   });
 

+ 2 - 2
src/components/modules/DashboardModule/DashboardContent/DashboardContent.tsx

@@ -176,13 +176,13 @@ class DashboardContent extends React.Component<Props, State> {
 
   getReplicas() {
     return this.props.transfers.filter(
-      (r: TransferItem) => r.scenario === "replica"
+      (r: TransferItem) => r.scenario === "replica",
     );
   }
 
   getLiveMigrations() {
     return this.props.transfers.filter(
-      (r: TransferItem) => r.scenario === "live_migration"
+      (r: TransferItem) => r.scenario === "live_migration",
     );
   }
 

+ 23 - 23
src/components/modules/DashboardModule/DashboardExecutions/DashboardExecutions.spec.tsx

@@ -78,39 +78,39 @@ describe("DashboardExecutions", () => {
     render(<DashboardExecutions {...newProps} />);
 
     expect(TestUtils.select("DashboardExecutions__Title")?.textContent).toBe(
-      "Items Created"
+      "Items Created",
     );
     expect(
-      TestUtils.select("DashboardExecutions__NoDataMessage")?.textContent
+      TestUtils.select("DashboardExecutions__NoDataMessage")?.textContent,
     ).toBe("No recent activity in this project");
   });
 
   it("groups data correctly", () => {
     render(<DashboardExecutions {...defaultProps} />);
     expect(
-      TestUtils.select("DashboardExecutions__BarChartWrapper")
+      TestUtils.select("DashboardExecutions__BarChartWrapper"),
     ).toBeTruthy();
     expect(TestUtils.selectAll("DashboardBarChart__Bar-")).toHaveLength(2);
     expect(
       TestUtils.selectAll(
         "DashboardBarChart__StackedBar-",
-        TestUtils.selectAll("DashboardBarChart__Bar-")[0]
-      )
+        TestUtils.selectAll("DashboardBarChart__Bar-")[0],
+      ),
     ).toHaveLength(1);
     expect(
       TestUtils.selectAll(
         "DashboardBarChart__StackedBar-",
-        TestUtils.selectAll("DashboardBarChart__Bar-")[1]
-      )
+        TestUtils.selectAll("DashboardBarChart__Bar-")[1],
+      ),
     ).toHaveLength(2);
     expect(TestUtils.select("DropdownLink__Label")?.textContent).toBe(
-      "Last 30 days"
+      "Last 30 days",
     );
     expect(
-      TestUtils.selectAll("DashboardBarChart__BarLabel")[0].textContent
+      TestUtils.selectAll("DashboardBarChart__BarLabel")[0].textContent,
     ).toBe(TWENTIETH.minus({ days: 5 }).toFormat("dd LLL"));
     expect(
-      TestUtils.selectAll("DashboardBarChart__BarLabel")[1].textContent
+      TestUtils.selectAll("DashboardBarChart__BarLabel")[1].textContent,
     ).toBe(TWENTIETH.toFormat("dd LLL"));
   });
 
@@ -126,30 +126,30 @@ describe("DashboardExecutions", () => {
 
     userEvent.click(TestUtils.select("DropdownLink__LinkButton")!);
     expect(TestUtils.selectAll("DropdownLink__ListItem-")[1].textContent).toBe(
-      "Last 12 months"
+      "Last 12 months",
     );
     userEvent.click(TestUtils.selectAll("DropdownLink__ListItem-")[1]!);
     expect(TestUtils.select("DropdownLink__Label")?.textContent).toBe(
-      "Last 12 months"
+      "Last 12 months",
     );
     expect(TestUtils.selectAll("DashboardBarChart__Bar-")).toHaveLength(2);
     expect(
       TestUtils.selectAll(
         "DashboardBarChart__StackedBar-",
-        TestUtils.selectAll("DashboardBarChart__Bar-")[0]
-      )
+        TestUtils.selectAll("DashboardBarChart__Bar-")[0],
+      ),
     ).toHaveLength(1);
     expect(
       TestUtils.selectAll(
         "DashboardBarChart__StackedBar-",
-        TestUtils.selectAll("DashboardBarChart__Bar-")[1]
-      )
+        TestUtils.selectAll("DashboardBarChart__Bar-")[1],
+      ),
     ).toHaveLength(2);
     expect(
-      TestUtils.selectAll("DashboardBarChart__BarLabel")[0].textContent
+      TestUtils.selectAll("DashboardBarChart__BarLabel")[0].textContent,
     ).toBe(TWENTIETH.minus({ months: 2 }).toFormat("LLL"));
     expect(
-      TestUtils.selectAll("DashboardBarChart__BarLabel")[1].textContent
+      TestUtils.selectAll("DashboardBarChart__BarLabel")[1].textContent,
     ).toBe(TWENTIETH.toFormat("LLL"));
   });
 
@@ -166,16 +166,16 @@ describe("DashboardExecutions", () => {
 
     expect(TestUtils.select("DashboardExecutions__Tooltip")).toBeTruthy();
     expect(
-      TestUtils.select("DashboardExecutions__TooltipHeader")?.textContent
+      TestUtils.select("DashboardExecutions__TooltipHeader")?.textContent,
     ).toBe(TWENTIETH.minus({ days: 5 }).toFormat("dd LLLL"));
     expect(
-      TestUtils.selectAll("DashboardExecutions__TooltipRow-")[0].textContent
+      TestUtils.selectAll("DashboardExecutions__TooltipRow-")[0].textContent,
     ).toBe("Created1");
     expect(
-      TestUtils.selectAll("DashboardExecutions__TooltipRow-")[1].textContent
+      TestUtils.selectAll("DashboardExecutions__TooltipRow-")[1].textContent,
     ).toBe("Replicas1");
     expect(
-      TestUtils.selectAll("DashboardExecutions__TooltipRow-")[2].textContent
+      TestUtils.selectAll("DashboardExecutions__TooltipRow-")[2].textContent,
     ).toBe("Migrations0");
 
     userEvent.unhover(TestUtils.select("DashboardBarChart__StackedBar-")!);
@@ -226,7 +226,7 @@ describe("DashboardExecutions", () => {
     rerender(<DashboardExecutions {...newProps2} />);
 
     expect(
-      TestUtils.select("DashboardExecutions__LoadingWrapper")
+      TestUtils.select("DashboardExecutions__LoadingWrapper"),
     ).toBeTruthy();
   });
 

+ 3 - 3
src/components/modules/DashboardModule/DashboardExecutions/DashboardExecutions.tsx

@@ -176,11 +176,11 @@ class DashboardExecutions extends React.Component<Props, State> {
       .minus(Duration.fromObject({ [periodUnit]: periodValue }))
       .toJSDate();
     creations = creations.filter(
-      e => new Date(e.created_at).getTime() >= oldestDate.getTime()
+      e => new Date(e.created_at).getTime() >= oldestDate.getTime(),
     );
     creations.sort(
       (a, b) =>
-        new Date(a.created_at).getTime() - new Date(b.created_at).getTime()
+        new Date(a.created_at).getTime() - new Date(b.created_at).getTime(),
     );
 
     this.groupByPeriod(creations, periodUnit);
@@ -252,7 +252,7 @@ class DashboardExecutions extends React.Component<Props, State> {
       label: interval.label.replace("{x}", interval.value.split("-")[0]),
     }));
     const selectedItem = INTERVALS.find(
-      i => i.value === this.state.selectedPeriod
+      i => i.value === this.state.selectedPeriod,
     );
     return (
       <DropdownWrapper>

+ 8 - 5
src/components/modules/DashboardModule/DashboardInfoCount/DashboardInfoCount.spec.tsx

@@ -42,13 +42,16 @@ describe("DashboardInfoCount", () => {
   it("renders CountBlock for each data item", () => {
     render(<DashboardInfoCount data={mockData} />);
     expect(
-      TestUtils.selectAll("DashboardInfoCount__CountBlockValue-")[0].textContent
+      TestUtils.selectAll("DashboardInfoCount__CountBlockValue-")[0]
+        .textContent,
     ).toBe("1");
     expect(
-      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel-")[0].textContent
+      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel-")[0]
+        .textContent,
     ).toBe("Label1");
     expect(
-      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel-")[1].textContent
+      TestUtils.selectAll("DashboardInfoCount__CountBlockLabel-")[1]
+        .textContent,
     ).toBe("Label2");
     // In this case, the value "0" will not be rendered because of the loading state.
   });
@@ -59,8 +62,8 @@ describe("DashboardInfoCount", () => {
     expect(
       TestUtils.select(
         "DashboardInfoCount__LoadingWrapper-",
-        TestUtils.selectAll("DashboardInfoCount__CountBlock-")[1]
-      )
+        TestUtils.selectAll("DashboardInfoCount__CountBlock-")[1],
+      ),
     ).toBeTruthy();
   });
 

+ 12 - 12
src/components/modules/DashboardModule/DashboardLicence/DashboardLicence.spec.tsx

@@ -59,25 +59,25 @@ describe("DashboardLicence", () => {
     render(<DashboardLicence {...defaultProps} />);
     const futureDate = DateTime.now().plus({ years: 1 });
     expect(
-      TestUtils.select("DashboardLicence__TopInfoDateTop-")?.textContent
+      TestUtils.select("DashboardLicence__TopInfoDateTop-")?.textContent,
     ).toBe(`${futureDate.toFormat("LLL")} '${futureDate.toFormat("yy")}`);
     expect(
-      TestUtils.select("DashboardLicence__TopInfoDateBottom-")?.textContent
+      TestUtils.select("DashboardLicence__TopInfoDateBottom-")?.textContent,
     ).toBe(futureDate.toFormat("dd"));
 
     expect(
       TestUtils.selectAll("DashboardLicence__ChartHeaderCurrent-")[0]
-        .textContent
+        .textContent,
     ).toBe("5 Used Replicas ");
     expect(
-      TestUtils.selectAll("DashboardLicence__ChartHeaderTotal-")[0].textContent
+      TestUtils.selectAll("DashboardLicence__ChartHeaderTotal-")[0].textContent,
     ).toBe("Total 10");
     expect(
       TestUtils.selectAll("DashboardLicence__ChartHeaderCurrent-")[1]
-        .textContent
+        .textContent,
     ).toBe("3 Used Migrations ");
     expect(
-      TestUtils.selectAll("DashboardLicence__ChartHeaderTotal-")[1].textContent
+      TestUtils.selectAll("DashboardLicence__ChartHeaderTotal-")[1].textContent,
     ).toBe("Total 5");
   });
 
@@ -91,7 +91,7 @@ describe("DashboardLicence", () => {
 
     expect(TestUtils.select("DashboardLicence__LicenceError-")).toBeTruthy();
     expect(
-      TestUtils.select("DashboardLicence__LicenceError-")?.textContent
+      TestUtils.select("DashboardLicence__LicenceError-")?.textContent,
     ).toBe("An error occurred.");
   });
 
@@ -108,12 +108,12 @@ describe("DashboardLicence", () => {
 
     expect(TestUtils.select("DashboardLicence__LicenceError-")).toBeTruthy();
     expect(
-      TestUtils.select("DashboardLicence__LicenceError-")?.textContent
+      TestUtils.select("DashboardLicence__LicenceError-")?.textContent,
     ).toContain(
-      "Please contact your Coriolis representative with the Appliance ID"
+      "Please contact your Coriolis representative with the Appliance ID",
     );
     expect(
-      TestUtils.select("DashboardLicence__ApplianceId-")?.textContent
+      TestUtils.select("DashboardLicence__ApplianceId-")?.textContent,
     ).toBe("Appliance ID:test-id-licencev2");
     expect(TestUtils.select("Button__")?.textContent).toBe("Add Licence");
   });
@@ -148,7 +148,7 @@ describe("DashboardLicence", () => {
     render(<DashboardLicence {...newProps} />);
 
     const button = TestUtils.select(
-      "DashboardLicence__AddLicenceButtonWrapper"
+      "DashboardLicence__AddLicenceButtonWrapper",
     );
     const logo = TestUtils.select("DashboardLicence__Logo");
 
@@ -177,7 +177,7 @@ describe("DashboardLicence", () => {
     render(<DashboardLicence {...newProps} />);
     expect(
       TestUtils.selectAll("DashboardLicence__ChartHeaderCurrent-")[0]
-        .textContent
+        .textContent,
     ).toBe("1 Used Replica ");
   });
 });

+ 6 - 6
src/components/modules/DashboardModule/DashboardLicence/DashboardLicence.tsx

@@ -171,7 +171,7 @@ class DashboardLicence extends React.Component<Props> {
         () => !!this.buttonWrapperRef && !!this.licenceLogoRef,
         {
           silent: true,
-        }
+        },
       );
       this.resetLayout();
     };
@@ -218,7 +218,7 @@ class DashboardLicence extends React.Component<Props> {
       ],
     ];
     const expirationData = DateUtils.getLocalDate(
-      info.earliestLicenceExpiryDate
+      info.earliestLicenceExpiryDate,
     );
     return (
       <LicenceInfo>
@@ -265,9 +265,9 @@ class DashboardLicence extends React.Component<Props> {
   renderLicenceError() {
     return (
       <LicenceError>
-        {this.props.licenceError?.split("\n").map((str, i) => (
-          <p key={i}>{str}</p>
-        ))}
+        {this.props.licenceError
+          ?.split("\n")
+          .map((str, i) => <p key={i}>{str}</p>)}
       </LicenceError>
     );
   }
@@ -325,7 +325,7 @@ class DashboardLicence extends React.Component<Props> {
       } else {
         moduleContent = this.renderLicenceExpired(
           licence,
-          this.props.licenceServerStatus
+          this.props.licenceServerStatus,
         );
       }
     } else if (this.props.loading) {

+ 13 - 13
src/components/modules/DashboardModule/DashboardPieChart/DashboardPieChart.spec.tsx

@@ -25,7 +25,7 @@ describe("DashboardPieChart", () => {
     options: MouseEventInit & {
       offsetX?: number;
       offsetY?: number;
-    } = {}
+    } = {},
   ) => {
     const mouseMoveEvent = new MouseEvent("mousemove", {
       bubbles: true,
@@ -49,10 +49,10 @@ describe("DashboardPieChart", () => {
     const spyAdd = jest.spyOn(HTMLCanvasElement.prototype, "addEventListener");
     const spyRemove = jest.spyOn(
       HTMLCanvasElement.prototype,
-      "removeEventListener"
+      "removeEventListener",
     );
     const { unmount } = render(
-      <DashboardPieChart size={100} data={[]} colors={[]} />
+      <DashboardPieChart size={100} data={[]} colors={[]} />,
     );
     expect(spyAdd).toHaveBeenCalledWith("mousemove", expect.any(Function));
     expect(spyAdd).toHaveBeenCalledWith("mouseleave", expect.any(Function));
@@ -73,7 +73,7 @@ describe("DashboardPieChart", () => {
         data={[{ value: 50 }]}
         colors={["#FFF"]}
         onMouseOver={onMouseOverMock}
-      />
+      />,
     );
     const canvas = document.querySelector("canvas") as HTMLCanvasElement;
     fireMouseMove(canvas, { offsetX: 50, offsetY: 50 });
@@ -93,7 +93,7 @@ describe("DashboardPieChart", () => {
         colors={["#FFF"]}
         onMouseLeave={onMouseLeaveMock}
         onMouseOver={() => {}}
-      />
+      />,
     );
     const canvas = document.querySelector("canvas") as HTMLCanvasElement;
     fireMouseMove(canvas, { offsetX: 50, offsetY: 50 });
@@ -111,7 +111,7 @@ describe("DashboardPieChart", () => {
         data={[{ value: 50 }]}
         colors={["#FFF"]}
         onMouseOver={() => {}}
-      />
+      />,
     );
     const canvas = document.querySelector("canvas") as HTMLCanvasElement;
     fireEvent.mouseLeave(canvas);
@@ -125,7 +125,7 @@ describe("DashboardPieChart", () => {
         data={[]}
         colors={[]}
         onMouseLeave={onMouseLeaveMock}
-      />
+      />,
     );
     const canvas = document.querySelector("canvas") as HTMLCanvasElement;
     fireEvent.mouseLeave(canvas);
@@ -134,7 +134,7 @@ describe("DashboardPieChart", () => {
 
   it("drawChart is called when props are updated", () => {
     const { rerender } = render(
-      <DashboardPieChart size={100} data={[]} colors={["#FFF"]} />
+      <DashboardPieChart size={100} data={[]} colors={["#FFF"]} />,
     );
     const spy = jest.spyOn(DashboardPieChart.prototype, "drawChart");
     rerender(
@@ -142,7 +142,7 @@ describe("DashboardPieChart", () => {
         size={200}
         data={[{ value: 50 }, { value: 100 }]}
         colors={["#FFF", "#000"]}
-      />
+      />,
     );
     expect(spy).toHaveBeenCalled();
   });
@@ -154,7 +154,7 @@ describe("DashboardPieChart", () => {
         data={[]}
         colors={[]}
         holeStyle={{ radius: 10, color: "#fff" }}
-      />
+      />,
     );
     expect(document.querySelector("canvas")).toBeTruthy();
     expect(TestUtils.select("DashboardPieChart__OuterShadow")).toBeTruthy();
@@ -182,7 +182,7 @@ describe("DashboardPieChart", () => {
   it("does not remove event listeners when canvas is null", () => {
     const spyRemove = jest.spyOn(
       HTMLCanvasElement.prototype,
-      "removeEventListener"
+      "removeEventListener",
     );
 
     const instance = new DashboardPieChart({ size: 100, data: [], colors: [] });
@@ -255,7 +255,7 @@ describe("DashboardPieChart", () => {
   it("returns from drawChart when canvas context is not available", () => {
     const beginPatchSpy = jest.spyOn(
       CanvasRenderingContext2D.prototype,
-      "beginPath"
+      "beginPath",
     );
     const instance = new DashboardPieChart({ size: 100, data: [], colors: [] });
     instance.canvas = document.createElement("canvas");
@@ -287,7 +287,7 @@ describe("DashboardPieChart", () => {
         data={[]}
         colors={[]}
         customRef={customRefMock}
-      />
+      />,
     );
     expect(customRefMock).toHaveBeenCalledTimes(1);
     expect(customRefMock.mock.calls[0][0]).toBeInstanceOf(HTMLElement);

+ 2 - 2
src/components/modules/DashboardModule/DashboardPieChart/DashboardPieChart.tsx

@@ -131,11 +131,11 @@ class DashboardPieChart extends React.Component<Props> {
     this.sum = this.topData.reduce((total, item) => total + item.value, 0);
     if (this.sum === 0) {
       this.angles = this.topData.map(
-        () => Math.PI * ((1 / this.topData.length) * 2)
+        () => Math.PI * ((1 / this.topData.length) * 2),
       );
     } else {
       this.angles = this.topData.map(
-        item => Math.PI * ((item.value / this.sum) * 2)
+        item => Math.PI * ((item.value / this.sum) * 2),
       );
     }
     const halfSize = this.props.size / 2;

+ 11 - 11
src/components/modules/DashboardModule/DashboardTopEndpoints/DashboardTopEndpoints.spec.tsx

@@ -30,7 +30,7 @@ type BuildType<T extends "replica" | "migration"> = T extends "replica"
 const buildItem = <T extends "replica" | "migration">(
   type: T,
   origin_endpoint_id: string,
-  destination_endpoint_id: string
+  destination_endpoint_id: string,
 ): BuildType<T> => {
   const item = {
     id: "",
@@ -95,14 +95,14 @@ describe("DashboardTopEndpoints", () => {
         transfers={[]}
         endpoints={[]}
         loading={true}
-      />
+      />,
     );
     expect(TestUtils.select("StatusImage__Image")).toBeTruthy();
   });
 
   it("should display no data message", () => {
     render(
-      <DashboardTopEndpoints {...defaultProps} transfers={[]} endpoints={[]} />
+      <DashboardTopEndpoints {...defaultProps} transfers={[]} endpoints={[]} />,
     );
     expect(TestUtils.select("DashboardTopEndpoints__NoItems")).toBeTruthy();
   });
@@ -115,13 +115,13 @@ describe("DashboardTopEndpoints", () => {
         onNewClick={onNewClickMock}
         transfers={[]}
         endpoints={[]}
-      />
+      />,
     );
 
     fireEvent.click(
       TestUtils.select("DashboardTopEndpoints__NoItems")?.querySelector(
-        "button"
-      )!
+        "button",
+      )!,
     );
     expect(onNewClickMock).toHaveBeenCalledTimes(1);
   });
@@ -130,23 +130,23 @@ describe("DashboardTopEndpoints", () => {
     render(<DashboardTopEndpoints {...defaultProps} />);
 
     expect(
-      TestUtils.select("DashboardTopEndpoints__ChartWrapper")
+      TestUtils.select("DashboardTopEndpoints__ChartWrapper"),
     ).toBeTruthy();
     expect(
       TestUtils.selectAll(
-        "DashboardTopEndpoints__LegendLabel-"
-      )[0].attributes.getNamedItem("to")?.value
+        "DashboardTopEndpoints__LegendLabel-",
+      )[0].attributes.getNamedItem("to")?.value,
     ).toBe("/endpoints/a");
 
     expect(
-      TestUtils.selectAll("DashboardTopEndpoints__LegendLabel-")[1].textContent
+      TestUtils.selectAll("DashboardTopEndpoints__LegendLabel-")[1].textContent,
     ).toBe("b-name");
   });
 
   it("should call calculateGroupedEndpoints when component receives new props", () => {
     const calculateGroupedEndpointsSpy = jest.spyOn(
       DashboardTopEndpoints.prototype,
-      "calculateGroupedEndpoints"
+      "calculateGroupedEndpoints",
     );
 
     const { rerender } = render(<DashboardTopEndpoints {...defaultProps} />);

+ 5 - 5
src/components/modules/DashboardModule/DashboardTopEndpoints/DashboardTopEndpoints.tsx

@@ -177,13 +177,13 @@ class DashboardTopEndpoints extends React.Component<Props, State> {
     const count = (
       mainItems: TransferItem[],
       endpointId: string,
-      scenario: string
+      scenario: string,
     ) =>
       mainItems.filter(
         r =>
           r.scenario === scenario &&
           (r.destination_endpoint_id === endpointId ||
-            r.origin_endpoint_id === endpointId)
+            r.origin_endpoint_id === endpointId),
       ).length;
 
     props.endpoints.forEach(endpoint => {
@@ -191,7 +191,7 @@ class DashboardTopEndpoints extends React.Component<Props, State> {
       const migrationsCount = count(
         props.transfers,
         endpoint.id,
-        "live_migration"
+        "live_migration",
       );
       groupedEndpoints.push({
         endpoint,
@@ -333,8 +333,8 @@ class DashboardTopEndpoints extends React.Component<Props, State> {
           {this.props.loading && this.props.endpoints.length === 0
             ? this.renderLoading()
             : this.props.endpoints.length
-            ? this.renderChart()
-            : this.renderNoData()}
+              ? this.renderChart()
+              : this.renderNoData()}
         </Module>
       </Wrapper>
     );

+ 9 - 9
src/components/modules/DetailsModule/DetailsContentHeader/DetailsContentHeader.spec.tsx

@@ -43,8 +43,8 @@ describe("DetailsContentHeader", () => {
     render(<DetailsContentHeader {...defaultProps} />);
     expect(
       TestUtils.select(
-        "DetailsContentHeader__BackButton"
-      )?.attributes.getNamedItem("to")?.value
+        "DetailsContentHeader__BackButton",
+      )?.attributes.getNamedItem("to")?.value,
     ).toBe("/list");
   });
 
@@ -52,15 +52,15 @@ describe("DetailsContentHeader", () => {
     render(<DetailsContentHeader {...defaultProps} />);
     expect(
       window.getComputedStyle(
-        TestUtils.select("DetailsContentHeader__TypeImage")!
-      ).background
+        TestUtils.select("DetailsContentHeader__TypeImage")!,
+      ).background,
     ).toBe(`url(${defaultProps.typeImage}) no-repeat center`);
   });
 
   it("renders item title correctly", () => {
     render(<DetailsContentHeader {...defaultProps} />);
     expect(TestUtils.select("DetailsContentHeader__Text")?.textContent).toBe(
-      defaultProps.itemTitle
+      defaultProps.itemTitle,
     );
   });
 
@@ -77,10 +77,10 @@ describe("DetailsContentHeader", () => {
     render(<DetailsContentHeader {...defaultProps} />);
     expect(TestUtils.selectAll("StatusPill__Wrapper")).toHaveLength(2);
     expect(TestUtils.selectAll("StatusPill__Wrapper")[0].textContent).toBe(
-      defaultProps.itemType
+      defaultProps.itemType,
     );
     expect(TestUtils.selectAll("StatusPill__Wrapper")[1].textContent).toBe(
-      defaultProps.statusLabel
+      defaultProps.statusLabel,
     );
   });
 
@@ -99,7 +99,7 @@ describe("DetailsContentHeader", () => {
     expect(TestUtils.select("DropdownButton__Wrapper")).toBeTruthy();
     userEvent.click(TestUtils.select("DropdownButton__Wrapper")!);
     expect(TestUtils.selectAll("ActionDropdown__ListItem")[0].textContent).toBe(
-      "Test Action"
+      "Test Action",
     );
   });
 
@@ -116,7 +116,7 @@ describe("DetailsContentHeader", () => {
     render(<DetailsContentHeader {...defaultProps} />);
     expect(TestUtils.select("DetailsContentHeader__Description")).toBeTruthy();
     expect(
-      TestUtils.select("DetailsContentHeader__Description")?.textContent
+      TestUtils.select("DetailsContentHeader__Description")?.textContent,
     ).toBe(defaultProps.itemDescription);
   });
 });

+ 0 - 1
src/components/modules/DetailsModule/DetailsContentHeader/story.tsx

@@ -12,7 +12,6 @@ You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 import React from "react";
 import { storiesOf } from "@storybook/react";
 import DetailsContentHeader from ".";

+ 3 - 3
src/components/modules/DetailsModule/DetailsPageHeader/DetailsPageHeader.spec.tsx

@@ -12,7 +12,7 @@ You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-import React, { act }  from "react";
+import React, { act } from "react";
 
 import { User } from "@src/@types/User";
 import notificationStore from "@src/stores/NotificationStore";
@@ -108,10 +108,10 @@ describe("DetailsPageHeader", () => {
     });
     expect(TestUtils.select("UserDropdown__List")).toBeTruthy();
     expect(TestUtils.select("UserDropdown__Username")?.textContent).toBe(
-      user.name
+      user.name,
     );
     expect(TestUtils.select("UserDropdown__Email")?.textContent).toBe(
-      user.email
+      user.email,
     );
     await act(async () => {
       TestUtils.selectAll("UserDropdown__Label").forEach(item => {

+ 18 - 18
src/components/modules/EndpointModule/ChooseProvider/ChooseProvider.spec.tsx

@@ -71,7 +71,7 @@ describe("ChooseProvider", () => {
 
     readContentFromFileListMock = jest.spyOn(
       FileUtils,
-      "readContentFromFileList"
+      "readContentFromFileList",
     );
     readContentFromFileListMock.mockResolvedValue([
       {
@@ -131,7 +131,7 @@ describe("ChooseProvider", () => {
       <ChooseProvider
         {...defaultProps}
         onUploadEndpoint={onUploadEndpointMock}
-      />
+      />,
     );
     const fileInput = document.querySelector('input[type="file"]')!;
 
@@ -140,7 +140,7 @@ describe("ChooseProvider", () => {
       "openstack.endpoint",
       {
         type: "application/json",
-      }
+      },
     );
 
     expect(fileInput).toBeTruthy();
@@ -160,7 +160,7 @@ describe("ChooseProvider", () => {
     expect(style().border).toBe(`1px dashed white`);
     fireEvent.dragEnter(window, mockDataTransfer([]));
     expect(style().border).toBe(
-      `1px dashed ${ThemePalette.primary.toLowerCase()}`
+      `1px dashed ${ThemePalette.primary.toLowerCase()}`,
     );
   });
 
@@ -183,7 +183,7 @@ describe("ChooseProvider", () => {
     fireEvent.drop(window, mockDataTransfer([file]));
 
     await waitFor(() =>
-      expect(FileUtils.readContentFromFileList).toHaveBeenCalled()
+      expect(FileUtils.readContentFromFileList).toHaveBeenCalled(),
     );
   });
 
@@ -204,8 +204,8 @@ describe("ChooseProvider", () => {
     await waitFor(() =>
       expect(notificationStore.alert).toHaveBeenCalledWith(
         "Invalid .endpoint file",
-        "error"
-      )
+        "error",
+      ),
     );
   });
 
@@ -229,8 +229,8 @@ describe("ChooseProvider", () => {
     await waitFor(() =>
       expect(notificationStore.alert).toHaveBeenCalledWith(
         "Invalid .endpoint file",
-        "error"
-      )
+        "error",
+      ),
     );
   });
 
@@ -249,7 +249,7 @@ describe("ChooseProvider", () => {
       ({ name, content }) =>
         new File([content], name, {
           type: "application/json",
-        })
+        }),
     );
 
     readContentFromFileListMock.mockResolvedValue(multipleFilesMeta);
@@ -268,10 +268,10 @@ describe("ChooseProvider", () => {
     await waitFor(() => {
       expect(defaultProps.onResetValidation).toHaveBeenCalledTimes(1);
       expect(setStateObj.multipleUploadedEndpoints[0].name).toBe(
-        OPENSTACK_ENDPOINT.name
+        OPENSTACK_ENDPOINT.name,
       );
       expect(setStateObj.multipleUploadedEndpoints[1].name).toBe(
-        `${OPENSTACK_ENDPOINT.name} (1)`
+        `${OPENSTACK_ENDPOINT.name} (1)`,
       );
     });
   });
@@ -292,12 +292,12 @@ describe("ChooseProvider", () => {
       ({ name, content }) =>
         new File([content], name, {
           type: "application/json",
-        })
+        }),
     );
     readContentFromFileListMock.mockResolvedValue(multipleFilesMeta);
 
     render(
-      <ChooseProvider {...defaultProps} onResizeUpdate={onResizeUpdateMock} />
+      <ChooseProvider {...defaultProps} onResizeUpdate={onResizeUpdateMock} />,
     );
     const fileInput = document.querySelector('input[type="file"]')!;
     fireEvent.change(fileInput, { target: { files: multipleFiles } });
@@ -339,8 +339,8 @@ describe("ChooseProvider", () => {
     await waitFor(() =>
       expect(notificationStore.alert).toHaveBeenCalledWith(
         "1 Coriolis Region couldn't be mapped",
-        "warning"
-      )
+        "warning",
+      ),
     );
   });
 
@@ -354,11 +354,11 @@ describe("ChooseProvider", () => {
 
     chooseProviderInstance.handleRemoveUploadedEndpoint(
       OPENSTACK_ENDPOINT,
-      true
+      true,
     );
 
     expect(defaultProps.onRemoveEndpoint).toHaveBeenCalledWith(
-      OPENSTACK_ENDPOINT
+      OPENSTACK_ENDPOINT,
     );
   });
 

+ 8 - 8
src/components/modules/EndpointModule/ChooseProvider/ChooseProvider.tsx

@@ -171,7 +171,7 @@ class ChooseProvider extends React.Component<Props, State> {
           e.preventDefault();
           this.setState({ highlightDropzone: false });
           const filesContents = await FileUtils.readContentFromFileList(
-            e.dataTransfer.files
+            e.dataTransfer.files,
           );
           if (filesContents.length === 1) {
             this.processOneFileContent(filesContents[0].content);
@@ -196,7 +196,7 @@ class ChooseProvider extends React.Component<Props, State> {
 
   parseEndpoint(
     content: string,
-    skipAlert?: boolean
+    skipAlert?: boolean,
   ): { endpoint: Endpoint; unidentRegions: string[] } {
     const endpoint: Endpoint = JSON.parse(content);
     if (
@@ -213,7 +213,7 @@ class ChooseProvider extends React.Component<Props, State> {
       endpoint.mapped_regions = endpoint.mapped_regions
         .map(nameId => {
           const region = this.props.regions.find(
-            r => r.id === nameId || r.name === nameId
+            r => r.id === nameId || r.name === nameId,
           );
           if (region) {
             return region.id;
@@ -227,7 +227,7 @@ class ChooseProvider extends React.Component<Props, State> {
           `${unidentRegions.length} Coriolis Region${
             unidentRegions.length > 1 ? "s" : ""
           } couldn't be mapped`,
-          "warning"
+          "warning",
         );
       }
     }
@@ -253,7 +253,7 @@ class ChooseProvider extends React.Component<Props, State> {
       try {
         const { endpoint, unidentRegions } = this.parseEndpoint(
           fileContent.content,
-          true
+          true,
         );
         const key = `${endpoint.type}${endpoint.name}`;
         if (uniqueNames[key] === undefined) {
@@ -353,7 +353,7 @@ class ChooseProvider extends React.Component<Props, State> {
             };
           }
           return stateEndpoint;
-        }
+        },
       ),
     }));
   }
@@ -378,8 +378,8 @@ class ChooseProvider extends React.Component<Props, State> {
         onValidateClick={() => {
           this.props.onValidateMultipleEndpoints(
             this.state.multipleUploadedEndpoints.filter(
-              e => typeof e !== "string"
-            ) as Endpoint[]
+              e => typeof e !== "string",
+            ) as Endpoint[],
           );
         }}
         onDone={this.props.onCancelClick}

+ 15 - 15
src/components/modules/EndpointModule/ChooseProvider/MultipleUploadedEndpoints.spec.tsx

@@ -117,11 +117,11 @@ describe("MultipleUploadedEndpoints", () => {
 
     expect(
       TestUtils.selectAll("MultipleUploadedEndpoints__EndpointName")[0]
-        .textContent
+        .textContent,
     ).toBe("Openstack");
     expect(
       TestUtils.selectAll("MultipleUploadedEndpoints__EndpointName")[1]
-        .textContent
+        .textContent,
     ).toBe("AWS");
   });
 
@@ -147,11 +147,11 @@ describe("MultipleUploadedEndpoints", () => {
 
   it('changes to "Done" button after validation', async () => {
     const { rerender, getByText } = render(
-      <MultipleUploadedEndpoints {...defaultProps} validating={true} />
+      <MultipleUploadedEndpoints {...defaultProps} validating={true} />,
     );
     expect(TestUtils.select("LoadingButton__Loading")).toBeTruthy();
     rerender(
-      <MultipleUploadedEndpoints {...defaultProps} validating={false} />
+      <MultipleUploadedEndpoints {...defaultProps} validating={false} />,
     );
     expect(TestUtils.select("LoadingButton__Loading")).toBeFalsy();
     expect(getByText("Done")).toBeTruthy();
@@ -159,10 +159,10 @@ describe("MultipleUploadedEndpoints", () => {
 
   it('handles the "Done" button click', () => {
     const { rerender, getByText } = render(
-      <MultipleUploadedEndpoints {...defaultProps} validating={true} />
+      <MultipleUploadedEndpoints {...defaultProps} validating={true} />,
     );
     rerender(
-      <MultipleUploadedEndpoints {...defaultProps} validating={false} />
+      <MultipleUploadedEndpoints {...defaultProps} validating={false} />,
     );
     fireEvent.click(getByText("Done"));
     expect(defaultProps.onDone).toHaveBeenCalled();
@@ -171,12 +171,12 @@ describe("MultipleUploadedEndpoints", () => {
   it("removes an endpoint", () => {
     render(<MultipleUploadedEndpoints {...defaultProps} />);
     const deleteButtons = TestUtils.selectAll(
-      "MultipleUploadedEndpoints__DeleteButton"
+      "MultipleUploadedEndpoints__DeleteButton",
     );
     fireEvent.click(deleteButtons[0]);
     expect(defaultProps.onRemove).toHaveBeenCalledWith(
       defaultProps.endpoints[0],
-      true
+      true,
     );
   });
 
@@ -195,12 +195,12 @@ describe("MultipleUploadedEndpoints", () => {
 
     render(<MultipleUploadedEndpoints {...newProps} />);
     const deleteButtons = TestUtils.selectAll(
-      "MultipleUploadedEndpoints__DeleteButton"
+      "MultipleUploadedEndpoints__DeleteButton",
     );
     fireEvent.click(deleteButtons[0]);
     expect(defaultProps.onRemove).toHaveBeenCalledWith(
       defaultProps.endpoints[0],
-      false
+      false,
     );
   });
 
@@ -215,11 +215,11 @@ describe("MultipleUploadedEndpoints", () => {
 
     render(<MultipleUploadedEndpoints {...newProps} />);
     fireEvent.click(
-      document.querySelector("[data-testid='DropdownLink__Item']")!
+      document.querySelector("[data-testid='DropdownLink__Item']")!,
     );
     expect(defaultProps.onRegionsChange).toHaveBeenCalledWith(
       OPENSTACK_ENDPOINT,
-      ["default"]
+      ["default"],
     );
   });
 
@@ -239,11 +239,11 @@ describe("MultipleUploadedEndpoints", () => {
 
     render(<MultipleUploadedEndpoints {...newProps} />);
     fireEvent.click(
-      document.querySelector("[data-testid='DropdownLink__Item']")!
+      document.querySelector("[data-testid='DropdownLink__Item']")!,
     );
     expect(defaultProps.onRegionsChange).toHaveBeenCalledWith(
       newOpenstackEndpoint,
-      []
+      [],
     );
   });
 
@@ -282,7 +282,7 @@ describe("MultipleUploadedEndpoints", () => {
     render(<MultipleUploadedEndpoints {...newProps} />);
     expect(
       TestUtils.select("MultipleUploadedEndpoints__InvalidEndpoint")
-        ?.textContent
+        ?.textContent,
     ).toContain("unsupported provider type: invalid");
   });
 });

+ 5 - 5
src/components/modules/EndpointModule/ChooseProvider/MultipleUploadedEndpoints.tsx

@@ -123,7 +123,7 @@ class MultipleUploadedEndpoints extends React.Component<Props, State> {
     const multiEndpoint = this.props.multiValidation.find(
       mv =>
         mv.endpoint.name === uploadedEndpoint.name &&
-        mv.endpoint.type === uploadedEndpoint.type
+        mv.endpoint.type === uploadedEndpoint.type,
     );
     if (multiEndpoint) {
       this.props.onRemove(multiEndpoint.endpoint, true);
@@ -138,7 +138,7 @@ class MultipleUploadedEndpoints extends React.Component<Props, State> {
     DomUtils.copyTextToClipboard(
       message,
       "The message has been copied to clipboard",
-      "Failed to copy the message to clipboard"
+      "Failed to copy the message to clipboard",
     );
   }
 
@@ -174,11 +174,11 @@ class MultipleUploadedEndpoints extends React.Component<Props, State> {
   renderStatus(endpoint: Endpoint) {
     const validationItem = this.props.multiValidation.find(
       v =>
-        v.endpoint.name === endpoint.name && v.endpoint.type === endpoint.type
+        v.endpoint.name === endpoint.name && v.endpoint.type === endpoint.type,
     );
     if (!validationItem) {
       const invalidRegions = this.props.invalidRegionsEndpointIds.find(
-        e => e.id === `${endpoint.type}${endpoint.name}`
+        e => e.id === `${endpoint.type}${endpoint.name}`,
       )?.regions;
       if (!invalidRegions?.length) {
         return null;
@@ -199,7 +199,7 @@ class MultipleUploadedEndpoints extends React.Component<Props, State> {
               if (endpoint.mapped_regions.find(r => r === item.value)) {
                 this.props.onRegionsChange(
                   endpoint,
-                  endpoint.mapped_regions.filter(r => r !== item.value)
+                  endpoint.mapped_regions.filter(r => r !== item.value),
                 );
               } else {
                 this.props.onRegionsChange(endpoint, [

+ 10 - 10
src/components/modules/EndpointModule/EndpointDetailsContent/EndpointDetailsContent.spec.tsx

@@ -105,7 +105,7 @@ describe("EndpointDetailsContent", () => {
   it("renders loading state correctly", () => {
     render(<EndpointDetailsContent {...defaultProps} loading />);
     expect(
-      TestUtils.select("EndpointDetailsContent__LoadingWrapper")
+      TestUtils.select("EndpointDetailsContent__LoadingWrapper"),
     ).toBeTruthy();
   });
 
@@ -133,7 +133,7 @@ describe("EndpointDetailsContent", () => {
         connectionInfo={{
           file: "file content",
         }}
-      />
+      />,
     );
     fireEvent.click(getByText("Download"));
 
@@ -162,7 +162,7 @@ describe("EndpointDetailsContent", () => {
         connectionInfo={{
           secret_ref: "secret_ref",
         }}
-      />
+      />,
     );
     let secretRef;
     TestUtils.selectAll("CopyValue__Value").forEach(element => {
@@ -194,7 +194,7 @@ describe("EndpointDetailsContent", () => {
             nested_prop: "nested prop's value",
           },
         }}
-      />
+      />,
     );
     expect(getByText("Nested Prop")).toBeTruthy();
     expect(getByText("nested prop's value")).toBeTruthy();
@@ -235,7 +235,7 @@ describe("EndpointDetailsContent", () => {
         connectionInfo={{
           bool_field: true,
         }}
-      />
+      />,
     );
     expect(getByText("Bool Field")).toBeTruthy();
     expect(getByText("Yes")).toBeTruthy();
@@ -252,7 +252,7 @@ describe("EndpointDetailsContent", () => {
         connectionInfo={{
           bool_field: false,
         }}
-      />
+      />,
     );
     expect(getByText("Bool Field")).toBeTruthy();
     expect(getByText("No")).toBeTruthy();
@@ -269,7 +269,7 @@ describe("EndpointDetailsContent", () => {
         connectionInfo={{
           bool_field: "",
         }}
-      />
+      />,
     );
     let boolValue;
     TestUtils.selectAll("CopyValue__Value").forEach(element => {
@@ -294,7 +294,7 @@ describe("EndpointDetailsContent", () => {
         connectionInfo={{
           password_field: "password",
         }}
-      />
+      />,
     );
     expect(getByText("Password Field")).toBeTruthy();
     expect(getByText("•••••••••")).toBeTruthy();
@@ -313,7 +313,7 @@ describe("EndpointDetailsContent", () => {
         connectionInfo={{
           secret_key: "password",
         }}
-      />
+      />,
     );
     expect(getByText("Secret Key")).toBeTruthy();
     expect(getByText("•••••••••")).toBeTruthy();
@@ -327,7 +327,7 @@ describe("EndpointDetailsContent", () => {
           ...OPENSTACK_ENDPOINT,
           mapped_regions: ["1"],
         }}
-      />
+      />,
     );
     expect(getByText("Region 1")).toBeTruthy();
   });

+ 4 - 4
src/components/modules/EndpointModule/EndpointDetailsContent/EndpointDetailsContent.tsx

@@ -166,7 +166,7 @@ class EndpointDetailsContent extends React.Component<Props> {
 
       let valueElement = null;
       const schemaField = this.props.connectionInfoSchema.find(
-        f => f.name === key
+        f => f.name === key,
       );
 
       if (
@@ -215,7 +215,7 @@ class EndpointDetailsContent extends React.Component<Props> {
       <span>
         {this.props.item?.mapped_regions
           .map(
-            regionId => this.props.regions.find(r => r.id === regionId)?.name
+            regionId => this.props.regions.find(r => r.id === regionId)?.name,
           )
           .join(", ") || "-"}
       </span>
@@ -263,7 +263,7 @@ class EndpointDetailsContent extends React.Component<Props> {
             {this.renderValue(
               this.props.item
                 ? configLoader.config.providerNames[this.props.item.type]
-                : ""
+                : "",
             )}
           </Field>
           <Field>
@@ -281,7 +281,7 @@ class EndpointDetailsContent extends React.Component<Props> {
           <Field>
             <Label>Created</Label>
             {this.renderValue(
-              DateUtils.getLocalDate(createdAt!).toFormat("dd/LL/yyyy HH:mm")
+              DateUtils.getLocalDate(createdAt!).toFormat("dd/LL/yyyy HH:mm"),
             )}
           </Field>
           <Field>

+ 5 - 5
src/components/modules/EndpointModule/EndpointDuplicateOptions/EndpointDuplicateOptions.spec.tsx

@@ -50,7 +50,7 @@ describe("EndpointDuplicateOptions", () => {
 
   it("renders without crashing", () => {
     const { getByText } = render(
-      <EndpointDuplicateOptions {...defaultProps} />
+      <EndpointDuplicateOptions {...defaultProps} />,
     );
     expect(getByText("Duplicate To Project - 2")).toBeTruthy();
   });
@@ -65,7 +65,7 @@ describe("EndpointDuplicateOptions", () => {
 
   it("shows duplicating status", () => {
     const { getByText } = render(
-      <EndpointDuplicateOptions {...defaultProps} duplicating />
+      <EndpointDuplicateOptions {...defaultProps} duplicating />,
     );
 
     expect(getByText("Duplicating Endpoint")).toBeTruthy();
@@ -73,18 +73,18 @@ describe("EndpointDuplicateOptions", () => {
 
   it("changes project", () => {
     const { getByTestId } = render(
-      <EndpointDuplicateOptions {...defaultProps} />
+      <EndpointDuplicateOptions {...defaultProps} />,
     );
 
     fireEvent.click(getByTestId("FieldInput__Wrapper"));
     expect(getByTestId("FieldInput__Wrapper").textContent).toBe(
-      "Duplicate To Project - 1"
+      "Duplicate To Project - 1",
     );
   });
 
   it("handles duplicate click", () => {
     const { getByText } = render(
-      <EndpointDuplicateOptions {...defaultProps} />
+      <EndpointDuplicateOptions {...defaultProps} />,
     );
 
     fireEvent.click(getByText("Duplicate"));

+ 1 - 1
src/components/modules/EndpointModule/EndpointDuplicateOptions/EndpointDuplicateOptions.tsx

@@ -96,7 +96,7 @@ class EndpointDuplicateOptions extends React.Component<Props, State> {
       () => {
         this.props.onDuplicateClick(this.state.selectedProjectId);
       },
-      2
+      2,
     );
   }
 

+ 2 - 2
src/components/modules/EndpointModule/EndpointListItem/EndpointListItem.spec.tsx

@@ -55,12 +55,12 @@ describe("EndpointListItem", () => {
 
   it("renders without crashing", () => {
     const { getByText, getByTestId } = render(
-      <EndpointListItem {...defaultProps} />
+      <EndpointListItem {...defaultProps} />,
     );
     expect(getByText(OPENSTACK_ENDPOINT.name)).toBeTruthy();
     expect(getByText(OPENSTACK_ENDPOINT.description)).toBeTruthy();
     expect(getByTestId("EndpointLogos").textContent).toBe(
-      OPENSTACK_ENDPOINT.type
+      OPENSTACK_ENDPOINT.type,
     );
   });
 

+ 1 - 1
src/components/modules/EndpointModule/EndpointListItem/EndpointListItem.tsx

@@ -120,7 +120,7 @@ class EndpointListItem extends React.Component<Props> {
             <ItemLabel>Created</ItemLabel>
             <ItemValue>
               {DateUtils.getLocalDate(this.props.item.created_at).toFormat(
-                "dd LLLL yyyy, HH:mm"
+                "dd LLLL yyyy, HH:mm",
               )}
             </ItemValue>
           </Created>

+ 1 - 1
src/components/modules/EndpointModule/EndpointLogos/EndpointLogos.spec.tsx

@@ -46,7 +46,7 @@ describe("EndpointLogos", () => {
 
   it("renders generic logo", () => {
     const { getByText } = render(
-      <EndpointLogos {...defaultProps} endpoint="new-endpoint" />
+      <EndpointLogos {...defaultProps} endpoint="new-endpoint" />,
     );
     expect(getByText("new-endpoint")).toBeTruthy();
   });

+ 2 - 2
src/components/modules/EndpointModule/EndpointLogos/EndpointLogos.tsx

@@ -83,8 +83,8 @@ class EndpointLogos extends React.Component<Props> {
       const style = this.props.white
         ? "white"
         : this.props.disabled
-        ? "disabled"
-        : null;
+          ? "disabled"
+          : null;
       imageUrl = style ? `${imageUrl}/${style}` : imageUrl;
     }
 

+ 3 - 3
src/components/modules/EndpointModule/EndpointLogos/resources/Generic.spec.tsx

@@ -48,7 +48,7 @@ describe("Generic", () => {
       const wrapper = TestUtils.select("Generic__Wrapper")!;
       const style = window.getComputedStyle(wrapper);
       expect(style.fontSize).toBe(expectedFontSize);
-    }
+    },
   );
 
   it.each`
@@ -63,7 +63,7 @@ describe("Generic", () => {
       const style = window.getComputedStyle(wrapper);
       expect(style.maxWidth).toBe(expectedLogoWidth);
       expect(style.maxHeight).toBe(expectedLogoHeight);
-    }
+    },
   );
 
   it("renders 32px with white color", () => {
@@ -82,7 +82,7 @@ describe("Generic", () => {
 
   it("doesn't render unsupported size", () => {
     const { container } = render(
-      <Generic {...defaultProps} size={{ w: 100, h: 100 }} />
+      <Generic {...defaultProps} size={{ w: 100, h: 100 }} />,
     );
     expect(container.firstChild).toBeNull();
   });

+ 9 - 9
src/components/modules/EndpointModule/EndpointModal/EndpointModal.tsx

@@ -155,14 +155,14 @@ class EndpointModal extends React.Component<Props, State> {
       () => {
         if (this.props.onResizeUpdate)
           this.props.onResizeUpdate(this.scrollableRef);
-      }
+      },
     );
     this.endpointValidationObserver = observe(
       endpointStore,
       "validation",
       () => {
         this.UNSAFE_componentWillReceiveProps(this.props);
-      }
+      },
     );
   }
 
@@ -180,7 +180,7 @@ class EndpointModal extends React.Component<Props, State> {
       () => {
         if (this.isValidateButtonEnabled) this.handleValidateClick();
       },
-      2
+      2,
     );
   }
 
@@ -201,11 +201,11 @@ class EndpointModal extends React.Component<Props, State> {
           ...prevState.endpoint,
           ...ObjectUtils.flatten(
             props.endpoint || {},
-            plugin.REQUIRES_PARENT_OBJECT_PATH
+            plugin.REQUIRES_PARENT_OBJECT_PATH,
           ),
           ...ObjectUtils.flatten(
             endpointStore.connectionInfo || {},
-            plugin.REQUIRES_PARENT_OBJECT_PATH
+            plugin.REQUIRES_PARENT_OBJECT_PATH,
           ),
         },
       }));
@@ -261,7 +261,7 @@ class EndpointModal extends React.Component<Props, State> {
     this.setState(prevState => {
       const endpoint: any = { ...prevState.endpoint };
       const requiredFieldsDefaults = providerStore.connectionInfoSchema.filter(
-        f => f.required && f.default != null
+        f => f.required && f.default != null,
       );
       requiredFieldsDefaults.forEach(f => {
         if (endpoint[f.name] == null) {
@@ -315,7 +315,7 @@ class EndpointModal extends React.Component<Props, State> {
       () => {
         if (this.props.onResizeUpdate)
           this.props.onResizeUpdate(this.scrollableRef);
-      }
+      },
     );
   }
 
@@ -326,7 +326,7 @@ class EndpointModal extends React.Component<Props, State> {
     DomUtils.copyTextToClipboard(
       endpointStore.validation.message,
       "The message has been copied to clipboard",
-      "Failed to copy the message to clipboard"
+      "Failed to copy the message to clipboard",
     );
   }
 
@@ -349,7 +349,7 @@ class EndpointModal extends React.Component<Props, State> {
       return;
     }
     const endpoint = endpointStore.endpoints.find(
-      e => e.id === stateEndpoint.id
+      e => e.id === stateEndpoint.id,
     );
     if (!endpoint) {
       throw new Error("Endpoint not found in store");

+ 10 - 10
src/components/modules/EndpointModule/EndpointValidation/EndpointValidation.spec.tsx

@@ -49,20 +49,20 @@ describe("EndpointValidation", () => {
 
   it("renders without crashing", () => {
     const { getByText, getByTestId } = render(
-      <EndpointValidation {...defaultProps} />
+      <EndpointValidation {...defaultProps} />,
     );
     expect(getByText("Endpoint is Valid")).toBeTruthy();
     expect(getByTestId("StatusImage").textContent).toBe(
-      "Status: COMPLETED, Loading: false"
+      "Status: COMPLETED, Loading: false",
     );
   });
 
   it("renders loading", () => {
     const { getByTestId, getByText } = render(
-      <EndpointValidation {...defaultProps} loading />
+      <EndpointValidation {...defaultProps} loading />,
     );
     expect(getByTestId("StatusImage").textContent).toBe(
-      "Status: -, Loading: true"
+      "Status: -, Loading: true",
     );
     expect(getByText("Validating Endpoint")).toBeTruthy();
   });
@@ -75,10 +75,10 @@ describe("EndpointValidation", () => {
           valid: false,
           message: "connection error",
         }}
-      />
+      />,
     );
     expect(getByTestId("StatusImage").textContent).toBe(
-      "Status: ERROR, Loading: false"
+      "Status: ERROR, Loading: false",
     );
     expect(getByText("connection error")).toBeTruthy();
   });
@@ -91,10 +91,10 @@ describe("EndpointValidation", () => {
           valid: false,
           message: "",
         }}
-      />
+      />,
     );
     expect(getByTestId("StatusImage").textContent).toBe(
-      "Status: ERROR, Loading: false"
+      "Status: ERROR, Loading: false",
     );
     expect(getByText("An unexpected error occurred.")).toBeTruthy();
   });
@@ -107,11 +107,11 @@ describe("EndpointValidation", () => {
           valid: false,
           message: "connection error",
         }}
-      />
+      />,
     );
     getByText("connection error").click();
     expect(DomUtils.copyTextToClipboard).toHaveBeenCalledWith(
-      "connection error"
+      "connection error",
     );
   });
 });

+ 0 - 1
src/components/modules/EndpointModule/EndpointValidation/story.tsx

@@ -12,7 +12,6 @@ You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 import React from "react";
 import { storiesOf } from "@storybook/react";
 import EndpointValidation from ".";

+ 7 - 6
src/components/modules/LicenceModule/LicenceModule.spec.tsx

@@ -113,7 +113,7 @@ Version: 2.0
 
   it("shows loading", () => {
     const { getByTestId } = render(
-      <LicenceModule {...defaultProps} loadingLicenceInfo />
+      <LicenceModule {...defaultProps} loadingLicenceInfo />,
     );
     expect(getByTestId("StatusImage").textContent).toBe("loading");
   });
@@ -129,11 +129,12 @@ Version: 2.0
             .toJSDate(),
           latestLicenceExpiryDate: DateTime.now().plus({ hours: 1 }).toJSDate(),
         }}
-      />
+      />,
     );
 
     expect(
-      TestUtils.selectAll("LicenceModule__LicenceRowDescription")[0].textContent
+      TestUtils.selectAll("LicenceModule__LicenceRowDescription")[0]
+        .textContent,
     ).toContain("today at");
   });
 
@@ -150,17 +151,17 @@ Version: 2.0
             .minus({ hours: 1 })
             .toJSDate(),
         }}
-      />
+      />,
     );
 
     expect(
-      TestUtils.select("LicenceModule__LicenceRowContent")?.textContent
+      TestUtils.select("LicenceModule__LicenceRowContent")?.textContent,
     ).toContain("Please contact your Coriolis representative");
   });
 
   it("renders licence error", () => {
     const { getByText } = render(
-      <LicenceModule {...defaultProps} licenceError="test-error" />
+      <LicenceModule {...defaultProps} licenceError="test-error" />,
     );
     expect(getByText("test-error")).toBeTruthy();
   });

+ 3 - 3
src/components/modules/LicenceModule/LicenceModule.tsx

@@ -209,7 +209,7 @@ class LicenceModule extends React.Component<Props, State> {
           e.preventDefault();
           this.setState({ highlightDropzone: false });
           const text = await FileUtils.readTextFromFirstFile(
-            e.dataTransfer.files
+            e.dataTransfer.files,
           );
           if (text) {
             this.handleLicenceChange(text);
@@ -424,7 +424,7 @@ class LicenceModule extends React.Component<Props, State> {
             __html: licenceImage(
               this.state.isValid
                 ? ThemePalette.primary
-                : ThemePalette.grayscale[5]
+                : ThemePalette.grayscale[5],
             ),
           }}
         />
@@ -472,7 +472,7 @@ class LicenceModule extends React.Component<Props, State> {
         {showInfo && this.props.licenceInfo && this.props.licenceServerStatus
           ? this.renderLicenceInfo(
               this.props.licenceInfo,
-              this.props.licenceServerStatus
+              this.props.licenceServerStatus,
             )
           : null}
         {showError && this.props.licenceError

+ 3 - 3
src/components/modules/LoginModule/LoginForm/LoginForm.spec.tsx

@@ -70,13 +70,13 @@ describe("LoginForm", () => {
     render(<LoginForm {...defaultProps} />);
     fireEvent.submit(document.querySelector("form")!);
     expect(notificationStore.alert).toHaveBeenCalledWith(
-      "Please fill in all fields"
+      "Please fill in all fields",
     );
   });
 
   it("renders incorrect crediantials message", () => {
     const { getByText } = render(
-      <LoginForm {...defaultProps} loginFailedResponse={{ status: 401 }} />
+      <LoginForm {...defaultProps} loginFailedResponse={{ status: 401 }} />,
     );
     expect(getByText("Incorrect credentials", { exact: false })).toBeTruthy();
   });
@@ -86,7 +86,7 @@ describe("LoginForm", () => {
       <LoginForm
         {...defaultProps}
         loginFailedResponse={{ status: 500, message: "other error" }}
-      />
+      />,
     );
     expect(getByText("other error", { exact: false })).toBeTruthy();
   });

+ 1 - 4
src/components/modules/LoginModule/LoginFormField/LoginFormField.tsx

@@ -43,10 +43,7 @@ type Props = {
 const LoginFormField = (props: Props) => (
   <Wrapper>
     <FormFieldLabel>{props.label}</FormFieldLabel>
-    <StyledTextInput
-      {...props}
-      onChange={props.onChange}
-    />
+    <StyledTextInput {...props} onChange={props.onChange} />
   </Wrapper>
 );
 

+ 1 - 1
src/components/modules/MetalHubModule/MetalHubListHeader/MetalHubListHeader.tsx

@@ -58,7 +58,7 @@ class MetalHubListHeader extends React.Component<Props> {
       const cleanFingerprint = this.props.fingerprint.replace(/\n/g, "");
       const fingerprintShortened = `${cleanFingerprint.slice(
         0,
-        12
+        12,
       )}...${cleanFingerprint.slice(-12)}`;
       valueContent = (
         <CopyValue value={cleanFingerprint} label={fingerprintShortened} />

+ 5 - 5
src/components/modules/MetalHubModule/MetalHubListItem/MetalHubListItem.spec.tsx

@@ -34,7 +34,7 @@ describe("MetalHubListItem", () => {
 
   it("renders without crashing", () => {
     const { getByText, getAllByText } = render(
-      <MetalHubListItem {...defaultProps} />
+      <MetalHubListItem {...defaultProps} />,
     );
     expect(getByText(METALHUB_SERVER_MOCK.hostname!)).toBeTruthy();
     expect(getByText("Active")).toBeTruthy();
@@ -42,9 +42,9 @@ describe("MetalHubListItem", () => {
     expect(
       getAllByText(
         DateUtils.getLocalDate(METALHUB_SERVER_MOCK.created_at).toFormat(
-          "yyyy-LL-dd HH:mm:ss"
-        )
-      ).length
+          "yyyy-LL-dd HH:mm:ss",
+        ),
+      ).length,
     ).toBe(2);
   });
 
@@ -57,7 +57,7 @@ describe("MetalHubListItem", () => {
           hostname: "",
           active: false,
         }}
-      />
+      />,
     );
     expect(getByText("No Hostname")).toBeTruthy();
     expect(getByText("Inactive")).toBeTruthy();

+ 2 - 2
src/components/modules/MetalHubModule/MetalHubListItem/MetalHubListItem.tsx

@@ -137,7 +137,7 @@ class MetalHubServerListItem extends React.Component<Props> {
               <ItemLabel>Created At</ItemLabel>
               <ItemValue>
                 {DateUtils.getLocalDate(this.props.item.created_at).toFormat(
-                  "yyyy-LL-dd HH:mm:ss"
+                  "yyyy-LL-dd HH:mm:ss",
                 )}
               </ItemValue>
             </Data>
@@ -145,7 +145,7 @@ class MetalHubServerListItem extends React.Component<Props> {
               <ItemLabel>Updated At</ItemLabel>
               <ItemValue>
                 {DateUtils.getLocalDate(this.props.item.updated_at).toFormat(
-                  "yyyy-LL-dd HH:mm:ss"
+                  "yyyy-LL-dd HH:mm:ss",
                 )}
               </ItemValue>
             </Data>

+ 12 - 9
src/components/modules/MetalHubModule/MetalHubModal/MetalHubModal.spec.tsx

@@ -55,7 +55,7 @@ describe("MetalHubModal", () => {
 
   it("shows the server for editing", () => {
     const { getByText } = render(
-      <MetalHubModal {...defaultProps} server={{ ...METALHUB_SERVER_MOCK }} />
+      <MetalHubModal {...defaultProps} server={{ ...METALHUB_SERVER_MOCK }} />,
     );
     expect(getByText("Update Coriolis Bare Metal Server")).toBeTruthy();
     const testInput = (label: string, value: string) => {
@@ -66,20 +66,23 @@ describe("MetalHubModal", () => {
     };
     testInput(
       "Host",
-      METALHUB_SERVER_MOCK.api_endpoint!.split(":")[1].replace("//", "")
+      METALHUB_SERVER_MOCK.api_endpoint!.split(":")[1].replace("//", ""),
     );
     testInput(
       "Port",
-      METALHUB_SERVER_MOCK.api_endpoint!.split(":")[2].replace(/\/.*/, "")
+      METALHUB_SERVER_MOCK.api_endpoint!.split(":")[2].replace(/\/.*/, ""),
     );
   });
 
   it("renders validation error", async () => {
     await act(async () => {
-      metalHubStore.validationError = ["Validation error", "Validation error 2"];
+      metalHubStore.validationError = [
+        "Validation error",
+        "Validation error 2",
+      ];
     });
     const { getByText } = render(
-      <MetalHubModal {...defaultProps} server={{ ...METALHUB_SERVER_MOCK }} />
+      <MetalHubModal {...defaultProps} server={{ ...METALHUB_SERVER_MOCK }} />,
     );
     expect(getByText("Validation error")).toBeTruthy();
     expect(getByText("Validation error 2")).toBeTruthy();
@@ -90,7 +93,7 @@ describe("MetalHubModal", () => {
 
   it("triggers submit on enter key", async () => {
     render(
-      <MetalHubModal {...defaultProps} server={{ ...METALHUB_SERVER_MOCK }} />
+      <MetalHubModal {...defaultProps} server={{ ...METALHUB_SERVER_MOCK }} />,
     );
     const input = document.querySelector("input")!;
     await act(async () => {
@@ -104,7 +107,7 @@ describe("MetalHubModal", () => {
 
   it("highlights invalid fields", async () => {
     const { getByText, getAllByText } = render(
-      <MetalHubModal {...defaultProps} />
+      <MetalHubModal {...defaultProps} />,
     );
     await act(async () => {
       fireEvent.click(getByText("Validate and save"));
@@ -125,11 +128,11 @@ describe("MetalHubModal", () => {
     });
     await act(async () => {
       expect(metalHubStoreSpies.addServer).toHaveBeenCalledWith(
-        "https://api.example.com:5566/api/v1"
+        "https://api.example.com:5566/api/v1",
       );
     });
     expect(metalHubStoreSpies.validateServer).toHaveBeenCalledWith(
-      METALHUB_SERVER_MOCK.id
+      METALHUB_SERVER_MOCK.id,
     );
   });
 });

+ 6 - 6
src/components/modules/MetalHubModule/MetalHubModal/MetalHubModal.tsx

@@ -139,7 +139,7 @@ class MetalHubModal extends React.Component<Props, State> {
       () => {
         this.handleAddClick();
       },
-      2
+      2,
     );
 
     if (this.props.server) {
@@ -224,7 +224,7 @@ class MetalHubModal extends React.Component<Props, State> {
         width={ThemeProps.inputSizes.large.width}
         required={field.required}
         highlight={Boolean(
-          this.state.highlightFieldNames.find(n => n === field.name)
+          this.state.highlightFieldNames.find(n => n === field.name),
         )}
         disabledLoading={this.loading || this.state.showSuccess}
       />
@@ -303,13 +303,13 @@ class MetalHubModal extends React.Component<Props, State> {
     const message = this.state.saving
       ? "Validating ..."
       : metalHubStore.validationError.length
-      ? metalHubStore.validationError.map(e => <div key={e}>{e}</div>)
-      : "Validation successful";
+        ? metalHubStore.validationError.map(e => <div key={e}>{e}</div>)
+        : "Validation successful";
     const status = this.state.saving
       ? "RUNNING"
       : metalHubStore.validationError.length
-      ? "ERROR"
-      : "COMPLETED";
+        ? "ERROR"
+        : "COMPLETED";
     return (
       <Status layout={status === "ERROR" ? "vertical" : "horizontal"}>
         <StatusHeader>

+ 9 - 9
src/components/modules/MetalHubModule/MetalHubServerDetailsContent/MetalHubServerDetailsContent.spec.tsx

@@ -60,27 +60,27 @@ describe("MetalHubServerDetailsContent", () => {
     expect(
       getText(
         DateUtils.getLocalDate(METALHUB_SERVER_MOCK.created_at).toFormat(
-          "yyyy-LL-dd HH:mm:ss"
-        )
-      )
+          "yyyy-LL-dd HH:mm:ss",
+        ),
+      ),
     ).toBeTruthy();
 
     expect(
-      getText(`${METALHUB_SERVER_MOCK.physical_cores} physical`)
+      getText(`${METALHUB_SERVER_MOCK.physical_cores} physical`),
     ).toBeTruthy();
     expect(
-      getText(`${METALHUB_SERVER_MOCK.logical_cores} logical`)
+      getText(`${METALHUB_SERVER_MOCK.logical_cores} logical`),
     ).toBeTruthy();
     expect(
       getText(
-        `${METALHUB_SERVER_MOCK.os_info.os_name} ${METALHUB_SERVER_MOCK.os_info.os_version}`
-      )
+        `${METALHUB_SERVER_MOCK.os_info.os_name} ${METALHUB_SERVER_MOCK.os_info.os_version}`,
+      ),
     ).toBeTruthy();
   });
 
   it("handles row click", async () => {
     const { getAllByTestId } = render(
-      <MetalHubServerDetailsContent {...defaultProps} />
+      <MetalHubServerDetailsContent {...defaultProps} />,
     );
     const row = TestUtils.select("TransferDetailsTable__Row-")!;
     expect(row).toBeTruthy();
@@ -99,7 +99,7 @@ describe("MetalHubServerDetailsContent", () => {
   it("renders loading", () => {
     render(<MetalHubServerDetailsContent {...defaultProps} loading />);
     expect(
-      TestUtils.select("MetalHubServerDetailsContent__LoadingWrapper")
+      TestUtils.select("MetalHubServerDetailsContent__LoadingWrapper"),
     ).toBeTruthy();
   });
 });

+ 8 - 8
src/components/modules/MetalHubModule/MetalHubServerDetailsContent/MetalHubServerDetailsContent.tsx

@@ -229,7 +229,7 @@ class MetalHubServerDetailsContent extends React.Component<Props, State> {
           <Label>Created At</Label>
           <Value>
             {DateUtils.getLocalDate(server.created_at).toFormat(
-              "yyyy-LL-dd HH:mm:ss"
+              "yyyy-LL-dd HH:mm:ss",
             )}
           </Value>
         </Field>
@@ -237,7 +237,7 @@ class MetalHubServerDetailsContent extends React.Component<Props, State> {
           <Label>Updated At</Label>
           <Value>
             {DateUtils.getLocalDate(server.updated_at).toFormat(
-              "yyyy-LL-dd HH:mm:ss"
+              "yyyy-LL-dd HH:mm:ss",
             )}
           </Value>
         </Field>
@@ -254,7 +254,7 @@ class MetalHubServerDetailsContent extends React.Component<Props, State> {
           <Label>Memory Size</Label>
           {server.memory
             ? this.renderValue(
-                `${(server.memory / 1024 / 1024 / 1024).toFixed(2)} GB`
+                `${(server.memory / 1024 / 1024 / 1024).toFixed(2)} GB`,
               )
             : "-"}
         </Field>
@@ -262,7 +262,7 @@ class MetalHubServerDetailsContent extends React.Component<Props, State> {
           <Label>Operating System</Label>
           {server.os_info.os_name
             ? this.renderValue(
-                `${server.os_info.os_name} ${server.os_info.os_version}`
+                `${server.os_info.os_name} ${server.os_info.os_version}`,
               )
             : "-"}
         </Field>
@@ -281,7 +281,7 @@ class MetalHubServerDetailsContent extends React.Component<Props, State> {
   renderNics(nics: MetalHubNic[]) {
     return nics.map(nic => {
       const isOpened = Boolean(
-        this.state.openedRows.find(i => i === nic.nic_name)
+        this.state.openedRows.find(i => i === nic.nic_name),
       );
 
       return (
@@ -324,7 +324,7 @@ class MetalHubServerDetailsContent extends React.Component<Props, State> {
 
   renderPartitions(
     partitions: MetalHubDisk["partitions"] = [],
-    sectorSize = 0
+    sectorSize = 0,
   ) {
     return partitions.map(partition => {
       if (!partition.partition_uuid) {
@@ -332,7 +332,7 @@ class MetalHubServerDetailsContent extends React.Component<Props, State> {
       }
 
       const isOpened = Boolean(
-        this.state.openedRows.find(i => i === partition.partition_uuid)
+        this.state.openedRows.find(i => i === partition.partition_uuid),
       );
       const size = partition.sectors * sectorSize;
       const sizeString = sectorSize
@@ -422,7 +422,7 @@ class MetalHubServerDetailsContent extends React.Component<Props, State> {
               <TableBodyContent>
                 {this.renderPartitions(
                   disk.partitions,
-                  disk.physical_sector_size
+                  disk.physical_sector_size,
                 )}
               </TableBodyContent>
             </TableHeader>

+ 5 - 5
src/components/modules/MinionModule/MinionEndpointModal/MinionEndpointModal.spec.tsx

@@ -58,17 +58,17 @@ describe("MinionEndpointModal", () => {
       <MinionEndpointModal
         {...defaultProps}
         providers={{ ...PROVIDERS_MOCK, vmware_vsphere: { types: [] } }}
-      />
+      />,
     );
     expect(
-      TestUtils.select("MinionEndpointModal__NoEndpoints")?.textContent
+      TestUtils.select("MinionEndpointModal__NoEndpoints")?.textContent,
     ).toContain("Please create a Coriolis Endpoint");
   });
 
   it("renders no endpoints if no providers", () => {
     render(<MinionEndpointModal {...defaultProps} providers={null} />);
     expect(
-      TestUtils.select("MinionEndpointModal__NoEndpoints")?.textContent
+      TestUtils.select("MinionEndpointModal__NoEndpoints")?.textContent,
     ).toContain("Please create a Coriolis Endpoint");
   });
 
@@ -83,14 +83,14 @@ describe("MinionEndpointModal", () => {
     getByText("Next").click();
     expect(defaultProps.onSelectEndpoint).toHaveBeenCalledWith(
       VMWARE_ENDPOINT_MOCK,
-      "source"
+      "source",
     );
   });
 
   it("renders loading", () => {
     render(<MinionEndpointModal {...defaultProps} loading />);
     expect(
-      TestUtils.select("MinionEndpointModal__LoadingWrapper")
+      TestUtils.select("MinionEndpointModal__LoadingWrapper"),
     ).toBeTruthy();
   });
 });

+ 31 - 31
src/components/modules/MinionModule/MinionEndpointModal/MinionEndpointModal.tsx

@@ -110,7 +110,7 @@ type Props = {
   onRequestClose: () => void;
   onSelectEndpoint: (
     endpoint: Endpoint,
-    platform: "source" | "destination"
+    platform: "source" | "destination",
   ) => void;
 };
 
@@ -129,7 +129,7 @@ class MinionEndpointModal extends React.Component<Props, State> {
   handleNextClick() {
     this.props.onSelectEndpoint(
       this.state.selectedEndpoint!,
-      this.state.platform
+      this.state.platform,
     );
   }
 
@@ -184,11 +184,11 @@ class MinionEndpointModal extends React.Component<Props, State> {
         const types =
           this.props.providers?.[providerName].types.indexOf(providerType);
         return types != null && types > -1;
-      }
+      },
     );
 
     const availableEndpoints = this.props.endpoints.filter(
-      e => availableProviders.indexOf(e.type) > -1
+      e => availableProviders.indexOf(e.type) > -1,
     );
 
     if (availableProviders.length === 0 || availableEndpoints.length === 0) {
@@ -203,33 +203,33 @@ class MinionEndpointModal extends React.Component<Props, State> {
           enter
           timeout={{ exit: 250, enter: 250 }}
         >
-        <div>
-          {availableProviders.map(providerName => (
-            <ProviderWrapper key={providerName}>
-              <EndpointLogos
-                height={128}
-                endpoint={providerName}
-                style={{ marginBottom: "16px" }}
-              />
-              <Dropdown
-                items={this.props.endpoints.filter(
-                  e => e.type === providerName
-                )}
-                valueField="id"
-                labelField="name"
-                noSelectionMessage="Choose an endpoint"
-                centered
-                selectedItem={
-                  this.state.selectedEndpoint?.type === providerName
-                    ? this.state.selectedEndpoint
-                    : null
-                }
-                onChange={endpoint => {
-                  this.setState({ selectedEndpoint: endpoint });
-                }}
-              />
-            </ProviderWrapper>
-          ))}
+          <div>
+            {availableProviders.map(providerName => (
+              <ProviderWrapper key={providerName}>
+                <EndpointLogos
+                  height={128}
+                  endpoint={providerName}
+                  style={{ marginBottom: "16px" }}
+                />
+                <Dropdown
+                  items={this.props.endpoints.filter(
+                    e => e.type === providerName,
+                  )}
+                  valueField="id"
+                  labelField="name"
+                  noSelectionMessage="Choose an endpoint"
+                  centered
+                  selectedItem={
+                    this.state.selectedEndpoint?.type === providerName
+                      ? this.state.selectedEndpoint
+                      : null
+                  }
+                  onChange={endpoint => {
+                    this.setState({ selectedEndpoint: endpoint });
+                  }}
+                />
+              </ProviderWrapper>
+            ))}
           </div>
         </CSSTransition>
       </ContentWrapper>

+ 1 - 1
src/components/modules/MinionModule/MinionPoolConfirmationModal/MinionPoolConfirmationModal.spec.tsx

@@ -64,7 +64,7 @@ describe("MinionPoolConfirmationModal", () => {
 
   it("executes with force flag", () => {
     const { getByTestId } = render(
-      <MinionPoolConfirmationModal {...defaultProps} />
+      <MinionPoolConfirmationModal {...defaultProps} />,
     );
 
     fireEvent.click(getByTestId("FieldInput"));

+ 1 - 1
src/components/modules/MinionModule/MinionPoolConfirmationModal/MinionPoolConfirmationModal.tsx

@@ -69,7 +69,7 @@ class MinionPoolConfirmationModal extends React.Component<Props, State> {
       () => {
         this.props.onExecuteClick(this.state.force);
       },
-      2
+      2,
     );
   }
 

+ 4 - 4
src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolDetailsContent.spec.tsx

@@ -34,7 +34,7 @@ jest.mock(
   () => ({
     __esModule: true,
     default: () => <div data-testid="MinionPoolEvents"></div>,
-  })
+  }),
 );
 
 describe("MinionPoolDetailsContent", () => {
@@ -66,7 +66,7 @@ describe("MinionPoolDetailsContent", () => {
 
   it("renders without crashing", () => {
     const { getByText } = render(
-      <MinionPoolDetailsContent {...defaultProps} />
+      <MinionPoolDetailsContent {...defaultProps} />,
     );
     expect(getByText(MINION_POOL_DETAILS_MOCK.id)).toBeTruthy();
     expect(getByText(MINION_POOL_DETAILS_MOCK.notes!)).toBeTruthy();
@@ -77,7 +77,7 @@ describe("MinionPoolDetailsContent", () => {
       <MinionPoolDetailsContent
         {...defaultProps}
         item={{ ...MINION_POOL_DETAILS_MOCK, status: "DEALLOCATED" }}
-      />
+      />,
     );
     getByText("Allocate").click();
     expect(defaultProps.onAllocate).toHaveBeenCalled();
@@ -95,7 +95,7 @@ describe("MinionPoolDetailsContent", () => {
 
   it("renders events page", () => {
     const { getByTestId } = render(
-      <MinionPoolDetailsContent {...defaultProps} page="events" />
+      <MinionPoolDetailsContent {...defaultProps} page="events" />,
     );
     expect(getByTestId("MinionPoolEvents")).toBeTruthy();
   });

+ 1 - 1
src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolDetailsContent.tsx

@@ -89,7 +89,7 @@ type Props = {
 class MinionPoolDetailsContent extends React.Component<Props> {
   isEndpointMissing() {
     const endpoint = this.props.endpoints.find(
-      e => e.id === this.props.item?.endpoint_id
+      e => e.id === this.props.item?.endpoint_id,
     );
 
     return Boolean(!endpoint);

+ 9 - 7
src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolEvents.spec.tsx

@@ -38,7 +38,7 @@ describe("MinionPoolEvents", () => {
   it("renders without crashing", () => {
     render(<MinionPoolEvents {...defaultProps} />);
     expect(TestUtils.select("MinionPoolEvents__Message")?.textContent).toBe(
-      MINION_POOL_DETAILS_MOCK.events[0].message
+      MINION_POOL_DETAILS_MOCK.events[0].message,
     );
   });
 
@@ -123,27 +123,29 @@ describe("MinionPoolEvents", () => {
       await showAllEvents();
 
       expect(
-        TestUtils.select("Pagination__PagePrevious")!.hasAttribute("disabled")
+        TestUtils.select("Pagination__PagePrevious")!.hasAttribute("disabled"),
       ).toBeTruthy();
-      expect(TestUtils.select("Pagination__PageNumber")!.textContent).toBe("1 of 3");
+      expect(TestUtils.select("Pagination__PageNumber")!.textContent).toBe(
+        "1 of 3",
+      );
 
       await act(async () => {
         TestUtils.select("Pagination__PageNext")!.click();
       });
 
       expect(
-        TestUtils.select("Pagination__PagePrevious")!.hasAttribute("disabled")
+        TestUtils.select("Pagination__PagePrevious")!.hasAttribute("disabled"),
       ).toBeFalsy();
       expect(TestUtils.select("Pagination__PageNumber")!.textContent).toBe(
-        "2 of 3"
+        "2 of 3",
       );
 
       await act(async () => {
         TestUtils.select("Pagination__PagePrevious")!.click();
       });
-    
+
       expect(TestUtils.select("Pagination__PageNumber")!.textContent).toBe(
-        "1 of 3"
+        "1 of 3",
       );
     });
   });

+ 4 - 4
src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolEvents.tsx

@@ -128,7 +128,7 @@ class MinionPoolEvents extends React.Component<Props, State> {
     return this.state.allEvents
       .filter(
         (event: any) =>
-          shouldFilterByEventType(event) && shouldFilterByLevel(event)
+          shouldFilterByEventType(event) && shouldFilterByLevel(event),
       )
       .sort((a: any, b: any) => {
         if (a.index && b.index && this.state.filterBy !== "all") {
@@ -154,7 +154,7 @@ class MinionPoolEvents extends React.Component<Props, State> {
 
   static getDerivedStateFromProps(
     props: Props,
-    state: State
+    state: State,
   ): Partial<State> | null {
     if (!props.item) {
       return null;
@@ -233,7 +233,7 @@ class MinionPoolEvents extends React.Component<Props, State> {
               </RowData>
               <RowData width="192px" secondary>
                 {DateUtils.getLocalDate(event.created_at).toFormat(
-                  "yyyy-LL-dd HH:mm:ss"
+                  "yyyy-LL-dd HH:mm:ss",
                 )}
               </RowData>
             </Row>
@@ -252,7 +252,7 @@ class MinionPoolEvents extends React.Component<Props, State> {
     }
     const totalPages = Math.ceil(
       this.filteredEventsWithoutPagination.length /
-        configLoader.config.maxMinionPoolEventsPerPage
+        configLoader.config.maxMinionPoolEventsPerPage,
     );
     return (
       <Pagination

+ 8 - 8
src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolMachines.spec.tsx

@@ -46,7 +46,7 @@ describe("MinionPoolMachines", () => {
     await act(async () => {
       filterDropdown!.click();
     });
-  
+
     let filterItem: HTMLElement | null = null;
     TestUtils.selectAll("DropdownLink__ListItem-").forEach(element => {
       if (element.textContent === toLabel) {
@@ -62,10 +62,10 @@ describe("MinionPoolMachines", () => {
   it("renders without crashing", () => {
     const { getByText } = render(<MinionPoolMachines {...defaultProps} />);
     expect(
-      TestUtils.select("MinionPoolMachines__HeaderText")?.textContent
+      TestUtils.select("MinionPoolMachines__HeaderText")?.textContent,
     ).toBe("1 minion machine, 1 allocated");
     expect(
-      getByText(`ID: ${MINION_POOL_MOCK.minion_machines[0].id}`)
+      getByText(`ID: ${MINION_POOL_MOCK.minion_machines[0].id}`),
     ).toBeTruthy();
   });
 
@@ -73,12 +73,12 @@ describe("MinionPoolMachines", () => {
     render(<MinionPoolMachines {...defaultProps} />);
     await filterBy("All", "Allocated");
     expect(
-      TestUtils.selectAll("MinionPoolMachines__MachineWrapper").length
+      TestUtils.selectAll("MinionPoolMachines__MachineWrapper").length,
     ).toBe(1);
-  
+
     await filterBy("Allocated", "Not Allocated");
     expect(
-      TestUtils.selectAll("MinionPoolMachines__MachineWrapper").length
+      TestUtils.selectAll("MinionPoolMachines__MachineWrapper").length,
     ).toBe(0);
   });
 
@@ -87,7 +87,7 @@ describe("MinionPoolMachines", () => {
       <MinionPoolMachines
         {...defaultProps}
         item={{ ...MINION_POOL_MOCK, minion_machines: [] }}
-      />
+      />,
     );
     expect(TestUtils.select("MinionPoolMachines__NoMachines")).toBeTruthy();
   });
@@ -96,7 +96,7 @@ describe("MinionPoolMachines", () => {
     render(<MinionPoolMachines {...defaultProps} />);
     const arrow = TestUtils.select(
       "Arrow__Wrapper",
-      TestUtils.select("MinionPoolMachines__Row-")!
+      TestUtils.select("MinionPoolMachines__Row-")!,
     );
     expect(arrow).toBeTruthy();
     expect(arrow!.attributes.getNamedItem("orientation")!.value).toBe("down");

+ 6 - 6
src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolMachines.tsx

@@ -169,13 +169,13 @@ class MinionPoolMachines extends React.Component<Props, State> {
         return this.machines.filter(
           m =>
             m.allocation_status === "ALLOCATED" ||
-            m.allocation_status === "AVAILABLE"
+            m.allocation_status === "AVAILABLE",
         );
       default:
         return this.machines.filter(
           m =>
             m.allocation_status !== "ALLOCATED" &&
-            m.allocation_status !== "AVAILABLE"
+            m.allocation_status !== "AVAILABLE",
         );
     }
   }
@@ -225,7 +225,7 @@ class MinionPoolMachines extends React.Component<Props, State> {
             this.machines.filter(
               m =>
                 m.allocation_status === "ALLOCATED" ||
-                m.allocation_status === "AVAILABLE"
+                m.allocation_status === "AVAILABLE",
             ).length
           }{" "}
           allocated
@@ -305,14 +305,14 @@ class MinionPoolMachines extends React.Component<Props, State> {
                 <MachineRow secondary>
                   Created At:{" "}
                   {DateUtils.getLocalDate(machine.created_at).toFormat(
-                    "yyyy-LL-dd HH:mm:ss"
+                    "yyyy-LL-dd HH:mm:ss",
                   )}
                 </MachineRow>
                 {machine.updated_at ? (
                   <MachineRow secondary>
                     Updated At:{" "}
                     {DateUtils.getLocalDate(machine.updated_at).toFormat(
-                      "yyyy-LL-dd HH:mm:ss"
+                      "yyyy-LL-dd HH:mm:ss",
                     )}
                   </MachineRow>
                 ) : null}
@@ -320,7 +320,7 @@ class MinionPoolMachines extends React.Component<Props, State> {
                   <MachineRow secondary>
                     Last Used At:{" "}
                     {DateUtils.getLocalDate(machine.last_used_at).toFormat(
-                      "yyyy-LL-dd HH:mm:ss"
+                      "yyyy-LL-dd HH:mm:ss",
                     )}
                   </MachineRow>
                 ) : null}

+ 3 - 3
src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolMainDetails.spec.tsx

@@ -46,17 +46,17 @@ describe("MinionPoolMainDetails", () => {
 
   it("renders without crashing", () => {
     const { getByText, getByTestId } = render(
-      <MinionPoolMainDetails {...defaultProps} />
+      <MinionPoolMainDetails {...defaultProps} />,
     );
     expect(getByText(MINION_POOL_MOCK.notes!)).toBeTruthy();
     expect(getByText(OPENSTACK_ENDPOINT_MOCK.name)).toBeTruthy();
     expect(getByTestId("bottom-controls")).toBeTruthy();
     expect(
-      getByText(MINION_POOL_MOCK.environment_options.option_1)
+      getByText(MINION_POOL_MOCK.environment_options.option_1),
     ).toBeTruthy();
     expect(getByText("Object Option - Object Option 1")).toBeTruthy();
     expect(
-      getByText(MINION_POOL_MOCK.environment_options.array_option[0])
+      getByText(MINION_POOL_MOCK.environment_options.array_option[0]),
     ).toBeTruthy();
     expect(getByText("source_value=destination_value")).toBeTruthy();
   });

+ 9 - 9
src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolMainDetails.tsx

@@ -112,7 +112,7 @@ type Props = {
 class MinionPoolMainDetails extends React.Component<Props> {
   getEndpoint(): Endpoint | undefined {
     const endpoint = this.props.endpoints.find(
-      e => e.id === this.props.item?.endpoint_id
+      e => e.id === this.props.item?.endpoint_id,
     );
     return endpoint;
   }
@@ -121,8 +121,8 @@ class MinionPoolMainDetails extends React.Component<Props> {
     return this.props.item?.updated_at
       ? this.renderValue(
           DateUtils.getLocalDate(this.props.item.updated_at).toFormat(
-            "yyyy-LL-dd HH:mm:ss"
-          )
+            "yyyy-LL-dd HH:mm:ss",
+          ),
         )
       : "-";
   }
@@ -163,7 +163,7 @@ class MinionPoolMainDetails extends React.Component<Props> {
         return value
           .map(
             (v: { source: any; destination: any }) =>
-              `${v.source}=${v.destination}`
+              `${v.source}=${v.destination}`,
           )
           .join(", ");
       }
@@ -211,7 +211,7 @@ class MinionPoolMainDetails extends React.Component<Props> {
               label: `${label} - ${LabelDictionary.get(p)}`,
               value: getValue(fieldName, value[p]),
             };
-          })
+          }),
         );
       } else {
         properties.push({ label, value: getValue(pn, value) });
@@ -262,13 +262,13 @@ class MinionPoolMainDetails extends React.Component<Props> {
               (k !== "storage_mappings" ||
                 (env[k] != null &&
                   typeof env[k] === "object" &&
-                  Object.keys(env[k]).length > 0))
+                  Object.keys(env[k]).length > 0)),
           )
         : [];
     };
 
     const usage: ActionItem[] = this.props.transfers.concat(
-      this.props.deployments as any[]
+      this.props.deployments as any[],
     );
 
     return (
@@ -307,8 +307,8 @@ class MinionPoolMainDetails extends React.Component<Props> {
               {this.props.item?.created_at ? (
                 this.renderValue(
                   DateUtils.getLocalDate(this.props.item.created_at).toFormat(
-                    "yyyy-LL-dd HH:mm:ss"
-                  )
+                    "yyyy-LL-dd HH:mm:ss",
+                  ),
                 )
               ) : (
                 <Value>-</Value>

+ 3 - 3
src/components/modules/MinionModule/MinionPoolListItem/MinionPoolListItem.tsx

@@ -116,7 +116,7 @@ class MinionPoolListItem extends React.Component<Props> {
         <ItemLabel>Created</ItemLabel>
         <ItemValue>
           {DateUtils.getLocalDate(this.props.item.created_at).toFormat(
-            "dd LLLL yyyy, HH:mm"
+            "dd LLLL yyyy, HH:mm",
           )}
         </ItemValue>
       </Column>
@@ -132,7 +132,7 @@ class MinionPoolListItem extends React.Component<Props> {
         <ItemValue>
           {this.props.item.updated_at
             ? DateUtils.getLocalDate(this.props.item.updated_at).toFormat(
-                "dd LLLL yyyy, HH:mm"
+                "dd LLLL yyyy, HH:mm",
               )
             : "-"}
         </ItemValue>
@@ -143,7 +143,7 @@ class MinionPoolListItem extends React.Component<Props> {
   renderCreatedCount() {
     const createdCount = this.props.item.minion_machines.filter(
       m =>
-        m.allocation_status === "IN_USE" || m.allocation_status === "AVAILABLE"
+        m.allocation_status === "IN_USE" || m.allocation_status === "AVAILABLE",
     ).length;
     const totalCount = this.props.item.minion_machines.length;
 

+ 12 - 12
src/components/modules/MinionModule/MinionPoolModal/MinionPoolModal.tsx

@@ -118,7 +118,7 @@ class MinionPoolModal extends React.Component<Props, State> {
       }
       await minionPoolStore.loadMinionPoolSchema(
         this.props.endpoint.type,
-        this.props.platform
+        this.props.platform,
       );
 
       await providerStore.loadProviders();
@@ -142,7 +142,7 @@ class MinionPoolModal extends React.Component<Props, State> {
       () => {
         this.create();
       },
-      2
+      2,
     );
   }
 
@@ -232,7 +232,7 @@ class MinionPoolModal extends React.Component<Props, State> {
                 ? typeof f === "string"
                   ? f === value
                   : f.value === value || f.id === value
-                : false
+                : false,
             )
           ) {
             return true;
@@ -289,7 +289,7 @@ class MinionPoolModal extends React.Component<Props, State> {
     await minionPoolStore.add(
       this.props.endpoint.type,
       this.props.endpoint.id,
-      this.state.editableData
+      this.state.editableData,
     );
     notificationStore.alert("Minion Pool created", "success");
     this.props.onRequestClose();
@@ -301,7 +301,7 @@ class MinionPoolModal extends React.Component<Props, State> {
         const minionPool: any = { ...prevState.editableData };
         const requiredFieldsDefaults =
           minionPoolStore.minionPoolCombinedSchema.filter(
-            f => f.required && f.default != null
+            f => f.required && f.default != null,
           );
         requiredFieldsDefaults.forEach(f => {
           if (minionPool[f.name] == null) {
@@ -314,18 +314,18 @@ class MinionPoolModal extends React.Component<Props, State> {
         minionPoolStore.sortMigrImages(
           this.getFieldValue(
             minionPoolStore.minionPoolDefaultSchema.find(
-              f => f.name === "os_type"
-            )
-          )
+              f => f.name === "os_type",
+            ),
+          ),
         );
-      }
+      },
     );
   }
 
   async loadExtraOptions(
     field: Field | null,
     type: "source" | "destination",
-    useCache = true
+    useCache = true,
   ) {
     const envData = getFieldChangeOptions({
       providerName: this.props.endpoint.type,
@@ -370,7 +370,7 @@ class MinionPoolModal extends React.Component<Props, State> {
         if (field.type !== "string" || field.enum) {
           this.loadExtraOptions(field, this.props.platform, true);
         }
-      }
+      },
     );
   }
 
@@ -413,7 +413,7 @@ class MinionPoolModal extends React.Component<Props, State> {
           platform={this.props.platform}
           optionsLoading={minionPoolStore.optionsSecondaryLoading}
           optionsLoadingSkipFields={minionPoolStore.minionPoolDefaultSchema.map(
-            f => f.name
+            f => f.name,
           )}
           envOptionsDisabled={
             this.props.minionPool != null &&

+ 2 - 2
src/components/modules/MinionModule/MinionPoolModal/MinionPoolModalContent.spec.tsx

@@ -97,13 +97,13 @@ describe("MinionPoolModalContent", () => {
   it("filters non required fields", async () => {
     const { getByText } = render(<MinionPoolModalContent {...defaultProps} />);
     expect(TestUtils.selectAll("FieldInput__LabelText")[1].textContent).toBe(
-      "Required Env Option"
+      "Required Env Option",
     );
     await act(async () => {
       getByText("Advanced").click();
     });
     expect(TestUtils.selectAll("FieldInput__LabelText")[1].textContent).toBe(
-      "Env Option"
+      "Env Option",
     );
   });
 

+ 4 - 4
src/components/modules/MinionModule/MinionPoolModal/MinionPoolModalContent.tsx

@@ -154,7 +154,7 @@ class MinionPoolModalContent extends React.Component<Props, State> {
     }
     const exceptions = ["endpoint_id", "platform", "os_type"];
     return fields.filter(
-      f => (f.required && f.default == null) || exceptions.indexOf(f.name) > -1
+      f => (f.required && f.default == null) || exceptions.indexOf(f.name) > -1,
     );
   }
 
@@ -234,7 +234,7 @@ class MinionPoolModalContent extends React.Component<Props, State> {
           <Row key={field.name}>
             {field1}
             {field2}
-          </Row>
+          </Row>,
         );
       };
       if (field.useTextArea) {
@@ -266,7 +266,7 @@ class MinionPoolModalContent extends React.Component<Props, State> {
         <Group>
           <GroupFields>
             {this.renderFieldSet(
-              this.filterBySimpleAdvanced(this.props.defaultSchema)
+              this.filterBySimpleAdvanced(this.props.defaultSchema),
             )}
           </GroupFields>
         </Group>
@@ -285,7 +285,7 @@ class MinionPoolModalContent extends React.Component<Props, State> {
           <GroupFields>
             {this.renderFieldSet(
               this.filterBySimpleAdvanced(this.props.envSchema),
-              { disabled: this.props.envOptionsDisabled }
+              { disabled: this.props.envOptionsDisabled },
             )}
           </GroupFields>
         </Group>

+ 5 - 5
src/components/modules/NavigationModule/Navigation/Navigation.tsx

@@ -280,7 +280,7 @@ class Navigation extends React.Component<Props> {
         ? configLoader.config.disabledPages.find(p => p === page)
         : false;
     return navigationMenu.filter(
-      i => !isDisabled(i.value) && (!i.requiresAdmin || isAdmin)
+      i => !isDisabled(i.value) && (!i.requiresAdmin || isAdmin),
     );
   }
 
@@ -300,7 +300,7 @@ class Navigation extends React.Component<Props> {
     this.menu.style.left = "-9999px";
     this.cbsLogo.removeEventListener(
       "transitionend",
-      this.handleCollapsedTransitionEnd
+      this.handleCollapsedTransitionEnd,
     );
   }
 
@@ -314,7 +314,7 @@ class Navigation extends React.Component<Props> {
     this.cbsLogoSmall.style.left = "-9999px";
     this.smallMenu.removeEventListener(
       "transitionend",
-      this.handleExpandedTransitionEnd
+      this.handleExpandedTransitionEnd,
     );
   }
 
@@ -348,7 +348,7 @@ class Navigation extends React.Component<Props> {
       this.cbsLogoSmall.style.left = "auto";
       this.cbsLogo.addEventListener(
         "transitionend",
-        this.handleCollapsedTransitionEnd
+        this.handleCollapsedTransitionEnd,
       );
     } else {
       this.coriolisLogo.style.left = "auto";
@@ -356,7 +356,7 @@ class Navigation extends React.Component<Props> {
       this.menu.style.left = "auto";
       this.smallMenu.addEventListener(
         "transitionend",
-        this.handleExpandedTransitionEnd
+        this.handleExpandedTransitionEnd,
       );
     }
     this.isCollapsed = toCollapsed;

+ 2 - 2
src/components/modules/NotificationsModule/NotificationsModule.tsx

@@ -142,13 +142,13 @@ class NotificationsModule extends React.Component<
           i += 1
         ) {
           this.notificationSystem.removeNotification(
-            this.activeNotifications[i].uid
+            this.activeNotifications[i].uid,
           );
         }
       },
       onRemove: notification => {
         this.activeNotifications = this.activeNotifications.filter(
-          n => n.uid !== notification.uid
+          n => n.uid !== notification.uid,
         );
       },
     });

+ 5 - 5
src/components/modules/ProjectModule/ProjectDetailsContent/ProjectDetailsContent.spec.tsx

@@ -12,7 +12,7 @@ You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-import React, {act} from "react";
+import React, { act } from "react";
 
 import { Project, RoleAssignment } from "@src/@types/Project";
 import { render } from "@testing-library/react";
@@ -142,7 +142,7 @@ describe("ProjectDetailsContent", () => {
         <ProjectDetailsContent
           {...defaultProps}
           users={[{ ...USER, enabled: false }]}
-        />
+        />,
       );
 
       await openActionsDropdown();
@@ -163,7 +163,7 @@ describe("ProjectDetailsContent", () => {
   it("renders loading", () => {
     render(<ProjectDetailsContent {...defaultProps} loading />);
     expect(
-      TestUtils.select("ProjectDetailsContent__LoadingWrapper")
+      TestUtils.select("ProjectDetailsContent__LoadingWrapper"),
     ).toBeTruthy();
   });
 
@@ -185,7 +185,7 @@ describe("ProjectDetailsContent", () => {
     });
 
     const items = TestUtils.selectAll("DropdownLink__ListItem-");
-    let roleItem: HTMLElement | undefined ;
+    let roleItem: HTMLElement | undefined;
 
     for (const item of items) {
       if (item.textContent?.includes(ROLE_ASSIGNMENT.role.name)) {
@@ -202,7 +202,7 @@ describe("ProjectDetailsContent", () => {
     expect(defaultProps.onUserRoleChange).toBeCalledWith(
       USER,
       ROLE_ASSIGNMENT.role.id,
-      false
+      false,
     );
   });
 });

+ 1 - 1
src/components/modules/ProjectModule/ProjectDetailsContent/ProjectDetailsContent.tsx

@@ -267,7 +267,7 @@ class ProjectDetailsContent extends React.Component<Props, State> {
             this.props.onUserRoleChange(
               user,
               item.value,
-              !userRoles.find(i => i.value === item.value)
+              !userRoles.find(i => i.value === item.value),
             );
           }}
         />,

+ 1 - 1
src/components/modules/ProjectModule/ProjectListItem/ProjectListItem.spec.tsx

@@ -42,7 +42,7 @@ describe("ProjectListItem", () => {
   it("switches project", () => {
     render(<ProjectListItem {...defaultProps} />);
     const switchProjectButton = Array.from(
-      document.querySelectorAll("button")
+      document.querySelectorAll("button"),
     ).find(el => el.textContent?.includes("Switch"));
     expect(switchProjectButton).toBeTruthy();
 

+ 1 - 1
src/components/modules/ProjectModule/ProjectListItem/ProjectListItem.tsx

@@ -83,7 +83,7 @@ const Body = styled.div<any>`
 const Data = styled.div<any>`
   ${props =>
     ThemeProps.exactWidth(
-      `${Math.floor(bodyWidth / (100 / props.percentage)) - 68}px`
+      `${Math.floor(bodyWidth / (100 / props.percentage)) - 68}px`,
     )}
   margin: 0 32px;
 

+ 11 - 11
src/components/modules/ProjectModule/ProjectMemberModal/ProjectMemberModal.tsx

@@ -157,7 +157,7 @@ class ProjectMemberModal extends React.Component<Props, State> {
         this.props.roles.find(r => r.id === id) || {
           id: "undefined",
           name: "",
-        }
+        },
     );
     this.props.onAddClick(user, this.state.isNew, roles);
   }
@@ -259,7 +259,7 @@ class ProjectMemberModal extends React.Component<Props, State> {
           .map(r => ({ name: r.name, id: r.id }))}
         required
         highlight={Boolean(
-          this.state.highlightFieldNames.find(n => n === highlighFieldName)
+          this.state.highlightFieldNames.find(n => n === highlighFieldName),
         )}
         noSelectionMessage="Choose role(s)"
         noItemsMessage="No available roles"
@@ -284,7 +284,7 @@ class ProjectMemberModal extends React.Component<Props, State> {
         }
         required={field.required}
         highlight={Boolean(
-          this.state.highlightFieldNames.find(n => n === field.name)
+          this.state.highlightFieldNames.find(n => n === field.name),
         )}
         noSelectionMessage="Choose a project"
         noItemsMessage="No available members"
@@ -307,14 +307,14 @@ class ProjectMemberModal extends React.Component<Props, State> {
         this.state.username,
         username => {
           this.setState({ username });
-        }
+        },
       ),
       this.renderField(
         { name: "description", label: "Description" },
         this.state.description,
         description => {
           this.setState({ description });
-        }
+        },
       ),
       this.renderField(
         {
@@ -325,7 +325,7 @@ class ProjectMemberModal extends React.Component<Props, State> {
         this.state.projectId,
         projectId => {
           this.setState({ projectId });
-        }
+        },
       ),
       this.renderRolesField(),
       this.renderField(
@@ -333,28 +333,28 @@ class ProjectMemberModal extends React.Component<Props, State> {
         this.state.password,
         password => {
           this.setState({ password });
-        }
+        },
       ),
       this.renderField(
         { name: "confirm_password", label: "Confirm Password", required: true },
         this.state.confirmPassword,
         confirmPassword => {
           this.setState({ confirmPassword });
-        }
+        },
       ),
       this.renderField(
         { name: "Email", label: "Email" },
         this.state.email,
         email => {
           this.setState({ email });
-        }
+        },
       ),
       this.renderField(
         { name: "Enabled", label: "Enabled", type: "boolean" },
         this.state.enabled,
         enabled => {
           this.setState({ enabled });
-        }
+        },
       ),
     ];
 
@@ -375,7 +375,7 @@ class ProjectMemberModal extends React.Component<Props, State> {
               this.state.selectedUser ? this.state.selectedUser.id : ""
             }
             highlight={Boolean(
-              this.state.highlightFieldNames.find(n => n === "selectedUser")
+              this.state.highlightFieldNames.find(n => n === "selectedUser"),
             )}
             onChange={item => {
               this.setState({

+ 5 - 5
src/components/modules/ProjectModule/ProjectModal/ProjectModal.tsx

@@ -83,7 +83,7 @@ class ProjectModal extends React.Component<Props, State> {
       () => {
         this.handleUpdateClick();
       },
-      2
+      2,
     );
   }
 
@@ -131,7 +131,7 @@ class ProjectModal extends React.Component<Props, State> {
         disabled={this.props.loading}
         required={field.required}
         highlight={Boolean(
-          this.state.highlightFieldNames.find(n => n === field.name)
+          this.state.highlightFieldNames.find(n => n === field.name),
         )}
       />
     );
@@ -144,21 +144,21 @@ class ProjectModal extends React.Component<Props, State> {
         this.state.name,
         name => {
           this.setState({ name });
-        }
+        },
       ),
       this.renderField(
         { name: "description" },
         this.state.description,
         description => {
           this.setState({ description });
-        }
+        },
       ),
       this.renderField(
         { name: "Enabled", type: "boolean" },
         this.state.enabled,
         enabled => {
           this.setState({ enabled });
-        }
+        },
       ),
     ];
 

+ 2 - 2
src/components/modules/SetupModule/SetupPageEmailBody/SetupPageEmailBody.spec.tsx

@@ -64,8 +64,8 @@ describe("SetupPageEmailBody", () => {
     render(<SetupPageEmailBody {...defaultProps} />);
     expect(
       Array.from(document.querySelectorAll("*")).find(el =>
-        el.textContent?.includes(CUSTOMER_INFO_BASIC.fullName)
-      )
+        el.textContent?.includes(CUSTOMER_INFO_BASIC.fullName),
+      ),
     ).toBeTruthy();
   });
 

+ 3 - 3
src/components/modules/SetupModule/SetupPageEmailBody/SetupPageEmailBody.tsx

@@ -96,19 +96,19 @@ class SetupPageEmailBody extends React.Component<Props> {
             <b>Interested In</b>:{" "}
             {customerInfoSetupStoreValueToString(
               "interestedIn",
-              this.props.customerInfoTrial.interestedIn
+              this.props.customerInfoTrial.interestedIn,
             )}
             <br />
             <b>Source Platform</b>:{" "}
             {customerInfoSetupStoreValueToString(
               "sourcePlatform",
-              this.props.customerInfoTrial.sourcePlatform
+              this.props.customerInfoTrial.sourcePlatform,
             )}
             <br />
             <b>Destination Platform</b>:{" "}
             {customerInfoSetupStoreValueToString(
               "destinationPlatform",
-              this.props.customerInfoTrial.destinationPlatform
+              this.props.customerInfoTrial.destinationPlatform,
             )}
             <br />
           </>

+ 11 - 11
src/components/modules/SetupModule/SetupPageLegal/SetupPageLegal.spec.tsx

@@ -66,7 +66,7 @@ describe("SetupPageLegal", () => {
 
     expect(defaultProps.onCustomerInfoChange).toHaveBeenCalledWith(
       "interestedIn",
-      "replicas"
+      "replicas",
     );
 
     const bothInput = findInputByLabel("Both");
@@ -75,7 +75,7 @@ describe("SetupPageLegal", () => {
 
     expect(defaultProps.onCustomerInfoChange).toHaveBeenCalledWith(
       "interestedIn",
-      "both"
+      "both",
     );
 
     rerender(
@@ -85,7 +85,7 @@ describe("SetupPageLegal", () => {
           ...defaultProps.customerInfoTrial,
           interestedIn: "replicas",
         }}
-      />
+      />,
     );
 
     const migrationsInput = findInputByLabel("Migrations");
@@ -94,7 +94,7 @@ describe("SetupPageLegal", () => {
 
     expect(defaultProps.onCustomerInfoChange).toHaveBeenCalledWith(
       "interestedIn",
-      "migrations"
+      "migrations",
     );
   });
 
@@ -102,7 +102,7 @@ describe("SetupPageLegal", () => {
     render(<SetupPageLegal {...defaultProps} />);
     const findCheckboxByText = (text: string) =>
       Array.from(TestUtils.selectAll("Checkbox__Wrapper")).find(el =>
-        el.parentElement?.textContent?.includes(text)
+        el.parentElement?.textContent?.includes(text),
       )!;
 
     const privacyCheckbox = findCheckboxByText("Privacy Policy");
@@ -121,7 +121,7 @@ describe("SetupPageLegal", () => {
 
     const findLabelByText = (text: string) =>
       Array.from(TestUtils.selectAll("SetupPageLegal__CheckboxLabel")).find(
-        el => el.textContent?.includes(text)
+        el => el.textContent?.includes(text),
       )!;
 
     const privacyLabel = findLabelByText("Privacy Policy");
@@ -148,11 +148,11 @@ describe("SetupPageLegal", () => {
     async ({ platformType, itemIndex, expectedProvider }) => {
       render(<SetupPageLegal {...defaultProps} />);
       const platformDropdown = Array.from(
-        TestUtils.selectAll("Dropdown__Wrapper")
+        TestUtils.selectAll("Dropdown__Wrapper"),
       ).find(el =>
         el.parentElement?.parentElement?.textContent?.includes(
-          `${platformType} Platform`
-        )
+          `${platformType} Platform`,
+        ),
       )!;
 
       expect(platformDropdown).toBeTruthy();
@@ -165,8 +165,8 @@ describe("SetupPageLegal", () => {
 
       expect(defaultProps.onCustomerInfoChange).toHaveBeenCalledWith(
         `${platformType.toLowerCase()}Platform`,
-        expectedProvider
+        expectedProvider,
       );
-    }
+    },
   );
 });

+ 5 - 5
src/components/modules/SetupModule/SetupPageLegal/SetupPageLegal.tsx

@@ -185,14 +185,14 @@ class SetupPageLegal extends React.Component<Props, State> {
       return this._destinationPlatformItems;
     }
     this._destinationPlatformItems = preparePlatformItems(
-      DESTINATION_PLATFORMS
+      DESTINATION_PLATFORMS,
     );
     return this._destinationPlatformItems;
   }
 
   handleLegalChange() {
     this.props.onLegalChange(
-      this.state.privacyAgreement && this.state.eulaAgreement
+      this.state.privacyAgreement && this.state.eulaAgreement,
     );
   }
 
@@ -277,7 +277,7 @@ class SetupPageLegal extends React.Component<Props, State> {
             selectedItem={{
               value: this.props.customerInfoTrial.sourcePlatform,
               label: getPlatformLabelForValue(
-                this.props.customerInfoTrial.sourcePlatform
+                this.props.customerInfoTrial.sourcePlatform,
               ),
             }}
             onChange={item => {
@@ -300,13 +300,13 @@ class SetupPageLegal extends React.Component<Props, State> {
             selectedItem={{
               value: this.props.customerInfoTrial.destinationPlatform,
               label: getPlatformLabelForValue(
-                this.props.customerInfoTrial.destinationPlatform
+                this.props.customerInfoTrial.destinationPlatform,
               ),
             }}
             onChange={item => {
               this.props.onCustomerInfoChange(
                 "destinationPlatform",
-                item.value
+                item.value,
               );
             }}
           />

+ 4 - 4
src/components/modules/SetupModule/SetupPageLicence/SetupPageLicence.spec.tsx

@@ -42,7 +42,7 @@ describe("SetupPageLicence", () => {
   it("renders without crashing", () => {
     render(<SetupPageLicence {...defaultProps} />);
     const fullNameInput = Array.from(
-      TestUtils.selectAll("SetupPageInputWrapper__Label")
+      TestUtils.selectAll("SetupPageInputWrapper__Label"),
     )
       .find(el => el.textContent?.includes("Full name"))!
       .parentElement?.querySelector("input")!;
@@ -75,14 +75,14 @@ describe("SetupPageLicence", () => {
 
     expect(defaultProps.onUpdateCustomerInfo).toHaveBeenCalledWith(
       fieldName,
-      newValue
+      newValue,
     );
   });
 
   it("fires country change event", async () => {
     render(<SetupPageLicence {...defaultProps} />);
     const countryInput = Array.from(
-      TestUtils.selectAll("SetupPageInputWrapper__Label")
+      TestUtils.selectAll("SetupPageInputWrapper__Label"),
     )
       .find(el => el.textContent?.includes("Country"))!
       .parentElement?.querySelector("input")!;
@@ -93,7 +93,7 @@ describe("SetupPageLicence", () => {
 
     expect(defaultProps.onUpdateCustomerInfo).toHaveBeenCalledWith(
       "country",
-      "United Arab Emirates"
+      "United Arab Emirates",
     );
   });
 });

+ 1 - 1
src/components/modules/SetupModule/SetupPageLicence/SetupPageLicence.tsx

@@ -131,7 +131,7 @@ class SetupPageLicence extends React.Component<Props> {
               width={450}
               items={this.countriesItems}
               selectedItem={this.countriesItems.find(
-                c => c.label === this.props.customerInfo.country
+                c => c.label === this.props.customerInfo.country,
               )}
               onChange={item => {
                 this.props.onUpdateCustomerInfo("country", item.label);

+ 1 - 1
src/components/modules/SetupModule/ui/SetupPageBackButton/SetupPageBackButton.spec.tsx

@@ -31,7 +31,7 @@ describe("SetupPageBackButton", () => {
   it("renders without crashing", () => {
     render(<SetupPageBackButton {...defaultProps} />);
     expect(
-      TestUtils.select("SetupPageBackButton__Wrapper")?.textContent
+      TestUtils.select("SetupPageBackButton__Wrapper")?.textContent,
     ).toContain("Back");
   });
 });

+ 1 - 1
src/components/modules/SetupModule/ui/SetupPagePasswordStrength/SetupPagePasswordStrength.tsx

@@ -57,7 +57,7 @@ class SetupPagePasswordStrength extends React.Component<Props> {
     strengthTester.addCommonPasswords(taiPasswordStrength.commonPasswords);
     strengthTester.addTrigraphMap(taiPasswordStrength.trigraphs);
     let strengthCode: Status = strengthTester.check(
-      this.props.value
+      this.props.value,
     ).strengthCode;
     const STRENGTH_CODES: Status[] = [
       "VERY_WEAK",

+ 1 - 1
src/components/modules/TemplateModule/EmptyTemplate/EmptyTemplate.spec.tsx

@@ -23,7 +23,7 @@ describe("EmptyTemplate", () => {
     const { getByText } = render(
       <EmptyTemplate>
         <div>contentComponent</div>
-      </EmptyTemplate>
+      </EmptyTemplate>,
     );
     expect(getByText("contentComponent")).toBeTruthy();
   });

+ 1 - 1
src/components/modules/TemplateModule/MainTemplate/MainTemplate.spec.tsx

@@ -25,7 +25,7 @@ describe("MainTemplate", () => {
         navigationComponent={<div>navigationComponent</div>}
         headerComponent={<div>headerComponent</div>}
         listComponent={<div>listComponent</div>}
-      />
+      />,
     );
     expect(getByText("navigationComponent")).toBeTruthy();
     expect(getByText("headerComponent")).toBeTruthy();

+ 1 - 1
src/components/modules/TemplateModule/WizardTemplate/WizardTemplate.spec.tsx

@@ -24,7 +24,7 @@ describe("WizardTemplate", () => {
       <WizardTemplate
         pageHeaderComponent={<div>pageHeaderComponent</div>}
         pageContentComponent={<div>pageContentComponent</div>}
-      />
+      />,
     );
     expect(getByText("pageHeaderComponent")).toBeTruthy();
     expect(getByText("pageContentComponent")).toBeTruthy();

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff