Agent/proxy ui (#1880)

* finished basic proxy ui

* finished proxy UI and logic

* made changes to accomodate toolsservice side changes
This commit is contained in:
Aditya Bist
2018-07-14 10:43:31 -07:00
committed by Karl Burtram
parent 713c74adfd
commit 74c4b7311e
13 changed files with 225 additions and 28 deletions

View File

@@ -34,6 +34,8 @@ export interface IJobManagementService {
getProxies(connectionUri: string): Thenable<sqlops.AgentProxiesResult>;
deleteProxy(connectionUri: string, proxy: sqlops.AgentProxyInfo): Thenable<sqlops.ResultStatus>;
getCredentials(connectionUri: string): Thenable<sqlops.GetCredentialsResult>;
jobAction(connectionUri: string, jobName: string, action: string): Thenable<sqlops.ResultStatus>;
addToCache(server: string, cache: JobCacheObject);
jobCacheObjectMap: { [server: string]: JobCacheObject; };

View File

@@ -78,6 +78,12 @@ export class JobManagementService implements IJobManagementService {
});
}
public getCredentials(connectionUri: string): Thenable<sqlops.GetCredentialsResult> {
return this._runAction(connectionUri, (runner) => {
return runner.getCredentials(connectionUri);
});
}
public getJobHistory(connectionUri: string, jobID: string): Thenable<sqlops.AgentJobHistoryResult> {
return this._runAction(connectionUri, (runner) => {
return runner.getJobHistory(connectionUri, jobID);

View File

@@ -166,7 +166,11 @@ export class ProxiesViewComponent extends JobManagementView implements OnInit {
public openCreateProxyDialog() {
let ownerUri: string = this._commonService.connectionManagementService.connectionInfo.ownerUri;
this._commandService.executeCommand('agent.openProxyDialog', ownerUri);
this._jobManagementService.getCredentials(ownerUri).then((result) => {
if (result && result.credentials) {
this._commandService.executeCommand('agent.openProxyDialog', ownerUri, undefined, result.credentials);
}
});
}
private refreshJobs() {