in build-inspector/src/inspector/associatedItemsGrid.ts [27:57]
public initialize(): void {
super.initialize();
var commitData = [];
this._element.append($("<div/>").addClass("grid-caption").append("Associated Commits"));
// Parse the nodes
this._options.associatedChanges.forEach((change: TFS_Build_Contracts.Change) => {
commitData.push({
"author": change.author.displayName,
"comment": change.message,
"commitId": change.id,
"commitDate": change.timestamp
});
});
if (commitData.length === 0) {
this._element.addClass('message-area-control info-message').text("No commits are associated with this build.")
} else {
// Create the grid with a few options. One of which is the source data.
Grids.Grid.createIn(this._element, {
height: "400px",
source: commitData,
columns: [
{ text: "Date", index: "commitDate", width: 200 },
{ text: "Author", index: "author", width: 140 },
{ text: "Commit Id", index: "commitId", width: 270 },
{ text: "Comment", index: "comment", width: 250 }
]
});
}
}