Skip to content

Commit 61ce75e

Browse files
committed
Merge pull request #1942 from Accelerite/CS-50422
CLOUDSTACK-9784 : GPU detail not displayed in GPU tab of management server UI.ISSUE ================== When GPU tab of the host is selected on the management server UI, no GPU detail is displayed. RESOLUTION ================== In the javascript file "system.js" while fetching the GPU details, sort functionality in dataprovider is returning value as undefined and hence it throwing an exception. So handled the output as undefined gracefully to avoid exception. **Screenshot before applying fix :** ![screenshot before applying fix](https://cloud.githubusercontent.com/assets/25146827/23017606/f63fe470-f460-11e6-8d26-553e98bb0664.PNG) **Screenshot after applying fix :** ![screenshot after applying fix](https://cloud.githubusercontent.com/assets/25146827/23017627/07d5a8b4-f461-11e6-814e-3c27b1bbda41.PNG) * pr/1942: CLOUDSTACK-9784 : GPU detail not displayed in GPU tab of management server UI. Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2 parents 559fc61 + 36abc63 commit 61ce75e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

ui/scripts/system.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17228,9 +17228,16 @@
1722817228
}
1722917229
},
1723017230
dataProvider: function (args) {
17231-
var items = gpugroupObj.vgpu.sort(function(a, b) {
17232-
return a.maxvgpuperpgpu >= b.maxvgpuperpgpu;
17233-
});
17231+
var items;
17232+
17233+
if(typeof(gpugroupObj.vgpu) != "undefined") {
17234+
items = gpugroupObj.vgpu.sort(function(a, b) {
17235+
return a.maxvgpuperpgpu >= b.maxvgpuperpgpu;
17236+
});
17237+
}
17238+
else {
17239+
items = gpugroupObj.vgpu;
17240+
}
1723417241
$(items).each(function () {
1723517242
this.maxresolution = (this.maxresolutionx == null || this.maxresolutionx == 0
1723617243
|| this.maxresolutiony == null || this.maxresolutiony == 0)

0 commit comments

Comments
 (0)