From e3b6c02f564ab4c502e3974bbed32bf73663fb26 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 2 May 2019 23:06:57 +0400 Subject: [PATCH] #partilly add paper dashboard --- .../paper/controller/PaperRestController.java | 5 +++ src/main/resources/static/js/app-config.js | 4 ++- src/main/resources/static/js/app.js | 3 ++ .../static/papers/paper-dashboard.vue | 36 +++++++++++++++++++ .../resources/static/papers/paper-list.vue | 1 + 5 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/static/papers/paper-dashboard.vue diff --git a/src/main/java/ru/ulstu/paper/controller/PaperRestController.java b/src/main/java/ru/ulstu/paper/controller/PaperRestController.java index 6da009f..9ad5310 100644 --- a/src/main/java/ru/ulstu/paper/controller/PaperRestController.java +++ b/src/main/java/ru/ulstu/paper/controller/PaperRestController.java @@ -37,6 +37,11 @@ public class PaperRestController { return new Response<>(paperService.findAllDto()); } + @GetMapping("/dashboard") + public Response> getDashboard() { + return new Response<>(paperService.findAllActiveDto()); + } + @GetMapping("/{paper-id}") public Response getPaper(@PathVariable("paper-id") Integer paperId) { return new Response(paperService.findById(paperId)); diff --git a/src/main/resources/static/js/app-config.js b/src/main/resources/static/js/app-config.js index 75e7915..f2864e6 100644 --- a/src/main/resources/static/js/app-config.js +++ b/src/main/resources/static/js/app-config.js @@ -19,6 +19,7 @@ var getTables = basePath + "/get-tables"; var makeIntegration = basePath + "/make-integration"; var paperList = basePath + "/papers"; + var paperDashboard = basePath + "/dashboard"; return { version: appVersion, @@ -26,6 +27,7 @@ owl: getOwl, tables: getTables, integration: makeIntegration, - paperList: paperList + paperList: paperList, + paperDashboard: paperDashboard }; }); \ No newline at end of file diff --git a/src/main/resources/static/js/app.js b/src/main/resources/static/js/app.js index 0ed7811..8cfb1ad 100644 --- a/src/main/resources/static/js/app.js +++ b/src/main/resources/static/js/app.js @@ -11,6 +11,9 @@ var router = new VueRouter({ { path: "/papers/papers", component: httpVueLoaderEx("/papers/paper-list.vue", "PaperList") }, + { + path: "/papers/dashboard", component: httpVueLoaderEx("/papers/paper-dashboard.vue", "PaperDashboard") + }, { path: "/*", component: httpVueLoaderEx("/core-components/page-not-found.vue", "PageNotFound") } diff --git a/src/main/resources/static/papers/paper-dashboard.vue b/src/main/resources/static/papers/paper-dashboard.vue new file mode 100644 index 0000000..17423ce --- /dev/null +++ b/src/main/resources/static/papers/paper-dashboard.vue @@ -0,0 +1,36 @@ + + + \ No newline at end of file diff --git a/src/main/resources/static/papers/paper-list.vue b/src/main/resources/static/papers/paper-list.vue index 17423ce..417150c 100644 --- a/src/main/resources/static/papers/paper-list.vue +++ b/src/main/resources/static/papers/paper-list.vue @@ -18,6 +18,7 @@ components: { "paper-item": httpVueLoaderEx("/papers/paper-item.vue"), "paper-navigation": httpVueLoaderEx("/papers/paper-navigation.vue"), + "paper-dashboard": httpVueLoaderEx("/papers/paper-dashboard.vue") }, data: function () { return {