Commit 15551df
authored
feat: JS API reconnect (#1149)
- Listen for `EVENT_DISCONNECT` and `EVENT_RECONNECT` on the connection,
and display a "Reconnecting..." message in the console.
- No longer listen to the `HACK_CONNECTION_FAILURE` (it's been
deprecated).
- Listen for the `SHUTDOWN` event and display a message after shutdown.
- Fixes #1140
Testing steps:
1. Start up server with deephaven-core JS API reconnect changes:
deephaven/deephaven-core#3502
2. Use ngrok to start a tunnel to that port, e.g.: `ngrok http 10000`
3. Start up Web UI connecting to that tunnel, e.g.:
`VITE_CORE_API_URL=http://acfc-23-233-0-34.ngrok.io/jsapi npm start`
4. Open the Web UI in Firefox, run some commands to make sure initial
connection is fine.
5. Press Alt and from the File menu, select "Work Offline"
6. See it transition to a disconnected state. Disconnected message
should appear and should not be able to enter new commands
7. Reconnect by deselecting "Work Offline" option from Step 5
8. See it transition to connected state. Should be able to run commands
and have the results appear.
9. Kill the server (Ctrl+C). See it transition to a Shutdown state, app
unloaded.1 parent 1e4f8f9 commit 15551df
12 files changed
Lines changed: 435 additions & 73 deletions
File tree
- __mocks__
- packages
- code-studio/src/main
- components/src/modal
- console/src
- dashboard-core-plugins/src/panels
- iris-grid/src/sidebar
- jsapi-types/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
429 | 443 | | |
430 | 444 | | |
431 | 445 | | |
| |||
615 | 629 | | |
616 | 630 | | |
617 | 631 | | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
618 | 637 | | |
619 | 638 | | |
620 | 639 | | |
| |||
623 | 642 | | |
624 | 643 | | |
625 | 644 | | |
| 645 | + | |
626 | 646 | | |
627 | 647 | | |
628 | 648 | | |
| |||
631 | 651 | | |
632 | 652 | | |
633 | 653 | | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
634 | 659 | | |
635 | 660 | | |
636 | 661 | | |
| |||
665 | 690 | | |
666 | 691 | | |
667 | 692 | | |
668 | | - | |
| 693 | + | |
669 | 694 | | |
670 | 695 | | |
671 | 696 | | |
| |||
686 | 711 | | |
687 | 712 | | |
688 | 713 | | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
689 | 722 | | |
690 | 723 | | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
| 724 | + | |
696 | 725 | | |
697 | 726 | | |
698 | 727 | | |
| |||
744 | 773 | | |
745 | 774 | | |
746 | 775 | | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
747 | 780 | | |
748 | 781 | | |
749 | 782 | | |
| |||
758 | 791 | | |
759 | 792 | | |
760 | 793 | | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
761 | 798 | | |
762 | 799 | | |
763 | 800 | | |
764 | 801 | | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 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 | + | |
765 | 834 | | |
766 | 835 | | |
767 | 836 | | |
| |||
783 | 852 | | |
784 | 853 | | |
785 | 854 | | |
| 855 | + | |
| 856 | + | |
786 | 857 | | |
787 | 858 | | |
788 | 859 | | |
| |||
1267 | 1338 | | |
1268 | 1339 | | |
1269 | 1340 | | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
1270 | 1344 | | |
1271 | 1345 | | |
1272 | 1346 | | |
1273 | 1347 | | |
1274 | 1348 | | |
1275 | 1349 | | |
1276 | 1350 | | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
1277 | 1362 | | |
1278 | 1363 | | |
1279 | | - | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
1280 | 1379 | | |
1281 | 1380 | | |
1282 | 1381 | | |
| |||
1374 | 1473 | | |
1375 | 1474 | | |
1376 | 1475 | | |
| 1476 | + | |
| 1477 | + | |
1377 | 1478 | | |
1378 | 1479 | | |
1379 | 1480 | | |
| |||
1413 | 1514 | | |
1414 | 1515 | | |
1415 | 1516 | | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
1416 | 1534 | | |
1417 | 1535 | | |
1418 | 1536 | | |
| |||
1864 | 1982 | | |
1865 | 1983 | | |
1866 | 1984 | | |
| 1985 | + | |
| 1986 | + | |
1867 | 1987 | | |
1868 | 1988 | | |
1869 | 1989 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
156 | 157 | | |
| 158 | + | |
| 159 | + | |
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
| |||
175 | 178 | | |
176 | 179 | | |
177 | 180 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| |||
318 | 319 | | |
319 | 320 | | |
320 | 321 | | |
321 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
322 | 326 | | |
323 | 327 | | |
324 | 328 | | |
| |||
0 commit comments