|
|
@ -30,13 +30,13 @@ export enum HasticDatasourceStatus { |
|
|
|
CONNECTING = 'info' |
|
|
|
CONNECTING = 'info' |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
export type HasticDatasourceConnectingStatus = { |
|
|
|
export type HasticDatasourceConnectionStatus = { |
|
|
|
status: HasticDatasourceStatus, |
|
|
|
status: HasticDatasourceStatus, |
|
|
|
message: string |
|
|
|
message: string |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export class AnalyticService { |
|
|
|
export class AnalyticService { |
|
|
|
public connectingStatus: HasticDatasourceConnectingStatus = { |
|
|
|
public connectionStatus: HasticDatasourceConnectionStatus = { |
|
|
|
status: HasticDatasourceStatus.CONNECTING, |
|
|
|
status: HasticDatasourceStatus.CONNECTING, |
|
|
|
message: 'Connecting...' |
|
|
|
message: 'Connecting...' |
|
|
|
}; |
|
|
|
}; |
|
|
@ -273,8 +273,8 @@ export class AnalyticService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async checkDatasourceAvailability(): Promise<boolean> { |
|
|
|
async checkDatasourceAvailability(): Promise<boolean> { |
|
|
|
this.connectingStatus.status = HasticDatasourceStatus.CONNECTING; |
|
|
|
this.connectionStatus.status = HasticDatasourceStatus.CONNECTING; |
|
|
|
this.connectingStatus.message = 'Connecting...'; |
|
|
|
this.connectionStatus.message = 'Connecting...'; |
|
|
|
|
|
|
|
|
|
|
|
this._isUp = await this._isDatasourceAvailable(); |
|
|
|
this._isUp = await this._isDatasourceAvailable(); |
|
|
|
return this._isUp; |
|
|
|
return this._isUp; |
|
|
@ -398,8 +398,8 @@ export class AnalyticService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private _displayConnectionAlert(status: HasticDatasourceStatus, message: string[]): void { |
|
|
|
private _displayConnectionAlert(status: HasticDatasourceStatus, message: string[]): void { |
|
|
|
this.connectingStatus.status = status; |
|
|
|
this.connectionStatus.status = status; |
|
|
|
this.connectingStatus.message = message.join('<br />'); |
|
|
|
this.connectionStatus.message = message.join('<br />'); |
|
|
|
|
|
|
|
|
|
|
|
const statusChanged = this._updateHasticUrlStatus(status); |
|
|
|
const statusChanged = this._updateHasticUrlStatus(status); |
|
|
|
|
|
|
|
|
|
|
|