From e56f95e3a6f23037d808a91e820dd3ea2cf64786 Mon Sep 17 00:00:00 2001 From: Volodymyr Smirnov Date: Tue, 27 Oct 2020 09:57:39 +0200 Subject: [PATCH] basic ui development, WIP --- .../Controllers/DownloadController.cs | 2 +- .../Controllers/QueueController.cs | 2 +- .../Controllers/ScanResultsController.cs | 2 +- MalwareMultiScan.Ui/assets/README.md | 7 -- MalwareMultiScan.Ui/components/Logo.vue | 29 ------- MalwareMultiScan.Ui/components/README.md | 7 -- MalwareMultiScan.Ui/layouts/README.md | 7 -- MalwareMultiScan.Ui/layouts/default.vue | 71 +++-------------- MalwareMultiScan.Ui/middleware/README.md | 8 -- MalwareMultiScan.Ui/nuxt.config.js | 44 +++++------ MalwareMultiScan.Ui/package.json | 1 + MalwareMultiScan.Ui/pages/README.md | 6 -- MalwareMultiScan.Ui/pages/index.vue | 73 +----------------- MalwareMultiScan.Ui/plugins/README.md | 7 -- MalwareMultiScan.Ui/static/README.md | 11 --- MalwareMultiScan.Ui/static/favicon.ico | Bin 1393 -> 0 bytes 16 files changed, 36 insertions(+), 241 deletions(-) delete mode 100644 MalwareMultiScan.Ui/assets/README.md delete mode 100644 MalwareMultiScan.Ui/components/Logo.vue delete mode 100644 MalwareMultiScan.Ui/components/README.md delete mode 100644 MalwareMultiScan.Ui/layouts/README.md delete mode 100644 MalwareMultiScan.Ui/middleware/README.md delete mode 100644 MalwareMultiScan.Ui/pages/README.md delete mode 100644 MalwareMultiScan.Ui/plugins/README.md delete mode 100644 MalwareMultiScan.Ui/static/README.md delete mode 100644 MalwareMultiScan.Ui/static/favicon.ico diff --git a/MalwareMultiScan.Api/Controllers/DownloadController.cs b/MalwareMultiScan.Api/Controllers/DownloadController.cs index af088da..b2edfe3 100644 --- a/MalwareMultiScan.Api/Controllers/DownloadController.cs +++ b/MalwareMultiScan.Api/Controllers/DownloadController.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Mvc; namespace MalwareMultiScan.Api.Controllers { [ApiController] - [Route("download")] + [Route("api/download")] [Produces("application/octet-stream")] public class DownloadController : Controller { diff --git a/MalwareMultiScan.Api/Controllers/QueueController.cs b/MalwareMultiScan.Api/Controllers/QueueController.cs index b27e0db..5122797 100644 --- a/MalwareMultiScan.Api/Controllers/QueueController.cs +++ b/MalwareMultiScan.Api/Controllers/QueueController.cs @@ -9,7 +9,7 @@ using Microsoft.AspNetCore.Mvc; namespace MalwareMultiScan.Api.Controllers { [ApiController] - [Route("queue")] + [Route("api/queue")] [Produces("application/json")] public class QueueController : Controller { diff --git a/MalwareMultiScan.Api/Controllers/ScanResultsController.cs b/MalwareMultiScan.Api/Controllers/ScanResultsController.cs index 661a873..b67e1cf 100644 --- a/MalwareMultiScan.Api/Controllers/ScanResultsController.cs +++ b/MalwareMultiScan.Api/Controllers/ScanResultsController.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc; namespace MalwareMultiScan.Api.Controllers { [ApiController] - [Route("results")] + [Route("api/results")] [Produces("application/json")] public class ScanResultsController : Controller { diff --git a/MalwareMultiScan.Ui/assets/README.md b/MalwareMultiScan.Ui/assets/README.md deleted file mode 100644 index 34766f9..0000000 --- a/MalwareMultiScan.Ui/assets/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# ASSETS - -**This directory is not required, you can delete it if you don't want to use it.** - -This directory contains your un-compiled assets such as LESS, SASS, or JavaScript. - -More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked). diff --git a/MalwareMultiScan.Ui/components/Logo.vue b/MalwareMultiScan.Ui/components/Logo.vue deleted file mode 100644 index b1de012..0000000 --- a/MalwareMultiScan.Ui/components/Logo.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - diff --git a/MalwareMultiScan.Ui/components/README.md b/MalwareMultiScan.Ui/components/README.md deleted file mode 100644 index a079f10..0000000 --- a/MalwareMultiScan.Ui/components/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# COMPONENTS - -**This directory is not required, you can delete it if you don't want to use it.** - -The components directory contains your Vue.js Components. - -_Nuxt.js doesn't supercharge these components._ diff --git a/MalwareMultiScan.Ui/layouts/README.md b/MalwareMultiScan.Ui/layouts/README.md deleted file mode 100644 index cad1ad5..0000000 --- a/MalwareMultiScan.Ui/layouts/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# LAYOUTS - -**This directory is not required, you can delete it if you don't want to use it.** - -This directory contains your Application Layouts. - -More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts). diff --git a/MalwareMultiScan.Ui/layouts/default.vue b/MalwareMultiScan.Ui/layouts/default.vue index 6c2077d..b0a8f31 100644 --- a/MalwareMultiScan.Ui/layouts/default.vue +++ b/MalwareMultiScan.Ui/layouts/default.vue @@ -1,62 +1,15 @@ - - diff --git a/MalwareMultiScan.Ui/middleware/README.md b/MalwareMultiScan.Ui/middleware/README.md deleted file mode 100644 index 01595de..0000000 --- a/MalwareMultiScan.Ui/middleware/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# MIDDLEWARE - -**This directory is not required, you can delete it if you don't want to use it.** - -This directory contains your application middleware. -Middleware let you define custom functions that can be run before rendering either a page or a group of pages. - -More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware). diff --git a/MalwareMultiScan.Ui/nuxt.config.js b/MalwareMultiScan.Ui/nuxt.config.js index 3cd31d7..9b2679e 100644 --- a/MalwareMultiScan.Ui/nuxt.config.js +++ b/MalwareMultiScan.Ui/nuxt.config.js @@ -1,46 +1,40 @@ export default { - // Global page headers (https://go.nuxtjs.dev/config-head) head: { - title: 'malware-multi-scan-ui', + title: 'MalwareMultiScan UI', meta: [ { charset: 'utf-8' }, - { name: 'viewport', content: 'width=device-width, initial-scale=1' }, - { hid: 'description', name: 'description', content: '' } + { name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no' }, ], - link: [ - { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' } - ] + bodyAttrs: { + class: "bg-light" + } }, - // Global CSS (https://go.nuxtjs.dev/config-css) - css: [ - ], - - // Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins) - plugins: [ - ], - - // Auto import components (https://go.nuxtjs.dev/config-components) components: true, - // Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules) buildModules: [ - // https://go.nuxtjs.dev/typescript '@nuxt/typescript-build', ], - // Modules (https://go.nuxtjs.dev/config-modules) modules: [ - // https://go.nuxtjs.dev/bootstrap 'bootstrap-vue/nuxt', - // https://go.nuxtjs.dev/axios '@nuxtjs/axios', + '@nuxtjs/proxy' ], - // Axios module configuration (https://go.nuxtjs.dev/config-axios) - axios: {}, + axios: { + proxy: true, + prefix: '/api/' + }, - // Build Configuration (https://go.nuxtjs.dev/config-build) - build: { + proxy: { + '/api': { + target: process.env.API_URL || 'http://localhost:5000', + changeOrigin: true + } + }, + + bootstrapVue: { + icons: true } } diff --git a/MalwareMultiScan.Ui/package.json b/MalwareMultiScan.Ui/package.json index 4263261..aaef633 100644 --- a/MalwareMultiScan.Ui/package.json +++ b/MalwareMultiScan.Ui/package.json @@ -11,6 +11,7 @@ "dependencies": { "@nuxt/typescript-runtime": "^2.0.0", "@nuxtjs/axios": "^5.12.2", + "@nuxtjs/proxy": "^2.0.1", "bootstrap": "^4.5.2", "bootstrap-vue": "^2.17.3", "core-js": "^3.6.5", diff --git a/MalwareMultiScan.Ui/pages/README.md b/MalwareMultiScan.Ui/pages/README.md deleted file mode 100644 index 1d5d48b..0000000 --- a/MalwareMultiScan.Ui/pages/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# PAGES - -This directory contains your Application Views and Routes. -The framework reads all the `*.vue` files inside this directory and creates the router of your application. - -More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing). diff --git a/MalwareMultiScan.Ui/pages/index.vue b/MalwareMultiScan.Ui/pages/index.vue index 8182e6d..2be457b 100644 --- a/MalwareMultiScan.Ui/pages/index.vue +++ b/MalwareMultiScan.Ui/pages/index.vue @@ -1,75 +1,4 @@ - - - diff --git a/MalwareMultiScan.Ui/plugins/README.md b/MalwareMultiScan.Ui/plugins/README.md deleted file mode 100644 index ca1f9d8..0000000 --- a/MalwareMultiScan.Ui/plugins/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# PLUGINS - -**This directory is not required, you can delete it if you don't want to use it.** - -This directory contains Javascript plugins that you want to run before mounting the root Vue.js application. - -More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins). diff --git a/MalwareMultiScan.Ui/static/README.md b/MalwareMultiScan.Ui/static/README.md deleted file mode 100644 index cf00435..0000000 --- a/MalwareMultiScan.Ui/static/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# STATIC - -**This directory is not required, you can delete it if you don't want to use it.** - -This directory contains your static files. -Each file inside this directory is mapped to `/`. -Thus you'd want to delete this README.md before deploying to production. - -Example: `/static/robots.txt` is mapped as `/robots.txt`. - -More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static). diff --git a/MalwareMultiScan.Ui/static/favicon.ico b/MalwareMultiScan.Ui/static/favicon.ico deleted file mode 100644 index 3632d0c89129045dc4103e84e59e426c57b8f51a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1393 zcmV-%1&;cOP)Px)D@jB_R9Fe^ReNldMG&9eyIx;VxmMIdgjhwCKeVN$X=xNR5F_{iAD9pW6t#*F zgsb$5TDXc(+R_KbHns{HwTUSSMxqkbMAXm+Qmqd}qLq*w23kw2)Y7}&?)uyB`r&ui zgSLtP7@6d5XJ%(+e>;!;h%VEAG6Suz+(=E0vHu2kKIR~YDr+g=KThO5N?%t`9J7Cz z!`J{cS7sBbmBg4LMc2`Q*c=vb%;M+)D8)#rilGypCSqLx@dPzj-aO`0Ee@jx&{DMo z2WG&xg=Vd*Cq_lch7F)fE%7L^BtJ8$xL~eTcPV~!0CdAiRcr*Z+1D9sR%#uxa2%lS zMHc30U1D*;LsF_{LE;nVHg~>ZH^SfO0I1*c5a(Lr^e$ztX)$85I|Ia7@DN4Y6RSN5 zisVjYMleQy5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