web/storagenode/src: removes references to available and remaining bandwidth
Change-Id: I3945a94ddd6d80d0282f65e5e9939952e39ba571
This commit is contained in:
parent
1a875baa1d
commit
140e2f0045
@ -120,7 +120,7 @@ func printDashboard(data *pb.DashboardResponse) error {
|
||||
|
||||
w = tabwriter.NewWriter(color.Output, 0, 0, 5, ' ', tabwriter.AlignRight)
|
||||
fmt.Fprintf(w, "\n\t%s\t%s\t%s\t%s\t\n", color.GreenString("Available"), color.GreenString("Used"), color.GreenString("Egress"), color.GreenString("Ingress"))
|
||||
fmt.Fprintf(w, "Bandwidth\t%s\t%s\t%s\t (since %s 1)\n", usedBandwidth, usedEgress, usedIngress, time.Now().Format("Jan"))
|
||||
fmt.Fprintf(w, "Bandwidth\t%s\t%s\t%s\t%s\t (since %s 1)\n", "N/A", usedBandwidth, usedEgress, usedIngress, time.Now().Format("Jan"))
|
||||
fmt.Fprintf(w, "Disk\t%s\t%s\t\n", availableSpace, usedSpace)
|
||||
if err = w.Flush(); err != nil {
|
||||
return err
|
||||
|
@ -47,13 +47,6 @@
|
||||
</div>
|
||||
<div>
|
||||
<div class="info-area__remaining-space-area">
|
||||
<BarInfo
|
||||
label="Bandwidth Remaining"
|
||||
:amount="bandwidth.remaining"
|
||||
info-text="of bandwidth left"
|
||||
:current-bar-amount="bandwidth.used"
|
||||
:max-bar-amount="bandwidth.available"
|
||||
/>
|
||||
<BarInfo
|
||||
label="Disk Space Remaining"
|
||||
:amount="diskSpace.remaining"
|
||||
@ -225,8 +218,8 @@ export default class SNOContentFilling extends Vue {
|
||||
}
|
||||
|
||||
/**
|
||||
* bandwidth - remaining amount of bandwidth from store.
|
||||
* @return BandwidthInfo - remaining amount of bandwidth
|
||||
* bandwidth - used amount of bandwidth from store.
|
||||
* @return BandwidthInfo - used amount of bandwidth
|
||||
*/
|
||||
public get bandwidth(): BandwidthInfo {
|
||||
return this.$store.state.node.utilization.bandwidth;
|
||||
|
@ -55,8 +55,6 @@ export const node = {
|
||||
utilization: {
|
||||
bandwidth: {
|
||||
used: 0,
|
||||
remaining: 1,
|
||||
available: 1,
|
||||
},
|
||||
diskSpace: {
|
||||
used: 0,
|
||||
@ -91,8 +89,6 @@ export const node = {
|
||||
state.utilization.diskSpace.remaining = nodeInfo.diskSpace.available - nodeInfo.diskSpace.used;
|
||||
state.utilization.diskSpace.available = nodeInfo.diskSpace.available;
|
||||
state.utilization.bandwidth.used = nodeInfo.bandwidth.used;
|
||||
state.utilization.bandwidth.remaining = nodeInfo.bandwidth.available - nodeInfo.bandwidth.used;
|
||||
state.utilization.bandwidth.available = nodeInfo.bandwidth.available;
|
||||
|
||||
state.disqualifiedSatellites = nodeInfo.satellites.filter((satellite: SatelliteInfo) => {
|
||||
return satellite.disqualified;
|
||||
|
@ -49,7 +49,7 @@ export class SNOApi {
|
||||
});
|
||||
|
||||
const diskSpace: DiskSpaceInfo = new DiskSpaceInfo(json.diskSpace.used, json.diskSpace.available);
|
||||
const bandwidth: BandwidthInfo = new BandwidthInfo(json.bandwidth.used, json.bandwidth.available);
|
||||
const bandwidth: BandwidthInfo = new BandwidthInfo(json.bandwidth.used);
|
||||
|
||||
return new Dashboard(json.nodeID, json.wallet, satellites, diskSpace, bandwidth,
|
||||
new Date(json.lastPinged), new Date(json.startedAt), json.version, json.allowedVersion, json.upToDate);
|
||||
|
@ -48,12 +48,7 @@ export class DiskSpaceInfo {
|
||||
* BandwidthInfo stores all info about storage node bandwidth usage
|
||||
*/
|
||||
export class BandwidthInfo {
|
||||
public remaining: number;
|
||||
|
||||
public constructor(
|
||||
public used: number,
|
||||
public available: number,
|
||||
) {
|
||||
this.remaining = available - used;
|
||||
}
|
||||
) {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user