Sessions page Client ID is not displayed
Redfish added support for the Context parameter on the session resource
This parameter has the same function that the "OemSession.ClientId"
field served. And BMC Web moves all the existing ClientId code to
produce Context. This patch set contains the code changes for adding a
new column "Context" in the sessions page and modifying the existing
column "Client ID" to "Session ID" and mapping the redfish property
"Id" to it.
The property "Context" is optional in redfish. If the Context holds any
value it will display in WebUI as it is. If it is not having any value,
"-" will be displayed in the WebUI.
Change-Id: Ibc99416fc37a91029bf430ccc7b387832eef729c
Signed-off-by: Kirankumar Ballapalli <kirankumarb@ami.com>
diff --git a/src/locales/en-US.json b/src/locales/en-US.json
index d3ea2ee..4e9b5f5 100644
--- a/src/locales/en-US.json
+++ b/src/locales/en-US.json
@@ -180,7 +180,8 @@
"disconnectMessage": "Are you sure you want to disconnect %{count} session? This action cannot be undone. | Are you sure you want to disconnect %{count} sessions? This action cannot be undone."
},
"table": {
- "clientID": "Client ID",
+ "sessionID": "Session ID",
+ "context": "Context",
"username": "Username",
"ipAddress": "IP address",
"searchSessions": "Search sessions"
diff --git a/src/locales/ru-RU.json b/src/locales/ru-RU.json
index 9e0debe..9a817ab 100644
--- a/src/locales/ru-RU.json
+++ b/src/locales/ru-RU.json
@@ -180,7 +180,8 @@
"disconnectMessage": "Вы уверены что хотите отключить %{count} сессию? Действие не может быть отменено. | Вы уверены что хотите отключить все %{count} сессии? Действие не может быть отменено."
},
"table": {
- "clientID": "Идентификатор клиента",
+ "sessionID": "идентификатор сессии",
+ "context": "контекст",
"username": "Имя пользователя",
"ipAddress": "IP адрес",
"searchSessions": "Поиск сессий"
diff --git a/src/store/modules/SecurityAndAccess/SessionsStore.js b/src/store/modules/SecurityAndAccess/SessionsStore.js
index 54607ab..0349c8b 100644
--- a/src/store/modules/SecurityAndAccess/SessionsStore.js
+++ b/src/store/modules/SecurityAndAccess/SessionsStore.js
@@ -26,7 +26,10 @@
.then((sessionUris) => {
const allConnectionsData = sessionUris.map((sessionUri) => {
return {
- clientID: sessionUri.data?.Oem?.OpenBMC.ClientID,
+ sessionID: sessionUri.data?.Id,
+ context: sessionUri.data?.Context
+ ? sessionUri.data?.Context
+ : '-',
username: sessionUri.data?.UserName,
ipAddress: sessionUri.data?.ClientOriginIPAddress,
uri: sessionUri.data['@odata.id'],
diff --git a/src/views/SecurityAndAccess/Sessions/Sessions.vue b/src/views/SecurityAndAccess/Sessions/Sessions.vue
index 07ee725..d875284 100644
--- a/src/views/SecurityAndAccess/Sessions/Sessions.vue
+++ b/src/views/SecurityAndAccess/Sessions/Sessions.vue
@@ -35,7 +35,7 @@
no-select-on-click
hover
show-empty
- sort-by="clientID"
+ sort-by="sessionID"
:busy="isBusy"
:fields="fields"
:items="allConnections"
@@ -163,22 +163,32 @@
fields: [
{
key: 'checkbox',
+ class: 'text-center',
},
{
- key: 'clientID',
- label: this.$t('pageSessions.table.clientID'),
+ key: 'sessionID',
+ label: this.$t('pageSessions.table.sessionID'),
+ class: 'text-center',
+ },
+ {
+ key: 'context',
+ label: this.$t('pageSessions.table.context'),
+ class: 'text-center',
},
{
key: 'username',
label: this.$t('pageSessions.table.username'),
+ class: 'text-center',
},
{
key: 'ipAddress',
label: this.$t('pageSessions.table.ipAddress'),
+ class: 'text-center',
},
{
key: 'actions',
label: '',
+ class: 'text-center',
},
],
batchActions: [