From 9744cec780babefc9993d7a2069745a893c7fdf8 Mon Sep 17 00:00:00 2001 From: seshukm Date: Tue, 28 Mar 2017 18:37:53 +0530 Subject: Integrate new files for Resmgr to the Main Client IssueId : CLIENT-46 Change-Id: I2210e5eb2b33e6ba7b5a37ae2f3822e2ff9be80b Signed-off-by: seshukm --- resmgr/src/main/webapp/resmgr/js/DataService.js | 80 ++++++++ .../webapp/resmgr/templates/templateContainer.html | 79 +++++++ .../resmgr/templates/templateFunctional.html | 82 ++++++++ .../resmgr/templates/templateNotification.html | 48 +++++ .../webapp/resmgr/templates/templateWidget.html | 222 ++++++++++++++++++++ .../resmgr/templates/templateWidget_old.html | 226 +++++++++++++++++++++ 6 files changed, 737 insertions(+) create mode 100644 resmgr/src/main/webapp/resmgr/js/DataService.js create mode 100644 resmgr/src/main/webapp/resmgr/templates/templateContainer.html create mode 100644 resmgr/src/main/webapp/resmgr/templates/templateFunctional.html create mode 100644 resmgr/src/main/webapp/resmgr/templates/templateNotification.html create mode 100644 resmgr/src/main/webapp/resmgr/templates/templateWidget.html create mode 100644 resmgr/src/main/webapp/resmgr/templates/templateWidget_old.html (limited to 'resmgr') diff --git a/resmgr/src/main/webapp/resmgr/js/DataService.js b/resmgr/src/main/webapp/resmgr/js/DataService.js new file mode 100644 index 00000000..f374bbd8 --- /dev/null +++ b/resmgr/src/main/webapp/resmgr/js/DataService.js @@ -0,0 +1,80 @@ +app.factory("DataService", function($http, $log) { + return { + /** + * + * @param url - url of the service + * @param data - data as an object (used as query string in url) + * @returns {*} + */ + get: function (url, data) { + if(data) { + url += "?"; + for(key in data){ + url += key+ "=" + data[key]; + } + } + return $http({ + url: url, + method: 'GET', + data: null, + headers: {'Content-Type': 'application/json'} + }).then(function (response) { + return response.data; + }); + }, + /** + * + * @param url - url of the service + * @param data - data as an object (used for post method) + * @returns {*} + */ + post: function (url, data) { + return $http({ + url: url, + method: 'POST', + data: data, + headers: {'Content-Type': 'application/json '} + }).then(function (response) { + console.log("Response : "); + $log.info(response.data); + return response.data; + }); + }, + /** + * TODO - To Check for Delete + * @param url + * @param data + * @returns {*} + */ + delete: function (url) { + return $http({ + url: url, + method: 'DELETE', + data: null, + headers: {'Content-Type': 'application/json '} + }).then(function (response) { + console.log("Response : "); + $log.info(response.data); + return response.data; + }); + }, + /** + * + * @param url + * @param data + */ + put: function (url, data) { + return $http({ + url: url, + method: 'PUT', + data: data, + headers: {'Content-Type': 'application/json '} + }).then(function (response) { + console.log("Response : "); + $log.info(response.data); + return response.data; + }); + } + + } +}) \ No newline at end of file diff --git a/resmgr/src/main/webapp/resmgr/templates/templateContainer.html b/resmgr/src/main/webapp/resmgr/templates/templateContainer.html new file mode 100644 index 00000000..ef6f01c6 --- /dev/null +++ b/resmgr/src/main/webapp/resmgr/templates/templateContainer.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/resmgr/src/main/webapp/resmgr/templates/templateFunctional.html b/resmgr/src/main/webapp/resmgr/templates/templateFunctional.html new file mode 100644 index 00000000..ff2f53f0 --- /dev/null +++ b/resmgr/src/main/webapp/resmgr/templates/templateFunctional.html @@ -0,0 +1,82 @@ + + + + + + \ No newline at end of file diff --git a/resmgr/src/main/webapp/resmgr/templates/templateNotification.html b/resmgr/src/main/webapp/resmgr/templates/templateNotification.html new file mode 100644 index 00000000..97f26e37 --- /dev/null +++ b/resmgr/src/main/webapp/resmgr/templates/templateNotification.html @@ -0,0 +1,48 @@ + + + + \ No newline at end of file diff --git a/resmgr/src/main/webapp/resmgr/templates/templateWidget.html b/resmgr/src/main/webapp/resmgr/templates/templateWidget.html new file mode 100644 index 00000000..bb8eef48 --- /dev/null +++ b/resmgr/src/main/webapp/resmgr/templates/templateWidget.html @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resmgr/src/main/webapp/resmgr/templates/templateWidget_old.html b/resmgr/src/main/webapp/resmgr/templates/templateWidget_old.html new file mode 100644 index 00000000..fb2528db --- /dev/null +++ b/resmgr/src/main/webapp/resmgr/templates/templateWidget_old.html @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit 1.2.3-korg