@stratusagent/dashboard 0.14.0 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/ui/views/settings.js +10 -2
package/package.json
CHANGED
package/ui/views/settings.js
CHANGED
|
@@ -285,7 +285,7 @@ export const renderSettings = (section) => {
|
|
|
285
285
|
const save = async () => {
|
|
286
286
|
state.busy = true; update();
|
|
287
287
|
try {
|
|
288
|
-
await api.storeChannel('slack', {
|
|
288
|
+
const stored = await api.storeChannel('slack', {
|
|
289
289
|
agentId: agentPicker.value,
|
|
290
290
|
appToken: appToken.value,
|
|
291
291
|
botToken: botToken.value,
|
|
@@ -293,7 +293,15 @@ export const renderSettings = (section) => {
|
|
|
293
293
|
appToken.value = '';
|
|
294
294
|
botToken.value = '';
|
|
295
295
|
state.credentials = await api.credentials();
|
|
296
|
-
|
|
296
|
+
// A daemon that reloads Slack connects the app now; one that
|
|
297
|
+
// started without Slack, or could not reload, needs the restart.
|
|
298
|
+
if (stored.reloaded) {
|
|
299
|
+
say("Stored. Slack reloaded, so that agent comes online without a restart. If it doesn't, the daemon log says why.");
|
|
300
|
+
} else if (stored.reason) {
|
|
301
|
+
say(`Stored. ${stored.reason}`, 'bad');
|
|
302
|
+
} else {
|
|
303
|
+
say('Stored. Restart stratusd to bring that agent online in Slack.');
|
|
304
|
+
}
|
|
297
305
|
} catch (error) {
|
|
298
306
|
say(error.message, 'bad');
|
|
299
307
|
}
|