mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 09:35:37 -05:00
* Fix to enable two projects showing only their data even if opening together * Fixing a typo * Taking in PR comments
This commit is contained in:
@@ -52,61 +52,65 @@ export class ProjectsController {
|
||||
this.buildHelper = new BuildHelper();
|
||||
}
|
||||
|
||||
public get dashboardDeployData(): (string | dataworkspace.IconCellValue)[][] {
|
||||
public getDashboardDeployData(projectFile: string): (string | dataworkspace.IconCellValue)[][] {
|
||||
const infoRows: (string | dataworkspace.IconCellValue)[][] = [];
|
||||
let count = 0;
|
||||
|
||||
for (let i = this.deployInfo.length - 1; i >= 0; i--) {
|
||||
let icon: azdata.IconPath;
|
||||
let text: string;
|
||||
if (this.deployInfo[i].status === Status.success) {
|
||||
icon = IconPathHelper.success;
|
||||
text = constants.Success;
|
||||
} else if (this.deployInfo[i].status === Status.failed) {
|
||||
icon = IconPathHelper.error;
|
||||
text = constants.Failed;
|
||||
} else {
|
||||
icon = IconPathHelper.inProgress;
|
||||
text = constants.InProgress;
|
||||
}
|
||||
if (this.deployInfo[i].projectFile === projectFile) {
|
||||
let icon: azdata.IconPath;
|
||||
let text: string;
|
||||
if (this.deployInfo[i].status === Status.success) {
|
||||
icon = IconPathHelper.success;
|
||||
text = constants.Success;
|
||||
} else if (this.deployInfo[i].status === Status.failed) {
|
||||
icon = IconPathHelper.error;
|
||||
text = constants.Failed;
|
||||
} else {
|
||||
icon = IconPathHelper.inProgress;
|
||||
text = constants.InProgress;
|
||||
}
|
||||
|
||||
let infoRow: (string | dataworkspace.IconCellValue)[] = [count.toString(),
|
||||
{ text: text, icon: icon },
|
||||
this.deployInfo[i].target,
|
||||
this.deployInfo[i].timeToCompleteAction,
|
||||
this.deployInfo[i].startDate];
|
||||
infoRows.push(infoRow);
|
||||
count++;
|
||||
let infoRow: (string | dataworkspace.IconCellValue)[] = [count.toString(),
|
||||
{ text: text, icon: icon },
|
||||
this.deployInfo[i].target,
|
||||
this.deployInfo[i].timeToCompleteAction,
|
||||
this.deployInfo[i].startDate];
|
||||
infoRows.push(infoRow);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
return infoRows;
|
||||
}
|
||||
|
||||
public get dashboardBuildData(): (string | dataworkspace.IconCellValue)[][] {
|
||||
public getDashboardBuildData(projectFile: string): (string | dataworkspace.IconCellValue)[][] {
|
||||
const infoRows: (string | dataworkspace.IconCellValue)[][] = [];
|
||||
let count = 0;
|
||||
|
||||
for (let i = this.buildInfo.length - 1; i >= 0; i--) {
|
||||
let icon: azdata.IconPath;
|
||||
let text: string;
|
||||
if (this.buildInfo[i].status === Status.success) {
|
||||
icon = IconPathHelper.success;
|
||||
text = constants.Success;
|
||||
} else if (this.buildInfo[i].status === Status.failed) {
|
||||
icon = IconPathHelper.error;
|
||||
text = constants.Failed;
|
||||
} else {
|
||||
icon = IconPathHelper.inProgress;
|
||||
text = constants.InProgress;
|
||||
}
|
||||
if (this.buildInfo[i].projectFile === projectFile) {
|
||||
let icon: azdata.IconPath;
|
||||
let text: string;
|
||||
if (this.buildInfo[i].status === Status.success) {
|
||||
icon = IconPathHelper.success;
|
||||
text = constants.Success;
|
||||
} else if (this.buildInfo[i].status === Status.failed) {
|
||||
icon = IconPathHelper.error;
|
||||
text = constants.Failed;
|
||||
} else {
|
||||
icon = IconPathHelper.inProgress;
|
||||
text = constants.InProgress;
|
||||
}
|
||||
|
||||
let infoRow: (string | dataworkspace.IconCellValue)[] = [count.toString(),
|
||||
{ text: text, icon: icon },
|
||||
this.buildInfo[i].target,
|
||||
this.buildInfo[i].timeToCompleteAction,
|
||||
this.buildInfo[i].startDate];
|
||||
infoRows.push(infoRow);
|
||||
count++;
|
||||
let infoRow: (string | dataworkspace.IconCellValue)[] = [count.toString(),
|
||||
{ text: text, icon: icon },
|
||||
this.buildInfo[i].target,
|
||||
this.buildInfo[i].timeToCompleteAction,
|
||||
this.buildInfo[i].startDate];
|
||||
infoRows.push(infoRow);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
return infoRows;
|
||||
@@ -176,7 +180,7 @@ export class ProjectsController {
|
||||
const startTime = new Date();
|
||||
const currentBuildTimeInfo = `${startTime.toLocaleDateString()} ${constants.at} ${startTime.toLocaleTimeString()}`;
|
||||
|
||||
let buildInfoNew = new DashboardData(Status.inProgress, project.getProjectTargetVersion(), currentBuildTimeInfo);
|
||||
let buildInfoNew = new DashboardData(project.projectFilePath, Status.inProgress, project.getProjectTargetVersion(), currentBuildTimeInfo);
|
||||
this.buildInfo.push(buildInfoNew);
|
||||
|
||||
if (this.buildInfo.length - 1 === maxTableLength) {
|
||||
@@ -276,7 +280,7 @@ export class ProjectsController {
|
||||
const actionStartTime = currentDate.getTime();
|
||||
const currentDeployTimeInfo = `${currentDate.toLocaleDateString()} ${constants.at} ${currentDate.toLocaleTimeString()}`;
|
||||
|
||||
let deployInfoNew = new DashboardData(Status.inProgress, project.getProjectTargetVersion(), currentDeployTimeInfo);
|
||||
let deployInfoNew = new DashboardData(project.projectFilePath, Status.inProgress, project.getProjectTargetVersion(), currentDeployTimeInfo);
|
||||
this.deployInfo.push(deployInfoNew);
|
||||
|
||||
if (this.deployInfo.length - 1 === maxTableLength) {
|
||||
|
||||
Reference in New Issue
Block a user