some fixes
This commit is contained in:
@ -61,14 +61,14 @@ export class AcquisitionManager {
|
||||
const result = await response.json();
|
||||
|
||||
if (result.success) {
|
||||
this.notifications.show(result.message, 'success');
|
||||
this.notifications.show({type: 'success', message: result.message});
|
||||
await this.updateStatus();
|
||||
} else {
|
||||
this.notifications.show(result.error || 'Failed to start acquisition', 'error');
|
||||
this.notifications.show({type: 'error', message: result.error || 'Failed to start acquisition'});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error starting acquisition:', error);
|
||||
this.notifications.show('Failed to start acquisition', 'error');
|
||||
this.notifications.show({type: 'error', message: 'Failed to start acquisition'});
|
||||
} finally {
|
||||
this.setButtonLoading(this.elements.startBtn, false);
|
||||
}
|
||||
@ -86,14 +86,14 @@ export class AcquisitionManager {
|
||||
const result = await response.json();
|
||||
|
||||
if (result.success) {
|
||||
this.notifications.show(result.message, 'success');
|
||||
this.notifications.show({type: 'success', message: result.message});
|
||||
await this.updateStatus();
|
||||
} else {
|
||||
this.notifications.show(result.error || 'Failed to stop acquisition', 'error');
|
||||
this.notifications.show({type: 'error', message: result.error || 'Failed to stop acquisition'});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error stopping acquisition:', error);
|
||||
this.notifications.show('Failed to stop acquisition', 'error');
|
||||
this.notifications.show({type: 'error', message: 'Failed to stop acquisition'});
|
||||
} finally {
|
||||
this.setButtonLoading(this.elements.stopBtn, false);
|
||||
}
|
||||
@ -111,14 +111,14 @@ export class AcquisitionManager {
|
||||
const result = await response.json();
|
||||
|
||||
if (result.success) {
|
||||
this.notifications.show(result.message, 'success');
|
||||
this.notifications.show({type: 'success', message: result.message});
|
||||
await this.updateStatus();
|
||||
} else {
|
||||
this.notifications.show(result.error || 'Failed to trigger single sweep', 'error');
|
||||
this.notifications.show({type: 'error', message: result.error || 'Failed to trigger single sweep'});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error triggering single sweep:', error);
|
||||
this.notifications.show('Failed to trigger single sweep', 'error');
|
||||
this.notifications.show({type: 'error', message: 'Failed to trigger single sweep'});
|
||||
} finally {
|
||||
this.setButtonLoading(this.elements.singleSweepBtn, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user