This commit is contained in:
2024-09-07 10:04:57 -07:00
parent 390090729b
commit 2301a9a9ee
31 changed files with 1121 additions and 1913 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -4,30 +4,11 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>FI Backlog Mesa</title>
<link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?v=2023-06-09-15-01" rel="stylesheet" />
<link href="/igniteui/css/structure/infragistics.css?v=2023-06-09-15-01" rel="stylesheet" />
<script src="/js/jquery-3.6.0.min.js?v=2023-06-09-15-01" type="text/javascript"></script>
<script src="/js/jquery-ui.min.js?v=2023-06-09-15-01" type="text/javascript"></script>
<script src="/js/site.js?v=2023-06-09-15-01" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.core.js?v=2023-06-09-15-01" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.lob.js?v=2023-06-09-15-01" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.dv.js?v=2023-06-09-15-01" type="text/javascript"></script>
<title>FI Backlog</title>
</head>
<body>
<h2>FI Backlog Mesa</h2>
<div style="height: 550px;" id="HeaderGridDiv">
<table id="HeaderGrid"></table>
</div>
<script>
$(document).ready(function () {
initIndex("/json/data.json");
});
</script>
<h2><a href="mes.html">FI Backlog Mesa</a></h2>
<h2><a href="leo.html">FI Backlog HiRel (Leominster)</a></h2>
</body>
</html>

View File

