Initial SQL Agent merge for March release (#961)

* WIP

* wip

* SQL Agent wip

* wip

* Initial control host (wip)

* Initial hookup of SQL Agent service to job component

* Update agent package.json

* Hook up getJobs call

* A couple job view updates

* Add some more agent views

* Rename some 'agent' classes to 'jobManagement'

* job history page (#852)

* added back button, run actions and overview accordion

* refactoring

* overview table complete

* fixed the dropdown arrow for the overview section

* added table for prev job list

* fixed agent job result type

* code cleaning and code review comments

* fixed yarn.lock conflicts

* added function for job history

* changed vscode-languageclient version

* changed yarn lock file

* fixed yarn lock file

* fixed yarn file

* fixed css paths

* added images to packaging step

* fix resource path for packaging

* Switch back getJobs return type

* Make enum const

* Remove sqlops const

* WIP

* WIP

* Feature/agent1 adbist (#899)

* added back button, run actions and overview accordion

* refactoring

* overview table complete

* fixed the dropdown arrow for the overview section

* added table for prev job list

* fixed agent job result type

* code cleaning and code review comments

* fixed yarn.lock conflicts

* added function for job history

* changed vscode-languageclient version

* changed yarn lock file

* fixed yarn lock file

* fixed yarn file

* fixed css paths

* added images to packaging step

* fix resource path for packaging

* added steps lists

* fixed style and dimensions

* fixed conflicts

* implemented job list

* added the Date and Status columns

* update yarn files

* merged feature/agent1

* added theme styling for light theme

* changed yarn lock files

* made job history page css more specific

* Add visiblity check to job view

* Clean up jobs styling and call getJobHistory

* Add more Job Table styling

* Enable detail view in job table

* Use updated slickgrid repo

* vbumped slickgrid

* Convert rowdetail slickgrid plug to TypeScript

* Feature/agent1 adbist (#945)

* added back button, run actions and overview accordion

* refactoring

* overview table complete

* fixed the dropdown arrow for the overview section

* added table for prev job list

* fixed agent job result type

* code cleaning and code review comments

* fixed yarn.lock conflicts

* added function for job history

* changed vscode-languageclient version

* changed yarn lock file

* fixed yarn lock file

* fixed yarn file

* fixed css paths

* added images to packaging step

* fix resource path for packaging

* added steps lists

* fixed style and dimensions

* fixed conflicts

* implemented job list

* added the Date and Status columns

* update yarn files

* merged feature/agent1

* added theme styling for light theme

* changed yarn lock files

* added method signatures for job history with DMP

* added methods for job running

* added job actions to sqlops

* Refer to dataprotocol from feature/agentDmp1 branch

* Update SQL Tools version to 1.4.0-alpha.13

* Change Feb to March in release note prompt

* SQL Agent extension metadata

* add feature explicitly in client creation

* Update Agent job registration

* Update package.json

* Feature/agent1 adbist (#955)

* added back button, run actions and overview accordion

* refactoring

* overview table complete

* fixed the dropdown arrow for the overview section

* added table for prev job list

* fixed agent job result type

* code cleaning and code review comments

* fixed yarn.lock conflicts

* added function for job history

* changed vscode-languageclient version

* changed yarn lock file

* fixed yarn lock file

* fixed yarn file

* fixed css paths

* added images to packaging step

* fix resource path for packaging

* added steps lists

* fixed style and dimensions

* fixed conflicts

* implemented job list

* added the Date and Status columns

* update yarn files

* merged feature/agent1

* added theme styling for light theme

* changed yarn lock files

* added method signatures for job history with DMP

* added methods for job running

* added job actions to sqlops

* navigation works but is really slow to load data

* Add jobs view icon

* Misc. cleanups
This commit is contained in:
Karl Burtram
2018-03-23 13:27:55 -07:00
committed by GitHub
parent 67a9ff3e16
commit 357bb1916e
59 changed files with 4741 additions and 275 deletions

View File

@@ -53,7 +53,7 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
provider.handle = this._nextHandle();
this._adapter.set(provider.handle, provider);
return this._createDisposable(provider.handle);
};
}
$registerConnectionProvider(provider: sqlops.ConnectionProvider): vscode.Disposable {
let rt = this.registerProvider(provider);
@@ -121,6 +121,12 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
return rt;
}
$registerAgentServiceProvider(provider: sqlops.AgentServicesProvider): vscode.Disposable {
let rt = this.registerProvider(provider);
this._proxy.$registerAgentServicesProvider(provider.providerId, provider.handle);
return rt;
}
$registerCapabilitiesServiceProvider(provider: sqlops.CapabilitiesProvider): vscode.Disposable {
let rt = this.registerProvider(provider);
this._proxy.$registerCapabilitiesServiceProvider(provider.providerId, provider.handle);
@@ -481,4 +487,30 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
public $onSessionEventsAvailable(handle: number, response: sqlops.ProfilerSessionEvents): void {
this._proxy.$onSessionEventsAvailable(handle, response);
}
/**
* Agent Job Provider methods
*/
/**
* Get Agent Job list
*/
public $getJobs(handle: number, ownerUri: string): Thenable<sqlops.AgentJobsResult> {
return this._resolveProvider<sqlops.AgentServicesProvider>(handle).getJobs(ownerUri);
}
/**
* Get a Agent Job's history
*/
public $getJobHistory(handle: number, ownerUri: string, jobID: string): Thenable<sqlops.AgentJobHistoryResult> {
return this._resolveProvider<sqlops.AgentServicesProvider>(handle).getJobHistory(ownerUri, jobID);
}
/**
* Run an action on a job
*/
public $jobAction(handle: number, ownerUri: string, jobName: string, action: string): Thenable<sqlops.AgentJobActionResult> {
return this._resolveProvider<sqlops.AgentServicesProvider>(handle).jobAction(ownerUri, jobName, action);
}
}

View File

@@ -18,6 +18,7 @@ import { IMetadataService } from 'sql/services/metadata/metadataService';
import { IObjectExplorerService } from 'sql/parts/registeredServer/common/objectExplorerService';
import { IScriptingService } from 'sql/services/scripting/scriptingService';
import { IAdminService } from 'sql/parts/admin/common/adminService';
import { IJobManagementService } from 'sql/parts/jobManagement/common/interfaces';
import { IBackupService } from 'sql/parts/disasterRecovery/backup/common/backupService';
import { IRestoreService } from 'sql/parts/disasterRecovery/restore/common/restoreService';
import { ITaskService } from 'sql/parts/taskHistory/common/taskService';
@@ -50,6 +51,7 @@ export class MainThreadDataProtocol implements MainThreadDataProtocolShape {
@IObjectExplorerService private _objectExplorerService: IObjectExplorerService,
@IScriptingService private _scriptingService: IScriptingService,
@IAdminService private _adminService: IAdminService,
@IJobManagementService private _jobManagementService: IJobManagementService,
@IBackupService private _backupService: IBackupService,
@IRestoreService private _restoreService: IRestoreService,
@ITaskService private _taskService: ITaskService,
@@ -329,6 +331,24 @@ export class MainThreadDataProtocol implements MainThreadDataProtocolShape {
return undefined;
}
public $registerAgentServicesProvider(providerId: string, handle: number): TPromise<any> {
const self = this;
this._jobManagementService.registerProvider(providerId, <sqlops.AgentServicesProvider> {
providerId: providerId,
getJobs(connectionUri: string): Thenable<sqlops.AgentJobsResult> {
return self._proxy.$getJobs(handle, connectionUri);
},
getJobHistory(connectionUri: string, jobID: string): Thenable<sqlops.AgentJobHistoryResult> {
return self._proxy.$getJobHistory(handle, connectionUri, jobID);
},
jobAction(connectionUri: string, jobName: string, action: string): Thenable<sqlops.AgentJobActionResult> {
return self._proxy.$jobAction(handle, connectionUri, jobName, action);
}
});
return undefined;
}
public $registerCapabilitiesServiceProvider(providerId: string, handle: number): TPromise<any> {
const self = this;
this._capabilitiesService.registerProvider(<sqlops.CapabilitiesProvider>{

View File

@@ -28,7 +28,6 @@ import { ExtHostConfiguration } from 'vs/workbench/api/node/extHostConfiguration
import { ExtHostModalDialogs } from 'sql/workbench/api/node/extHostModalDialog';
import { ExtHostTasks } from 'sql/workbench/api/node/extHostTasks';
import { ILogService } from 'vs/platform/log/common/log';
import { IExtensionApiFactory } from 'vs/workbench/api/node/extHost.api.impl';
import { ExtHostDashboardWebviews } from 'sql/workbench/api/node/extHostDashboardWebview';
import { ExtHostConnectionManagement } from 'sql/workbench/api/node/extHostConnectionManagement';
import { ExtHostDashboard } from 'sql/workbench/api/node/extHostDashboard';
@@ -256,7 +255,7 @@ export function createApiFactory(
};
let registerAgentServicesProvider = (provider: sqlops.AgentServicesProvider): vscode.Disposable => {
return undefined;
return extHostDataProvider.$registerAgentServiceProvider(provider);
};
// namespace: dataprotocol
@@ -272,6 +271,7 @@ export function createApiFactory(
registerTaskServicesProvider,
registerQueryProvider,
registerAdminServicesProvider,
registerAgentServicesProvider,
registerCapabilitiesServiceProvider,
registerAgentServicesProvider,
onDidChangeLanguageFlavor(listener: (e: sqlops.DidChangeLanguageFlavorParams) => any, thisArgs?: any, disposables?: extHostTypes.Disposable[]) {

View File

@@ -306,6 +306,22 @@ export abstract class ExtHostDataProtocolShape {
* Stop a profiler session
*/
$stopSession(handle: number, sessionId: string): Thenable<boolean> { throw ni(); }
/**
* Get Agent Job list
*/
$getJobs(handle: number, ownerUri: string): Thenable<sqlops.AgentJobsResult>{ throw ni(); }
/**
* Get a Agent Job's history
*/
$getJobHistory(handle: number, ownerUri: string, jobID: string): Thenable<sqlops.AgentJobHistoryResult>{ throw ni(); }
/**
* Run an action on a Job
*/
$jobAction(handle: number, ownerUri: string, jobName: string, action: string): Thenable<sqlops.AgentJobActionResult>{ throw ni(); }
}
/**
@@ -370,6 +386,7 @@ export interface MainThreadDataProtocolShape extends IDisposable {
$registerFileBrowserProvider(providerId: string, handle: number): TPromise<any>;
$registerCapabilitiesServiceProvider(providerId: string, handle: number): TPromise<any>;
$registerAdminServicesProvider(providerId: string, handle: number): TPromise<any>;
$registerAgentServicesProvider(providerId: string, handle: number): TPromise<any>;
$unregisterProvider(handle: number): TPromise<any>;
$onConnectionComplete(handle: number, connectionInfoSummary: sqlops.ConnectionInfoSummary): void;
$onIntelliSenseCacheComplete(handle: number, connectionUri: string): void;