mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Add a Link to select the entity.
Add a Link to select the entity. So the user can edit each entity listed in the report by clicking on it. This select the entity.
This commit is contained in:
parent
ec04f06816
commit
f8d93a8429
2 changed files with 60 additions and 9 deletions
|
@ -12,7 +12,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<style>
|
||||
body{
|
||||
body {
|
||||
background-color:#000000;
|
||||
color:#ffffff;
|
||||
font-family: Helvetica, Arial, Sans-Serif;
|
||||
|
@ -21,30 +21,57 @@
|
|||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
h1{
|
||||
h1 {
|
||||
font-size: 18px;
|
||||
font-weight: 900;
|
||||
}
|
||||
table{
|
||||
table {
|
||||
text-align: left;
|
||||
width:96%;
|
||||
border: 1px solid #DDDDDD;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
td{
|
||||
td {
|
||||
border: 1px solid #DDDDDD;
|
||||
padding: 3px;
|
||||
}
|
||||
td.superheader{
|
||||
td.superheader {
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
font-weight: 900;
|
||||
background-color:#999999;
|
||||
}
|
||||
td.header{
|
||||
td.header {
|
||||
font-weight: 900;
|
||||
background-color:#777777;
|
||||
}
|
||||
a {
|
||||
font-size: 22px;
|
||||
font-weight: 500;
|
||||
}
|
||||
a:link {
|
||||
color: #00b3ff;
|
||||
background-color: transparent;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #00b3ff;
|
||||
background-color: transparent;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #99e1ff;
|
||||
background-color: transparent;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:active {
|
||||
color: #99e1ff;
|
||||
background-color: transparent;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -64,5 +91,12 @@
|
|||
EventBridge.scriptEventReceived.connect(function (message) {
|
||||
document.getElementById("report").innerHTML = message;
|
||||
});
|
||||
|
||||
function selectEntity(id) {
|
||||
EventBridge.emitWebEvent(JSON.stringify({
|
||||
"action": "select",
|
||||
"entityID": id
|
||||
}));
|
||||
}
|
||||
</script>
|
||||
</html>
|
|
@ -60,13 +60,14 @@ function brokenUrlReportGenerateFormatedReport(brokenUrlReportInvalideUrlList) {
|
|||
brokenUrlReportContent = brokenUrlReportContent + " <table>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <tr>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td class='superheader'> </td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td class='superheader' colspan='2'>Entity</td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td class='superheader' colspan='3'>Entity</td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td class='superheader' colspan='3'>Broken Url</td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " </tr>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <tr>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td class='header'>No</td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td class='header'>Type</td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td class='header'>Name & ID</td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td class='header'> </td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td class='header'>Property</td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td class='header'>Status</td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td class='header'>Current URL</td>\n";
|
||||
|
@ -76,8 +77,9 @@ function brokenUrlReportGenerateFormatedReport(brokenUrlReportInvalideUrlList) {
|
|||
brokenUrlReportContent = brokenUrlReportContent + " <td style='color: #999999; width: 5%;'>" + (i + 1) + "</td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td style='width: 10%;'>" + brokenUrlReportInvalideUrlList[i].type + "</td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td style='width: 40%;'>" + brokenUrlReportInvalideUrlList[i].name + "<br><font color='#999999'>" + brokenUrlReportInvalideUrlList[i].id + "</font></td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td style='width: 2%;'><a href='' onclick='selectEntity(" + '"' + brokenUrlReportInvalideUrlList[i].id + '"' + "); return false;'>✎</a></td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td style='color: " + brokenUrlReportGetUrlTypeColor(brokenUrlReportInvalideUrlList[i].urlType) + "; width: 10%;'>" + brokenUrlReportInvalideUrlList[i].urlType + "</td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td style='background-color: #FF0000; color: #FFFFFF; width: 10%;'>" + brokenUrlReportInvalideUrlList[i].validity + "</td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td style='background-color: #FF0000; color: #FFFFFF; width: 8%;'>" + brokenUrlReportInvalideUrlList[i].validity + "</td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " <td style='word-wrap: break-word; width:200px;'>" + brokenUrlReportInvalideUrlList[i].url + "</td>\n";
|
||||
brokenUrlReportContent = brokenUrlReportContent + " </tr>\n";
|
||||
}
|
||||
|
@ -356,14 +358,29 @@ function brokenUrlReport(entityIds) {
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (brokenUrlReportOverlayWebWindow !== undefined) {
|
||||
brokenUrlReportOverlayWebWindow.close();
|
||||
}
|
||||
brokenUrlReportOverlayWebWindow = new OverlayWebWindow({
|
||||
title: "Broken Url Report",
|
||||
source: Script.resolvePath("brokenUrlReport.html"),
|
||||
width: 1000,
|
||||
height: 600
|
||||
});
|
||||
});
|
||||
brokenUrlReportContent = "";
|
||||
brokenUrlReportRequestUrlValidityCheck(brokenUrlReportProcessedUrlNo);
|
||||
}
|
||||
}
|
||||
|
||||
brokenUrlReportOverlayWebWindow.webEventReceived.connect(function (message) {
|
||||
try {
|
||||
var data = JSON.parse(message);
|
||||
} catch(e) {
|
||||
print("brokenUrlReport.js: Error parsing JSON");
|
||||
return;
|
||||
}
|
||||
if (data.action === "select") {
|
||||
selectionManager.setSelections([data.entityID], this);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue