mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
update insight last update time on refresh (#841)
This commit is contained in:
@@ -130,10 +130,13 @@ export class InsightsWidget extends DashboardWidget implements IDashboardWidget,
|
|||||||
|
|
||||||
private _storeResult(result: SimpleExecuteResult): SimpleExecuteResult {
|
private _storeResult(result: SimpleExecuteResult): SimpleExecuteResult {
|
||||||
if (this.insightConfig.cacheId) {
|
if (this.insightConfig.cacheId) {
|
||||||
|
let currentTime = new Date();
|
||||||
let store: IStorageResult = {
|
let store: IStorageResult = {
|
||||||
date: new Date().toString(),
|
date: currentTime.toString(),
|
||||||
results: result
|
results: result
|
||||||
};
|
};
|
||||||
|
this.lastUpdated = nls.localize('insights.lastUpdated', "Last Updated: {0} {1}", currentTime.toLocaleTimeString(), currentTime.toLocaleDateString());
|
||||||
|
this._cd.detectChanges();
|
||||||
this.dashboardService.storageService.store(this._getStorageKey(), JSON.stringify(store));
|
this.dashboardService.storageService.store(this._getStorageKey(), JSON.stringify(store));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user