Skip to content

Commit

Permalink
deploy: 2237a42
Browse files Browse the repository at this point in the history
  • Loading branch information
thjaeckle committed Dec 18, 2023
1 parent 83cf22a commit a1e1f0e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions modules/things/messagesIncoming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ function onMessage(messageData) {
messages.push(messageData);
dom.badgeMessageIncomingCount.textContent = messages.length;

function getColumnValues(): string[] {
if (messageData['_context'] && messageData['_context'].value) {
function getColumnValues(action: string): string[] {
if (action === 'deleted') {
return []
} else if (messageData['_context']?.value) {
return [
...messageData['_context'].value.features ? Object.keys(messageData['_context'].value.features) : [],
...messageData['_context'].value.attributes ? Object.keys(messageData['_context'].value.attributes) : [],
Expand All @@ -125,12 +127,13 @@ function onMessage(messageData) {
}
}

let action = messageData['_context'].topic.substring(messageData['_context'].topic.lastIndexOf('/') + 1);
Utils.addTableRow(
dom.tbodyMessagesIncoming,
messageData._revision, false, null,
messageData['_context'].topic.substring(messageData['_context'].topic.lastIndexOf('/') + 1),
action,
messageData['_context'].path,
getColumnValues().join('\n'),
getColumnValues(action).join('\n'),
Utils.formatDate(messageData._modified, true)
);
}
Expand Down

0 comments on commit a1e1f0e

Please sign in to comment.