From 3b9a62fdbeec92a145ab1bea0a9269afc53cf8e9 Mon Sep 17 00:00:00 2001 From: ingalls Date: Mon, 7 Oct 2024 14:15:20 -0600 Subject: [PATCH] Add configure stetps --- api/web/package-lock.json | 12 +-- api/web/src/components/Configure.vue | 74 +++++++++++++++++-- .../components/Connection/CertificateP12.vue | 62 +++++++++------- 3 files changed, 112 insertions(+), 36 deletions(-) diff --git a/api/web/package-lock.json b/api/web/package-lock.json index e3164ec6c..a5c7d2a4b 100644 --- a/api/web/package-lock.json +++ b/api/web/package-lock.json @@ -3200,9 +3200,9 @@ } }, "node_modules/@tak-ps/vue-tabler": { - "version": "3.53.0", - "resolved": "https://registry.npmjs.org/@tak-ps/vue-tabler/-/vue-tabler-3.53.0.tgz", - "integrity": "sha512-Ml8yp29tdY7tccpR2oWkZ6/VJspBjVWrMnJI3muB8OJuAy8K19DB43MvuNWOhmQYZcfC77WoQGiZZ9wVXM2i7Q==", + "version": "3.53.1", + "resolved": "https://registry.npmjs.org/@tak-ps/vue-tabler/-/vue-tabler-3.53.1.tgz", + "integrity": "sha512-lDJ7jug8SmBVzF3h8zwJEJsTrPohQGetrzmtIfgy5mPHD/RURtPLc06LhplJuaoFdbCoxj0PVvZd374ARd1sgA==", "dev": true, "license": "ISC", "dependencies": { @@ -4946,9 +4946,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.32", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.32.tgz", - "integrity": "sha512-M+7ph0VGBQqqpTT2YrabjNKSQ2fEl9PVx6AK3N558gDH9NO8O6XN9SXXFWRo9u9PbEg/bWq+tjXQr+eXmxubCw==", + "version": "1.5.33", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.33.tgz", + "integrity": "sha512-+cYTcFB1QqD4j4LegwLfpCNxifb6dDFUAwk6RsLusCwIaZI6or2f+q8rs5tTB2YC53HhOlIbEaqHMAAC8IOIwA==", "dev": true, "license": "ISC" }, diff --git a/api/web/src/components/Configure.vue b/api/web/src/components/Configure.vue index 5767af46b..d2c82e6d6 100644 --- a/api/web/src/components/Configure.vue +++ b/api/web/src/components/Configure.vue @@ -33,6 +33,7 @@ :error='errors.name' label='Server Name' placeholder='TAK Server Name' + description='Human Readable name for the server' @keyup.enter='updateServer' /> @@ -41,6 +42,7 @@ v-model='body.url' label='Server CoT API' placeholder='ssl://ops.example.com:8089' + description='Streaming COT API - Usually on port 8089' :error='errors.url' @keyup.enter='updateServer' /> @@ -49,6 +51,7 @@ + + + +
+ +
+
+
-
- Don't have account yet? Contact Us -
@@ -92,10 +134,16 @@ import { TablerLoading, TablerInput } from '@tak-ps/vue-tabler' +import { + IconCheck, + IconTrash +} from '@tabler/icons-vue'; export default { name: 'InitialConfigure', components: { + IconCheck, + IconTrash, CertificateP12, TablerInput, TablerLoading @@ -105,6 +153,8 @@ export default { loading: false, errors: { name: '', + username: '', + password: '', url: '', api: '' }, @@ -112,7 +162,9 @@ export default { name: '', url: '', api: '', - certs: { + username: '', + password: '', + auth: { key: '', cert: '' } @@ -140,6 +192,18 @@ export default { this.errors.name = ''; } + if (this.body.username.trim().length === 0) { + this.errors.username = 'Username cannot be empty'; + } else { + this.errors.username = ''; + } + + if (this.body.password.trim().length === 0) { + this.errors.password = 'Password cannot be empty'; + } else { + this.errors.password = ''; + } + try { const url = new URL(this.body.url) if (url.protocol !== 'ssl:') { diff --git a/api/web/src/components/Connection/CertificateP12.vue b/api/web/src/components/Connection/CertificateP12.vue index b2ca6f814..2b8f7a111 100644 --- a/api/web/src/components/Connection/CertificateP12.vue +++ b/api/web/src/components/Connection/CertificateP12.vue @@ -22,6 +22,8 @@