-
Notifications
You must be signed in to change notification settings - Fork 9
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
#346 | Refresh every APP state after save event #357
Conversation
CONFIG_LOADED: () => ({ | ||
type: 'info', | ||
message: 'Config Loaded', | ||
duration: 3000 |
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.
Cogboard will now display a message each time a new config is loaded in the background.
export const saveDataStart = () => ({ | ||
type: SAVE_DATA_START | ||
}); |
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.
not used
dispatch(saveDataSuccess()); | ||
dispatch(refetchInitData()); |
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.
on SAVE event success - fetch config again
const val STATUS_CODE_401 = 401 | ||
const val STATUS_CODE_200 = 200 | ||
const val PROP_ID = "id" | ||
const val PROP_EVENT_TYPE = "eventType" | ||
const val PROP_BOARDS = "boards" | ||
const val PROP_BOARDS_BY_ID = "boardsById" | ||
const val PROP_BOARDS_ALL = "allBoards" |
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.
Moved to separate objects...
@@ -9,26 +11,23 @@ import io.vertx.core.logging.LoggerFactory | |||
class ConfirmationSender(private val vertx: Vertx) { | |||
|
|||
fun sendOk() { | |||
vertx.eventBus().send(CogboardConstants.EVENT_SEND_MESSAGE_TO_WEBSOCKET, | |||
JsonObject().message(OK_MESSAGE)) | |||
vertx.eventBus().send(Event.SEND_MESSAGE_TO_WEBSOCKET, JsonObject().message(OK_MESSAGE)) | |||
} | |||
|
|||
fun sendError(body: JsonObject) { |
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.
Is this method used somewhere?
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.
No it is not i will delete
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.
great job @szymon-owczarzak! the constants have become more readable :)
Description
More details in related issue: #346
Types of changes
Checklist:
I hereby agree to the terms of the Cogboard Contributor License Agreement.