Include new sort
This commit is contained in:
parent
7c8a296fb3
commit
983448cfb3
@ -59,7 +59,7 @@ What is the relative value to the Customer or business?
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/markdown/with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "business", "Value", "/markdown/PI4-Results/business.json?v=2024-10-07-18-50");
|
initIndex("/markdown/with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "business", "Value", "Business Value", "/markdown/PI4-Results/business.json?v=2024-10-07-18-50");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/markdown/with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "effort", "Effort", "/markdown/PI4-Results/effort.json?v=2024-10-07-18-50");
|
initIndex("/markdown/with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "effort", "Effort", "Effort", "/markdown/PI4-Results/effort.json?v=2024-10-07-18-50");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -59,7 +59,7 @@ What else does this do for our business?
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/markdown/with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "risk", "Risk", "/markdown/PI4-Results/risk.json?v=2024-10-07-18-50");
|
initIndex("/markdown/with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "risk", "Risk", "Risk Reduction and/or Opportunity Enablement", "/markdown/PI4-Results/risk.json?v=2024-10-07-18-50");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -60,7 +60,7 @@ How does user/business value decay over time?
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/markdown/with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "time", "Critical", "/markdown/PI4-Results/time.json?v=2024-10-07-18-50");
|
initIndex("/markdown/with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "time", "Critical", "Time Criticality", "/markdown/PI4-Results/time.json?v=2024-10-07-18-50");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
var _apiUrl = null;
|
var _apiUrl = null;
|
||||||
|
|
||||||
function compareFunction(a, b) {
|
function compareFunction(a, b) {
|
||||||
return b.PollValue.split('-')[0] - a.PollValue.split('-')[0] || a.Priority[0] - b.Priority[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
if (a.BusinessValue === null || b.BusinessValue === null) {
|
||||||
|
var aPollValue = a.PollValue.split('-');
|
||||||
|
var bPollValue = b.PollValue.split('-');
|
||||||
|
return bPollValue[0].trim() - aPollValue[0].trim() || b.State[0] - a.State[0] || bPollValue[bPollValue.length - 1].trim()[0] - aPollValue[aPollValue.length - 1].trim()[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
|
} else {
|
||||||
|
return b.BusinessValue - a.BusinessValue || b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showOne(rowData) {
|
function showOne(rowData) {
|
||||||
@ -151,12 +157,13 @@ function sendValue(element, page, id) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setWorkItems(workItems, page, description) {
|
function setWorkItems(workItems, page, description, th) {
|
||||||
var record;
|
var record;
|
||||||
var html = "<tr><th>Parent Id</th><th>Parent Title</th><th>Id</th><th>Requester</th><th>Title</th><th>Assigned To</th><th>System(s)</th><th>State</th><th>Poll Value</th><th>Value</th><th>Up</th><th>Down</th></tr>";
|
var html = "<tr><th>Parent Id</th><th>Parent Title</th><th>Id</th><th>Requester</th><th>Title</th><th>Assigned To</th><th>System(s)</th><th>State</th><th>Value</th><th>Up</th><th>Down</th><th>Poll Value</th><th>" + th + "</th></tr>";
|
||||||
const element = document.getElementById("HeaderGrid");
|
const element = document.getElementById("HeaderGrid");
|
||||||
for (var i = 0; i < workItems.length; i++) {
|
for (var i = 0; i < workItems.length; i++) {
|
||||||
record = workItems[i];
|
record = workItems[i];
|
||||||
|
var length = record.BusinessValue === null ? "" : record.BusinessValue.toString().length;
|
||||||
html += "<tr><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.ParentId + '">' + record.ParentId + "</a>" +
|
html += "<tr><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.ParentId + '">' + record.ParentId + "</a>" +
|
||||||
"</td><td>" + record.ParentTitle +
|
"</td><td>" + record.ParentTitle +
|
||||||
"</td><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.Id + '">' + record.Id + "</a>" +
|
"</td><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.Id + '">' + record.Id + "</a>" +
|
||||||
@ -165,15 +172,18 @@ function setWorkItems(workItems, page, description) {
|
|||||||
"</td><td>" + record.AssignedTo +
|
"</td><td>" + record.AssignedTo +
|
||||||
"</td><td>" + record.Tags +
|
"</td><td>" + record.Tags +
|
||||||
"</td><td>" + record.State +
|
"</td><td>" + record.State +
|
||||||
"</td><td>" + record.PollValue +
|
|
||||||
"</td><td>" +
|
"</td><td>" +
|
||||||
'<select onchange="sendValue(this, \'' + page + '\', ' + record.Id + ')">' +
|
'<select onchange="sendValue(this, \'' + page + '\', ' + record.Id + ')">' +
|
||||||
'<option value="9">Unknown</option>' +
|
'<option value="9">Unknown</option>' +
|
||||||
'<option value="1">High (Most ' + description + ')</option>' +
|
'<option value="1">High (Most ' + description + ')</option>' +
|
||||||
'<option value="2">Medium</option>' +
|
'<option value="2">Medium</option>' +
|
||||||
'<option value="3">Low</option>' +
|
'<option value="3">Low</option>' +
|
||||||
'</select>' +
|
"</select>" +
|
||||||
"</td><td><a href='#' class='up'>Up</a></td><td><a href='#' class='down'>Down</a></td></tr>";
|
"</td><td><a href='#' class='up'>Up</a>" +
|
||||||
|
"</td><td><a href='#' class='down'>Down</a>" +
|
||||||
|
"</td><td>" + record.PollValue +
|
||||||
|
"</td><td>" + length + " - " + record.BusinessValue +
|
||||||
|
"</td></tr>";
|
||||||
}
|
}
|
||||||
element.innerHTML = html.replaceAll(">null<", "> <");
|
element.innerHTML = html.replaceAll(">null<", "> <");
|
||||||
}
|
}
|
||||||
@ -193,7 +203,7 @@ function updateSite() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function initIndex(url, apiUrl, page, description, urlB) {
|
function initIndex(url, apiUrl, page, description, th, urlB) {
|
||||||
_apiUrl = apiUrl;
|
_apiUrl = apiUrl;
|
||||||
updateSite();
|
updateSite();
|
||||||
$.getJSON(urlB, { _: new Date().getTime() }, function (dataB) {
|
$.getJSON(urlB, { _: new Date().getTime() }, function (dataB) {
|
||||||
@ -202,7 +212,7 @@ function initIndex(url, apiUrl, page, description, urlB) {
|
|||||||
console.log(data.length);
|
console.log(data.length);
|
||||||
if (data.length > 0)
|
if (data.length > 0)
|
||||||
console.log(data[0]);
|
console.log(data[0]);
|
||||||
setWorkItems(workItems, page, description);
|
setWorkItems(workItems, page, description, th);
|
||||||
$(".up,.down").click(function () {
|
$(".up,.down").click(function () {
|
||||||
var row = $(this).parents("tr:first");
|
var row = $(this).parents("tr:first");
|
||||||
if ($(this).is(".up")) {
|
if ($(this).is(".up")) {
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
var _apiUrl = null;
|
var _apiUrl = null;
|
||||||
|
|
||||||
function compareFunction(a, b) {
|
function compareFunction(a, b) {
|
||||||
return b.PollValue.split('-')[0] - a.PollValue.split('-')[0] || a.Priority[0] - b.Priority[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
if (a.Effort === null || b.Effort === null) {
|
||||||
|
var aPollValue = a.PollValue.split('-');
|
||||||
|
var bPollValue = b.PollValue.split('-');
|
||||||
|
return bPollValue[0].trim() - aPollValue[0].trim() || b.State[0] - a.State[0] || bPollValue[bPollValue.length - 1].trim()[0] - aPollValue[aPollValue.length - 1].trim()[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
|
} else {
|
||||||
|
return b.Effort - a.Effort || b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showOne(rowData) {
|
function showOne(rowData) {
|
||||||
@ -151,12 +157,13 @@ function sendValue(element, page, id) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setWorkItems(workItems, page, description) {
|
function setWorkItems(workItems, page, description, th) {
|
||||||
var record;
|
var record;
|
||||||
var html = "<tr><th>Parent Id</th><th>Parent Title</th><th>Id</th><th>Requester</th><th>Title</th><th>Assigned To</th><th>System(s)</th><th>State</th><th>Poll Value</th><th>Value</th><th>Up</th><th>Down</th></tr>";
|
var html = "<tr><th>Parent Id</th><th>Parent Title</th><th>Id</th><th>Requester</th><th>Title</th><th>Assigned To</th><th>System(s)</th><th>State</th><th>Value</th><th>Up</th><th>Down</th><th>Poll Value</th><th>" + th + "</th></tr>";
|
||||||
const element = document.getElementById("HeaderGrid");
|
const element = document.getElementById("HeaderGrid");
|
||||||
for (var i = 0; i < workItems.length; i++) {
|
for (var i = 0; i < workItems.length; i++) {
|
||||||
record = workItems[i];
|
record = workItems[i];
|
||||||
|
var length = record.Effort === null ? "" : record.Effort.toString().length;
|
||||||
html += "<tr><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.ParentId + '">' + record.ParentId + "</a>" +
|
html += "<tr><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.ParentId + '">' + record.ParentId + "</a>" +
|
||||||
"</td><td>" + record.ParentTitle +
|
"</td><td>" + record.ParentTitle +
|
||||||
"</td><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.Id + '">' + record.Id + "</a>" +
|
"</td><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.Id + '">' + record.Id + "</a>" +
|
||||||
@ -165,15 +172,18 @@ function setWorkItems(workItems, page, description) {
|
|||||||
"</td><td>" + record.AssignedTo +
|
"</td><td>" + record.AssignedTo +
|
||||||
"</td><td>" + record.Tags +
|
"</td><td>" + record.Tags +
|
||||||
"</td><td>" + record.State +
|
"</td><td>" + record.State +
|
||||||
"</td><td>" + record.PollValue +
|
|
||||||
"</td><td>" +
|
"</td><td>" +
|
||||||
'<select onchange="sendValue(this, \'' + page + '\', ' + record.Id + ')">' +
|
'<select onchange="sendValue(this, \'' + page + '\', ' + record.Id + ')">' +
|
||||||
'<option value="9">Unknown</option>' +
|
'<option value="9">Unknown</option>' +
|
||||||
'<option value="1">High (Most ' + description + ')</option>' +
|
'<option value="1">High (Most ' + description + ')</option>' +
|
||||||
'<option value="2">Medium</option>' +
|
'<option value="2">Medium</option>' +
|
||||||
'<option value="3">Low</option>' +
|
'<option value="3">Low</option>' +
|
||||||
'</select>' +
|
"</select>" +
|
||||||
"</td><td><a href='#' class='up'>Up</a></td><td><a href='#' class='down'>Down</a></td></tr>";
|
"</td><td><a href='#' class='up'>Up</a>" +
|
||||||
|
"</td><td><a href='#' class='down'>Down</a>" +
|
||||||
|
"</td><td>" + record.PollValue +
|
||||||
|
"</td><td>" + length + " - " + record.Effort +
|
||||||
|
"</td></tr>";
|
||||||
}
|
}
|
||||||
element.innerHTML = html.replaceAll(">null<", "> <");
|
element.innerHTML = html.replaceAll(">null<", "> <");
|
||||||
}
|
}
|
||||||
@ -193,7 +203,7 @@ function updateSite() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function initIndex(url, apiUrl, page, description, urlB) {
|
function initIndex(url, apiUrl, page, description, th, urlB) {
|
||||||
_apiUrl = apiUrl;
|
_apiUrl = apiUrl;
|
||||||
updateSite();
|
updateSite();
|
||||||
$.getJSON(urlB, { _: new Date().getTime() }, function (dataB) {
|
$.getJSON(urlB, { _: new Date().getTime() }, function (dataB) {
|
||||||
@ -202,7 +212,7 @@ function initIndex(url, apiUrl, page, description, urlB) {
|
|||||||
console.log(data.length);
|
console.log(data.length);
|
||||||
if (data.length > 0)
|
if (data.length > 0)
|
||||||
console.log(data[0]);
|
console.log(data[0]);
|
||||||
setWorkItems(workItems, page, description);
|
setWorkItems(workItems, page, description, th);
|
||||||
$(".up,.down").click(function () {
|
$(".up,.down").click(function () {
|
||||||
var row = $(this).parents("tr:first");
|
var row = $(this).parents("tr:first");
|
||||||
if ($(this).is(".up")) {
|
if ($(this).is(".up")) {
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
var _apiUrl = null;
|
var _apiUrl = null;
|
||||||
|
|
||||||
function compareFunction(a, b) {
|
function compareFunction(a, b) {
|
||||||
return b.PollValue.split('-')[0] - a.PollValue.split('-')[0] || a.Priority[0] - b.Priority[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
if (a.RiskReductionMinusOpportunityEnablement === null || b.RiskReductionMinusOpportunityEnablement === null) {
|
||||||
|
var aPollValue = a.PollValue.split('-');
|
||||||
|
var bPollValue = b.PollValue.split('-');
|
||||||
|
return bPollValue[0].trim() - aPollValue[0].trim() || b.State[0] - a.State[0] || bPollValue[bPollValue.length - 1].trim()[0] - aPollValue[aPollValue.length - 1].trim()[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
|
} else {
|
||||||
|
return b.RiskReductionMinusOpportunityEnablement - a.RiskReductionMinusOpportunityEnablement || b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showOne(rowData) {
|
function showOne(rowData) {
|
||||||
@ -151,12 +157,13 @@ function sendValue(element, page, id) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setWorkItems(workItems, page, description) {
|
function setWorkItems(workItems, page, description, th) {
|
||||||
var record;
|
var record;
|
||||||
var html = "<tr><th>Parent Id</th><th>Parent Title</th><th>Id</th><th>Requester</th><th>Title</th><th>Assigned To</th><th>System(s)</th><th>State</th><th>Poll Value</th><th>Value</th><th>Up</th><th>Down</th></tr>";
|
var html = "<tr><th>Parent Id</th><th>Parent Title</th><th>Id</th><th>Requester</th><th>Title</th><th>Assigned To</th><th>System(s)</th><th>State</th><th>Value</th><th>Up</th><th>Down</th><th>Poll Value</th><th>" + th + "</th></tr>";
|
||||||
const element = document.getElementById("HeaderGrid");
|
const element = document.getElementById("HeaderGrid");
|
||||||
for (var i = 0; i < workItems.length; i++) {
|
for (var i = 0; i < workItems.length; i++) {
|
||||||
record = workItems[i];
|
record = workItems[i];
|
||||||
|
var length = record.RiskReductionMinusOpportunityEnablement === null ? "" : record.RiskReductionMinusOpportunityEnablement.toString().length;
|
||||||
html += "<tr><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.ParentId + '">' + record.ParentId + "</a>" +
|
html += "<tr><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.ParentId + '">' + record.ParentId + "</a>" +
|
||||||
"</td><td>" + record.ParentTitle +
|
"</td><td>" + record.ParentTitle +
|
||||||
"</td><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.Id + '">' + record.Id + "</a>" +
|
"</td><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.Id + '">' + record.Id + "</a>" +
|
||||||
@ -165,15 +172,18 @@ function setWorkItems(workItems, page, description) {
|
|||||||
"</td><td>" + record.AssignedTo +
|
"</td><td>" + record.AssignedTo +
|
||||||
"</td><td>" + record.Tags +
|
"</td><td>" + record.Tags +
|
||||||
"</td><td>" + record.State +
|
"</td><td>" + record.State +
|
||||||
"</td><td>" + record.PollValue +
|
|
||||||
"</td><td>" +
|
"</td><td>" +
|
||||||
'<select onchange="sendValue(this, \'' + page + '\', ' + record.Id + ')">' +
|
'<select onchange="sendValue(this, \'' + page + '\', ' + record.Id + ')">' +
|
||||||
'<option value="9">Unknown</option>' +
|
'<option value="9">Unknown</option>' +
|
||||||
'<option value="1">High (Most ' + description + ')</option>' +
|
'<option value="1">High (Most ' + description + ')</option>' +
|
||||||
'<option value="2">Medium</option>' +
|
'<option value="2">Medium</option>' +
|
||||||
'<option value="3">Low</option>' +
|
'<option value="3">Low</option>' +
|
||||||
'</select>' +
|
"</select>" +
|
||||||
"</td><td><a href='#' class='up'>Up</a></td><td><a href='#' class='down'>Down</a></td></tr>";
|
"</td><td><a href='#' class='up'>Up</a>" +
|
||||||
|
"</td><td><a href='#' class='down'>Down</a>" +
|
||||||
|
"</td><td>" + record.PollValue +
|
||||||
|
"</td><td>" + length + " - " + record.RiskReductionMinusOpportunityEnablement +
|
||||||
|
"</td></tr>";
|
||||||
}
|
}
|
||||||
element.innerHTML = html.replaceAll(">null<", "> <");
|
element.innerHTML = html.replaceAll(">null<", "> <");
|
||||||
}
|
}
|
||||||
@ -193,7 +203,7 @@ function updateSite() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function initIndex(url, apiUrl, page, description, urlB) {
|
function initIndex(url, apiUrl, page, description, th, urlB) {
|
||||||
_apiUrl = apiUrl;
|
_apiUrl = apiUrl;
|
||||||
updateSite();
|
updateSite();
|
||||||
$.getJSON(urlB, { _: new Date().getTime() }, function (dataB) {
|
$.getJSON(urlB, { _: new Date().getTime() }, function (dataB) {
|
||||||
@ -202,7 +212,7 @@ function initIndex(url, apiUrl, page, description, urlB) {
|
|||||||
console.log(data.length);
|
console.log(data.length);
|
||||||
if (data.length > 0)
|
if (data.length > 0)
|
||||||
console.log(data[0]);
|
console.log(data[0]);
|
||||||
setWorkItems(workItems, page, description);
|
setWorkItems(workItems, page, description, th);
|
||||||
$(".up,.down").click(function () {
|
$(".up,.down").click(function () {
|
||||||
var row = $(this).parents("tr:first");
|
var row = $(this).parents("tr:first");
|
||||||
if ($(this).is(".up")) {
|
if ($(this).is(".up")) {
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
var _apiUrl = null;
|
var _apiUrl = null;
|
||||||
|
|
||||||
function compareFunction(a, b) {
|
function compareFunction(a, b) {
|
||||||
return b.PollValue.split('-')[0] - a.PollValue.split('-')[0] || a.Priority[0] - b.Priority[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
if (a.TimeCriticality === null || b.TimeCriticality === null) {
|
||||||
|
var aPollValue = a.PollValue.split('-');
|
||||||
|
var bPollValue = b.PollValue.split('-');
|
||||||
|
return bPollValue[0].trim() - aPollValue[0].trim() || b.State[0] - a.State[0] || bPollValue[bPollValue.length - 1].trim()[0] - aPollValue[aPollValue.length - 1].trim()[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
|
} else {
|
||||||
|
return b.TimeCriticality - a.TimeCriticality || b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showOne(rowData) {
|
function showOne(rowData) {
|
||||||
@ -151,12 +157,13 @@ function sendValue(element, page, id) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setWorkItems(workItems, page, description) {
|
function setWorkItems(workItems, page, description, th) {
|
||||||
var record;
|
var record;
|
||||||
var html = "<tr><th>Parent Id</th><th>Parent Title</th><th>Id</th><th>Requester</th><th>Title</th><th>Assigned To</th><th>System(s)</th><th>State</th><th>Poll Value</th><th>Value</th><th>Up</th><th>Down</th></tr>";
|
var html = "<tr><th>Parent Id</th><th>Parent Title</th><th>Id</th><th>Requester</th><th>Title</th><th>Assigned To</th><th>System(s)</th><th>State</th><th>Value</th><th>Up</th><th>Down</th><th>Poll Value</th><th>" + th + "</th></tr>";
|
||||||
const element = document.getElementById("HeaderGrid");
|
const element = document.getElementById("HeaderGrid");
|
||||||
for (var i = 0; i < workItems.length; i++) {
|
for (var i = 0; i < workItems.length; i++) {
|
||||||
record = workItems[i];
|
record = workItems[i];
|
||||||
|
var length = record.TimeCriticality === null ? "" : record.TimeCriticality.toString().length;
|
||||||
html += "<tr><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.ParentId + '">' + record.ParentId + "</a>" +
|
html += "<tr><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.ParentId + '">' + record.ParentId + "</a>" +
|
||||||
"</td><td>" + record.ParentTitle +
|
"</td><td>" + record.ParentTitle +
|
||||||
"</td><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.Id + '">' + record.Id + "</a>" +
|
"</td><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.Id + '">' + record.Id + "</a>" +
|
||||||
@ -165,15 +172,18 @@ function setWorkItems(workItems, page, description) {
|
|||||||
"</td><td>" + record.AssignedTo +
|
"</td><td>" + record.AssignedTo +
|
||||||
"</td><td>" + record.Tags +
|
"</td><td>" + record.Tags +
|
||||||
"</td><td>" + record.State +
|
"</td><td>" + record.State +
|
||||||
"</td><td>" + record.PollValue +
|
|
||||||
"</td><td>" +
|
"</td><td>" +
|
||||||
'<select onchange="sendValue(this, \'' + page + '\', ' + record.Id + ')">' +
|
'<select onchange="sendValue(this, \'' + page + '\', ' + record.Id + ')">' +
|
||||||
'<option value="9">Unknown</option>' +
|
'<option value="9">Unknown</option>' +
|
||||||
'<option value="1">High (Most ' + description + ')</option>' +
|
'<option value="1">High (Most ' + description + ')</option>' +
|
||||||
'<option value="2">Medium</option>' +
|
'<option value="2">Medium</option>' +
|
||||||
'<option value="3">Low</option>' +
|
'<option value="3">Low</option>' +
|
||||||
'</select>' +
|
"</select>" +
|
||||||
"</td><td><a href='#' class='up'>Up</a></td><td><a href='#' class='down'>Down</a></td></tr>";
|
"</td><td><a href='#' class='up'>Up</a>" +
|
||||||
|
"</td><td><a href='#' class='down'>Down</a>" +
|
||||||
|
"</td><td>" + record.PollValue +
|
||||||
|
"</td><td>" + length + " - " + record.TimeCriticality +
|
||||||
|
"</td></tr>";
|
||||||
}
|
}
|
||||||
element.innerHTML = html.replaceAll(">null<", "> <");
|
element.innerHTML = html.replaceAll(">null<", "> <");
|
||||||
}
|
}
|
||||||
@ -193,7 +203,7 @@ function updateSite() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function initIndex(url, apiUrl, page, description, urlB) {
|
function initIndex(url, apiUrl, page, description, th, urlB) {
|
||||||
_apiUrl = apiUrl;
|
_apiUrl = apiUrl;
|
||||||
updateSite();
|
updateSite();
|
||||||
$.getJSON(urlB, { _: new Date().getTime() }, function (dataB) {
|
$.getJSON(urlB, { _: new Date().getTime() }, function (dataB) {
|
||||||
@ -202,7 +212,7 @@ function initIndex(url, apiUrl, page, description, urlB) {
|
|||||||
console.log(data.length);
|
console.log(data.length);
|
||||||
if (data.length > 0)
|
if (data.length > 0)
|
||||||
console.log(data[0]);
|
console.log(data[0]);
|
||||||
setWorkItems(workItems, page, description);
|
setWorkItems(workItems, page, description, th);
|
||||||
$(".up,.down").click(function () {
|
$(".up,.down").click(function () {
|
||||||
var row = $(this).parents("tr:first");
|
var row = $(this).parents("tr:first");
|
||||||
if ($(this).is(".up")) {
|
if ($(this).is(".up")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user