diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 0000000..214388f --- /dev/null +++ b/.browserslistrc @@ -0,0 +1,3 @@ +> 1% +last 2 versions +not dead diff --git a/.env b/.env new file mode 100644 index 0000000..15bff16 --- /dev/null +++ b/.env @@ -0,0 +1,4 @@ +NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt +VUE_APP_API_FIREHOSE=http://localhost:8000/api/v1/firehose/ +VUE_APP_API_BASE=http://localhost:8000/api/v1 +PATH=$PATH:$(pwd)/node_modules/.bin diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..bf993c2 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,38 @@ +module.exports = { + root: true, + env: { + node: true + }, + 'extends': [ + 'plugin:vue/essential', + 'eslint:recommended', + '@vue/typescript/recommended' + ], + parserOptions: { + ecmaVersion: 2020 + }, + rules: { + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-this-alias": [ + "error", + { + "allowDestructuring": true, // Allow `const { props, state } = this`; false by default + "allowedNames": ["vm"] // Allow `const vm= this`; `[]` by default + } + ] + }, + overrides: [ + { + files: [ + '**/__tests__/*.{j,t}s?(x)', + '**/tests/unit/**/*.spec.{j,t}s?(x)' + ], + env: { + jest: true + } + } + ] +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c6498fa --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM node:lts-alpine as build-stage +WORKDIR /app +ENV VUE_APP_API_FIREHOSE=VUE_APP_API_FIREHOSE \ + VUE_APP_API_BASE=VUE_APP_API_BASE + +COPY package.json ./package.json + +RUN rm -rf node_modules/ +RUN npm cache clean --force +RUN npm install + +COPY . . +RUN npm run build + +FROM httpd:2.4 as production-stage +COPY --from=build-stage /app/dist /usr/local/apache2/htdocs +COPY ./httpd.conf /usr/local/apache2/conf/httpd.conf +RUN chown -R www-data /usr/local/apache2/logs/ +RUN chown -R www-data /usr/local/apache2/htdocs/ +COPY ./entrypoint.sh ./entrypoint.sh +RUN chmod +x ./entrypoint.sh +USER www-data +ENTRYPOINT [ "./entrypoint.sh" ] diff --git a/LICENSE b/LICENSE index 261eeb9..85bb47d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,23 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +Copyright (2024) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive license for use of this work by or on behalf of the U.S. Government. Export of this program may require a license from the United States Government. + +NOTICE: - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +For five (5) years from 09/01/2024, the United States Government is granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable worldwide license in this data to reproduce, prepare derivative works, and perform publicly and display publicly, by or on behalf of the Government. There is provision for the possible extension of the term of this license. Subsequent to that period or any extension granted, the United States Government is granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable worldwide license in this data to reproduce, prepare derivative works, distribute copies to the public, perform publicly and display publicly, and to permit others to do so. The specific term of the license can be identified by inquiry made to Sandia Corporation or DOE. + +NEITHER THE UNITED STATES GOVERNMENT, NOR THE UNITED STATES DEPARTMENT OF ENERGY, NOR SANDIA CORPORATION, NOR ANY OF THEIR EMPLOYEES, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS. + +Any licensee of this software has the obligation and responsibility to abide by the applicable export control laws, regulations, and general prohibitions relating to the export of technical data. Failure to obtain an export control license or other authority from the Government may result in criminal liability under U.S. laws. - 1. Definitions. +Copyright [2024] Sandia Corporation. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + http://www.apache.org/licenses/LICENSE-2.0 - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/README.md b/README.md index a4560e5..e971f15 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,38 @@ -# SCOT4-Web-App -SCOT4 Web Application +# SCOT4 Frontend + +## Documentation + +You can find the SCOT4 project documentation [here](https://sandialabs.github.io/scot4-docs/index.html) + +## Project setup +``` +npm install +``` + +### Compiles and hot-reloads for development +``` +npm run serve +``` + +### Compiles and minifies for production +``` +npm run build +``` + +### Run your unit tests +``` +npm run test:unit +``` + +### Run your end-to-end tests +``` +npm run test:e2e +``` + +### Lints and fixes files +``` +npm run lint +``` + +### Customize configuration +See [Configuration Reference](https://cli.vuejs.org/config/). diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..a016631 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,6 @@ +module.exports = { + presets: [ + '@vue/cli-plugin-babel/preset', + '@vue/babel-preset-jsx' + ] +} diff --git a/config/CssStub.js b/config/CssStub.js new file mode 100644 index 0000000..5401ddc --- /dev/null +++ b/config/CssStub.js @@ -0,0 +1 @@ +module.export = {} \ No newline at end of file diff --git a/config/dev.env.ts b/config/dev.env.ts new file mode 100644 index 0000000..4704baa --- /dev/null +++ b/config/dev.env.ts @@ -0,0 +1,4 @@ +module.exports = { + NODE_ENV: '"development"', + API_BASE_URL: '"http://localhost:8000/api/v1"', +} \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..5b950d4 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,9 @@ +#!/bin/sh +ROOT_DIR=/usr/local/apache2/htdocs +# Replace env vars in files served by httpd +for file in $ROOT_DIR/js/*.js* $ROOT_DIR/index.html; +do + sed -i 's|VUE_APP_API_BASE|'${VUE_APP_API_BASE}'|g' $file + sed -i 's|VUE_APP_API_FIREHOSE|'${VUE_APP_API_FIREHOSE}'|g' $file +done +httpd-foreground \ No newline at end of file diff --git a/httpd.conf b/httpd.conf new file mode 100644 index 0000000..21cbece --- /dev/null +++ b/httpd.conf @@ -0,0 +1,44 @@ +# Apache httpd v2.4 minimal configuration +# This can be reduced further if you remove the accees log and mod_log_config +ServerRoot "/usr/local/apache2" +ServerName localhost +# Minimum modules needed +LoadModule mpm_event_module modules/mod_mpm_event.so +LoadModule log_config_module modules/mod_log_config.so +LoadModule mime_module modules/mod_mime.so +LoadModule dir_module modules/mod_dir.so +LoadModule authz_core_module modules/mod_authz_core.so +LoadModule unixd_module modules/mod_unixd.so + +TypesConfig conf/mime.types + +PidFile logs/httpd.pid + +User www-data +Group www-data +# Port to Listen on +Listen *:8080 + +# In a basic setup httpd can only serve files from its document root +DocumentRoot "/usr/local/apache2/htdocs" + +# Default file to serve +DirectoryIndex index.html + +# Errors go to their own log +ErrorLog logs/error_log + +# Access log +LogFormat "%h %l %u %t \"%r\" %>s %b" common +CustomLog logs/access_log common + +# Never change this block + + AllowOverride None + Require all denied + + +# Allow documents to be served from the DocumentRoot + + Require all granted + diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..3d2ea15 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,7 @@ +module.exports = { + preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel', + setupFiles: ["./tests/unit/index.ts"], + moduleNameMapper: { + "\\.(css|less|sass|scss)$": "/config/CssStub.js", + } +} diff --git a/local_dev.env b/local_dev.env new file mode 100644 index 0000000..9cb641f --- /dev/null +++ b/local_dev.env @@ -0,0 +1,6 @@ +# Use these environment variables if running the api locally + +export NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt +export VUE_APP_API_FIREHOSE=http://localhost:8000/api/v1/firehose/ +export VUE_APP_API_BASE=http://localhost:8000/api/v1 +export PATH=$PATH:$(pwd)/node_modules/.bin diff --git a/package.json b/package.json new file mode 100644 index 0000000..c5ed367 --- /dev/null +++ b/package.json @@ -0,0 +1,111 @@ +{ + "name": "scot4-frontend-new", + "version": "0.1.0", + "private": true, + "scripts": { + "serve": "vue-cli-service serve", + "build": "vue-cli-service build", + "test:unit": "vue-cli-service test:unit", + "lint": "vue-cli-service lint" + }, + "overrides": { + "download-git-repo": "../_EXCLUDED_", + "opener": "../_EXCLUDED_", + "yaml-front-matter": "../_EXCLUDED_", + "postcss": "^8.4.31" + }, + "dependencies": { + "@ckeditor/ckeditor5-alignment": "^35.0.0", + "@ckeditor/ckeditor5-basic-styles": "^35.0.0", + "@ckeditor/ckeditor5-block-quote": "^35.0.0", + "@ckeditor/ckeditor5-build-classic": "^35.0.0", + "@ckeditor/ckeditor5-build-decoupled-document": "^35.0.0", + "@ckeditor/ckeditor5-code-block": "^35.0.0", + "@ckeditor/ckeditor5-dev-translations": "^32.0.2", + "@ckeditor/ckeditor5-dev-utils": "^32.0.2", + "@ckeditor/ckeditor5-editor-classic": "^35.0.0", + "@ckeditor/ckeditor5-essentials": "^35.0.0", + "@ckeditor/ckeditor5-font": "^35.0.0", + "@ckeditor/ckeditor5-heading": "^35.0.0", + "@ckeditor/ckeditor5-horizontal-line": "^35.0.0", + "@ckeditor/ckeditor5-html-embed": "^35.0.0", + "@ckeditor/ckeditor5-html-support": "^35.0.0", + "@ckeditor/ckeditor5-image": "^35.0.0", + "@ckeditor/ckeditor5-indent": "^35.0.0", + "@ckeditor/ckeditor5-link": "^35.0.0", + "@ckeditor/ckeditor5-list": "^35.0.0", + "@ckeditor/ckeditor5-paragraph": "^35.0.0", + "@ckeditor/ckeditor5-paste-from-office": "^35.0.0", + "@ckeditor/ckeditor5-source-editing": "^35.0.0", + "@ckeditor/ckeditor5-table": "^35.0.0", + "@ckeditor/ckeditor5-theme-lark": "^35.0.0", + "@ckeditor/ckeditor5-upload": "^35.0.0", + "@ckeditor/ckeditor5-vue2": "^3.0.0", + "@types/marked": "^4.0.7", + "@types/qs": "^6.9.7", + "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", + "@vue/babel-preset-jsx": "^1.2.4", + "axios": "^1.6.2", + "chart.js": "^3.9.1", + "colors": "1.4.0", + "core-js": "^3.21.1", + "dompurify": "^2.4.1", + "idb": "^7.0.1", + "localforage": "^1.10.0", + "marked": "^4.2.5", + "postcss": "^8.4.31", + "postcss-loader": "^7.3.3", + "raw-loader": "^4.0.2", + "remixicon": "^2.5.0", + "splitpanes": "^2.4.1", + "vee-validate": "^3.4.5", + "vue": "^2.7.14", + "vue-axios": "^3.4.1", + "vue-chartjs": "^4.1.2", + "vue-class-component": "^7.2.6", + "vue-cookies": "^1.7.4", + "vue-final-modal": "^2.4.3", + "vue-js-modal": "^2.0.1", + "vue-matomo": "^4.1.0", + "vue-meta": "^2.4.0", + "vue-observe-visibility": "^1.0.0", + "vue-pdf-embed": "^1.1.4", + "vue-property-decorator": "^9.1.2", + "vue-router": "^3.5.2", + "vuetify": "~2.6.16", + "vuex": "^3.6.2", + "vuex-class": "^0.3.2" + }, + "devDependencies": { + "@ckeditor/ckeditor5-inspector": "^4.0.0", + "@mdi/font": "^7.2.96", + "@types/dompurify": "^2.4.0", + "@types/jest": "^27.0.1", + "@types/lodash": "^4.17.6", + "@types/splitpanes": "^2.2.1", + "@typescript-eslint/eslint-plugin": "^5.4.0", + "@typescript-eslint/parser": "^5.4.0", + "@vue/cli": "^5.0.8", + "@vue/cli-plugin-babel": "~5.0.0", + "@vue/cli-plugin-eslint": "~5.0.0", + "@vue/cli-plugin-router": "~5.0.0", + "@vue/cli-plugin-typescript": "~5.0.0", + "@vue/cli-plugin-unit-jest": "~5.0.0", + "@vue/cli-plugin-vuex": "~5.0.0", + "@vue/cli-service": "~5.0.0", + "@vue/eslint-config-typescript": "^9.1.0", + "@vue/test-utils": "^1.1.3", + "@vue/vue2-jest": "^27.0.0-alpha.2", + "babel-jest": "^27.0.6", + "eslint": "^7.32.0", + "eslint-plugin-vue": "^8.0.3", + "jest": "^27.0.5", + "sass": "^1.32.7", + "sass-loader": "^12.0.0", + "ts-jest": "^27.0.4", + "typescript": "~4.9.5", + "vue-cli-plugin-vuetify": "~2.4.8", + "vue-template-compiler": "^2.6.14", + "vuetify-loader": "^1.7.3" + } +} diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..4cfaf6a Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/images/azure-sentinel.png b/public/images/azure-sentinel.png new file mode 100755 index 0000000..8f6ef10 Binary files /dev/null and b/public/images/azure-sentinel.png differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..9f00ef6 --- /dev/null +++ b/public/index.html @@ -0,0 +1,18 @@ + + + + + + + + + <%= htmlWebpackPlugin.options.title %> + + + +
+ + + diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..811b342 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,222 @@ + + + + + + diff --git a/src/api/auth.ts b/src/api/auth.ts new file mode 100644 index 0000000..96a49ac --- /dev/null +++ b/src/api/auth.ts @@ -0,0 +1,95 @@ +import {AxiosStatic} from "axios" +import Vue from 'vue' +export default (axios: AxiosStatic) => ({ + async login(username: string, password: string): Promise { + const params = new URLSearchParams() + params.append('username', username) + params.append('password', password) + return axios({ + url: '/login/access-token', + method: 'POST', + data: params, + withCredentials: true, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + } + }) + + }, + + async startAzureAD(): Promise { + return axios({ + url: '/login/oauth-url?auth_type=aad', + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true + }) + }, + + async completeAzureAD(token: any): Promise { + return axios({ + url: '/login/aad-callback', + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + params: token, + withCredentials: true + }) + }, + + async getCurrentUser(): Promise { + return axios({ + url: '/users/whoami', + method: 'GET', + withCredentials: true + }) + }, + logout() { + return axios({ + url: '/logout', + method: 'GET', + withCredentials: true + }) + }, + async getAuthMethods(): Promise { + return axios({ + url: '/settings/auth', + method: 'GET', + withCredentials: true + }) + }, + async createAuthMethod(create_data: any): Promise { + return axios({ + url: '/settings/auth', + method: 'POST', + withCredentials: true, + data: create_data + }) + }, + async updateAuthMethod(id: number, data: any): Promise { + return axios({ + url: '/settings/auth/' + id, + method: 'PUT', + withCredentials: true, + data: data + }) + }, + async deleteAuthMethod(id: number): Promise { + return axios({ + url: '/settings/auth/' + id, + method: 'DELETE', + withCredentials: true + }) + }, + async getAuthHelp(): Promise { + return axios({ + url: '/settings/auth/help', + method: 'GET', + withCredentials: true + }) + } +} +); diff --git a/src/api/elements.ts b/src/api/elements.ts new file mode 100644 index 0000000..75068be --- /dev/null +++ b/src/api/elements.ts @@ -0,0 +1,745 @@ +import {AxiosStatic} from "axios" +import { IRElementType, IRElementStatus, PermissionEnum } from "@/store/modules/IRElements/types" +import { convertToSnakeCase } from '@/utils/elementUtils' + +const IRElementAPIPaths: {[key in IRElementType]?: string}= { + [IRElementType.Alertgroup]: "/alertgroup", + [IRElementType.Event]: "/event", + [IRElementType.Alert]: "/alert", + [IRElementType.Signature]: "/signature", + [IRElementType.Incident]: "/incident", + [IRElementType.Intel]: "/intel", + [IRElementType.Product]: "/product", + [IRElementType.Dispatch]: "/dispatch", + [IRElementType.Guide]: "/guide", + [IRElementType.ThreatModelItem]: "/threat_model_item", + [IRElementType.Link]: "/link", + [IRElementType.Entity]: "/entity", + [IRElementType.Entry]: "/entry", + [IRElementType.File]: "/file", + [IRElementType.Feed]: "/feed", + [IRElementType.Pivot]: "/pivot", + [IRElementType.EntityClass]: "/entity_class", + [IRElementType.VulnFeed]: "/vuln_feed", + [IRElementType.VulnTrack]: "/vuln_track", +} + +export function getExportURL(elementType: IRElementType, elementID: number, format: string) { + return `${IRElementAPIPaths[elementType]}/export?id=${elementID}&format=${format}` +} + +export default (axios: AxiosStatic) => ({ + async retrieveElements(elementType: IRElementType): Promise { + const path = IRElementAPIPaths[elementType] + return axios({ + url: `${path}/`, + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + params: { 'limit': 25 }, // Default parameters for static fetch + withCredentials: true + }) + }, + + async retrieveElementsWithFilter(elementType: IRElementType, filterDict: any, abortController: AbortController): Promise { + //const queryString = Object.keys(filterDict).map(key => key + '=' + filterDict[key]).join('&'); + const path = IRElementAPIPaths[elementType] + '/' + return axios({ + url: path, + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + params: filterDict, + withCredentials: true, + signal: abortController?.signal + }) + }, + + async retrieveElementbyID(elementID: number, elementType: IRElementType, abortController: AbortController): Promise { + const path = IRElementAPIPaths[elementType] + let fullPath:string = "" + fullPath = path + '/' + elementID + + return axios({ + url: fullPath, + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true, + signal: abortController?.signal + + }) + }, + + async retrieveEntityAppearancesbyID(elementID: number, params: any = {}, abortController: AbortController | undefined = undefined): Promise { + const path = IRElementAPIPaths[IRElementType.Entity] + let fullPath:string = "" + fullPath = path + '/' + elementID + '/' + 'flair_appearances' + return axios({ + url: fullPath, + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true, + signal: abortController?.signal, + params: params + }) + }, + + async retrieveEntityPivotsbyID(elementID: number, abortController: AbortController): Promise { + const path = IRElementAPIPaths[IRElementType.Entity] + let fullPath:string = "" + fullPath = path + '/' + elementID + '/' + 'pivot' + return axios({ + url: fullPath, + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true, + signal: abortController?.signal + + }) + }, + + async retrieveEntityEnrichmentsbyID(elementID: number, abortController: AbortController): Promise { + const path = IRElementAPIPaths[IRElementType.Entity] + let fullPath:string = "" + fullPath = path + '/' + elementID + '/' + 'enrichment' + return axios({ + url: fullPath, + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true, + signal: abortController?.signal + + }) + }, + async createElement(elementType: IRElementType, createData: any, extraData: any): Promise { + let postData = {} + const elementName = convertToSnakeCase(elementType) + if (extraData && elementName) + { + postData = { [elementName]: createData, ...extraData } + } + else{ + postData = createData + } + return axios({ + url: IRElementAPIPaths[elementType] + '/', + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true, + data: postData + }) + }, + + async submitFile(formData:FormData, targetType:string, targetId:string): Promise { + return axios({ + url: '/file/', + method: 'POST', + headers: { + 'Content-Type': 'multipart/form-data', + 'target_type': targetType, + 'target_id': targetId, + }, + withCredentials: true, + data: formData + }) + }, + + async updateElementById(elementId: number, elementType: IRElementType, updateData: any): Promise { + const path = IRElementAPIPaths[elementType] + '/' + elementId + return axios({ + url: path, + method: 'PUT', + headers: { + 'Content-Type': 'application/json' + }, + data: updateData, + withCredentials: true + }) + }, + + async deleteElementById(elementId: number, elementType: IRElementType) { + const path = IRElementAPIPaths[elementType] + '/' + elementId + return axios({ + url: path, + method: 'DELETE', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true + }) + }, + + + async deleteFileById(fileId:number, targetId:number, targetType:IRElementType) { + const path = 'file' + '/' + fileId + return axios({ + url: path, + method: 'DELETE', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true, + data: { target_type: convertToSnakeCase(targetType), target_id: targetId } + }) + }, + + async undeleteElementById(elementId: number, elementType: IRElementType, keep_id: boolean = true) { + const path = IRElementAPIPaths[elementType] + '/undelete' + return axios({ + url: path, + method: 'POST', + params: { 'target_id': elementId, 'keep_ids': keep_id }, + withCredentials: true + }) + }, + + async updateEntityClassDescriptionById(elementId: number, updateData: any): Promise { + const path = 'entity_class' + '/' + elementId + '/' + return axios({ + url: path, + method: 'PUT', + headers: { + 'Content-Type': 'application/json' + }, + data: updateData, + withCredentials: true + }) + }, + + async updateOrCreateEntry(entryID: number, entryCreateOrUpdateAttributes: any): Promise { + if (entryCreateOrUpdateAttributes.target_type) { + entryCreateOrUpdateAttributes.target_type = convertToSnakeCase(entryCreateOrUpdateAttributes.target_type) + } + if (entryID == -1){ + if (entryCreateOrUpdateAttributes.entry_class == 'notebook') + { + const fullPutPath = 'entry' + '/' + 'notebook' + return axios({ + url: fullPutPath, + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials:true, + data: {entry: entryCreateOrUpdateAttributes} + }) + } + const fullPutPath = 'entry' + '/' + return axios({ + url: fullPutPath, + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials:true, + data: {entry: entryCreateOrUpdateAttributes} + }) + + } + else{ + const fullPutPath = 'entry' +'/' + entryID + return axios({ + url: fullPutPath, + method: 'PUT', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials:true, + data: entryCreateOrUpdateAttributes + }) + } + + }, + + + async downloadFilesbyId(fileIds:Array): Promise{ + let fullPath:string = "" + + fullPath = 'file' + '/' + 'download' + `?ids=${fileIds}` + return axios({ + url: fullPath, + method: 'GET', + withCredentials: true + + }) + + + }, + async retrieveElementEntriesbyID(elementID: number, elementType: IRElementType, abortController: AbortController): Promise { + const path = IRElementAPIPaths[elementType] + let fullPath:string = "" + if (elementType === IRElementType.Alertgroup){ + fullPath = path + '/' + elementID + '/' + 'alerts' + } + else{ + fullPath = path + '/' + elementID + '/' + 'entry' + } + return axios({ + url: fullPath, + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + params: { limit: -1 }, // Get all entries, no matter how many there are + withCredentials: true, + signal: abortController?.signal + }) + }, + + + async retrieveElementEntitiesbyID(elementID: number, elementType: IRElementType, abortController: AbortController): Promise { + const path = IRElementAPIPaths[elementType] + let fullPath:string = "" + + fullPath = path + '/' + elementID + '/' + 'entity' + return axios({ + url: fullPath, + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true, + signal: abortController?.signal + }) + }, + + async reflairSelectedElementById(elementID: number, elementType: IRElementType, abortController: AbortController): Promise { + const path = IRElementAPIPaths[elementType] + let fullPath: string = "" + + fullPath = path + '/' + elementID + '/' + 'reflair' + return axios({ + url: fullPath, + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true, + signal: abortController?.signal + }) + }, + + async retrieveElementFilesbyID(elementID: number, elementType: IRElementType, abortController: AbortController): Promise { + const path = IRElementAPIPaths[elementType] + let fullPath: string = "" + + fullPath = path + '/' + elementID + '/' + 'files' + return axios({ + url: fullPath, + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true, + signal: abortController?.signal + + }) + }, + + async retrieveElementSignaturesByID(elementID: number, elementType: IRElementType, abortController: AbortController): Promise { + const path = IRElementAPIPaths[elementType] + let fullPath: string = "" + + fullPath = path + '/' + elementID + '/' + 'signatures' + return axios({ + url: fullPath, + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true, + signal: abortController?.signal + }) + }, + + async retrieveElementPermissions(elementID: number, elementType: IRElementType, abortController: AbortController): Promise { + return axios({ + url: '/permissions/getroles', + method: 'GET', + params: { target_type: convertToSnakeCase(IRElementType[elementType]), target_id: elementID }, + withCredentials: true, + signal: abortController?.signal + }) + }, + + async retrieveElementHistory(elementID: number, elementType: IRElementType, abortController: AbortController): Promise { + const path = IRElementAPIPaths[elementType] + const fullPath: string = path + '/' + elementID + '/' + 'history' + return axios({ + url: fullPath, + method: 'GET', + withCredentials: true, + signal: abortController?.signal + }) + }, + + async grantElementPermission(elementID: number, elementType: IRElementType, roleID: number, permission: PermissionEnum): Promise { + return axios({ + url: '/permissions/grant', + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + data: { + target_type: convertToSnakeCase(IRElementType[elementType]), + target_id: elementID, + role_id: roleID, + permission: PermissionEnum[permission].toLowerCase() + }, + withCredentials: true + }) + }, + + async revokeElementPermission(elementID: number, elementType: IRElementType, roleID: number, permission: PermissionEnum): Promise { + return axios({ + url: '/permissions/revoke', + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + data: { + target_type: convertToSnakeCase(IRElementType[elementType]), + target_id: elementID, + role_id: roleID, + permission: PermissionEnum[permission].toLowerCase() + }, + withCredentials: true + }) + }, + + async setElementPermissions(elementID: number, elementType: IRElementType, permissions: { [key in PermissionEnum]?: Array }): Promise { + return axios({ + url: '/permissions/set', + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + data: { + target_type: convertToSnakeCase(IRElementType[elementType]), + target_id: elementID, + permissions: permissions + }, + withCredentials: true + }) + }, + + async changeElementStatus(elementID: number, elementType: IRElementType, newElementStatus: IRElementStatus): Promise { + const path = IRElementAPIPaths[elementType] + const fullPath:string = path + "/" + elementID + return axios({ + url: fullPath, + method: 'PUT', + headers: { + 'Content-Type': 'application/json' + }, + data: { status: newElementStatus.toLowerCase() }, + withCredentials:true + }) + + }, + + + async promoteElements(elementIDs: Array, elementType: IRElementType, new_tags: Array = [], new_sources: Array = []): Promise { + const fullPath: string = "promotion/" + const promotionTargetMap: Record = { + "alert": "event", + "event": "incident", + "dispatch": "intel", + "vuln_feed": "vuln_track" + } + const sourceString = convertToSnakeCase(IRElementType[elementType]) + const targetElement = promotionTargetMap[sourceString || "undefined"] + const sources = elementIDs.map(element => { + return { type: convertToSnakeCase(IRElementType[elementType]), id: element } + }) + return axios({ + url: fullPath, + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + data: { source: sources, destination: targetElement, sources: new_sources, tags: new_tags }, + withCredentials: true + }) + + }, + + async promoteElementsToExisting(elementIDs: Array, elementType: IRElementType, existingEventId: number, new_tags: Array = [], new_sources: Array = []): Promise { + const fullPath: string = "promotion/" + const promotionTargetMap: Record = { + "alert": "event", + "event": "incident", + "dispatch": "intel", + "vuln_feed": "vuln_track" + } + const sourceString = convertToSnakeCase(IRElementType[elementType]) + const targetElement = promotionTargetMap[sourceString || "undefined"] + const sources = elementIDs.map(element => { + return { type: convertToSnakeCase(IRElementType[elementType]), id: element } + }) + const promoteTo = existingEventId + return axios({ + url: fullPath, + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + data: { source: sources, destination: targetElement, destination_id: promoteTo, sources: new_sources, tags: new_tags }, + withCredentials: true + }) + }, + + async retrieveTags(filterDict: any): Promise { + return axios({ + url: "/tag/", + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + params: filterDict, + withCredentials:true + }) + }, + + + async retrieveAllEntityClasses(): Promise { + const filterDict = { limit: -1 } + return axios({ + url: "/entity_class/", + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + params: filterDict, + withCredentials:true + }) + }, + + async retrieveAllEntityTypes(): Promise { + const filterDict = { limit: -1 } + return axios({ + url: "/entity_type/", + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + params: filterDict, + withCredentials:true + }) + }, + + async retrieveSources(filterDict: any): Promise { + return axios({ + url: "/source/", + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + params: filterDict, + withCredentials:true + }) + }, + async addSource(sourceToAdd: any): Promise { + if (sourceToAdd.target_type) { + sourceToAdd.target_type = convertToSnakeCase(sourceToAdd.target_type) + } + return axios({ + url: "/source/source_by_name", + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials:true, + data: sourceToAdd + }) + }, + async addTag(tagToAdd: any): Promise { + if (tagToAdd.target_type) { + tagToAdd.target_type = convertToSnakeCase(tagToAdd.target_type) + } + return axios({ + url: "/tag/tag_by_name", + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials:true, + data: tagToAdd + }) + }, + + async submitPivotEntityClasses(pivotId:number, entityClasses:any): Promise { + return axios({ + url: `/pivot/${pivotId}/entity_class`, + method: 'PUT', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials:true, + data: {'entity_classes': entityClasses} + }) + }, + async submitPivotEntityTypes(pivotId:number, entityTypes:any): Promise { + return axios({ + url: `/pivot/${pivotId}/entity_type`, + method: 'PUT', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials:true, + data: {'entity_types': entityTypes} + }) + }, + + async addEntityClass(entityId:number, entityClassesToAdd:any): Promise { + return axios({ + url: `/entity/${entityId}/entity_class`, + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials:true, + data: {'entity_class_ids': entityClassesToAdd} + }) + }, + + async removeEntityClass(entityId:number, entityClassesToRemove:any): Promise { + return axios({ + url: `/entity/${entityId}/entity_class/remove`, + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials:true, + data: {'entity_class_ids': entityClassesToRemove} + }) + }, + + async removeTag(tagId: any, removeBody: any): Promise { + if (removeBody.target_type) { + removeBody.target_type = convertToSnakeCase(removeBody.target_type) + } + return axios({ + url: `/tag/${tagId}/untag`, + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials:true, + data: removeBody + }) + }, + + async removeSource(sourceId: any, removeBody: any): Promise { + if (removeBody.target_type) { + removeBody.target_type = convertToSnakeCase(removeBody.target_type) + } + return axios({ + url: `/source/${sourceId}/remove`, + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials:true, + data: removeBody + }) + }, + + + + async updateSource(sourceId:any, updateBody:any): Promise { + return axios({ + url: `/source/${sourceId}`, + method: 'PUT', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials:true, + data: updateBody + }) + }, + async updateTag(tagId:any, updateBody:any): Promise { + return axios({ + url: `/tag/${tagId}`, + method: 'PUT', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials:true, + data: updateBody + }) + }, + + async deleteElementByID(elementID: number, elementType: IRElementType): Promise { + const path = IRElementAPIPaths[elementType] + let fullPath:string = "" + fullPath = path + '/' + elementID + return axios({ + url: fullPath, + method: 'DELETE', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials:true + + }) + }, + async deleteEntryByID(elementID: number): Promise { + + let fullPath:string = "" + fullPath = 'entry' + '/' + elementID + return axios({ + url: fullPath, + method: 'DELETE', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials:true + + }) + }, + + async deleteLinksBetweenElements(elementType0: IRElementType, elementId0: number, elementType1: IRElementType, elementId1: number, bidirectional: boolean = false) { + const path = IRElementAPIPaths[IRElementType.Link] + const fullPath: string = path + '/deletebetween' + return axios({ + url: fullPath, + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + data: { + v0_type: elementType0, + v0_id: elementId0, + v1_type: elementType1, + v1_id: elementId1, + bidirectional: bidirectional + }, + withCredentials: true + + }) + }, + + async retrieveSignatureBodies(signatureId: number): Promise { + return axios({ + url: 'signature/' + signatureId + '/sigbodies', + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true + }) + }, + }); \ No newline at end of file diff --git a/src/api/file.ts b/src/api/file.ts new file mode 100755 index 0000000..279adb8 --- /dev/null +++ b/src/api/file.ts @@ -0,0 +1,38 @@ +import { AxiosStatic } from "axios" +import { IRElementType } from "../store/modules/IRElements/types" + +export default (axios: AxiosStatic) => ({ + async createFile(fileData: Blob, containingElementType?: IRElementType, containingElementId?: number, progressCallback?: any, abortController?: AbortController): Promise { + const formData = new FormData() + formData.append("file", fileData) + if (containingElementId && containingElementType) { + return axios({ + url: '/file/', + method: 'POST', + withCredentials: true, + headers: { + 'Content-Type': 'multipart/form-data', + 'target_type': containingElementType.toLowerCase(), + 'target_id': containingElementId.toString(), + }, + data: formData, + onUploadProgress: progressCallback, + signal: abortController?.signal + }) + } + else { + return axios({ + url: '/file/', + method: 'POST', + withCredentials: true, + headers: { + 'Content-Type': 'multipart/form-data', + }, + data: formData, + onUploadProgress: progressCallback, + signal: abortController?.signal + }) + } + }, +}) + diff --git a/src/api/storage_provider.ts b/src/api/storage_provider.ts new file mode 100644 index 0000000..924abdd --- /dev/null +++ b/src/api/storage_provider.ts @@ -0,0 +1,43 @@ +import {AxiosStatic} from "axios" +import Vue from 'vue' + +export default (axios: AxiosStatic) => ({ + async getStorageProviders(): Promise { + return axios({ + url: '/settings/storage_provider', + method: 'GET', + withCredentials: true + }) + }, + async createStorageProvider(create_data: any): Promise { + return axios({ + url: '/settings/storage_provider', + method: 'POST', + withCredentials: true, + data: create_data + }) + }, + async updateStorageProvider(id: number, data: any): Promise { + return axios({ + url: '/settings/storage_provider/' + id, + method: 'PUT', + withCredentials: true, + data: data + }) + }, + async deleteStorageProvider(id: number): Promise { + return axios({ + url: '/settings/storage_provider/' + id, + method: 'DELETE', + withCredentials: true + }) + }, + async getStorageProviderHelp(): Promise { + return axios({ + url: '/settings/storage_provider_help', + method: 'GET', + withCredentials: true + }) + } +} +); diff --git a/src/api/team.ts b/src/api/team.ts new file mode 100644 index 0000000..d966d92 --- /dev/null +++ b/src/api/team.ts @@ -0,0 +1,141 @@ +import { AxiosStatic } from "axios" +import qs from "qs" + +export default (axios: AxiosStatic) => ({ + async getHandlers(startRange:string, endRange:string): Promise { + return axios({ + url: `/handler/?start_date=${startRange}&end_date=${endRange}`, + method: 'GET', + withCredentials: true, + headers: { + 'Content-Type': 'application/json' + }, + }) + }, + + async getAllUsernames(): Promise { + return axios({ + url: '/users/usernames', + method: 'GET', + withCredentials: true, + headers: { + 'Content-Type': 'application/json' + }, + }) + }, + + async createHandler(createData: any): Promise { + return axios({ + url: '/handler/', + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true, + data: createData + }) + }, + + async updateHandler(handlerId: number, updateData: any): Promise { + const path = '/handler/' + handlerId + return axios({ + url: path, + method: 'PUT', + headers: { + 'Content-Type': 'application/json' + }, + data: updateData, + withCredentials: true + }) + }, + + async deleteHandler(handlerId: number): Promise { + const path = '/handler/' + handlerId + return axios({ + url: path, + method: 'DELETE', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true + }) + }, + + async retrieveGlobalSettings(): Promise { + const path = '/settings/' + return axios({ + url: path, + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true + }) + }, + + async updateGlobalSettings(updateData: any): Promise { + const path = '/settings/' + return axios({ + url: path, + method: 'PUT', + headers: { + 'Content-Type': 'application/json' + }, + data: updateData, + withCredentials: true + }) + }, + + async retrieveAuditsWithFilter(filter: any, abortController: AbortController): Promise { + const path = '/audit/' + return axios({ + url: path, + method: 'GET', + params: filter, + withCredentials: true, + signal: abortController?.signal + }) + }, + + async deleteAudit(id: number): Promise { + const path = '/audit/' + id + return axios({ + url: path, + method: 'DELETE', + withCredentials: true + }) + }, + + async getGameResults(game_ids: Array | undefined = undefined, + date_range: Array | undefined = undefined, + num_top_users: number = 3, + exclude_users: Array = [] + ) { + const path = '/game/results' + const sixMonthsAgo = new Date().setMonth(new Date().getMonth() - 6) + const dates = date_range ? date_range : [sixMonthsAgo] + return axios({ + url: path, + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + params: { + game_ids: game_ids, + dates: dates, + num_top_users: num_top_users, + exclude_users: exclude_users + }, + withCredentials: true + }) + }, + + async getUserActivity() { + const path = '/users/activity' + return axios({ + url: path, + method: 'GET', + withCredentials: true + }) + } +}); diff --git a/src/api/user.ts b/src/api/user.ts new file mode 100755 index 0000000..919c77d --- /dev/null +++ b/src/api/user.ts @@ -0,0 +1,220 @@ +import {AxiosStatic} from "axios" +import { PermissionEnum } from "../store/modules/IRElements/types"; +export default (axios: AxiosStatic) => ({ + async updateUserMe(updateData: any): Promise { + return axios({ + url: '/users/me', + method: 'PUT', + withCredentials: true, + headers: { + 'Content-Type': 'application/json' + }, + data: updateData, + }) + }, + + async updateUser(id: number, updateData: any): Promise { + return axios({ + url: '/users/' + id, + method: 'PUT', + withCredentials: true, + headers: { + 'Content-Type': 'application/json' + }, + data: updateData, + }) + }, + + async createUser(createData: any): Promise { + return axios({ + url: '/users/', + method: 'POST', + withCredentials: true, + headers: { + 'Content-Type': 'application/json' + }, + data: createData, + }) + }, + + async getUsers({ skip = undefined, limit = undefined, sort = 'id' } = {}): Promise { + return axios({ + url: '/users/', + method: 'GET', + withCredentials: true, + params: {'skip': skip, 'limit': limit, 'sort': sort} + }) + }, + + async deleteUser(user_id: number): Promise { + return axios({ + url: '/users/' + user_id, + method: 'DELETE', + withCredentials: true + }) + }, + + async getRoles({ skip = undefined, limit = undefined, sort = 'id' } = {}): Promise { + return axios({ + url: '/role/', + method: 'GET', + withCredentials: true, + params: {'skip': skip, 'limit': limit, 'sort': sort} + }) + }, + + async updateRole(id: number, updateData: any): Promise { + return axios({ + url: '/role/' + id, + method: 'PUT', + withCredentials: true, + headers: { + 'Content-Type': 'application/json' + }, + data: updateData, + }) + }, + + async createRole(createData: any): Promise { + return axios({ + url: '/role/', + method: 'POST', + withCredentials: true, + headers: { + 'Content-Type': 'application/json' + }, + data: createData, + }) + }, + + async assignRole(username: string, role_id?: number, role_name?: string): Promise { + return axios({ + url: '/role/assign', + method: 'POST', + withCredentials: true, + headers: { + 'Content-Type': 'application/json' + }, + params: { username, role_id, role_name }, + }) + }, + + async removeRole(username: string, role_id?: number, role_name?: string): Promise { + return axios({ + url: '/role/remove', + method: 'POST', + withCredentials: true, + headers: { + 'Content-Type': 'application/json' + }, + params: { username, role_id, role_name }, + }) + }, + + async deleteRole(role_id: number): Promise { + return axios({ + url: '/role/' + role_id, + method: 'DELETE', + withCredentials: true + }) + }, + + async getRolesForObject(objType: string, objId: number): Promise { + return axios({ + url: '/permissions/getroles', + method: 'GET', + withCredentials: true, + params: { target_type: objType, target_id: objId } + }) + }, + + async grantPermission(roleId: number, objType: string, objId: number, permission: PermissionEnum): Promise { + return axios({ + url: '/permissions/grant', + method: 'POST', + withCredentials: true, + data: { role_id: roleId, target_type: objType, target_id: objId, permission } + }) + }, + + async revokePermission(roleId: number, objType: string, objId: number, permission: PermissionEnum): Promise { + return axios({ + url: '/permissions/revoke', + method: 'POST', + withCredentials: true, + data: { role_id: roleId, target_type: objType, target_id: objId, permission } + }) + }, + + // Note: this gets all api keys of the current user + // TODO: pagination? + async getUserApiKeys(): Promise { + return axios({ + url: '/apikey/', + method: 'GET', + withCredentials: true, + }) + }, + + async retrieveNotifications(): Promise { + return axios({ + url: '/notification/', + method: 'GET', + withCredentials: true, + }) + }, + + + async ackNotifications(notificationIds: Array): Promise { + return axios({ + url: '/notification/ack/', + method: 'POST', + data: {notification_ids:notificationIds}, + headers: { + 'Content-Type': 'application/json' + }, + withCredentials: true, + }) + }, + + async updateApiKey(key: string, updateData: any): Promise { + return axios({ + url: '/apikey/' + key, + method: 'PUT', + withCredentials: true, + headers: { + 'Content-Type': 'application/json' + }, + data: updateData, + }) + }, + + async createApiKey(): Promise { + return axios({ + url: '/apikey/', + method: 'POST', + withCredentials: true, + }) + }, + + async deleteApiKey(key: string): Promise { + return axios({ + url: '/apikey/' + key, + method: 'DELETE', + withCredentials: true, + }) + }, + + async callTextSearch(searchText:string, abortController?: AbortController): Promise { + return axios({ + url: '/search/', + method: 'POST', + withCredentials: true, + data: {'text': searchText}, + headers: { + 'Content-Type': 'application/json' + }, + + }) + } +}); \ No newline at end of file diff --git a/src/assets/logo.png b/src/assets/logo.png new file mode 100644 index 0000000..f3d2503 Binary files /dev/null and b/src/assets/logo.png differ diff --git a/src/assets/logo.svg b/src/assets/logo.svg new file mode 100644 index 0000000..145b6d1 --- /dev/null +++ b/src/assets/logo.svg @@ -0,0 +1 @@ +Artboard 46 diff --git a/src/assets/scot-logo.png b/src/assets/scot-logo.png new file mode 100755 index 0000000..a16bc92 Binary files /dev/null and b/src/assets/scot-logo.png differ diff --git a/src/assets/scss/functions4.scss b/src/assets/scss/functions4.scss new file mode 100644 index 0000000..0b1c62d --- /dev/null +++ b/src/assets/scss/functions4.scss @@ -0,0 +1,118 @@ +// Bootstrap functions +// +// Utility mixins and functions for evalutating source code across our variables, maps, and mixins. + +// Ascending +// Used to evaluate Sass maps like our grid breakpoints. +@mixin _assert-ascending($map, $map-name) { + $prev-key: null; + $prev-num: null; + @each $key, $num in $map { + @if $prev-num == null { + // Do nothing + } @else if not comparable($prev-num, $num) { + @warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !"; + } @else if $prev-num >= $num { + @warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !"; + } + $prev-key: $key; + $prev-num: $num; + } + } + + // Starts at zero + // Another grid mixin that ensures the min-width of the lowest breakpoint starts at 0. + @mixin _assert-starts-at-zero($map) { + $values: map-values($map); + $first-value: nth($values, 1); + @if $first-value != 0 { + @warn "First breakpoint in `$grid-breakpoints` must start at 0, but starts at #{$first-value}."; + } + } + + // Replace `$search` with `$replace` in `$string` + // Used on our SVG icon backgrounds for custom forms. + // + // @author Hugo Giraudel + // @param {String} $string - Initial string + // @param {String} $search - Substring to replace + // @param {String} $replace ('') - New value + // @return {String} - Updated string + @function str-replace($string, $search, $replace: "") { + $index: str-index($string, $search); + + @if $index { + @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); + } + + @return $string; + } + + // Color contrast + @function color-yiq($color) { + $r: red($color); + $g: green($color); + $b: blue($color); + + $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000; + + @if ($yiq >= $yiq-contrasted-threshold) { + @return $yiq-text-dark; + } @else { + @return $yiq-text-light; + } + } + + // Retrieve color Sass maps + @function color($key: "blue") { + @return map-get($colors, $key); + } + + @function theme-color($key: "primary") { + @return map-get($theme-colors, $key); + } + + @function gray($key: "100") { + @return map-get($grays, $key); + } + + // Request a theme color level + @function theme-color-level($color-name: "primary", $level: 0) { + $color: theme-color($color-name); + $color-base: if($level > 0, $black, $white); + $level: abs($level); + + @return mix($color-base, $color, $level * $theme-color-interval); + } + + + // Tables + + @mixin table-row-variant($state, $background) { + // Exact selectors below required to override `.table-striped` and prevent + // inheritance to nested tables. + .table-#{$state} { + &, + > th, + > td { + background-color: $background; + } + } + + // Hover states for `.table-hover` + // Note: this is not available for cells or rows within `thead` or `tfoot`. + .table-hover { + $hover-background: darken($background, 5%); + + .table-#{$state} { + @include hover { + background-color: $hover-background; + + > td, + > th { + background-color: $hover-background; + } + } + } + } + } \ No newline at end of file diff --git a/src/assets/scss/tabulator_bootstrap4.scss b/src/assets/scss/tabulator_bootstrap4.scss new file mode 100644 index 0000000..4db23b0 --- /dev/null +++ b/src/assets/scss/tabulator_bootstrap4.scss @@ -0,0 +1,1215 @@ +@import "functions4.scss"; +@import "variables4.scss"; + +// Style conversion file, bootstrap to tabulator + +//Main Theme Variables +$backgroundColor: $table-bg !default; //background color of tabulator +$borderColor:$table-border-color !default; //border to tabulator +$textSize:$font-size-base !default; //table text size + +//header themeing +$headerBackgroundColor:#fff !default; //border to tabulator +$headerSeperatorColor:$table-border-color !default; //header bottom seperator color + +$cellPadding:$table-cell-padding !default; //padding round header + +//column header arrows +$sortArrowActive: #666 !default; +$sortArrowInactive: #bbb !default; + +//row themeing +$rowBackgroundColor:$backgroundColor !default; //table row background color +$rowAltBackgroundColor: $table-accent-bg !default; //table row background color +$rowBorderColor:$table-border-color !default; //table border color +$rowHoverBackground:$table-hover-bg !default; //row background color on hover + +$rowSelectedBackground: #9ABCEA !default; //row background color when selected +$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered + + +$editBoxColor:#1D68CD !default; //border color for edit boxes +$errorColor:#dd0000 !default; //error indication + +//footer themeing +$footerBorderColor:$pagination-border-color !default; //footer border color +$footerSeperatorColor:$table-border-color !default; //footer bottom seperator color +$footerActiveColor:$pagination-active-color !default; //footer bottom active text color + + +//Tabulator Containing Element +.tabulator{ + position: relative; + background-color: $backgroundColor; + overflow:hidden; + font-size:$textSize; + text-align: left; + width: 100%; + max-width: 100%; + // margin-bottom: $line-height-computed; + + -webkit-transform: translatez(0); + -moz-transform: translatez(0); + -ms-transform: translatez(0); + -o-transform: translatez(0); + transform: translatez(0); + + &[tabulator-layout="fitDataFill"]{ + .tabulator-tableHolder{ + .tabulator-table{ + min-width:100%; + } + } + } + + &.tabulator-block-select{ + user-select: none; + } + + //column header containing element + .tabulator-header{ + position:relative; + box-sizing: border-box; + + width:100%; + + border-top:1px solid $headerSeperatorColor; + border-bottom:2px solid $headerSeperatorColor; + background-color: $headerBackgroundColor; + font-weight:bold; + + white-space: nowrap; + overflow:hidden; + + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + + //individual column header element + .tabulator-col{ + display:inline-block; + position:relative; + box-sizing:border-box; + background-color: $headerBackgroundColor; + text-align:left; + vertical-align: bottom; + overflow: hidden; + + &.tabulator-moving{ + position: absolute; + border:1px solid $headerSeperatorColor; + background:darken($headerBackgroundColor, 10%); + pointer-events: none; + } + + //hold content of column header + .tabulator-col-content{ + box-sizing:border-box; + position: relative; + padding:$cellPadding; + + //hold title of column header + .tabulator-col-title{ + box-sizing:border-box; + width: 100%; + + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align:bottom; + + //element to hold title editor + .tabulator-title-editor{ + box-sizing: border-box; + width: 100%; + + border:1px solid #999; + + padding:1px; + + background: #fff; + } + } + + //column sorter arrow + .tabulator-arrow{ + display: inline-block; + position: absolute; + top:14px; + right:8px; + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid $sortArrowInactive; + } + + } + + //complex header column group + &.tabulator-col-group{ + + //gelement to hold sub columns in column group + .tabulator-col-group-cols{ + position:relative; + display: flex; + + border-top:1px solid $borderColor; + overflow: hidden; + + .tabulator-col:last-child{ + margin-right:-1px; + } + } + } + + + //hide left resize handle on first column + &:first-child{ + .tabulator-col-resize-handle.prev{ + display: none; + } + } + + //placeholder element for sortable columns + &.ui-sortable-helper{ + position: absolute; + background-color:darken($headerBackgroundColor, 10%) !important; + border:1px solid $borderColor; + } + + //header filter containing element + .tabulator-header-filter{ + position: relative; + box-sizing: border-box; + margin-top:2px; + width:100%; + text-align: center; + + //styling adjustment for inbuilt editors + textarea{ + height:auto !important; + } + + svg{ + margin-top: 3px; + } + + input{ + &::-ms-clear { + width : 0; + height: 0; + } + } + } + + + //styling child elements for sortable columns + &.tabulator-sortable{ + .tabulator-col-title{ + padding-right:25px; + } + + &:hover{ + cursor:pointer; + background-color:darken($headerBackgroundColor, 10%); + } + + &[aria-sort="none"]{ + .tabulator-col-content .tabulator-arrow{ + border-top: none; + border-bottom: 6px solid $sortArrowInactive; + } + } + + &[aria-sort="asc"]{ + .tabulator-col-content .tabulator-arrow{ + border-top: none; + border-bottom: 6px solid $sortArrowActive; + } + } + + &[aria-sort="desc"]{ + .tabulator-col-content .tabulator-arrow{ + border-top: 6px solid $sortArrowActive; + border-bottom: none; + } + } + } + + &.tabulator-col-vertical{ + .tabulator-col-content{ + .tabulator-col-title{ + writing-mode: vertical-rl; + text-orientation: mixed; + + display:flex; + align-items:center; + justify-content:center; + } + } + + &.tabulator-col-vertical-flip{ + .tabulator-col-title{ + transform: rotate(180deg); + } + } + + &.tabulator-sortable{ + .tabulator-col-title{ + padding-right:0; + padding-top:20px; + } + + &.tabulator-col-vertical-flip{ + .tabulator-col-title{ + padding-right:0; + padding-bottom:20px; + } + + } + + .tabulator-arrow{ + right:calc(50% - 6px); + } + } + } + + } + + .tabulator-frozen{ + display: inline-block; + position: absolute; + + // background-color: inherit; + + z-index: 10; + + &.tabulator-frozen-left{ + border-right:2px solid $rowBorderColor; + } + + &.tabulator-frozen-right{ + border-left:2px solid $rowBorderColor; + } + } + + .tabulator-calcs-holder{ + box-sizing:border-box; + width:100%; + + background:lighten($headerBackgroundColor, 5%) !important; + + .tabulator-row{ + background:lighten($headerBackgroundColor, 5%) !important; + + .tabulator-col-resize-handle{ + display: none; + } + } + + border-top:1px solid $rowBorderColor; + border-bottom:1px solid $headerSeperatorColor; + + overflow: hidden; + } + + .tabulator-frozen-rows-holder{ + min-width:400%; + + &:empty{ + display: none; + } + } + } + + + + //scrolling element to hold table + .tabulator-tableHolder{ + position:relative; + width:100%; + white-space: nowrap; + overflow:auto; + -webkit-overflow-scrolling: touch; + + &:focus{ + outline: none; + } + + //default placeholder element + .tabulator-placeholder{ + box-sizing:border-box; + display: flex; + align-items:center; + + &[tabulator-render-mode="virtual"]{ + position: absolute; + top:0; + left:0; + height:100%; + } + + width:100%; + + span{ + display: inline-block; + + margin:0 auto; + padding:10px; + + color:#000; + font-weight: bold; + font-size: 20px; + } + } + + //element to hold table rows + .tabulator-table{ + position:relative; + display:inline-block; + background-color:$rowBackgroundColor; + white-space: nowrap; + overflow:visible; + + .tabulator-row{ + &.tabulator-calcs{ + font-weight: bold; + background:darken($rowAltBackgroundColor, 5%) !important; + + &.tabulator-calcs-top{ + border-bottom:2px solid $rowBorderColor; + } + + &.tabulator-calcs-bottom{ + border-top:2px solid $rowBorderColor; + } + } + } + } + } + + + //column resize handles + .tabulator-col-resize-handle{ + position:absolute; + right:0; + top:0; + bottom:0; + width:5px; + + &.prev{ + left:0; + right:auto; + } + + &:hover{ + cursor:ew-resize; + } + } + + + //footer element + .tabulator-footer{ + padding:5px 10px; + border-top:2px solid $footerSeperatorColor; + text-align:right; + font-weight:bold; + white-space:nowrap; + user-select:none; + + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + + .tabulator-calcs-holder{ + box-sizing:border-box; + width:calc(100% + 20px); + margin:-5px -10px 5px -10px; + + text-align: left; + + background:lighten($backgroundColor, 5%) !important; + + .tabulator-row{ + background:lighten($backgroundColor, 5%) !important; + + .tabulator-col-resize-handle{ + display: none; + } + } + + border-bottom:1px solid $rowBorderColor; + border-top:1px solid $rowBorderColor; + + overflow: hidden; + + &:only-child{ + margin-bottom:-5px; + border-bottom:none; + } + } + + //pagination container element + .tabulator-pages{ + // margin:0 7px; + } + + //pagination button + .tabulator-page{ + display:inline-block; + + margin:0; + margin-top:5px; + padding:8px 12px; + + border:1px solid $footerBorderColor; + border-right:none; + + background:rgba(255,255,255,.2); + + color: $pagination-color; + font-family:inherit; + font-weight:normal; + font-size:inherit; + + &[data-page="first"]{ + border-top-left-radius:4px; + border-bottom-left-radius:4px; + } + + &[data-page="last"]{ + border:1px solid $footerBorderColor; + border-top-right-radius:4px; + border-bottom-right-radius:4px; + } + + &.active{ + border-color:$pagination-active-border-color; + background-color:$pagination-active-bg; + color:$footerActiveColor; + } + + &:disabled{ + border-color:$pagination-disabled-border-color; + background:$pagination-disabled-bg; + color:$pagination-disabled-color; + } + + &:not(.disabled){ + &:hover{ + cursor:pointer; + border-color:$pagination-hover-border-color; + background:$pagination-hover-bg; + color:$pagination-hover-color; + } + } + } + } + + //holding div that contains loader and covers tabulator element to prevent interaction + .tabulator-loader{ + position:absolute; + display: flex; + align-items:center; + + top:0; + left:0; + z-index:100; + + height:100%; + width:100%; + background:rgba(0,0,0,.4); + text-align:center; + + //loading message element + .tabulator-loader-msg{ + display:inline-block; + + margin:0 auto; + padding:10px 20px; + + border-radius:10px; + + background:#fff; + font-weight:bold; + font-size:16px; + + //loading message + &.tabulator-loading{ + border:4px solid #333; + color:#000; + } + + //error message + &.tabulator-error{ + border:4px solid #D00; + color:#590000; + } + } + } + + + + //Bootstrap theming classes + + &.thead-dark{ + .tabulator-header{ + border-color: $table-dark-border-color; + background-color: $table-dark-bg; + color: $table-dark-color; + + .tabulator-col{ + border-color: $table-dark-border-color; + background-color: $table-dark-bg; + color: $table-dark-color; + } + } + } + + &.table-dark{ + background-color: $table-dark-bg; + + &:not(.thead-light) .tabulator-header{ + border-color: $table-dark-border-color; + background-color: $table-dark-bg; + color: $table-dark-color; + + .tabulator-col{ + border-color: $table-dark-border-color; + background-color: $table-dark-bg; + color: $table-dark-color; + } + } + + .tabulator-tableHolder{ + color: $table-dark-color; + } + + + .tabulator-row{ + border-color: $table-dark-border-color; + + &:hover{ + background-color: $table-dark-hover-bg !important; + } + } + } + + &.table-striped{ + .tabulator-row{ + &:nth-child(even){ + background-color: $rowAltBackgroundColor; + + &.tabulator-selected{ + background-color:$rowSelectedBackground; + } + + &.tabulator-selectable:hover{ + background-color:$rowHoverBackground; + cursor: pointer; + } + + &.tabulator-selected:hover{ + background-color:$rowSelectedBackgroundHover; + cursor: pointer; + } + } + } + + &.table-dark{ + .tabulator-row{ + &:nth-child(even){ + background-color: $table-dark-accent-bg; + } + } + } + } + + &.table-bordered{ + border:1px solid $borderColor; + + .tabulator-header{ + .tabulator-col{ + border-right:1px solid $borderColor; + } + } + + .tabulator-tableHolder{ + .tabulator-table{ + .tabulator-row{ + .tabulator-cell{ + border-right:1px solid $borderColor; + } + } + } + } + } + + + &.table-borderless{ + .tabulator-header{ + border:none; + } + + .tabulator-row{ + border:none; + } + } + + &.table-sm{ + .tabulator-header{ + .tabulator-col{ + .tabulator-col-content{ + padding:$table-cell-padding-sm !important; + } + } + } + + .tabulator-tableHolder{ + .tabulator-table{ + .tabulator-row{ + min-height:$textSize + ($table-cell-padding-sm * 2); + + .tabulator-cell{ + padding:$table-cell-padding-sm !important; + } + } + } + } + } + + + //row colors + .tabulator-tableHolder{ + .tabulator-table{ + .tabulator-row{ + &.table-primary{ + background:theme-color-level("primary", -9) !important; + } + &.table-secondary{ + background:theme-color-level("secondary", -9) !important; + } + &.table-success{ + background:theme-color-level("success", -9) !important; + } + &.table-info{ + background:theme-color-level("info", -9) !important; + } + &.table-warning{ + background:theme-color-level("warning", -9) !important; + } + &.table-danger{ + background:theme-color-level("danger", -9) !important; + } + &.table-light{ + background:theme-color-level("light", -9) !important; + } + &.table-dark{ + background:theme-color-level("dark", -9) !important; + } + &.table-active{ + background:$table-active-bg !important; + } + + &.bg-primary{ + background:theme-color-level("primary", 0) !important; + } + &.bg-secondary{ + background:theme-color-level("secondary", 0) !important; + } + &.bg-success{ + background:theme-color-level("success", 0) !important; + } + &.bg-info{ + background:theme-color-level("info", 0) !important; + } + &.bg-warning{ + background:theme-color-level("warning", 0) !important; + } + &.bg-danger{ + background:theme-color-level("danger", 0) !important; + } + &.bg-light{ + background:theme-color-level("light", 0) !important; + } + &.bg-dark{ + background:theme-color-level("dark", 0) !important; + } + &.bg-active{ + background:$table-active-bg !important; + } + + .tabulator-cell{ + &.table-primary{ + background:theme-color-level("primary", -9) !important; + } + &.table-secondary{ + background:theme-color-level("secondary", -9) !important; + } + &.table-success{ + background:theme-color-level("success", -9) !important; + } + &.table-info{ + background:theme-color-level("info", -9) !important; + } + &.table-warning{ + background:theme-color-level("warning", -9) !important; + } + &.table-danger{ + background:theme-color-level("danger", -9) !important; + } + &.table-light{ + background:theme-color-level("light", -9) !important; + } + &.table-dark{ + background:theme-color-level("dark", -9) !important; + } + &.table-active{ + background:$table-active-bg !important; + } + + &.bg-primary{ + background:theme-color-level("primary", 0) !important; + } + &.bg-secondary{ + background:theme-color-level("secondary", 0) !important; + } + &.bg-success{ + background:theme-color-level("success", 0) !important; + } + &.bg-info{ + background:theme-color-level("info", 0) !important; + } + &.bg-warning{ + background:theme-color-level("warning", 0) !important; + } + &.bg-danger{ + background:theme-color-level("danger", 0) !important; + } + &.bg-light{ + background:theme-color-level("light", 0) !important; + } + &.bg-dark{ + background:theme-color-level("dark", 0) !important; + } + &.bg-active{ + background:$table-active-bg !important; + } + } + } + } + } + +} + +//row element +.tabulator-row{ + position: relative; + box-sizing: border-box; + + min-height:$textSize + ($cellPadding * 2); + background-color: $rowBackgroundColor; + border-bottom:1px solid $rowBorderColor; + + &.tabulator-selectable:hover{ + background-color:$rowHoverBackground; + cursor: pointer; + } + + &.tabulator-selected{ + background-color:$rowSelectedBackground; + } + + &.tabulator-selected:hover{ + background-color:$rowSelectedBackgroundHover; + cursor: pointer; + } + + &.tabulator-moving{ + position: absolute; + + border-top:1px solid $rowBorderColor; + border-bottom:1px solid $rowBorderColor; + + pointer-events: none !important; + z-index:15; + } + + //row resize handles + .tabulator-row-resize-handle{ + position:absolute; + right:0; + bottom:0; + left:0; + height:5px; + + &.prev{ + top:0; + bottom:auto; + } + + &:hover{ + cursor:ns-resize; + } + } + + .tabulator-frozen{ + display: inline-block; + position: absolute; + + background-color: inherit; + + z-index: 10; + + &.tabulator-frozen-left{ + border-right:2px solid $rowBorderColor; + } + + &.tabulator-frozen-right{ + border-left:2px solid $rowBorderColor; + } + } + + .tabulator-responsive-collapse{ + box-sizing:border-box; + + padding:5px; + + border-top:1px solid $rowBorderColor; + border-bottom:1px solid $rowBorderColor; + + &:empty{ + display:none; + } + + table{ + font-size:$textSize; + + tr{ + td{ + position: relative; + + &:first-of-type{ + padding-right:10px; + } + } + } + } + } + + //cell element + .tabulator-cell{ + display:inline-block; + position: relative; + box-sizing:border-box; + padding:$cellPadding; + vertical-align:middle; + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; + + &:last-of-type{ + border-right: none; + } + + &.tabulator-editing{ + border:1px solid $editBoxColor; + padding: 0; + + input, select{ + border:1px; + background:transparent; + } + } + + &.tabulator-validation-fail{ + border:1px solid $errorColor; + input, select{ + border:1px; + background:transparent; + + color: $errorColor; + } + } + + //hide left resize handle on first column + &:first-child{ + .tabulator-col-resize-handle.prev{ + display: none; + } + } + + //movable row handle + &.tabulator-row-handle{ + + display: inline-flex; + align-items:center; + + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + + //handle holder + .tabulator-row-handle-box{ + width:80%; + + //Hamburger element + .tabulator-row-handle-bar{ + width:100%; + height:3px; + margin-top:2px; + background:#666; + } + } + } + + .tabulator-data-tree-branch{ + display:inline-block; + vertical-align:middle; + + height:9px; + width:7px; + + margin-top:-9px; + margin-right:5px; + + border-bottom-left-radius:1px; + + border-left:2px solid $rowBorderColor; + border-bottom:2px solid $rowBorderColor; + } + + .tabulator-data-tree-control{ + + display:inline-flex; + justify-content:center; + align-items:center; + vertical-align:middle; + + height:11px; + width:11px; + + margin-right:5px; + + border:1px solid #ccc; + border-radius:2px; + background:rgba(0, 0, 0, .1); + + overflow:hidden; + + &:hover{ + cursor:pointer; + background:rgba(0, 0, 0, .2); + } + + .tabulator-data-tree-control-collapse{ + display:inline-block; + position: relative; + + height: 7px; + width: 1px; + + background: transparent; + + &:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + + height: 1px; + width: 7px; + + background: #ccc; + } + } + + .tabulator-data-tree-control-expand{ + display:inline-block; + position: relative; + + height: 7px; + width: 1px; + + background: #ccc; + + &:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + + height: 1px; + width: 7px; + + background: #ccc; + } + } + + } + + .tabulator-responsive-collapse-toggle{ + display: inline-flex; + align-items:center; + justify-content:center; + + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + + height:15px; + width:15px; + + border-radius:20px; + background:#666; + + color:$rowBackgroundColor; + font-weight:bold; + font-size:1.1em; + + &:hover{ + opacity:.7; + } + + &.open{ + .tabulator-responsive-collapse-toggle-close{ + display:initial; + } + + .tabulator-responsive-collapse-toggle-open{ + display:none; + } + } + + .tabulator-responsive-collapse-toggle-close{ + display:none; + } + } + } + + //row grouping element + &.tabulator-group{ + + box-sizing:border-box; + border-bottom:1px solid #999; + border-right:1px solid $rowBorderColor; + border-top:1px solid #999; + padding:5px; + padding-left:10px; + background:#fafafa; + font-weight:bold; + + min-width: 100%; + + &:hover{ + cursor:pointer; + background-color:rgba(0,0,0,.1); + } + + &.tabulator-group-visible{ + .tabulator-arrow{ + margin-right:10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid $sortArrowActive; + border-bottom: 0; + } + } + + &.tabulator-group-level-1{ + .tabulator-arrow{ + margin-left:20px; + } + } + + &.tabulator-group-level-2{ + .tabulator-arrow{ + margin-left:40px; + } + } + + &.tabulator-group-level-3{ + .tabulator-arrow{ + margin-left:60px; + } + } + + &.tabulator-group-level-4{ + .tabulator-arrow{ + margin-left:80px; + } + } + + &.tabulator-group-level-5{ + .tabulator-arrow{ + margin-left:100px; + } + } + + //sorting arrow + .tabulator-arrow{ + display: inline-block; + width: 0; + height: 0; + margin-right:16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid $sortArrowActive; + vertical-align:middle; + } + + span{ + margin-left:10px; + color:#666; + } + } +} + +.tabulator-edit-select-list{ + position: absolute; + display:inline-block; + box-sizing:border-box; + + max-height:200px; + + background:$headerBackgroundColor; + border:1px solid $rowBorderColor; + + font-size:$textSize; + + overflow-y:auto; + -webkit-overflow-scrolling: touch; + + z-index: 10000; + + .tabulator-edit-select-list-item{ + padding:4px; + + &.active{ + color:$headerBackgroundColor; + background:$editBoxColor; + } + + &:hover{ + cursor:pointer; + + color:$headerBackgroundColor; + background:$editBoxColor; + } + } + + .tabulator-edit-select-list-group{ + border-bottom:1px solid $rowBorderColor; + + padding:4px; + padding-top:6px; + + font-weight:bold; + } +} \ No newline at end of file diff --git a/src/assets/scss/variables4.scss b/src/assets/scss/variables4.scss new file mode 100644 index 0000000..4544512 --- /dev/null +++ b/src/assets/scss/variables4.scss @@ -0,0 +1,930 @@ + + +// Variables +// +// Variables should follow the `$component-state-property-size` formula for +// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs. + + +// +// Color system +// + +// stylelint-disable +$white: #fff !default; +$gray-100: #f8f9fa !default; +$gray-200: #e9ecef !default; +$gray-300: #dee2e6 !default; +$gray-400: #ced4da !default; +$gray-500: #adb5bd !default; +$gray-600: #6c757d !default; +$gray-700: #495057 !default; +$gray-800: #343a40 !default; +$gray-900: #212529 !default; +$black: #000 !default; + +$grays: () !default; +$grays: map-merge(( + "100": $gray-100, + "200": $gray-200, + "300": $gray-300, + "400": $gray-400, + "500": $gray-500, + "600": $gray-600, + "700": $gray-700, + "800": $gray-800, + "900": $gray-900 +), $grays); + +$blue: #007bff !default; +$indigo: #6610f2 !default; +$purple: #6f42c1 !default; +$pink: #e83e8c !default; +$red: #dc3545 !default; +$orange: #fd7e14 !default; +$yellow: #ffc107 !default; +$green: #28a745 !default; +$teal: #20c997 !default; +$cyan: #17a2b8 !default; + +$colors: () !default; +$colors: map-merge(( + "blue": $blue, + "indigo": $indigo, + "purple": $purple, + "pink": $pink, + "red": $red, + "orange": $orange, + "yellow": $yellow, + "green": $green, + "teal": $teal, + "cyan": $cyan, + "white": $white, + "gray": $gray-600, + "gray-dark": $gray-800 +), $colors); + +$primary: $blue !default; +$secondary: $gray-600 !default; +$success: $green !default; +$info: $cyan !default; +$warning: $yellow !default; +$danger: $red !default; +$light: $gray-100 !default; +$dark: $gray-800 !default; + +$theme-colors: () !default; +$theme-colors: map-merge(( + "primary": $primary, + "secondary": $secondary, + "success": $success, + "info": $info, + "warning": $warning, + "danger": $danger, + "light": $light, + "dark": $dark +), $theme-colors); +// stylelint-enable + +// Set a specific jump point for requesting color jumps +$theme-color-interval: 8% !default; + +// The yiq lightness value that determines when the lightness of color changes from "dark" to "light". Acceptable values are between 0 and 255. +$yiq-contrasted-threshold: 150 !default; + +// Customize the light and dark text colors for use in our YIQ color contrast function. +$yiq-text-dark: $gray-900 !default; +$yiq-text-light: $white !default; + +// Options +// +// Quickly modify global styling by enabling or disabling optional features. + +$enable-caret: true !default; +$enable-rounded: true !default; +$enable-shadows: false !default; +$enable-gradients: false !default; +$enable-transitions: true !default; +$enable-hover-media-query: false !default; // Deprecated, no longer affects any compiled CSS +$enable-grid-classes: true !default; +$enable-print-styles: true !default; + + +// Spacing +// +// Control the default styling of most Bootstrap elements by modifying these +// variables. Mostly focused on spacing. +// You can add more entries to the $spacers map, should you need more variation. + +// stylelint-disable +$spacer: 1rem !default; +$spacers: () !default; +$spacers: map-merge(( + 0: 0, + 1: ($spacer * .25), + 2: ($spacer * .5), + 3: $spacer, + 4: ($spacer * 1.5), + 5: ($spacer * 3) +), $spacers); + +// This variable affects the `.h-*` and `.w-*` classes. +$sizes: () !default; +$sizes: map-merge(( + 25: 25%, + 50: 50%, + 75: 75%, + 100: 100%, + auto: auto +), $sizes); +// stylelint-enable + +// Body +// +// Settings for the `` element. + +$body-bg: $white !default; +$body-color: $gray-900 !default; + +// Links +// +// Style anchor elements. + +$link-color: theme-color("primary") !default; +$link-decoration: none !default; +$link-hover-color: darken($link-color, 15%) !default; +$link-hover-decoration: underline !default; + +// Paragraphs +// +// Style p element. + +$paragraph-margin-bottom: 1rem !default; + + +// Grid breakpoints +// +// Define the minimum dimensions at which your layout will change, +// adapting to different screen sizes, for use in media queries. + +$grid-breakpoints: ( + xs: 0, + sm: 576px, + md: 768px, + lg: 992px, + xl: 1200px +) !default; + +@include _assert-ascending($grid-breakpoints, "$grid-breakpoints"); +@include _assert-starts-at-zero($grid-breakpoints); + + +// Grid containers +// +// Define the maximum width of `.container` for different screen sizes. + +$container-max-widths: ( + sm: 540px, + md: 720px, + lg: 960px, + xl: 1140px +) !default; + +@include _assert-ascending($container-max-widths, "$container-max-widths"); + + +// Grid columns +// +// Set the number of columns and specify the width of the gutters. + +$grid-columns: 12 !default; +$grid-gutter-width: 30px !default; + +// Components +// +// Define common padding and border radius sizes and more. + +$line-height-lg: 1.5 !default; +$line-height-sm: 1.5 !default; + +$border-width: 1px !default; +$border-color: $gray-300 !default; + +$border-radius: .25rem !default; +$border-radius-lg: .3rem !default; +$border-radius-sm: .2rem !default; + +$box-shadow-sm: 0 .125rem .25rem rgba($black, .075) !default; +$box-shadow: 0 .5rem 1rem rgba($black, .15) !default; +$box-shadow-lg: 0 1rem 3rem rgba($black, .175) !default; + +$component-active-color: $white !default; +$component-active-bg: theme-color("primary") !default; + +$caret-width: .3em !default; + +$transition-base: all .2s ease-in-out !default; +$transition-fade: opacity .15s linear !default; +$transition-collapse: height .35s ease !default; + + +// Fonts +// +// Font, line-height, and color for body text, headings, and more. + +// stylelint-disable value-keyword-case +$font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default; +$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default; +$font-family-base: $font-family-sans-serif !default; +// stylelint-enable value-keyword-case + +$font-size-base: 1rem !default; // Assumes the browser default, typically `16px` +$font-size-lg: ($font-size-base * 1.25) !default; +$font-size-sm: ($font-size-base * .875) !default; + +$font-weight-light: 300 !default; +$font-weight-normal: 400 !default; +$font-weight-bold: 700 !default; + +$font-weight-base: $font-weight-normal !default; +$line-height-base: 1.5 !default; + +$h1-font-size: $font-size-base * 2.5 !default; +$h2-font-size: $font-size-base * 2 !default; +$h3-font-size: $font-size-base * 1.75 !default; +$h4-font-size: $font-size-base * 1.5 !default; +$h5-font-size: $font-size-base * 1.25 !default; +$h6-font-size: $font-size-base !default; + +$headings-margin-bottom: ($spacer / 2) !default; +$headings-font-family: inherit !default; +$headings-font-weight: 500 !default; +$headings-line-height: 1.2 !default; +$headings-color: inherit !default; + +$display1-size: 6rem !default; +$display2-size: 5.5rem !default; +$display3-size: 4.5rem !default; +$display4-size: 3.5rem !default; + +$display1-weight: 300 !default; +$display2-weight: 300 !default; +$display3-weight: 300 !default; +$display4-weight: 300 !default; +$display-line-height: $headings-line-height !default; + +$lead-font-size: ($font-size-base * 1.25) !default; +$lead-font-weight: 300 !default; + +$small-font-size: 80% !default; + +$text-muted: $gray-600 !default; + +$blockquote-small-color: $gray-600 !default; +$blockquote-font-size: ($font-size-base * 1.25) !default; + +$hr-border-color: rgba($black, .1) !default; +$hr-border-width: $border-width !default; + +$mark-padding: .2em !default; + +$dt-font-weight: $font-weight-bold !default; + +$kbd-box-shadow: inset 0 -.1rem 0 rgba($black, .25) !default; +$nested-kbd-font-weight: $font-weight-bold !default; + +$list-inline-padding: .5rem !default; + +$mark-bg: #fcf8e3 !default; + +$hr-margin-y: $spacer !default; + + +// Tables +// +// Customizes the `.table` component with basic values, each used across all table variations. + +$table-cell-padding: .75rem !default; +$table-cell-padding-sm: .3rem !default; + +$table-bg: transparent !default; +$table-accent-bg: rgba($black, .05) !default; +$table-hover-bg: rgba($black, .075) !default; +$table-active-bg: $table-hover-bg !default; + +$table-border-width: $border-width !default; +$table-border-color: $gray-300 !default; + +$table-head-bg: $gray-200 !default; +$table-head-color: $gray-700 !default; + +$table-dark-bg: $gray-900 !default; +$table-dark-accent-bg: rgba($white, .05) !default; +$table-dark-hover-bg: rgba($white, .075) !default; +$table-dark-border-color: lighten($gray-900, 7.5%) !default; +$table-dark-color: $body-bg !default; + +$table-striped-order: odd !default; + +$table-caption-color: $text-muted !default; + +// Buttons + Forms +// +// Shared variables that are reassigned to `$input-` and `$btn-` specific variables. + +$input-btn-padding-y: .375rem !default; +$input-btn-padding-x: .75rem !default; +$input-btn-line-height: $line-height-base !default; + +$input-btn-focus-width: .2rem !default; +$input-btn-focus-color: rgba($component-active-bg, .25) !default; +$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color !default; + +$input-btn-padding-y-sm: .25rem !default; +$input-btn-padding-x-sm: .5rem !default; +$input-btn-line-height-sm: $line-height-sm !default; + +$input-btn-padding-y-lg: .5rem !default; +$input-btn-padding-x-lg: 1rem !default; +$input-btn-line-height-lg: $line-height-lg !default; + +$input-btn-border-width: $border-width !default; + + +// Buttons +// +// For each of Bootstrap's buttons, define text, background, and border color. + +$btn-padding-y: $input-btn-padding-y !default; +$btn-padding-x: $input-btn-padding-x !default; +$btn-line-height: $input-btn-line-height !default; + +$btn-padding-y-sm: $input-btn-padding-y-sm !default; +$btn-padding-x-sm: $input-btn-padding-x-sm !default; +$btn-line-height-sm: $input-btn-line-height-sm !default; + +$btn-padding-y-lg: $input-btn-padding-y-lg !default; +$btn-padding-x-lg: $input-btn-padding-x-lg !default; +$btn-line-height-lg: $input-btn-line-height-lg !default; + +$btn-border-width: $input-btn-border-width !default; + +$btn-font-weight: $font-weight-normal !default; +$btn-box-shadow: inset 0 1px 0 rgba($white, .15), 0 1px 1px rgba($black, .075) !default; +$btn-focus-width: $input-btn-focus-width !default; +$btn-focus-box-shadow: $input-btn-focus-box-shadow !default; +$btn-disabled-opacity: .65 !default; +$btn-active-box-shadow: inset 0 3px 5px rgba($black, .125) !default; + +$btn-link-disabled-color: $gray-600 !default; + +$btn-block-spacing-y: .5rem !default; + +// Allows for customizing button radius independently from global border radius +$btn-border-radius: $border-radius !default; +$btn-border-radius-lg: $border-radius-lg !default; +$btn-border-radius-sm: $border-radius-sm !default; + +$btn-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default; + + +// Forms + +$label-margin-bottom: .5rem !default; + +$input-padding-y: $input-btn-padding-y !default; +$input-padding-x: $input-btn-padding-x !default; +$input-line-height: $input-btn-line-height !default; + +$input-padding-y-sm: $input-btn-padding-y-sm !default; +$input-padding-x-sm: $input-btn-padding-x-sm !default; +$input-line-height-sm: $input-btn-line-height-sm !default; + +$input-padding-y-lg: $input-btn-padding-y-lg !default; +$input-padding-x-lg: $input-btn-padding-x-lg !default; +$input-line-height-lg: $input-btn-line-height-lg !default; + +$input-bg: $white !default; +$input-disabled-bg: $gray-200 !default; + +$input-color: $gray-700 !default; +$input-border-color: $gray-400 !default; +$input-border-width: $input-btn-border-width !default; +$input-box-shadow: inset 0 1px 1px rgba($black, .075) !default; + +$input-border-radius: $border-radius !default; +$input-border-radius-lg: $border-radius-lg !default; +$input-border-radius-sm: $border-radius-sm !default; + +$input-focus-bg: $input-bg !default; +$input-focus-border-color: lighten($component-active-bg, 25%) !default; +$input-focus-color: $input-color !default; +$input-focus-width: $input-btn-focus-width !default; +$input-focus-box-shadow: $input-btn-focus-box-shadow !default; + +$input-placeholder-color: $gray-600 !default; +$input-plaintext-color: $body-color !default; + +$input-height-border: $input-border-width * 2 !default; + +$input-height-inner: ($font-size-base * $input-btn-line-height) + ($input-btn-padding-y * 2) !default; +$input-height: calc(#{$input-height-inner} + #{$input-height-border}) !default; + +$input-height-inner-sm: ($font-size-sm * $input-btn-line-height-sm) + ($input-btn-padding-y-sm * 2) !default; +$input-height-sm: calc(#{$input-height-inner-sm} + #{$input-height-border}) !default; + +$input-height-inner-lg: ($font-size-lg * $input-btn-line-height-lg) + ($input-btn-padding-y-lg * 2) !default; +$input-height-lg: calc(#{$input-height-inner-lg} + #{$input-height-border}) !default; + +$input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !default; + +$form-text-margin-top: .25rem !default; + +$form-check-input-gutter: 1.25rem !default; +$form-check-input-margin-y: .3rem !default; +$form-check-input-margin-x: .25rem !default; + +$form-check-inline-margin-x: .75rem !default; +$form-check-inline-input-margin-x: .3125rem !default; + +$form-group-margin-bottom: 1rem !default; + +$input-group-addon-color: $input-color !default; +$input-group-addon-bg: $gray-200 !default; +$input-group-addon-border-color: $input-border-color !default; + +$custom-control-gutter: 1.5rem !default; +$custom-control-spacer-x: 1rem !default; + +$custom-control-indicator-size: 1rem !default; +$custom-control-indicator-bg: $gray-300 !default; +$custom-control-indicator-bg-size: 50% 50% !default; +$custom-control-indicator-box-shadow: inset 0 .25rem .25rem rgba($black, .1) !default; + +$custom-control-indicator-disabled-bg: $gray-200 !default; +$custom-control-label-disabled-color: $gray-600 !default; + +$custom-control-indicator-checked-color: $component-active-color !default; +$custom-control-indicator-checked-bg: $component-active-bg !default; +$custom-control-indicator-checked-disabled-bg: rgba(theme-color("primary"), .5) !default; +$custom-control-indicator-checked-box-shadow: none !default; + +$custom-control-indicator-focus-box-shadow: 0 0 0 1px $body-bg, $input-btn-focus-box-shadow !default; + +$custom-control-indicator-active-color: $component-active-color !default; +$custom-control-indicator-active-bg: lighten($component-active-bg, 35%) !default; +$custom-control-indicator-active-box-shadow: none !default; + +$custom-checkbox-indicator-border-radius: $border-radius !default; +$custom-checkbox-indicator-icon-checked: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='#{$custom-control-indicator-checked-color}' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E"), "#", "%23") !default; + +$custom-checkbox-indicator-indeterminate-bg: $component-active-bg !default; +$custom-checkbox-indicator-indeterminate-color: $custom-control-indicator-checked-color !default; +$custom-checkbox-indicator-icon-indeterminate: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='#{$custom-checkbox-indicator-indeterminate-color}' d='M0 2h4'/%3E%3C/svg%3E"), "#", "%23") !default; +$custom-checkbox-indicator-indeterminate-box-shadow: none !default; + +$custom-radio-indicator-border-radius: 50% !default; +$custom-radio-indicator-icon-checked: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='#{$custom-control-indicator-checked-color}'/%3E%3C/svg%3E"), "#", "%23") !default; + +$custom-select-padding-y: .375rem !default; +$custom-select-padding-x: .75rem !default; +$custom-select-height: $input-height !default; +$custom-select-indicator-padding: 1rem !default; // Extra padding to account for the presence of the background-image based indicator +$custom-select-line-height: $input-btn-line-height !default; +$custom-select-color: $input-color !default; +$custom-select-disabled-color: $gray-600 !default; +$custom-select-bg: $input-bg !default; +$custom-select-disabled-bg: $gray-200 !default; +$custom-select-bg-size: 8px 10px !default; // In pixels because image dimensions +$custom-select-indicator-color: $gray-800 !default; +$custom-select-indicator: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E"), "#", "%23") !default; +$custom-select-border-width: $input-btn-border-width !default; +$custom-select-border-color: $input-border-color !default; +$custom-select-border-radius: $border-radius !default; + +$custom-select-focus-border-color: $input-focus-border-color !default; +$custom-select-focus-box-shadow: inset 0 1px 2px rgba($black, .075), 0 0 5px rgba($custom-select-focus-border-color, .5) !default; + +$custom-select-font-size-sm: 75% !default; +$custom-select-height-sm: $input-height-sm !default; + +$custom-select-font-size-lg: 125% !default; +$custom-select-height-lg: $input-height-lg !default; + +$custom-range-track-width: 100% !default; +$custom-range-track-height: .5rem !default; +$custom-range-track-cursor: pointer !default; +$custom-range-track-bg: $gray-300 !default; +$custom-range-track-border-radius: 1rem !default; +$custom-range-track-box-shadow: inset 0 .25rem .25rem rgba($black, .1) !default; + +$custom-range-thumb-width: 1rem !default; +$custom-range-thumb-height: $custom-range-thumb-width !default; +$custom-range-thumb-bg: $component-active-bg !default; +$custom-range-thumb-border: 0 !default; +$custom-range-thumb-border-radius: 1rem !default; +$custom-range-thumb-box-shadow: 0 .1rem .25rem rgba($black, .1) !default; +$custom-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-btn-focus-box-shadow !default; +$custom-range-thumb-active-bg: lighten($component-active-bg, 35%) !default; + +$custom-file-height: $input-height !default; +$custom-file-focus-border-color: $input-focus-border-color !default; +$custom-file-focus-box-shadow: $input-btn-focus-box-shadow !default; + +$custom-file-padding-y: $input-btn-padding-y !default; +$custom-file-padding-x: $input-btn-padding-x !default; +$custom-file-line-height: $input-btn-line-height !default; +$custom-file-color: $input-color !default; +$custom-file-bg: $input-bg !default; +$custom-file-border-width: $input-btn-border-width !default; +$custom-file-border-color: $input-border-color !default; +$custom-file-border-radius: $input-border-radius !default; +$custom-file-box-shadow: $input-box-shadow !default; +$custom-file-button-color: $custom-file-color !default; +$custom-file-button-bg: $input-group-addon-bg !default; +$custom-file-text: ( + en: "Browse" +) !default; + + +// Form validation +$form-feedback-margin-top: $form-text-margin-top !default; +$form-feedback-font-size: $small-font-size !default; +$form-feedback-valid-color: theme-color("success") !default; +$form-feedback-invalid-color: theme-color("danger") !default; + + +// Dropdowns +// +// Dropdown menu container and contents. + +$dropdown-min-width: 10rem !default; +$dropdown-padding-y: .5rem !default; +$dropdown-spacer: .125rem !default; +$dropdown-bg: $white !default; +$dropdown-border-color: rgba($black, .15) !default; +$dropdown-border-radius: $border-radius !default; +$dropdown-border-width: $border-width !default; +$dropdown-divider-bg: $gray-200 !default; +$dropdown-box-shadow: 0 .5rem 1rem rgba($black, .175) !default; + +$dropdown-link-color: $gray-900 !default; +$dropdown-link-hover-color: darken($gray-900, 5%) !default; +$dropdown-link-hover-bg: $gray-100 !default; + +$dropdown-link-active-color: $component-active-color !default; +$dropdown-link-active-bg: $component-active-bg !default; + +$dropdown-link-disabled-color: $gray-600 !default; + +$dropdown-item-padding-y: .25rem !default; +$dropdown-item-padding-x: 1.5rem !default; + +$dropdown-header-color: $gray-600 !default; + + +// Z-index master list +// +// Warning: Avoid customizing these values. They're used for a bird's eye view +// of components dependent on the z-axis and are designed to all work together. + +$zindex-dropdown: 1000 !default; +$zindex-sticky: 1020 !default; +$zindex-fixed: 1030 !default; +$zindex-modal-backdrop: 1040 !default; +$zindex-modal: 1050 !default; +$zindex-popover: 1060 !default; +$zindex-tooltip: 1070 !default; + +// Navs + +$nav-link-padding-y: .5rem !default; +$nav-link-padding-x: 1rem !default; +$nav-link-disabled-color: $gray-600 !default; + +$nav-tabs-border-color: $gray-300 !default; +$nav-tabs-border-width: $border-width !default; +$nav-tabs-border-radius: $border-radius !default; +$nav-tabs-link-hover-border-color: $gray-200 $gray-200 $nav-tabs-border-color !default; +$nav-tabs-link-active-color: $gray-700 !default; +$nav-tabs-link-active-bg: $body-bg !default; +$nav-tabs-link-active-border-color: $gray-300 $gray-300 $nav-tabs-link-active-bg !default; + +$nav-pills-border-radius: $border-radius !default; +$nav-pills-link-active-color: $component-active-color !default; +$nav-pills-link-active-bg: $component-active-bg !default; + +$nav-divider-color: $gray-200 !default; +$nav-divider-margin-y: ($spacer / 2) !default; + +// Navbar + +$navbar-padding-y: ($spacer / 2) !default; +$navbar-padding-x: $spacer !default; + +$navbar-nav-link-padding-x: .5rem !default; + +$navbar-brand-font-size: $font-size-lg !default; +// Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link +$nav-link-height: ($font-size-base * $line-height-base + $nav-link-padding-y * 2) !default; +$navbar-brand-height: $navbar-brand-font-size * $line-height-base !default; +$navbar-brand-padding-y: ($nav-link-height - $navbar-brand-height) / 2 !default; + +$navbar-toggler-padding-y: .25rem !default; +$navbar-toggler-padding-x: .75rem !default; +$navbar-toggler-font-size: $font-size-lg !default; +$navbar-toggler-border-radius: $btn-border-radius !default; + +$navbar-dark-color: rgba($white, .5) !default; +$navbar-dark-hover-color: rgba($white, .75) !default; +$navbar-dark-active-color: $white !default; +$navbar-dark-disabled-color: rgba($white, .25) !default; +$navbar-dark-toggler-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-dark-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23") !default; +$navbar-dark-toggler-border-color: rgba($white, .1) !default; + +$navbar-light-color: rgba($black, .5) !default; +$navbar-light-hover-color: rgba($black, .7) !default; +$navbar-light-active-color: rgba($black, .9) !default; +$navbar-light-disabled-color: rgba($black, .3) !default; +$navbar-light-toggler-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-light-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23") !default; +$navbar-light-toggler-border-color: rgba($black, .1) !default; + +// Pagination + +$pagination-padding-y: .5rem !default; +$pagination-padding-x: .75rem !default; +$pagination-padding-y-sm: .25rem !default; +$pagination-padding-x-sm: .5rem !default; +$pagination-padding-y-lg: .75rem !default; +$pagination-padding-x-lg: 1.5rem !default; +$pagination-line-height: 1.25 !default; + +$pagination-color: $link-color !default; +$pagination-bg: $white !default; +$pagination-border-width: $border-width !default; +$pagination-border-color: $gray-300 !default; + +$pagination-focus-box-shadow: $input-btn-focus-box-shadow !default; +$pagination-focus-outline: 0 !default; + +$pagination-hover-color: $link-hover-color !default; +$pagination-hover-bg: $gray-200 !default; +$pagination-hover-border-color: $gray-300 !default; + +$pagination-active-color: $component-active-color !default; +$pagination-active-bg: $component-active-bg !default; +$pagination-active-border-color: $pagination-active-bg !default; + +$pagination-disabled-color: $gray-600 !default; +$pagination-disabled-bg: $white !default; +$pagination-disabled-border-color: $gray-300 !default; + + +// Jumbotron + +$jumbotron-padding: 2rem !default; +$jumbotron-bg: $gray-200 !default; + + +// Cards + +$card-spacer-y: .75rem !default; +$card-spacer-x: 1.25rem !default; +$card-border-width: $border-width !default; +$card-border-radius: $border-radius !default; +$card-border-color: rgba($black, .125) !default; +$card-inner-border-radius: calc(#{$card-border-radius} - #{$card-border-width}) !default; +$card-cap-bg: rgba($black, .03) !default; +$card-bg: $white !default; + +$card-img-overlay-padding: 1.25rem !default; + +$card-group-margin: ($grid-gutter-width / 2) !default; +$card-deck-margin: $card-group-margin !default; + +$card-columns-count: 3 !default; +$card-columns-gap: 1.25rem !default; +$card-columns-margin: $card-spacer-y !default; + + +// Tooltips + +$tooltip-font-size: $font-size-sm !default; +$tooltip-max-width: 200px !default; +$tooltip-color: $white !default; +$tooltip-bg: $black !default; +$tooltip-border-radius: $border-radius !default; +$tooltip-opacity: .9 !default; +$tooltip-padding-y: .25rem !default; +$tooltip-padding-x: .5rem !default; +$tooltip-margin: 0 !default; + +$tooltip-arrow-width: .8rem !default; +$tooltip-arrow-height: .4rem !default; +$tooltip-arrow-color: $tooltip-bg !default; + + +// Popovers + +$popover-font-size: $font-size-sm !default; +$popover-bg: $white !default; +$popover-max-width: 276px !default; +$popover-border-width: $border-width !default; +$popover-border-color: rgba($black, .2) !default; +$popover-border-radius: $border-radius-lg !default; +$popover-box-shadow: 0 .25rem .5rem rgba($black, .2) !default; + +$popover-header-bg: darken($popover-bg, 3%) !default; +$popover-header-color: $headings-color !default; +$popover-header-padding-y: .5rem !default; +$popover-header-padding-x: .75rem !default; + +$popover-body-color: $body-color !default; +$popover-body-padding-y: $popover-header-padding-y !default; +$popover-body-padding-x: $popover-header-padding-x !default; + +$popover-arrow-width: 1rem !default; +$popover-arrow-height: .5rem !default; +$popover-arrow-color: $popover-bg !default; + +$popover-arrow-outer-color: fade-in($popover-border-color, .05) !default; + + +// Badges + +$badge-font-size: 75% !default; +$badge-font-weight: $font-weight-bold !default; +$badge-padding-y: .25em !default; +$badge-padding-x: .4em !default; +$badge-border-radius: $border-radius !default; + +$badge-pill-padding-x: .6em !default; +// Use a higher than normal value to ensure completely rounded edges when +// customizing padding or font-size on labels. +$badge-pill-border-radius: 10rem !default; + + +// Modals + +// Padding applied to the modal body +$modal-inner-padding: 1rem !default; + +$modal-dialog-margin: .5rem !default; +$modal-dialog-margin-y-sm-up: 1.75rem !default; + +$modal-title-line-height: $line-height-base !default; + +$modal-content-bg: $white !default; +$modal-content-border-color: rgba($black, .2) !default; +$modal-content-border-width: $border-width !default; +$modal-content-border-radius: $border-radius-lg !default; +$modal-content-box-shadow-xs: 0 .25rem .5rem rgba($black, .5) !default; +$modal-content-box-shadow-sm-up: 0 .5rem 1rem rgba($black, .5) !default; + +$modal-backdrop-bg: $black !default; +$modal-backdrop-opacity: .5 !default; +$modal-header-border-color: $gray-200 !default; +$modal-footer-border-color: $modal-header-border-color !default; +$modal-header-border-width: $modal-content-border-width !default; +$modal-footer-border-width: $modal-header-border-width !default; +$modal-header-padding: 1rem !default; + +$modal-lg: 800px !default; +$modal-md: 500px !default; +$modal-sm: 300px !default; + +$modal-transition: transform .3s ease-out !default; + + +// Alerts +// +// Define alert colors, border radius, and padding. + +$alert-padding-y: .75rem !default; +$alert-padding-x: 1.25rem !default; +$alert-margin-bottom: 1rem !default; +$alert-border-radius: $border-radius !default; +$alert-link-font-weight: $font-weight-bold !default; +$alert-border-width: $border-width !default; + +$alert-bg-level: -10 !default; +$alert-border-level: -9 !default; +$alert-color-level: 6 !default; + + +// Progress bars + +$progress-height: 1rem !default; +$progress-font-size: ($font-size-base * .75) !default; +$progress-bg: $gray-200 !default; +$progress-border-radius: $border-radius !default; +$progress-box-shadow: inset 0 .1rem .1rem rgba($black, .1) !default; +$progress-bar-color: $white !default; +$progress-bar-bg: theme-color("primary") !default; +$progress-bar-animation-timing: 1s linear infinite !default; +$progress-bar-transition: width .6s ease !default; + +// List group + +$list-group-bg: $white !default; +$list-group-border-color: rgba($black, .125) !default; +$list-group-border-width: $border-width !default; +$list-group-border-radius: $border-radius !default; + +$list-group-item-padding-y: .75rem !default; +$list-group-item-padding-x: 1.25rem !default; + +$list-group-hover-bg: $gray-100 !default; +$list-group-active-color: $component-active-color !default; +$list-group-active-bg: $component-active-bg !default; +$list-group-active-border-color: $list-group-active-bg !default; + +$list-group-disabled-color: $gray-600 !default; +$list-group-disabled-bg: $list-group-bg !default; + +$list-group-action-color: $gray-700 !default; +$list-group-action-hover-color: $list-group-action-color !default; + +$list-group-action-active-color: $body-color !default; +$list-group-action-active-bg: $gray-200 !default; + + +// Image thumbnails + +$thumbnail-padding: .25rem !default; +$thumbnail-bg: $body-bg !default; +$thumbnail-border-width: $border-width !default; +$thumbnail-border-color: $gray-300 !default; +$thumbnail-border-radius: $border-radius !default; +$thumbnail-box-shadow: 0 1px 2px rgba($black, .075) !default; + + +// Figures + +$figure-caption-font-size: 90% !default; +$figure-caption-color: $gray-600 !default; + + +// Breadcrumbs + +$breadcrumb-padding-y: .75rem !default; +$breadcrumb-padding-x: 1rem !default; +$breadcrumb-item-padding: .5rem !default; + +$breadcrumb-margin-bottom: 1rem !default; + +$breadcrumb-bg: $gray-200 !default; +$breadcrumb-divider-color: $gray-600 !default; +$breadcrumb-active-color: $gray-600 !default; +$breadcrumb-divider: quote("/") !default; + +$breadcrumb-border-radius: $border-radius !default; + + +// Carousel + +$carousel-control-color: $white !default; +$carousel-control-width: 15% !default; +$carousel-control-opacity: .5 !default; + +$carousel-indicator-width: 30px !default; +$carousel-indicator-height: 3px !default; +$carousel-indicator-spacer: 3px !default; +$carousel-indicator-active-bg: $white !default; + +$carousel-caption-width: 70% !default; +$carousel-caption-color: $white !default; + +$carousel-control-icon-width: 20px !default; + +$carousel-control-prev-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E"), "#", "%23") !default; +$carousel-control-next-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E"), "#", "%23") !default; + +$carousel-transition: transform .6s ease !default; // Define transform transition first if using multiple transitons (e.g., `transform 2s ease, opacity .5s ease-out`) + + +// Close + +$close-font-size: $font-size-base * 1.5 !default; +$close-font-weight: $font-weight-bold !default; +$close-color: $black !default; +$close-text-shadow: 0 1px 0 $white !default; + +// Code + +$code-font-size: 87.5% !default; +$code-color: $pink !default; + +$kbd-padding-y: .2rem !default; +$kbd-padding-x: .4rem !default; +$kbd-font-size: $code-font-size !default; +$kbd-color: $white !default; +$kbd-bg: $gray-900 !default; + +$pre-color: $gray-900 !default; +$pre-scrollable-max-height: 340px !default; + + +// Printing +$print-page-size: a3 !default; +$print-body-min-width: map-get($grid-breakpoints, "lg") !default; \ No newline at end of file diff --git a/src/components/AdminComponents/AdminNavBar.vue b/src/components/AdminComponents/AdminNavBar.vue new file mode 100644 index 0000000..161efc3 --- /dev/null +++ b/src/components/AdminComponents/AdminNavBar.vue @@ -0,0 +1,298 @@ + + + \ No newline at end of file diff --git a/src/components/AdminComponents/AuthMethodForm.vue b/src/components/AdminComponents/AuthMethodForm.vue new file mode 100755 index 0000000..8c9ef2c --- /dev/null +++ b/src/components/AdminComponents/AuthMethodForm.vue @@ -0,0 +1,129 @@ + + + \ No newline at end of file diff --git a/src/components/AdminComponents/AuthMethodsTable.vue b/src/components/AdminComponents/AuthMethodsTable.vue new file mode 100755 index 0000000..d68e578 --- /dev/null +++ b/src/components/AdminComponents/AuthMethodsTable.vue @@ -0,0 +1,70 @@ + + + diff --git a/src/components/AdminComponents/DefaultPermissions.vue b/src/components/AdminComponents/DefaultPermissions.vue new file mode 100755 index 0000000..8e91aab --- /dev/null +++ b/src/components/AdminComponents/DefaultPermissions.vue @@ -0,0 +1,279 @@ + + + + diff --git a/src/components/AdminComponents/GlobalSettings.vue b/src/components/AdminComponents/GlobalSettings.vue new file mode 100755 index 0000000..7af61fb --- /dev/null +++ b/src/components/AdminComponents/GlobalSettings.vue @@ -0,0 +1,64 @@ + + + diff --git a/src/components/AdminComponents/PlatformsPanel/OrchestrationPanel.vue b/src/components/AdminComponents/PlatformsPanel/OrchestrationPanel.vue new file mode 100644 index 0000000..86cc8aa --- /dev/null +++ b/src/components/AdminComponents/PlatformsPanel/OrchestrationPanel.vue @@ -0,0 +1,142 @@ + + + \ No newline at end of file diff --git a/src/components/AdminComponents/PlatformsPanel/PlatformPanel.vue b/src/components/AdminComponents/PlatformsPanel/PlatformPanel.vue new file mode 100644 index 0000000..5c55c19 --- /dev/null +++ b/src/components/AdminComponents/PlatformsPanel/PlatformPanel.vue @@ -0,0 +1,142 @@ + + + \ No newline at end of file diff --git a/src/components/AdminComponents/PlatformsPanel/SplunkConfigForm.vue b/src/components/AdminComponents/PlatformsPanel/SplunkConfigForm.vue new file mode 100644 index 0000000..8ad021b --- /dev/null +++ b/src/components/AdminComponents/PlatformsPanel/SplunkConfigForm.vue @@ -0,0 +1,119 @@ + + + \ No newline at end of file diff --git a/src/components/AdminComponents/RoleForm.vue b/src/components/AdminComponents/RoleForm.vue new file mode 100755 index 0000000..88f1ed5 --- /dev/null +++ b/src/components/AdminComponents/RoleForm.vue @@ -0,0 +1,121 @@ + + + diff --git a/src/components/AdminComponents/RolesTable.vue b/src/components/AdminComponents/RolesTable.vue new file mode 100755 index 0000000..7b63eae --- /dev/null +++ b/src/components/AdminComponents/RolesTable.vue @@ -0,0 +1,67 @@ + + + \ No newline at end of file diff --git a/src/components/AdminComponents/StorageProviderForm.vue b/src/components/AdminComponents/StorageProviderForm.vue new file mode 100755 index 0000000..881c1b9 --- /dev/null +++ b/src/components/AdminComponents/StorageProviderForm.vue @@ -0,0 +1,120 @@ + + + \ No newline at end of file diff --git a/src/components/AdminComponents/StorageProviderTable.vue b/src/components/AdminComponents/StorageProviderTable.vue new file mode 100755 index 0000000..dff25b8 --- /dev/null +++ b/src/components/AdminComponents/StorageProviderTable.vue @@ -0,0 +1,67 @@ + + + diff --git a/src/components/AdminComponents/UserForm.vue b/src/components/AdminComponents/UserForm.vue new file mode 100755 index 0000000..4233166 --- /dev/null +++ b/src/components/AdminComponents/UserForm.vue @@ -0,0 +1,238 @@ + + + diff --git a/src/components/AdminComponents/UsersTable.vue b/src/components/AdminComponents/UsersTable.vue new file mode 100755 index 0000000..7d469bd --- /dev/null +++ b/src/components/AdminComponents/UsersTable.vue @@ -0,0 +1,82 @@ + + + diff --git a/src/components/CalendarComponents/IRCalendarComponent.vue b/src/components/CalendarComponents/IRCalendarComponent.vue new file mode 100644 index 0000000..c654dc5 --- /dev/null +++ b/src/components/CalendarComponents/IRCalendarComponent.vue @@ -0,0 +1,290 @@ + + + \ No newline at end of file diff --git a/src/components/EnrichmentPaneComponents/JsonTreePane.vue b/src/components/EnrichmentPaneComponents/JsonTreePane.vue new file mode 100644 index 0000000..d605a42 --- /dev/null +++ b/src/components/EnrichmentPaneComponents/JsonTreePane.vue @@ -0,0 +1,78 @@ + + + + \ No newline at end of file diff --git a/src/components/EnrichmentPaneComponents/LineChartPane.vue b/src/components/EnrichmentPaneComponents/LineChartPane.vue new file mode 100644 index 0000000..8600741 --- /dev/null +++ b/src/components/EnrichmentPaneComponents/LineChartPane.vue @@ -0,0 +1,53 @@ + + + \ No newline at end of file diff --git a/src/components/EnrichmentPaneComponents/MarkdownPane.vue b/src/components/EnrichmentPaneComponents/MarkdownPane.vue new file mode 100644 index 0000000..841dc78 --- /dev/null +++ b/src/components/EnrichmentPaneComponents/MarkdownPane.vue @@ -0,0 +1,41 @@ + + + + + \ No newline at end of file diff --git a/src/components/EnrichmentPaneComponents/PlainTextPane.vue b/src/components/EnrichmentPaneComponents/PlainTextPane.vue new file mode 100644 index 0000000..827a2a3 --- /dev/null +++ b/src/components/EnrichmentPaneComponents/PlainTextPane.vue @@ -0,0 +1,27 @@ + + + + \ No newline at end of file diff --git a/src/components/EntityClassComponents/CountryIconComponents/AC.vue b/src/components/EntityClassComponents/CountryIconComponents/AC.vue new file mode 100644 index 0000000..fe94013 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AC.vue @@ -0,0 +1,83 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/AD.vue b/src/components/EntityClassComponents/CountryIconComponents/AD.vue new file mode 100644 index 0000000..2eeadbc --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AD.vue @@ -0,0 +1,150 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/AE.vue b/src/components/EntityClassComponents/CountryIconComponents/AE.vue new file mode 100644 index 0000000..65f2a4c --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AE.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/AF.vue b/src/components/EntityClassComponents/CountryIconComponents/AF.vue new file mode 100644 index 0000000..17e33dc --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AF.vue @@ -0,0 +1,83 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/AG.vue b/src/components/EntityClassComponents/CountryIconComponents/AG.vue new file mode 100644 index 0000000..9ed1af9 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AG.vue @@ -0,0 +1,16 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/AI.vue b/src/components/EntityClassComponents/CountryIconComponents/AI.vue new file mode 100644 index 0000000..35c2c23 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AI.vue @@ -0,0 +1,765 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/AL.vue b/src/components/EntityClassComponents/CountryIconComponents/AL.vue new file mode 100644 index 0000000..9807059 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AL.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/AM.vue b/src/components/EntityClassComponents/CountryIconComponents/AM.vue new file mode 100644 index 0000000..15234c0 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AM.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/AO.vue b/src/components/EntityClassComponents/CountryIconComponents/AO.vue new file mode 100644 index 0000000..9fa28a2 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AO.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/AQ.vue b/src/components/EntityClassComponents/CountryIconComponents/AQ.vue new file mode 100644 index 0000000..41460ca --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AQ.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/AR.vue b/src/components/EntityClassComponents/CountryIconComponents/AR.vue new file mode 100644 index 0000000..e41d8cd --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AR.vue @@ -0,0 +1,33 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/AS.vue b/src/components/EntityClassComponents/CountryIconComponents/AS.vue new file mode 100644 index 0000000..3d95a64 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AS.vue @@ -0,0 +1,82 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/AT.vue b/src/components/EntityClassComponents/CountryIconComponents/AT.vue new file mode 100644 index 0000000..7b7ccda --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AT.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/AU.vue b/src/components/EntityClassComponents/CountryIconComponents/AU.vue new file mode 100644 index 0000000..5da87af --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AU.vue @@ -0,0 +1,19 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/AW.vue b/src/components/EntityClassComponents/CountryIconComponents/AW.vue new file mode 100644 index 0000000..ee1ea04 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AW.vue @@ -0,0 +1,188 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/AX.vue b/src/components/EntityClassComponents/CountryIconComponents/AX.vue new file mode 100644 index 0000000..2324189 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AX.vue @@ -0,0 +1,20 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/AZ.vue b/src/components/EntityClassComponents/CountryIconComponents/AZ.vue new file mode 100644 index 0000000..84fa33f --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/AZ.vue @@ -0,0 +1,10 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BA.vue b/src/components/EntityClassComponents/CountryIconComponents/BA.vue new file mode 100644 index 0000000..5565621 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BA.vue @@ -0,0 +1,14 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BB.vue b/src/components/EntityClassComponents/CountryIconComponents/BB.vue new file mode 100644 index 0000000..51385e5 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BB.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BD.vue b/src/components/EntityClassComponents/CountryIconComponents/BD.vue new file mode 100644 index 0000000..0b067de --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BD.vue @@ -0,0 +1,6 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BE.vue b/src/components/EntityClassComponents/CountryIconComponents/BE.vue new file mode 100644 index 0000000..e0dd75a --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BE.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BF.vue b/src/components/EntityClassComponents/CountryIconComponents/BF.vue new file mode 100644 index 0000000..18eaa3d --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BF.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BG.vue b/src/components/EntityClassComponents/CountryIconComponents/BG.vue new file mode 100644 index 0000000..4514771 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BG.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BH.vue b/src/components/EntityClassComponents/CountryIconComponents/BH.vue new file mode 100644 index 0000000..506ef08 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BH.vue @@ -0,0 +1,11 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BI.vue b/src/components/EntityClassComponents/CountryIconComponents/BI.vue new file mode 100644 index 0000000..561ce97 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BI.vue @@ -0,0 +1,17 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BJ.vue b/src/components/EntityClassComponents/CountryIconComponents/BJ.vue new file mode 100644 index 0000000..9fba307 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BJ.vue @@ -0,0 +1,16 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BL.vue b/src/components/EntityClassComponents/CountryIconComponents/BL.vue new file mode 100644 index 0000000..ae11017 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BL.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BM.vue b/src/components/EntityClassComponents/CountryIconComponents/BM.vue new file mode 100644 index 0000000..d5e4d09 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BM.vue @@ -0,0 +1,101 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BN.vue b/src/components/EntityClassComponents/CountryIconComponents/BN.vue new file mode 100644 index 0000000..dbae4aa --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BN.vue @@ -0,0 +1,38 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BO.vue b/src/components/EntityClassComponents/CountryIconComponents/BO.vue new file mode 100644 index 0000000..80e8420 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BO.vue @@ -0,0 +1,680 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BQ.vue b/src/components/EntityClassComponents/CountryIconComponents/BQ.vue new file mode 100644 index 0000000..064f68d --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BQ.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BR.vue b/src/components/EntityClassComponents/CountryIconComponents/BR.vue new file mode 100644 index 0000000..d0e6393 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BR.vue @@ -0,0 +1,47 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BS.vue b/src/components/EntityClassComponents/CountryIconComponents/BS.vue new file mode 100644 index 0000000..9c6b583 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BS.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BT.vue b/src/components/EntityClassComponents/CountryIconComponents/BT.vue new file mode 100644 index 0000000..f21d325 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BT.vue @@ -0,0 +1,91 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BV.vue b/src/components/EntityClassComponents/CountryIconComponents/BV.vue new file mode 100644 index 0000000..f38d915 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BV.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BW.vue b/src/components/EntityClassComponents/CountryIconComponents/BW.vue new file mode 100644 index 0000000..9f78eee --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BW.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BY.vue b/src/components/EntityClassComponents/CountryIconComponents/BY.vue new file mode 100644 index 0000000..625f649 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BY.vue @@ -0,0 +1,24 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/BZ.vue b/src/components/EntityClassComponents/CountryIconComponents/BZ.vue new file mode 100644 index 0000000..37a3716 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/BZ.vue @@ -0,0 +1,147 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CA.vue b/src/components/EntityClassComponents/CountryIconComponents/CA.vue new file mode 100644 index 0000000..b6aba13 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CA.vue @@ -0,0 +1,6 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CC.vue b/src/components/EntityClassComponents/CountryIconComponents/CC.vue new file mode 100644 index 0000000..ae7e506 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CC.vue @@ -0,0 +1,21 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CD.vue b/src/components/EntityClassComponents/CountryIconComponents/CD.vue new file mode 100644 index 0000000..2c153f4 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CD.vue @@ -0,0 +1,14 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CF.vue b/src/components/EntityClassComponents/CountryIconComponents/CF.vue new file mode 100644 index 0000000..30bfca9 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CF.vue @@ -0,0 +1,17 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CG.vue b/src/components/EntityClassComponents/CountryIconComponents/CG.vue new file mode 100644 index 0000000..0d5c93a --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CG.vue @@ -0,0 +1,14 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CH.vue b/src/components/EntityClassComponents/CountryIconComponents/CH.vue new file mode 100644 index 0000000..8e4d98e --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CH.vue @@ -0,0 +1,11 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CI.vue b/src/components/EntityClassComponents/CountryIconComponents/CI.vue new file mode 100644 index 0000000..b8c4333 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CI.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CK.vue b/src/components/EntityClassComponents/CountryIconComponents/CK.vue new file mode 100644 index 0000000..0849b14 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CK.vue @@ -0,0 +1,13 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CL.vue b/src/components/EntityClassComponents/CountryIconComponents/CL.vue new file mode 100644 index 0000000..1d64ea8 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CL.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CM.vue b/src/components/EntityClassComponents/CountryIconComponents/CM.vue new file mode 100644 index 0000000..091d173 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CM.vue @@ -0,0 +1,17 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CN.vue b/src/components/EntityClassComponents/CountryIconComponents/CN.vue new file mode 100644 index 0000000..e830cf8 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CN.vue @@ -0,0 +1,13 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CO.vue b/src/components/EntityClassComponents/CountryIconComponents/CO.vue new file mode 100644 index 0000000..fe0d717 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CO.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CP.vue b/src/components/EntityClassComponents/CountryIconComponents/CP.vue new file mode 100644 index 0000000..5686fce --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CP.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CR.vue b/src/components/EntityClassComponents/CountryIconComponents/CR.vue new file mode 100644 index 0000000..1d79dff --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CR.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CU.vue b/src/components/EntityClassComponents/CountryIconComponents/CU.vue new file mode 100644 index 0000000..1ea6263 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CU.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CV.vue b/src/components/EntityClassComponents/CountryIconComponents/CV.vue new file mode 100644 index 0000000..0c28751 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CV.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CW.vue b/src/components/EntityClassComponents/CountryIconComponents/CW.vue new file mode 100644 index 0000000..94908d9 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CW.vue @@ -0,0 +1,16 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CX.vue b/src/components/EntityClassComponents/CountryIconComponents/CX.vue new file mode 100644 index 0000000..a6d4fa4 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CX.vue @@ -0,0 +1,17 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CY.vue b/src/components/EntityClassComponents/CountryIconComponents/CY.vue new file mode 100644 index 0000000..6417cc8 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CY.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/CZ.vue b/src/components/EntityClassComponents/CountryIconComponents/CZ.vue new file mode 100644 index 0000000..8b1a54a --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/CZ.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/DE.vue b/src/components/EntityClassComponents/CountryIconComponents/DE.vue new file mode 100644 index 0000000..2ec4f44 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/DE.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/DG.vue b/src/components/EntityClassComponents/CountryIconComponents/DG.vue new file mode 100644 index 0000000..b7bbb75 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/DG.vue @@ -0,0 +1,136 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/DJ.vue b/src/components/EntityClassComponents/CountryIconComponents/DJ.vue new file mode 100644 index 0000000..75d78ac --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/DJ.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/DK.vue b/src/components/EntityClassComponents/CountryIconComponents/DK.vue new file mode 100644 index 0000000..fad51d7 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/DK.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/DM.vue b/src/components/EntityClassComponents/CountryIconComponents/DM.vue new file mode 100644 index 0000000..e0bd4d4 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/DM.vue @@ -0,0 +1,154 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/DO.vue b/src/components/EntityClassComponents/CountryIconComponents/DO.vue new file mode 100644 index 0000000..79c506d --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/DO.vue @@ -0,0 +1,6747 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/DZ.vue b/src/components/EntityClassComponents/CountryIconComponents/DZ.vue new file mode 100644 index 0000000..d945337 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/DZ.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/EA.vue b/src/components/EntityClassComponents/CountryIconComponents/EA.vue new file mode 100644 index 0000000..2f5624d --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/EA.vue @@ -0,0 +1,549 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/EC.vue b/src/components/EntityClassComponents/CountryIconComponents/EC.vue new file mode 100644 index 0000000..82ebee5 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/EC.vue @@ -0,0 +1,140 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/EE.vue b/src/components/EntityClassComponents/CountryIconComponents/EE.vue new file mode 100644 index 0000000..b30afa6 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/EE.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/EG.vue b/src/components/EntityClassComponents/CountryIconComponents/EG.vue new file mode 100644 index 0000000..7304176 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/EG.vue @@ -0,0 +1,40 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/EH.vue b/src/components/EntityClassComponents/CountryIconComponents/EH.vue new file mode 100644 index 0000000..1ff0878 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/EH.vue @@ -0,0 +1,18 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/ER.vue b/src/components/EntityClassComponents/CountryIconComponents/ER.vue new file mode 100644 index 0000000..0d68f04 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/ER.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/ES-CT.vue b/src/components/EntityClassComponents/CountryIconComponents/ES-CT.vue new file mode 100644 index 0000000..dce376e --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/ES-CT.vue @@ -0,0 +1,6 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/ES-GA.vue b/src/components/EntityClassComponents/CountryIconComponents/ES-GA.vue new file mode 100644 index 0000000..1678381 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/ES-GA.vue @@ -0,0 +1,191 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/ES.vue b/src/components/EntityClassComponents/CountryIconComponents/ES.vue new file mode 100644 index 0000000..55d238f --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/ES.vue @@ -0,0 +1,549 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/ET.vue b/src/components/EntityClassComponents/CountryIconComponents/ET.vue new file mode 100644 index 0000000..7e1b074 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/ET.vue @@ -0,0 +1,16 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/EU.vue b/src/components/EntityClassComponents/CountryIconComponents/EU.vue new file mode 100644 index 0000000..a9995d8 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/EU.vue @@ -0,0 +1,30 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/FI.vue b/src/components/EntityClassComponents/CountryIconComponents/FI.vue new file mode 100644 index 0000000..1e0220b --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/FI.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/FJ.vue b/src/components/EntityClassComponents/CountryIconComponents/FJ.vue new file mode 100644 index 0000000..5cf92e4 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/FJ.vue @@ -0,0 +1,127 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/FK.vue b/src/components/EntityClassComponents/CountryIconComponents/FK.vue new file mode 100644 index 0000000..807f454 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/FK.vue @@ -0,0 +1,95 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/FM.vue b/src/components/EntityClassComponents/CountryIconComponents/FM.vue new file mode 100644 index 0000000..cbc85a6 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/FM.vue @@ -0,0 +1,13 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/FO.vue b/src/components/EntityClassComponents/CountryIconComponents/FO.vue new file mode 100644 index 0000000..b185b1e --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/FO.vue @@ -0,0 +1,14 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/FR.vue b/src/components/EntityClassComponents/CountryIconComponents/FR.vue new file mode 100644 index 0000000..5efc7f9 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/FR.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GA.vue b/src/components/EntityClassComponents/CountryIconComponents/GA.vue new file mode 100644 index 0000000..43189a2 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GA.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GB-ENG.vue b/src/components/EntityClassComponents/CountryIconComponents/GB-ENG.vue new file mode 100644 index 0000000..9f09692 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GB-ENG.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GB-NIR.vue b/src/components/EntityClassComponents/CountryIconComponents/GB-NIR.vue new file mode 100644 index 0000000..e352bb0 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GB-NIR.vue @@ -0,0 +1,133 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GB-SCT.vue b/src/components/EntityClassComponents/CountryIconComponents/GB-SCT.vue new file mode 100644 index 0000000..e9da46b --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GB-SCT.vue @@ -0,0 +1,6 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GB-WLS.vue b/src/components/EntityClassComponents/CountryIconComponents/GB-WLS.vue new file mode 100644 index 0000000..727a25e --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GB-WLS.vue @@ -0,0 +1,11 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GB.vue b/src/components/EntityClassComponents/CountryIconComponents/GB.vue new file mode 100644 index 0000000..3b32c02 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GB.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GD.vue b/src/components/EntityClassComponents/CountryIconComponents/GD.vue new file mode 100644 index 0000000..3016b40 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GD.vue @@ -0,0 +1,29 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GE.vue b/src/components/EntityClassComponents/CountryIconComponents/GE.vue new file mode 100644 index 0000000..b2a8158 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GE.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GF.vue b/src/components/EntityClassComponents/CountryIconComponents/GF.vue new file mode 100644 index 0000000..e904010 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GF.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GG.vue b/src/components/EntityClassComponents/CountryIconComponents/GG.vue new file mode 100644 index 0000000..a3da82e --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GG.vue @@ -0,0 +1,11 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GH.vue b/src/components/EntityClassComponents/CountryIconComponents/GH.vue new file mode 100644 index 0000000..a069ef4 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GH.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GI.vue b/src/components/EntityClassComponents/CountryIconComponents/GI.vue new file mode 100644 index 0000000..89627b3 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GI.vue @@ -0,0 +1,34 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GL.vue b/src/components/EntityClassComponents/CountryIconComponents/GL.vue new file mode 100644 index 0000000..e062aa7 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GL.vue @@ -0,0 +1,6 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GM.vue b/src/components/EntityClassComponents/CountryIconComponents/GM.vue new file mode 100644 index 0000000..50be680 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GM.vue @@ -0,0 +1,11 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GN.vue b/src/components/EntityClassComponents/CountryIconComponents/GN.vue new file mode 100644 index 0000000..903f6f0 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GN.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GP.vue b/src/components/EntityClassComponents/CountryIconComponents/GP.vue new file mode 100644 index 0000000..9afa7b9 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GP.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GQ.vue b/src/components/EntityClassComponents/CountryIconComponents/GQ.vue new file mode 100644 index 0000000..ee53671 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GQ.vue @@ -0,0 +1,25 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GR.vue b/src/components/EntityClassComponents/CountryIconComponents/GR.vue new file mode 100644 index 0000000..4251f6b --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GR.vue @@ -0,0 +1,18 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GS.vue b/src/components/EntityClassComponents/CountryIconComponents/GS.vue new file mode 100644 index 0000000..a344348 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GS.vue @@ -0,0 +1,247 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GT.vue b/src/components/EntityClassComponents/CountryIconComponents/GT.vue new file mode 100644 index 0000000..ebc9169 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GT.vue @@ -0,0 +1,206 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GU.vue b/src/components/EntityClassComponents/CountryIconComponents/GU.vue new file mode 100644 index 0000000..9fe4f60 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GU.vue @@ -0,0 +1,41 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GW.vue b/src/components/EntityClassComponents/CountryIconComponents/GW.vue new file mode 100644 index 0000000..a8eb87e --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GW.vue @@ -0,0 +1,17 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/GY.vue b/src/components/EntityClassComponents/CountryIconComponents/GY.vue new file mode 100644 index 0000000..c468ed4 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/GY.vue @@ -0,0 +1,11 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/HK.vue b/src/components/EntityClassComponents/CountryIconComponents/HK.vue new file mode 100644 index 0000000..db37dcd --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/HK.vue @@ -0,0 +1,32 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/HM.vue b/src/components/EntityClassComponents/CountryIconComponents/HM.vue new file mode 100644 index 0000000..0a8b8ba --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/HM.vue @@ -0,0 +1,19 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/HN.vue b/src/components/EntityClassComponents/CountryIconComponents/HN.vue new file mode 100644 index 0000000..91350de --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/HN.vue @@ -0,0 +1,20 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/HR.vue b/src/components/EntityClassComponents/CountryIconComponents/HR.vue new file mode 100644 index 0000000..17234e6 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/HR.vue @@ -0,0 +1,58 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/HT.vue b/src/components/EntityClassComponents/CountryIconComponents/HT.vue new file mode 100644 index 0000000..5566cf6 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/HT.vue @@ -0,0 +1,118 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/HU.vue b/src/components/EntityClassComponents/CountryIconComponents/HU.vue new file mode 100644 index 0000000..bf3c741 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/HU.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/IC.vue b/src/components/EntityClassComponents/CountryIconComponents/IC.vue new file mode 100644 index 0000000..f28f594 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/IC.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/ID.vue b/src/components/EntityClassComponents/CountryIconComponents/ID.vue new file mode 100644 index 0000000..3929edc --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/ID.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/IE.vue b/src/components/EntityClassComponents/CountryIconComponents/IE.vue new file mode 100644 index 0000000..9245a43 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/IE.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/IL.vue b/src/components/EntityClassComponents/CountryIconComponents/IL.vue new file mode 100644 index 0000000..a020201 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/IL.vue @@ -0,0 +1,16 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/IM.vue b/src/components/EntityClassComponents/CountryIconComponents/IM.vue new file mode 100644 index 0000000..4dae291 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/IM.vue @@ -0,0 +1,38 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/IN.vue b/src/components/EntityClassComponents/CountryIconComponents/IN.vue new file mode 100644 index 0000000..05e1abc --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/IN.vue @@ -0,0 +1,27 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/IO.vue b/src/components/EntityClassComponents/CountryIconComponents/IO.vue new file mode 100644 index 0000000..b7bbb75 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/IO.vue @@ -0,0 +1,136 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/IQ.vue b/src/components/EntityClassComponents/CountryIconComponents/IQ.vue new file mode 100644 index 0000000..2fac461 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/IQ.vue @@ -0,0 +1,12 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/IR.vue b/src/components/EntityClassComponents/CountryIconComponents/IR.vue new file mode 100644 index 0000000..9c83afa --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/IR.vue @@ -0,0 +1,221 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/IS.vue b/src/components/EntityClassComponents/CountryIconComponents/IS.vue new file mode 100644 index 0000000..7ae069f --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/IS.vue @@ -0,0 +1,14 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/IT.vue b/src/components/EntityClassComponents/CountryIconComponents/IT.vue new file mode 100644 index 0000000..7be219e --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/IT.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/JE.vue b/src/components/EntityClassComponents/CountryIconComponents/JE.vue new file mode 100644 index 0000000..1fda6c0 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/JE.vue @@ -0,0 +1,49 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/JM.vue b/src/components/EntityClassComponents/CountryIconComponents/JM.vue new file mode 100644 index 0000000..b2133d9 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/JM.vue @@ -0,0 +1,10 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/JO.vue b/src/components/EntityClassComponents/CountryIconComponents/JO.vue new file mode 100644 index 0000000..fed4aef --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/JO.vue @@ -0,0 +1,18 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/JP.vue b/src/components/EntityClassComponents/CountryIconComponents/JP.vue new file mode 100644 index 0000000..b4630cd --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/JP.vue @@ -0,0 +1,13 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/KE.vue b/src/components/EntityClassComponents/CountryIconComponents/KE.vue new file mode 100644 index 0000000..5bc4816 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/KE.vue @@ -0,0 +1,25 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/KG.vue b/src/components/EntityClassComponents/CountryIconComponents/KG.vue new file mode 100644 index 0000000..b01e052 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/KG.vue @@ -0,0 +1,17 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/KH.vue b/src/components/EntityClassComponents/CountryIconComponents/KH.vue new file mode 100644 index 0000000..6f6f396 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/KH.vue @@ -0,0 +1,63 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/KI.vue b/src/components/EntityClassComponents/CountryIconComponents/KI.vue new file mode 100644 index 0000000..a4c20cf --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/KI.vue @@ -0,0 +1,38 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/KM.vue b/src/components/EntityClassComponents/CountryIconComponents/KM.vue new file mode 100644 index 0000000..f2f7df4 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/KM.vue @@ -0,0 +1,18 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/KN.vue b/src/components/EntityClassComponents/CountryIconComponents/KN.vue new file mode 100644 index 0000000..20499b5 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/KN.vue @@ -0,0 +1,16 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/KP.vue b/src/components/EntityClassComponents/CountryIconComponents/KP.vue new file mode 100644 index 0000000..d10a767 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/KP.vue @@ -0,0 +1,17 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/KR.vue b/src/components/EntityClassComponents/CountryIconComponents/KR.vue new file mode 100644 index 0000000..a7aae2d --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/KR.vue @@ -0,0 +1,24 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/KW.vue b/src/components/EntityClassComponents/CountryIconComponents/KW.vue new file mode 100644 index 0000000..701afb5 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/KW.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/KY.vue b/src/components/EntityClassComponents/CountryIconComponents/KY.vue new file mode 100644 index 0000000..7fdf9c4 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/KY.vue @@ -0,0 +1,227 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/KZ.vue b/src/components/EntityClassComponents/CountryIconComponents/KZ.vue new file mode 100644 index 0000000..51423e1 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/KZ.vue @@ -0,0 +1,25 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/LA.vue b/src/components/EntityClassComponents/CountryIconComponents/LA.vue new file mode 100644 index 0000000..37df81a --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/LA.vue @@ -0,0 +1,14 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/LB.vue b/src/components/EntityClassComponents/CountryIconComponents/LB.vue new file mode 100644 index 0000000..5e3d1e9 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/LB.vue @@ -0,0 +1,17 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/LC.vue b/src/components/EntityClassComponents/CountryIconComponents/LC.vue new file mode 100644 index 0000000..7ec8f7c --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/LC.vue @@ -0,0 +1,10 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/LI.vue b/src/components/EntityClassComponents/CountryIconComponents/LI.vue new file mode 100644 index 0000000..ac5ce22 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/LI.vue @@ -0,0 +1,45 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/LK.vue b/src/components/EntityClassComponents/CountryIconComponents/LK.vue new file mode 100644 index 0000000..490cb89 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/LK.vue @@ -0,0 +1,24 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/LR.vue b/src/components/EntityClassComponents/CountryIconComponents/LR.vue new file mode 100644 index 0000000..1521ca2 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/LR.vue @@ -0,0 +1,16 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/LS.vue b/src/components/EntityClassComponents/CountryIconComponents/LS.vue new file mode 100644 index 0000000..66e96b3 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/LS.vue @@ -0,0 +1,10 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/LT.vue b/src/components/EntityClassComponents/CountryIconComponents/LT.vue new file mode 100644 index 0000000..c93819d --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/LT.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/LU.vue b/src/components/EntityClassComponents/CountryIconComponents/LU.vue new file mode 100644 index 0000000..eecf7cf --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/LU.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/LV.vue b/src/components/EntityClassComponents/CountryIconComponents/LV.vue new file mode 100644 index 0000000..58a73bb --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/LV.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/LY.vue b/src/components/EntityClassComponents/CountryIconComponents/LY.vue new file mode 100644 index 0000000..561d67e --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/LY.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MA.vue b/src/components/EntityClassComponents/CountryIconComponents/MA.vue new file mode 100644 index 0000000..5caee97 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MA.vue @@ -0,0 +1,6 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MC.vue b/src/components/EntityClassComponents/CountryIconComponents/MC.vue new file mode 100644 index 0000000..a1c693a --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MC.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MD.vue b/src/components/EntityClassComponents/CountryIconComponents/MD.vue new file mode 100644 index 0000000..16ccc49 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MD.vue @@ -0,0 +1,73 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/ME.vue b/src/components/EntityClassComponents/CountryIconComponents/ME.vue new file mode 100644 index 0000000..135fab4 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/ME.vue @@ -0,0 +1,120 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MF.vue b/src/components/EntityClassComponents/CountryIconComponents/MF.vue new file mode 100644 index 0000000..d6ad448 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MF.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MG.vue b/src/components/EntityClassComponents/CountryIconComponents/MG.vue new file mode 100644 index 0000000..0eba8ff --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MG.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MH.vue b/src/components/EntityClassComponents/CountryIconComponents/MH.vue new file mode 100644 index 0000000..6c7dbf5 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MH.vue @@ -0,0 +1,10 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MK.vue b/src/components/EntityClassComponents/CountryIconComponents/MK.vue new file mode 100644 index 0000000..6016d0e --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MK.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/ML.vue b/src/components/EntityClassComponents/CountryIconComponents/ML.vue new file mode 100644 index 0000000..2f6f0e9 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/ML.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MM.vue b/src/components/EntityClassComponents/CountryIconComponents/MM.vue new file mode 100644 index 0000000..39de7e0 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MM.vue @@ -0,0 +1,18 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MN.vue b/src/components/EntityClassComponents/CountryIconComponents/MN.vue new file mode 100644 index 0000000..2c41a7f --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MN.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MO.vue b/src/components/EntityClassComponents/CountryIconComponents/MO.vue new file mode 100644 index 0000000..9c5fd89 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MO.vue @@ -0,0 +1,11 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MP.vue b/src/components/EntityClassComponents/CountryIconComponents/MP.vue new file mode 100644 index 0000000..8371202 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MP.vue @@ -0,0 +1,88 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MQ.vue b/src/components/EntityClassComponents/CountryIconComponents/MQ.vue new file mode 100644 index 0000000..a8ec121 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MQ.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MR.vue b/src/components/EntityClassComponents/CountryIconComponents/MR.vue new file mode 100644 index 0000000..2ae26d3 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MR.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MS.vue b/src/components/EntityClassComponents/CountryIconComponents/MS.vue new file mode 100644 index 0000000..8066bc1 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MS.vue @@ -0,0 +1,72 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MT.vue b/src/components/EntityClassComponents/CountryIconComponents/MT.vue new file mode 100644 index 0000000..eb1b84d --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MT.vue @@ -0,0 +1,52 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MU.vue b/src/components/EntityClassComponents/CountryIconComponents/MU.vue new file mode 100644 index 0000000..32a007b --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MU.vue @@ -0,0 +1,10 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MV.vue b/src/components/EntityClassComponents/CountryIconComponents/MV.vue new file mode 100644 index 0000000..00d2f28 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MV.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MW.vue b/src/components/EntityClassComponents/CountryIconComponents/MW.vue new file mode 100644 index 0000000..d98d4cb --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MW.vue @@ -0,0 +1,17 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MX.vue b/src/components/EntityClassComponents/CountryIconComponents/MX.vue new file mode 100644 index 0000000..f7c4eeb --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MX.vue @@ -0,0 +1,380 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MY.vue b/src/components/EntityClassComponents/CountryIconComponents/MY.vue new file mode 100644 index 0000000..47fb170 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MY.vue @@ -0,0 +1,13 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/MZ.vue b/src/components/EntityClassComponents/CountryIconComponents/MZ.vue new file mode 100644 index 0000000..ae243cc --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/MZ.vue @@ -0,0 +1,23 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/NA.vue b/src/components/EntityClassComponents/CountryIconComponents/NA.vue new file mode 100644 index 0000000..dd8e806 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/NA.vue @@ -0,0 +1,18 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/NC.vue b/src/components/EntityClassComponents/CountryIconComponents/NC.vue new file mode 100644 index 0000000..1be0f3d --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/NC.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/NE.vue b/src/components/EntityClassComponents/CountryIconComponents/NE.vue new file mode 100644 index 0000000..6ebb3cd --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/NE.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/NF.vue b/src/components/EntityClassComponents/CountryIconComponents/NF.vue new file mode 100644 index 0000000..b025938 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/NF.vue @@ -0,0 +1,13 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/NG.vue b/src/components/EntityClassComponents/CountryIconComponents/NG.vue new file mode 100644 index 0000000..17cfd69 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/NG.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/NI.vue b/src/components/EntityClassComponents/CountryIconComponents/NI.vue new file mode 100644 index 0000000..f6086c4 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/NI.vue @@ -0,0 +1,131 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/NL.vue b/src/components/EntityClassComponents/CountryIconComponents/NL.vue new file mode 100644 index 0000000..e499b85 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/NL.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/NO.vue b/src/components/EntityClassComponents/CountryIconComponents/NO.vue new file mode 100644 index 0000000..b7b97db --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/NO.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/NP.vue b/src/components/EntityClassComponents/CountryIconComponents/NP.vue new file mode 100644 index 0000000..6bafb6f --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/NP.vue @@ -0,0 +1,21 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/NR.vue b/src/components/EntityClassComponents/CountryIconComponents/NR.vue new file mode 100644 index 0000000..b82d916 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/NR.vue @@ -0,0 +1,14 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/NU.vue b/src/components/EntityClassComponents/CountryIconComponents/NU.vue new file mode 100644 index 0000000..ee5bfbc --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/NU.vue @@ -0,0 +1,28 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/NZ.vue b/src/components/EntityClassComponents/CountryIconComponents/NZ.vue new file mode 100644 index 0000000..96531d2 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/NZ.vue @@ -0,0 +1,44 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/OM.vue b/src/components/EntityClassComponents/CountryIconComponents/OM.vue new file mode 100644 index 0000000..a3dad9e --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/OM.vue @@ -0,0 +1,117 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/PA.vue b/src/components/EntityClassComponents/CountryIconComponents/PA.vue new file mode 100644 index 0000000..07fc3a9 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/PA.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/PE.vue b/src/components/EntityClassComponents/CountryIconComponents/PE.vue new file mode 100644 index 0000000..8b3eab1 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/PE.vue @@ -0,0 +1,246 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/PF.vue b/src/components/EntityClassComponents/CountryIconComponents/PF.vue new file mode 100644 index 0000000..b6dbaa6 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/PF.vue @@ -0,0 +1,20 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/PG.vue b/src/components/EntityClassComponents/CountryIconComponents/PG.vue new file mode 100644 index 0000000..0823772 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/PG.vue @@ -0,0 +1,18 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/PH.vue b/src/components/EntityClassComponents/CountryIconComponents/PH.vue new file mode 100644 index 0000000..917750b --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/PH.vue @@ -0,0 +1,11 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/PK.vue b/src/components/EntityClassComponents/CountryIconComponents/PK.vue new file mode 100644 index 0000000..ea390c7 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/PK.vue @@ -0,0 +1,17 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/PL.vue b/src/components/EntityClassComponents/CountryIconComponents/PL.vue new file mode 100644 index 0000000..62618fd --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/PL.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/PM.vue b/src/components/EntityClassComponents/CountryIconComponents/PM.vue new file mode 100644 index 0000000..391cb10 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/PM.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/PN.vue b/src/components/EntityClassComponents/CountryIconComponents/PN.vue new file mode 100644 index 0000000..ed3459d --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/PN.vue @@ -0,0 +1,102 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/PR.vue b/src/components/EntityClassComponents/CountryIconComponents/PR.vue new file mode 100644 index 0000000..9eca275 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/PR.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/PS.vue b/src/components/EntityClassComponents/CountryIconComponents/PS.vue new file mode 100644 index 0000000..eff37bd --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/PS.vue @@ -0,0 +1,17 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/PT.vue b/src/components/EntityClassComponents/CountryIconComponents/PT.vue new file mode 100644 index 0000000..98655d7 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/PT.vue @@ -0,0 +1,59 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/PW.vue b/src/components/EntityClassComponents/CountryIconComponents/PW.vue new file mode 100644 index 0000000..c53ce6d --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/PW.vue @@ -0,0 +1,13 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/PY.vue b/src/components/EntityClassComponents/CountryIconComponents/PY.vue new file mode 100644 index 0000000..18c89ca --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/PY.vue @@ -0,0 +1,158 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/QA.vue b/src/components/EntityClassComponents/CountryIconComponents/QA.vue new file mode 100644 index 0000000..60181ed --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/QA.vue @@ -0,0 +1,6 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/RE.vue b/src/components/EntityClassComponents/CountryIconComponents/RE.vue new file mode 100644 index 0000000..816b098 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/RE.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/RO.vue b/src/components/EntityClassComponents/CountryIconComponents/RO.vue new file mode 100644 index 0000000..f38b89d --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/RO.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/RS.vue b/src/components/EntityClassComponents/CountryIconComponents/RS.vue new file mode 100644 index 0000000..6501b6b --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/RS.vue @@ -0,0 +1,298 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/RU.vue b/src/components/EntityClassComponents/CountryIconComponents/RU.vue new file mode 100644 index 0000000..2f93c11 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/RU.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/RW.vue b/src/components/EntityClassComponents/CountryIconComponents/RW.vue new file mode 100644 index 0000000..c9ea862 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/RW.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SA.vue b/src/components/EntityClassComponents/CountryIconComponents/SA.vue new file mode 100644 index 0000000..5421a50 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SA.vue @@ -0,0 +1,28 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SB.vue b/src/components/EntityClassComponents/CountryIconComponents/SB.vue new file mode 100644 index 0000000..429fe8f --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SB.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SC.vue b/src/components/EntityClassComponents/CountryIconComponents/SC.vue new file mode 100644 index 0000000..1003485 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SC.vue @@ -0,0 +1,16 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SD.vue b/src/components/EntityClassComponents/CountryIconComponents/SD.vue new file mode 100644 index 0000000..58290e9 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SD.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SE.vue b/src/components/EntityClassComponents/CountryIconComponents/SE.vue new file mode 100644 index 0000000..2123fb4 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SE.vue @@ -0,0 +1,6 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SG.vue b/src/components/EntityClassComponents/CountryIconComponents/SG.vue new file mode 100644 index 0000000..ad8725b --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SG.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SH.vue b/src/components/EntityClassComponents/CountryIconComponents/SH.vue new file mode 100644 index 0000000..6a5163f --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SH.vue @@ -0,0 +1,83 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SI.vue b/src/components/EntityClassComponents/CountryIconComponents/SI.vue new file mode 100644 index 0000000..bc22971 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SI.vue @@ -0,0 +1,20 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SJ.vue b/src/components/EntityClassComponents/CountryIconComponents/SJ.vue new file mode 100644 index 0000000..6a17e37 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SJ.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SK.vue b/src/components/EntityClassComponents/CountryIconComponents/SK.vue new file mode 100644 index 0000000..52f3ec1 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SK.vue @@ -0,0 +1,11 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SL.vue b/src/components/EntityClassComponents/CountryIconComponents/SL.vue new file mode 100644 index 0000000..bd59bbc --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SL.vue @@ -0,0 +1,14 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SM.vue b/src/components/EntityClassComponents/CountryIconComponents/SM.vue new file mode 100644 index 0000000..fe51a1c --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SM.vue @@ -0,0 +1,91 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SN.vue b/src/components/EntityClassComponents/CountryIconComponents/SN.vue new file mode 100644 index 0000000..fbe6d79 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SN.vue @@ -0,0 +1,10 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SO.vue b/src/components/EntityClassComponents/CountryIconComponents/SO.vue new file mode 100644 index 0000000..d891ad5 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SO.vue @@ -0,0 +1,13 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SR.vue b/src/components/EntityClassComponents/CountryIconComponents/SR.vue new file mode 100644 index 0000000..9444415 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SR.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SS.vue b/src/components/EntityClassComponents/CountryIconComponents/SS.vue new file mode 100644 index 0000000..0c521ab --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SS.vue @@ -0,0 +1,10 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/ST.vue b/src/components/EntityClassComponents/CountryIconComponents/ST.vue new file mode 100644 index 0000000..9037e9c --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/ST.vue @@ -0,0 +1,18 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SV.vue b/src/components/EntityClassComponents/CountryIconComponents/SV.vue new file mode 100644 index 0000000..1b98d16 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SV.vue @@ -0,0 +1,596 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SX.vue b/src/components/EntityClassComponents/CountryIconComponents/SX.vue new file mode 100644 index 0000000..a168d53 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SX.vue @@ -0,0 +1,58 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SY.vue b/src/components/EntityClassComponents/CountryIconComponents/SY.vue new file mode 100644 index 0000000..a91bd24 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SY.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/SZ.vue b/src/components/EntityClassComponents/CountryIconComponents/SZ.vue new file mode 100644 index 0000000..246de05 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/SZ.vue @@ -0,0 +1,47 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TA.vue b/src/components/EntityClassComponents/CountryIconComponents/TA.vue new file mode 100644 index 0000000..8ff1611 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TA.vue @@ -0,0 +1,83 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TC.vue b/src/components/EntityClassComponents/CountryIconComponents/TC.vue new file mode 100644 index 0000000..cfffc24 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TC.vue @@ -0,0 +1,54 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TD.vue b/src/components/EntityClassComponents/CountryIconComponents/TD.vue new file mode 100644 index 0000000..3700016 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TD.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TF.vue b/src/components/EntityClassComponents/CountryIconComponents/TF.vue new file mode 100644 index 0000000..c9f14e8 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TF.vue @@ -0,0 +1,17 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TG.vue b/src/components/EntityClassComponents/CountryIconComponents/TG.vue new file mode 100644 index 0000000..0676c10 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TG.vue @@ -0,0 +1,16 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TH.vue b/src/components/EntityClassComponents/CountryIconComponents/TH.vue new file mode 100644 index 0000000..9324b83 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TH.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TJ.vue b/src/components/EntityClassComponents/CountryIconComponents/TJ.vue new file mode 100644 index 0000000..2570903 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TJ.vue @@ -0,0 +1,28 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TK.vue b/src/components/EntityClassComponents/CountryIconComponents/TK.vue new file mode 100644 index 0000000..5b8d8b3 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TK.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TL.vue b/src/components/EntityClassComponents/CountryIconComponents/TL.vue new file mode 100644 index 0000000..3e243b1 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TL.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TM.vue b/src/components/EntityClassComponents/CountryIconComponents/TM.vue new file mode 100644 index 0000000..ecb0571 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TM.vue @@ -0,0 +1,205 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TN.vue b/src/components/EntityClassComponents/CountryIconComponents/TN.vue new file mode 100644 index 0000000..795c0f2 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TN.vue @@ -0,0 +1,15 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TO.vue b/src/components/EntityClassComponents/CountryIconComponents/TO.vue new file mode 100644 index 0000000..9d4c3c3 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TO.vue @@ -0,0 +1,12 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TR.vue b/src/components/EntityClassComponents/CountryIconComponents/TR.vue new file mode 100644 index 0000000..4c4eab4 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TR.vue @@ -0,0 +1,10 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TT.vue b/src/components/EntityClassComponents/CountryIconComponents/TT.vue new file mode 100644 index 0000000..ae15f63 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TT.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TV.vue b/src/components/EntityClassComponents/CountryIconComponents/TV.vue new file mode 100644 index 0000000..018bba2 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TV.vue @@ -0,0 +1,18 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TW.vue b/src/components/EntityClassComponents/CountryIconComponents/TW.vue new file mode 100644 index 0000000..2f48b1f --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TW.vue @@ -0,0 +1,34 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/TZ.vue b/src/components/EntityClassComponents/CountryIconComponents/TZ.vue new file mode 100644 index 0000000..b4b79d8 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/TZ.vue @@ -0,0 +1,17 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/UA.vue b/src/components/EntityClassComponents/CountryIconComponents/UA.vue new file mode 100644 index 0000000..38e9727 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/UA.vue @@ -0,0 +1,8 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/UG.vue b/src/components/EntityClassComponents/CountryIconComponents/UG.vue new file mode 100644 index 0000000..a5fcf4b --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/UG.vue @@ -0,0 +1,32 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/UM.vue b/src/components/EntityClassComponents/CountryIconComponents/UM.vue new file mode 100644 index 0000000..2d0a954 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/UM.vue @@ -0,0 +1,17 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/UN.vue b/src/components/EntityClassComponents/CountryIconComponents/UN.vue new file mode 100644 index 0000000..c6e982c --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/UN.vue @@ -0,0 +1,18 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/US.vue b/src/components/EntityClassComponents/CountryIconComponents/US.vue new file mode 100644 index 0000000..37ccbbe --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/US.vue @@ -0,0 +1,12 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/UY.vue b/src/components/EntityClassComponents/CountryIconComponents/UY.vue new file mode 100644 index 0000000..77bd109 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/UY.vue @@ -0,0 +1,30 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/UZ.vue b/src/components/EntityClassComponents/CountryIconComponents/UZ.vue new file mode 100644 index 0000000..dca615b --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/UZ.vue @@ -0,0 +1,32 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/VA.vue b/src/components/EntityClassComponents/CountryIconComponents/VA.vue new file mode 100644 index 0000000..144f253 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/VA.vue @@ -0,0 +1,481 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/VC.vue b/src/components/EntityClassComponents/CountryIconComponents/VC.vue new file mode 100644 index 0000000..fb2bfc3 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/VC.vue @@ -0,0 +1,10 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/VE.vue b/src/components/EntityClassComponents/CountryIconComponents/VE.vue new file mode 100644 index 0000000..ed400ad --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/VE.vue @@ -0,0 +1,28 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/VG.vue b/src/components/EntityClassComponents/CountryIconComponents/VG.vue new file mode 100644 index 0000000..a559994 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/VG.vue @@ -0,0 +1,129 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/VI.vue b/src/components/EntityClassComponents/CountryIconComponents/VI.vue new file mode 100644 index 0000000..addf7b0 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/VI.vue @@ -0,0 +1,30 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/VN.vue b/src/components/EntityClassComponents/CountryIconComponents/VN.vue new file mode 100644 index 0000000..cb198a3 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/VN.vue @@ -0,0 +1,13 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/VU.vue b/src/components/EntityClassComponents/CountryIconComponents/VU.vue new file mode 100644 index 0000000..2baf78b --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/VU.vue @@ -0,0 +1,20 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/WF.vue b/src/components/EntityClassComponents/CountryIconComponents/WF.vue new file mode 100644 index 0000000..27e9d6d --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/WF.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/WS.vue b/src/components/EntityClassComponents/CountryIconComponents/WS.vue new file mode 100644 index 0000000..bf8d83a --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/WS.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/XK.vue b/src/components/EntityClassComponents/CountryIconComponents/XK.vue new file mode 100644 index 0000000..80d1c4f --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/XK.vue @@ -0,0 +1,18 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/XX.vue b/src/components/EntityClassComponents/CountryIconComponents/XX.vue new file mode 100644 index 0000000..34a73ed --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/XX.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/YE.vue b/src/components/EntityClassComponents/CountryIconComponents/YE.vue new file mode 100644 index 0000000..c0d245a --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/YE.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/YT.vue b/src/components/EntityClassComponents/CountryIconComponents/YT.vue new file mode 100644 index 0000000..51e2486 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/YT.vue @@ -0,0 +1,9 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/ZA.vue b/src/components/EntityClassComponents/CountryIconComponents/ZA.vue new file mode 100644 index 0000000..215d5a2 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/ZA.vue @@ -0,0 +1,19 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/ZM.vue b/src/components/EntityClassComponents/CountryIconComponents/ZM.vue new file mode 100644 index 0000000..6af40a9 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/ZM.vue @@ -0,0 +1,29 @@ + diff --git a/src/components/EntityClassComponents/CountryIconComponents/ZW.vue b/src/components/EntityClassComponents/CountryIconComponents/ZW.vue new file mode 100644 index 0000000..211dae2 --- /dev/null +++ b/src/components/EntityClassComponents/CountryIconComponents/ZW.vue @@ -0,0 +1,23 @@ + diff --git a/src/components/EntityClassComponents/CyberIconComponents/AnonymousIPIcon.vue b/src/components/EntityClassComponents/CyberIconComponents/AnonymousIPIcon.vue new file mode 100644 index 0000000..259a4f8 --- /dev/null +++ b/src/components/EntityClassComponents/CyberIconComponents/AnonymousIPIcon.vue @@ -0,0 +1,44 @@ + diff --git a/src/components/EntityClassComponents/CyberIconComponents/FireWallIcon.vue b/src/components/EntityClassComponents/CyberIconComponents/FireWallIcon.vue new file mode 100644 index 0000000..c16daf6 --- /dev/null +++ b/src/components/EntityClassComponents/CyberIconComponents/FireWallIcon.vue @@ -0,0 +1,147 @@ + diff --git a/src/components/EntityClassComponents/CyberIconComponents/KEVIcon.vue b/src/components/EntityClassComponents/CyberIconComponents/KEVIcon.vue new file mode 100755 index 0000000..d2ddc64 --- /dev/null +++ b/src/components/EntityClassComponents/CyberIconComponents/KEVIcon.vue @@ -0,0 +1,32 @@ + \ No newline at end of file diff --git a/src/components/EntityClassComponents/CyberIconComponents/ProxyIcon.vue b/src/components/EntityClassComponents/CyberIconComponents/ProxyIcon.vue new file mode 100644 index 0000000..9e2fe3b --- /dev/null +++ b/src/components/EntityClassComponents/CyberIconComponents/ProxyIcon.vue @@ -0,0 +1,1159 @@ + diff --git a/src/components/EntityClassComponents/CyberIconComponents/SandiaThunderBirdIcon.vue b/src/components/EntityClassComponents/CyberIconComponents/SandiaThunderBirdIcon.vue new file mode 100644 index 0000000..790de89 --- /dev/null +++ b/src/components/EntityClassComponents/CyberIconComponents/SandiaThunderBirdIcon.vue @@ -0,0 +1,58 @@ + + \ No newline at end of file diff --git a/src/components/EntityClassComponents/CyberIconComponents/ScannerIcon.vue b/src/components/EntityClassComponents/CyberIconComponents/ScannerIcon.vue new file mode 100644 index 0000000..259a4f8 --- /dev/null +++ b/src/components/EntityClassComponents/CyberIconComponents/ScannerIcon.vue @@ -0,0 +1,44 @@ + diff --git a/src/components/EntityClassComponents/CyberIconComponents/ThreatActorIcon.vue b/src/components/EntityClassComponents/CyberIconComponents/ThreatActorIcon.vue new file mode 100755 index 0000000..fbe02f3 --- /dev/null +++ b/src/components/EntityClassComponents/CyberIconComponents/ThreatActorIcon.vue @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/src/components/EntityClassComponents/CyberIconComponents/ThreatActorIconBlue.vue b/src/components/EntityClassComponents/CyberIconComponents/ThreatActorIconBlue.vue new file mode 100755 index 0000000..2e05813 --- /dev/null +++ b/src/components/EntityClassComponents/CyberIconComponents/ThreatActorIconBlue.vue @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/src/components/EntityClassComponents/CyberIconComponents/ThreatActorIconRed.vue b/src/components/EntityClassComponents/CyberIconComponents/ThreatActorIconRed.vue new file mode 100755 index 0000000..20d9ec6 --- /dev/null +++ b/src/components/EntityClassComponents/CyberIconComponents/ThreatActorIconRed.vue @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/src/components/EntityClassComponents/CyberIconComponents/ThreatActorInternalIcon.vue b/src/components/EntityClassComponents/CyberIconComponents/ThreatActorInternalIcon.vue new file mode 100755 index 0000000..8b3d87b --- /dev/null +++ b/src/components/EntityClassComponents/CyberIconComponents/ThreatActorInternalIcon.vue @@ -0,0 +1,148 @@ + \ No newline at end of file diff --git a/src/components/EntityClassComponents/CyberIconComponents/ThreatActorInternalIconBlue.vue b/src/components/EntityClassComponents/CyberIconComponents/ThreatActorInternalIconBlue.vue new file mode 100755 index 0000000..fd6cee2 --- /dev/null +++ b/src/components/EntityClassComponents/CyberIconComponents/ThreatActorInternalIconBlue.vue @@ -0,0 +1,148 @@ + \ No newline at end of file diff --git a/src/components/EntityClassComponents/CyberIconComponents/ThreatActorInternalIconRed.vue b/src/components/EntityClassComponents/CyberIconComponents/ThreatActorInternalIconRed.vue new file mode 100755 index 0000000..cd65020 --- /dev/null +++ b/src/components/EntityClassComponents/CyberIconComponents/ThreatActorInternalIconRed.vue @@ -0,0 +1,148 @@ + \ No newline at end of file diff --git a/src/components/EntityClassComponents/EntityClassIconComboBox.vue b/src/components/EntityClassComponents/EntityClassIconComboBox.vue new file mode 100644 index 0000000..a79aabd --- /dev/null +++ b/src/components/EntityClassComponents/EntityClassIconComboBox.vue @@ -0,0 +1,145 @@ + + + + \ No newline at end of file diff --git a/src/components/IRElementComponents/AddTagSourceDialog.vue b/src/components/IRElementComponents/AddTagSourceDialog.vue new file mode 100755 index 0000000..d7d5153 --- /dev/null +++ b/src/components/IRElementComponents/AddTagSourceDialog.vue @@ -0,0 +1,152 @@ + + + + + \ No newline at end of file diff --git a/src/components/IRElementComponents/EntryEntityDialog.vue b/src/components/IRElementComponents/EntryEntityDialog.vue new file mode 100755 index 0000000..79ccf13 --- /dev/null +++ b/src/components/IRElementComponents/EntryEntityDialog.vue @@ -0,0 +1,78 @@ + + + + + \ No newline at end of file diff --git a/src/components/IRElementComponents/HistoryDialog.vue b/src/components/IRElementComponents/HistoryDialog.vue new file mode 100755 index 0000000..a02462c --- /dev/null +++ b/src/components/IRElementComponents/HistoryDialog.vue @@ -0,0 +1,134 @@ + + + + + \ No newline at end of file diff --git a/src/components/IRElementComponents/MetaCard.vue b/src/components/IRElementComponents/MetaCard.vue new file mode 100644 index 0000000..cea66ed --- /dev/null +++ b/src/components/IRElementComponents/MetaCard.vue @@ -0,0 +1,1371 @@ + + + + diff --git a/src/components/IRElementComponents/NewEntityMenu.vue b/src/components/IRElementComponents/NewEntityMenu.vue new file mode 100644 index 0000000..ecf576b --- /dev/null +++ b/src/components/IRElementComponents/NewEntityMenu.vue @@ -0,0 +1,99 @@ + + + \ No newline at end of file diff --git a/src/components/IRElementComponents/PermissionsPicker.vue b/src/components/IRElementComponents/PermissionsPicker.vue new file mode 100755 index 0000000..6adc172 --- /dev/null +++ b/src/components/IRElementComponents/PermissionsPicker.vue @@ -0,0 +1,168 @@ + + + \ No newline at end of file diff --git a/src/components/IRElementComponents/SelectedIRElement.vue b/src/components/IRElementComponents/SelectedIRElement.vue new file mode 100644 index 0000000..dadb542 --- /dev/null +++ b/src/components/IRElementComponents/SelectedIRElement.vue @@ -0,0 +1,387 @@ + + + + + diff --git a/src/components/IRElementComponents/TLPPicker.vue b/src/components/IRElementComponents/TLPPicker.vue new file mode 100755 index 0000000..8f3734b --- /dev/null +++ b/src/components/IRElementComponents/TLPPicker.vue @@ -0,0 +1,57 @@ + + + \ No newline at end of file diff --git a/src/components/InboxComponents/InboxElements/AlertInboxElement.vue b/src/components/InboxComponents/InboxElements/AlertInboxElement.vue new file mode 100644 index 0000000..fd7146a --- /dev/null +++ b/src/components/InboxComponents/InboxElements/AlertInboxElement.vue @@ -0,0 +1,106 @@ + + + \ No newline at end of file diff --git a/src/components/InboxComponents/InboxElements/EventInboxElement.vue b/src/components/InboxComponents/InboxElements/EventInboxElement.vue new file mode 100644 index 0000000..163d225 --- /dev/null +++ b/src/components/InboxComponents/InboxElements/EventInboxElement.vue @@ -0,0 +1,83 @@ + + + diff --git a/src/components/InboxComponents/InboxNavDrawer.vue b/src/components/InboxComponents/InboxNavDrawer.vue new file mode 100644 index 0000000..b9b2a6d --- /dev/null +++ b/src/components/InboxComponents/InboxNavDrawer.vue @@ -0,0 +1,121 @@ + + + diff --git a/src/components/JournalComponents/EntryCellComponents/ActionCell/ActionCellEdit.vue b/src/components/JournalComponents/EntryCellComponents/ActionCell/ActionCellEdit.vue new file mode 100644 index 0000000..efa02a1 --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/ActionCell/ActionCellEdit.vue @@ -0,0 +1,102 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/components/JournalComponents/EntryCellComponents/ActionCell/ActionCellView.vue b/src/components/JournalComponents/EntryCellComponents/ActionCell/ActionCellView.vue new file mode 100644 index 0000000..5dc6160 --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/ActionCell/ActionCellView.vue @@ -0,0 +1,60 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/components/JournalComponents/EntryCellComponents/EntryCell.vue b/src/components/JournalComponents/EntryCellComponents/EntryCell.vue new file mode 100644 index 0000000..73562bc --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/EntryCell.vue @@ -0,0 +1,245 @@ + + + + + + + + + + + + diff --git a/src/components/JournalComponents/EntryCellComponents/EntryCellViewSystemBar.vue b/src/components/JournalComponents/EntryCellComponents/EntryCellViewSystemBar.vue new file mode 100644 index 0000000..2c7d132 --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/EntryCellViewSystemBar.vue @@ -0,0 +1,391 @@ + + + + \ No newline at end of file diff --git a/src/components/JournalComponents/EntryCellComponents/FullScreenEntryCell.vue b/src/components/JournalComponents/EntryCellComponents/FullScreenEntryCell.vue new file mode 100644 index 0000000..c85f9f9 --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/FullScreenEntryCell.vue @@ -0,0 +1,152 @@ + + + + + \ No newline at end of file diff --git a/src/components/JournalComponents/EntryCellComponents/PromotedCell/PromotedCellView.vue b/src/components/JournalComponents/EntryCellComponents/PromotedCell/PromotedCellView.vue new file mode 100644 index 0000000..cff22d6 --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/PromotedCell/PromotedCellView.vue @@ -0,0 +1,288 @@ + + + + + \ No newline at end of file diff --git a/src/components/JournalComponents/EntryCellComponents/SummaryCell/SummaryCellView.vue b/src/components/JournalComponents/EntryCellComponents/SummaryCell/SummaryCellView.vue new file mode 100644 index 0000000..b22e17e --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/SummaryCell/SummaryCellView.vue @@ -0,0 +1,54 @@ + + + + \ No newline at end of file diff --git a/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/EditorCancelPlugin.js b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/EditorCancelPlugin.js new file mode 100644 index 0000000..ac257d6 --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/EditorCancelPlugin.js @@ -0,0 +1,29 @@ +import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; +import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview'; +import cancelIcon from '@ckeditor/ckeditor5-core/theme/icons/cancel.svg' +class EditorCancelPlugin extends Plugin { + init() { + const editor = this.editor; + + editor.ui.componentFactory.add( 'editorCancelPlugin', locale => { + const view = new ButtonView( locale ); + + view.set( { + label: 'Cancel', + icon: cancelIcon, + tooltip: true, + withText: true, + class: "mb-n9 large-right-neg-margin red--text" // Somewhat-evil margin hacking (button must be on right of top toolbar row to work) + } ); + + view.on( 'execute', () => { + window.journal.$root.$emit(`onEditorCancel+${this.editor.entryId}+${this.editor.fullScreen}`, this.editor.entryId) + + } ); + + return view; + } ); + } +} + +export default EditorCancelPlugin; \ No newline at end of file diff --git a/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/EditorSavePlugin.js b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/EditorSavePlugin.js new file mode 100644 index 0000000..3270472 --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/EditorSavePlugin.js @@ -0,0 +1,31 @@ +import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; +import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview'; +import pencilIcon from '@ckeditor/ckeditor5-core/theme/icons/check.svg' +class EditorSavePlugin extends Plugin { + init() { + const editor = this.editor; + editor.ui.componentFactory.add( 'editorSavePlugin', locale => { + const view = new ButtonView( locale ); + + view.set( { + label: 'Submit', + icon: pencilIcon, + tooltip: true, + withText: true, + class: "ml-auto mb-n9 green--text" // Somewhat-evil margin hacking (button must be on left of top toolbar row to work) + } ); + + view.on('execute', () => { + this.editor.getData() // Force data update before we save + view.isEnabled = false + window.journal.$root.$emit(`onEditorSave+${this.editor.entryId}+${this.editor.fullScreen}`, + { entryId: this.editor.entryId, submitButtonView: view }) + }); + + + return view; + } ); + } +} + +export default EditorSavePlugin; \ No newline at end of file diff --git a/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/FlairPlugin/FlairComponent.vue b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/FlairPlugin/FlairComponent.vue new file mode 100644 index 0000000..2843c54 --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/FlairPlugin/FlairComponent.vue @@ -0,0 +1,183 @@ + + + + + + diff --git a/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/FlairPlugin/FlairPlugin.js b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/FlairPlugin/FlairPlugin.js new file mode 100644 index 0000000..a3d761e --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/FlairPlugin/FlairPlugin.js @@ -0,0 +1,10 @@ +import Plugin from '@ckeditor/ckeditor5-core/src/plugin' +import FlairPluginEditing from './FlairPluginEditing' +import FlairPluginUI from './FlairPluginUI' + +export default class FlairPlugin extends Plugin{ + + static get requires() { + return [FlairPluginEditing, FlairPluginUI] + } +} \ No newline at end of file diff --git a/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/FlairPlugin/FlairPluginEditing.js b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/FlairPlugin/FlairPluginEditing.js new file mode 100644 index 0000000..cf96552 --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/FlairPlugin/FlairPluginEditing.js @@ -0,0 +1,83 @@ +import Plugin from '@ckeditor/ckeditor5-core/src/plugin' +import Widget from '@ckeditor/ckeditor5-widget/src/widget' +import { toWidget } from '@ckeditor/ckeditor5-widget/src/utils' +import store from '@/store' +import Vue from 'vue' +import Vuetify from 'vuetify/lib' +import { EntryClassEnum, IRElement, IRElementQuickButton, IRElementType, Entry, NewEntry, IRElementStatus} from '@/store/modules/IRElements/types' +export default class FlairPluginEditing extends Plugin { + static get requires(){ + return [Widget] + } +init(){ + this._defineSchema() + this._defineConverters() +} + +_defineSchema() { + const schema = this.editor.model.schema + schema.register('flairEntity', { + allowWhere: ['$text', 'flairEntity'], + isInline: true, + isObject: true, + allowAttributes: ['id', 'value', 'type'] + }); +} + +_defineConverters(){ + const conversion = this.editor.conversion + + + conversion + .for('upcast') + .elementToElement({ + view:{ + name:'span', + classes: ['entity'] + }, + model: ( viewElement, { writer } ) => { + let flairChildren = [] + const value = viewElement.getAttribute('data-entity-value') + const type = viewElement.getAttribute('data-entity-type') + + if (viewElement.childCount > 1) + { + flairChildren = viewElement._children.filter((el) => el._classes != undefined && el._classes.has('entity')) + flairChildren = flairChildren.map((el) => { + + return {value: el.getAttribute('data-entity-value'), type: el.getAttribute('data-entity-type')} + + } ) + } + const flairEntityElement = writer.createElement( 'flairEntity', + { value: value, type: type, children: JSON.stringify(flairChildren) + }) + return flairEntityElement + } + }) + + conversion + .for( 'editingDowncast' ) + .elementToElement( { + model: 'flairEntity', + view: ( modelItem, { writer:viewWriter } ) => createFlairEntityView(this.editor, modelItem, viewWriter) + + } ); + + + conversion.for('dataDowncast').elementToElement({ + model: 'flairEntity', + view: (modelItem, {writer: viewWriter}) => createFlairEntityView(this.editor, modelItem, viewWriter) + }) + + function createFlairEntityView(editor, modelItem, viewWriter){ + const type = modelItem.getAttribute('type') + const value = modelItem.getAttribute('value') + const children = modelItem.getAttribute('children') + const flairView = viewWriter.createRawElement( 'span', { class:'entityFlair', value:value, type:type, children:children}) + return flairView + } + +} + +} \ No newline at end of file diff --git a/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/FlairPlugin/FlairPluginUI.js b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/FlairPlugin/FlairPluginUI.js new file mode 100644 index 0000000..2ac60ba --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/FlairPlugin/FlairPluginUI.js @@ -0,0 +1,8 @@ +import Plugin from '@ckeditor/ckeditor5-core/src/plugin' + +export default class FlairPluginUI extends Plugin { +init(){ + //console.log('FlairPluginUI init() got called') +} + +} \ No newline at end of file diff --git a/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/FlairPlugin/FlairedTextComponent.vue b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/FlairPlugin/FlairedTextComponent.vue new file mode 100755 index 0000000..87a9cc1 --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/FlairPlugin/FlairedTextComponent.vue @@ -0,0 +1,99 @@ + + + \ No newline at end of file diff --git a/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/WYSIWYGCellEdit.vue b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/WYSIWYGCellEdit.vue new file mode 100644 index 0000000..fdb05ac --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/WYSIWYGCellEdit.vue @@ -0,0 +1,468 @@ + + + + + + diff --git a/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/WYSIWYGCellView.vue b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/WYSIWYGCellView.vue new file mode 100644 index 0000000..d6eeec3 --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/WYSIWYGCellView.vue @@ -0,0 +1,146 @@ + + + + + + \ No newline at end of file diff --git a/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/fileUploadPlugin/imageUploadPlugin.js b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/fileUploadPlugin/imageUploadPlugin.js new file mode 100755 index 0000000..3629ed6 --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/fileUploadPlugin/imageUploadPlugin.js @@ -0,0 +1,53 @@ +import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; +import FileRepository from '@ckeditor/ckeditor5-upload/src/filerepository'; + +export default class ScotUploadAdapter extends Plugin { + static get requires() { + return [FileRepository] + } + + static get pluginName() { + return 'ScotUploadAdapter' + } + + init() { + const options = this.editor.config.get('scotUpload') + this.editor.plugins.get(FileRepository).createUploadAdapter = loader => { + return new Adapter(loader, options) + } + } +} + +class Adapter { + constructor(loader, options) { + this.loader = loader + this.options = options + } + + upload() { + return this.loader.file.then(file => new Promise((resolve, reject) => { + this.abortController = new AbortController(); + const progressCallback = (evt) => { + if (evt.lengthComputable) { + this.loader.uploadTotal = evt.total; + this.loader.uploaded = evt.loaded; + } + } + try { + this.options.uploadFunction(file, progressCallback, this.abortController).then(resp => { + const urls = { "default": process.env.VUE_APP_API_BASE + "/file/download/" + resp.data.id.toString() } + resolve({ urls, ...resp }) + }) + } + catch (e) { + reject("Failed to upload file: " + file.name + " Error: " + e) + } + })) + } + + abort() { + if (this.abortController) { + this.abortController.abort() + } + } +} \ No newline at end of file diff --git a/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/fileUploadPlugin/uploadPlugin.js b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/fileUploadPlugin/uploadPlugin.js new file mode 100644 index 0000000..5785a59 --- /dev/null +++ b/src/components/JournalComponents/EntryCellComponents/WYSIWYGCell/fileUploadPlugin/uploadPlugin.js @@ -0,0 +1,62 @@ +import Plugin from "@ckeditor/ckeditor5-core/src/plugin"; +import ButtonView from "@ckeditor/ckeditor5-ui/src/button/buttonview"; +import icon from "@ckeditor/ckeditor5-ckfinder/theme/icons/browse-files.svg"; + +export default class InsertFile extends Plugin { + init() { + const editor = this.editor; + editor.editing.view.document.on( + "drop", + async (event, data) => { + if ( + data.dataTransfer.files && + !data.dataTransfer.files[0].type.includes("image") + ) { + event.stop(); + data.preventDefault(); + this.insert(data.dataTransfer.files[0], editor); + } + }, + { priority: "high" } + ); + + editor.editing.view.document.on( + "dragover", + (event, data) => { + event.stop(); + data.preventDefault(); + }, + { priority: "high" } + ); + + editor.ui.componentFactory.add("insertFile", (locale) => { + const inputElement = document.createElement("input"); + inputElement.type = "file"; + inputElement.accept = + ".doc,.docx,.pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf"; + inputElement.addEventListener("change", (event) => { + this.insert(event.target.files[0], editor); + }); + + const view = new ButtonView(locale); + + view.set({ + label: "Insert file", + icon: icon, + tooltip: true, + }); + + view.on("execute", () => { + inputElement.dispatchEvent(new MouseEvent("click")); + }); + + return view; + }); + } + + insert(file, editor) { + if (file) { + console.log('HERE I SHOULD INSERT') + } + } +} diff --git a/src/components/JournalComponents/Journal.vue b/src/components/JournalComponents/Journal.vue new file mode 100644 index 0000000..38e85d5 --- /dev/null +++ b/src/components/JournalComponents/Journal.vue @@ -0,0 +1,155 @@ + + + + + + \ No newline at end of file diff --git a/src/components/JournalComponents/LinkedElementJournal.vue b/src/components/JournalComponents/LinkedElementJournal.vue new file mode 100644 index 0000000..a7ce807 --- /dev/null +++ b/src/components/JournalComponents/LinkedElementJournal.vue @@ -0,0 +1,53 @@ + + + + + + + + \ No newline at end of file diff --git a/src/components/NavigationComponents/ScotExternalLinks.vue b/src/components/NavigationComponents/ScotExternalLinks.vue new file mode 100644 index 0000000..47b6d12 --- /dev/null +++ b/src/components/NavigationComponents/ScotExternalLinks.vue @@ -0,0 +1,22 @@ + + + \ No newline at end of file diff --git a/src/components/NavigationComponents/ScotNavBar.vue b/src/components/NavigationComponents/ScotNavBar.vue new file mode 100644 index 0000000..e7a48f1 --- /dev/null +++ b/src/components/NavigationComponents/ScotNavBar.vue @@ -0,0 +1,332 @@ + + + + diff --git a/src/components/PaneComponents/AlertTablePaneVuetify.vue b/src/components/PaneComponents/AlertTablePaneVuetify.vue new file mode 100644 index 0000000..6c88256 --- /dev/null +++ b/src/components/PaneComponents/AlertTablePaneVuetify.vue @@ -0,0 +1,398 @@ + + + + + diff --git a/src/components/PaneComponents/EditEntityClassPane.vue b/src/components/PaneComponents/EditEntityClassPane.vue new file mode 100755 index 0000000..f2f2b9d --- /dev/null +++ b/src/components/PaneComponents/EditEntityClassPane.vue @@ -0,0 +1,63 @@ + + + \ No newline at end of file diff --git a/src/components/PaneComponents/EditFeedPane.vue b/src/components/PaneComponents/EditFeedPane.vue new file mode 100755 index 0000000..feb0157 --- /dev/null +++ b/src/components/PaneComponents/EditFeedPane.vue @@ -0,0 +1,73 @@ + + + + \ No newline at end of file diff --git a/src/components/PaneComponents/EditIncidentPane.vue b/src/components/PaneComponents/EditIncidentPane.vue new file mode 100755 index 0000000..6fa8c54 --- /dev/null +++ b/src/components/PaneComponents/EditIncidentPane.vue @@ -0,0 +1,311 @@ + + + + + + \ No newline at end of file diff --git a/src/components/PaneComponents/EditPivotPane.vue b/src/components/PaneComponents/EditPivotPane.vue new file mode 100755 index 0000000..69278c3 --- /dev/null +++ b/src/components/PaneComponents/EditPivotPane.vue @@ -0,0 +1,153 @@ + + + + \ No newline at end of file diff --git a/src/components/PaneComponents/EditSignaturePane.vue b/src/components/PaneComponents/EditSignaturePane.vue new file mode 100755 index 0000000..356ffd9 --- /dev/null +++ b/src/components/PaneComponents/EditSignaturePane.vue @@ -0,0 +1,106 @@ + + + + + + \ No newline at end of file diff --git a/src/components/PaneComponents/EntitiesPane.vue b/src/components/PaneComponents/EntitiesPane.vue new file mode 100644 index 0000000..d62bc07 --- /dev/null +++ b/src/components/PaneComponents/EntitiesPane.vue @@ -0,0 +1,165 @@ + + + + + \ No newline at end of file diff --git a/src/components/PaneComponents/EntityAppearancesPane.vue b/src/components/PaneComponents/EntityAppearancesPane.vue new file mode 100644 index 0000000..7706cb0 --- /dev/null +++ b/src/components/PaneComponents/EntityAppearancesPane.vue @@ -0,0 +1,139 @@ + + + + + + \ No newline at end of file diff --git a/src/components/PaneComponents/FilesPane.vue b/src/components/PaneComponents/FilesPane.vue new file mode 100644 index 0000000..d50ea04 --- /dev/null +++ b/src/components/PaneComponents/FilesPane.vue @@ -0,0 +1,110 @@ + + + + \ No newline at end of file diff --git a/src/components/PaneComponents/FlairPane.vue b/src/components/PaneComponents/FlairPane.vue new file mode 100644 index 0000000..cbec434 --- /dev/null +++ b/src/components/PaneComponents/FlairPane.vue @@ -0,0 +1,251 @@ + + + + + + \ No newline at end of file diff --git a/src/components/PaneComponents/GuideSignaturesPane.vue b/src/components/PaneComponents/GuideSignaturesPane.vue new file mode 100755 index 0000000..ccdae37 --- /dev/null +++ b/src/components/PaneComponents/GuideSignaturesPane.vue @@ -0,0 +1,127 @@ + + + + + + + + \ No newline at end of file diff --git a/src/components/PaneComponents/GuidesPane.vue b/src/components/PaneComponents/GuidesPane.vue new file mode 100644 index 0000000..6aae48d --- /dev/null +++ b/src/components/PaneComponents/GuidesPane.vue @@ -0,0 +1,152 @@ + + + + + + + + \ No newline at end of file diff --git a/src/components/PaneComponents/PromotedAlertsPane.vue b/src/components/PaneComponents/PromotedAlertsPane.vue new file mode 100755 index 0000000..d45b2ec --- /dev/null +++ b/src/components/PaneComponents/PromotedAlertsPane.vue @@ -0,0 +1,224 @@ + + + + + \ No newline at end of file diff --git a/src/components/PaneComponents/SignatureBodyPane.vue b/src/components/PaneComponents/SignatureBodyPane.vue new file mode 100755 index 0000000..97dc692 --- /dev/null +++ b/src/components/PaneComponents/SignatureBodyPane.vue @@ -0,0 +1,68 @@ + + + \ No newline at end of file diff --git a/src/components/PaneComponents/SignatureStatsPane.vue b/src/components/PaneComponents/SignatureStatsPane.vue new file mode 100755 index 0000000..f64f5e2 --- /dev/null +++ b/src/components/PaneComponents/SignatureStatsPane.vue @@ -0,0 +1,96 @@ + + + + \ No newline at end of file diff --git a/src/components/PaneComponents/SignaturesPane.vue b/src/components/PaneComponents/SignaturesPane.vue new file mode 100644 index 0000000..d1514ec --- /dev/null +++ b/src/components/PaneComponents/SignaturesPane.vue @@ -0,0 +1,243 @@ + + + + + \ No newline at end of file diff --git a/src/components/PivotComponents/PivotAttachEntityClass.vue b/src/components/PivotComponents/PivotAttachEntityClass.vue new file mode 100644 index 0000000..e28a225 --- /dev/null +++ b/src/components/PivotComponents/PivotAttachEntityClass.vue @@ -0,0 +1,158 @@ + + + + \ No newline at end of file diff --git a/src/components/PivotComponents/PivotAttachEntityType.vue b/src/components/PivotComponents/PivotAttachEntityType.vue new file mode 100644 index 0000000..47ea33f --- /dev/null +++ b/src/components/PivotComponents/PivotAttachEntityType.vue @@ -0,0 +1,149 @@ + + + + \ No newline at end of file diff --git a/src/components/QueueTableComponents/QueueTableVuetify.vue b/src/components/QueueTableComponents/QueueTableVuetify.vue new file mode 100644 index 0000000..9384e27 --- /dev/null +++ b/src/components/QueueTableComponents/QueueTableVuetify.vue @@ -0,0 +1,863 @@ + + + + + diff --git a/src/components/ThreatModelComponents/MitreICSModel.vue b/src/components/ThreatModelComponents/MitreICSModel.vue new file mode 100644 index 0000000..efbb8d7 --- /dev/null +++ b/src/components/ThreatModelComponents/MitreICSModel.vue @@ -0,0 +1,122 @@ + + + \ No newline at end of file diff --git a/src/components/ThreatModelComponents/MitreModel.vue b/src/components/ThreatModelComponents/MitreModel.vue new file mode 100644 index 0000000..cb6c120 --- /dev/null +++ b/src/components/ThreatModelComponents/MitreModel.vue @@ -0,0 +1,120 @@ + + + \ No newline at end of file diff --git a/src/components/UserSettingsComponent/ApiKeys.vue b/src/components/UserSettingsComponent/ApiKeys.vue new file mode 100755 index 0000000..5b729b4 --- /dev/null +++ b/src/components/UserSettingsComponent/ApiKeys.vue @@ -0,0 +1,117 @@ + + + \ No newline at end of file diff --git a/src/components/UserSettingsComponent/AuditLogs.vue b/src/components/UserSettingsComponent/AuditLogs.vue new file mode 100755 index 0000000..b596dcd --- /dev/null +++ b/src/components/UserSettingsComponent/AuditLogs.vue @@ -0,0 +1,458 @@ + + + + \ No newline at end of file diff --git a/src/components/UserSettingsComponent/QuickSettingsDrawer.vue b/src/components/UserSettingsComponent/QuickSettingsDrawer.vue new file mode 100644 index 0000000..e08475b --- /dev/null +++ b/src/components/UserSettingsComponent/QuickSettingsDrawer.vue @@ -0,0 +1,144 @@ + + + diff --git a/src/components/UserSettingsComponent/UserPreferences.vue b/src/components/UserSettingsComponent/UserPreferences.vue new file mode 100755 index 0000000..12f6d41 --- /dev/null +++ b/src/components/UserSettingsComponent/UserPreferences.vue @@ -0,0 +1,63 @@ + + + \ No newline at end of file diff --git a/src/components/UserSettingsComponent/UserProfile.vue b/src/components/UserSettingsComponent/UserProfile.vue new file mode 100755 index 0000000..411abcb --- /dev/null +++ b/src/components/UserSettingsComponent/UserProfile.vue @@ -0,0 +1,116 @@ + + + \ No newline at end of file diff --git a/src/constants.ts b/src/constants.ts new file mode 100755 index 0000000..0663a8e --- /dev/null +++ b/src/constants.ts @@ -0,0 +1,15 @@ +const default_title: string = "SCOT 4.0" +const default_incident_summary: string = "\ +\ +\ +\ +\ +\ +
DescriptionPlace description of the incident here
Related IndicatorsPlace IOCs here
Source DetailsPlace wource port, ip, protocol, etc. here
Compromised System DetailsPlace details about compromised system here
Recovery/Mitigation ActionsPlace recovery/mitigation details here
Physical Location of SystemPlace the city and state of system location
Detection DetailsPlace source, methods, or tools used to identify incident
" +const plain_alert_columns: Array = ["_raw", "search", "columns"] + +export { + default_title, + default_incident_summary, + plain_alert_columns +} \ No newline at end of file diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..7d03ac1 --- /dev/null +++ b/src/main.ts @@ -0,0 +1,158 @@ +import Vue from 'vue' +import qs from 'qs' +import App from './App.vue' +import router from './router' +import vuetify from './plugins/vuetify' +import axios from "axios" +import store from "./store" +import VueAxios from "vue-axios" +import Auth from "@/api/auth" +import Elements from "@/api/elements" +import User from "@/api/user" +import File from "@/api/file" +import VueCookies from "vue-cookies" +import Storage from '@/storage/localForage' +import localforage from 'localforage' +import Team from './api/team' +import StorageProvider from './api/storage_provider' +import { ValidationProvider } from 'vee-validate'; +import VModal from 'vue-js-modal' +import VueObserveVisibility from 'vue-observe-visibility' +import VueMeta from 'vue-meta' +Vue.use(VueObserveVisibility) +Vue.config.productionTip = false + +Vue.component('ValidationProvider', ValidationProvider); +Vue.use(VueMeta) + +Vue.use(VModal, { + dialog: true +}) + +const vueAxios = axios.create({ + paramsSerializer: params => qs.stringify(params, { arrayFormat: "repeat" }) +}) + +vueAxios.interceptors.response.use(response => response, + error => { + const navigatedRoute = router.currentRoute + if (error.response && error.response.status === 401 && error.response.config.url != "/logout" && !error.response.config.url.startsWith("/login") && navigatedRoute.path != "/login") { + store.dispatch("user/logout").then(() => { + if (navigatedRoute.name) { + Vue.prototype.$storage.setItem('loginRedirect', navigatedRoute.path) + } + if (router.currentRoute.path != '/login') { + router.push('/login') + } + }) + } + return Promise.reject(error) + } +) + +Vue.use(VueAxios, vueAxios) +Vue.use(VueCookies) +Vue.prototype.$storage = Storage() +Vue.prototype.$storage.storageConfig({ driver: localforage.INDEXEDDB, name: 'scot-cache' }) +const factories = { auth: Auth(Vue.axios), elements: Elements(Vue.axios), user: User(Vue.axios), storageProvider: StorageProvider(Vue.axios), team: Team(Vue.axios), file: File(Vue.axios) } +Vue.prototype.$api = factories + +Vue.axios.defaults.baseURL = process.env.VUE_APP_API_BASE + +function interceptClickEvent(e:any) { + let href; + const target = e.target || e.srcElement; + if (target.tagName === 'A') { + href = target.getAttribute('href'); + if (!href.startsWith('#')) { + const url = (new URL(href)) + e.preventDefault() + console.log(window.location.hostname) + console.log(url.hostname) + if (window.location.hostname != url.hostname) { + const answer = window.confirm('You are navigating to an external link. Are you sure you want to proceed?') + if (answer === true) { + window.open(url, '_blank') + + } + } + } + } +} + +//listen for link click events at the document level +if (document.addEventListener) { + document.addEventListener('click', interceptClickEvent); +} + + + +// This is a router guard that checks to make sure the user is currently logged in. If the user is not +// then this guard will route them back to login instead. + +router.beforeEach(async (to, _from, next) => { + try { + const urlParams = new URLSearchParams(window.location.search) + + const code = urlParams.get('code') + const state = urlParams.get('state') + if (to.name == 'Landing' && code && state) { + await store.dispatch('user/completeAzureAD', { code, state }) + if (store.getters['user/isLoggedIn']) { + const redirectUrl = await Vue.prototype.$storage.getItem('loginRedirect') + const currentUrlNoParams = new URL(location.pathname + location.hash, window.location.origin) + if (redirectUrl) { + Vue.prototype.$storage.removeItem('loginRedirect') + let fullRedirectHref = currentUrlNoParams.href + redirectUrl + if (currentUrlNoParams.href.endsWith('/')) { + fullRedirectHref = currentUrlNoParams.href + redirectUrl.substring(1) + } + window.location.replace(fullRedirectHref) + } + else { + window.location.replace(currentUrlNoParams) + } + } + } + else if (to.name !== 'Login' && (store.getters['user/isLoggedIn'] === false || store.getters['user/loginExpiration'] < new Date())) { + // See if our http only cookie is still set by doing a /api/whoami request. + await store.dispatch('user/retrieveUserInfo') + if (store.getters['user/isLoggedIn'] != false) { + // If our firehose is undefined, let's connect to it. This means we have a logged in user so we're ok to connect. + await store.dispatch('user/connectToFirehose') + // Every 10 seconds, reconnect to the firehose if we aren't connected to it + setInterval(() => { + if (store.getters['user/firehose'] == undefined) { + store.dispatch('user/connectToFirehose', { 'reconnect': true }) + } + }, 10000) + const matomoId = store.getters['user/currentUser'].email + window._paq.push(['setUserId', matomoId]) + next() + } + else { + Vue.prototype.$storage.setItem('loginRedirect', to.path) + next({ name: 'Login' }) + } + } + else if (to.name == 'Admin' && store.getters['user/currentUser'].is_superuser != true) { + next({ name: 'Landing' }) + } + else { + next() + } + } + catch (e) { + console.log(e) + } +}) + + + + +export default new Vue({ + router, + store, + vuetify, + render: h => h(App) +}).$mount('#app') diff --git a/src/plugins/matomo.ts b/src/plugins/matomo.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/plugins/resizable-vuetify-columns.js b/src/plugins/resizable-vuetify-columns.js new file mode 100644 index 0000000..27d0641 --- /dev/null +++ b/src/plugins/resizable-vuetify-columns.js @@ -0,0 +1,95 @@ +export default { + install(Vue) { + Vue.directive('columns-resizable', { + componentUpdated(el, binding, vnode, oldVnode) { + let nodeName = el.nodeName; + if (['TABLE', 'THEAD'].indexOf(nodeName) < 0) { + console.log('step 1') + el = el.querySelector('table'); // looking for the closest table + if (!el) return; + nodeName = 'TABLE'; + } + const table = nodeName === 'TABLE' ? el : el.parentElement; + const thead = table.querySelector('thead'); + const ths = thead.querySelectorAll('th'); + const barHeight = nodeName === 'TABLE' ? table.offsetHeight : thead.offsetHeight; + + const resizeContainer = document.createElement('div'); + table.style.position = 'relative'; + resizeContainer.style.position = 'relative'; + resizeContainer.style.width = table.offsetWidth + 'px'; + resizeContainer.className = "vue-columns-resizable"; + table.parentElement.insertBefore(resizeContainer, table); + + let moving = false; + let movingIndex = 0; + + ths.forEach((th, index) => { + th.style.width = th.offsetWidth + 'px'; + + if (index + 1 >= ths.length) return; + + const nextTh = ths[index + 1]; + const bar = document.createElement('div'); + + bar.style.position = 'absolute'; + bar.style.left = nextTh.offsetLeft - 4 + 'px'; + bar.style.top = 0; + bar.style.height = barHeight + 'px'; + bar.style.width = '8px'; + bar.style.cursor = 'col-resize'; + bar.style.zIndex = 1; + bar.className = 'columns-resize-bar'; + + bar.addEventListener('mousedown', () => { + moving = true; + movingIndex = index; + document.body.style.cursor = 'col-resize'; + document.body.style.userSelect = 'none'; + }); + + resizeContainer.appendChild(bar); + }); + + const bars = resizeContainer.querySelectorAll('.columns-resize-bar'); + + document.addEventListener('mouseup', () => { + if (!moving) return; + + moving = false; + document.body.style.cursor = ''; + document.body.style.userSelect = ''; + + bars.forEach((bar, index) => { + const th = ths[index]; + const nextTh = ths[index + 1]; + th.style.width = th.offsetWidth + 'px'; + bar.style.left = nextTh.offsetLeft - 4 + 'px'; + }); + }); + + const cutPx = str => +str.replace('px', ''); + + const handleResize = e => { + if (moving) { + + const th = ths[movingIndex]; + const nextTh = ths[movingIndex + 1]; + const bar = bars[movingIndex]; + th.style.width = cutPx(th.style.width) + e.movementX + 'px'; + nextTh.style.width = cutPx(nextTh.style.width) - e.movementX + 'px'; + bar.style.left = nextTh.offsetLeft - 4 + e.movementX + 'px'; + console.log(th) + console.log(bar) + } + }; + + resizeContainer.addEventListener('mousemove', handleResize); + table.addEventListener('mousemove', handleResize); + + + }, + }); + + }, + }; \ No newline at end of file diff --git a/src/plugins/vuetify.ts b/src/plugins/vuetify.ts new file mode 100644 index 0000000..5d214cb --- /dev/null +++ b/src/plugins/vuetify.ts @@ -0,0 +1,1097 @@ +import '@mdi/font/css/materialdesignicons.css' +import Vue from 'vue'; +import Vuetify from 'vuetify'; +import AC from '@/components/EntityClassComponents/CountryIconComponents/AC.vue' +import GM from "@/components/EntityClassComponents/CountryIconComponents/GM.vue" +import IT from "@/components/EntityClassComponents/CountryIconComponents/IT.vue" +import HU from "@/components/EntityClassComponents/CountryIconComponents/HU.vue" +import UA from "@/components/EntityClassComponents/CountryIconComponents/UA.vue" +import TN from "@/components/EntityClassComponents/CountryIconComponents/TN.vue" +import SA from "@/components/EntityClassComponents/CountryIconComponents/SA.vue" +import LK from "@/components/EntityClassComponents/CountryIconComponents/LK.vue" +import PE from "@/components/EntityClassComponents/CountryIconComponents/PE.vue" +import MM from "@/components/EntityClassComponents/CountryIconComponents/MM.vue" +import GB from "@/components/EntityClassComponents/CountryIconComponents/GB.vue" +import PN from "@/components/EntityClassComponents/CountryIconComponents/PN.vue" +import JM from "@/components/EntityClassComponents/CountryIconComponents/JM.vue" +import NE from "@/components/EntityClassComponents/CountryIconComponents/NE.vue" +import BI from "@/components/EntityClassComponents/CountryIconComponents/BI.vue" +import CX from "@/components/EntityClassComponents/CountryIconComponents/CX.vue" +import EH from "@/components/EntityClassComponents/CountryIconComponents/EH.vue" +import XK from "@/components/EntityClassComponents/CountryIconComponents/XK.vue" +import LY from "@/components/EntityClassComponents/CountryIconComponents/LY.vue" +import DE from "@/components/EntityClassComponents/CountryIconComponents/DE.vue" +import FO from "@/components/EntityClassComponents/CountryIconComponents/FO.vue" +import EA from "@/components/EntityClassComponents/CountryIconComponents/EA.vue" +import PK from "@/components/EntityClassComponents/CountryIconComponents/PK.vue" +import UM from "@/components/EntityClassComponents/CountryIconComponents/UM.vue" +import KY from "@/components/EntityClassComponents/CountryIconComponents/KY.vue" +import TR from "@/components/EntityClassComponents/CountryIconComponents/TR.vue" +import NZ from "@/components/EntityClassComponents/CountryIconComponents/NZ.vue" +import GQ from "@/components/EntityClassComponents/CountryIconComponents/GQ.vue" +import IO from "@/components/EntityClassComponents/CountryIconComponents/IO.vue" +import BE from "@/components/EntityClassComponents/CountryIconComponents/BE.vue" +import DJ from "@/components/EntityClassComponents/CountryIconComponents/DJ.vue" +import CI from "@/components/EntityClassComponents/CountryIconComponents/CI.vue" +import GN from "@/components/EntityClassComponents/CountryIconComponents/GN.vue" +import MQ from "@/components/EntityClassComponents/CountryIconComponents/MQ.vue" +import CU from "@/components/EntityClassComponents/CountryIconComponents/CU.vue" +import CW from "@/components/EntityClassComponents/CountryIconComponents/CW.vue" +import HN from "@/components/EntityClassComponents/CountryIconComponents/HN.vue" +import AG from "@/components/EntityClassComponents/CountryIconComponents/AG.vue" +import MF from "@/components/EntityClassComponents/CountryIconComponents/MF.vue" +import GG from "@/components/EntityClassComponents/CountryIconComponents/GG.vue" +import TZ from "@/components/EntityClassComponents/CountryIconComponents/TZ.vue" +import TO from "@/components/EntityClassComponents/CountryIconComponents/TO.vue" +import ZA from "@/components/EntityClassComponents/CountryIconComponents/ZA.vue" +import RE from "@/components/EntityClassComponents/CountryIconComponents/RE.vue" +import CM from "@/components/EntityClassComponents/CountryIconComponents/CM.vue" +import GI from "@/components/EntityClassComponents/CountryIconComponents/GI.vue" +import MA from "@/components/EntityClassComponents/CountryIconComponents/MA.vue" +import AT from "@/components/EntityClassComponents/CountryIconComponents/AT.vue" +import MN from "@/components/EntityClassComponents/CountryIconComponents/MN.vue" +import GA from "@/components/EntityClassComponents/CountryIconComponents/GA.vue" +import ST from "@/components/EntityClassComponents/CountryIconComponents/ST.vue" +import VN from "@/components/EntityClassComponents/CountryIconComponents/VN.vue" +import TL from "@/components/EntityClassComponents/CountryIconComponents/TL.vue" +import GD from "@/components/EntityClassComponents/CountryIconComponents/GD.vue" +import SY from "@/components/EntityClassComponents/CountryIconComponents/SY.vue" +import BM from "@/components/EntityClassComponents/CountryIconComponents/BM.vue" +import QA from "@/components/EntityClassComponents/CountryIconComponents/QA.vue" +import SI from "@/components/EntityClassComponents/CountryIconComponents/SI.vue" +import MR from "@/components/EntityClassComponents/CountryIconComponents/MR.vue" +import MW from "@/components/EntityClassComponents/CountryIconComponents/MW.vue" +import SH from "@/components/EntityClassComponents/CountryIconComponents/SH.vue" +import KR from "@/components/EntityClassComponents/CountryIconComponents/KR.vue" +import MT from "@/components/EntityClassComponents/CountryIconComponents/MT.vue" +import ME from "@/components/EntityClassComponents/CountryIconComponents/ME.vue" +import MH from "@/components/EntityClassComponents/CountryIconComponents/MH.vue" +import MC from "@/components/EntityClassComponents/CountryIconComponents/MC.vue" +import SZ from "@/components/EntityClassComponents/CountryIconComponents/SZ.vue" +import JP from "@/components/EntityClassComponents/CountryIconComponents/JP.vue" +import ML from "@/components/EntityClassComponents/CountryIconComponents/ML.vue" +import BR from "@/components/EntityClassComponents/CountryIconComponents/BR.vue" +import US from "@/components/EntityClassComponents/CountryIconComponents/US.vue" +import TD from "@/components/EntityClassComponents/CountryIconComponents/TD.vue" +import TA from "@/components/EntityClassComponents/CountryIconComponents/TA.vue" +import GF from "@/components/EntityClassComponents/CountryIconComponents/GF.vue" +import AU from "@/components/EntityClassComponents/CountryIconComponents/AU.vue" +import MP from "@/components/EntityClassComponents/CountryIconComponents/MP.vue" +import CP from "@/components/EntityClassComponents/CountryIconComponents/CP.vue" +import MS from "@/components/EntityClassComponents/CountryIconComponents/MS.vue" +import LT from "@/components/EntityClassComponents/CountryIconComponents/LT.vue" +import NF from "@/components/EntityClassComponents/CountryIconComponents/NF.vue" +import RO from "@/components/EntityClassComponents/CountryIconComponents/RO.vue" +import DK from "@/components/EntityClassComponents/CountryIconComponents/DK.vue" +import BZ from "@/components/EntityClassComponents/CountryIconComponents/BZ.vue" +import UG from "@/components/EntityClassComponents/CountryIconComponents/UG.vue" +import UZ from "@/components/EntityClassComponents/CountryIconComponents/UZ.vue" +import VG from "@/components/EntityClassComponents/CountryIconComponents/VG.vue" +import YE from "@/components/EntityClassComponents/CountryIconComponents/YE.vue" +import EG from "@/components/EntityClassComponents/CountryIconComponents/EG.vue" +import TJ from "@/components/EntityClassComponents/CountryIconComponents/TJ.vue" +import CF from "@/components/EntityClassComponents/CountryIconComponents/CF.vue" +import CK from "@/components/EntityClassComponents/CountryIconComponents/CK.vue" +import RW from "@/components/EntityClassComponents/CountryIconComponents/RW.vue" +import BW from "@/components/EntityClassComponents/CountryIconComponents/BW.vue" +import CH from "@/components/EntityClassComponents/CountryIconComponents/CH.vue" +import LV from "@/components/EntityClassComponents/CountryIconComponents/LV.vue" +import MD from "@/components/EntityClassComponents/CountryIconComponents/MD.vue" +import SM from "@/components/EntityClassComponents/CountryIconComponents/SM.vue" +import PA from "@/components/EntityClassComponents/CountryIconComponents/PA.vue" +import ES from "@/components/EntityClassComponents/CountryIconComponents/ES.vue" +import TC from "@/components/EntityClassComponents/CountryIconComponents/TC.vue" +import VE from "@/components/EntityClassComponents/CountryIconComponents/VE.vue" +import CC from "@/components/EntityClassComponents/CountryIconComponents/CC.vue" +import BD from "@/components/EntityClassComponents/CountryIconComponents/BD.vue" +import HK from "@/components/EntityClassComponents/CountryIconComponents/HK.vue" +import IR from "@/components/EntityClassComponents/CountryIconComponents/IR.vue" +import SD from "@/components/EntityClassComponents/CountryIconComponents/SD.vue" +import CD from "@/components/EntityClassComponents/CountryIconComponents/CD.vue" +import NL from "@/components/EntityClassComponents/CountryIconComponents/NL.vue" +import WS from "@/components/EntityClassComponents/CountryIconComponents/WS.vue" +import CZ from "@/components/EntityClassComponents/CountryIconComponents/CZ.vue" +import ZM from "@/components/EntityClassComponents/CountryIconComponents/ZM.vue" +import KN from "@/components/EntityClassComponents/CountryIconComponents/KN.vue" +import WF from "@/components/EntityClassComponents/CountryIconComponents/WF.vue" +import TG from "@/components/EntityClassComponents/CountryIconComponents/TG.vue" +import NU from "@/components/EntityClassComponents/CountryIconComponents/NU.vue" +import CL from "@/components/EntityClassComponents/CountryIconComponents/CL.vue" +import MO from "@/components/EntityClassComponents/CountryIconComponents/MO.vue" +import FJ from "@/components/EntityClassComponents/CountryIconComponents/FJ.vue" +import LS from "@/components/EntityClassComponents/CountryIconComponents/LS.vue" +import BF from "@/components/EntityClassComponents/CountryIconComponents/BF.vue" +import GW from "@/components/EntityClassComponents/CountryIconComponents/GW.vue" +import FK from "@/components/EntityClassComponents/CountryIconComponents/FK.vue" +import PW from "@/components/EntityClassComponents/CountryIconComponents/PW.vue" +import SL from "@/components/EntityClassComponents/CountryIconComponents/SL.vue" +import BT from "@/components/EntityClassComponents/CountryIconComponents/BT.vue" +import BG from "@/components/EntityClassComponents/CountryIconComponents/BG.vue" +import AW from "@/components/EntityClassComponents/CountryIconComponents/AW.vue" +import MU from "@/components/EntityClassComponents/CountryIconComponents/MU.vue" +import GR from "@/components/EntityClassComponents/CountryIconComponents/GR.vue" +import DO from "@/components/EntityClassComponents/CountryIconComponents/DO.vue" +import TW from "@/components/EntityClassComponents/CountryIconComponents/TW.vue" +import GY from "@/components/EntityClassComponents/CountryIconComponents/GY.vue" +import KW from "@/components/EntityClassComponents/CountryIconComponents/KW.vue" +import MV from "@/components/EntityClassComponents/CountryIconComponents/MV.vue" +import AO from "@/components/EntityClassComponents/CountryIconComponents/AO.vue" +import CN from "@/components/EntityClassComponents/CountryIconComponents/CN.vue" +import SN from "@/components/EntityClassComponents/CountryIconComponents/SN.vue" +import SK from "@/components/EntityClassComponents/CountryIconComponents/SK.vue" +import AL from "@/components/EntityClassComponents/CountryIconComponents/AL.vue" +import FI from "@/components/EntityClassComponents/CountryIconComponents/FI.vue" +import GU from "@/components/EntityClassComponents/CountryIconComponents/GU.vue" +import VC from "@/components/EntityClassComponents/CountryIconComponents/VC.vue" +import MX from "@/components/EntityClassComponents/CountryIconComponents/MX.vue" +import DG from "@/components/EntityClassComponents/CountryIconComponents/DG.vue" +import GE from "@/components/EntityClassComponents/CountryIconComponents/GE.vue" +import FM from "@/components/EntityClassComponents/CountryIconComponents/FM.vue" +import BY from "@/components/EntityClassComponents/CountryIconComponents/BY.vue" +import EC from "@/components/EntityClassComponents/CountryIconComponents/EC.vue" +import NG from "@/components/EntityClassComponents/CountryIconComponents/NG.vue" +import HT from "@/components/EntityClassComponents/CountryIconComponents/HT.vue" +import MZ from "@/components/EntityClassComponents/CountryIconComponents/MZ.vue" +import DZ from "@/components/EntityClassComponents/CountryIconComponents/DZ.vue" +import ZW from "@/components/EntityClassComponents/CountryIconComponents/ZW.vue" +import BH from "@/components/EntityClassComponents/CountryIconComponents/BH.vue" +import GH from "@/components/EntityClassComponents/CountryIconComponents/GH.vue" +import SS from "@/components/EntityClassComponents/CountryIconComponents/SS.vue" +import PL from "@/components/EntityClassComponents/CountryIconComponents/PL.vue" +import IL from "@/components/EntityClassComponents/CountryIconComponents/IL.vue" +import LU from "@/components/EntityClassComponents/CountryIconComponents/LU.vue" +import TH from "@/components/EntityClassComponents/CountryIconComponents/TH.vue" +import PG from "@/components/EntityClassComponents/CountryIconComponents/PG.vue" +import JE from "@/components/EntityClassComponents/CountryIconComponents/JE.vue" +import CG from "@/components/EntityClassComponents/CountryIconComponents/CG.vue" +import MG from "@/components/EntityClassComponents/CountryIconComponents/MG.vue" +import VU from "@/components/EntityClassComponents/CountryIconComponents/VU.vue" +import PF from "@/components/EntityClassComponents/CountryIconComponents/PF.vue" +import PR from "@/components/EntityClassComponents/CountryIconComponents/PR.vue" +import KG from "@/components/EntityClassComponents/CountryIconComponents/KG.vue" +import JO from "@/components/EntityClassComponents/CountryIconComponents/JO.vue" +import LA from "@/components/EntityClassComponents/CountryIconComponents/LA.vue" +import MY from "@/components/EntityClassComponents/CountryIconComponents/MY.vue" +import TK from "@/components/EntityClassComponents/CountryIconComponents/TK.vue" +import SB from "@/components/EntityClassComponents/CountryIconComponents/SB.vue" +import TF from "@/components/EntityClassComponents/CountryIconComponents/TF.vue" +import AS from "@/components/EntityClassComponents/CountryIconComponents/AS.vue" +import NA from "@/components/EntityClassComponents/CountryIconComponents/NA.vue" +import BB from "@/components/EntityClassComponents/CountryIconComponents/BB.vue" +import SE from "@/components/EntityClassComponents/CountryIconComponents/SE.vue" +import DM from "@/components/EntityClassComponents/CountryIconComponents/DM.vue" +import CO from "@/components/EntityClassComponents/CountryIconComponents/CO.vue" +import XX from "@/components/EntityClassComponents/CountryIconComponents/XX.vue" +import HM from "@/components/EntityClassComponents/CountryIconComponents/HM.vue" +import EE from "@/components/EntityClassComponents/CountryIconComponents/EE.vue" +import ET from "@/components/EntityClassComponents/CountryIconComponents/ET.vue" +import BV from "@/components/EntityClassComponents/CountryIconComponents/BV.vue" +import NC from "@/components/EntityClassComponents/CountryIconComponents/NC.vue" +import IM from "@/components/EntityClassComponents/CountryIconComponents/IM.vue" +import KI from "@/components/EntityClassComponents/CountryIconComponents/KI.vue" +import AM from "@/components/EntityClassComponents/CountryIconComponents/AM.vue" +import IS from "@/components/EntityClassComponents/CountryIconComponents/IS.vue" +import IC from "@/components/EntityClassComponents/CountryIconComponents/IC.vue" +import SV from "@/components/EntityClassComponents/CountryIconComponents/SV.vue" +import NI from "@/components/EntityClassComponents/CountryIconComponents/NI.vue" +import IQ from "@/components/EntityClassComponents/CountryIconComponents/IQ.vue" +import AX from "@/components/EntityClassComponents/CountryIconComponents/AX.vue" +import UY from "@/components/EntityClassComponents/CountryIconComponents/UY.vue" +import BS from "@/components/EntityClassComponents/CountryIconComponents/BS.vue" +import NP from "@/components/EntityClassComponents/CountryIconComponents/NP.vue" +import NO from "@/components/EntityClassComponents/CountryIconComponents/NO.vue" +import EU from "@/components/EntityClassComponents/CountryIconComponents/EU.vue" +import NR from "@/components/EntityClassComponents/CountryIconComponents/NR.vue" +import AZ from "@/components/EntityClassComponents/CountryIconComponents/AZ.vue" +import SR from "@/components/EntityClassComponents/CountryIconComponents/SR.vue" +import AF from "@/components/EntityClassComponents/CountryIconComponents/AF.vue" +import GT from "@/components/EntityClassComponents/CountryIconComponents/GT.vue" +import VA from "@/components/EntityClassComponents/CountryIconComponents/VA.vue" +import CV from "@/components/EntityClassComponents/CountryIconComponents/CV.vue" +import AE from "@/components/EntityClassComponents/CountryIconComponents/AE.vue" +import HR from "@/components/EntityClassComponents/CountryIconComponents/HR.vue" +import PS from "@/components/EntityClassComponents/CountryIconComponents/PS.vue" +import IN from "@/components/EntityClassComponents/CountryIconComponents/IN.vue" +import VI from "@/components/EntityClassComponents/CountryIconComponents/VI.vue" +import LR from "@/components/EntityClassComponents/CountryIconComponents/LR.vue" +import SX from "@/components/EntityClassComponents/CountryIconComponents/SX.vue" +import SG from "@/components/EntityClassComponents/CountryIconComponents/SG.vue" +import OM from "@/components/EntityClassComponents/CountryIconComponents/OM.vue" +import BO from "@/components/EntityClassComponents/CountryIconComponents/BO.vue" +import IE from "@/components/EntityClassComponents/CountryIconComponents/IE.vue" +import TM from "@/components/EntityClassComponents/CountryIconComponents/TM.vue" +import AR from "@/components/EntityClassComponents/CountryIconComponents/AR.vue" +import AI from "@/components/EntityClassComponents/CountryIconComponents/AI.vue" +import KH from "@/components/EntityClassComponents/CountryIconComponents/KH.vue" +import LI from "@/components/EntityClassComponents/CountryIconComponents/LI.vue" +import KP from "@/components/EntityClassComponents/CountryIconComponents/KP.vue" +import BA from "@/components/EntityClassComponents/CountryIconComponents/BA.vue" +import PH from "@/components/EntityClassComponents/CountryIconComponents/PH.vue" +import CY from "@/components/EntityClassComponents/CountryIconComponents/CY.vue" +import AQ from "@/components/EntityClassComponents/CountryIconComponents/AQ.vue" +import YT from "@/components/EntityClassComponents/CountryIconComponents/YT.vue" +import TT from "@/components/EntityClassComponents/CountryIconComponents/TT.vue" +import BJ from "@/components/EntityClassComponents/CountryIconComponents/BJ.vue" +import FR from "@/components/EntityClassComponents/CountryIconComponents/FR.vue" +import RS from "@/components/EntityClassComponents/CountryIconComponents/RS.vue" +import SO from "@/components/EntityClassComponents/CountryIconComponents/SO.vue" +import BN from "@/components/EntityClassComponents/CountryIconComponents/BN.vue" +import LC from "@/components/EntityClassComponents/CountryIconComponents/LC.vue" +import BL from "@/components/EntityClassComponents/CountryIconComponents/BL.vue" +import LB from "@/components/EntityClassComponents/CountryIconComponents/LB.vue" +import PY from "@/components/EntityClassComponents/CountryIconComponents/PY.vue" +import MK from "@/components/EntityClassComponents/CountryIconComponents/MK.vue" +import PT from "@/components/EntityClassComponents/CountryIconComponents/PT.vue" +import KM from "@/components/EntityClassComponents/CountryIconComponents/KM.vue" +import KZ from "@/components/EntityClassComponents/CountryIconComponents/KZ.vue" +import PM from "@/components/EntityClassComponents/CountryIconComponents/PM.vue" +import BQ from "@/components/EntityClassComponents/CountryIconComponents/BQ.vue" +import GL from "@/components/EntityClassComponents/CountryIconComponents/GL.vue" +import ID from "@/components/EntityClassComponents/CountryIconComponents/ID.vue" +import RU from "@/components/EntityClassComponents/CountryIconComponents/RU.vue" +import GS from "@/components/EntityClassComponents/CountryIconComponents/GS.vue" +import KE from "@/components/EntityClassComponents/CountryIconComponents/KE.vue" +import TV from "@/components/EntityClassComponents/CountryIconComponents/TV.vue" +import SC from "@/components/EntityClassComponents/CountryIconComponents/SC.vue" +import AD from "@/components/EntityClassComponents/CountryIconComponents/AD.vue" +import UN from "@/components/EntityClassComponents/CountryIconComponents/UN.vue" +import SJ from "@/components/EntityClassComponents/CountryIconComponents/SJ.vue" +import CA from "@/components/EntityClassComponents/CountryIconComponents/CA.vue" +import ER from "@/components/EntityClassComponents/CountryIconComponents/ER.vue" +import GP from "@/components/EntityClassComponents/CountryIconComponents/GP.vue" +import CR from "@/components/EntityClassComponents/CountryIconComponents/CR.vue" +import ScannerIcon from "@/components/EntityClassComponents/CyberIconComponents/ScannerIcon.vue" +import ProxyIcon from "@/components/EntityClassComponents/CyberIconComponents/ProxyIcon.vue" +import FireWallIcon from "@/components/EntityClassComponents/CyberIconComponents/FireWallIcon.vue" +import AnonymousIPIcon from "@/components/EntityClassComponents/CyberIconComponents/AnonymousIPIcon.vue" +import SandiaThunderBirdIcon from "@/components/EntityClassComponents/CyberIconComponents/SandiaThunderBirdIcon.vue" +import ThreatActorIcon from "@/components/EntityClassComponents/CyberIconComponents/ThreatActorIcon.vue" +import ThreatActorInternalIcon from "@/components/EntityClassComponents/CyberIconComponents/ThreatActorInternalIcon.vue" +import ThreatActorIconBlue from "@/components/EntityClassComponents/CyberIconComponents/ThreatActorIconBlue.vue" +import ThreatActorInternalIconBlue from "@/components/EntityClassComponents/CyberIconComponents/ThreatActorInternalIconBlue.vue" +import ThreatActorIconRed from "@/components/EntityClassComponents/CyberIconComponents/ThreatActorIconRed.vue" +import ThreatActorInternalIconRed from "@/components/EntityClassComponents/CyberIconComponents/ThreatActorInternalIconRed.vue" +import KEVIcon from "@/components/EntityClassComponents/CyberIconComponents/KEVIcon.vue" + +Vue.use(Vuetify); + +export default new Vuetify({ + icons: { + iconfont: 'mdi', + values: { + sandia_thunderbird: { + component: SandiaThunderBirdIcon + }, + anonymous_ip: { + component: AnonymousIPIcon + }, + firewall: { + component: FireWallIcon + }, + public_proxy: { + component: ProxyIcon + }, + scanner: { + component: ScannerIcon + }, + threat_actor: { + component: ThreatActorIcon + }, + threat_actor_internal: { + component: ThreatActorInternalIcon + }, + threat_actor_blue: { + component: ThreatActorIconBlue + }, + threat_actor_internal_blue: { + component: ThreatActorInternalIconBlue + }, + threat_actor_red: { + component: ThreatActorIconRed + }, + threat_actor_internal_red: { + component: ThreatActorInternalIconRed + }, + kev: { + component: KEVIcon + }, + gm_flag: { + component: GM + }, + it_flag: { + component: IT + }, + hu_flag: { + component: HU + }, + ua_flag: { + component: UA + }, + tn_flag: { + component: TN + }, + sa_flag: { + component: SA + }, + lk_flag: { + component: LK + }, + pe_flag: { + component: PE + }, + mm_flag: { + component: MM + }, + gb_flag: { + component: GB + }, + pn_flag: { + component: PN + }, + jm_flag: { + component: JM + }, + ne_flag: { + component: NE + }, + bi_flag: { + component: BI + }, + cx_flag: { + component: CX + }, + eh_flag: { + component: EH + }, + xk_flag: { + component: XK + }, + ly_flag: { + component: LY + }, + de_flag: { + component: DE + }, + fo_flag: { + component: FO + }, + ea_flag: { + component: EA + }, + pk_flag: { + component: PK + }, + um_flag: { + component: UM + }, + ky_flag: { + component: KY + }, + tr_flag: { + component: TR + }, + nz_flag: { + component: NZ + }, + gq_flag: { + component: GQ + }, + io_flag: { + component: IO + }, + be_flag: { + component: BE + }, + dj_flag: { + component: DJ + }, + ci_flag: { + component: CI + }, + gn_flag: { + component: GN + }, + mq_flag: { + component: MQ + }, + cu_flag: { + component: CU + }, + cw_flag: { + component: CW + }, + hn_flag: { + component: HN + }, + ag_flag: { + component: AG + }, + mf_flag: { + component: MF + }, + gg_flag: { + component: GG + }, + tz_flag: { + component: TZ + }, + to_flag: { + component: TO + }, + za_flag: { + component: ZA + }, + re_flag: { + component: RE + }, + cm_flag: { + component: CM + }, + gi_flag: { + component: GI + }, + ma_flag: { + component: MA + }, + at_flag: { + component: AT + }, + mn_flag: { + component: MN + }, + ga_flag: { + component: GA + }, + st_flag: { + component: ST + }, + vn_flag: { + component: VN + }, + tl_flag: { + component: TL + }, + gd_flag: { + component: GD + }, + sy_flag: { + component: SY + }, + bm_flag: { + component: BM + }, + qa_flag: { + component: QA + }, + si_flag: { + component: SI + }, + mr_flag: { + component: MR + }, + mw_flag: { + component: MW + }, + sh_flag: { + component: SH + }, + kr_flag: { + component: KR + }, + mt_flag: { + component: MT + }, + me_flag: { + component: ME + }, + mh_flag: { + component: MH + }, + mc_flag: { + component: MC + }, + sz_flag: { + component: SZ + }, + jp_flag: { + component: JP + }, + ml_flag: { + component: ML + }, + br_flag: { + component: BR + }, + us_flag: { + component: US + }, + td_flag: { + component: TD + }, + ta_flag: { + component: TA + }, + gf_flag: { + component: GF + }, + au_flag: { + component: AU + }, + mp_flag: { + component: MP + }, + cp_flag: { + component: CP + }, + ms_flag: { + component: MS + }, + lt_flag: { + component: LT + }, + nf_flag: { + component: NF + }, + ro_flag: { + component: RO + }, + dk_flag: { + component: DK + }, + bz_flag: { + component: BZ + }, + ug_flag: { + component: UG + }, + uz_flag: { + component: UZ + }, + vg_flag: { + component: VG + }, + ye_flag: { + component: YE + }, + eg_flag: { + component: EG + }, + tj_flag: { + component: TJ + }, + cf_flag: { + component: CF + }, + ck_flag: { + component: CK + }, + rw_flag: { + component: RW + }, + bw_flag: { + component: BW + }, + ch_flag: { + component: CH + }, + lv_flag: { + component: LV + }, + md_flag: { + component: MD + }, + sm_flag: { + component: SM + }, + pa_flag: { + component: PA + }, + es_flag: { + component: ES + }, + tc_flag: { + component: TC + }, + ve_flag: { + component: VE + }, + cc_flag: { + component: CC + }, + bd_flag: { + component: BD + }, + hk_flag: { + component: HK + }, + ir_flag: { + component: IR + }, + sd_flag: { + component: SD + }, + cd_flag: { + component: CD + }, + nl_flag: { + component: NL + }, + ws_flag: { + component: WS + }, + cz_flag: { + component: CZ + }, + zm_flag: { + component: ZM + }, + kn_flag: { + component: KN + }, + wf_flag: { + component: WF + }, + tg_flag: { + component: TG + }, + nu_flag: { + component: NU + }, + cl_flag: { + component: CL + }, + mo_flag: { + component: MO + }, + fj_flag: { + component: FJ + }, + ls_flag: { + component: LS + }, + bf_flag: { + component: BF + }, + gw_flag: { + component: GW + }, + fk_flag: { + component: FK + }, + pw_flag: { + component: PW + }, + sl_flag: { + component: SL + }, + bt_flag: { + component: BT + }, + bg_flag: { + component: BG + }, + aw_flag: { + component: AW + }, + mu_flag: { + component: MU + }, + gr_flag: { + component: GR + }, + do_flag: { + component: DO + }, + tw_flag: { + component: TW + }, + gy_flag: { + component: GY + }, + kw_flag: { + component: KW + }, + mv_flag: { + component: MV + }, + ao_flag: { + component: AO + }, + cn_flag: { + component: CN + }, + sn_flag: { + component: SN + }, + sk_flag: { + component: SK + }, + al_flag: { + component: AL + }, + fi_flag: { + component: FI + }, + gu_flag: { + component: GU + }, + vc_flag: { + component: VC + }, + mx_flag: { + component: MX + }, + dg_flag: { + component: DG + }, + ge_flag: { + component: GE + }, + fm_flag: { + component: FM + }, + by_flag: { + component: BY + }, + ec_flag: { + component: EC + }, + ng_flag: { + component: NG + }, + ht_flag: { + component: HT + }, + mz_flag: { + component: MZ + }, + dz_flag: { + component: DZ + }, + zw_flag: { + component: ZW + }, + bh_flag: { + component: BH + }, + gh_flag: { + component: GH + }, + ss_flag: { + component: SS + }, + pl_flag: { + component: PL + }, + il_flag: { + component: IL + }, + lu_flag: { + component: LU + }, + th_flag: { + component: TH + }, + pg_flag: { + component: PG + }, + je_flag: { + component: JE + }, + cg_flag: { + component: CG + }, + mg_flag: { + component: MG + }, + vu_flag: { + component: VU + }, + pf_flag: { + component: PF + }, + pr_flag: { + component: PR + }, + kg_flag: { + component: KG + }, + jo_flag: { + component: JO + }, + la_flag: { + component: LA + }, + my_flag: { + component: MY + }, + tk_flag: { + component: TK + }, + sb_flag: { + component: SB + }, + tf_flag: { + component: TF + }, + as_flag: { + component: AS + }, + na_flag: { + component: NA + }, + bb_flag: { + component: BB + }, + se_flag: { + component: SE + }, + dm_flag: { + component: DM + }, + co_flag: { + component: CO + }, + xx_flag: { + component: XX + }, + hm_flag: { + component: HM + }, + ee_flag: { + component: EE + }, + et_flag: { + component: ET + }, + bv_flag: { + component: BV + }, + nc_flag: { + component: NC + }, + im_flag: { + component: IM + }, + ki_flag: { + component: KI + }, + am_flag: { + component: AM + }, + is_flag: { + component: IS + }, + ic_flag: { + component: IC + }, + sv_flag: { + component: SV + }, + ni_flag: { + component: NI + }, + iq_flag: { + component: IQ + }, + ax_flag: { + component: AX + }, + uy_flag: { + component: UY + }, + bs_flag: { + component: BS + }, + np_flag: { + component: NP + }, + no_flag: { + component: NO + }, + eu_flag: { + component: EU + }, + nr_flag: { + component: NR + }, + az_flag: { + component: AZ + }, + sr_flag: { + component: SR + }, + af_flag: { + component: AF + }, + gt_flag: { + component: GT + }, + va_flag: { + component: VA + }, + cv_flag: { + component: CV + }, + ae_flag: { + component: AE + }, + hr_flag: { + component: HR + }, + ps_flag: { + component: PS + }, + in_flag: { + component: IN + }, + vi_flag: { + component: VI + }, + lr_flag: { + component: LR + }, + sx_flag: { + component: SX + }, + sg_flag: { + component: SG + }, + om_flag: { + component: OM + }, + bo_flag: { + component: BO + }, + ie_flag: { + component: IE + }, + tm_flag: { + component: TM + }, + ar_flag: { + component: AR + }, + ai_flag: { + component: AI + }, + kh_flag: { + component: KH + }, + li_flag: { + component: LI + }, + kp_flag: { + component: KP + }, + ba_flag: { + component: BA + }, + ph_flag: { + component: PH + }, + cy_flag: { + component: CY + }, + aq_flag: { + component: AQ + }, + yt_flag: { + component: YT + }, + tt_flag: { + component: TT + }, + bj_flag: { + component: BJ + }, + fr_flag: { + component: FR + }, + rs_flag: { + component: RS + }, + so_flag: { + component: SO + }, + ac_flag: { + component: AC + }, + bn_flag: { + component: BN + }, + lc_flag: { + component: LC + }, + bl_flag: { + component: BL + }, + lb_flag: { + component: LB + }, + py_flag: { + component: PY + }, + mk_flag: { + component: MK + }, + pt_flag: { + component: PT + }, + km_flag: { + component: KM + }, + kz_flag: { + component: KZ + }, + pm_flag: { + component: PM + }, + bq_flag: { + component: BQ + }, + gl_flag: { + component: GL + }, + id_flag: { + component: ID + }, + ru_flag: { + component: RU + }, + gs_flag: { + component: GS + }, + ke_flag: { + component: KE + }, + tv_flag: { + component: TV + }, + sc_flag: { + component: SC + }, + ad_flag: { + component: AD + }, + un_flag: { + component: UN + }, + sj_flag: { + component: SJ + }, + ca_flag: { + component: CA + }, + er_flag: { + component: ER + }, + gp_flag: { + component: GP + }, + cr_flag: { + component: CR + } + } + }, +}); diff --git a/src/router/index.ts b/src/router/index.ts new file mode 100644 index 0000000..83aaade --- /dev/null +++ b/src/router/index.ts @@ -0,0 +1,199 @@ +import Vue from 'vue' +import VueRouter, { RouteConfig } from 'vue-router' +import Login from '../views/Login.vue' +import Response from '../views/Response.vue' +import ComingSoon from '../views/ComingSoon.vue' +import Landing from '../views/Landing.vue' +import Calendar from '../views/Calendar.vue' +import ThreatModel from '../views/ThreatModel.vue' +import Admin from '../views/Admin.vue' +import FullScreenEntry from '../views/FullScreenEntry.vue' +import EntityClassIcons from '../views/EntityClassIcons.vue' +import { IRElementType } from '@/store/modules/IRElements/types' +import UserSettingsView from '../views/UserSettings.vue' +Vue.use(VueRouter) + +const routes: Array = [ + { + path: '/login', + name: 'Login', + component: Login + }, + { + path: '/team/calendar', + name: 'Calendar', + component: Calendar + }, + { + path: '/threat_model/:type?', + name: 'ThreatModel', + component: ThreatModel + }, + { + path: '/admin', + name: 'Admin', + component: Admin + }, + { + path: '/', + name: 'Landing', + component: Landing + }, + { + path: '/entities/:id?/:entryId?', + name: 'Entities', + component: Response, + meta: { itemType: IRElementType.Entity }, + alias: '/entity/:id?/:entryId?' + }, + { + path: '/entity_classes_list', + name: 'EntityClasses', + component: EntityClassIcons + }, + { + path: '/alertgroups/:id?/:entryId?', + name: 'Alertgroups', + component: Response, + meta: { itemType: IRElementType.Alertgroup }, + alias: '/alertgroup/:id?/:entryId?' + }, + { + path: '/events/:id?/:entryId?', + name: 'Events', + component: Response, + meta: { itemType: IRElementType.Event }, + alias: '/event/:id?/:entryId?' + }, + { + path: '/vuln_feeds/:id?/:entryId?', + name: 'Queue', + component: Response, + meta: { itemType: IRElementType.VulnFeed }, + alias: '/vuln_feed/:id?/:entryId?' + }, + { + path: '/vuln_tracks/:id?/:entryId?', + name: 'Tracking', + component: Response, + meta: { itemType: IRElementType.VulnTrack }, + alias: '/vuln_track/:id?/:entryId?' + }, + { + path: '/events/:id?/:entryId?', + name: 'Events', + component: Response, + meta: { itemType: IRElementType.Event }, + alias: '/event/:id?/:entryId?' + }, + { + path: '/signatures/:id?/:entryId?', + name: 'Signatures', + component: Response, + meta: { itemType: IRElementType.Signature }, + alias: '/signature/:id?/:entryId?' + }, + { + path: '/incidents/:id?/:entryId?', + name: 'Incidents', + component: Response, + meta: { itemType: IRElementType.Incident }, + alias: '/incident/:id?/:entryId?' + }, + { + path: '/intels/:id?/:entryId?', + name: 'Intels', + component: Response, + meta: { itemType: IRElementType.Intel }, + alias: '/intel/:id?/:entryId?' + }, + { + path: '/dispatches/:id?/:entryId?', + name: 'Dispatches', + component: Response, + meta: { itemType: IRElementType.Dispatch }, + alias: '/dispatch/:id?/:entryId?' + }, + { + path: '/products/:id?/:entryId?', + name: 'Products', + component: Response, + meta: { itemType: IRElementType.Product }, + alias: '/product/:id?/:entryId?' + }, + { + path: '/feeds/:id?/:entryId?', + name: 'Feed', + component: Response, + meta: { itemType: IRElementType.Feed }, + alias: '/feed/:id?/:entryId?' + }, + { + path: '/tasks/:id?/:target_type?/:target_id?', + name: 'Task', + component: Response, + meta: { itemType: IRElementType.Entry, extraFilters: { "entry_class": "task" } }, + alias: '/task/:id?/:target_type?/:target_id?' + }, + { + path: '/guides/:id?/:entryId?', + name: 'Guide', + component: Response, + meta: { itemType: IRElementType.Guide }, + alias: '/guide/:id?/:entryId?' + }, + { + path: '/pivots/:id?', + name: 'Pivot', + component: Response, + meta: { itemType: IRElementType.Pivot }, + alias: '/pivot/:id?' + }, + { + path: '/entity_classes/:id?', + name: 'EntityClass', + component: Response, + meta: { itemType: IRElementType.EntityClass } + }, + { + path: '/hunts/:id?/:entryId?', + name: 'Hunts', + component: ComingSoon + }, + { + path: '/actors/:id?/:entryId?', + name: 'Actors', + component: ComingSoon + }, + { + path: '/profile', + name: 'UserSettings', + component: UserSettingsView, + }, + { + path: '/coming_soon', + name: 'Coming Soon', + component: ComingSoon, + }, + { + path: '/:elementType/:elementId/entry/:entryId/fullScreen', + name: 'FullScreenEntry', + component: FullScreenEntry + }, +] + +const router = new VueRouter({ + routes +}) + + + +router.afterEach((to, from) => { + const toDepth = to.path.split('/').length + const fromDepth = from.path.split('/').length + if(to !=undefined && to.meta!=undefined && (to.name=='FullScreenEntry' || from.name=='FullScreenEntry')){ + to.meta.transitionName = 'fade' + } +}) + +export default router diff --git a/src/shims-ckeditor.d.ts b/src/shims-ckeditor.d.ts new file mode 100644 index 0000000..d9a2ddb --- /dev/null +++ b/src/shims-ckeditor.d.ts @@ -0,0 +1,58 @@ +declare module '@ckeditor/ckeditor5-vue2' +declare module '@ckeditor/ckeditor5-utils'; +declare module '@ckeditor/ckeditor5-vue' +declare module '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; +declare module '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice'; +declare module '@ckeditor/ckeditor5-list/src/list'; +declare module '@ckeditor/ckeditor5-list/src/listproperties'; +declare module '@ckeditor/ckeditor5-alignment/src/alignment'; +declare module '@ckeditor/ckeditor5-basic-styles/src/code'; +declare module '@ckeditor/ckeditor5-basic-styles/src/strikethrough'; +declare module '@ckeditor/ckeditor5-basic-styles/src/subscript'; +declare module '@ckeditor/ckeditor5-basic-styles/src/superscript'; +declare module '@ckeditor/ckeditor5-basic-styles/src/underline'; +declare module '@ckeditor/ckeditor5-font/src/font'; +declare module '@ckeditor/ckeditor5-font/src/fontfamily'; +declare module '@ckeditor/ckeditor5-font/src/fontsize'; +declare module '@ckeditor/ckeditor5-font/src/fontcolor'; +declare module '@ckeditor/ckeditor5-font/src/fontbackgroundcolor'; +declare module '@ckeditor/ckeditor5-horizontal-line/src/horizontalline'; +declare module '@ckeditor/ckeditor5-indent/src/indent'; +declare module '@ckeditor/ckeditor5-indent/src/indentblock'; +declare module '@ckeditor/ckeditor5-image/src/imageresize'; +declare module '@ckeditor/ckeditor5-table/src/tableproperties'; +declare module '@ckeditor/ckeditor5-table/src/tablecellproperties'; +declare module '@ckeditor/ckeditor5-build-classic/src/ckeditor'; +declare module '@ckeditor/ckeditor5-build-classic'; +declare module '@ckeditor/ckeditor5-essentials/src/essentials'; +declare module '@ckeditor/ckeditor5-basic-styles/src/bold'; +declare module '@ckeditor/ckeditor5-basic-styles/src/italic'; +declare module '@ckeditor/ckeditor5-link/src/link'; +declare module '@ckeditor/ckeditor5-paragraph/src/paragraph' +declare module '@ckeditor/ckeditor5-image/src/image' +declare module '@ckeditor/ckeditor5-image/src/imageupload'; +declare module '@ckeditor/ckeditor5-image/src/imagetoolbar'; +declare module '@ckeditor/ckeditor5-image/src/imagestyle'; +declare module '@ckeditor/ckeditor5-image/src/imagecaption'; +declare module '@ckeditor/ckeditor5-image/src/autoimage'; +declare module '@ckeditor/ckeditor5-code-block/src/codeblock' +declare module '@ckeditor/ckeditor5-clipboard/src/clipboard'; +declare module '@ckeditor/ckeditor5-clipboard/src/clipboardpipeline'; +declare module '@ckeditor/ckeditor5-paragraph/src/paragraphbuttonui'; +declare module '@ckeditor/ckeditor5-table/src/table'; +declare module '@ckeditor/ckeditor5-table/src/tableclipboard'; +declare module '@ckeditor/ckeditor5-table/src/tabletoolbar'; +declare module '@ckeditor/ckeditor5-table/src/tablecaption'; +declare module '@ckeditor/ckeditor5-table/src/tablecolumnresize'; +declare module '@ckeditor/ckeditor5-heading/src/heading'; +declare module '@ckeditor/ckeditor5-source-editing/src/sourceediting' +declare module '@ckeditor/ckeditor5-html-support/src/generalhtmlsupport' +declare module '@ckeditor/ckeditor5-inspector' +declare module '@ckeditor/ckeditor5-clipboard/src/dragdrop' +declare module '@/components/JournalComponents/EntryCellComponents/WYSIWYGCell/FlairPlugin/FlairPlugin' +declare module '@/components/JournalComponents/EntryCellComponents/WYSIWYGCell/EditorSavePlugin' +declare module '@/components/JournalComponents/EntryCellComponents/WYSIWYGCell/EditorCancelPlugin' +declare module '@/components/JournalComponents/EntryCellComponents/WYSIWYGCell/fileUploadPlugin/uploadPlugin' +declare module '@/components/JournalComponents/EntryCellComponents/WYSIWYGCell/fileUploadPlugin/imageUploadPlugin' +declare module '@ckeditor/ckeditor5-upload/src/filerepository' +declare module '@ckeditor/ckeditor5-upload/src/adapters/base64uploadadapter' diff --git a/src/shims-remixicon.d.ts b/src/shims-remixicon.d.ts new file mode 100644 index 0000000..59dcbf4 --- /dev/null +++ b/src/shims-remixicon.d.ts @@ -0,0 +1 @@ +declare module 'remixicon/fonts/remixicon.symbol.svg' \ No newline at end of file diff --git a/src/shims-tsx.d.ts b/src/shims-tsx.d.ts new file mode 100644 index 0000000..c656c68 --- /dev/null +++ b/src/shims-tsx.d.ts @@ -0,0 +1,13 @@ +import Vue, { VNode } from 'vue' + +declare global { + namespace JSX { + // tslint:disable no-empty-interface + interface Element extends VNode {} + // tslint:disable no-empty-interface + interface ElementClass extends Vue {} + interface IntrinsicElements { + [elem: string]: any + } + } +} diff --git a/src/shims-vee-validate.d.ts b/src/shims-vee-validate.d.ts new file mode 100644 index 0000000..14f04db --- /dev/null +++ b/src/shims-vee-validate.d.ts @@ -0,0 +1 @@ +declare module 'vee-validate/dist/vee-validate.full' diff --git a/src/shims-vue-matomo.d.ts b/src/shims-vue-matomo.d.ts new file mode 100644 index 0000000..eeb5ed7 --- /dev/null +++ b/src/shims-vue-matomo.d.ts @@ -0,0 +1,2 @@ +declare module 'vue-matomo' +declare module 'dompurify' \ No newline at end of file diff --git a/src/shims-vue-tabulator.d.ts b/src/shims-vue-tabulator.d.ts new file mode 100644 index 0000000..b87df47 --- /dev/null +++ b/src/shims-vue-tabulator.d.ts @@ -0,0 +1,2 @@ +declare module 'vue-tabulator' +declare module 'tabulator-tables' \ No newline at end of file diff --git a/src/shims-vue.d.ts b/src/shims-vue.d.ts new file mode 100644 index 0000000..d9f24fa --- /dev/null +++ b/src/shims-vue.d.ts @@ -0,0 +1,4 @@ +declare module '*.vue' { + import Vue from 'vue' + export default Vue +} diff --git a/src/shims-vuetify.d.ts b/src/shims-vuetify.d.ts new file mode 100644 index 0000000..9e73071 --- /dev/null +++ b/src/shims-vuetify.d.ts @@ -0,0 +1,4 @@ +declare module 'vuetify/lib/framework' { + import Vuetify from 'vuetify' + export default Vuetify +} diff --git a/src/storage/localForage.ts b/src/storage/localForage.ts new file mode 100644 index 0000000..77edee4 --- /dev/null +++ b/src/storage/localForage.ts @@ -0,0 +1,22 @@ +import localforage from 'localforage' + +export default () => ({ + + async getItem(key:any, callback:any) { + return localforage.getItem(key, callback) + }, + + async setItem (key:any, value:any, callback:any) { + return localforage.setItem(key, value, callback) + }, + async storageConfig(options:any ){ + return localforage.config(options) + }, + + async removeItem(key:any, callback:any){ + return localforage.removeItem(key, callback) + }, + async clearStorage(){ + return localforage.clear() + } +}); \ No newline at end of file diff --git a/src/store/index.ts b/src/store/index.ts new file mode 100755 index 0000000..a6f54b0 --- /dev/null +++ b/src/store/index.ts @@ -0,0 +1,66 @@ +// index.ts +import Vue from 'vue'; +import axios, { AxiosError } from 'axios'; +import Vuex, { StoreOptions } from 'vuex'; +import { RootState } from '@/store/types'; +import { user } from '@/store/modules/user/index' +import { team } from '@/store/modules/team/index' +import { admin } from '@/store/modules/admin/index' + +import { IRElements } from '@/store/modules/IRElements/index' + + +Vue.use(Vuex); + +const store: StoreOptions = { + state: { + version: '1.0.0', // a simple property + error: false, + errorText: '' + }, + mutations: { + clearError(state) { + state.error = false + state.errorText = "" + }, + errorOccurred(state, payload: AxiosError | Error) { + if (axios.isAxiosError(payload) && payload.response) { + state.error = true + if (payload.response.data.detail) { + let detail = payload.response.data.detail + if (Array.isArray(detail)) { + detail = detail[0] + } + if (detail.msg) { + state.errorText = "Error: " + detail.msg + ": " + detail.loc + } + else { + state.errorText = "Error: " + detail + } + } + else { + state.errorText = payload.response.data + } + } + else if (axios.isAxiosError(payload)) { + state.error = true + state.errorText = "Error connecting to server: " + payload.message + } + else { + console.error(payload) + } + }, + }, + getters: { + error(state) { return state.error }, + errorText(state) { return state.errorText } + }, + modules: { + user, + IRElements, + team, + admin + } +}; + +export default new Vuex.Store(store); \ No newline at end of file diff --git a/src/store/modules/IRElements/actions.ts b/src/store/modules/IRElements/actions.ts new file mode 100644 index 0000000..630d637 --- /dev/null +++ b/src/store/modules/IRElements/actions.ts @@ -0,0 +1,1070 @@ +import { ActionTree } from 'vuex'; +import { EntryClassEnum, IRElement, IRElementsListState, IRElementType, PermissionEnum } from './types'; +import { RootState } from '@/store/types'; +import Vue from 'vue'; +import { getParentEntryId } from '@/utils/treeUtils'; +import { Role } from '../user/types'; +import { Audit } from '../team/types'; +import axios from 'axios'; +import { default_incident_summary } from '@/constants' + + +export const actions: ActionTree = { + async retrieveElementList({ commit }, elementType: IRElementType): Promise { + try { + commit('beginRetrieveElements') + const resp = await Vue.prototype.$api.elements.retrieveElements(elementType) + commit('retrieveElementsSuccess', { "data": resp.data, "elementType": elementType }) + } + catch (e: any) { + if (!e.__CANCEL__) { + commit('errorOccurred', e, { root: true }) + } + commit('retrieveElementsFailure') + } + }, + + async retrieveElementListWithFilter({ commit, state }, { elementType, filterDict, abortController }): Promise { + try { + commit('beginRetrieveElements', state.ElementType == elementType) + if (abortController) { + state.ElementListAbortController = abortController + } + const resp = await Vue.prototype.$api.elements.retrieveElementsWithFilter(elementType, filterDict, state.ElementListAbortController) + commit('retrieveElementsSuccess', { "data": resp.data, "elementType": elementType }) + } + catch (e: any) { + if (!e.__CANCEL__) { + commit('errorOccurred', e, { root: true }) + } + commit('retrieveElementsFailure') + } + + }, + + async updateElementInList({ commit }, { elementId, elementType, updateData }) { + try { + const resp = await Vue.prototype.$api.elements.updateElementById(elementId, elementType, updateData) + commit('updateElementSuccess', { "elementId": elementId, "data": resp.data }) + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async deleteElement({ commit }, { elementId, elementType }) { + try { + const resp = await Vue.prototype.$api.elements.deleteElementById(elementId, elementType) + commit('deleteElementSuccess', { "elementId": elementId, "data": resp.data }) + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + + async deleteFile({ commit }, { fileId, targetId, targetType }) { + try { + const resp = await Vue.prototype.$api.elements.deleteFileById(fileId, targetId, targetType) + + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async undeleteElement({ commit }, { elementId, elementType, keep_id = true }) { + try { + const resp = await Vue.prototype.$api.elements.undeleteElementById(elementId, elementType, keep_id) + commit('undeleteElementSuccess', { "elementId": elementId, "data": resp.data }) + return true + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + return false + } + }, + + // Note that this does NOT add the element to the current element list, + // you will have to refresh the list elsewhere + async createElement({ commit }, { elementType, createData }): Promise { + try { + const resp = await Vue.prototype.$api.elements.createElement(elementType, createData) + if (resp && resp.data && elementType == IRElementType.Incident) { + // When creating an incident, make a default summary entry + const entryCreateOrUpdateAttributes: any = { + target_type: IRElementType.Incident, + target_id: resp.data.id, + entry_class: EntryClassEnum.summary, + entry_data: { "html": default_incident_summary } + } + await Vue.prototype.$api.elements.updateOrCreateEntry(-1, entryCreateOrUpdateAttributes) + } + return resp.data + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async retrieveLinkedSignatures({ commit }, { associatedSigGuideMap }): Promise { + try { + const payload: any = {} + const signaturesRetrieved = [] + for (const sigID of Object.keys(associatedSigGuideMap)) { + const resp = await Vue.prototype.$api.elements.retrieveElementbyID(sigID, IRElementType.Signature) + signaturesRetrieved.push(resp.data) + } + payload['data'] = signaturesRetrieved + payload['elementType'] = IRElementType.Signature + commit('retrieveLinkedElementsSuccess', payload) + } + + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async retrieveLinkedSignaturesById({ commit, state }, { elementType, elementId }) { + try { + const payload: any = {} + const signaturesRetrieved = await Vue.prototype.$api.elements.retrieveElementSignaturesByID(elementId, elementType, state.SelectedElementAbortController) + payload['data'] = signaturesRetrieved.data + payload['elementType'] = IRElementType.Signature + commit('retrieveLinkedElementsSuccess', payload) + } + + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async retrieveLinkedGuides({ commit }, { associatedSigGuideMap }): Promise { + + try { + const payload: any = {} + const guidesRetrieved: Array = [] + for (const guideArray of Object.values(associatedSigGuideMap as Record>)) { + for (const guideID of guideArray) { + const resp = await Vue.prototype.$api.elements.retrieveElementbyID(guideID, IRElementType.Guide) + guidesRetrieved.push(resp.data) + } + } + payload['data'] = guidesRetrieved + payload['elementType'] = IRElementType.Guide + commit('retrieveLinkedElementsSuccess', payload) + } + + catch (e: any) { + commit('errorOccurred', e, { root: true }) + + } + }, + + async retrieveLinkedElementEntries({ commit }, { linkedElementId, linkedElementIndex, linkedElementType }): Promise { + + try { + const payload: any = {} + const resp = await Vue.prototype.$api.elements.retrieveElementEntriesbyID(linkedElementId, linkedElementType) + const respEntity = await Vue.prototype.$api.elements.retrieveElementEntitiesbyID(linkedElementId, linkedElementType) + payload["elementType"] = linkedElementType + payload["index"] = linkedElementIndex + payload["data"] = resp.data + commit('augmentElementEntities', { "data": respEntity.data }) + commit('retrieveLinkedElementsSuccess', { "data": respEntity.data.result, "elementType": IRElementType.Entity }) + commit('retrieveLinkedElementEntriesSuccess', payload) + } + + catch (e: any) { + commit('errorOccurred', e, { root: true }) + + } + }, + + async updateLinkedElement({ commit }, { updateData, linkedElementId, linkedElementIndex, linkedElementType }) { + try { + const resp = await Vue.prototype.$api.elements.updateElementById(linkedElementId, linkedElementType, updateData) + commit("updateLinkedElementSuccess", { payload: resp.data, linkedElementIndex, linkedElementId, linkedElementType }) + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async retrieveElementEntriesbyID({ commit }, { elementID, elementType }): Promise { + try { + const entryResp = await Vue.prototype.$api.elements.retrieveElementEntriesbyID(elementID, elementType) + commit('retrieveElementEntriesbyIDSuccess', { "data": entryResp.data, "elementType": elementType }) + // Check to see if we have any unsubmitted (still being edited) entries for this element + const unsumbittedEditedEntry = await Vue.prototype.$storage.getItem('unsubmittedEditorEntry:' + elementType + ':' + elementID) + if (unsumbittedEditedEntry != null) { + if (unsumbittedEditedEntry == -1) { + // since this is unsubmitted, we know the entryId will be -1 + const editorEntryContent = await Vue.prototype.$storage.getItem('editorContent' + ':' + elementType + ':' + elementID + ':' + '-1') + commit('addNewEntryWithEditModeOn', editorEntryContent) + + } + else { + // There is an unsubitted already existing entry + const entryData = entryResp.data.result.find((entry: any) => entry.id === unsumbittedEditedEntry).entry_data + const editorEntryContent = await Vue.prototype.$storage.getItem('editorContent' + ':' + elementType + ':' + elementID + ':' + String(unsumbittedEditedEntry)) + editorEntryContent['entryId'] = unsumbittedEditedEntry + editorEntryContent['server_entry_data'] = entryData + await Vue.prototype.$storage.setItem('editorContent' + ':' + elementType + ':' + elementID + ':' + String(unsumbittedEditedEntry), editorEntryContent) + + commit('restoreCachedExistingEntryEditor', editorEntryContent) + } + } + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async reRetrieveElementInList({ commit, state }, { elementID, elementType }) { + try { + if (state.ElementType?.toLowerCase() != elementType.toLowerCase()) { + return false + } + let resp = null + // Do full retrieval (including updating view count) if item is currently selected + if (elementID == state.SelectedElement?.id) { + resp = await Vue.prototype.$api.elements.retrieveElementbyID(elementID, elementType, state.SelectedElementAbortController) + } + // Otherwise only do list retrieval + else { + resp = await Vue.prototype.$api.elements.retrieveElementsWithFilter(elementType, { "id": elementID, "limit": 1 }) + if (!resp.data?.result || resp.data.result?.length == 0) { + return false + } + resp.data = resp.data.result[0] + } + if (elementID == state.SelectedElement?.id) { + commit('retrieveElementbyIDSuccess', { "data": resp.data, "elementType": elementType }) + } + commit('updateElementSuccess', { "elementId": elementID, "data": resp.data }) + return true + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + return false + } + }, + + async retrieveSelectedElementbyID({ commit, state }, { elementID, elementType }): Promise { + try { + commit('retrieveNewSelectedElement', { elementID, elementType }) + const resp = await Vue.prototype.$api.elements.retrieveElementbyID(elementID, elementType, state.SelectedElementAbortController) + commit('retrieveElementbyIDSuccess', { "data": resp.data, "elementType": elementType }) + if (elementType == IRElementType.Entity && !state.SelectedElementAbortController?.signal.aborted) + { + const respEntity = await Vue.prototype.$api.elements.retrieveEntityAppearancesbyID(elementID, { limit: 25 }, state.SelectedElementAbortController) + commit('retrieveEntityAppearancesSuccess', {entityAppearances: respEntity.data}) + const respEntityPivot = await Vue.prototype.$api.elements.retrieveEntityPivotsbyID(elementID, state.SelectedElementAbortController) + commit('retrieveEntityPivotsSuccess', {entityAppearances: respEntityPivot.data.result}) + const respEntityEnrichment = await Vue.prototype.$api.elements.retrieveEntityEnrichmentsbyID(elementID, state.SelectedElementAbortController) + commit('retrieveEntityEnrichmentsSuccess', {entityAppearances: respEntityEnrichment.data.result}) + + } + + if (elementType != IRElementType.Alertgroup && elementType != IRElementType.Alert && elementType != IRElementType.Pivot && elementType != IRElementType.EntityClass && !state.SelectedElementAbortController?.signal.aborted) { + + // This an entry-based IR Element get the entries as well here. + + try { + const entryResp = await Vue.prototype.$api.elements.retrieveElementEntriesbyID(elementID, elementType, state.SelectedElementAbortController) + commit('retrieveElementEntriesbyIDSuccess', { "data": entryResp.data, "elementType": elementType }) + // Check to see if we have any unsubmitted (still being edited) entries for this element + const unsubmittedEditedEntry = await Vue.prototype.$storage.getItem('unsubmittedEditorEntry:' + elementType + ':' + elementID) + + if (unsubmittedEditedEntry != null) { + if (unsubmittedEditedEntry == -1) { + // since this is unsubmitted, we know the entryId will be -1 + const editorEntryContent = await Vue.prototype.$storage.getItem('editorContent' + ':' + elementType + ':' + elementID + ':' + '-1') + commit('addNewEntryWithEditModeOn', editorEntryContent) + } + else { + // There is an unsubitted already existing entry + const entry = entryResp.data.result.find((entry: any) => entry.id === unsubmittedEditedEntry) + if (entry && 'entry_data' in entry) { + + const entryData = entry.entry_data + const editorEntryContent = await Vue.prototype.$storage.getItem('editorContent' + + ':' + elementType + ':' + elementID + ':' + String(unsubmittedEditedEntry)) + editorEntryContent['entryId'] = unsubmittedEditedEntry + editorEntryContent['server_entry_data'] = entryData + const a = await Vue.prototype.$storage.setItem('editorContent' + + ':' + elementType + ':' + elementID + ':' + String(unsubmittedEditedEntry), editorEntryContent) + const t = await Vue.prototype.$storage.getItem('editorContent' + + ':' + elementType + ':' + elementID + ':' + String(unsubmittedEditedEntry)) + commit('restoreCachedExistingEntryEditor', editorEntryContent) + } + } + } + } + catch (e: any) { + if (!e.__CANCEL__) { + commit('errorOccurred', e, { root: true }) + } + return false + } + } + } + catch (e: any) { + if (!e.__CANCEL__) { + commit('errorOccurred', e, { root: true }) + commit('retrieveSelectedElementFailure') + } + return false + } + return true + }, + + async retrieveElementPermissions({ commit, state }, { elementID, elementType }): Promise<{ [key in PermissionEnum]?: Array }> { + try { + const resp = await Vue.prototype.$api.elements.retrieveElementPermissions(elementID, elementType, state.SelectedElementAbortController) + if (state.SelectedElement?.id == elementID && state.SelectedElement?.ElementType == elementType) { + commit('selectedElementPermissionsLoaded', resp.data) + } + return resp.data + } + catch (e: any) { + if (!e.__CANCEL__) { + commit('errorOccurred', e, { root: true }) + } + return {} + } + }, + + + async reflairSelectedElementbyID({ commit, state }, { elementID, elementType }): Promise { + try { + const resp = await Vue.prototype.$api.elements.reflairSelectedElementById(elementID, elementType, state.SelectedElementAbortController) + } + catch (e: any) { + if (!e.__CANCEL__) { + commit('errorOccurred', e, { root: true }) + } + return {} + } + }, + + async retrieveElementHistory({ commit, state }, { elementID, elementType }): Promise> { + try { + const resp = await Vue.prototype.$api.elements.retrieveElementHistory(elementID, elementType, state.SelectedElementAbortController) + if (state.SelectedElement?.id == elementID && state.SelectedElement?.ElementType == elementType) { + commit('selectedElementHistoryLoaded', resp.data) + } + return resp.data + } + catch (e: any) { + if (!e.__CANCEL__) { + commit('errorOccurred', e, { root: true }) + } + return [] + } + }, + + async setElementPermissions({ commit }, { elementID, elementType, permissions }): Promise { + try { + const newPermissions: any = {} + // Translate newPermissions to only use role ids and not full roles (if given) + for (const permissionType in permissions) { + newPermissions[permissionType] = permissions[permissionType].map((r: Role) => r.id) + } + await Vue.prototype.$api.elements.setElementPermissions(elementID, elementType, newPermissions) + return true + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + return false + } + }, + + async addFlairedEntity({ commit }, { entity }): Promise { + commit('addFlairedEntitySuccess', { entity: entity}) + const respEntity = await Vue.prototype.$api.elements.retrieveEntityAppearancesbyID(entity.id, { limit: 25 }) + commit('addFlairedEntityAppearancesSuccess', { entity: entity, entityAppearances: respEntity.data }) + const respEntityPivot = await Vue.prototype.$api.elements.retrieveEntityPivotsbyID(entity.id) + const respEntityEnrichment = await Vue.prototype.$api.elements.retrieveEntityEnrichmentsbyID(entity.id) + commit('addFlairedEntityPivotsAndEnrichmentsSuccess', {entity:entity, entityPivots: respEntityPivot.data.result, entityEnrichments: respEntityEnrichment.data }) + }, + + + async resetFlairedEnrichmentsAndPivotsValue( { commit }): Promise{ + commit('resetFlairedEnrichmentsAndPivotsEvent') + }, + + async retrieveEntityAppearancesbyID({ commit }, { entity }): Promise{ + const respEntity = await Vue.prototype.$api.elements.retrieveEntityAppearancesbyID(entity.id, { limit: 25 }) + commit('retrieveEntityAppearancesSuccess', {entity: entity, entityAppearances: respEntity.data}) + }, + + async editEntryModeOn({ commit }, { entryId, treePath, linkedElementType, linkedElementIndex }): Promise { + commit('changeEntryToEditMode', { "entryId": entryId, "treePath": treePath, "linkedElementType": linkedElementType, "linkedElementIndex": linkedElementIndex }) + }, + + async retrieveSelectedElementEntitiesbyID({ commit, state }, { elementID, elementType }): Promise { + // Let's get the entities for the element as well + try { + commit('entitiesLoading') + const respEntity = await Vue.prototype.$api.elements.retrieveElementEntitiesbyID(elementID, elementType, state.SelectedElementAbortController) + commit('retrieveElementEntitiesbyIDSuccess', { "data": respEntity.data, "elementType": elementType }) + commit('retrieveLinkedElementsSuccess', { "data": respEntity.data.result, "elementType": IRElementType.Entity }) + commit('entitiesLoaded') + } + catch (e: any) { + if (!e.__CANCEL__) { + commit('errorOccurred', e, { root: true }) + } + commit('entitiesLoaded', true) + } + }, + + async retrieveSelectedElementFilesbyID({ commit, state }, { elementID, elementType }): Promise { + // Let's get the entities for the element as well + if (state.SelectedElement?.ElementType == elementType && state.SelectedElement?.id == elementID) + { + const respEntity = await Vue.prototype.$api.elements.retrieveElementFilesbyID(elementID, elementType) + commit('retrieveElementFilesbyIDSuccess', { "data": respEntity.data, "elementType": elementType }) + } + + }, + + async augmentSelectedElementEntries({ commit, state }, { entryID }): Promise { + // Grab an entry and add it to the list of this element's entries (or update an existing entry) + try { + const respEntry = await Vue.prototype.$api.elements.retrieveElementbyID(entryID, IRElementType.Entry, state.SelectedElementAbortController) + commit('augmentElementEntries', { "data": respEntry.data }) + } + catch (e: any) { + if (!e.__CANCEL__) { + commit('errorOccurred', e, { root: true }) + } + } + }, + + async augmentLinkedElementEntries({ commit }, { entryID, linkedElementId,linkedElementType, linkedElementIndex }): Promise { + // Grab an entry and add it to the list of this element's entries (or update an existing entry) + try { + const respEntry = await Vue.prototype.$api.elements.retrieveElementbyID(entryID, IRElementType.Entry) + commit('augmentElementEntries', { "data": respEntry.data, linkedElementId, linkedElementType, linkedElementIndex }) + } + catch (e: any) { + if (!e.__CANCEL__) { + commit('errorOccurred', e, { root: true }) + } + } + }, + + async augmentSelectedElementEntities({ commit, state }, { elementID, elementType, showLoading = true }): Promise { + // Get entities for a given element and add them to the selected item's entities + // Used to add entities out of promoted entries + try { + if (showLoading) { + commit('entitiesLoading') + } + const respEntity = await Vue.prototype.$api.elements.retrieveElementEntitiesbyID(elementID, elementType, state.SelectedElementAbortController) + commit('augmentElementEntities', { "data": respEntity.data }) + commit('retrieveLinkedElementsSuccess', { "data": respEntity.data.result, "elementType": IRElementType.Entity }) + if (showLoading) { + commit('entitiesLoaded') + } + } + catch (e: any) { + if (!e.__CANCEL__) { + commit('errorOccurred', e, { root: true }) + } + if (showLoading) { + commit('entitiesLoaded', true) + } + } + }, + + async augmentSelectedElementEntitiesById({ commit, state }, { entityIds, showLoading = true }): Promise { + // Get the given entites and add them to the select element's entity list + try { + if (showLoading) { + commit('entitiesLoading') + } + const respEntity = await Vue.prototype.$api.elements.retrieveElementsWithFilter(IRElementType.Entity, { 'id': entityIds }, state.SelectedElementAbortController) + commit('augmentElementEntities', { "data": respEntity.data }) + commit('retrieveLinkedElementsSuccess', { "data": respEntity.data.result, "elementType": IRElementType.Entity }) + if (showLoading) { + commit('entitiesLoaded') + } + } + catch (e: any) { + if (!e.__CANCEL__) { + commit('errorOccurred', e, { root: true }) + } + if (showLoading) { + commit('entitiesLoaded', true) + } + } + }, + + async createNewEntityFromText({ commit }, {entityText, entityType, createEntityRegex }) { + try { + const extraBody = {'create_flair_regex': createEntityRegex} + const entityBody = {'value': entityText, 'type_name': entityType} + const respEntity = await Vue.prototype.$api.elements.createElement(IRElementType.Entity, entityBody, extraBody ) + commit('entitiesLoaded', true) + } + catch (e: any) { + commit('entitiesLoaded', true) + } + }, + + async toggleExpandEntry({ commit }, { entryId, treePath, linkedElementType, linkedElementIndex }): Promise { + commit('toggleExpandEntry', { "entryId": entryId, "treePath": treePath, "linkedElementType": linkedElementType, "linkedElementIndex": linkedElementIndex }) + }, + + async toggleCollapseEntry({ commit }, { entryId, treePath, linkedElementType, linkedElementIndex }): Promise { + commit('toggleCollapseEntry', { "entryId": entryId, "treePath": treePath, "linkedElementType": linkedElementType, "linkedElementIndex": linkedElementIndex }) + }, + + async editEntryModeOff({ commit }, { entryId, elementId, elementType, linkedElementId, linkedElementType, linkedElementIndex, treePath }): Promise { + if (linkedElementId == null && linkedElementIndex == null && linkedElementType == null) { + if (entryId < 0) { + commit('removeEntrySuccess', { "entryId": entryId, "treePath": treePath }) + await Vue.prototype.$storage.removeItem('editorContent' + ':' + elementType + ':' + elementId + ':' + entryId) + await Vue.prototype.$storage.removeItem('unsubmittedEditorEntry:' + elementType + ':' + elementId) + } + else { + const editorEntryContent = await Vue.prototype.$storage.getItem('editorContent' + ':' + elementType + ':' + elementId + ':' + entryId) + await Vue.prototype.$storage.removeItem('editorContent' + ':' + elementType + ':' + elementId + ':' + entryId) + await Vue.prototype.$storage.removeItem('unsubmittedEditorEntry:' + elementType + ':' + elementId) + if (editorEntryContent != null && editorEntryContent['server_entry_data'] != null) { + //We need to revert the entry_data back to this value here + commit('changeEntryToViewMode', { "entryId": entryId, "treePath": treePath, "entry_data": editorEntryContent["server_entry_data"] }) + + } + else { + commit('changeEntryToViewMode', { "entryId": entryId, "treePath": treePath, "entry_data": null }) + } + } + } + else { + if (entryId < 0) { + commit('removeEntrySuccess', { "entryId": entryId, "linkedElementType": linkedElementType, "linkedElementIndex": linkedElementIndex, "linkedElementId": linkedElementId }) + await Vue.prototype.$storage.removeItem('editorContent' + ':' + linkedElementType + ':' + linkedElementId + ':' + entryId) + await Vue.prototype.$storage.removeItem('unsubmittedEditorEntry:' + linkedElementType + ':' + linkedElementId) + } + else { + const editorEntryContent = await Vue.prototype.$storage.getItem('editorContent' + ':' + linkedElementType + ':' + linkedElementId + ':' + entryId) + await Vue.prototype.$storage.removeItem('editorContent' + ':' + linkedElementType + ':' + linkedElementId + ':' + entryId) + await Vue.prototype.$storage.removeItem('unsubmittedEditorEntry:' + linkedElementType + ':' + linkedElementId) + if (editorEntryContent != null && editorEntryContent['server_entry_data'] != null) { + //We need to revert the entry_data back to this value here + commit('changeEntryToViewMode', { + "entryId": entryId, "entry_data": editorEntryContent["server_entry_data"], + "linkedElementType": linkedElementType, "linkedElementIndex": linkedElementIndex, "linkedElementId": linkedElementId + }) + + } + else { + commit('changeEntryToViewMode', { + "entryId": entryId, "entry_data": null, + "linkedElementType": linkedElementType, "linkedElementIndex": linkedElementIndex, "linkedElementId": linkedElementId + }) + } + } + } + }, + async addNewEntryWithEditModeOn({ commit }, { newEntryPayload, linkedElementId, linkedElementType, linkedElementIndex, treePath, parentEntryId }): Promise { + newEntryPayload["linkedElementId"] = linkedElementId + newEntryPayload["linkedElementType"] = linkedElementType + newEntryPayload["linkedElementIndex"] = linkedElementIndex + newEntryPayload["treePath"] = treePath + newEntryPayload["parentEntryId"] = parentEntryId + commit('addNewEntryWithEditModeOn', newEntryPayload) + + }, + + + async modifySelectedAlertIds({ commit }, { alertIds }): Promise { + // Only changes the list of "selected alert ids" i.e. what alert rows the analyst selected. + // not anything about the alerts themselves + commit('setSelectedAlertIds', alertIds) + }, + + async modifySelectedAlertStatus({ commit }, { selectedAlertIds, newStatus }): Promise { + try { + for (const alertID of selectedAlertIds) { + const resp = await Vue.prototype.$api.elements.changeElementStatus(alertID, IRElementType.Alert, newStatus) + commit('updateSelectedElementAlertStatus', { "data": resp.data }) + } + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + + }, + + + async promoteSelectedAlerts({ commit }, { selectedAlertIds, newSources, newTags }): Promise { + try { + const resp = await Vue.prototype.$api.elements.promoteElements(selectedAlertIds, IRElementType.Alert, newTags, newSources) + commit('promoteAlertsSuccessful', { "promotedAlerts": selectedAlertIds, "data": resp.data }) + return resp.data + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + async promoteSelectedAlertsToExisting({ commit }, { selectedAlertIds, existingEventId, newTags, newSources }): Promise { + try { + const resp = await Vue.prototype.$api.elements.promoteElementsToExisting(selectedAlertIds, IRElementType.Alert, existingEventId, newTags, newSources) + commit('promoteAlertsSuccessful', { "promotedAlerts": selectedAlertIds, "data": resp.data }) + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async promoteElements({ commit }, { elementType, elementIds, newTags, newSources }): Promise { + try { + const resp = await Vue.prototype.$api.elements.promoteElements(elementIds, elementType, newTags, newSources) + // This always promotes an event to a new incident, so create default incident summary + if (resp && elementType == IRElementType.Event) { + const entryCreateOrUpdateAttributes: any = { + target_type: IRElementType.Incident, + target_id: resp.data.id, + entry_class: EntryClassEnum.summary, + entry_data: { "html": default_incident_summary } + } + await Vue.prototype.$api.elements.updateOrCreateEntry(-1, entryCreateOrUpdateAttributes) + } + commit('promoteElementsSuccess', { "promotedIds": elementIds, "promotedType": elementType, "newObject": resp.data }) + return resp.data + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + return null + } + }, + + async cacheEditorContent({ commit }, { editorContent, entryId, elementId, elementType, entryType, owner, tlp, linkedElementId, linkedElementType, linkedElementIndex, treePath }): Promise { + if (linkedElementId == null && linkedElementIndex == null && linkedElementType == null) { + try { + const editorCacheObj: any = { entryData: { html: editorContent }, server_entry_data: null, IRElementType: elementType, IRElementTypeId: elementId, EntryClassEnum: entryType, owner: owner, TLPCode: tlp, treePath: treePath } + + const existingCache = await Vue.prototype.$storage.getItem('editorContent' + ':' + elementType + ':' + elementId + ':' + entryId) + if (existingCache && existingCache['server_entry_data']) { + editorCacheObj['server_entry_data'] = existingCache['server_entry_data'] + + } + await Vue.prototype.$storage.setItem('editorContent' + ':' + elementType + ':' + elementId + ':' + entryId, editorCacheObj) + await Vue.prototype.$storage.setItem('unsubmittedEditorEntry:' + elementType + ':' + elementId, entryId) + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + } + else { + + try { + const editorCacheObj = { entryData: { html: editorContent }, IRElementType: linkedElementType, IRElementTypeId: linkedElementId, EntryClassEnum: entryType, owner: owner, TLPCode: tlp } + + Vue.prototype.$storage.setItem('editorContent' + ':' + linkedElementType + ':' + linkedElementId + ':' + entryId, editorCacheObj) + Vue.prototype.$storage.setItem('unsubmittedEditorEntry:' + linkedElementType + ':' + linkedElementId, entryId) + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + } + }, + + async retrieveCachedEditorContent({ commit }, { entryId, elementId, elementType, linkedElementId, linkedElementType, linkedElementIndex }): Promise { + if (linkedElementId == null && linkedElementIndex == null && linkedElementType == null) { + try { + const editorContent = await Vue.prototype.$storage.getItem('editorContent' + ':' + elementType + ':' + elementId + ':' + entryId) + return editorContent + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + } + else { + try { + const editorContent = await Vue.prototype.$storage.getItem('editorContent' + ':' + linkedElementType + ':' + linkedElementId + ':' + entryId) + return editorContent + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + } + + }, + + async updateOrCreateEntryContent({ commit, rootState }, { entryId, entryType, elementId, elementType, entryOwner, entryContent, linkedElementId, linkedElementType, linkedElementIndex, treePath }): Promise { + if (linkedElementId == null && linkedElementIndex == null && linkedElementType == null) { + try { + if (entryId == -1) { + const newEntryType = entryType ? EntryClassEnum[entryType as keyof typeof EntryClassEnum] : EntryClassEnum.entry + // This is a create + const entryCreateOrUpdateAttributes = { + owner: entryOwner, + target_type: elementType, + target_id: elementId, + entry_class: newEntryType, + entry_data: entryContent, + parent_entry_id: getParentEntryId(treePath) + } + commit('changeEntryToLoading', { "entryId": entryId, "treePath": treePath }) + const resp = await Vue.prototype.$api.elements.updateOrCreateEntry(entryId, entryCreateOrUpdateAttributes) + commit('removeEntrySuccess', { "entryId": entryId, "treePath": treePath }) + await Vue.prototype.$storage.removeItem('editorContent' + ':' + elementType + ':' + elementId + ':' + entryId) + await Vue.prototype.$storage.removeItem('unsubmittedEditorEntry:' + elementType + ':' + elementId) + resp.data['treePath'] = treePath + commit('updateOrCreateEntrySuccess', resp.data) + + } + else { + // Don't change entry type if not given, also don't change entry owner from this function + const modifyEntryType = entryType ? EntryClassEnum[entryType as keyof typeof EntryClassEnum] : undefined + const entryCreateOrUpdateAttributes = { + target_type: elementType, + target_id: elementId, + entry_class: modifyEntryType, + entry_data: entryContent, + parent_entry_id: getParentEntryId(treePath) + } + const resp = await Vue.prototype.$api.elements.updateOrCreateEntry(entryId, entryCreateOrUpdateAttributes) + await Vue.prototype.$storage.removeItem('editorContent' + ':' + elementType + ':' + elementId + ':' + entryId) + await Vue.prototype.$storage.removeItem('unsubmittedEditorEntry:' + elementType + ':' + elementId) + resp.data['treePath'] = treePath + commit('updateOrCreateEntrySuccess', resp.data) + } + return true + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + commit('changeEntryToEditMode', { "entryId": entryId, "treePath": treePath }) + if (axios.isAxiosError(e) && e.response?.status == 404) { + rootState.errorText += ", it may have been deleted while you were editing it" + } + return false + } + } + else { + try { + if (entryId == -1) { + const newEntryType = entryType ? EntryClassEnum[entryType as keyof typeof EntryClassEnum] : EntryClassEnum.entry + // This is a create + const entryCreateOrUpdateAttributes = { + owner: entryOwner, + target_type: linkedElementType, + target_id: linkedElementId, + entry_class: newEntryType, + entry_data: entryContent, + parent_entry_id: getParentEntryId(treePath) + } + const resp = await Vue.prototype.$api.elements.updateOrCreateEntry(entryId, entryCreateOrUpdateAttributes) + commit('removeEntrySuccess', { "entryId": entryId, "linkedElementType": linkedElementType, "linkedElementIndex": linkedElementIndex, "linkedElementId": linkedElementId, "treePath": treePath }) + await Vue.prototype.$storage.removeItem('editorContent' + ':' + linkedElementType + ':' + linkedElementId + ':' + entryId) + await Vue.prototype.$storage.removeItem('unsubmittedEditorEntry:' + linkedElementType + ':' + linkedElementId) + resp.data['linkedElementType'] = linkedElementType + resp.data['linkedElementId'] = linkedElementId + resp.data['linkedElementIndex'] = linkedElementIndex + resp.data['treePath'] = treePath + commit('updateOrCreateEntrySuccess', resp.data) + + } + else { + // Don't change entry type if not given, also don't change entry owner from this function + const modifyEntryType = entryType ? EntryClassEnum[entryType as keyof typeof EntryClassEnum] : undefined + const entryCreateOrUpdateAttributes = { + target_type: linkedElementType, + target_id: linkedElementId, + entry_class: modifyEntryType, + entry_data: entryContent, + parent_entry_id: getParentEntryId(treePath) + } + const resp = await Vue.prototype.$api.elements.updateOrCreateEntry(entryId, entryCreateOrUpdateAttributes) + await Vue.prototype.$storage.removeItem('editorContent' + ':' + linkedElementType + ':' + linkedElementId + ':' + entryId) + await Vue.prototype.$storage.removeItem('unsubmittedEditorEntry:' + linkedElementType + ':' + linkedElementId) + resp.data['linkedElementType'] = linkedElementType + resp.data['linkedElementId'] = linkedElementId + resp.data['linkedElementIndex'] = linkedElementIndex + resp.data['treePath'] = treePath + commit('updateOrCreateEntrySuccess', resp.data) + } + return true + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + if (axios.isAxiosError(e) && e.response?.status == 404) { + rootState.errorText += ", it may have been deleted while you were editing it" + } + return false + } + } + }, + + async updateEntryAttributes({ commit }, { entryId, updateData, linkedElementId, linkedElementType, linkedElementIndex, treePath }) { + try { + const resp = await await Vue.prototype.$api.elements.updateOrCreateEntry(entryId, updateData) + if (linkedElementId != null || linkedElementIndex != null || linkedElementType != null) { + resp.data['linkedElementType'] = linkedElementType + resp.data['linkedElementId'] = linkedElementId + resp.data['linkedElementIndex'] = linkedElementIndex + } + resp.data['treePath'] = treePath + commit('updateOrCreateEntrySuccess', resp.data) + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async setElementPaneHeight({ commit }, { paneHeight }): Promise { + commit('setElementPaneHeight', paneHeight) + }, + async setSelectedElementSize({ commit }, newSize): Promise { + commit('setSelectedElementSize', newSize) + }, + async clearSelectedElementFlair({ commit }): Promise { + commit('clearSelectedElementFlair') + }, + async clearSelectedElement({ commit }): Promise { + commit('clearSelectedElement') + commit('setSelectedElementSize', 0) + }, + + async flairDialogSetToTrue({ commit }): Promise { + commit('flairDialogChange', true) + }, + + async flairDialogSetToFalse({ commit }): Promise { + commit('flairDialogChange', false) + }, + + async removeFlairedEntity( { commit }, {entity}): Promise { + commit('removeFlairedEntity', entity) + }, + + async submitFile({ commit }, {formData, targetType, targetId}): Promise{ + try{ + const resp = await Vue.prototype.$api.elements.submitFile(formData, targetType, targetId) + if (resp) { + return true + } + return false + } + catch(e:any){ + commit('errorOccurred', e, { root: true }) + return false + } + }, + + + + async openFlairMenu({ commit }, { menuX, menuY, menuEntity }): Promise { + commit('setFlairMenuPosition', { x: menuX, y: menuY }) + commit('setFlairMenuVisible', true) + commit('setFlairMenuEntity', menuEntity) + }, + + async closeFlairMenu({ commit }) { + commit('setFlairMenuVisible', false) + commit('setFlairMenuEntity', null) + }, + + async retrieveTags({ commit }, filterDict): Promise { + try { + const resp = await Vue.prototype.$api.elements.retrieveTags(filterDict) + commit('retrieveTagsSuccess', resp.data) + return resp.data.result + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async retrieveAllEntityClasses({ commit }): Promise { + try { + const resp = await Vue.prototype.$api.elements.retrieveAllEntityClasses() + commit('retrieveAllEntityClassesSuccess', resp.data) + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async updateEntityClassDescription({ commit }, {entityClassId, entityId, newDescription}): Promise { + try{ + const resp = await Vue.prototype.$api.elements.updateEntityClassDescriptionById(entityClassId, {description:newDescription}) + commit('updateEntityClassDescriptionSuccess', resp.data) + } + catch(e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async retrieveSources({ commit }, filterDict): Promise { + try { + const resp = await Vue.prototype.$api.elements.retrieveSources(filterDict) + commit('retrieveSourcesSuccess', resp.data) + return resp.data.result + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + + async submitTagsOrSources({ commit }, { newTagsOrSources, type, targetElementId, targetElementType }): Promise { + try { + for (const tagOrSource of newTagsOrSources) { + let resp = null + if (type == "tag") { + const addTagBody: any = { + target_type: targetElementType, + tag_name: tagOrSource, + tag_description: "", + target_id: targetElementId, + } + resp = await Vue.prototype.$api.elements.addTag(addTagBody) + } + else { + const addSourceBody: any = { + target_type: targetElementType, + source_name: tagOrSource, + source_description: "", + target_id: targetElementId, + } + resp = await Vue.prototype.$api.elements.addSource(addSourceBody) + + } + commit('addTagOrSourceSuccess', { newTagOrSource: resp.data, type: type, targetElementId, targetElementType }) + } + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + + async submitEntityClasses({ commit }, { newEntityClasses, targetEntityId}): Promise { + try { + let resp = null + resp = await Vue.prototype.$api.elements.addEntityClass(targetEntityId, newEntityClasses) + commit('addEntityClassesSuccess', resp.data) + } + + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async attachEntityClassesToPivot({ commit }, { pivotId, entityClasses}): Promise { + try { + let resp = null + resp = await Vue.prototype.$api.elements.submitPivotEntityClasses(pivotId, entityClasses) + commit('retrieveElementbyIDSuccess', { "data": resp.data, "elementType": IRElementType.Pivot }) + + } + + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async attachEntityTypesToPivot({ commit }, { pivotId, entityTypes}): Promise { + try { + let resp = null + resp = await Vue.prototype.$api.elements.submitPivotEntityTypes(pivotId, entityTypes) + commit('retrieveElementbyIDSuccess', { "data": resp.data, "elementType": IRElementType.Pivot }) + + } + + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async removeEntityClasses({ commit }, { entityClassId, targetEntityId}): Promise { + try { + let resp = null + resp = await Vue.prototype.$api.elements.removeEntityClass(targetEntityId, [entityClassId]) + commit('removeEntityClassesSuccess', resp.data) + } + + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async unAssignTagOrSourceDescription({ commit }, { id, type, targetElementType, targetElementId }): Promise { + try { + let resp = null + const removeBody: any = { + target_type: targetElementType, + target_id: targetElementId, + } + + if (type == "tag") { + resp = await Vue.prototype.$api.elements.removeTag(id, removeBody) + resp.data['type'] = "tag" + } + else { + + resp = await Vue.prototype.$api.elements.removeSource(id, removeBody) + resp.data['type'] = "source" + } + commit('unAssignTagOrSourceSuccess', { ...resp.data, targetElementType, targetElementId }) + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + async updateTagOrSourceDescription({ commit }, { id, type, description }): Promise { + try { + let resp = null + if (type == "tag") { + resp = await Vue.prototype.$api.elements.updateTag(id, { description: description }) + } + else { + resp = await Vue.prototype.$api.elements.updateSource(id, { description: description }) + + } + commit('updateTagOrSourceDescriptionSuccess', resp.data) + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, + + + async removeEntryByID({ commit }, { entryId, treePath, linkedElementId, linkedElementType, linkedElementIndex }): Promise { + try { + if (linkedElementId == null && linkedElementIndex == null && linkedElementType == null) { + const resp = await Vue.prototype.$api.elements.deleteEntryByID(entryId) + commit('removeEntrySuccess', { "entryId": entryId, "treePath": treePath, "linkedElementType": linkedElementType, "linkedElementIndex": linkedElementIndex, "linkedElementId": linkedElementId }) + } + else { + const resp = await Vue.prototype.$api.elements.deleteEntryByID(entryId) + commit('removeEntrySuccess', { "entryId": entryId, "linkedElementType": linkedElementType, "linkedElementIndex": linkedElementIndex, "linkedElementId": linkedElementId, "treePath": treePath }) + } + } + catch(e: any) { + if (axios.isAxiosError(e) && e.response?.status == 404) { + commit('removeEntrySuccess', { "entryId": entryId, "treePath": treePath, "linkedElementType": linkedElementType, "linkedElementIndex": linkedElementIndex, "linkedElementId": linkedElementId }) + } + commit('errorOccurred', e, { root: true }) + } + }, + + async deleteLinksBetweenElements({ commit }, { elementType0, elementId0, elementType1, elementId1, bidirectional }) { + try { + const resp = await Vue.prototype.$api.elements.deleteLinksBetweenElements(elementType0, elementId0, elementType1, elementId1, bidirectional) + commit('unlinkElementsSuccess', resp.data) + } + catch (e: any) { + commit('errorOccurred', e, { root: true }) + } + }, +}; \ No newline at end of file diff --git a/src/store/modules/IRElements/getters.ts b/src/store/modules/IRElements/getters.ts new file mode 100644 index 0000000..5f64eb0 --- /dev/null +++ b/src/store/modules/IRElements/getters.ts @@ -0,0 +1,738 @@ +import Vuetify from '@/plugins/vuetify' +import { GetterTree } from 'vuex'; +import { IRElement, IRElementMeta, IRElementsListState, IRElementType, LinkedElement, ScotFile, PermissionEnum, Entry, NewEntry, Entity, Tag, Source } from './types'; +import { RootState } from '@/store/types'; +import { findEntry } from '@/utils/treeUtils'; +import { findLinkedElementEntry } from '@/utils/linkedTreeUtils'; +import { Role } from '../user/types'; +import { Audit } from '../team/types'; + +export const getters: GetterTree = { + elementList(state): Array | null { + return state.ElementList + }, + retrievingElements(state): boolean { + return state.retrievingElements + }, + totalElementListCount(state): number { + return state.totalElementListCount + }, + elementListPage(state): number { + return state.elementListPage + }, + elementListItemsPerPage(state): number { + return state.elementListItemsPerPage + }, + elementListSortBy(state): string | undefined { + return state.elementListSortBy + }, + elementListSortDesc(state): boolean { + return state.elementListSortDesc + }, + elementListFilterDict(state): any { + return { + ...state.elementListFilter, + limit: state.elementListItemsPerPage, + skip: (state.elementListPage - 1) * state.elementListItemsPerPage, + sort: state.elementListSortBy ? (state.elementListSortDesc ? "-" : "") + state.elementListSortBy : undefined + } + }, + elementListFilterIsDefault(state): boolean { + return Object.keys(state.elementListFilter).length == 0 && + state.elementListPage == 1 && + state.elementListSortBy == "id" && + state.elementListSortDesc + }, + selectedElementFiles(state):Array { + return state.SelectedElementFiles + }, + elementType(state): IRElementType | null { + return state.ElementType + }, + elementTypePluralized(state): string | null { + if (state.ElementType == IRElementType.Entity){ + return "entities" + } + else if (state.ElementType == IRElementType.Dispatch){ + return "dispatches" + } + else if (state.ElementType == IRElementType.EntityClass){ + return "entity classes" + } + else if (state.ElementType == IRElementType.Entry) { + return "entries" + } + else if (state.ElementType == IRElementType.VulnFeed) { + return "vuln feeds" + } + else if (state.ElementType == IRElementType.VulnTrack) { + return "vuln tracks" + } + else{ + return state.ElementType + "s" + } + }, + isAlertGroupElementType(state): boolean { + if (state.ElementType == IRElementType.Alertgroup) { + return true + } + else { + return false + } + }, + selectedElement(state): IRElement | null { + return state.SelectedElement + }, + + selectedElementEntityCount(state): number { + return state.SelectedElementEntities.length + }, + + selectedElementEntities(state): Record> { + const initialValue: any = {}; + + return state.SelectedElementEntities.reduce((obj, item) => { + const t = String(item['type_name']) + const value = String(item['value']).toLowerCase() + if (t in obj) { + obj[t][value] = item + } + else { + obj[t] = {} + obj[t][value] = item + } + return obj + }, initialValue); + }, + + selectedElementEntitiesArray(state): Array { + return state.SelectedElementEntities + }, + + selectedElementEntityIndex(state): CallableFunction { + return function (entityId: number) { + return state.SelectedElementEntities.findIndex((e) => e.id == entityId) + } + }, + + selectedElementPermissions(state): { [key in PermissionEnum]?: Array } { + return state.SelectedElementPermissions + }, + + selectedElementHistory(state): Array { + return state.SelectedElementHistory + }, + + selectedElementLinkedElements(state): { [key in IRElementType]: Array } | null{ + if (!state.SelectedElement) { + return null + } + if (!state.SelectedElement?.linkedElements) { + state.SelectedElement.linkedElements = { + [IRElementType.Alertgroup]: [], + [IRElementType.Event]: [], + [IRElementType.Intel]: [], + [IRElementType.Product]: [], + [IRElementType.Incident]: [], + [IRElementType.Dispatch]: [], + [IRElementType.Alert]: [], + [IRElementType.Guide]: [], + [IRElementType.Signature]: [], + [IRElementType.ThreatModelItem]: [], + [IRElementType.Link]: [], + [IRElementType.Entity]: [], + [IRElementType.Entry]: [], + [IRElementType.File]: [], + [IRElementType.Feed]: [], + [IRElementType.Pivot]: [], + [IRElementType.EntityClass]: [], + [IRElementType.VulnFeed]: [], + [IRElementType.VulnTrack]: [], + } + } + return state.SelectedElement.linkedElements + }, + + selectedElementAbortController(state): AbortController | null{ + return state.SelectedElementAbortController + }, + + entitiesLoaded(state): boolean { + return state.entitiesLoaded + }, + + linkedEntriesChanged(state): boolean { + return state.linkedEntriesChanged + }, + + flairVisible(state): boolean { + return state.flairVisible + }, + + flairDialog(state): boolean { + return state.flairDialog && state.SelectedElementFlairedEntities.length > 0 + }, + + flairMenuVisible(state): boolean { + return state.flairMenuVisible + }, + + flairMenuX(state): number { + return state.flairMenuX + }, + + flairMenuY(state): number { + return state.flairMenuY + }, + + flairMenuEntity(state): Entity | null { + return state.flairMenuEntity + }, + + fileDialog(state): boolean { + return state.fileDialog + }, + + elementPaneHeight(state): number | null { + return state.elementPaneHeight + }, + selectedElementPaneSize(state, getters, rootState, rootGetters): number { + const inboxState = rootGetters['user/inboxView'] + if (inboxState) { + return 100 + } + else { + return state.selectedElementSize + } + }, + queueTablePaneSize(state, getters, rootState, rootGetters): number { + const inboxState = rootGetters['user/inboxView'] + if (inboxState) { + return 0 + } + else { + return 100 - state.selectedElementSize + } + }, + selectedElementFlairedEntities(state): Array { + return state.SelectedElementFlairedEntities + }, + selectedElementEntriesLength(state): number { + return state.SelectedElementEntries.length + }, + selectedElementEntries(state): Array | null { + state.SelectedElementEntries.sort(function compare(a, b) { + if (String(a.entry_class) == "summary" && String(b.entry_class) != "summary") { + return -1 + } + else if (String(a.entry_class) != "summary" && String(b.entry_class) == "summary") { + return 1 + } + else if (String(a.entry_class) != "summary" && String(b.entry_class) == "promotion") { + return 1 + } + else if (String(a.entry_class) == "promotion" && String(b.entry_class) != "summary") { + return -1 + } + else if (a.created > b.created) { + return 1 + } + else if (a.created < b.created) { + return -1 + } + else { + return 0 + } + }) + return state.SelectedElementEntries + }, + + selectedElementAlertIds(state): Array | null | undefined { + if (state.SelectedElement != null && state.SelectedElement.ElementType === IRElementType.Alertgroup) { + return state.SelectedElement.selectedAlertIds + } + else { + return null + } + }, + + linkedElementEntries(state): CallableFunction { + return function (linkedElementId: number, linkedElementType: IRElementType) { + if (state.SelectedElement && state.SelectedElement.linkedElements) { + const entries = state.SelectedElement?.linkedElements[linkedElementType as IRElementType].find((obj) => obj.element.id == linkedElementId)?.entries + entries?.sort(function compare(a, b) { + if (String(a.entry_class) == "summary" && String(b.entry_class) != "summary") { + return -1 + } + else if (String(a.entry_class) != "summary" && String(b.entry_class) == "summary") { + return 1 + } + else if (String(a.entry_class) != "summary" && String(b.entry_class) == "promotion") { + return 1 + } + else if (String(a.entry_class) == "promotion" && String(b.entry_class) != "promotion") { + return -1 + } + else if (a.created > b.created) { + return 1 + } + else if (a.created < b.created) { + return -1 + } + else { + return 0 + } + }) + return entries + } + return null + } + }, + + entryById(state): CallableFunction { + return function (id: number, treePath: string = "", linkedElementId = null, linkedElementIndex: unknown = null, linkedElementType: unknown = null) { + if (linkedElementId == null && linkedElementIndex == null && linkedElementType == null) { + return findEntry(treePath, state, id) + } + else { + if (state.SelectedElement != null && state.SelectedElement != undefined && state.SelectedElement.linkedElements != null && linkedElementType != null && linkedElementIndex != null) { + + return findLinkedElementEntry(treePath, state, id, linkedElementType as IRElementType, linkedElementIndex as number) + } + } + } + }, + + entryEditModeById(state): CallableFunction { + return function (id: number, treePath: string = "", linkedElementId = null, linkedElementIndex: unknown = null, linkedElementType: unknown = null) { + let entry = null + if (linkedElementId == null && linkedElementIndex == null && linkedElementType == null) { + entry = findEntry(treePath, state, id) + + } + else { + if (state.SelectedElement != null && state.SelectedElement != undefined && state.SelectedElement.linkedElements != null && linkedElementType != null && linkedElementIndex != null) { + entry = findLinkedElementEntry(treePath, state, id, linkedElementType as IRElementType, linkedElementIndex as number) + } + } + if (entry != undefined) { + if (entry.editMode != undefined) { + return entry.editMode + + } + else { + // If the entry exists but editMode is not an attribute + return false + } + } + else { + return false + } + } + }, + + tabulatorAlertGroupTableColumns(state): Array | undefined { + function statusFormatterFunction(cell: any, formatterParams: any, onRendered: any) { + if (cell.getValue() != "open" && cell.getValue() != "closed") { + const promotionIds = cell.getValue() + if (promotionIds.length == 1) { + const href = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + "/" + "events" + "/" + promotionIds[0] + return "" + "Promoted" + "" + } + else { + let fullString = "" + for (const id of promotionIds) { + const href = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + "/" + "events" + "/" + id + fullString += '