Class peagen.tui.app.QueueDashboardApp
peagen.tui.app.QueueDashboardApp
QueueDashboardApp(gateway_url='http://localhost:8000')
Bases: App
Source code in peagen/tui/app.py
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
|
CSS
class-attribute
instance-attribute
CSS = '\n TabPane#editor { height: 1fr; width: 1fr; }\n TextArea#code_editor { height: 1fr; width: 1fr; }\n\n /* Styles for the filter section to ensure visibility */\n #filter-section-container {\n padding: 0 1; /* Horizontal padding */\n margin-bottom: 1; /* Gap below the entire filter section */\n /* Fixed height: Label (1) + Label\'s padding-bottom (1) + FilterBar (1, assuming compact Selects) */\n height: 3; \n }\n\n #filter-title-label {\n padding-bottom: 1; /* Space between "Filter" title and the FilterBar */\n text-style: bold;\n /* The Label widget itself is typically 1 cell high */\n }\n\n /* Ensure the main TabbedContent (holding Pools, Tasks, etc.) takes up the remaining space */\n /* This targets the TabbedContent that is a direct child of the main Vertical layout container */\n Vertical > TabbedContent {\n height: 1fr; /* Takes up the remaining flexible vertical space */\n }\n '
TITLE
class-attribute
instance-attribute
TITLE = 'Peagen'
BINDINGS
class-attribute
instance-attribute
BINDINGS = [
("1", "switch('pools')", "Pools"),
("2", "switch('tasks')", "Tasks"),
("3", "switch('errors')", "Errors"),
("4", "switch('artifacts')", "Artifacts"),
("5", "switch('templates')", "Templates"),
("ctrl+s", "save_file", "Save"),
("c", "toggle_children", "Collapse"),
("space", "toggle_children", "Collapse"),
("ctrl+c", "copy_selection", "Copy"),
("ctrl+p", "paste_clipboard", "Paste"),
("s", "cycle_sort", "Sort"),
("escape", "clear_filters", "Clear Filters"),
("n", "next_page", "Next Page"),
("p", "prev_page", "Prev Page"),
("l", "set_limit", "Limit"),
("j", "jump_page", "Jump Page"),
("q", "quit", "Quit"),
]
SORT_KEYS
class-attribute
instance-attribute
SORT_KEYS = [
"time",
"pool",
"status",
"action",
"label",
"duration",
"id",
"date_created",
"last_modified",
"error",
]
LIMIT_OPTIONS
class-attribute
instance-attribute
LIMIT_OPTIONS = [10, 20, 50, 100]
COLUMN_LABEL_TO_SORT_KEY
class-attribute
instance-attribute
COLUMN_LABEL_TO_SORT_KEY = {
"ID": "id",
"Pool": "pool",
"Status": "status",
"Action": "action",
"Labels": "label",
"Started": "date_created",
"Finished": "last_modified",
"Duration (s)": "duration",
"Error": "error",
}
queue_len
class-attribute
instance-attribute
queue_len = reactive(0)
done_len
class-attribute
instance-attribute
done_len = reactive(0)
fail_len
class-attribute
instance-attribute
fail_len = reactive(0)
worker_len
class-attribute
instance-attribute
worker_len = reactive(0)
sort_key
instance-attribute
sort_key = 'time'
sort_reverse
instance-attribute
sort_reverse = False
filter_id
instance-attribute
filter_id = None
filter_pool
instance-attribute
filter_pool = None
filter_status
instance-attribute
filter_status = None
filter_action
instance-attribute
filter_action = None
filter_label
instance-attribute
filter_label = None
collapsed
instance-attribute
collapsed = set()
ws_connected
instance-attribute
ws_connected = False
limit
instance-attribute
limit = 50
offset
instance-attribute
offset = 0
on_mount
async
on_mount()
Source code in peagen/tui/app.py
299 300 301 302 303 304 305 306 307 |
|
on_websocket_connection_change
async
on_websocket_connection_change(is_connected, error_msg)
Handle websocket connection status changes.
Source code in peagen/tui/app.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
|
retry_connection
async
retry_connection()
Source code in peagen/tui/app.py
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
|
trigger_data_processing
trigger_data_processing(debounce=True)
Source code in peagen/tui/app.py
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
on_select_changed
async
on_select_changed(event)
Source code in peagen/tui/app.py
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 |
|
on_input_changed
async
on_input_changed(event)
Source code in peagen/tui/app.py
414 415 416 417 418 419 420 421 422 423 424 425 |
|
async_process_and_update_data
async
async_process_and_update_data()
Source code in peagen/tui/app.py
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
|
on_open_url
async
on_open_url(event)
Source code in peagen/tui/app.py
725 726 727 728 729 730 731 732 733 |
|
on_file_tree_file_selected
async
on_file_tree_file_selected(message)
Source code in peagen/tui/app.py
735 736 737 |
|
toast
toast(message, *, style='information', duration=2.0)
Source code in peagen/tui/app.py
739 740 741 742 743 744 745 |
|
compose
compose()
Source code in peagen/tui/app.py
747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 |
|
action_switch
action_switch(tab_id)
Source code in peagen/tui/app.py
799 800 801 802 803 804 805 806 807 |
|
action_save_file
action_save_file()
Source code in peagen/tui/app.py
809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 |
|
action_toggle_children
action_toggle_children()
Source code in peagen/tui/app.py
841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 |
|
action_cycle_sort
action_cycle_sort()
Source code in peagen/tui/app.py
863 864 865 866 867 868 869 870 871 |
|
action_filter_by_cell
action_filter_by_cell()
Source code in peagen/tui/app.py
873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 |
|
action_clear_filters
action_clear_filters()
Source code in peagen/tui/app.py
940 941 942 943 944 945 946 947 948 |
|
action_copy_selection
action_copy_selection()
Copy highlighted or focused text to the clipboard.
Source code in peagen/tui/app.py
950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 |
|
action_paste_clipboard
action_paste_clipboard()
Source code in peagen/tui/app.py
995 996 997 998 999 1000 1001 1002 1003 |
|
action_next_page
action_next_page()
Source code in peagen/tui/app.py
1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 |
|
action_prev_page
action_prev_page()
Source code in peagen/tui/app.py
1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 |
|
action_set_limit
action_set_limit(limit=None)
Set the number of tasks shown per page.
Source code in peagen/tui/app.py
1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 |
|
action_jump_page
action_jump_page(page=None)
Jump directly to page if provided or prompt the user.
Source code in peagen/tui/app.py
1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 |
|
on_data_table_cell_selected
async
on_data_table_cell_selected(event)
Source code in peagen/tui/app.py
1095 1096 1097 1098 1099 1100 1101 1102 |
|
on_data_table_header_selected
async
on_data_table_header_selected(event)
Sort a table when the user clicks a column header.
Source code in peagen/tui/app.py
1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 |
|
open_task_detail
async
open_task_detail(task_id)
Source code in peagen/tui/app.py
1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 |
|
open_editor
async
open_editor(file_path)
Source code in peagen/tui/app.py
1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 |
|
open_text
async
open_text(name, text, language='text')
Source code in peagen/tui/app.py
1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 |
|
open_git_oid
async
open_git_oid(oid)
Source code in peagen/tui/app.py
1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 |
|