From: Vásáry Dániel Date: Thu, 8 Mar 2018 21:59:30 +0000 (+0000) Subject: git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube... X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=6b68d5fd157303ea0627a5637bf30bf0dd83d30d;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30962 --- diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/ImportStatisticsStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/ImportStatisticsStep.java index 63e3f7e8..547929ff 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/ImportStatisticsStep.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/ImportStatisticsStep.java @@ -98,6 +98,10 @@ public class ImportStatisticsStep extends JobStep { BasicDBObject typeStatRawData = new BasicDBObject(); typeStat.put("rawData", typeStatRawData); long sumduration = 0; + long sumIngestDuration = 0; + long sumIngestCount = 0; + long sumArchiveDuration = 0; + long sumArchiveCount = 0; List rawData = new ArrayList<>(); for (BasicDBObject story : stories.values()) { @@ -128,6 +132,8 @@ public class ImportStatisticsStep extends JobStep { ingestDuration = ingestInfo.getLong("duration"); raw.put("ingest_count", ingestCount); raw.put("ingest_duration", ingestDuration); + sumIngestCount += ingestCount; + sumIngestDuration += ingestDuration; } long archiveCount = 0; @@ -138,6 +144,8 @@ public class ImportStatisticsStep extends JobStep { archiveDuration = ingestInfo.getLong("duration"); raw.put("archive_count", archiveCount); raw.put("archive_duration", archiveDuration); + sumArchiveCount += archiveCount; + sumArchiveDuration += archiveDuration; } rawData.add(raw); @@ -171,6 +179,10 @@ public class ImportStatisticsStep extends JobStep { planStat.put("all_count", rawData.size()); planStat.put("all_duration", sumduration); + planStat.put("archive_count", sumArchiveCount); + planStat.put("archive_duration", sumArchiveDuration); + planStat.put("ingest_count", sumIngestCount); + planStat.put("ingest_duration", sumIngestDuration); store(scheduledDate, rawData, typeStat, planStat); return null; diff --git a/server/user.jobengine.osgi.server/js/chart_formatters.js b/server/user.jobengine.osgi.server/js/chart_formatters.js new file mode 100644 index 00000000..1e87bf0d --- /dev/null +++ b/server/user.jobengine.osgi.server/js/chart_formatters.js @@ -0,0 +1,36 @@ +function statisticsXValue(value) { + var hour = Math.floor(value / 60); + var minute = value % 60; + if (hour == 0) + if (minute == 0) + return ""; + hour = ("" + hour).length == 1 ? '0' + hour : hour; + minute = ("" + minute).length == 1 ? '0' + minute : minute; + return hour + ':' + minute; +} + +function statisticsYValue(value, series) { + var options = series[value - 1]; + console.log("statisticsYValue", series.name, value, series); + return options == null ? "" : options.userOptions.name; +} + +if (!String.format) { + String.format = function(format) { + var args = Array.prototype.slice.call(arguments, 1); + return format.replace(/{(\d+)}/g, function(match, number) { + return typeof args[number] != 'undefined' ? args[number] + : match; + }); + }; +} + +function statistics(value) { + // console.log("statistics", value, series); + var obj = eval("(" + value.name + ')'); + return String + .format( + 'Kézbesítve . {0}
Elkezdve . {1}
Befejezve . {2}
Azonosító . {3}
Forrás . {4}
Cél . {5}
Cimke . {7}
Sikeres . {8}
Felhasználó . {9}', + obj.Touched, obj.Started, obj.Finished, obj.HouseId, obj.Source, obj.Destination, + obj.Tag, obj.Tag, obj.Successful, obj.UserName); +} diff --git a/server/user.jobengine.osgi.server/pages/newshistory.zul b/server/user.jobengine.osgi.server/pages/newshistory.zul index 3fd4ecaf..85cde7db 100644 --- a/server/user.jobengine.osgi.server/pages/newshistory.zul +++ b/server/user.jobengine.osgi.server/pages/newshistory.zul @@ -1,14 +1,12 @@ - - + - - - - + + @@ -26,18 +24,14 @@
- +
- - - - - + @@ -63,6 +57,6 @@
- +
\ No newline at end of file diff --git a/server/user.jobengine.osgi.server/pages/statistics.zul b/server/user.jobengine.osgi.server/pages/statistics.zul index d6879d5b..2a90328b 100644 --- a/server/user.jobengine.osgi.server/pages/statistics.zul +++ b/server/user.jobengine.osgi.server/pages/statistics.zul @@ -1,58 +1,36 @@ - - -
-
- - -
- -
-
+ + + + + + + + + + + +
+ +
+
+
diff --git a/server/user.jobengine.osgi.server/pages/statistics2.zul b/server/user.jobengine.osgi.server/pages/statistics2.zul deleted file mode 100644 index 3220569b..00000000 --- a/server/user.jobengine.osgi.server/pages/statistics2.zul +++ /dev/null @@ -1,19 +0,0 @@ - - - -
-
- -
- -
- -
- - - - diff --git a/server/user.jobengine.osgi.server/pages/statisticsdetails.zul b/server/user.jobengine.osgi.server/pages/statisticsdetails.zul new file mode 100644 index 00000000..6e224cc1 --- /dev/null +++ b/server/user.jobengine.osgi.server/pages/statisticsdetails.zul @@ -0,0 +1,25 @@ + + + + + + + + + + + + + +