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

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./dashboardControlHostContainer';
import { Component, forwardRef, Input, AfterContentInit, ViewChild } from '@angular/core';
import { Component, forwardRef, Input, AfterContentInit, ViewChild, OnChanges } from '@angular/core';
import Event, { Emitter } from 'vs/base/common/event';
import { DashboardTab } from 'sql/parts/dashboard/common/interfaces';
import { TabConfig } from 'sql/parts/dashboard/common/dashboardWidget';
@@ -18,6 +18,7 @@ import { ControlHostContent } from 'sql/parts/dashboard/contents/controlHostCont
</controlhost-content>
`
})
export class DashboardControlHostContainer extends DashboardTab implements AfterContentInit {
@Input() private tab: TabConfig;
@@ -53,6 +54,6 @@ export class DashboardControlHostContainer extends DashboardTab implements After
}
public refresh(): void {
// no op
this._hostContent.refresh();
}
}

View File

@@ -5,5 +5,4 @@
*--------------------------------------------------------------------------------------------*/
-->
<agentview-component *ngIf="(controlType) === 'agent'">
</agentview-component>
<agentview-component #agent *ngIf="(controlType) === 'agent'"></agentview-component>

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./controlHostContent';
import { Component, forwardRef, Input, OnInit, Inject, ChangeDetectorRef, ElementRef } from '@angular/core';
import { Component, forwardRef, Input, OnInit, Inject, ChangeDetectorRef, ElementRef, ViewChild } from '@angular/core';
import Event, { Emitter } from 'vs/base/common/event';
import { Parts } from 'vs/workbench/services/part/common/partService';
@@ -16,12 +16,13 @@ import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboar
import * as sqlops from 'sqlops';
import { memoize } from 'vs/base/common/decorators';
import { AgentViewComponent } from '../../jobManagement/agent/agentView.component';
@Component({
templateUrl: decodeURI(require.toUrl('sql/parts/dashboard/contents/controlHostContent.component.html')),
selector: 'controlhost-content'
})
export class ControlHostContent implements OnInit {
export class ControlHostContent {
@Input() private webviewId: string;
private _onResize = new Emitter<void>();
@@ -32,6 +33,9 @@ export class ControlHostContent implements OnInit {
private _onMessageDisposable: IDisposable;
private _type: string;
/* Children components */
@ViewChild('agent') private _agentViewComponent: AgentViewComponent;
constructor(
@Inject(forwardRef(() => DashboardServiceInterface)) private _dashboardService: DashboardServiceInterface,
@Inject(forwardRef(() => ChangeDetectorRef)) private _changeRef: ChangeDetectorRef,
@@ -39,9 +43,6 @@ export class ControlHostContent implements OnInit {
) {
}
ngOnInit() {
}
public layout(): void {
}
@@ -73,4 +74,8 @@ export class ControlHostContent implements OnInit {
public get controlType(): string {
return this._type;
}
public refresh() {
this._agentViewComponent.refresh = true;
}
}