Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forwardport release 1.1 into 1.2 #480

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -18,7 +18,7 @@

import React, { useCallback, useEffect, useState } from 'react';
import { Badge, Card } from 'react-bootstrap';
import _ from 'lodash';

Check warning on line 21 in src/DeviceStatusPage/DeviceLiveEventsCard.tsx

View workflow job for this annotation

GitHub Actions / Run code quality and funcionality tests

'_' is defined but never used

import AstarteClient, {
AstarteDeviceEvent,
Expand Down Expand Up @@ -70,8 +70,8 @@

const connectionTriggerPayload = {
name: `connectiontrigger-${deviceId}`,
device_id: deviceId,

Check warning on line 73 in src/DeviceStatusPage/DeviceLiveEventsCard.tsx

View workflow job for this annotation

GitHub Actions / Run code quality and funcionality tests

Identifier 'device_id' is not in camel case
simple_trigger: {

Check warning on line 74 in src/DeviceStatusPage/DeviceLiveEventsCard.tsx

View workflow job for this annotation

GitHub Actions / Run code quality and funcionality tests

Identifier 'simple_trigger' is not in camel case
type: 'device_trigger',
on: 'device_connected',
device_id: deviceId,
Expand Down Expand Up @@ -242,9 +242,7 @@
</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
Loading