mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Agent/loading icon (#1263)
* added progress wheel to show jobs loading * added loading wheel to jobs view page too
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'vs/css!./jobHistory';
|
||||
import 'vs/css!sql/media/icons/common-icons';
|
||||
import { OnInit, OnChanges, Component, Inject, Input, forwardRef, ElementRef, ChangeDetectorRef, ViewChild, ChangeDetectionStrategy, Injectable } from '@angular/core';
|
||||
import { AgentJobHistoryInfo, AgentJobInfo } from 'sqlops';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
@@ -60,6 +61,7 @@ export class JobHistoryComponent extends Disposable implements OnInit {
|
||||
private _jobCacheObject: JobCacheObject;
|
||||
private _notificationService: INotificationService;
|
||||
private _agentJobInfo: AgentJobInfo;
|
||||
private _noJobsAvailable: boolean = false;
|
||||
|
||||
constructor(
|
||||
@Inject(BOOTSTRAP_SERVICE_ID) private bootstrapService: IBootstrapService,
|
||||
@@ -146,7 +148,10 @@ export class JobHistoryComponent extends Disposable implements OnInit {
|
||||
} else if (jobHistories && jobHistories.length === 0 ){
|
||||
this._showPreviousRuns = false;
|
||||
this._showSteps = false;
|
||||
this._noJobsAvailable = true;
|
||||
this._cd.detectChanges();
|
||||
} else {
|
||||
this.loadHistory();
|
||||
}
|
||||
this._jobCacheObject.prevJobID = this._agentViewComponent.jobId;
|
||||
} else if (this._isVisible === true && this._agentViewComponent.refresh) {
|
||||
@@ -274,6 +279,10 @@ export class JobHistoryComponent extends Disposable implements OnInit {
|
||||
return time.replace('T', ' ');
|
||||
}
|
||||
|
||||
private showProgressWheel(): boolean {
|
||||
return this._showPreviousRuns !== true && this._noJobsAvailable === false;
|
||||
}
|
||||
|
||||
private setActions(): void {
|
||||
let startIcon: HTMLElement = $('.icon-start').get(0);
|
||||
let stopIcon: HTMLElement = $('.icon-stop').get(0);
|
||||
|
||||
Reference in New Issue
Block a user