Updating user-listing

4.x.x
dilanua 8 years ago
parent bbce1a3d8a
commit 99aca9b90a

@ -108,7 +108,7 @@ $("a.invite-user-link").click(function () {
invokerUtil.post(
inviteUserAPI,
usernameList,
// The success callback
// success callback
function (data, textStatus, jqXHR) {
if (jqXHR.status == 200) {
$(modalPopupContent).html($('#invite-user-success-content').html());
@ -117,7 +117,7 @@ $("a.invite-user-link").click(function () {
});
}
},
// The error callback
// error callback
function (jqXHR) {
console.log("error in invite-user API, status code: " + jqXHR.status);
$(modalPopupContent).html($('#invite-user-error-content').html());
@ -212,7 +212,7 @@ function resetPassword(uname) {
invokerUtil.post(
resetPasswordServiceURL,
resetPasswordFormData,
// The success callback
// success callback
function (data, textStatus, jqXHR) {
if (jqXHR.status == 200) {
$(modalPopupContent).html($('#reset-password-success-content').html());
@ -221,7 +221,7 @@ function resetPassword(uname) {
});
}
},
// The error callback
// error callback
function (jqXHR) {
console.log("error in reset-password API, status code: " + jqXHR.status);
var payload = JSON.parse(jqXHR.responseText);
@ -271,14 +271,19 @@ function loadUsers() {
var objects = [];
$(data.users).each(function (index) {
objects.push({
$(data.users).each(
function (index) {
objects.push(
{
username: data.users[index].username,
firstname: data.users[index].firstname ? data.users[index].firstname: '' ,
lastname: data.users[index].lastname ? data.users[index].lastname : '',
emailAddress : data.users[index].emailAddress ? data.users[index].emailAddress: '',
DT_RowId : "user-" + data.users[index].username})
});
DT_RowId : "user-" + data.users[index].username
}
)
}
);
var json = {
"recordsTotal": data.count,
@ -374,7 +379,9 @@ function loadUsers() {
];
$("#user-grid").datatables_extended_serverside_paging(null, '/api/device-mgt/v1.0/users', dataFilter, columns, fnCreatedRow, null);
$("#user-grid").datatables_extended_serverside_paging(
null, '/api/device-mgt/v1.0/users', dataFilter, columns, fnCreatedRow, null
);
$("#loading-content").hide();
}

Loading…
Cancel
Save