@@ -106,6 +119,7 @@
Data distributed on pillars
+
diff --git a/bitrepository-webclient/src/main/webapp/static/css/dashboard.css b/bitrepository-webclient/src/main/webapp/static/css/dashboard.css
index 7c0dad911..5b6684275 100644
--- a/bitrepository-webclient/src/main/webapp/static/css/dashboard.css
+++ b/bitrepository-webclient/src/main/webapp/static/css/dashboard.css
@@ -4,7 +4,7 @@
margin-top: 0.9em;
}
-.collectionStatus, .dataSizeGraph, .collectionPieBox, .legPieBox {
+.collectionStatus, .pillarDetails, .dataSizeGraph, .collectionPieBox, .legPieBox {
border: 1px solid #cccccc;
float: left;
margin: 0 0 2em;
@@ -15,18 +15,10 @@
box-sizing: border-box;
}
-.collectionStatus, .collectionPieBox, .legPieBox {
+.collectionStatus, .pillarDetails, .collectionPieBox, .legPieBox {
background-color: #F9FCFF;
}
-.collectionStatus td, .collectionStatus th {
- text-align: right;
-}
-
-td.collectionName, th.collectionName {
- text-align: left;
-}
-
td.error {
background-color: #CC0000;
color: white;
diff --git a/bitrepository-webclient/src/main/webapp/static/js/dashboard_components/collectionStatus.js b/bitrepository-webclient/src/main/webapp/static/js/dashboard_components/collectionStatus.js
index ea7e52144..d45389f16 100644
--- a/bitrepository-webclient/src/main/webapp/static/js/dashboard_components/collectionStatus.js
+++ b/bitrepository-webclient/src/main/webapp/static/js/dashboard_components/collectionStatus.js
@@ -111,15 +111,15 @@ function makeCollectionRow(collection) {
let id = collection.collectionID;
let html = "";
html += "
";
- html += "| " + id + " | ";
- html += " | ";
- html += " | ";
- html += " | ";
- html += " | ";
- html += " | ";
- html += " | ";
- html += " | ";
- html += " |
";
+ html += "
" + id + " | ";
+ html += "
| ";
+ html += "
| ";
+ html += "
| ";
+ html += "
| ";
+ html += "
| ";
+ html += "
| ";
+ html += "
| ";
+ html += "
| ";
return html;
}
diff --git a/bitrepository-webclient/src/main/webapp/static/js/dashboard_components/pillar-details.js b/bitrepository-webclient/src/main/webapp/static/js/dashboard_components/pillar-details.js
new file mode 100644
index 000000000..3c62b66bf
--- /dev/null
+++ b/bitrepository-webclient/src/main/webapp/static/js/dashboard_components/pillar-details.js
@@ -0,0 +1,27 @@
+/**
+ * Appends the information from the pillar details JSON as rows to a table with the given ID.
+ * @param pillarDetails JSON containing the pillar details to build the rows from
+ * @param tableBodyId ID of the table to append the rows to
+ */
+function fillInPillarDetailsTable(pillarDetails, tableBodyId) {
+ pillarDetails.forEach((detail) => {
+ $(tableBodyId).append(makePillarDetailsRow(detail));
+ });
+}
+
+/**
+ * Make a row in the pillar details table given the pillar details JSON.
+ * @param details Pillar details from ReferenceSettings-file as JSON
+ * @returns {string} HTML table row containing the pillar details
+ */
+function makePillarDetailsRow(details) {
+ let html = "";
+ html += "
";
+ html += "| " + details.pillarID + " | ";
+ html += "" + details.pillarName + " | ";
+ html += "" + details.pillarType + " | ";
+ html += "" + details.pillarDeleteFileApprover + " | ";
+ html += "
";
+ return html;
+}
+
diff --git a/bitrepository-webclient/src/main/webapp/static/js/views/dashboard-page.js b/bitrepository-webclient/src/main/webapp/static/js/views/dashboard-page.js
index 2c7a9e9cb..66daf2c31 100644
--- a/bitrepository-webclient/src/main/webapp/static/js/views/dashboard-page.js
+++ b/bitrepository-webclient/src/main/webapp/static/js/views/dashboard-page.js
@@ -4,8 +4,8 @@ let nameMapper;
let dsGraph;
function init() {
- $.get('repo/urlservice/integrityService', {}, function (url) {
- setIntegrityServiceUrl(url);
+ $.get('repo/urlservice/integrityService', {}, function (integrityUrlBase) {
+ setIntegrityServiceUrl(integrityUrlBase);
$.get("repo/reposervice/getRepositoryName/", {}, function (j) {
$("#pageHeader").html("Overview of " + j);
}, "html");
@@ -14,11 +14,11 @@ function init() {
nameMapper = new CollectionNameMapper(collections);
setNameMapper(nameMapper);
initiateCollectionStatus(collections, "#collectionStatusBody", 10000);
- let dataUrl = url + "/integrity/Statistics/getDataSizeHistory/?collectionID=";
+ let dataUrl = integrityUrlBase + "/integrity/Statistics/getDataSizeHistory/?collectionID=";
dsGraph = new DataSizeGraph(collections, colorMapper, new FileSizeUtils(), dataUrl, "#graphType", "#dataSizeGraphPlaceholder");
makeCollectionSelectionCheckboxes("#dataSizeGraphCollectionSelection", dsGraph, colorMapper, nameMapper);
- drawPillarDataSizePieChart(url + "/integrity/Statistics/getLatestPillarDataSize/");
- drawCollectionDataSizePieChart(url + "/integrity/Statistics/getLatestcollectionDataSize/", colorMapper);
+ drawPillarDataSizePieChart(integrityUrlBase + "/integrity/Statistics/getLatestPillarDataSize/");
+ drawCollectionDataSizePieChart(integrityUrlBase + "/integrity/Statistics/getLatestcollectionDataSize/", colorMapper);
$("#graphType").on("change", function (event) {
event.preventDefault(); dsGraph.graphTypeChanged();
});
@@ -26,10 +26,13 @@ function init() {
// Update graphs every hour
update_data_size_graph = setInterval(function () {
dsGraph.updateData();
- drawPillarDataSizePieChart(url + "/integrity/Statistics/getLatestPillarDataSize/");
- drawCollectionDataSizePieChart(url + "/integrity/Statistics/getLatestcollectionDataSize/", colorMapper);
+ drawPillarDataSizePieChart(integrityUrlBase + "/integrity/Statistics/getLatestPillarDataSize/");
+ drawCollectionDataSizePieChart(integrityUrlBase + "/integrity/Statistics/getLatestcollectionDataSize/", colorMapper);
}, 3600000);
});
+ $.getJSON(integrityUrlBase + "/integrity/IntegrityService/getPillarDetails", {}, function (details) {
+ fillInPillarDetailsTable(details, "#pillarDetailsBody")
+ });
}, 'html');
}
diff --git a/pom.xml b/pom.xml
index 1a5020366..a8c845f21 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
org.bitrepository.reference
bitrepository-parent
-
1.12-SNAPSHOT
+
1.11.1-SNAPSHOT
org.sbforge
@@ -65,10 +65,13 @@
- Asger Askov-Blekinge
- abr@kb.dk
+ Asger Askov Blekinge
+ asga@kb.dk
The Danish Royal Library
https://www.kb.dk/en
+
+ Developer
+
Rasmus Bohl Kristensen