From 859b2150cdc834df87f11d88482304f1dc4c6ebd Mon Sep 17 00:00:00 2001 From: Nitesh Sarda Date: Tue, 14 Feb 2017 21:29:21 +0530 Subject: [PATCH] CLOUDSTACK-9784 : GPU detail not displayed in GPU tab of management server UI. (cherry picked from commit 36abc63b91cce72d1bee96eea630252c348f2450) Signed-off-by: Rohit Yadav --- ui/scripts/system.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 02734bf2df3..5264b22e586 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -17042,9 +17042,16 @@ } }, dataProvider: function (args) { - var items = gpugroupObj.vgpu.sort(function(a, b) { - return a.maxvgpuperpgpu >= b.maxvgpuperpgpu; - }); + var items; + + if(typeof(gpugroupObj.vgpu) != "undefined") { + items = gpugroupObj.vgpu.sort(function(a, b) { + return a.maxvgpuperpgpu >= b.maxvgpuperpgpu; + }); + } + else { + items = gpugroupObj.vgpu; + } $(items).each(function () { this.maxresolution = (this.maxresolutionx == null || this.maxresolutionx == 0 || this.maxresolutiony == null || this.maxresolutiony == 0)