Skip to content

Commit

Permalink
Merge pull request #480 from Pavinati/forwardport-release-1.1-into-1.2
Browse files Browse the repository at this point in the history
Forwardport release 1.1 into 1.2
  • Loading branch information
davidebriani authored Nov 7, 2024
2 parents ce1ecf5 + 4d9f924 commit 3bfd2c2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Avoid querying Astarte for trigger delivery policies when Astarte does not support them ([#459](https://github.com/astarte-platform/astarte-dashboard/issues/459)).
- Simplified floating point values for specifying `known_value` in "incoming data" triggers.
([#465](https://github.com/astarte-platform/astarte-dashboard/issues/465))
- Show falsey values in the DeviceLiveEventCard by `JSON.stringify` all values and not only objects.
- Resolved an issue where the search filter term was appended to the device ID and alias fields in the device list.

## [1.1.1] - 2023-11-15
### Added
Expand Down
4 changes: 1 addition & 3 deletions src/DeviceStatusPage/DeviceLiveEventsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,7 @@ const astarteDeviceEventBody = (event: AstarteDeviceEvent) => {
</Badge>
<span className="me-2">{event.interfaceName}</span>
<span className="me-2">{event.path}</span>
<span className="me-2 font-monospace">
{_.isObject(event.value) ? JSON.stringify(event.value) : event.value}
</span>
<span className="mr-2 font-monospace">{JSON.stringify(event.value)}</span>
</>
);
}
Expand Down
17 changes: 8 additions & 9 deletions src/ui/CheckableDeviceTable.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
This file is part of Astarte.
Copyright 2020 Ispirata Srl
Copyright 2024 SECO Mind Srl
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,15 +32,14 @@ const Highlight = ({ text, word }: HighlightProps): React.ReactElement => {

return (
<>
{text.split(word).reduce(
(prev: React.ReactElement[], current, index) => [
...prev,
{text.split(new RegExp(`(${word})`, 'gi')).map((part, index) =>
part.toLowerCase() === word?.toLowerCase() ? (
<span key={index} className="bg-warning text-dark">
{word}
</span>,
<span>{current}</span>,
],
[],
{part}
</span>
) : (
<span key={index}>{part}</span>
),
)}
</>
);
Expand Down

0 comments on commit 3bfd2c2

Please sign in to comment.