Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
Issue #606
  • Loading branch information
rsoika committed Nov 2, 2024
1 parent f89e238 commit 3c88b9a
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,14 @@
</div>







<script type="text/javascript"
src="#{facesContext.externalContext.requestContextPath}/js/chartjs/chart.min.js?build=#{app.application_build_timestamp}"></script>

<script type="text/javascript">
/*<![CDATA[*/
$(document).ready(
function () {
// update the diagram
var ctx = document.getElementById("analytics_canvas_#{item.name}").getContext("2d");
var chartData = #{ analyticController.getAsString(item.name)
};
console.log(chartData);
//jsObject = JSON.parse(chartData);
window.myBar = new Chart(ctx, chartData);
});

var ctx = document.getElementById("analytics_canvas_#{item.name}").getContext("2d");
var chartData = #{ analyticController.getAsJson(item.name)};
new Chart(ctx, chartData);
/*]]>*/
</script>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:h="http://xmlns.jcp.org/jsf/html">


<style>
.analytic-card {
display: flex;
flex-flow: column;

min-height: 200px;
padding: 20px;
background-color: #f3f3f3;
border-radius: 5px;
-webkit-box-shadow: 0 0 5px 0 rgba(43, 43, 43, .1), 0 11px 6px -7px rgba(43, 43, 43, .1);
box-shadow: 0 0 5px 0 rgba(43, 43, 43, .1), 0 11px 6px -7px rgba(43, 43, 43, .1);
border: none;
-webkit-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
font-size: 40px;
font-weight: bold;
color: #4398f3;
}

.analytic-card-header {}

.analytic-card-footer {
font-size: 12px;
font-weight: normal;
color: #333;
}

.analytic-card-content {
flex: 1;
font-size: 20px;
}

.analytic-card-link {
float: right;
font-size: 18px;
margin-left: 20px;
}
</style>
<div class="analytic-card">
<div class="analytic-card-header">
<h:outputText value="#{analyticController.getAsDouble(item.name)}">
<f:convertNumber minFractionDigits="2" locale="de" />
</h:outputText>
</div>


<div class="analytic-card-content">#{analyticController.getLabel(item.name)}</div>


<div class="analytic-card-footer">
<span>#{analyticController.getDescription(item.name)}</span>

<h:panelGroup styleClass="analytic-card-link" rendered="#{!empty analyticController.getLink(item.name)}">
<a href="#{analyticController.getLink(item.name)}"><span class="typcn typcn-zoom-outline" /></a>
</h:panelGroup>


</div>

</div>

</ui:composition>
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@
</style>
<div class="analytic-card">
<div class="analytic-card-header">
<h:outputText value="#{analyticController.getAsDouble(item.name)}">
<f:convertNumber minFractionDigits="2" locale="de" />
<h:outputText value="#{analyticController.getAsString(item.name)}">
</h:outputText>
</div>


<div class="analytic-card-content">#{analyticController.getLabel(item.name)}</div>
<div class="analytic-card-content">
<h:outputText escape="false" value="#{analyticController.getLabel(item.name)}" />
</div>


<div class="analytic-card-footer">
Expand Down

0 comments on commit 3c88b9a

Please sign in to comment.