-
Notifications
You must be signed in to change notification settings - Fork 310
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
Events Widget Component #557
Conversation
In the "Latest Data" you show events for both How are events rendered if they contain more than one identifier? For example, if an OAuth token exchange event contains the identifiers of both the User ID and the Client ID. |
This is only for presentation purposes and wont be the case in the console. For this PR events are hardcoded.
The first matching id will be shown, see https://github.com/TheThingsNetwork/lorawan-stack/blob/73b10e22e05aff82749d3a392949f606b0fc4b55/pkg/webui/lib/selectors/id.js#L49-L58 |
73b10e2
to
8abebd7
Compare
display: flex | ||
align-items: center | ||
flex-wrap: nowrap | ||
font-family: 'IBM Plex Mono', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
font-family: 'IBM Plex Mono', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace | |
font-family: $font-family-mono |
import style from './widget.styl' | ||
|
||
const m = defineMessages({ | ||
lastActivity: 'Last network activity', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lastActivity: 'Last network activity', | |
lastActivity: 'Latest events', |
Although it says so in the screen design, network activity is misleading when we also show crud events.
align-items: center | ||
flex-wrap: nowrap | ||
font-family: 'IBM Plex Mono', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
font-size: $fs.s |
|
||
&-icon | ||
margin-right: $cs.xs | ||
nudge('up', 2px) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nudge('up', 2px) | |
font-size: 1.1rem | |
nudge('up', 1px) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also make sure that icons are $c-icon-fill
if no other color is set.
size="small" | ||
items={events} | ||
renderItem={this.renderEvent} | ||
emptyMessage={m.noEvents} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The empty message needs a special styling to be $tc-subtle-gray
/> | ||
<Link to={toAllUrl}> | ||
<Message content={m.seeAllActivity} /> | ||
<Icon icon="arrow_forward" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Icon icon="arrow_forward" /> | |
→ |
Use the →
character rather.
// limitations under the License. | ||
|
||
.widget | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant new line
background-color: $c-active-blue | ||
|
||
&:after | ||
animation: goodPulse 2s infinite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The animation is actually thought to pulse whenever an event arrives. It can then also be a little more noticeable. Obviously not MVP critical, so don't do this.
const m = defineMessages({ | ||
lastActivity: 'Last network activity', | ||
seeAllActivity: 'See all activity', | ||
noEvents: 'No events emitted by {entityId}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noEvents: 'No events emitted by {entityId}', | |
noEvents: '{entityId} has not sent any events recently', |
value={time} | ||
date={false} | ||
/> | ||
<span className={style.eventEmitter}>{emitter}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think about size limiting these. text-overflow: ellipsis
8abebd7
to
01128d1
Compare
|
||
import Link from '../../link' | ||
import Message from '../../../lib/components/message' | ||
import Icon from '../../icon' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
import Icon from '../../icon' |
→ | ||
</Link> | ||
</div> | ||
<List |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Atm, the list will keep growing when list items overflow. It should rather have a fixed height and use overflow: hidden
(and possibly also limit the number of items rendered, accordingly).
4e951bc
to
8d3730b
Compare
8d3730b
to
97885ff
Compare
Summary:
This PR adds the
<Events.Widget />
component to the console as well as some groundwork for the entity events pages.References #28 and #553
Changes:
<Events />
(currently as a stub) and<Events.Widget />
components.<List />
component<Event />
component of different types<Status />
componentcc @htdvisser