mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Add support for target location in tasks (#10179)
* Add support for target location in tasks * bump sqltoolsservice to get addition of targetLocation to TaskNode
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/v{#version#}/microsoft.sqltools.servicelayer-{#fileName#}",
|
"downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/v{#version#}/microsoft.sqltools.servicelayer-{#fileName#}",
|
||||||
"version": "2.0.0-release.56",
|
"version": "2.0.0-release.61",
|
||||||
"downloadFileNames": {
|
"downloadFileNames": {
|
||||||
"Windows_86": "win-x86-netcoreapp2.2.zip",
|
"Windows_86": "win-x86-netcoreapp2.2.zip",
|
||||||
"Windows_64": "win-x64-netcoreapp2.2.zip",
|
"Windows_64": "win-x64-netcoreapp2.2.zip",
|
||||||
|
|||||||
4
src/sql/azdata.proposed.d.ts
vendored
4
src/sql/azdata.proposed.d.ts
vendored
@@ -384,5 +384,9 @@ declare module 'azdata' {
|
|||||||
*/
|
*/
|
||||||
alwaysShowTabs?: boolean;
|
alwaysShowTabs?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface TaskInfo {
|
||||||
|
targetLocation?: string;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -103,11 +103,18 @@ export class TaskHistoryRenderer implements IRenderer {
|
|||||||
templateData.label.textContent = element.taskName + ' ' + taskStatus;
|
templateData.label.textContent = element.taskName + ' ' + taskStatus;
|
||||||
templateData.label.title = templateData.label.textContent;
|
templateData.label.title = templateData.label.textContent;
|
||||||
|
|
||||||
|
let description: string;
|
||||||
// Determine the target name and set hover text equal to that
|
// Determine the target name and set hover text equal to that
|
||||||
let description = element.serverName;
|
// show target location if there is one, otherwise show server and database name
|
||||||
|
if (element.targetLocation) {
|
||||||
|
description = element.targetLocation;
|
||||||
|
} else {
|
||||||
|
description = element.serverName;
|
||||||
if (element.databaseName) {
|
if (element.databaseName) {
|
||||||
description += ' | ' + element.databaseName;
|
description += ' | ' + element.databaseName;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
templateData.description.textContent = description;
|
templateData.description.textContent = description;
|
||||||
templateData.description.title = templateData.description.textContent;
|
templateData.description.title = templateData.description.textContent;
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,11 @@ export class TaskNode {
|
|||||||
*/
|
*/
|
||||||
public databaseName?: string;
|
public databaseName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Target Location
|
||||||
|
*/
|
||||||
|
public targetLocation?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provider Name
|
* Provider Name
|
||||||
*/
|
*/
|
||||||
@@ -99,7 +104,7 @@ export class TaskNode {
|
|||||||
*/
|
*/
|
||||||
public script?: string;
|
public script?: string;
|
||||||
|
|
||||||
constructor(taskName: string, serverName?: string, databaseName?: string, taskId: string | undefined = undefined, taskExecutionMode: TaskExecutionMode = TaskExecutionMode.execute, isCancelable: boolean = true) {
|
constructor(taskName: string, serverName?: string, databaseName?: string, taskId: string | undefined = undefined, taskExecutionMode: TaskExecutionMode = TaskExecutionMode.execute, isCancelable: boolean = true, targetLocation?: string) {
|
||||||
this.id = taskId || generateUuid();
|
this.id = taskId || generateUuid();
|
||||||
|
|
||||||
this.taskName = taskName;
|
this.taskName = taskName;
|
||||||
@@ -111,5 +116,6 @@ export class TaskNode {
|
|||||||
this.hasChildren = false;
|
this.hasChildren = false;
|
||||||
this.taskExecutionMode = taskExecutionMode;
|
this.taskExecutionMode = taskExecutionMode;
|
||||||
this.isCancelable = isCancelable;
|
this.isCancelable = isCancelable;
|
||||||
|
this.targetLocation = targetLocation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export class TaskService implements ITaskService {
|
|||||||
serverName = connectionProfile.serverName;
|
serverName = connectionProfile.serverName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let node: TaskNode = new TaskNode(taskInfo.name, serverName, databaseName, taskInfo.taskId, taskInfo.taskExecutionMode, taskInfo.isCancelable);
|
let node: TaskNode = new TaskNode(taskInfo.name, serverName, databaseName, taskInfo.taskId, taskInfo.taskExecutionMode, taskInfo.isCancelable, taskInfo.targetLocation);
|
||||||
node.providerName = taskInfo.providerName;
|
node.providerName = taskInfo.providerName;
|
||||||
this.handleNewTask(node);
|
this.handleNewTask(node);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user