-
Notifications
You must be signed in to change notification settings - Fork 237
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
Feature: Notification system #1766
Merged
k9ert
merged 403 commits into
cryptoadvance:master
from
relativisticelectron:20220616_notification_system
Jan 31, 2023
Merged
Changes from all commits
Commits
Show all changes
403 commits
Select commit
Hold shift + click to select a range
87da0d7
added websocket reconnect javascript
relativisticelectron 3e740d3
timeout fix
relativisticelectron 77752d8
FIXED server timout issue
relativisticelectron 5de1e35
working port config
relativisticelectron e732f04
added websockets
relativisticelectron 8381877
fixed cypress test
relativisticelectron ab71c85
graceful exit, but client is slow
relativisticelectron 9229214
fast shutdown
relativisticelectron f76639b
Switch to other port, if this one is blocked
relativisticelectron 06cc9f4
better error handling
relativisticelectron daee7a8
Merge branch '20220703_websockets' into 20220616_notification_system
relativisticelectron 71815ae
undid the port retrying
relativisticelectron cf38f78
Merge branch '20220703_websockets' into 20220616_notification_system
relativisticelectron 88dd2be
trying CI with different port for websockets
relativisticelectron ebf452a
Merge branch '20220703_websockets' into 20220616_notification_system
relativisticelectron 9f2cce3
added getting port from ENV
relativisticelectron 883fe97
test CI with longer wait time for cypress
relativisticelectron 6013ce1
Merge branch '20220703_websockets' into 20220616_notification_system
relativisticelectron 090bb1e
reset wait time to 1000
relativisticelectron dde8bd3
Merge branch '20220703_websockets' into 20220616_notification_system
relativisticelectron 42585f9
test fix
relativisticelectron 608fe31
Merge branch '20220703_websockets' into 20220616_notification_system
relativisticelectron ecad4db
doc
relativisticelectron da546c8
Bugfix: Flash cannot be called without a context.
relativisticelectron a78ecdf
Merge branch '20220703_websockets' into 20220616_notification_system
relativisticelectron 16f7d92
restore feature that the WebAPI permission is updated
relativisticelectron 45c62ec
Merge branch '20220703_websockets' into 20220616_notification_system
relativisticelectron 135d58d
js formatting
relativisticelectron 9ac7861
doc and reshuffling methods
relativisticelectron 32ae2dd
localhost fix for cypress
relativisticelectron b9da0be
fixed bug that i introduced recently.
relativisticelectron 71cdf22
doc
relativisticelectron 2fc1010
refactoring
relativisticelectron a997f5a
refactoring
relativisticelectron b616cce
fix bug and refactoring
relativisticelectron 0e0e734
removed use_reloader=false
relativisticelectron a992739
made the CreateNotification more robust
relativisticelectron d24735f
better log
relativisticelectron b914f29
bug fix
relativisticelectron da35a16
pytest fix
relativisticelectron df9f84c
bug fix
relativisticelectron 870cb1e
pytest works... but ugly
relativisticelectron 1485057
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron 800dfc6
do not start the websockets server in the tests
relativisticelectron 765d621
Introducing SPECTER_WEBSOCKET_ACTIVE
relativisticelectron 9a9ae30
fix for incomplete SPECTER_WEBSOCKET_ACTIVE
relativisticelectron 0385380
fix for incomplete SPECTER_WEBSOCKET_ACTIVE
relativisticelectron 4007287
working websockets server shutdown when main thread dies
relativisticelectron 90cd49b
Merge branch 'master' into 20220616_notification_system
relativisticelectron 2a0e48c
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron d471be3
doc
relativisticelectron 80d2ff9
Merge branch 'master' into 20220616_notification_system
relativisticelectron d71d674
camelCase for js
relativisticelectron ef14ff2
better naming
relativisticelectron 5150e5e
ssl working for python client and server, but not javascript
relativisticelectron be6a3b4
minimal working example for self-signed ssl
relativisticelectron b6f9ac0
working minimal echo server in specter
relativisticelectron aeb2e8d
working user recognition
relativisticelectron 806ce67
working websocket server. The client shows an ssl error
relativisticelectron f14f618
added ssl_context, but doesn't work yet
relativisticelectron cd8aa1d
no error... not tested yet
relativisticelectron 9b400b4
working
relativisticelectron 363bd19
working, but not in js yet
relativisticelectron 1e504e9
almost working!!!
relativisticelectron b5f1005
client is not working
relativisticelectron c9850fb
still cannot get a 1 server to many clients working
relativisticelectron 276f89a
minimal client example
relativisticelectron e824434
working minimal exaple to send to all connected clients
relativisticelectron 982d146
working (at first, but then disconnecting)
relativisticelectron 9c5c9db
working. but cient needs some simplifications
relativisticelectron afc00d3
working great!!!
relativisticelectron 272aec6
fix closing connection handling
relativisticelectron 26dc848
also for non ssl working
relativisticelectron 4beace3
doc and requirements
relativisticelectron d655105
better config
relativisticelectron d6f4d0d
fix for multiple connections of 1 user
relativisticelectron bcc03d5
imports
relativisticelectron eb0addb
doc
relativisticelectron 05d8cae
better logging
relativisticelectron 57fe201
Merge remote-tracking branch 'cryptoadvance/master' into 202207723_si…
relativisticelectron 5f50da6
Merge branch '202207723_simple_websocket' into 20220616_notification_…
relativisticelectron 2626f39
added endpoint to test
relativisticelectron 4af5e53
Merge branch '202207723_simple_websocket' into 20220616_notification_…
relativisticelectron 88d3319
cleanup
relativisticelectron d0ee5e2
added a possibility to quit websocket connections via a special command.
relativisticelectron df996de
Merge branch '202207723_simple_websocket' into 20220616_notification_…
relativisticelectron 8cc0134
fix error message
relativisticelectron 007e9fa
Merge branch '202207723_simple_websocket' into 20220616_notification_…
relativisticelectron 114653d
doc
relativisticelectron 1513060
Merge branch '202207723_simple_websocket' into 20220616_notification_…
relativisticelectron 262a91c
Merge branch 'master' into 20220616_notification_system
relativisticelectron 99bdbcd
refactoring
relativisticelectron 487a604
remove old code
relativisticelectron f6ee846
undo
relativisticelectron 3ce4936
Docs: Add mobile access question to the FAQ (#1829)
moneymanolis d3aa53d
starting pytest
relativisticelectron f78f544
better descriptions
relativisticelectron c66dac0
more notification arguments
relativisticelectron 48fb2b2
added pytest
relativisticelectron 4b9d085
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron 486a528
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron e7e469a
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron 7a39a36
move notifications.js such that it is always available
relativisticelectron c3b4b39
fix css issue
relativisticelectron a8c8f44
A test-page in the devhelper extension
k9ert c970e5f
defaults that shows a message without changing values
relativisticelectron 9a40294
doc and rename: clarifying point about the flask flash
relativisticelectron 5eb1f53
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron cac9351
improved logging formatting
relativisticelectron 57b55b7
js_message_box reflects noy the notification_type
relativisticelectron fc831bd
doc
relativisticelectron 950cc4f
doc
relativisticelectron 7b829a0
fix pytest
relativisticelectron df7d9ee
Merge branch 'master' into 20220616_notification_system
relativisticelectron bb15384
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron 2449e80
doc and use get instead of []
relativisticelectron 1364cbc
redirect flash call
k9ert c204691
Merge branch 'master' into flash_refactoring
k9ert fde650b
Merge branch 'master' into menu_extensions
k9ert 71e02b7
feature now complete
k9ert f71f0d5
documentation
k9ert 1856bf6
rename callback
k9ert 3fdbfac
Adding add_wallettab
k9ert 0e9631e
Merge branch 'master' into menu_extensions
k9ert 930bb11
moving to server_endpoints
k9ert cdc0edd
proper removal
k9ert 19530fd
Merge branch 'master' into flash_refactoring
k9ert 09e4ee0
Merge branch 'master' into 20220616_notification_system
k9ert a78a516
Merge branch '20220616_notification_system' of github.com:relativisti…
k9ert 38fd496
refactor robust_json_dumps import
k9ert b98b120
forgot one reference of robust_json_dumps
k9ert 46fd940
remove unintended changes
k9ert fcf7326
Merge branch 'master' into flash_refactoring
moneymanolis f15dc42
import fixes and polishing
k9ert 6c53bb2
Merge branch 'flash_refactoring' of github.com:k9ert/specter-desktop …
k9ert b49c098
docs revised
moneymanolis f362ace
Merge remote-tracking branch 'k9ert/menu_extensions' into 20220916_no…
relativisticelectron b482fd5
Merge remote-tracking branch 'k9ert/flash_refactoring' into 20220916_…
relativisticelectron a598f6b
working notifications
relativisticelectron 6150d23
working
relativisticelectron 87e28dc
not working yet.... somehow sending to the server doesn't work.
relativisticelectron 61172d7
working
relativisticelectron 3f1e79f
added TODO
relativisticelectron 68aea9e
redirect flash
relativisticelectron 54dc449
fix for flash
relativisticelectron 681358b
implemented callbacks
relativisticelectron d945862
invisible in sidebar and enabled by default
relativisticelectron 7f683f3
added logo
relativisticelectron 24747f1
adding wallet_alias and docs
k9ert 9c1f016
Merge branch 'menu_extensions' of github.com:k9ert/specter-desktop in…
k9ert 5570487
pictures for the docs
k9ert e5b1530
added import
k9ert c388e9f
Merge branch 'master' into menu_extensions
k9ert 9547f89
Merge branch 'master' into menu_extensions
k9ert 892e954
Merge branch 'master' into menu_extensions
k9ert 747b8ab
Merge branch 'menu_extensions' of github.com:k9ert/specter-desktop in…
k9ert 9804aae
Merge remote-tracking branch 'cryptoadvance/master' into 20220916_not…
relativisticelectron 5d7b69a
Merge remote-tracking branch 'k9ert/menu_extensions' into 20220916_no…
relativisticelectron e1dcaac
forgotten change
k9ert 1c4ca08
Merge branch '20220916_notification_extension' into 20220616_notifica…
relativisticelectron 7ac33b8
pytest fix
relativisticelectron 51acbbc
forgotten part 2
k9ert d2ca3ae
add HOST to config and fix pytest
relativisticelectron 29329be
examples in settings and wallet menu
moneymanolis 2083ce0
app is not required in callback_after_serverpy_init_app
relativisticelectron 8666666
better error logging
relativisticelectron aff8b58
fix: better error logging
relativisticelectron 20686ad
fix: include
relativisticelectron d329b82
Removing Werkzeug Request logs for Cypress
k9ert 41f0125
Merge branch 'menu_extensions' of github.com:k9ert/specter-desktop in…
k9ert 5058fa7
selectWallet twice to fix weird issues
k9ert 0fa1fa8
Merge remote-tracking branch 'k9ert/menu_extensions' into 20220616_no…
relativisticelectron d2a2493
explicitly returing None if no user found
relativisticelectron 7ea2762
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron 4242331
better structuring in server function
relativisticelectron d7a64ee
reset lots of flash changes
relativisticelectron 5032353
add timeout for websocket server connections
relativisticelectron 5c7a7e9
reset helpers.py
relativisticelectron bc72ab9
added connection_report
relativisticelectron 27b0539
better default services in user.py
relativisticelectron 80075c9
tiny cleanup
relativisticelectron 6f1f8cf
avoid slow_request_detection_stop
relativisticelectron 7c5d0bc
move css
relativisticelectron 5930358
typo
relativisticelectron acba2fa
callback_cleanup_on_exit
relativisticelectron bae090d
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron 9125fbe
move also css colors to service
relativisticelectron 2eb3b35
upgrade simple_websocket got rid of ssl error on close connection
relativisticelectron 22fd26e
fix tests
k9ert ecf5da0
better default loading of notifications
relativisticelectron e8ec387
fix bug
relativisticelectron 514401b
better callback_cleanup_on_exit
relativisticelectron 2de3e1e
deleted files
relativisticelectron 3fb7b86
fix 1 pytest
relativisticelectron b968828
removed example code
relativisticelectron 7046d75
cleaned up js logic for the initial connection
relativisticelectron 7b16578
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron 9ffaa84
moved sendRequest
relativisticelectron 7c43706
doc
relativisticelectron e01b9ed
doc
relativisticelectron 7b0ef55
increase ping/timeout interval, because the websocket connection clos…
relativisticelectron 04cca9c
increase migration count
relativisticelectron 6dbd0f1
renaming
relativisticelectron 4e051d7
Merge branch 'master' into 20220616_notification_system
relativisticelectron 1985baf
changed order of notifications cypress test
relativisticelectron 370e1d5
disable the websockets during all pytest
relativisticelectron 3f2dd38
reenable websockets for cypress
relativisticelectron c7cd147
fix bug
relativisticelectron 7aa4882
Merge branch '20221003_wrong_service_config' into 20220616_notificati…
relativisticelectron ccee38f
pytest debugging ONLY. Have to rollback
relativisticelectron 361eb04
Revert "pytest debugging ONLY. Have to rollback"
relativisticelectron 07f3aaa
info output for pytest debugging
relativisticelectron 10773d7
pytest experiment... Can be rolled back.
relativisticelectron ab2ad8e
Revert "info output for pytest debugging"
relativisticelectron 3c64660
fix
relativisticelectron 18ec3d8
Merge branch '20221003_wrong_service_config' into 20220616_notificati…
relativisticelectron 95528f8
added view_functions comment
relativisticelectron 640b727
trying to fix flaky cpyress
relativisticelectron cf1ccca
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron be37033
fix for hardcoded url
relativisticelectron e2de832
added auto-reconnection on request failiure
relativisticelectron 8d319a9
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron 9df5e4e
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron 314c282
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron e53eeb9
remove user_secret_decrypted_required
relativisticelectron df3b90b
remove user_secret_decrypted_required
relativisticelectron e63d9a4
Removed verbose logging unless logging level < 10
relativisticelectron e4ff87f
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron 8148de7
remove verbose_debug from notification.id
relativisticelectron 1a4bd46
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron 0806418
fix
relativisticelectron 5555ed9
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron 569dfb7
fix pytest
relativisticelectron 9df15d9
fix non-working migration
relativisticelectron 08231bd
set devstatus_alpha and opt-in
relativisticelectron b2009da
delete cypress test and remove migration from pytest
relativisticelectron ef8dc7d
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron 6958242
len(classlist) seems to differ in CI and locally
relativisticelectron 0fa5db4
remove useless code
relativisticelectron 7f3bd1f
Merge branch 'master' into 20220616_notification_system
k9ert bf03c32
Merge branch 'master' into 20220616_notification_system
k9ert 0d69ae8
done https://github.com/cryptoadvance/specter-desktop/pull/1766#discu…
relativisticelectron bac4422
moved service_manager_cleanup_on_exit
relativisticelectron e7dff40
added comment
relativisticelectron 7040326
attempt to fix https://github.com/cryptoadvance/specter-desktop/pull/…
relativisticelectron 4cec1f4
Merge branch 'master' into 20220616_notification_system
k9ert 1f05655
Merge branch 'master' into 20220616_notification_system
k9ert a75d44f
Merge remote-tracking branch 'cryptoadvance/master' into 20220616_not…
relativisticelectron d77efed
pytest works. Was a variation in requirements.txt
relativisticelectron 5aa0008
Merge branch 'master' into 20220616_notification_system
k9ert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
from flask import flash as flask_flash | ||
from flask import current_app as app | ||
from ..services import callbacks | ||
|
||
|
||
def flash(*args, **kwargs): | ||
"""An indirection in order to potentially handle a flash differently | ||
This function could be placed in util but as it might | ||
use the service_manager, we place it here for now. | ||
""" | ||
flask_flash(*args, **kwargs) | ||
|
||
return_values = app.specter.service_manager.execute_ext_callbacks( | ||
callbacks.flash, *args, **kwargs | ||
) | ||
|
||
# if no extension handled the callback | ||
if not return_values: | ||
flask_flash(*args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can't we move that to the config of the extension?
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.
I need the
app.config["HOST"]
in the notification extension. Adding it to the global BaseConfig, does make it consistent withPORT
. And if anotherHOST
value if given for the server then the config value is updated here https://github.com/relativisticelectron/specter-desktop/blob/bf03c3236958c49405b7d56c71e0b6ab67c9f5e4/src/cryptoadvance/specter/cli/cli_server.py#L127I don't really see how to move this to the service.