|
|
|
@@ -12,37 +12,29 @@ import 'vs/css!../common/media/jobs';
|
|
|
|
import 'vs/css!sql/media/icons/common-icons';
|
|
|
|
import 'vs/css!sql/media/icons/common-icons';
|
|
|
|
|
|
|
|
|
|
|
|
import { Component, Inject, forwardRef, ElementRef, ChangeDetectorRef, ViewChild, AfterContentChecked } from '@angular/core';
|
|
|
|
import { Component, Inject, forwardRef, ElementRef, ChangeDetectorRef, ViewChild, AfterContentChecked } from '@angular/core';
|
|
|
|
import { FieldType, IObservableCollection, CollectionChange, SlickGrid } from 'angular2-slickgrid';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import * as sqlops from 'sqlops';
|
|
|
|
import * as sqlops from 'sqlops';
|
|
|
|
import * as vscode from 'vscode';
|
|
|
|
import * as vscode from 'vscode';
|
|
|
|
|
|
|
|
|
|
|
|
import { IColorTheme } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
|
|
|
|
|
|
|
import { IDisposable } from 'vs/base/common/lifecycle';
|
|
|
|
|
|
|
|
import * as themeColors from 'vs/workbench/common/theme';
|
|
|
|
|
|
|
|
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
|
|
|
|
|
|
|
|
import * as nls from 'vs/nls';
|
|
|
|
import * as nls from 'vs/nls';
|
|
|
|
|
|
|
|
import * as dom from 'vs/base/browser/dom';
|
|
|
|
|
|
|
|
|
|
|
|
import { IGridDataSet } from 'sql/parts/grid/common/interfaces';
|
|
|
|
|
|
|
|
import { Table } from 'sql/base/browser/ui/table/table';
|
|
|
|
import { Table } from 'sql/base/browser/ui/table/table';
|
|
|
|
import { attachTableStyler } from 'sql/common/theme/styler';
|
|
|
|
|
|
|
|
import { JobHistoryComponent } from './jobHistory.component';
|
|
|
|
|
|
|
|
import { AgentViewComponent } from '../agent/agentView.component';
|
|
|
|
import { AgentViewComponent } from '../agent/agentView.component';
|
|
|
|
import { RowDetailView } from 'sql/base/browser/ui/table/plugins/rowdetailview';
|
|
|
|
import { RowDetailView } from 'sql/base/browser/ui/table/plugins/rowdetailview';
|
|
|
|
import { JobCacheObject } from 'sql/parts/jobManagement/common/jobManagementService';
|
|
|
|
import { JobCacheObject } from 'sql/parts/jobManagement/common/jobManagementService';
|
|
|
|
import { AgentJobUtilities } from '../common/agentJobUtilities';
|
|
|
|
import { AgentJobUtilities } from '../common/agentJobUtilities';
|
|
|
|
import * as Utils from 'sql/parts/connection/common/utils';
|
|
|
|
|
|
|
|
import { IJobManagementService } from '../common/interfaces';
|
|
|
|
import { IJobManagementService } from '../common/interfaces';
|
|
|
|
import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboardServiceInterface.service';
|
|
|
|
|
|
|
|
import { CommonServiceInterface } from 'sql/services/common/commonServiceInterface.service';
|
|
|
|
import { CommonServiceInterface } from 'sql/services/common/commonServiceInterface.service';
|
|
|
|
import { DashboardPage } from 'sql/parts/dashboard/common/dashboardPage.component';
|
|
|
|
import { TabChild } from 'sql/base/browser/ui/panel/tab.component';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const JOBSVIEW_SELECTOR: string = 'jobsview-component';
|
|
|
|
export const JOBSVIEW_SELECTOR: string = 'jobsview-component';
|
|
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
@Component({
|
|
|
|
selector: JOBSVIEW_SELECTOR,
|
|
|
|
selector: JOBSVIEW_SELECTOR,
|
|
|
|
templateUrl: decodeURI(require.toUrl('./jobsView.component.html'))
|
|
|
|
templateUrl: decodeURI(require.toUrl('./jobsView.component.html')),
|
|
|
|
|
|
|
|
providers: [{ provide: TabChild, useExisting: forwardRef(() => JobsViewComponent) }],
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
export class JobsViewComponent implements AfterContentChecked {
|
|
|
|
export class JobsViewComponent implements AfterContentChecked {
|
|
|
|
@@ -97,6 +89,10 @@ export class JobsViewComponent implements AfterContentChecked {
|
|
|
|
this._isCloud = this._dashboardService.connectionManagementService.connectionInfo.serverInfo.isCloud;
|
|
|
|
this._isCloud = this._dashboardService.connectionManagementService.connectionInfo.serverInfo.isCloud;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public layout() {
|
|
|
|
|
|
|
|
this._table.layout(new dom.Dimension(dom.getContentWidth(this._gridEl.nativeElement), dom.getContentHeight(this._gridEl.nativeElement)));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ngAfterContentChecked() {
|
|
|
|
ngAfterContentChecked() {
|
|
|
|
if (this.isVisible === false && this._gridEl.nativeElement.offsetParent !== null) {
|
|
|
|
if (this.isVisible === false && this._gridEl.nativeElement.offsetParent !== null) {
|
|
|
|
this.isVisible = true;
|
|
|
|
this.isVisible = true;
|
|
|
|
@@ -274,7 +270,8 @@ export class JobsViewComponent implements AfterContentChecked {
|
|
|
|
let hash: {
|
|
|
|
let hash: {
|
|
|
|
[index: number]: {
|
|
|
|
[index: number]: {
|
|
|
|
[id: string]: string;
|
|
|
|
[id: string]: string;
|
|
|
|
}} = {};
|
|
|
|
}
|
|
|
|
|
|
|
|
} = {};
|
|
|
|
hash = this.setRowWithErrorClass(hash, row, 'job-with-error');
|
|
|
|
hash = this.setRowWithErrorClass(hash, row, 'job-with-error');
|
|
|
|
hash = this.setRowWithErrorClass(hash, row + 1, 'error-row');
|
|
|
|
hash = this.setRowWithErrorClass(hash, row + 1, 'error-row');
|
|
|
|
this._table.grid.setCellCssStyles('error-row' + row.toString(), hash);
|
|
|
|
this._table.grid.setCellCssStyles('error-row' + row.toString(), hash);
|
|
|
|
|