@@ -15,6 +15,12 @@ included in the LICENSE file.
15
15
>Apply Changes ({{ numChanges }})</t-button
16
16
>
17
17
</div >
18
+ <t-alert v-if =" error"
19
+ title =" Manifest Sync Error"
20
+ type =" error"
21
+ >
22
+ {{ error }}.
23
+ </t-alert >
18
24
<div class =" flex-1 font-sm overflow-y-auto" ref =" resultsComponent" >
19
25
<div
20
26
v-if =" loading"
@@ -61,7 +67,7 @@ included in the LICENSE file.
61
67
</div >
62
68
<div class =" diff" v-if =" item.object" >
63
69
{{
64
- b64Encode( item.object as Uint8Array, 0, item.object.length )
70
+ textDecoder.decode(b64Decode( item.object) )
65
71
}}
66
72
</div >
67
73
</template >
@@ -87,6 +93,7 @@ import TSpinner from "@/components/common/Spinner/TSpinner.vue";
87
93
import TListItem from " @/components/common/List/TListItem.vue" ;
88
94
import TButton from " @/components/common/Button/TButton.vue" ;
89
95
import { showSuccess } from " @/notification" ;
96
+ import TAlert from " @/components/TAlert.vue" ;
90
97
91
98
import {
92
99
KubernetesSyncManifestRequest ,
@@ -98,7 +105,9 @@ import { subscribe, Stream } from "@/api/grpc";
98
105
import { withContext , withRuntime } from " @/api/options" ;
99
106
import { Runtime } from " @/api/common/omni.pb" ;
100
107
import { getContext } from " @/context" ;
101
- import { b64Encode } from " @/api/fetch.pb" ;
108
+ import { b64Decode } from " @/api/fetch.pb" ;
109
+
110
+ const textDecoder = new TextDecoder ();
102
111
103
112
const route = useRoute ();
104
113
const context = getContext ();
@@ -181,6 +190,8 @@ const highlightDiff = (line: string) => {
181
190
return " " ;
182
191
};
183
192
193
+ const error = ref <string >();
194
+
184
195
const setupSyncStream = () => {
185
196
const stream: Ref <
186
197
| Stream <KubernetesSyncManifestRequest , KubernetesSyncManifestResponse >
@@ -220,14 +231,12 @@ const setupSyncStream = () => {
220
231
[withRuntime (Runtime .Talos ), withContext (context )],
221
232
undefined ,
222
233
(e : Error ) => {
223
- processItem ({
224
- response_type: KubernetesSyncManifestResponseResponseType .UNKNOWN ,
225
- path: " Manifest Sync Error" ,
226
- diff: e .message ,
227
- });
234
+ error .value = e .message ;
235
+ loading .value = false ;
228
236
},
229
237
() => {
230
238
loaded .value = true ;
239
+ error .value = undefined ;
231
240
232
241
if (! syncParams .value .dry_run ) {
233
242
showSuccess (" Bootstrap manifests updated successfully" );
@@ -252,7 +261,7 @@ setupSyncStream();
252
261
253
262
<style scoped>
254
263
.diff {
255
- @apply font-roboto whitespace-pre p- 4 ;
264
+ @apply font-roboto whitespace-pre pt- 2 ;
256
265
}
257
266
258
267
.bottom-line {
0 commit comments