mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
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:
committed by
Karl Burtram
parent
713c74adfd
commit
74c4b7311e
@@ -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; };
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user