Add all messages list to ServicePulse#2275
Conversation
johnsimons
left a comment
There was a problem hiding this comment.
Nothing major, just a few comments that can be looked at in subsequent PRs
| <div> | ||
| <OnOffSwitch :id="id" @toggle="toggleRefresh" :value="autoRefresh" /> | ||
| </div> | ||
| <input type="number" v-model="refreshTimeout" min="1" max="600" v-on:change="updateTimeout" /> | ||
| <span class="unit">s</span> |
There was a problem hiding this comment.
Could a dropdown with pre-set refresh ratings including zero be better option?
There was a problem hiding this comment.
this works, and looks fine...
| <i class="fa fa-lg fa-refresh" /> | ||
| </button> | ||
| <span>|</span> | ||
| <label>Auto-Refresh:</label> |
There was a problem hiding this comment.
It would be nice to have some kind of visual indication that we are fetching new data - https://fontawesome.com/icons/spinner?f=classic&s=solid
| alias?: string; | ||
| redirect?: string; | ||
| title: string; | ||
| component: RouteComponent | (() => Promise<RouteComponent>); |
There was a problem hiding this comment.
it may be better to introduce a new type, e.g:
export interface RedirectRouteItem {
path: string;
title: string;
}
There was a problem hiding this comment.
this type reflects what VueRouter expects
|
|
||
| const dataRetriever = useAutoRefresh(async () => { | ||
| try { | ||
| const [response, data] = await useTypedFetchFromServiceControl<Message[]>( |
There was a problem hiding this comment.
It may be good to introduce a typed client.
There was a problem hiding this comment.
i don't understand what you mean
| function friendlyTypeName(messageType: string) { | ||
| if (messageType == null) return null; | ||
|
|
||
| const typeClass = messageType.split(",")[0]; | ||
| const typeName = typeClass.split(".").reverse()[0]; | ||
| return typeName.replace(/\+/g, "."); | ||
| } |
There was a problem hiding this comment.
This can be problematic, it may be worth adding a card to the board.
There was a problem hiding this comment.
In other places, we show the whole type name
There was a problem hiding this comment.
I was thinking that it may also make sense to save in local storage the current setting, so it won't reset
|
|
||
| <template> | ||
| <div class="refresh-config"> | ||
| <button class="fa" title="refresh" @click="() => emit('manualRefresh')"> |
There was a problem hiding this comment.
| <button class="fa" title="refresh" @click="() => emit('manualRefresh')"> | |
| <button class="btn btn-secondary btn-sm" title="refresh" @click="() => emit('manualRefresh')"> |
There was a problem hiding this comment.
why? I don't want this to look like other buttons in the system
There was a problem hiding this comment.
Why should this button be different?
There was a problem hiding this comment.
because of the layout
Co-authored-by: John Simons <john.simons@particular.net>
# Conflicts: # src/Frontend/src/components/failedmessages/MessageRedirectForBackwardsCompatibility.vue
In this PR