Feature/agent2 adbist (#1113)

* added caching for jobs view and history page

* added build fix

* removed agent from cache service name

* put cache in job mgmt service and fixed view destroy error

* jobs view cache and refresh implemented

* refresh and cache complete

* added refresh to job history page

* fixed steps style

* explicitly tell user when no steps are available

* show message when no prev runs available

* code review refactor

* cleaned code

* added code that got left out
This commit is contained in:
Aditya Bist
2018-04-12 10:36:34 -07:00
committed by GitHub
parent 20853ddf7e
commit 8ec5451e64
17 changed files with 221 additions and 171 deletions

View File

@@ -5,7 +5,7 @@
import 'vs/css!../common/media/jobs';
import * as nls from 'vs/nls';
import { Component, Inject, forwardRef, ElementRef, ChangeDetectorRef, ViewChild, Injectable } from '@angular/core';
import { Component, Inject, forwardRef, ElementRef, ChangeDetectorRef, ViewChild, Injectable} from '@angular/core';
import * as Utils from 'sql/parts/connection/common/utils';
import { RefreshWidgetAction, EditDashboardAction } from 'sql/parts/dashboard/common/actions';
import { IColorTheme } from 'vs/workbench/services/themes/common/workbenchThemeService';
@@ -18,6 +18,7 @@ import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboar
import { AgentJobInfo, AgentJobHistoryInfo } from 'sqlops';
import { PanelComponent, IPanelOptions, NavigationBarLayout } from 'sql/base/browser/ui/panel/panel.component';
export const DASHBOARD_SELECTOR: string = 'agentview-component';
@Component({
@@ -31,14 +32,10 @@ export class AgentViewComponent {
// tslint:disable:no-unused-variable
private readonly jobsComponentTitle: string = nls.localize('jobview.Jobs', "Jobs");
private readonly alertsComponentTitle: string = nls.localize('jobview.Alerts', "Alerts");
private readonly schedulesComponentTitle: string = nls.localize('jobview.Schedules', "Schedules");
private readonly operatorsComponentTitle: string = nls.localize('jobview.Operator', "Operators");
private readonly jobHistoryComponentTitle: string = nls.localize('jobview.History', "History");
private _showHistory: boolean = false;
private _jobId: string = null;
private _agentJobInfo: AgentJobInfo = null;
private _agentJobHistories: AgentJobHistoryInfo[] = null;
private _refresh: boolean = undefined;
public jobsIconClass: string = 'jobsview-icon';
@@ -68,8 +65,8 @@ export class AgentViewComponent {
return this._agentJobInfo;
}
public get agentJobHistories(): AgentJobHistoryInfo[] {
return this._agentJobHistories;
public get refresh(): boolean {
return this._refresh;
}
/**
@@ -91,8 +88,8 @@ export class AgentViewComponent {
this._cd.detectChanges();
}
public set agentJobHistories(value: AgentJobHistoryInfo[]) {
this._agentJobHistories = value;
public set refresh(value: boolean) {
this._refresh = value;
this._cd.detectChanges();
}
}