system-monitor-graph@rcassani: Bugfix: switch structures in JavaScript are fall-through (#1399)
* https://www.freecodecamp.org/news/fall-through-in-javascript-switch-statements/
This commit is contained in:
parent
1ca999d361
commit
6bf74d5969
@ -228,8 +228,10 @@ SystemMonitorGraph.prototype = {
|
||||
switch (this.gpu_manufacturer) {
|
||||
case "nvidia":
|
||||
this.get_nvidia_gpu_use();
|
||||
break;
|
||||
case "amdgpu":
|
||||
this.get_amdgpu_gpu_use();
|
||||
break;
|
||||
}
|
||||
value = this.gpu_use / 100;
|
||||
text1 = _("GPU Usage");
|
||||
@ -239,8 +241,10 @@ SystemMonitorGraph.prototype = {
|
||||
switch (this.gpu_manufacturer) {
|
||||
case "nvidia":
|
||||
this.get_nvidia_gpu_mem();
|
||||
break;
|
||||
case "amdgpu":
|
||||
this.get_amdgpu_gpu_mem();
|
||||
break;
|
||||
}
|
||||
let gpu_mem_use = 100 * this.gpu_mem[1] / this.gpu_mem[0];
|
||||
value = gpu_mem_use / 100;
|
||||
@ -257,7 +261,7 @@ SystemMonitorGraph.prototype = {
|
||||
text3 = this.gpu_mem[1].toFixed(1) + " / "
|
||||
+ this.gpu_mem[0].toFixed(1) + " " + gpumem_prefix;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// concatenate new value
|
||||
|
||||
@ -3,6 +3,6 @@
|
||||
"uuid": "system-monitor-graph@rcassani",
|
||||
"name": "System monitor graph",
|
||||
"description": "Creates graphs for system variables.",
|
||||
"version": "1.7",
|
||||
"version": "1.8",
|
||||
"prevent-decorations": true
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user