@ -0,0 +1,159 @@
function compareFunction(a, b) {
return a.Priority[0] - b.Priority[0] || a.TimeCriticality[0] - b.TimeCriticality[0] || b.State[0] - a.State[0] || a.Id - b.Id;
}
function showOne(rowData) {
if (rowData == null)
return;
var data = [];
data.push({ name: "ADO Edit", value: '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + rowData["Id"] + '">' + rowData["Id"] + '</a>' });
for (const property in rowData) {
if (rowData[property] == null)
continue;
data.push({ name: property, value: rowData[property].toString() });
}
$("#AllGrid").igGrid({
autoGenerateColumns: true,
dataSource: data,
width: "100%",
showHeader: false,
});
}
function loadOne() {
var selectedRow = $("#HeaderGrid").data("igGridSelection").selectedRow();
if (selectedRow == null)
return;
var rowData = $("#HeaderGrid").data("igGrid").dataSource.dataView()[selectedRow.index];
showOne(rowData);
}
function detailSelectionChangedRunInfo(evt, ui) {
if (ui.row.index === 0)
return;
var rowData = ui.owner.grid.dataSource.dataView()[ui.row.index];
showOne(rowData);
}
function getState(state) {
var result;
if (state == null)
result = "9-Null";
else if (state === "New")
result = `1-${state}`;
else if (state === "Active")
result = `2-${state}`;
else if (state === "Resolved")
result = `3-${state}`;
else if (state === "Closed")
result = `4-${state}`;
else if (state === "Removed")
result = `5-${state}`;
else
result = `8-${state}`;
return result;
}
function getPriority(workItemType, priority) {
var result;
if (workItemType === "Bug")
result = "0-Bug";
else if (priority == null || priority === 0)
result = "9-Null";
else if (priority === 1)
result = `${priority}-High`;
else if (priority === 2)
result = `${priority}-Med`;
else if (priority === 3)
result = `${priority}-Low`;
else if (priority === 4)
result = `${priority}-TBD`;
else
result = "8-Not";
return result;
}
function getTimeCriticality(workItemType, timeCriticality) {
var result;
if (workItemType === "Bug")
result = "0-Bug";
else if (timeCriticality == null || timeCriticality === 0)
result = "9-Null";
else if (timeCriticality === 1)
result = `${timeCriticality}-QSM`;
else if (timeCriticality === 2)
result = `${timeCriticality}-Qual`;
else if (timeCriticality === 3)
result = `${timeCriticality}-Eff`;
else
result = "8-Not";
return result;
}
function getWorkItems(data) {
var workItems = [];
var workItem;
for (var i = data.length - 1; i > -1; i--) {
workItem = data[i];
if (workItem.AreaPath !== 'ART SPS\\LEO')
continue;
if (workItem.WorkItemType !== 'Feature' && workItem.WorkItemType !== 'Bug')
continue;
workItem["State"] = getState(workItem["State"])
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
workItem["TimeCriticality"] = getTimeCriticality(workItem["WorkItemType"], workItem["TimeCriticality"])
workItems.push(workItem);
}
workItems.sort(compareFunction);
return workItems;
}
function initIndex(url) {
$.getJSON(url, { _: new Date().getTime() }, function (data) {
var workItems = getWorkItems(data);
console.log(data.length);
if (data.length > 0)
console.log(data[0]);
$("#HeaderGrid").igGrid({
autoGenerateColumns: false,
dataSource: workItems,
height: "100%",
primaryKey: "Id",
width: "100%",
columns: [
{ key: "Id", dataType: "number" },
{ key: "Requester", dataType: "string" },
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
{ key: "Title", dataType: "string", width: "20%" },
{ headerText: "System(s)", key: "Tags", dataType: "string" },
{ key: "Priority", dataType: "string" },
{ headerText: "Qual/Eff", key: "TimeCriticality", dataType: "string" },
{ key: "State", dataType: "string" },
{ headerText: "Effort in Days", key: "Effort", dataType: "number" },
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
{ key: "AreaPath", dataType: "string", hidden: true },
{ key: "AssignedTo", dataType: "string", hidden: true },
{ key: "BusinessValue", dataType: "number", hidden: true },
{ key: "ChangedDate", dataType: "string", hidden: true },
{ key: "CommentCount", dataType: "number", hidden: true },
{ key: "CreatedDate", dataType: "string", hidden: true },
{ key: "Description", dataType: "string", hidden: true },
{ key: "IterationPath", dataType: "string", hidden: true },
{ key: "Revision", dataType: "number", hidden: true },
{ key: "RiskReductionMinusOpportunityEnablement", dataType: "string", hidden: true },
{ key: "StartDate", dataType: "string", hidden: true },
{ key: "WorkItemType", dataType: "string", hidden: true },
{ key: "WeightedShortestJobFirst", dataType: "number", hidden: true },
],
features: [
{ name: "Sorting", type: "local" },
{ name: "Filtering", type: "local" },
{ name: "Selection", mode: "row", multipleSelection: false, rowSelectionChanging: detailSelectionChangedRunInfo },
{ name: "Paging", type: "local", recordCountKey: "TotalRows", pageSize: 10, pageSizeUrlKey: "pageSize", "pageIndexUrlKey": "page", showPageSizeDropDown: false },
],
});
});
$("#HeaderGrid").on("dblclick", "tr", loadOne);
}

View File

@ -0,0 +1,159 @@
function compareFunction(a, b) {
return a.Priority[0] - b.Priority[0] || a.TimeCriticality[0] - b.TimeCriticality[0] || b.State[0] - a.State[0] || a.Id - b.Id;
}
function showOne(rowData) {
if (rowData == null)
return;
var data = [];
data.push({ name: "Edit in ADO", value: '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + rowData["Id"] + '">Edit in ADO ' + rowData["Id"] + '</a>' });
for (const property in rowData) {
if (rowData[property] == null)
continue;
data.push({ name: property, value: rowData[property].toString() });
}
$("#AllGrid").igGrid({
autoGenerateColumns: true,
dataSource: data,
width: "100%",
showHeader: false,
});
}
function loadOne() {
var selectedRow = $("#HeaderGrid").data("igGridSelection").selectedRow();
if (selectedRow == null)
return;
var rowData = $("#HeaderGrid").data("igGrid").dataSource.dataView()[selectedRow.index];
showOne(rowData);
}
function detailSelectionChangedRunInfo(evt, ui) {
if (ui.row.index === 0)
return;
var rowData = ui.owner.grid.dataSource.dataView()[ui.row.index];
showOne(rowData);
}
function getState(state) {
var result;
if (state == null)
result = "9-Null";
else if (state === "New")
result = `1-${state}`;
else if (state === "Active")
result = `2-${state}`;
else if (state === "Resolved")
result = `3-${state}`;
else if (state === "Closed")
result = `4-${state}`;
else if (state === "Removed")
result = `5-${state}`;
else
result = `8-${state}`;
return result;
}
function getPriority(workItemType, priority) {
var result;
if (workItemType === "Bug")
result = "0-Bug";
else if (priority == null || priority === 0)
result = "9-Null";
else if (priority === 1)
result = `${priority}-High`;
else if (priority === 2)
result = `${priority}-Med`;
else if (priority === 3)
result = `${priority}-Low`;
else if (priority === 4)
result = `${priority}-TBD`;
else
result = "8-Not";
return result;
}
function getTimeCriticality(workItemType, timeCriticality) {
var result;
if (workItemType === "Bug")
result = "0-Bug";
else if (timeCriticality == null || timeCriticality === 0)
result = "9-Null";
else if (timeCriticality === 1)
result = `${timeCriticality}-QSM`;
else if (timeCriticality === 2)
result = `${timeCriticality}-Qual`;
else if (timeCriticality === 3)
result = `${timeCriticality}-Eff`;
else
result = "8-Not";
return result;
}
function getWorkItems(data) {
var workItems = [];
var workItem;
for (var i = data.length - 1; i > -1; i--) {
workItem = data[i];
if (workItem.AreaPath !== 'ART SPS\\MES')
continue;
if (workItem.WorkItemType !== 'Feature' && workItem.WorkItemType !== 'Bug')
continue;
workItem["State"] = getState(workItem["State"])
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
workItem["TimeCriticality"] = getTimeCriticality(workItem["WorkItemType"], workItem["TimeCriticality"])
workItems.push(workItem);
}
workItems.sort(compareFunction);
return workItems;
}
function initIndex(url) {
$.getJSON(url, { _: new Date().getTime() }, function (data) {
var workItems = getWorkItems(data);
console.log(data.length);
if (data.length > 0)
console.log(data[0]);
$("#HeaderGrid").igGrid({
autoGenerateColumns: false,
dataSource: workItems,
height: "100%",
primaryKey: "Id",
width: "100%",
columns: [
{ key: "Id", dataType: "number" },
{ key: "Requester", dataType: "string" },
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
{ key: "Title", dataType: "string", width: "20%" },
{ headerText: "System(s)", key: "Tags", dataType: "string" },
{ key: "Priority", dataType: "string" },
{ headerText: "Qual/Eff", key: "TimeCriticality", dataType: "string" },
{ key: "State", dataType: "string" },
{ headerText: "Effort in Days", key: "Effort", dataType: "number" },
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
{ key: "AreaPath", dataType: "string", hidden: true },
{ key: "AssignedTo", dataType: "string", hidden: true },
{ key: "BusinessValue", dataType: "number", hidden: true },
{ key: "ChangedDate", dataType: "string", hidden: true },
{ key: "CommentCount", dataType: "number", hidden: true },
{ key: "CreatedDate", dataType: "string", hidden: true },
{ key: "Description", dataType: "string", hidden: true },
{ key: "IterationPath", dataType: "string", hidden: true },
{ key: "Revision", dataType: "number", hidden: true },
{ key: "RiskReductionMinusOpportunityEnablement", dataType: "string", hidden: true },
{ key: "StartDate", dataType: "string", hidden: true },
{ key: "WorkItemType", dataType: "string", hidden: true },
{ key: "WeightedShortestJobFirst", dataType: "number", hidden: true },
],
features: [
{ name: "Sorting", type: "local" },
{ name: "Filtering", type: "local" },
{ name: "Selection", mode: "row", multipleSelection: false, rowSelectionChanging: detailSelectionChangedRunInfo },
{ name: "Paging", type: "local", recordCountKey: "TotalRows", pageSize: 10, pageSizeUrlKey: "pageSize", "pageIndexUrlKey": "page", showPageSizeDropDown: false },
],
});
});
$("#HeaderGrid").on("dblclick", "tr", loadOne);
}

View File

@ -1,36 +0,0 @@
function compareFunction(a, b) {
return a['Priority'][0] - b['Priority'][0] || a['Req '].length - b['Req '].length || a['Req '] - b['Req '];
}
function initIndex(url) {
$.getJSON(url, function (data) {
for (var i = data.length - 1; i > -1; i--) {
if (data[i].Submitted !== '')
continue;
data.splice(i, 1);
}
data.sort(compareFunction);
$("#HeaderGrid").igGrid({
autoGenerateColumns: false,
dataSource: data,
height: "100%",
width: "100%",
columns: [
{ key: "Req", dataType: "number" },
{ key: "Submitted", dataType: "date", format: "date" },
{ key: "Requestor", dataType: "string" },
{ key: "Assigned To", dataType: "string" },
{ key: "Second Resource", dataType: "string" },
{ key: "Subject - from Requestor", dataType: "string" },
{ key: "System(s)", dataType: "string" },
{ key: "Priority", dataType: "string" },
],
features: [
{ name: "Paging", type: "local", recordCountKey: "TotalRows", pageSize: 25, pageSizeUrlKey: "pageSize", "pageIndexUrlKey": "page", showPageSizeDropDown: false },
{ name: "Selection", mode: "row", multipleSelection: false },
{ name: "Filtering", type: "local" },
{ name: "Sorting", type: "local" },
],
});
});
}

View File

@ -1,36 +0,0 @@
[
{
"Req": "",
"Submitted": "",
"Requestor": "",
"Assigned To": "",
"Second Resource": "",
"Subject - from Requestor": null,
"Epi Line": null,
"Area": null,
"System(s)": "",
"Priority": "",
"Status": "",
"Definition": null,
"Updates": "",
"Est Effort _(days)": "",
"Commit Date": "",
"Re-Commit Date": "",
"UAT as of": "",
"CMP Date": null,
"F20": "",
"F21": "",
"F22": "",
"F23": "",
"F24": "",
"F25": "",
"F26": "",
"F27": "",
"F28": "",
"F29": "",
"F30": "",
"F31": "",
"F32": "",
"F33": ""
}
]

View File

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>FI Backlog HiRel (Leominster)</title>
<link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?v=2024-09-07-08-19" rel="stylesheet" />
<link href="/igniteui/css/structure/infragistics.css?v=2024-09-07-08-19" rel="stylesheet" />
<script src="/js/jquery-3.6.0.min.js?v=2024-09-07-08-19" type="text/javascript"></script>
<script src="/js/jquery-ui.min.js?v=2024-09-07-08-19" type="text/javascript"></script>
<script src="/js/leo.js?v=2024-09-07-08-19" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.core.js?v=2024-09-07-08-19" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.lob.js?v=2024-09-07-08-19" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.dv.js?v=2024-09-07-08-19" type="text/javascript"></script>
</head>
<body>
<h2>FI Backlog HiRel (Leominster)</h2>
<div style="height: 550px;" id="HeaderGridDiv">
<table id="HeaderGrid"></table>
</div>
<br />&nbsp;
<div id="AllGridDiv">
<table id="AllGrid"></table>
</div>
<script>
$(document).ready(function () {
initIndex("/json/work-items.json?v=2024-09-07-08-19");
});
</script>
</body>
</html>

View File

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>FI Backlog Mesa</title>
<link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?v=2024-09-07-08-19" rel="stylesheet" />
<link href="/igniteui/css/structure/infragistics.css?v=2024-09-07-08-19" rel="stylesheet" />
<script src="/js/jquery-3.6.0.min.js?v=2024-09-07-08-19" type="text/javascript"></script>
<script src="/js/jquery-ui.min.js?v=2024-09-07-08-19" type="text/javascript"></script>
<script src="/js/mes.js?v=2024-09-07-08-19" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.core.js?v=2024-09-07-08-19" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.lob.js?v=2024-09-07-08-19" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.dv.js?v=2024-09-07-08-19" type="text/javascript"></script>
</head>
<body>
<h2>FI Backlog Mesa</h2>
<div style="height: 550px;" id="HeaderGridDiv">
<table id="HeaderGrid"></table>
</div>
<br />&nbsp;
<div id="AllGridDiv">
<table id="AllGrid"></table>
</div>
<script>
$(document).ready(function () {
initIndex("/json/work-items.json?v=2024-09-07-08-19");
});
</script>
</body>
</html>