diff --git a/extension/src/BuildDetails.js b/extension/src/BuildDetails.js
deleted file mode 100644
index acb616f..0000000
--- a/extension/src/BuildDetails.js
+++ /dev/null
@@ -1,16 +0,0 @@
-define(["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var BuildDetails = /** @class */ (function () {
- function BuildDetails(status, result, name, queuedBy, buildNumber, completed, testCoverage) {
- this.status = status;
- this.result = result;
- this.name = name;
- this.queuedBy = queuedBy;
- this.buildNumber = buildNumber;
- this.completed = completed;
- this.testCoverage = testCoverage;
- }
- return BuildDetails;
- }());
-});
diff --git a/extension/src/IDetailSettings.d.ts b/extension/src/IDetailSettings.d.ts
index 94294e7..330c68c 100644
--- a/extension/src/IDetailSettings.d.ts
+++ b/extension/src/IDetailSettings.d.ts
@@ -15,4 +15,6 @@
interface IDetailSettings {
definitionId: number;
+ branch: string;
+ showBranch: boolean;
}
diff --git a/extension/src/build-details-configuration.js b/extension/src/build-details-configuration.js
deleted file mode 100644
index 487340e..0000000
--- a/extension/src/build-details-configuration.js
+++ /dev/null
@@ -1,149 +0,0 @@
-// ---------------------------------------------------------------------
-//
-// This code is licensed under the MIT License.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-// PARTICULAR PURPOSE AND NONINFRINGEMENT.
-//
-//
-// This is part of the TPHealth widget
-// from the ALM Rangers. This file contains the TypeScript
-// code for the configuration page of the details widget.
-//
-// ---------------------------------------------------------------------
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __generator = (this && this.__generator) || function (thisArg, body) {
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
- while (_) try {
- if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
- if (y = 0, t) op = [0, t.value];
- switch (op[0]) {
- case 0: case 1: t = op; break;
- case 4: _.label++; return { value: op[1], done: false };
- case 5: _.label++; y = op[1]; op = [0]; continue;
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
- if (t[2]) _.ops.pop();
- _.trys.pop(); continue;
- }
- op = body.call(thisArg, _);
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
- }
-};
-define(["require", "exports", "TFS/Build/Contracts", "TFS/Build/RestClient"], function (require, exports, TFS_Build_Contracts, TFS_Build_Client) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- VSS.require(["TFS/Dashboards/WidgetHelpers"], function (WidgetHelpers) {
- WidgetHelpers.IncludeWidgetConfigurationStyles();
- VSS.register("TPHealth-DetailsWidget-Configuration", function () {
- var detailsConfigurationWidget = new DetailsConfiguration(WidgetHelpers);
- return detailsConfigurationWidget;
- });
- VSS.notifyLoadSucceeded();
- });
- var DetailsConfiguration = /** @class */ (function () {
- function DetailsConfiguration(WidgetHelpers) {
- this.WidgetHelpers = WidgetHelpers;
- this.widgetConfigurationContext = null;
- this.definitionDropDown = $("#definitionDropDown");
- this.errordropdown = $("#definitionDropDown .validation-error > .validation-error-text");
- }
- DetailsConfiguration.prototype.load = function (widgetSettings, widgetConfigurationContext) {
- return __awaiter(this, void 0, void 0, function () {
- var settings, options, text;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- this.widgetConfigurationContext = widgetConfigurationContext;
- settings = JSON.parse(widgetSettings.customSettings.data);
- if (!settings || !settings.definitionId) {
- options = this.definitionDropDown;
- text = "Select a build definition";
- options.append($("").val(-1).text(text));
- }
- return [4 /*yield*/, this.loadBuildDefinitions(settings)];
- case 1:
- _a.sent();
- this.notifyOnChange(this.definitionDropDown);
- return [2 /*return*/, this.WidgetHelpers.WidgetStatusHelper.Success()];
- }
- });
- });
- };
- DetailsConfiguration.prototype.loadBuildDefinitions = function (settings) {
- return __awaiter(this, void 0, void 0, function () {
- var buildClient, context, defs, options, _i, defs_1, defRef;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- buildClient = TFS_Build_Client.getClient();
- context = VSS.getWebContext();
- return [4 /*yield*/, buildClient.getDefinitions(context.project.id, undefined, undefined, undefined, undefined, TFS_Build_Contracts.DefinitionQueryOrder.DefinitionNameAscending)];
- case 1:
- defs = _a.sent();
- options = this.definitionDropDown;
- for (_i = 0, defs_1 = defs; _i < defs_1.length; _i++) {
- defRef = defs_1[_i];
- if (settings && settings.definitionId && defRef.id.toString() === settings.definitionId.toString()) {
- options.append($("").val(defRef.id).text(defRef.name));
- }
- else {
- options.append($("").val(defRef.id).text(defRef.name));
- }
- }
- return [2 /*return*/];
- }
- });
- });
- };
- DetailsConfiguration.prototype.validateQueryDropdown = function ($queryDropdown, $errordropdown) {
- if (this.definitionDropDown.val() === "-1") {
- var text = "Please select a build definition";
- $errordropdown.text(text);
- $errordropdown.parent().css("visibility", "visible");
- return false;
- }
- $errordropdown.parent().css("visibility", "hidden");
- return true;
- };
- DetailsConfiguration.prototype.notifyOnChange = function (control) {
- var _this = this;
- control.change(function () {
- if (_this.validateQueryDropdown(_this.definitionDropDown, _this.errordropdown)) {
- $("#definitionDropDown option[value='-1']").remove();
- _this.widgetConfigurationContext.notify(_this.WidgetHelpers.WidgetEvent.ConfigurationChange, _this.WidgetHelpers.WidgetEvent.Args(_this.getCustomSettings()));
- }
- });
- };
- DetailsConfiguration.prototype.getCustomSettings = function () {
- var data = {
- definitionId: this.definitionDropDown.val(),
- };
- return { data: JSON.stringify(data) };
- };
- DetailsConfiguration.prototype.onSave = function () {
- if (this.definitionDropDown.val() === "-1") {
- return this.WidgetHelpers.WidgetConfigurationSave.Invalid();
- }
- return this.WidgetHelpers.WidgetConfigurationSave.Valid(this.getCustomSettings());
- };
- return DetailsConfiguration;
- }());
-});
diff --git a/extension/src/build-details-configuration.ts b/extension/src/build-details-configuration.ts
index 4dd29db..f7f47d7 100644
--- a/extension/src/build-details-configuration.ts
+++ b/extension/src/build-details-configuration.ts
@@ -15,6 +15,7 @@
import TFS_Build_Contracts = require("TFS/Build/Contracts");
import TFS_Build_Client = require("TFS/Build/RestClient");
+import TFS_Git_Client = require("TFS/VersionControl/GitRestClient");
VSS.require(["TFS/Dashboards/WidgetHelpers"], (WidgetHelpers) => {
WidgetHelpers.IncludeWidgetConfigurationStyles();
@@ -31,19 +32,33 @@ class DetailsConfiguration {
private definitionDropDown = $("#definitionDropDown");
private errordropdown = $("#definitionDropDown .validation-error > .validation-error-text");
+ private reposDropDown = $("#reposDropDown");
+ private showBranchCheckBox = $("#showBranchCheckBox");
+
+ private detailsSettings: IDetailSettings;
+ private showBranch: boolean = false;
+
constructor(public WidgetHelpers) { }
public async load(widgetSettings, widgetConfigurationContext) {
this.widgetConfigurationContext = widgetConfigurationContext;
- const settings: IDetailSettings = JSON.parse(widgetSettings.customSettings.data);
- if (!settings || !settings.definitionId) {
+ this.detailsSettings = JSON.parse(widgetSettings.customSettings.data);
+
+ if (!this.detailsSettings || !this.detailsSettings.definitionId) {
const options = this.definitionDropDown;
const text = "Select a build definition";
options.append($("").val(-1).text(text));
}
- await this.loadBuildDefinitions(settings);
-
+ await this.loadBuildDefinitions(this.detailsSettings);
+ this.showBranch = this.detailsSettings.showBranch;
+ if (this.showBranch) {
+ this.showBranchCheckBox.prop("checked", true);
+ } else {
+ this.showBranchCheckBox.prop("checked", false);
+ }
this.notifyOnChange(this.definitionDropDown);
+ this.notifyOnReposDropDownChange(this.reposDropDown);
+ this.notifyOnShowBranchChange(this.showBranchCheckBox);
return this.WidgetHelpers.WidgetStatusHelper.Success();
}
@@ -68,10 +83,40 @@ class DetailsConfiguration {
options.append($("").val(defRef.id).text(defRef.name));
}
}
+
+ this.loadBranches();
+ }
+
+ private loadBranches() {
+ if (this.validateQueryDropdown(this.definitionDropDown, this.errordropdown)) {
+ const context = VSS.getWebContext();
+ const buildClient = TFS_Build_Client.getClient();
+ buildClient.getDefinition(this.definitionDropDown.val() as number, context.project.id)
+ .then((def) => {
+ const buildRepo = def.repository;
+
+ const gitClient = TFS_Git_Client.getClient();
+ gitClient.getBranches(buildRepo.id)
+ .then( (branches) => {
+ const options = this.reposDropDown;
+ options.empty();
+ options.append($("").val(-1).text("Any"));
+
+ for (const b of branches) {
+
+ if (this.detailsSettings && this.detailsSettings.branch && b.name === this.detailsSettings.branch) {
+ options.append($("").val(b.name).text(b.name));
+ } else {
+ options.append($("").val(b.name).text(b.name));
+ }
+ }
+ });
+ });
+ }
}
private validateQueryDropdown($queryDropdown, $errordropdown): boolean {
- if (this.definitionDropDown.val() === "-1") {
+ if ($queryDropdown.val() === "-1") {
const text = "Please select a build definition";
$errordropdown.text(text);
$errordropdown.parent().css("visibility", "visible");
@@ -85,23 +130,36 @@ class DetailsConfiguration {
control.change(() => {
if (this.validateQueryDropdown(this.definitionDropDown, this.errordropdown)) {
$("#definitionDropDown option[value='-1']").remove();
- this.widgetConfigurationContext.notify(this.WidgetHelpers.WidgetEvent.ConfigurationChange,
- this.WidgetHelpers.WidgetEvent.Args(this.getCustomSettings()));
+ this.notifyConfigurationChanged();
+ this.loadBranches();
}
});
}
+ private notifyOnShowBranchChange(control) {
+ control.change(() => {
+ this.showBranch = !this.showBranch;
+ this.notifyConfigurationChanged();
+ });
+ }
+
+ private notifyOnReposDropDownChange(control) {
+ control.change(() => {
+ this.notifyConfigurationChanged();
+ });
+ }
+
+ private notifyConfigurationChanged() {
+ this.widgetConfigurationContext.notify(this.WidgetHelpers.WidgetEvent.ConfigurationChange,
+ this.WidgetHelpers.WidgetEvent.Args(this.getCustomSettings()));
+ }
+
private getCustomSettings() {
const data: IDetailSettings = {
+ branch: this.reposDropDown.val() as string,
definitionId: this.definitionDropDown.val() as number,
+ showBranch: this.showBranch,
};
return { data: JSON.stringify(data) };
}
-
- private onSave() {
- if (this.definitionDropDown.val() === "-1") {
- return this.WidgetHelpers.WidgetConfigurationSave.Invalid();
- }
- return this.WidgetHelpers.WidgetConfigurationSave.Valid(this.getCustomSettings());
- }
}
diff --git a/extension/src/build-details.js b/extension/src/build-details.js
deleted file mode 100644
index c31f766..0000000
--- a/extension/src/build-details.js
+++ /dev/null
@@ -1,210 +0,0 @@
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __generator = (this && this.__generator) || function (thisArg, body) {
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
- while (_) try {
- if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
- if (y = 0, t) op = [0, t.value];
- switch (op[0]) {
- case 0: case 1: t = op; break;
- case 4: _.label++; return { value: op[1], done: false };
- case 5: _.label++; y = op[1]; op = [0]; continue;
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
- if (t[2]) _.ops.pop();
- _.trys.pop(); continue;
- }
- op = body.call(thisArg, _);
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
- }
-};
-define(["require", "exports", "telemetryclient-team-services-extension", "TFS/Build/Contracts", "TFS/Build/RestClient", "./telemetryClientSettings"], function (require, exports, tc, TFS_Build_Contracts, TFS_Build_Client, telemetryClientSettings) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- VSS.require(["TFS/Dashboards/WidgetHelpers"], function (WidgetHelpers) {
- WidgetHelpers.IncludeWidgetStyles();
- VSS.register("TPHealth-DetailsWidget", function () {
- var detailsWidget = new DetailsWidget(WidgetHelpers);
- return detailsWidget;
- });
- VSS.notifyLoadSucceeded();
- });
- var DetailsWidget = /** @class */ (function () {
- function DetailsWidget(WidgetHelpers) {
- this.WidgetHelpers = WidgetHelpers;
- }
- DetailsWidget.prototype.load = function (widgetSettings) {
- return __awaiter(this, void 0, void 0, function () {
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- tc.TelemetryClient.getClient(telemetryClientSettings.settings).trackPageView("BuildDetails");
- return [4 /*yield*/, this.ShowBuildDetails(widgetSettings)];
- case 1:
- _a.sent();
- return [2 /*return*/, this.WidgetHelpers.WidgetStatusHelper.Success()];
- }
- });
- });
- };
- DetailsWidget.prototype.reload = function (widgetSettings) {
- return __awaiter(this, void 0, void 0, function () {
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0: return [4 /*yield*/, this.ShowBuildDetails(widgetSettings)];
- case 1:
- _a.sent();
- return [2 /*return*/, this.WidgetHelpers.WidgetStatusHelper.Success()];
- }
- });
- });
- };
- DetailsWidget.prototype.ShowBuildDetails = function (widgetSettings) {
- return __awaiter(this, void 0, void 0, function () {
- var buildClient, context, customSettings, definitionIds, builds, build, definition;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- buildClient = TFS_Build_Client.getClient();
- context = VSS.getWebContext();
- customSettings = JSON.parse(widgetSettings.customSettings.data);
- if (customSettings == null) {
- this.setNoDetails();
- return [2 /*return*/];
- }
- definitionIds = [customSettings.definitionId];
- return [4 /*yield*/, buildClient.getBuilds(context.project.name, definitionIds, null, null, null, null, null, null, null, null, null, null, null, null, null, 1)];
- case 1:
- builds = _a.sent();
- if (builds.length === 1) {
- build = builds[0];
- this.setDetails(build);
- this.setStatusColor(build);
- this.setNavigateUrl(build);
- return [2 /*return*/];
- }
- return [4 /*yield*/, buildClient.getDefinition(customSettings.definitionId, context.project.name)];
- case 2:
- definition = _a.sent();
- if (definition) {
- this.setDetailsFromDefinition(definition);
- this.setStatusColorFromDefinition(definition);
- this.setNavigateUrlFromDefinition(definition);
- return [2 /*return*/];
- }
- // no build and no definition...
- this.setNoDetails();
- return [2 /*return*/];
- }
- });
- });
- };
- DetailsWidget.prototype.setNavigateUrl = function (build) {
- if (build && build._links && build._links.web) {
- VSS.getService(VSS.ServiceIds.Navigation).then(function (navigationService) {
- $("#buildDefinitionNavigateUrl").on("click", function (e) {
- e.preventDefault();
- navigationService.openNewWindow(build._links.web.href, "");
- });
- });
- }
- };
- DetailsWidget.prototype.setNavigateUrlFromDefinition = function (definition) {
- if (definition && definition._links && definition._links.web) {
- VSS.getService(VSS.ServiceIds.Navigation).then(function (navigationService) {
- $("#buildDefinitionNavigateUrl").on("click", function (e) {
- e.preventDefault();
- navigationService.openNewWindow(definition._links.web.href, "");
- });
- });
- }
- };
- DetailsWidget.prototype.setStatusColor = function (build) {
- var $root = $("#root");
- var $buildStatus = $("#buildStatus");
- var $buildDefinitionName = $("#buildDefinitionName");
- $root.removeClass("success partial fail building");
- $buildStatus.removeClass("build-status-succeeded build-status-building build-status-failed");
- if (build.status === TFS_Build_Contracts.BuildStatus.Completed) {
- if (build.result === TFS_Build_Contracts.BuildResult.Succeeded) {
- $root.addClass("success");
- $buildStatus.addClass("build-status-succeeded");
- $buildDefinitionName.addClass("build-definition-name-success");
- }
- else if (build.result === TFS_Build_Contracts.BuildResult.PartiallySucceeded) {
- $root.addClass("partial");
- $buildStatus.addClass("build-status-failed");
- $buildDefinitionName.addClass("build-definition-name-failed");
- }
- else if (build.result === TFS_Build_Contracts.BuildResult.Failed ||
- build.result === TFS_Build_Contracts.BuildResult.Canceled) {
- $root.addClass("fail");
- $buildStatus.addClass("build-status-failed");
- $buildDefinitionName.addClass("build-definition-name-failed");
- }
- }
- else if (build.status === TFS_Build_Contracts.BuildStatus.InProgress
- || build.status === TFS_Build_Contracts.BuildStatus.NotStarted) {
- $root.addClass("building");
- $buildStatus.addClass("build-status-building");
- $buildDefinitionName.addClass("build-definition-name-building");
- }
- };
- DetailsWidget.prototype.setStatusColorFromDefinition = function (definition) {
- var $root = $("#root");
- var $buildStatus = $("#buildStatus");
- var $buildDefinitionName = $("#buildDefinitionName");
- $root.addClass("no-definition");
- $buildStatus.addClass("build-status-unknown");
- $buildDefinitionName.addClass("build-definition-name-unknown");
- };
- DetailsWidget.prototype.setNoDetails = function () {
- $("#root").removeClass("success partial fail building");
- $("#root").addClass("no-builds");
- $("#nodata").text("No builds found");
- $("#details").hide();
- };
- DetailsWidget.prototype.setDetails = function (build) {
- $("#details").show();
- $("#buildDefinitionName").text(build.definition.name);
- $("#buildVersion").text(build.buildNumber);
- $("#buildQueuedBy").text(build.requestedFor.displayName);
- if (build.finishTime) {
- $("#buildCompleted").text(build.finishTime.toISOString().slice(0, 10));
- }
- $("#root").removeClass("no-builds");
- $("#nodata").text("");
- if (build.definition.name.length > 91) {
- $("#buildDefinitionName").addClass("reallySmall-text");
- }
- };
- DetailsWidget.prototype.setDetailsFromDefinition = function (definition) {
- $("#details").show();
- $("#buildDefinitionName").text(definition.name);
- $("#buildVersion").text("");
- $("#buildQueuedBy").text("");
- $("#root").removeClass("no-builds");
- $("#nodata").text("");
- if (definition.name.length > 91) {
- $("#buildDefinitionName").addClass("reallySmall-text");
- }
- };
- return DetailsWidget;
- }());
- exports.DetailsWidget = DetailsWidget;
-});
diff --git a/extension/src/build-details.ts b/extension/src/build-details.ts
index b40d8e6..32c043a 100644
--- a/extension/src/build-details.ts
+++ b/extension/src/build-details.ts
@@ -58,13 +58,22 @@ export class DetailsWidget {
// let's first find out if there are builds
const definitionIds = [customSettings.definitionId];
+ const showBranch = customSettings.showBranch;
+ let filterBranch = customSettings.branch;
+ if (filterBranch === "-1") {
+ filterBranch = null;
+ } else {
+ filterBranch = "refs/heads/" + filterBranch;
+ }
+
const builds = await buildClient.getBuilds(context.project.name,
definitionIds,
null, null, null, null, null, null, null, null, null, null, null, null,
- 1); // maxBuildsPerDefinition
+ 1, null, null, filterBranch );
+
if (builds.length > 0) {
const build = builds[0];
- this.setDetails(build);
+ this.setDetails(build, filterBranch, showBranch);
this.setStatusColor(build);
this.setNavigateUrl(build);
return;
@@ -73,7 +82,7 @@ export class DetailsWidget {
// no build could be found, so fallback to the build definition
const definition = await buildClient.getDefinition(customSettings.definitionId, context.project.name);
if (definition) {
- this.setDetailsFromDefinition(definition);
+ this.setDetailsFromDefinition(definition.name, filterBranch, showBranch);
this.setStatusColorFromDefinition(definition);
this.setNavigateUrlFromDefinition(definition);
return;
@@ -154,9 +163,10 @@ export class DetailsWidget {
$("#root").addClass("no-builds");
$("#nodata").text("No builds found");
$("#details").hide();
+ $("#buildBranch").hide();
}
- private setDetails(build: TFS_Build_Contracts.Build) {
+ private setDetails(build: TFS_Build_Contracts.Build, branchName: string, showBranch: boolean) {
$("#details").show();
$("#buildDefinitionName").text(build.definition.name);
$("#buildVersion").text(build.buildNumber);
@@ -166,21 +176,41 @@ export class DetailsWidget {
}
$("#root").removeClass("no-builds");
$("#nodata").text("");
-
+ if (branchName) {
+ $("#buildBranch").text(branchName);
+ } else {
+ $("#buildBranch").text("Any");
+ }
+ if (showBranch) {
+ $("#branch").show();
+ } else {
+ $("#branch").hide();
+ }
if (build.definition.name.length > 91) {
$("#buildDefinitionName").addClass("reallySmall-text");
}
}
- private setDetailsFromDefinition(definition: TFS_Build_Contracts.BuildDefinition) {
+ private setDetailsFromDefinition(definitionName: string, branchName: string, showBranch: boolean) {
$("#details").show();
- $("#buildDefinitionName").text(definition.name);
+ $("#buildDefinitionName").text(definitionName);
$("#buildVersion").text("");
$("#buildQueuedBy").text("");
$("#root").removeClass("no-builds");
$("#nodata").text("");
- if (definition.name.length > 91) {
+ if (branchName) {
+ $("#buildBranch").text(branchName);
+ } else {
+ $("#buildBranch").text("Any");
+ }
+ if (showBranch) {
+ $("#branch").show();
+ } else {
+ $("#branch").hide();
+ }
+
+ if (definitionName.length > 91) {
$("#buildDefinitionName").addClass("reallySmall-text");
}
}
diff --git a/extension/src/build-overview-configuration.js b/extension/src/build-overview-configuration.js
deleted file mode 100644
index aaeccb3..0000000
--- a/extension/src/build-overview-configuration.js
+++ /dev/null
@@ -1,109 +0,0 @@
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __generator = (this && this.__generator) || function (thisArg, body) {
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
- while (_) try {
- if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
- if (y = 0, t) op = [0, t.value];
- switch (op[0]) {
- case 0: case 1: t = op; break;
- case 4: _.label++; return { value: op[1], done: false };
- case 5: _.label++; y = op[1]; op = [0]; continue;
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
- if (t[2]) _.ops.pop();
- _.trys.pop(); continue;
- }
- op = body.call(thisArg, _);
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
- }
-};
-define(["require", "exports", "TFS/Build/Contracts", "TFS/Build/RestClient", "VSS/Controls", "VSS/Controls/Combos"], function (require, exports, TFS_Build_Contracts, TFS_Build_Client, Controls, Combos) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- VSS.require(["TFS/Dashboards/WidgetHelpers"], function (WidgetHelpers) {
- WidgetHelpers.IncludeWidgetConfigurationStyles();
- VSS.register("TPHealth-OverviewWidget-Configuration", function () {
- var overviewConfigurationWidget = new OverviewConfiguration(WidgetHelpers);
- return overviewConfigurationWidget;
- });
- VSS.notifyLoadSucceeded();
- });
- var OverviewConfiguration = /** @class */ (function () {
- function OverviewConfiguration(WidgetHelpers) {
- this.WidgetHelpers = WidgetHelpers;
- this.widgetConfigurationContext = null;
- this.combo = null;
- this.buildDefinitionDropDown = $(".build-definition-container");
- this.showAll = $("#showAll");
- }
- OverviewConfiguration.prototype.load = function (widgetSettings, widgetConfigurationContext) {
- return __awaiter(this, void 0, void 0, function () {
- var settings, selectedDefinitions, text, context, buildClient, defs, names, dropOptions, multiValueOptions;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- this.widgetConfigurationContext = widgetConfigurationContext;
- settings = JSON.parse(widgetSettings.customSettings.data);
- selectedDefinitions = null;
- if (!!settings) {
- selectedDefinitions = settings.selectedDefinitions;
- }
- text = "Select build definition(s)";
- $("#definitionLegend").text(text);
- context = VSS.getWebContext();
- buildClient = TFS_Build_Client.getClient();
- return [4 /*yield*/, buildClient.getDefinitions(context.project.id, undefined, undefined, undefined, undefined, TFS_Build_Contracts.DefinitionQueryOrder.DefinitionNameAscending)];
- case 1:
- defs = _a.sent();
- names = defs.map(function (value) { return value.name; });
- dropOptions = {
- maxRowCount: 4,
- };
- multiValueOptions = {
- dropOptions: dropOptions,
- source: names,
- type: "multi-value",
- value: selectedDefinitions,
- };
- this.combo = Controls.create(Combos.Combo, this.buildDefinitionDropDown, multiValueOptions);
- this.notifyOnChange(this.buildDefinitionDropDown);
- return [2 /*return*/, this.WidgetHelpers.WidgetStatusHelper.Success()];
- }
- });
- });
- };
- OverviewConfiguration.prototype.getCustomSettings = function () {
- var data = {
- selectedDefinitions: this.combo.getText(),
- };
- return { data: JSON.stringify(data) };
- };
- OverviewConfiguration.prototype.onSave = function () {
- return this.WidgetHelpers.WidgetConfigurationSave.Valid(this.getCustomSettings());
- };
- OverviewConfiguration.prototype.notifyOnChange = function (control) {
- var _this = this;
- control.change(function () {
- _this.widgetConfigurationContext.notify(_this.WidgetHelpers.WidgetEvent.ConfigurationChange, _this.WidgetHelpers.WidgetEvent.Args(_this.getCustomSettings()));
- });
- };
- return OverviewConfiguration;
- }());
- exports.OverviewConfiguration = OverviewConfiguration;
-});
diff --git a/extension/src/build-overview.js b/extension/src/build-overview.js
deleted file mode 100644
index a837622..0000000
--- a/extension/src/build-overview.js
+++ /dev/null
@@ -1,151 +0,0 @@
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __generator = (this && this.__generator) || function (thisArg, body) {
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
- while (_) try {
- if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
- if (y = 0, t) op = [0, t.value];
- switch (op[0]) {
- case 0: case 1: t = op; break;
- case 4: _.label++; return { value: op[1], done: false };
- case 5: _.label++; y = op[1]; op = [0]; continue;
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
- if (t[2]) _.ops.pop();
- _.trys.pop(); continue;
- }
- op = body.call(thisArg, _);
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
- }
-};
-define(["require", "exports", "telemetryclient-team-services-extension", "TFS/Build/Contracts", "TFS/Build/RestClient", "./overview", "./telemetryClientSettings"], function (require, exports, tc, TFS_Build_Contracts, TFS_Build_Client, Overview, telemetryClientSettings) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- VSS.require(["TFS/Dashboards/WidgetHelpers"], function (WidgetHelpers) {
- WidgetHelpers.IncludeWidgetStyles();
- VSS.register("TPHealth-OverviewWidget", function () {
- var overviewWidget = new OverviewWidget(WidgetHelpers);
- return overviewWidget;
- });
- VSS.notifyLoadSucceeded();
- });
- var OverviewWidget = /** @class */ (function () {
- function OverviewWidget(WidgetHelpers) {
- this.WidgetHelpers = WidgetHelpers;
- }
- OverviewWidget.prototype.load = function (widgetSettings) {
- return __awaiter(this, void 0, void 0, function () {
- return __generator(this, function (_a) {
- tc.TelemetryClient.getClient(telemetryClientSettings.settings).trackPageView("BuildOverview");
- this.ShowOverviewData(widgetSettings);
- return [2 /*return*/, this.WidgetHelpers.WidgetStatusHelper.Success()];
- });
- });
- };
- OverviewWidget.prototype.reload = function (widgetSettings) {
- return __awaiter(this, void 0, void 0, function () {
- return __generator(this, function (_a) {
- this.ShowOverviewData(widgetSettings);
- return [2 /*return*/, this.WidgetHelpers.WidgetStatusHelper.Success()];
- });
- });
- };
- OverviewWidget.prototype.ShowOverviewData = function (widgetSettings) {
- return __awaiter(this, void 0, void 0, function () {
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- $(".title").text(widgetSettings.name);
- return [4 /*yield*/, this.showBuild(widgetSettings)];
- case 1:
- _a.sent();
- return [2 /*return*/];
- }
- });
- });
- };
- OverviewWidget.prototype.showBuild = function (widgetSettings) {
- return __awaiter(this, void 0, void 0, function () {
- var buildClient, context, overviewData, customSettings, definitions, ids, builds;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- buildClient = TFS_Build_Client.getClient();
- context = VSS.getWebContext();
- overviewData = new Overview.Overview(0, 0, 0);
- customSettings = JSON.parse(widgetSettings.customSettings.data);
- return [4 /*yield*/, buildClient.getDefinitions(context.project.name)];
- case 1:
- definitions = _a.sent();
- if (!!customSettings && !!customSettings.selectedDefinitions) {
- definitions = definitions.filter(function (def) { return customSettings.selectedDefinitions.indexOf(def.name) !== -1; });
- }
- ids = definitions.map(function (value) { return value.id; });
- if (!(ids.length > 0)) return [3 /*break*/, 3];
- return [4 /*yield*/, buildClient.getBuilds(context.project.name, ids, null, null, null, null, null, null, null, null, null, null, null, null, null, 1)];
- case 2:
- builds = _a.sent();
- builds.forEach(function (build) {
- if (build.result === TFS_Build_Contracts.BuildResult.Succeeded) {
- overviewData.Succeeded++;
- }
- else if (build.result === TFS_Build_Contracts.BuildResult.Canceled) {
- overviewData.Failed++;
- }
- else if (build.result === TFS_Build_Contracts.BuildResult.Failed) {
- overviewData.Failed++;
- }
- else if (build.result === TFS_Build_Contracts.BuildResult.PartiallySucceeded) {
- overviewData.Failed++;
- }
- else if (build.result === TFS_Build_Contracts.BuildResult.None) {
- overviewData.InProgress++;
- }
- else if (build.status === TFS_Build_Contracts.BuildStatus.InProgress) {
- overviewData.InProgress++;
- }
- else if (build.status === TFS_Build_Contracts.BuildStatus.NotStarted) {
- overviewData.InProgress++;
- }
- });
- $("#failed").text(overviewData.Failed);
- $("#inprogress").text(overviewData.InProgress);
- $("#succeeded").text(overviewData.Succeeded);
- $("#container").removeClass("building success fail");
- if (overviewData.Failed > 0) {
- $("#container").addClass("fail");
- }
- else if (overviewData.InProgress > 0) {
- $("#container").addClass("building");
- }
- else {
- $("#container").addClass("success");
- }
- return [3 /*break*/, 4];
- case 3:
- $("#nodata").text("No build definitions found");
- _a.label = 4;
- case 4: return [2 /*return*/];
- }
- });
- });
- };
- return OverviewWidget;
- }());
- exports.OverviewWidget = OverviewWidget;
-});
diff --git a/extension/src/overview.js b/extension/src/overview.js
deleted file mode 100644
index 2b670f2..0000000
--- a/extension/src/overview.js
+++ /dev/null
@@ -1,27 +0,0 @@
-// ---------------------------------------------------------------------
-//
-// This code is licensed under the MIT License.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-// PARTICULAR PURPOSE AND NONINFRINGEMENT.
-//
-//
-// This is part of the TPHealth widget
-// from the ALM Rangers. This file contains the TypeScript
-// code for the configuration page of the details widget.
-//
-// ---------------------------------------------------------------------
-define(["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var Overview = /** @class */ (function () {
- function Overview(Failed, Succeeded, InProgress) {
- this.Failed = Failed;
- this.Succeeded = Succeeded;
- this.InProgress = InProgress;
- }
- return Overview;
- }());
- exports.Overview = Overview;
-});
diff --git a/extension/src/release-details-configuration.js b/extension/src/release-details-configuration.js
deleted file mode 100644
index 62de0c2..0000000
--- a/extension/src/release-details-configuration.js
+++ /dev/null
@@ -1,161 +0,0 @@
-// ---------------------------------------------------------------------
-//
-// This code is licensed under the MIT License.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-// PARTICULAR PURPOSE AND NONINFRINGEMENT.
-//
-//
-// This is part of the TPHealth widget
-// from the ALM Rangers. This file contains the TypeScript
-// code for the configuration page of the details widget.
-//
-// ---------------------------------------------------------------------
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __generator = (this && this.__generator) || function (thisArg, body) {
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
- while (_) try {
- if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
- if (y = 0, t) op = [0, t.value];
- switch (op[0]) {
- case 0: case 1: t = op; break;
- case 4: _.label++; return { value: op[1], done: false };
- case 5: _.label++; y = op[1]; op = [0]; continue;
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
- if (t[2]) _.ops.pop();
- _.trys.pop(); continue;
- }
- op = body.call(thisArg, _);
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
- }
-};
-define(["require", "exports", "ReleaseManagement/Core/Contracts", "ReleaseManagement/Core/RestClient"], function (require, exports, TFS_RM_Contracts, TFS_RM_Client) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- VSS.require(["TFS/Dashboards/WidgetHelpers"], function (WidgetHelpers) {
- WidgetHelpers.IncludeWidgetConfigurationStyles();
- VSS.register("TPHealth-ReleaseDetailsWidget-Configuration", function () {
- var detailsConfigurationWidget = new DetailsConfiguration(WidgetHelpers);
- return detailsConfigurationWidget;
- });
- VSS.notifyLoadSucceeded();
- });
- var DetailsConfiguration = /** @class */ (function () {
- function DetailsConfiguration(WidgetHelpers) {
- this.WidgetHelpers = WidgetHelpers;
- this.widgetConfigurationContext = null;
- this.definitionDropDown = $("#definitionDropDown");
- this.errordropdown = $("#definitionDropDown .validation-error > .validation-error-text");
- this.showRejectedAsFailedCheckbox = $("#showRejectedAsFailed");
- this.showRejectedAsFailed = true;
- }
- DetailsConfiguration.prototype.load = function (widgetSettings, widgetConfigurationContext) {
- return __awaiter(this, void 0, void 0, function () {
- var settings, options, text, self;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- this.widgetConfigurationContext = widgetConfigurationContext;
- settings = JSON.parse(widgetSettings.customSettings.data);
- if (!settings || !settings.definitionId) {
- options = this.definitionDropDown;
- text = "Select a release definition";
- options.append($("").val(-1).text(text));
- }
- if (!!settings) {
- this.showRejectedAsFailed = settings.showRejectedAsFailed;
- }
- this.showRejectedAsFailedCheckbox.prop("checked", this.showRejectedAsFailed);
- return [4 /*yield*/, this.loadReleaseDefinitions(settings)];
- case 1:
- _a.sent();
- this.notifyOnChange(this.definitionDropDown);
- self = this;
- this.showRejectedAsFailedCheckbox.change(function (e) {
- self.showRejectedAsFailed = this.checked;
- self.widgetConfigurationContext.notify(self.WidgetHelpers.WidgetEvent.ConfigurationChange, self.WidgetHelpers.WidgetEvent.Args(self.getCustomSettings()));
- });
- return [2 /*return*/, this.WidgetHelpers.WidgetStatusHelper.Success()];
- }
- });
- });
- };
- DetailsConfiguration.prototype.notifyOnChange = function (control) {
- var _this = this;
- control.change(function () {
- if (_this.validateQueryDropdown(_this.definitionDropDown, _this.errordropdown)) {
- $("#definitionDropDown option[value='-1']").remove();
- _this.widgetConfigurationContext.notify(_this.WidgetHelpers.WidgetEvent.ConfigurationChange, _this.WidgetHelpers.WidgetEvent.Args(_this.getCustomSettings()));
- }
- });
- };
- DetailsConfiguration.prototype.getCustomSettings = function () {
- var data = {
- definitionId: this.definitionDropDown.val(),
- showRejectedAsFailed: this.showRejectedAsFailed,
- };
- return { data: JSON.stringify(data) };
- };
- DetailsConfiguration.prototype.onSave = function () {
- if (this.definitionDropDown.val() === "-1") {
- return this.WidgetHelpers.WidgetConfigurationSave.Invalid();
- }
- return this.WidgetHelpers.WidgetConfigurationSave.Valid(this.getCustomSettings());
- };
- DetailsConfiguration.prototype.loadReleaseDefinitions = function (settings) {
- return __awaiter(this, void 0, void 0, function () {
- var releaseClient, context, defs, options, _i, defs_1, defRef;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- releaseClient = TFS_RM_Client.getClient();
- context = VSS.getWebContext();
- return [4 /*yield*/, releaseClient.getReleaseDefinitions(context.project.id, undefined, undefined, undefined, undefined, undefined, undefined, TFS_RM_Contracts.ReleaseDefinitionQueryOrder.NameAscending)];
- case 1:
- defs = _a.sent();
- options = this.definitionDropDown;
- for (_i = 0, defs_1 = defs; _i < defs_1.length; _i++) {
- defRef = defs_1[_i];
- if (settings && settings.definitionId && defRef.id.toString() === settings.definitionId.toString()) {
- options.append($("").val(defRef.id).text(defRef.name));
- }
- else {
- options.append($("").val(defRef.id).text(defRef.name));
- }
- }
- return [2 /*return*/];
- }
- });
- });
- };
- DetailsConfiguration.prototype.validateQueryDropdown = function ($queryDropdown, $errordropdown) {
- if (this.definitionDropDown.val() === "-1") {
- var text = "Please select a release definition";
- $errordropdown.text(text);
- $errordropdown.parent().css("visibility", "visible");
- return false;
- }
- $errordropdown.parent().css("visibility", "hidden");
- return true;
- };
- return DetailsConfiguration;
- }());
-});
diff --git a/extension/src/release-details.js b/extension/src/release-details.js
deleted file mode 100644
index 713ec23..0000000
--- a/extension/src/release-details.js
+++ /dev/null
@@ -1,163 +0,0 @@
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __generator = (this && this.__generator) || function (thisArg, body) {
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
- while (_) try {
- if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
- if (y = 0, t) op = [0, t.value];
- switch (op[0]) {
- case 0: case 1: t = op; break;
- case 4: _.label++; return { value: op[1], done: false };
- case 5: _.label++; y = op[1]; op = [0]; continue;
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
- if (t[2]) _.ops.pop();
- _.trys.pop(); continue;
- }
- op = body.call(thisArg, _);
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
- }
-};
-define(["require", "exports", "ReleaseManagement/Core/Contracts", "ReleaseManagement/Core/RestClient", "telemetryclient-team-services-extension", "./release-status", "./telemetryClientSettings"], function (require, exports, TFS_RM_Contracts, TFS_RM_Client, tc, ReleaseStatus, telemetryClientSettings) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- VSS.require(["TFS/Dashboards/WidgetHelpers"], function (WidgetHelpers) {
- WidgetHelpers.IncludeWidgetStyles();
- VSS.register("TPHealth-ReleaseDetailsWidget", function () {
- var detailsWidget = new ReleaseDetailsWidget(WidgetHelpers);
- return detailsWidget;
- });
- VSS.notifyLoadSucceeded();
- });
- var ReleaseDetailsWidget = /** @class */ (function () {
- function ReleaseDetailsWidget(WidgetHelpers) {
- this.WidgetHelpers = WidgetHelpers;
- }
- ReleaseDetailsWidget.prototype.load = function (widgetSettings) {
- return __awaiter(this, void 0, void 0, function () {
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- tc.TelemetryClient.getClient(telemetryClientSettings.settings).trackPageView("ReleaseDetails");
- return [4 /*yield*/, this.ShowReleaseDetails(widgetSettings)];
- case 1:
- _a.sent();
- return [2 /*return*/, this.WidgetHelpers.WidgetStatusHelper.Success()];
- }
- });
- });
- };
- ReleaseDetailsWidget.prototype.reload = function (widgetSettings) {
- return __awaiter(this, void 0, void 0, function () {
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0: return [4 /*yield*/, this.ShowReleaseDetails(widgetSettings)];
- case 1:
- _a.sent();
- return [2 /*return*/, this.WidgetHelpers.WidgetStatusHelper.Success()];
- }
- });
- });
- };
- ReleaseDetailsWidget.prototype.ShowReleaseDetails = function (widgetSettings) {
- return __awaiter(this, void 0, void 0, function () {
- var releaseClient, context, customSettings, releases, release;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- releaseClient = TFS_RM_Client.getClient();
- context = VSS.getWebContext();
- customSettings = JSON.parse(widgetSettings.customSettings.data);
- if (!(customSettings != null)) return [3 /*break*/, 2];
- return [4 /*yield*/, releaseClient.getReleases(context.project.id, customSettings.definitionId, null, null, null, null, null, null, null, null, 1, null, TFS_RM_Contracts.ReleaseExpands.Environments)];
- case 1:
- releases = _a.sent();
- if (releases.length >= 1) {
- release = releases[0];
- this.setDetails(release);
- this.setStatus(release, customSettings.showRejectedAsFailed);
- this.setNavigateUrl(release);
- }
- else {
- this.setNoDetails();
- }
- return [3 /*break*/, 3];
- case 2:
- this.setNoDetails();
- _a.label = 3;
- case 3: return [2 /*return*/];
- }
- });
- });
- };
- ReleaseDetailsWidget.prototype.setNavigateUrl = function (release) {
- if (release && release._links && release._links.web) {
- VSS.getService(VSS.ServiceIds.Navigation).then(function (navigationService) {
- $("#definitionNavigateUrl").on("click", function (e) {
- e.preventDefault();
- navigationService.openNewWindow(release._links.web.href, "");
- });
- });
- }
- };
- ReleaseDetailsWidget.prototype.setStatus = function (release, showRejectedAsFailed) {
- var status = ReleaseStatus.ReleaseStatus.getStatus(release, showRejectedAsFailed);
- switch (status) {
- case TFS_RM_Contracts.DeploymentStatus.InProgress:
- this.setStatusCssClass("building", "build-status-building", "build-definition-name-building");
- break;
- case TFS_RM_Contracts.DeploymentStatus.Succeeded:
- this.setStatusCssClass("success", "build-status-succeeded", "build-definition-name-succeeded");
- break;
- case TFS_RM_Contracts.DeploymentStatus.Failed:
- this.setStatusCssClass("fail", "build-status-failed", "build-definition-name-failed");
- break;
- }
- };
- ReleaseDetailsWidget.prototype.setStatusCssClass = function (root, status, definitionName) {
- var $root = $("#root");
- var $releaseStatus = $("#releaseStatus");
- var $releaseDefinitionName = $("#releaseDefinitionName");
- $root.removeClass("success partial fail building");
- $releaseStatus.removeClass("build-status-succeeded build-status-building build-status-failed");
- $root.addClass(root);
- $releaseStatus.addClass(status);
- $releaseDefinitionName.addClass(definitionName);
- };
- ReleaseDetailsWidget.prototype.setNoDetails = function () {
- $("#root").removeClass("success partial fail building");
- $("#root").addClass("no-releases");
- $("#nodata").text("No releases found");
- $("#details").hide();
- };
- ReleaseDetailsWidget.prototype.setDetails = function (release) {
- $("#details").show();
- $("#releaseDefinitionName").text(release.releaseDefinition.name);
- $("#releaseName").text(release.name);
- $("#releaseDescription").text(release.description);
- $("#releaseCreatedBy").text(release.createdBy.displayName);
- $("#nodata").hide();
- $("#root").removeClass("no-releases");
- if (release.releaseDefinition.name.length > 91) {
- $("#releaseDefinitionName").addClass("reallySmall-text");
- }
- };
- return ReleaseDetailsWidget;
- }());
- exports.ReleaseDetailsWidget = ReleaseDetailsWidget;
-});
diff --git a/extension/src/release-overview-configuration.js b/extension/src/release-overview-configuration.js
deleted file mode 100644
index 99b3eaf..0000000
--- a/extension/src/release-overview-configuration.js
+++ /dev/null
@@ -1,118 +0,0 @@
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __generator = (this && this.__generator) || function (thisArg, body) {
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
- while (_) try {
- if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
- if (y = 0, t) op = [0, t.value];
- switch (op[0]) {
- case 0: case 1: t = op; break;
- case 4: _.label++; return { value: op[1], done: false };
- case 5: _.label++; y = op[1]; op = [0]; continue;
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
- if (t[2]) _.ops.pop();
- _.trys.pop(); continue;
- }
- op = body.call(thisArg, _);
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
- }
-};
-define(["require", "exports", "ReleaseManagement/Core/Contracts", "ReleaseManagement/Core/RestClient", "VSS/Controls", "VSS/Controls/Combos"], function (require, exports, TFS_RM_Contracts, TFS_RM_Client, Controls, Combos) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- VSS.require(["TFS/Dashboards/WidgetHelpers"], function (WidgetHelpers) {
- WidgetHelpers.IncludeWidgetConfigurationStyles();
- VSS.register("TPHealth-ReleaseOverviewWidget-Configuration", function () {
- var overviewConfigurationWidget = new OverviewConfiguration(WidgetHelpers);
- return overviewConfigurationWidget;
- });
- VSS.notifyLoadSucceeded();
- });
- var OverviewConfiguration = /** @class */ (function () {
- function OverviewConfiguration(WidgetHelpers) {
- this.WidgetHelpers = WidgetHelpers;
- this.widgetConfigurationContext = null;
- this.combo = null;
- this.buildDefinitionDropDown = $(".build-definition-container");
- this.showRejectedAsFailedCheckbox = $("#showRejectedAsFailed");
- this.showRejectedAsFailed = true;
- }
- OverviewConfiguration.prototype.load = function (widgetSettings, widgetConfigurationContext) {
- return __awaiter(this, void 0, void 0, function () {
- var settings, selectedDefinitions, text, context, releaseClient, defs, names, dropOptions, multiValueOptions, self;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- this.widgetConfigurationContext = widgetConfigurationContext;
- settings = JSON.parse(widgetSettings.customSettings.data);
- selectedDefinitions = null;
- if (!!settings) {
- selectedDefinitions = settings.selectedDefinitions;
- this.showRejectedAsFailed = settings.showRejectedAsFailed;
- }
- this.showRejectedAsFailedCheckbox.prop("checked", this.showRejectedAsFailed);
- text = "Select release definition(s)";
- $("#definitionLegend").text(text);
- context = VSS.getWebContext();
- releaseClient = TFS_RM_Client.getClient();
- return [4 /*yield*/, releaseClient.getReleaseDefinitions(context.project.id, undefined, undefined, undefined, undefined, undefined, undefined, TFS_RM_Contracts.ReleaseDefinitionQueryOrder.NameAscending)];
- case 1:
- defs = _a.sent();
- names = defs.map(function (value) { return value.name; });
- dropOptions = {
- maxRowCount: 4,
- };
- multiValueOptions = {
- dropOptions: dropOptions,
- source: names,
- type: "multi-value",
- value: selectedDefinitions,
- };
- this.combo = Controls.create(Combos.Combo, this.buildDefinitionDropDown, multiValueOptions);
- this.notifyOnChange(this.buildDefinitionDropDown);
- self = this;
- this.showRejectedAsFailedCheckbox.change(function (e) {
- self.showRejectedAsFailed = this.checked;
- self.widgetConfigurationContext.notify(self.WidgetHelpers.WidgetEvent.ConfigurationChange, self.WidgetHelpers.WidgetEvent.Args(self.getCustomSettings()));
- });
- return [2 /*return*/, this.WidgetHelpers.WidgetStatusHelper.Success()];
- }
- });
- });
- };
- OverviewConfiguration.prototype.notifyOnChange = function (control) {
- var _this = this;
- control.change(function () {
- _this.widgetConfigurationContext.notify(_this.WidgetHelpers.WidgetEvent.ConfigurationChange, _this.WidgetHelpers.WidgetEvent.Args(_this.getCustomSettings()));
- });
- };
- OverviewConfiguration.prototype.getCustomSettings = function () {
- var data = {
- selectedDefinitions: this.combo.getText(),
- showRejectedAsFailed: this.showRejectedAsFailed,
- };
- return { data: JSON.stringify(data) };
- };
- OverviewConfiguration.prototype.onSave = function () {
- return this.WidgetHelpers.WidgetConfigurationSave.Valid(this.getCustomSettings());
- };
- return OverviewConfiguration;
- }());
- exports.OverviewConfiguration = OverviewConfiguration;
-});
diff --git a/extension/src/release-overview.js b/extension/src/release-overview.js
deleted file mode 100644
index 545ca62..0000000
--- a/extension/src/release-overview.js
+++ /dev/null
@@ -1,160 +0,0 @@
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __generator = (this && this.__generator) || function (thisArg, body) {
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
- while (_) try {
- if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
- if (y = 0, t) op = [0, t.value];
- switch (op[0]) {
- case 0: case 1: t = op; break;
- case 4: _.label++; return { value: op[1], done: false };
- case 5: _.label++; y = op[1]; op = [0]; continue;
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
- if (t[2]) _.ops.pop();
- _.trys.pop(); continue;
- }
- op = body.call(thisArg, _);
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
- }
-};
-define(["require", "exports", "ReleaseManagement/Core/Contracts", "ReleaseManagement/Core/RestClient", "telemetryclient-team-services-extension", "./overview", "./release-status", "./telemetryClientSettings"], function (require, exports, TFS_RM_Contracts, TFS_RM_Client, tc, overview, ReleaseStatus, telemetryClientSettings) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- VSS.require(["TFS/Dashboards/WidgetHelpers"], function (WidgetHelpers) {
- WidgetHelpers.IncludeWidgetStyles();
- VSS.register("TPHealth-ReleaseOverviewWidget", function () {
- var overviewWidget = new OverviewWidget(WidgetHelpers);
- return overviewWidget;
- });
- VSS.notifyLoadSucceeded();
- });
- var OverviewWidget = /** @class */ (function () {
- function OverviewWidget(WidgetHelpers) {
- this.WidgetHelpers = WidgetHelpers;
- }
- OverviewWidget.prototype.load = function (widgetSettings) {
- return __awaiter(this, void 0, void 0, function () {
- return __generator(this, function (_a) {
- tc.TelemetryClient.getClient(telemetryClientSettings.settings).trackPageView("ReleaseOverview");
- this.ShowOverviewData(widgetSettings);
- return [2 /*return*/, this.WidgetHelpers.WidgetStatusHelper.Success()];
- });
- });
- };
- OverviewWidget.prototype.reload = function (widgetSettings) {
- return __awaiter(this, void 0, void 0, function () {
- return __generator(this, function (_a) {
- this.ShowOverviewData(widgetSettings);
- return [2 /*return*/, this.WidgetHelpers.WidgetStatusHelper.Success()];
- });
- });
- };
- OverviewWidget.prototype.ShowOverviewData = function (widgetSettings) {
- return __awaiter(this, void 0, void 0, function () {
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- $(".title").text(widgetSettings.name);
- return [4 /*yield*/, this.showRelease(widgetSettings)];
- case 1:
- _a.sent();
- return [2 /*return*/];
- }
- });
- });
- };
- OverviewWidget.prototype.showRelease = function (widgetSettings) {
- return __awaiter(this, void 0, void 0, function () {
- var releaseClient, context, overviewData, customSettings, definitions, showRejectedAsFailed, ids, allReleases, _i, ids_1, id, releaseForDefinition;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- releaseClient = TFS_RM_Client.getClient();
- context = VSS.getWebContext();
- overviewData = new overview.Overview(0, 0, 0);
- customSettings = JSON.parse(widgetSettings.customSettings.data);
- return [4 /*yield*/, releaseClient.getReleaseDefinitions(context.project.name)];
- case 1:
- definitions = _a.sent();
- if (!!customSettings && !!customSettings.selectedDefinitions) {
- definitions = definitions.filter(function (def) { return customSettings.selectedDefinitions.indexOf(def.name) !== -1; });
- }
- showRejectedAsFailed = true;
- if (!!customSettings) {
- showRejectedAsFailed = customSettings.showRejectedAsFailed;
- }
- ids = definitions.map(function (value) { return value.id; });
- if (!(ids.length > 0)) return [3 /*break*/, 6];
- allReleases = [];
- _i = 0, ids_1 = ids;
- _a.label = 2;
- case 2:
- if (!(_i < ids_1.length)) return [3 /*break*/, 5];
- id = ids_1[_i];
- return [4 /*yield*/, releaseClient.getReleases(context.project.id, id, null, null, null, null, null, null, null, null, 1, null,
- // tslint:disable-next-line:no-bitwise
- TFS_RM_Contracts.ReleaseExpands.Approvals | TFS_RM_Contracts.ReleaseExpands.Environments)];
- case 3:
- releaseForDefinition = _a.sent();
- allReleases = allReleases.concat(releaseForDefinition);
- _a.label = 4;
- case 4:
- _i++;
- return [3 /*break*/, 2];
- case 5:
- allReleases.forEach(function (release) {
- var status = ReleaseStatus.ReleaseStatus.getStatus(release, showRejectedAsFailed);
- switch (status) {
- case TFS_RM_Contracts.DeploymentStatus.InProgress:
- overviewData.InProgress++;
- break;
- case TFS_RM_Contracts.DeploymentStatus.Succeeded:
- overviewData.Succeeded++;
- break;
- case TFS_RM_Contracts.DeploymentStatus.Failed:
- overviewData.Failed++;
- break;
- }
- });
- $("#failed").text(overviewData.Failed);
- $("#inprogress").text(overviewData.InProgress);
- $("#succeeded").text(overviewData.Succeeded);
- $("#container").removeClass("building success fail");
- if (overviewData.Failed > 0) {
- $("#container").addClass("fail");
- }
- else if (overviewData.InProgress > 0) {
- $("#container").addClass("building");
- }
- else {
- $("#container").addClass("success");
- }
- return [3 /*break*/, 7];
- case 6:
- $("#nodata").text("No release definitions found");
- _a.label = 7;
- case 7: return [2 /*return*/];
- }
- });
- });
- };
- return OverviewWidget;
- }());
- exports.OverviewWidget = OverviewWidget;
-});
diff --git a/extension/src/release-status.js b/extension/src/release-status.js
deleted file mode 100644
index eb79681..0000000
--- a/extension/src/release-status.js
+++ /dev/null
@@ -1,59 +0,0 @@
-define(["require", "exports", "ReleaseManagement/Core/Contracts"], function (require, exports, TFS_RM_Contracts) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var ReleaseStatus = /** @class */ (function () {
- function ReleaseStatus() {
- }
- ReleaseStatus.getStatus = function (release, showRejectedAsFailed) {
- var _this = this;
- var status = TFS_RM_Contracts.DeploymentStatus.Succeeded;
- release.environments.forEach(function (environment) {
- var stepStatus = TFS_RM_Contracts.DeploymentStatus.Succeeded;
- environment.deploySteps.forEach(function (step) {
- stepStatus = _this.getStepStatus(step, showRejectedAsFailed);
- if (stepStatus !== TFS_RM_Contracts.DeploymentStatus.Succeeded) {
- status = stepStatus;
- return false;
- }
- return true;
- });
- if (stepStatus !== TFS_RM_Contracts.DeploymentStatus.Succeeded) {
- status = stepStatus;
- return false;
- }
- return true;
- });
- return status;
- };
- ReleaseStatus.getStepStatus = function (deploymentAttempt, showRejectedAsFailed) {
- if (deploymentAttempt.status === TFS_RM_Contracts.DeploymentStatus.Succeeded) {
- return TFS_RM_Contracts.DeploymentStatus.Succeeded;
- }
- switch (deploymentAttempt.operationStatus) {
- case TFS_RM_Contracts.DeploymentOperationStatus.Approved:
- case TFS_RM_Contracts.DeploymentOperationStatus.Deferred:
- case TFS_RM_Contracts.DeploymentOperationStatus.ManualInterventionPending:
- case TFS_RM_Contracts.DeploymentOperationStatus.Pending:
- case TFS_RM_Contracts.DeploymentOperationStatus.PhaseInProgress:
- case TFS_RM_Contracts.DeploymentOperationStatus.Queued:
- case TFS_RM_Contracts.DeploymentOperationStatus.QueuedForAgent:
- return TFS_RM_Contracts.DeploymentStatus.InProgress;
- case TFS_RM_Contracts.DeploymentOperationStatus.Canceled:
- case TFS_RM_Contracts.DeploymentOperationStatus.PhaseCanceled:
- return TFS_RM_Contracts.DeploymentStatus.NotDeployed;
- case TFS_RM_Contracts.DeploymentOperationStatus.Rejected:
- if (showRejectedAsFailed) {
- return TFS_RM_Contracts.DeploymentStatus.Failed;
- }
- return TFS_RM_Contracts.DeploymentStatus.Succeeded;
- case TFS_RM_Contracts.DeploymentOperationStatus.PhaseFailed:
- return TFS_RM_Contracts.DeploymentStatus.Failed;
- case TFS_RM_Contracts.DeploymentOperationStatus.PhasePartiallySucceeded:
- return TFS_RM_Contracts.DeploymentStatus.PartiallySucceeded;
- }
- return TFS_RM_Contracts.DeploymentStatus.Succeeded;
- };
- return ReleaseStatus;
- }());
- exports.ReleaseStatus = ReleaseStatus;
-});
diff --git a/extension/src/telemetryClientSettings.js b/extension/src/telemetryClientSettings.js
deleted file mode 100644
index 3b31391..0000000
--- a/extension/src/telemetryClientSettings.js
+++ /dev/null
@@ -1,11 +0,0 @@
-define(["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.settings = {
- disableAjaxTracking: "false",
- disableTelemetry: "false",
- enableDebug: "false",
- extensioncontext: "FolderManagement",
- key: "__InstrumentationKey__",
- };
-});
diff --git a/extension/static/build-details-configuration.html b/extension/static/build-details-configuration.html
index cfe9731..8ab53ae 100644
--- a/extension/static/build-details-configuration.html
+++ b/extension/static/build-details-configuration.html
@@ -21,16 +21,37 @@