web/storagenode: update new suspension and audit threshold on dashboard
The new audit scoring sets disqualification threshold to <96: https://forum.storj.io/t/new-audit-scoring-is-live/19466/24. This changes applies this update to the dashboard, same colors but different thresholds now: <96 = disqualification <99 = warning previously: <60 = disqualification <95 = warning Closes https://github.com/storj/storj/issues/5113 Change-Id: Iaf61e5034101fe5d4d70df6b72eb5f4ccb706e5b
This commit is contained in:
parent
cb0c359b81
commit
10f59f8633
@ -129,7 +129,7 @@
|
||||
<ChecksArea
|
||||
label="Suspension Score"
|
||||
:amount="audits.suspensionScore.label"
|
||||
info-text="This score shows how close your node is to getting suspended on a satellite. A score of 60% or below will result in suspension. If your node stays suspended for more than one week you will be disqualified from this satellite, so please correct the errors that lead to suspension asap."
|
||||
info-text="This score shows how close your node is to getting suspended on a satellite. A score of 96% or below will result in suspension. If your node stays suspended for more than one week you will be disqualified from this satellite, so please correct the errors that lead to suspension asap."
|
||||
/>
|
||||
<ChecksArea
|
||||
label="Audit Score"
|
||||
|
@ -330,9 +330,9 @@ export class Score {
|
||||
public label: string;
|
||||
public statusClassName: string;
|
||||
|
||||
private readonly WARNING_MINIMUM_SCORE: number = 0.95;
|
||||
private readonly WARNING_MINIMUM_SCORE: number = 0.99;
|
||||
private readonly WARNING_CLASSNAME: string = 'warning';
|
||||
private readonly DISQUALIFICATION_MINIMUM_SCORE: number = 0.6;
|
||||
private readonly DISQUALIFICATION_MINIMUM_SCORE: number = 0.96;
|
||||
private readonly DISQUALIFICATION_CLASSNAME: string = 'disqualification';
|
||||
|
||||
public constructor(
|
||||
|
@ -31,8 +31,8 @@ describe('AllSatellitesAuditsArea', (): void => {
|
||||
const satellites = new Satellites();
|
||||
satellites.satellitesScores = [
|
||||
new SatelliteScores('name1', 1, 1, 0.5),
|
||||
new SatelliteScores('name2', 0.5, 1, 0.7),
|
||||
new SatelliteScores('name3', 0.7, 1, 1),
|
||||
new SatelliteScores('name2', 0.5, 1, 0.97),
|
||||
new SatelliteScores('name3', 0.97, 1, 1),
|
||||
];
|
||||
|
||||
jest.spyOn(nodeApi, 'satellites').mockReturnValue(Promise.resolve(satellites));
|
||||
|
@ -38,7 +38,7 @@ exports[`AllSatellitesAuditsArea renders correctly with actual values 1`] = `
|
||||
</div>
|
||||
<div class="audits-area__content__item__info">
|
||||
<p class="audits-area__content__item__info__label">Online</p>
|
||||
<p class="audits-area__content__item__info__value warning">70 %</p>
|
||||
<p class="audits-area__content__item__info__value warning">97 %</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="audits-area__content__item">
|
||||
@ -53,7 +53,7 @@ exports[`AllSatellitesAuditsArea renders correctly with actual values 1`] = `
|
||||
</div>
|
||||
<div class="audits-area__content__item__info">
|
||||
<p class="audits-area__content__item__info__label">Audit</p>
|
||||
<p class="audits-area__content__item__info__value warning">70 %</p>
|
||||
<p class="audits-area__content__item__info__value warning">97 %</p>
|
||||
</div>
|
||||
<div class="audits-area__content__item__info">
|
||||
<p class="audits-area__content__item__info__label">Online</p>
|
||||
|
@ -102,15 +102,15 @@ describe('mutations', () => {
|
||||
it('selects all satellites', () => {
|
||||
const satelliteInfo = new Satellites();
|
||||
satelliteInfo.satellitesScores = [
|
||||
new SatelliteScores('name1', 0.7, 0.9, 1),
|
||||
new SatelliteScores('name1', 0.8, 0.8, 0.8),
|
||||
new SatelliteScores('name1', 0.97, 0.97, 1),
|
||||
new SatelliteScores('name1', 0.98, 0.98, 0.98),
|
||||
];
|
||||
|
||||
store.commit(NODE_MUTATIONS.SELECT_ALL_SATELLITES, satelliteInfo);
|
||||
|
||||
expect(state.node.selectedSatellite.id).toBe('');
|
||||
expect(state.node.satellitesScores.length).toBe(satelliteInfo.satellitesScores.length);
|
||||
expect(state.node.satellitesScores[0].auditScore.label).toBe('70 %');
|
||||
expect(state.node.satellitesScores[0].auditScore.label).toBe('97 %');
|
||||
expect(state.node.satellitesScores[0].iconClassName).toBe('warning');
|
||||
});
|
||||
|
||||
@ -281,8 +281,8 @@ describe('actions', () => {
|
||||
it('success fetch all satellites info', async () => {
|
||||
const satellitesInfo = new Satellites();
|
||||
satellitesInfo.satellitesScores = [
|
||||
new SatelliteScores('name1', 0.7, 0.9, 1),
|
||||
new SatelliteScores('name1', 0.8, 0.8, 0.8),
|
||||
new SatelliteScores('name1', 0.97, 0.9, 1),
|
||||
new SatelliteScores('name1', 0.98, 0.98, 0.98),
|
||||
];
|
||||
|
||||
jest.spyOn(nodeApi, 'satellites').mockReturnValue(
|
||||
@ -295,7 +295,7 @@ describe('actions', () => {
|
||||
expect(state.node.satellitesScores.length).toBe(satellitesInfo.satellitesScores.length);
|
||||
expect(state.node.satellitesScores[0].onlineScore.label).toBe('100 %');
|
||||
expect(state.node.satellitesScores[0].auditScore.statusClassName).toBe('warning');
|
||||
expect(state.node.satellitesScores[1].auditScore.label).toBe('80 %');
|
||||
expect(state.node.satellitesScores[1].auditScore.label).toBe('98 %');
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user