diff --git a/bower.json b/bower.json
index a6d6dfb..17efe38 100644
--- a/bower.json
+++ b/bower.json
@@ -1,7 +1,7 @@
{
"name": "strolch-wc-inspector",
"description": "Strolch WebComponent Inspector",
- "version": "0.20.2",
+ "version": "0.21.0",
"authors": ["Robert von Burg"],
"keywords": [
"strolch",
diff --git a/strolch-wc-inspector-behavior.html b/strolch-wc-inspector-behavior.html
index 49a3510..66f4eea 100644
--- a/strolch-wc-inspector-behavior.html
+++ b/strolch-wc-inspector-behavior.html
@@ -15,6 +15,8 @@
},
toLocalDateTime: function (val) {
+ if (val == null || val.startsWith("1970-01-01T01:00:00"))
+ return "-";
return Strolch.toLocalDateTime(val);
},
arrayToString: function (arr) {
diff --git a/strolch-wc-sessions.html b/strolch-wc-sessions.html
index 0491240..c1fee74 100644
--- a/strolch-wc-sessions.html
+++ b/strolch-wc-sessions.html
@@ -49,6 +49,68 @@
--focus-color: #000000;
}
+ .table {
+ min-width: 100%;
+ display: flex;
+ flex-direction: column;
+ }
+
+ .table-row {
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: row;
+ margin-top: -1px;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ }
+
+ .table-heading {
+ font-weight: bold;
+ }
+
+ .table-heading,
+ .table-cell {
+ display: flex;
+ padding: 0 12px;
+ overflow: hidden;
+ align-items: center;
+ flex-basis: 80px;
+ flex-grow: 1;
+ flex-shrink: 0;
+ justify-content: flex-start;
+ min-height: 48px;
+ }
+
+ .source {
+ flex-grow: 0;
+ flex-basis: 120px;
+ }
+
+ .login-time,
+ .last-access {
+ flex-grow: 0;
+ flex-basis: 160px;
+ }
+
+ .username {
+ flex-grow: 0;
+ flex-basis: 250px;
+ }
+
+ .actions {
+ flex-grow: 0;
+ flex-basis: 120px;
+ }
+
+ .data {
+ padding-top: 10px;
+ padding-bottom: 10px;
+ }
+
+ .data:nth-child(even) {
+ background: #f7f7f7;
+ }
+
@@ -66,47 +128,33 @@
-
-
-
-
-
-
Username
-
Name
-
Roles
-
Source
-
Login time
-
Last Access
-
-
-
-
-
-
-
-
-
[[session.username]]
-
[[_getName(session)]]
-
[[arrayToString(session.roles)]]
-
[[session.source]]
-
[[toLocalDateTime(session.loginTime)]]
-
[[toLocalDateTime(session.lastAccess)]]
-
-
-
-
-
+
+
+
Username
+
Roles
+
Source
+
Login time
+
Last Access
+
+
+
+
[[session.username]]
[[_getName(session)]]
+
[[arrayToString(session.roles)]]
+
[[session.source]]
+
[[toLocalDateTime(session.loginTime)]]
+
[[toLocalDateTime(session.lastAccess)]]
+
+
+
+
-
-
+
diff --git a/strolch-wc-users.html b/strolch-wc-users.html
index cfa824e..25d6f91 100644
--- a/strolch-wc-users.html
+++ b/strolch-wc-users.html
@@ -27,9 +27,7 @@
-
@@ -74,43 +133,36 @@
-
-
-
-
-
-
Username
-
Name
-
State
-
Locale
-
Roles
-
-
-
-
-
-
-
-
-
[[item.username]]
-
[[_getName(item)]]
-
[[item.userState]]
-
[[item.locale]]
-
[[arrayToString(item.roles)]]
-
-
-
-
-
+
+
+
Username / Name
+
State
+
Locale
+
Roles
+
History
+
+
+
+
+
[[item.username]]
[[_getName(item)]]
+
[[item.userState]]
+
[[item.locale]]
+
[[arrayToString(item.roles)]]
+
+ FirstLogin: [[toLocalDateTime(item.history.firstLogin)]]
LastLogin:
+ [[toLocalDateTime(item.history.lastLogin)]]
PasswordChange:
+ [[toLocalDateTime(item.history.lastPasswordChange)]]
+
+
+
+
@@ -146,6 +198,7 @@
@@ -376,6 +429,22 @@
this.$.ajax.generateRequest();
},
+ _clearPassword: function (e) {
+ this.dlgTitle = 'Clear password failed';
+ this._handleAjaxResponse = function (data) {
+ this.reload();
+
+ this.password0 = '';
+ this.password1 = '';
+ this.$.pwDlg.close();
+ };
+
+ this.$.ajax.url = this.basePath + 'rest/strolch/privilege/users/' + this.user.username + '/password';
+ this.$.ajax.method = 'DELETE';
+ this.$.ajax.body = {};
+ this.$.ajax.generateRequest();
+ },
+
_removeUser: function (e) {
var user = e.model.item;
if (!confirm('Do you really want to delete user ' + user.username + ': ' + user.firstname + ' ' + user.lastname)) {
@@ -442,7 +511,7 @@
return 'User state is not set!';
if (this.isEmptyString(user.locale))
return 'Locale is not set!';
- if (this.selectedRoles.length == 0)
+ if (this.selectedRoles.length === 0)
return 'No role selected!';
return '';
@@ -460,7 +529,7 @@
var i = 0;
for (; i < this.user.properties.length; i++) {
- if (this.user.properties[i].key == property.key) {
+ if (this.user.properties[i].key === property.key) {
this.user.properties.splice(i, 1);
this.notifySplices('user.properties', [
{
@@ -503,7 +572,7 @@
var role = this.roles[i];
for (var j = 0; j < this.user.roles.length; j++) {
var r = this.user.roles[j];
- if (role.name == r)
+ if (role.name === r)
selectedRoles.push(i);
}
}