diff --git a/src/SfxWeb/cypress/e2e/cluster.cy.js b/src/SfxWeb/cypress/e2e/cluster.cy.js index e433d766f..0ef1407fe 100644 --- a/src/SfxWeb/cypress/e2e/cluster.cy.js +++ b/src/SfxWeb/cypress/e2e/cluster.cy.js @@ -21,6 +21,10 @@ context('Cluster page', () => { }) describe("essentials", () => { + beforeEach(() => { + cy.intercept(apiUrl('/Partitions/00000000-0000-0000-0000-000000000001?*'), + {fixture: 'cluster-page/fm/notInQuorumLoss.json'}).as("getFMQuorumLossStatus") + }) it('load essentials', () => { cy.visit('') @@ -71,6 +75,19 @@ context('Cluster page', () => { }) + + it('displays FM quorum loss warning when in quorum loss status', () => { + cy.visit(''); + cy.wait('@getFMQuorumLossStatus') + cy.get('[data-cy="fmql-warning"]').should('not.exist'); + cy.intercept(apiUrl('/Partitions/00000000-0000-0000-0000-000000000001?*'), + {fixture: 'cluster-page/fm/inQuorumLoss.json'}).as("getFMQuorumLossStatus") + cy.reload(); + cy.wait('@getFMQuorumLossStatus') + cy.get('[data-cy="fmql-warning"]').should('exist').should('be.visible'); + }); + + it('xss', () => { addDefaultFixtures(xssPrefix); diff --git a/src/SfxWeb/cypress/fixtures/cluster-page/fm/inQuorumLoss.json b/src/SfxWeb/cypress/fixtures/cluster-page/fm/inQuorumLoss.json new file mode 100644 index 000000000..f5de85d61 --- /dev/null +++ b/src/SfxWeb/cypress/fixtures/cluster-page/fm/inQuorumLoss.json @@ -0,0 +1,4 @@ +{ + "ServiceKind": "Stateful", + "PartitionStatus": "InQuorumLoss" +} \ No newline at end of file diff --git a/src/SfxWeb/cypress/fixtures/cluster-page/fm/notInQuorumLoss.json b/src/SfxWeb/cypress/fixtures/cluster-page/fm/notInQuorumLoss.json new file mode 100644 index 000000000..12fa02e26 --- /dev/null +++ b/src/SfxWeb/cypress/fixtures/cluster-page/fm/notInQuorumLoss.json @@ -0,0 +1,4 @@ +{ + "ServiceKind": "Stateful", + "PartitionStatus": "OK" +} \ No newline at end of file diff --git a/src/SfxWeb/src/app/Common/Constants.ts b/src/SfxWeb/src/app/Common/Constants.ts index fbe8d6013..42f4e1245 100644 --- a/src/SfxWeb/src/app/Common/Constants.ts +++ b/src/SfxWeb/src/app/Common/Constants.ts @@ -224,6 +224,11 @@ export class TelemetryEventNames { } +export class SystemServicePartitionIds { + public static FailoverManagerId = '00000000-0000-0000-0000-000000000001'; +} + + export class RepairTaskMessages { public static longExecutingMessage = "This update can prevent other updates from going through. Please reach out to the Azure Compute teams (“Compute Manager/Blackbird”) to figure out why the updates are not completing."; public static longExecutingId = "longExecuting"; diff --git a/src/SfxWeb/src/app/services/rest-client.service.ts b/src/SfxWeb/src/app/services/rest-client.service.ts index 468fb0d4a..632a18a53 100644 --- a/src/SfxWeb/src/app/services/rest-client.service.ts +++ b/src/SfxWeb/src/app/services/rest-client.service.ts @@ -12,7 +12,7 @@ import { IRawCollection, IRawClusterManifest, IRawClusterHealth, IRawClusterUpgr IRawApplication, IRawService, IRawCreateServiceDescription, IRawCreateServiceFromTemplateDescription, IRawUpdateServiceDescription, IRawServiceDescription, IRawServiceHealth, IRawApplicationUpgradeProgress, IRawCreateComposeDeploymentDescription, IRawPartition, IRawPartitionHealth, IRawPartitionLoadInformation, IRawReplicaOnPartition, IRawReplicaHealth, IRawImageStoreContent, IRawStoreFolderSize, IRawClusterVersion, IRawList, IRawAadMetadata, IRawStorage, IRawRepairTask, - IRawServiceNameInfo, IRawApplicationNameInfo, IRawBackupEntity, IRawInfrastructureJob, IRawInfraRepairTask, IRawRoleInstanceImpact } from '../Models/RawDataTypes'; + IRawServiceNameInfo, IRawApplicationNameInfo, IRawBackupEntity, IRawInfrastructureJob, IRawInfraRepairTask, IRawRoleInstanceImpact} from '../Models/RawDataTypes'; import { mergeMap, map, catchError, finalize, skip } from 'rxjs/operators'; import { Application } from '../Models/DataModels/Application'; import { Service } from '../Models/DataModels/Service'; diff --git a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.html b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.html index 4ce6990e3..0d4ea132e 100644 --- a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.html +++ b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.html @@ -40,6 +40,10 @@