summaryrefslogtreecommitdiffstats
path: root/auth/src/main/webapp/user/js/user.js
diff options
context:
space:
mode:
authorsukesh a c <sukeshac@huawei.com>2017-02-06 07:19:11 +0000
committersukesh a c <sukeshac@huawei.com>2017-02-06 07:20:21 +0000
commite87ba54b24808449fa43760cf57093c50a984bab (patch)
tree4d882eea414567d7dab868896adcb9693b868600 /auth/src/main/webapp/user/js/user.js
parenta0e2ca4635e0b97dd3d45dead14e7912576b2a24 (diff)
role UI changes
issue-id: OCS-188 Change-Id: I84a3bd6c7098ce927ae7f01324d43688594ec4f0 Signed-off-by: sukesh a c <sukeshac@huawei.com>
Diffstat (limited to 'auth/src/main/webapp/user/js/user.js')
-rw-r--r--auth/src/main/webapp/user/js/user.js26
1 files changed, 25 insertions, 1 deletions
diff --git a/auth/src/main/webapp/user/js/user.js b/auth/src/main/webapp/user/js/user.js
index aa0dc729..c45e68d0 100644
--- a/auth/src/main/webapp/user/js/user.js
+++ b/auth/src/main/webapp/user/js/user.js
@@ -20,7 +20,8 @@ $(document).ready(function() {
var userListHeader = [
{ title: "User", data: "User",width: "20%"},
- { title: "Description", data: "Description",width: "60%"},
+ { title: "Description", data: "Description",width: "30%"},
+ { title: "Roles", data: "Roles",width: "30%"},
{ title: "Operations", data: "Operations",width: "20%"}
];
function initialPage() {
@@ -32,6 +33,15 @@ $(document).ready(function() {
}).error(function(data) {
if (data.status == 403) {
$(".hw_body").html("<span style='font-size:20px;'>" + JSON.parse(data.responseText).error.message + "</span>");
+ } else {
+ var userListHeader = [
+ { title: "User", data: "User",width: "20%"},
+ { title: "Description", data: "Description",width: "30%"},
+ { title: "Roles", data: "Roles",width: "30%"},
+ { title: "Operations", data: "Operations",width: "20%"}
+ ];
+ Table.create("", "table_id", userListHeader);
+ $(".hw_body").css("visibility", "visible");
}
});
@@ -92,6 +102,20 @@ $(document).ready(function() {
temp.rowid = data[i].id;
temp.User = data[i].name;
temp.Description = data[i].description;
+ temp.Roles='';
+
+ for (var j = 0; j < data[i].roles.length; j++) {
+ if(temp.Roles.length>0)
+ {
+ temp.Roles=temp.Roles+','+data[i].roles[j].name;
+ }
+ else
+ {
+ temp.Roles=data[i].roles[j].name;
+ }
+
+ }
+
if (data[i].name == "admin") {
temp.Operations = editOpt;
} else {