diff options
author | Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> | 2019-06-12 15:55:45 +0200 |
---|---|---|
committer | Wojciech Sliwka <wojciech.sliwka@nokia.com> | 2019-07-08 07:01:14 +0000 |
commit | 89b0566dcf587d36f713d301b27009ce1d3bbec6 (patch) | |
tree | a7e90f305ef6936d7d48b3fafd6e3289696855c6 /vid-app-common/src/main/webapp/app/vid/scripts/services/reportService.js | |
parent | 5fdd07ac5c8b0a229b437aed258710a29801c31a (diff) |
Adapting GUI for error report managing
Change-Id: Idb3f5750596334990b030bfdf2f6551ad4d1c8e3
Issue-ID: VID-488
Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com>
Diffstat (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/services/reportService.js')
-rw-r--r-- | vid-app-common/src/main/webapp/app/vid/scripts/services/reportService.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/reportService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/reportService.js new file mode 100644 index 000000000..0b401dcb2 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/reportService.js @@ -0,0 +1,27 @@ +"use strict"; + +var ReportService = function ( $http ) { + + return { + + getReportData: function(requestInfo) { + return $http.post("error-report",requestInfo); + }, + + getReportTimeStamp: function () { + const today = new Date(); + const se = String(today.getSeconds()).padStart(2, '0'); + const mi = String(today.getMinutes()).padStart(2, '0'); + const hr = String(today.getHours()).padStart(2, '0'); + const dd = String(today.getDate()).padStart(2, '0'); + const mm = String(today.getMonth() + 1).padStart(2, '0'); + const yyyy = today.getFullYear(); + + return hr + '-' + mi + '-' + se + "_" + dd + '-' + mm + '-' + yyyy; + } + + } + +}; + +appDS2.factory("ReportService", ["$http", ReportService]);
\ No newline at end of file |