-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve logging system in terminal and UI (#540)
* refactor: id to hash * refactor: db migration, generate tx hashes * refactor: adapt frontend for hashes (ui, sorting, indexeddb, mappings, etc) * fix: omitted ids to be replaced by hash * fix: make hash column unique * fix: delete broken migration file * fix: add safe migration * fix: add tx at top of the list by default * refactor: extract get hash method * fix: update some method namings and cleanup * refactor: cleanup comments * fix: formatting * refactor: cleanup migration * refactor: add todo * refactor: cleanup comments * refactor: better migration * fix: button clickable area bug * fix: make migration subsequent of tx value migration, add primary key constraints * fix: improve migration * test: update integration test with hashes * refactor: add some description to the db migration file, cleanup print statement * test: update get tx by hash unit test * refactor: remove id property from type interface * refactor: cleanup comments * fix: remove duplicated property due to merge * fix: missing hash key reference * fix: don't pass data when None * fix: update expected test tx structure with hash * fix: print execution logs in the backend terminal * refactor: remove unused endpoint * feat: improve logging system * feat: basic filtering system * feat: search filter * fix: move migration description * fix: limit tx hashes to 66 chars in db * fix: remove unused import * add foreign key constraint to tx hash in tx audits table * add hash logic to migration * fix: foreign key definition * Revert "add hash logic to migration" This reverts commit f0a502a. * fix: implement hash in migration, fix constraints * fix: remove unecessary safety check * fix: dexie migration: populate hashes and remove id columns * fix: move revision head * fix: print execution logs in the backend terminal * feat: improve logging system * feat: basic filtering system * feat: search filter * fix: contract deployed notification when deployment failed * all events ok but bug on get data * improve messages, add some todos an clean up * improve messages, add category isolation * improve ui * filters ui * go back to separated filter ui * clear search text on reset * tweak ui * filter by tx hash, clear search text, cleanup * tweak status colors * search in data as well * implement loguru and improve terminal logs * add contract deployed event * cleanup, fix tutorial * remove unused logic in the tutorial * cleanup and update integration tests * cleanup * cleanup error handling and message sending in genvm * cleanup and move types to separate file * cleanup, tweak colors * cleanup * cleanup imports * fix merge * move tx status update logs to consensus * improve logging and error handling in genvm * improve consensus events * use success for contract deployment * refactor stdout printing and bypass terminal * commit forgotten changes, update blue for info logs * cleanup merge conflicts * cleanup merge * don't split lines on outputs * display line breaks in logs * allow passing self in get_contract_data to allow logging again * prefix private methods with _ * remove useless renaming * Revert "remove useless renaming" This reverts commit 3f91465. * add mock msg handlers * avoid updating tx status twice, fixing unit tests * revert commit * add client_id to log events * add client id to rpc requests * handle client session ids in the backend Signed-off-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com> * fix: wait for connection Signed-off-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com> * format Signed-off-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com> * fix compile error Signed-off-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com> * fix e2e tests Signed-off-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com> * address comment Signed-off-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com> --------- Signed-off-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com> Co-authored-by: Den <den@Deniss-MacBook-Pro.local> Co-authored-by: Den <den@deniss-mbp.home> Co-authored-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com>
- Loading branch information
1 parent
6a6b70a
commit beeac5c
Showing
24 changed files
with
745 additions
and
415 deletions.
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
34 changes: 34 additions & 0 deletions
34
...database_handler/migration/versions/a32f85df2806_add_client_session_id_to_transactions.py
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"""add client session id to transactions | ||
Revision ID: a32f85df2806 | ||
Revises: 3566595124f6 | ||
Create Date: 2024-10-01 12:09:19.995482 | ||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "a32f85df2806" | ||
down_revision: Union[str, None] = "3566595124f6" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"transactions", | ||
sa.Column("client_session_id", sa.String(length=255), nullable=True), | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column("transactions", "client_session_id") | ||
# ### end Alembic commands ### |
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
Oops, something went wrong.