VRFS-1336 show user friendly config name
This commit is contained in:
parent
6d277f6597
commit
2abceaef8c
|
|
@ -26,9 +26,8 @@
|
|||
|
||||
function populateAccount(userDetail) {
|
||||
|
||||
var validProfiles = prettyPrintAudioProfiles(context.JK.getGoodAudioConfigs());
|
||||
|
||||
var invalidProfiles = prettyPrintAudioProfiles(context.JK.getBadAudioConfigs());
|
||||
var validProfiles = prettyPrintAudioProfiles(context.JK.getGoodConfigMap());
|
||||
var invalidProfiles = prettyPrintAudioProfiles(context.JK.getBadConfigMap());
|
||||
|
||||
var template = context.JK.fillTemplate($('#template-account-main').html(), {
|
||||
email: userDetail.email,
|
||||
|
|
@ -42,21 +41,19 @@
|
|||
$('#account-content-scroller').html(template);
|
||||
}
|
||||
|
||||
function prettyPrintAudioProfiles(devices) {
|
||||
if(devices && Object.keys(devices).length > 0) {
|
||||
var profiles = "";
|
||||
var delimiter = ", ";
|
||||
function prettyPrintAudioProfiles(profileMap) {
|
||||
var profiles = "";
|
||||
var delimiter = ", ";
|
||||
if (profileMap && profileMap.length > 0) {
|
||||
$.each(profileMap, function(index, val) {
|
||||
profiles += val.name + delimiter;
|
||||
});
|
||||
|
||||
$.each(devices, function(deviceId, deviceLabel) {
|
||||
profiles += deviceLabel;
|
||||
profiles += delimiter;
|
||||
})
|
||||
|
||||
return profiles.substring(0, profiles.length - delimiter.length);
|
||||
}
|
||||
else {
|
||||
return "N/A";
|
||||
}
|
||||
return profiles.substring(0, profiles.length - delimiter.length);
|
||||
}
|
||||
else {
|
||||
return "N/A";
|
||||
}
|
||||
}
|
||||
|
||||
function prettyPrintInstruments(instruments) {
|
||||
|
|
|
|||
|
|
@ -32,8 +32,15 @@
|
|||
|
||||
$('#account-audio-content-scroller table tbody').html('');
|
||||
|
||||
var validProfiles = context.JK.getGoodAudioConfigs();
|
||||
var invalidProfiles = context.JK.getBadAudioConfigs();
|
||||
var validProfiles = context.JK.getGoodConfigMap();
|
||||
var invalidProfiles = context.JK.getBadConfigMap();
|
||||
|
||||
if (invalidProfiles.length > 0) {
|
||||
$("#divInvalidConfig").show();
|
||||
}
|
||||
else {
|
||||
$("#divInvalidConfig").hide();
|
||||
}
|
||||
|
||||
// render valid device profiles
|
||||
var options = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue