Commit fa7d3d1
authored
Add status and start/stop buttons to recents view (#243)
* Split client out of client service
This way we can create multiple clients on the recent workspaces page
without having to do the whole init thing for each one.
* Store config directory in recent connection
We need this information so we can query the status of recent
connections as they could belong to multiple deployments.
This could end up desyncing if the user manually edits their config file
and changes the global config path in ProxyCommand.
The alternative would be to parse the SSH config to make sure we have
the right config directory but that would mean parsing ProxyCommand to
extract the value of --global-config.
As a fallback for connections that already exist and are not yet stored
with the config directory we could split the host name itself on `--`
since it has the domain in it and join with the default directory but
this could be inaccurate if the default has been changed or if in the
future we change the host name format.
* Store name in recent connection
So we can match against the API response. We could split the hostname
on `--` but there are cases where that will fail (when the name or
domain itself contains -- in specific configurations).
We have to add the config path anyway so this is the best opportunity to
add more information.
* Standardize some casing
* Ignore null hostnames
I guess this could happen if you manually edit the recents? In any case
if there is no host name I am not sure there is value in trying to show
the connection and it is making it difficult to check if the workspace
is up.
* Break out toAgentModels
We will need this in the recent connections view as well.
* Split agent status icon and label
So we can show just the icon in the recent connections view.
* Add status and start/stop buttons to recent connections
This relies on some new data being stored with the recent connections so
old connections will be in an unknown state.
* Simplify recent workspace connection constructor1 parent b3033b7 commit fa7d3d1
File tree
17 files changed
+427
-208
lines changed- src/main
- kotlin/com/coder/gateway
- icons
- models
- sdk
- v2/models
- views
- steps
- resources
- messages
17 files changed
+427
-208
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
83 | 100 | | |
84 | 101 | | |
85 | 102 | | |
| |||
140 | 157 | | |
141 | 158 | | |
142 | 159 | | |
143 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
144 | 163 | | |
145 | 164 | | |
146 | 165 | | |
| |||
149 | 168 | | |
150 | 169 | | |
151 | 170 | | |
152 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
153 | 174 | | |
154 | | - | |
| 175 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
58 | | - | |
| 62 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
Lines changed: 17 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 6 | + | |
18 | 7 | | |
19 | | - | |
20 | | - | |
| 8 | + | |
21 | 9 | | |
22 | | - | |
23 | | - | |
| 10 | + | |
24 | 11 | | |
25 | | - | |
26 | | - | |
| 12 | + | |
27 | 13 | | |
28 | | - | |
29 | | - | |
| 14 | + | |
30 | 15 | | |
31 | | - | |
32 | | - | |
| 16 | + | |
33 | 17 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 18 | + | |
37 | 19 | | |
38 | | - | |
39 | | - | |
| 20 | + | |
40 | 21 | | |
41 | | - | |
42 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
43 | 28 | | |
44 | 29 | | |
45 | 30 | | |
| |||
88 | 73 | | |
89 | 74 | | |
90 | 75 | | |
91 | | - | |
| 76 | + | |
92 | 77 | | |
93 | 78 | | |
94 | | - | |
| 79 | + | |
95 | 80 | | |
96 | 81 | | |
97 | 82 | | |
98 | | - | |
| 83 | + | |
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | | - | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
Lines changed: 27 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | | - | |
| 16 | + | |
15 | 17 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
103 | | - | |
104 | | - | |
105 | 105 | | |
106 | 106 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
Lines changed: 34 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 34 | | |
39 | 35 | | |
| 36 | + | |
40 | 37 | | |
41 | 38 | | |
42 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
46 | 58 | | |
47 | 59 | | |
48 | 60 | | |
| |||
54 | 66 | | |
55 | 67 | | |
56 | 68 | | |
| 69 | + | |
57 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
58 | 76 | | |
59 | 77 | | |
60 | | - | |
| 78 | + | |
61 | 79 | | |
62 | 80 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 81 | + | |
69 | 82 | | |
70 | 83 | | |
71 | 84 | | |
| |||
75 | 88 | | |
76 | 89 | | |
77 | 90 | | |
78 | | - | |
| 91 | + | |
79 | 92 | | |
80 | 93 | | |
81 | 94 | | |
82 | 95 | | |
83 | 96 | | |
84 | | - | |
| 97 | + | |
85 | 98 | | |
86 | 99 | | |
87 | | - | |
| 100 | + | |
88 | 101 | | |
89 | 102 | | |
90 | 103 | | |
91 | 104 | | |
92 | | - | |
| 105 | + | |
93 | 106 | | |
94 | 107 | | |
95 | | - | |
| 108 | + | |
96 | 109 | | |
97 | 110 | | |
98 | 111 | | |
| |||
101 | 114 | | |
102 | 115 | | |
103 | 116 | | |
104 | | - | |
| 117 | + | |
105 | 118 | | |
106 | 119 | | |
107 | 120 | | |
| |||
111 | 124 | | |
112 | 125 | | |
113 | 126 | | |
114 | | - | |
| 127 | + | |
115 | 128 | | |
116 | 129 | | |
117 | 130 | | |
| |||
123 | 136 | | |
124 | 137 | | |
125 | 138 | | |
126 | | - | |
| 139 | + | |
127 | 140 | | |
128 | 141 | | |
129 | 142 | | |
130 | 143 | | |
131 | | - | |
| 144 | + | |
0 commit comments