mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-15 09:35:37 -05:00
Add Delete Alert action implementation (#1840)
* Delete alert WIP 1 * Add agent delete methods * Add Delete implementation for Jobs, Operators, and Proxies
This commit is contained in:
@@ -555,6 +555,13 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
return this._resolveProvider<sqlops.AgentServicesProvider>(handle).jobAction(ownerUri, jobName, action);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a job
|
||||
*/
|
||||
$deleteJob(handle: number, ownerUri: string, job: sqlops.AgentJobInfo): Thenable<sqlops.ResultStatus> {
|
||||
throw this._resolveProvider<sqlops.AgentServicesProvider>(handle).deleteJob(ownerUri, job);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Agent Alerts list
|
||||
*/
|
||||
@@ -562,6 +569,13 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
return this._resolveProvider<sqlops.AgentServicesProvider>(handle).getAlerts(ownerUri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an alert
|
||||
*/
|
||||
$deleteAlert(handle: number, ownerUri: string, alert: sqlops.AgentAlertInfo): Thenable<sqlops.ResultStatus> {
|
||||
return this._resolveProvider<sqlops.AgentServicesProvider>(handle).deleteAlert(ownerUri, alert);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Agent Oeprators list
|
||||
*/
|
||||
@@ -569,10 +583,24 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
return this._resolveProvider<sqlops.AgentServicesProvider>(handle).getOperators(ownerUri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an operator
|
||||
*/
|
||||
$deleteOperator(handle: number, ownerUri: string, operator: sqlops.AgentOperatorInfo): Thenable<sqlops.ResultStatus> {
|
||||
return this._resolveProvider<sqlops.AgentServicesProvider>(handle).deleteOperator(ownerUri, operator);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Agent Proxies list
|
||||
*/
|
||||
$getProxies(handle: number, ownerUri: string): Thenable<sqlops.AgentProxiesResult> {
|
||||
return this._resolveProvider<sqlops.AgentServicesProvider>(handle).getProxies(ownerUri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a proxy
|
||||
*/
|
||||
$deleteProxy(handle: number, ownerUri: string, proxy: sqlops.AgentProxyInfo): Thenable<sqlops.ResultStatus> {
|
||||
return this._resolveProvider<sqlops.AgentServicesProvider>(handle).deleteProxy(ownerUri, proxy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,15 +345,27 @@ export class MainThreadDataProtocol implements MainThreadDataProtocolShape {
|
||||
jobAction(connectionUri: string, jobName: string, action: string): Thenable<sqlops.ResultStatus> {
|
||||
return self._proxy.$jobAction(handle, connectionUri, jobName, action);
|
||||
},
|
||||
deleteJob(connectionUri: string, jobInfo: sqlops.AgentJobInfo): Thenable<sqlops.ResultStatus> {
|
||||
return self._proxy.$deleteJob(handle, connectionUri, jobInfo);
|
||||
},
|
||||
getAlerts(connectionUri: string): Thenable<sqlops.AgentAlertsResult> {
|
||||
return self._proxy.$getAlerts(handle, connectionUri);
|
||||
},
|
||||
deleteAlert(connectionUri: string, alertInfo: sqlops.AgentAlertInfo): Thenable<sqlops.ResultStatus> {
|
||||
return self._proxy.$deleteAlert(handle, connectionUri, alertInfo);
|
||||
},
|
||||
getOperators(connectionUri: string): Thenable<sqlops.AgentOperatorsResult> {
|
||||
return self._proxy.$getOperators(handle, connectionUri);
|
||||
},
|
||||
deleteOperator(connectionUri: string, operatorInfo: sqlops.AgentOperatorInfo): Thenable<sqlops.ResultStatus> {
|
||||
return self._proxy.$deleteOperator(handle, connectionUri, operatorInfo);
|
||||
},
|
||||
getProxies(connectionUri: string): Thenable<sqlops.AgentProxiesResult> {
|
||||
return self._proxy.$getProxies(handle, connectionUri);
|
||||
}
|
||||
},
|
||||
deleteProxy(connectionUri: string, proxyInfo: sqlops.AgentProxyInfo): Thenable<sqlops.ResultStatus> {
|
||||
return self._proxy.$deleteProxy(handle, connectionUri, proxyInfo);
|
||||
},
|
||||
});
|
||||
|
||||
return undefined;
|
||||
|
||||
@@ -338,20 +338,40 @@ export abstract class ExtHostDataProtocolShape {
|
||||
*/
|
||||
$jobAction(handle: number, ownerUri: string, jobName: string, action: string): Thenable<sqlops.ResultStatus> { throw ni(); }
|
||||
|
||||
/**
|
||||
* Deletes a job
|
||||
*/
|
||||
$deleteJob(handle: number, ownerUri: string, job: sqlops.AgentJobInfo): Thenable<sqlops.ResultStatus> { throw ni(); }
|
||||
|
||||
/**
|
||||
* Get Agent Alerts list
|
||||
*/
|
||||
$getAlerts(handle: number, connectionUri: string): Thenable<sqlops.AgentAlertsResult> { throw ni(); }
|
||||
|
||||
/**
|
||||
* Deletes an alert
|
||||
*/
|
||||
$deleteAlert(handle: number, connectionUri: string, alert: sqlops.AgentAlertInfo): Thenable<sqlops.ResultStatus> { throw ni(); }
|
||||
|
||||
/**
|
||||
* Get Agent Oeprators list
|
||||
*/
|
||||
$getOperators(handle: number, connectionUri: string): Thenable<sqlops.AgentOperatorsResult> { throw ni(); }
|
||||
|
||||
/**
|
||||
* Deletes an operator
|
||||
*/
|
||||
$deleteOperator(handle: number, connectionUri: string, operator: sqlops.AgentOperatorInfo): Thenable<sqlops.ResultStatus> { throw ni(); }
|
||||
|
||||
/**
|
||||
* Get Agent Proxies list
|
||||
*/
|
||||
$getProxies(handle: number, connectionUri: string): Thenable<sqlops.AgentProxiesResult> { throw ni(); }
|
||||
|
||||
/**
|
||||
* Deletes a proxy
|
||||
*/
|
||||
$deleteProxy(handle: number, connectionUri: string, proxy: sqlops.AgentProxyInfo): Thenable<sqlops.ResultStatus> { throw ni(); }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user