cosmosc2-tool-base 5.0.2.pre.beta2.20220428133831
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +693 -0
- data/README.md +29 -0
- data/Rakefile +35 -0
- data/plugin.txt +2 -0
- data/tools/base/12f570542c7c097049a5.png +0 -0
- data/tools/base/889.cosmosc2-tool-base.js +2 -0
- data/tools/base/889.cosmosc2-tool-base.js.map +1 -0
- data/tools/base/be1eae38c4af82057c4d.png +0 -0
- data/tools/base/ccbf309d19c2c9fc40f7.png +0 -0
- data/tools/base/cosmosc2-tool-base.js +2 -0
- data/tools/base/cosmosc2-tool-base.js.map +1 -0
- data/tools/base/css/materialdesignicons-6.1.95.min.css +3 -0
- data/tools/base/css/materialdesignicons.css.map +16 -0
- data/tools/base/css/roboto.css +338 -0
- data/tools/base/css/vuetify-v2.6.4.min.css +9 -0
- data/tools/base/favicon.ico +0 -0
- data/tools/base/fonts/materialdesignicons-webfont.eot +0 -0
- data/tools/base/fonts/materialdesignicons-webfont.ttf +0 -0
- data/tools/base/fonts/materialdesignicons-webfont.woff +0 -0
- data/tools/base/fonts/materialdesignicons-webfont.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOkCnqEu92Fr1MmgVxEIzIFKw.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOkCnqEu92Fr1MmgVxFIzIFKw.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOkCnqEu92Fr1MmgVxGIzIFKw.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOkCnqEu92Fr1MmgVxHIzIFKw.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOkCnqEu92Fr1MmgVxIIzI.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOkCnqEu92Fr1MmgVxLIzIFKw.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOkCnqEu92Fr1MmgVxMIzIFKw.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmEU9fABc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmEU9fBBc4.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmEU9fBxc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmEU9fCBc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmEU9fCRc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmEU9fChc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmEU9fCxc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmSU5fABc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmSU5fBBc4.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmSU5fBxc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmSU5fCBc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmSU5fCRc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmSU5fChc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmSU5fCxc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmWUlfABc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmWUlfBBc4.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmWUlfBxc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmWUlfCBc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmWUlfCRc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmWUlfChc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmWUlfCxc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmYUtfABc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmYUtfBBc4.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmYUtfBxc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmYUtfCBc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmYUtfCRc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmYUtfChc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmYUtfCxc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOmCnqEu92Fr1Mu4WxKOzY.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOmCnqEu92Fr1Mu4mxK.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOmCnqEu92Fr1Mu5mxKOzY.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOmCnqEu92Fr1Mu72xKOzY.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOmCnqEu92Fr1Mu7GxKOzY.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOmCnqEu92Fr1Mu7WxKOzY.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOmCnqEu92Fr1Mu7mxKOzY.woff2 +0 -0
- data/tools/base/icons/astro.svg +83 -0
- data/tools/base/icons/status-dark.png +0 -0
- data/tools/base/icons/status-light.png +0 -0
- data/tools/base/img/COSMOS_64x64.png +0 -0
- data/tools/base/img/astro-logo-small-dark.svg +13 -0
- data/tools/base/img/astro-logo-small-light.svg +13 -0
- data/tools/base/img/ground_error.gif +0 -0
- data/tools/base/img/ground_off.gif +0 -0
- data/tools/base/img/ground_on.gif +0 -0
- data/tools/base/img/icons.svg +110 -0
- data/tools/base/img/logo.png +0 -0
- data/tools/base/img/satellite.gif +0 -0
- data/tools/base/index.html +20 -0
- data/tools/base/js/amd.min.js +1 -0
- data/tools/base/js/amd.min.js.map +1 -0
- data/tools/base/js/auth.js +1 -0
- data/tools/base/js/authConstants.js +1 -0
- data/tools/base/js/import-map-overrides-2.4.1.js +1 -0
- data/tools/base/js/import-map-overrides.js.map +1 -0
- data/tools/base/js/named-register.min.js +1 -0
- data/tools/base/js/named-register.min.js.map +1 -0
- data/tools/base/js/regenerator-runtime-0.13.9.min.js +1 -0
- data/tools/base/js/single-spa-5.9.3.min.js +1 -0
- data/tools/base/js/single-spa.min.js.map +1 -0
- data/tools/base/js/system-6.12.1.min.js +1 -0
- data/tools/base/js/vue-2.6.14.min.js +2 -0
- data/tools/base/js/vue-2.6.14.min.js.LICENSE.txt +5 -0
- data/tools/base/js/vue-router-3.5.2.min.js +2 -0
- data/tools/base/js/vue-router-3.5.2.min.js.LICENSE.txt +5 -0
- data/tools/base/js/vuetify-v2.6.4.min.js +2 -0
- data/tools/base/js/vuetify-v2.6.4.min.js.LICENSE.txt +5 -0
- data/tools/base/js/vuex-3.6.2.min.js +2 -0
- data/tools/base/js/vuex-3.6.2.min.js.LICENSE.txt +5 -0
- metadata +140 -0
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
## COSMOS Tool Base Plugin
|
2
|
+
|
3
|
+
[Documentation](http://cosmosrb.com)
|
4
|
+
|
5
|
+
This plugin provides the base COSMOS user interface
|
6
|
+
|
7
|
+
## Getting Started
|
8
|
+
|
9
|
+
1. At the COSMOS Admin - Plugins, upload the cosmosc2-tool-base.gem file
|
10
|
+
|
11
|
+
## Contributing
|
12
|
+
|
13
|
+
We encourage you to contribute to COSMOS!
|
14
|
+
|
15
|
+
Contributing is easy.
|
16
|
+
|
17
|
+
1. Fork the project
|
18
|
+
2. Create a feature branch
|
19
|
+
3. Make your changes
|
20
|
+
4. Submit a pull request
|
21
|
+
|
22
|
+
Before any contributions can be incorporated we do require all contributors to sign a Contributor License Agreement here:
|
23
|
+
[Contributor License Agreement](https://docs.google.com/forms/d/1ppnHUSXtY1GRTNPIyUaB1OYHbW5Ca67GFMgMRPBG8u0/viewform)
|
24
|
+
|
25
|
+
This protects both you and us and you retain full rights to any code you write.
|
26
|
+
|
27
|
+
## License
|
28
|
+
|
29
|
+
This Ball Aerospace plugin is released under the AGPLv3.0 with a few addendums. See [LICENSE.txt](LICENSE.txt)
|
data/Rakefile
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# encoding: ascii-8bit
|
2
|
+
|
3
|
+
# Copyright 2022 Ball Aerospace & Technologies Corp.
|
4
|
+
# All Rights Reserved.
|
5
|
+
#
|
6
|
+
# This program is free software; you can modify and/or redistribute it
|
7
|
+
# under the terms of the GNU Affero General Public License
|
8
|
+
# as published by the Free Software Foundation; version 3 with
|
9
|
+
# attribution addendums as found in the LICENSE.txt
|
10
|
+
#
|
11
|
+
# This program is distributed in the hope that it will be useful,
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
# GNU Affero General Public License for more details.
|
15
|
+
#
|
16
|
+
# This program may also be used under the terms of a commercial or
|
17
|
+
# enterprise edition license of COSMOS if purchased from the
|
18
|
+
# copyright holder
|
19
|
+
|
20
|
+
PLUGIN_NAME = Dir['*.gemspec'][0].split('.')[0..-2].join('.')
|
21
|
+
|
22
|
+
task :require_version do
|
23
|
+
unless ENV['VERSION']
|
24
|
+
puts "VERSION is required: rake <task> VERSION=X.X.X"
|
25
|
+
exit 1
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
task :build => [:require_version] do
|
30
|
+
_, platform, *_ = RUBY_PLATFORM.split("-")
|
31
|
+
if platform == 'mswin32' or platform == 'mingw32'
|
32
|
+
puts "Warning: Building gem on Windows will lose file permissions"
|
33
|
+
end
|
34
|
+
system("gem build #{PLUGIN_NAME}")
|
35
|
+
end
|
data/plugin.txt
ADDED
Binary file
|
@@ -0,0 +1,2 @@
|
|
1
|
+
"use strict";(self.webpackChunktool_base=self.webpackChunktool_base||[]).push([[889],{4889:function(n,e,t){t.r(e),t.d(e,{default:function(){return A}});var s=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("v-card",[t("v-card-title",[n._v(" Login ")]),n._v(" "),t("v-card-subtitle",[n._v("\n "+n._s(n.isSet?"Enter the":"Create a")+"\n password to begin using COSMOS\n ")]),n._v(" "),t("v-card-text",[t("v-form",[n.isSet&&n.reset?t("v-text-field",{attrs:{type:"password",label:"Old Password"},model:{value:n.oldPassword,callback:function(e){n.oldPassword=e},expression:"oldPassword"}}):n._e(),n._v(" "),t("v-text-field",{attrs:{type:"password",label:(!n.isSet||n.reset?"New ":"")+"Password","data-test":"new-password"},model:{value:n.password,callback:function(e){n.password=e},expression:"password"}}),n._v(" "),n.reset?t("v-text-field",{attrs:{rules:[n.rules.matchPassword],type:"password",label:"Confirm Password","data-test":"confirm-password"},model:{value:n.confirmPassword,callback:function(e){n.confirmPassword=e},expression:"confirmPassword"}}):n._e(),n._v(" "),n.reset?t("v-btn",{attrs:{type:"submit",large:"",color:n.isSet?"warn":"success",disabled:!n.formValid,"data-test":"set-password"},on:{click:function(e){return e.preventDefault(),n.setPassword.apply(null,arguments)}}},[n._v("\n Set\n ")]):t("v-container",[t("v-row",[t("v-btn",{attrs:{type:"submit",large:"",color:"success",disabled:!n.formValid},on:{click:function(e){return e.preventDefault(),n.verifyPassword.apply(null,arguments)}}},[n._v("\n Login\n ")]),n._v(" "),t("v-spacer"),n._v(" "),t("v-btn",{attrs:{text:"",small:""},on:{click:n.showReset}},[n._v(" Change Password ")])],1)],1)],1)],1),n._v(" "),t("v-alert",{attrs:{type:n.alertType,dismissible:""},model:{value:n.showAlert,callback:function(e){n.showAlert=e},expression:"showAlert"}},[n._v("\n "+n._s(n.alert)+"\n ")])],1)};s._withStripped=!0;var o=t(4942),l=t(8024);function i(){var n="/cosmos/plugins/cosmosc2-tool-base/src/components/Login.vue",e=new Function("return this")(),t="__coverage__",s=e[t]||(e[t]={});s[n]&&"ac24956b702c7dd7d6cc381ee0b11a9a5de3b9ef"===s[n].hash||(s[n]={path:"/cosmos/plugins/cosmosc2-tool-base/src/components/Login.vue",statementMap:{0:{start:{line:88,column:4},end:{line:97,column:5}},1:{start:{line:101,column:6},end:{line:104,column:7}},2:{start:{line:107,column:6},end:{line:110,column:7}},3:{start:{line:109,column:10},end:{line:109,column:74}},4:{start:{line:113,column:6},end:{line:125,column:7}},5:{start:{line:114,column:8},end:{line:122,column:9}},6:{start:{line:115,column:10},end:{line:115,column:74}},7:{start:{line:117,column:10},end:{line:121,column:11}},8:{start:{line:124,column:8},end:{line:124,column:30}},9:{start:{line:129,column:4},end:{line:134,column:6}},10:{start:{line:130,column:6},end:{line:130,column:41}},11:{start:{line:131,column:6},end:{line:133,column:7}},12:{start:{line:132,column:8},end:{line:132,column:25}},13:{start:{line:138,column:6},end:{line:138,column:23}},14:{start:{line:141,column:6},end:{line:141,column:46}},15:{start:{line:142,column:23},end:{line:144,column:7}},16:{start:{line:145,column:6},end:{line:145,column:50}},17:{start:{line:148,column:6},end:{line:148,column:28}},18:{start:{line:149,column:6},end:{line:162,column:8}},19:{start:{line:155,column:8},end:{line:161,column:9}},20:{start:{line:156,column:10},end:{line:156,column:22}},21:{start:{line:158,column:10},end:{line:158,column:43}},22:{start:{line:159,column:10},end:{line:159,column:36}},23:{start:{line:160,column:10},end:{line:160,column:31}},24:{start:{line:165,column:6},end:{line:165,column:28}},25:{start:{line:166,column:6},end:{line:172,column:25}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:87,column:2},end:{line:87,column:3}},loc:{start:{line:87,column:9},end:{line:98,column:3}},line:87},1:{name:"(anonymous_1)",decl:{start:{line:100,column:13},end:{line:100,column:14}},loc:{start:{line:100,column:25},end:{line:105,column:5}},line:100},2:{name:"(anonymous_2)",decl:{start:{line:106,column:11},end:{line:106,column:12}},loc:{start:{line:106,column:23},end:{line:111,column:5}},line:106},3:{name:"(anonymous_3)",decl:{start:{line:108,column:23},end:{line:108,column:24}},loc:{start:{line:109,column:10},end:{line:109,column:74}},line:109},4:{name:"(anonymous_4)",decl:{start:{line:112,column:15},end:{line:112,column:16}},loc:{start:{line:112,column:27},end:{line:126,column:5}},line:112},5:{name:"(anonymous_5)",decl:{start:{line:128,column:11},end:{line:128,column:12}},loc:{start:{line:128,column:23},end:{line:135,column:3}},line:128},6:{name:"(anonymous_6)",decl:{start:{line:129,column:64},end:{line:129,column:65}},loc:{start:{line:129,column:78},end:{line:134,column:5}},line:129},7:{name:"(anonymous_7)",decl:{start:{line:137,column:15},end:{line:137,column:16}},loc:{start:{line:137,column:27},end:{line:139,column:5}},line:137},8:{name:"(anonymous_8)",decl:{start:{line:140,column:11},end:{line:140,column:12}},loc:{start:{line:140,column:23},end:{line:146,column:5}},line:140},9:{name:"(anonymous_9)",decl:{start:{line:147,column:20},end:{line:147,column:21}},loc:{start:{line:147,column:32},end:{line:163,column:5}},line:147},10:{name:"(anonymous_10)",decl:{start:{line:154,column:14},end:{line:154,column:15}},loc:{start:{line:154,column:28},end:{line:162,column:7}},line:154},11:{name:"(anonymous_11)",decl:{start:{line:164,column:17},end:{line:164,column:18}},loc:{start:{line:164,column:29},end:{line:173,column:5}},line:164}},branchMap:{0:{loc:{start:{line:109,column:10},end:{line:109,column:74}},type:"binary-expr",locations:[{start:{line:109,column:10},end:{line:109,column:48}},{start:{line:109,column:52},end:{line:109,column:74}}],line:109},1:{loc:{start:{line:113,column:6},end:{line:125,column:7}},type:"if",locations:[{start:{line:113,column:6},end:{line:125,column:7}},{start:{line:123,column:13},end:{line:125,column:7}}],line:113},2:{loc:{start:{line:114,column:8},end:{line:122,column:9}},type:"if",locations:[{start:{line:114,column:8},end:{line:122,column:9}},{start:{line:116,column:15},end:{line:122,column:9}}],line:114},3:{loc:{start:{line:115,column:17},end:{line:115,column:74}},type:"binary-expr",locations:[{start:{line:115,column:17},end:{line:115,column:32}},{start:{line:115,column:36},end:{line:115,column:74}}],line:115},4:{loc:{start:{line:118,column:12},end:{line:120,column:50}},type:"binary-expr",locations:[{start:{line:118,column:12},end:{line:118,column:30}},{start:{line:119,column:12},end:{line:119,column:27}},{start:{line:120,column:12},end:{line:120,column:50}}],line:118},5:{loc:{start:{line:131,column:6},end:{line:133,column:7}},type:"if",locations:[{start:{line:131,column:6},end:{line:133,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:131},6:{loc:{start:{line:145,column:34},end:{line:145,column:49}},type:"binary-expr",locations:[{start:{line:145,column:34},end:{line:145,column:42}},{start:{line:145,column:46},end:{line:145,column:49}}],line:145},7:{loc:{start:{line:155,column:8},end:{line:161,column:9}},type:"if",locations:[{start:{line:155,column:8},end:{line:161,column:9}},{start:{line:157,column:15},end:{line:161,column:9}}],line:155}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0,0],5:[0,0],6:[0,0],7:[0,0]},inputSourceMap:{version:3,sources:["Login.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"Login.vue",sourceRoot:"src/components",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <v-card>\n <v-card-title> Login </v-card-title>\n <v-card-subtitle>\n {{ isSet ? \'Enter the\' : \'Create a\' }}\n password to begin using COSMOS\n </v-card-subtitle>\n <v-card-text>\n <v-form>\n <v-text-field\n v-if="isSet && reset"\n v-model="oldPassword"\n type="password"\n label="Old Password"\n />\n <v-text-field\n v-model="password"\n type="password"\n :label="`${!isSet || reset ? \'New \' : \'\'}Password`"\n data-test="new-password"\n />\n <v-text-field\n v-if="reset"\n v-model="confirmPassword"\n :rules="[rules.matchPassword]"\n type="password"\n label="Confirm Password"\n data-test="confirm-password"\n />\n <v-btn\n v-if="reset"\n type="submit"\n @click.prevent="setPassword"\n large\n :color="isSet ? \'warn\' : \'success\'"\n :disabled="!formValid"\n data-test="set-password"\n >\n Set\n </v-btn>\n <v-container v-else>\n <v-row>\n <v-btn\n type="submit"\n @click.prevent="verifyPassword"\n large\n color="success"\n :disabled="!formValid"\n >\n Login\n </v-btn>\n <v-spacer />\n <v-btn text small @click="showReset"> Change Password </v-btn>\n </v-row>\n </v-container>\n </v-form>\n </v-card-text>\n <v-alert :type="alertType" v-model="showAlert" dismissible>\n {{ alert }}\n </v-alert>\n </v-card>\n</template>\n\n<script>\nimport Api from \'../../../packages/cosmosc2-tool-common/src/services/api\'\n\nexport default {\n data() {\n return {\n isSet: true,\n password: \'\',\n confirmPassword: \'\',\n oldPassword: \'\',\n reset: false, // setting a password for the first time, or changing to a new password\n alert: \'\',\n alertType: \'success\',\n showAlert: false,\n }\n },\n computed: {\n options: function () {\n return {\n noAuth: true,\n noScope: true, // lol\n }\n },\n rules: function () {\n return {\n matchPassword: () =>\n this.password === this.confirmPassword || \'Passwords must match\',\n }\n },\n formValid: function () {\n if (this.reset) {\n if (!this.isSet) {\n return !!this.password && this.password === this.confirmPassword\n } else {\n return (\n !!this.oldPassword &&\n !!this.password &&\n this.password === this.confirmPassword\n )\n }\n } else {\n return !!this.password\n }\n },\n },\n created: function () {\n Api.get(\'/cosmos-api/auth/token-exists\', this.options).then((response) => {\n this.isSet = !!response.data.result\n if (!this.isSet) {\n this.reset = true\n }\n })\n },\n methods: {\n showReset: function () {\n this.reset = true\n },\n login: function () {\n localStorage.cosmosToken = this.password\n const redirect = new URLSearchParams(window.location.search).get(\n \'redirect\'\n )\n window.location = decodeURI(redirect || \'/\')\n },\n verifyPassword: function () {\n this.showAlert = false\n Api.post(\'/cosmos-api/auth/verify\', {\n data: {\n token: this.password,\n },\n ...this.options,\n }).then((response) => {\n if (response.data.result) {\n this.login()\n } else {\n this.alert = \'Incorrect password\'\n this.alertType = \'warning\'\n this.showAlert = true\n }\n })\n },\n setPassword: function () {\n this.showAlert = false\n Api.post(\'/cosmos-api/auth/set\', {\n data: {\n old_token: this.oldPassword,\n token: this.password,\n },\n ...this.options,\n }).then(this.login)\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"ac24956b702c7dd7d6cc381ee0b11a9a5de3b9ef"});var o=s[n];return i=function(){return o},o}function r(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,s)}return t}function a(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?r(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}i();var c={data:function(){return i().f[0]++,i().s[0]++,{isSet:!0,password:"",confirmPassword:"",oldPassword:"",reset:!1,alert:"",alertType:"success",showAlert:!1}},computed:{options:function(){return i().f[1]++,i().s[1]++,{noAuth:!0,noScope:!0}},rules:function(){var n=this;return i().f[2]++,i().s[2]++,{matchPassword:function(){return i().f[3]++,i().s[3]++,i().b[0][0]++,n.password===n.confirmPassword||(i().b[0][1]++,"Passwords must match")}}},formValid:function(){return i().f[4]++,i().s[4]++,this.reset?(i().b[1][0]++,i().s[5]++,this.isSet?(i().b[2][1]++,i().s[7]++,i().b[4][0]++,!(!this.oldPassword||(i().b[4][1]++,!this.password)||(i().b[4][2]++,this.password!==this.confirmPassword))):(i().b[2][0]++,i().s[6]++,i().b[3][0]++,!!this.password&&(i().b[3][1]++,this.password===this.confirmPassword))):(i().b[1][1]++,i().s[8]++,!!this.password)}},created:function(){var n=this;i().f[5]++,i().s[9]++,l.Z.get("/cosmos-api/auth/token-exists",this.options).then((function(e){i().f[6]++,i().s[10]++,n.isSet=!!e.data.result,i().s[11]++,n.isSet?i().b[5][1]++:(i().b[5][0]++,i().s[12]++,n.reset=!0)}))},methods:{showReset:function(){i().f[7]++,i().s[13]++,this.reset=!0},login:function(){i().f[8]++,i().s[14]++,localStorage.cosmosToken=this.password;var n=(i().s[15]++,new URLSearchParams(window.location.search).get("redirect"));i().s[16]++,window.location=decodeURI((i().b[6][0]++,n||(i().b[6][1]++,"/")))},verifyPassword:function(){var n=this;i().f[9]++,i().s[17]++,this.showAlert=!1,i().s[18]++,l.Z.post("/cosmos-api/auth/verify",a({data:{token:this.password}},this.options)).then((function(e){i().f[10]++,i().s[19]++,e.data.result?(i().b[7][0]++,i().s[20]++,n.login()):(i().b[7][1]++,i().s[21]++,n.alert="Incorrect password",i().s[22]++,n.alertType="warning",i().s[23]++,n.showAlert=!0)}))},setPassword:function(){i().f[11]++,i().s[24]++,this.showAlert=!1,i().s[25]++,l.Z.post("/cosmos-api/auth/set",a({data:{old_token:this.oldPassword,token:this.password}},this.options)).then(this.login)}}},u=(0,t(1900).Z)(c,s,[],!1,null,null,null);u.options.__file="src/components/Login.vue";var A=u.exports}}]);
|
2
|
+
//# sourceMappingURL=889.cosmosc2-tool-base.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"889.cosmosc2-tool-base.js","mappings":"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","sources":["webpack://tool-base/./src/components/Login.vue?a11d","webpack://tool-base/src/components/Login.vue","webpack://tool-base/./src/components/Login.vue?e756","webpack://tool-base/./src/components/Login.vue"],"sourcesContent":["var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"v-card\",\n [\n _c(\"v-card-title\", [_vm._v(\" Login \")]),\n _vm._v(\" \"),\n _c(\"v-card-subtitle\", [\n _vm._v(\n \"\\n \" +\n _vm._s(_vm.isSet ? \"Enter the\" : \"Create a\") +\n \"\\n password to begin using COSMOS\\n \"\n ),\n ]),\n _vm._v(\" \"),\n _c(\n \"v-card-text\",\n [\n _c(\n \"v-form\",\n [\n _vm.isSet && _vm.reset\n ? _c(\"v-text-field\", {\n attrs: { type: \"password\", label: \"Old Password\" },\n model: {\n value: _vm.oldPassword,\n callback: function ($$v) {\n _vm.oldPassword = $$v\n },\n expression: \"oldPassword\",\n },\n })\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"v-text-field\", {\n attrs: {\n type: \"password\",\n label: (!_vm.isSet || _vm.reset ? \"New \" : \"\") + \"Password\",\n \"data-test\": \"new-password\",\n },\n model: {\n value: _vm.password,\n callback: function ($$v) {\n _vm.password = $$v\n },\n expression: \"password\",\n },\n }),\n _vm._v(\" \"),\n _vm.reset\n ? _c(\"v-text-field\", {\n attrs: {\n rules: [_vm.rules.matchPassword],\n type: \"password\",\n label: \"Confirm Password\",\n \"data-test\": \"confirm-password\",\n },\n model: {\n value: _vm.confirmPassword,\n callback: function ($$v) {\n _vm.confirmPassword = $$v\n },\n expression: \"confirmPassword\",\n },\n })\n : _vm._e(),\n _vm._v(\" \"),\n _vm.reset\n ? _c(\n \"v-btn\",\n {\n attrs: {\n type: \"submit\",\n large: \"\",\n color: _vm.isSet ? \"warn\" : \"success\",\n disabled: !_vm.formValid,\n \"data-test\": \"set-password\",\n },\n on: {\n click: function ($event) {\n $event.preventDefault()\n return _vm.setPassword.apply(null, arguments)\n },\n },\n },\n [_vm._v(\"\\n Set\\n \")]\n )\n : _c(\n \"v-container\",\n [\n _c(\n \"v-row\",\n [\n _c(\n \"v-btn\",\n {\n attrs: {\n type: \"submit\",\n large: \"\",\n color: \"success\",\n disabled: !_vm.formValid,\n },\n on: {\n click: function ($event) {\n $event.preventDefault()\n return _vm.verifyPassword.apply(\n null,\n arguments\n )\n },\n },\n },\n [_vm._v(\"\\n Login\\n \")]\n ),\n _vm._v(\" \"),\n _c(\"v-spacer\"),\n _vm._v(\" \"),\n _c(\n \"v-btn\",\n {\n attrs: { text: \"\", small: \"\" },\n on: { click: _vm.showReset },\n },\n [_vm._v(\" Change Password \")]\n ),\n ],\n 1\n ),\n ],\n 1\n ),\n ],\n 1\n ),\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"v-alert\",\n {\n attrs: { type: _vm.alertType, dismissible: \"\" },\n model: {\n value: _vm.showAlert,\n callback: function ($$v) {\n _vm.showAlert = $$v\n },\n expression: \"showAlert\",\n },\n },\n [_vm._v(\"\\n \" + _vm._s(_vm.alert) + \"\\n \")]\n ),\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","<!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n-->\n\n<template>\n <v-card>\n <v-card-title> Login </v-card-title>\n <v-card-subtitle>\n {{ isSet ? 'Enter the' : 'Create a' }}\n password to begin using COSMOS\n </v-card-subtitle>\n <v-card-text>\n <v-form>\n <v-text-field\n v-if=\"isSet && reset\"\n v-model=\"oldPassword\"\n type=\"password\"\n label=\"Old Password\"\n />\n <v-text-field\n v-model=\"password\"\n type=\"password\"\n :label=\"`${!isSet || reset ? 'New ' : ''}Password`\"\n data-test=\"new-password\"\n />\n <v-text-field\n v-if=\"reset\"\n v-model=\"confirmPassword\"\n :rules=\"[rules.matchPassword]\"\n type=\"password\"\n label=\"Confirm Password\"\n data-test=\"confirm-password\"\n />\n <v-btn\n v-if=\"reset\"\n type=\"submit\"\n @click.prevent=\"setPassword\"\n large\n :color=\"isSet ? 'warn' : 'success'\"\n :disabled=\"!formValid\"\n data-test=\"set-password\"\n >\n Set\n </v-btn>\n <v-container v-else>\n <v-row>\n <v-btn\n type=\"submit\"\n @click.prevent=\"verifyPassword\"\n large\n color=\"success\"\n :disabled=\"!formValid\"\n >\n Login\n </v-btn>\n <v-spacer />\n <v-btn text small @click=\"showReset\"> Change Password </v-btn>\n </v-row>\n </v-container>\n </v-form>\n </v-card-text>\n <v-alert :type=\"alertType\" v-model=\"showAlert\" dismissible>\n {{ alert }}\n </v-alert>\n </v-card>\n</template>\n\n<script>\nimport Api from '../../../packages/cosmosc2-tool-common/src/services/api'\n\nexport default {\n data() {\n return {\n isSet: true,\n password: '',\n confirmPassword: '',\n oldPassword: '',\n reset: false, // setting a password for the first time, or changing to a new password\n alert: '',\n alertType: 'success',\n showAlert: false,\n }\n },\n computed: {\n options: function () {\n return {\n noAuth: true,\n noScope: true, // lol\n }\n },\n rules: function () {\n return {\n matchPassword: () =>\n this.password === this.confirmPassword || 'Passwords must match',\n }\n },\n formValid: function () {\n if (this.reset) {\n if (!this.isSet) {\n return !!this.password && this.password === this.confirmPassword\n } else {\n return (\n !!this.oldPassword &&\n !!this.password &&\n this.password === this.confirmPassword\n )\n }\n } else {\n return !!this.password\n }\n },\n },\n created: function () {\n Api.get('/cosmos-api/auth/token-exists', this.options).then((response) => {\n this.isSet = !!response.data.result\n if (!this.isSet) {\n this.reset = true\n }\n })\n },\n methods: {\n showReset: function () {\n this.reset = true\n },\n login: function () {\n localStorage.cosmosToken = this.password\n const redirect = new URLSearchParams(window.location.search).get(\n 'redirect'\n )\n window.location = decodeURI(redirect || '/')\n },\n verifyPassword: function () {\n this.showAlert = false\n Api.post('/cosmos-api/auth/verify', {\n data: {\n token: this.password,\n },\n ...this.options,\n }).then((response) => {\n if (response.data.result) {\n this.login()\n } else {\n this.alert = 'Incorrect password'\n this.alertType = 'warning'\n this.showAlert = true\n }\n })\n },\n setPassword: function () {\n this.showAlert = false\n Api.post('/cosmos-api/auth/set', {\n data: {\n old_token: this.oldPassword,\n token: this.password,\n },\n ...this.options,\n }).then(this.login)\n },\n },\n}\n</script>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Login.vue?vue&type=template&id=ef68022e&\"\nimport script from \"./Login.vue?vue&type=script&lang=js&\"\nexport * from \"./Login.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/cosmos/plugins/cosmosc2-tool-base/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('ef68022e')) {\n api.createRecord('ef68022e', component.options)\n } else {\n api.reload('ef68022e', component.options)\n }\n module.hot.accept(\"./Login.vue?vue&type=template&id=ef68022e&\", function () {\n api.rerender('ef68022e', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/Login.vue\"\nexport default component.exports"],"names":["render","_vm","this","_h","$createElement","_c","_self","_v","_s","isSet","reset","attrs","type","label","model","value","oldPassword","callback","$$v","expression","_e","password","rules","matchPassword","confirmPassword","large","color","disabled","formValid","on","click","$event","preventDefault","setPassword","apply","arguments","verifyPassword","text","small","showReset","alertType","dismissible","showAlert","alert","_withStripped","data","computed","options","noAuth","noScope","created","methods","login","localStorage","cosmosToken","window","location","decodeURI","token","response","result","old_token","component","__file"],"sourceRoot":""}
|
Binary file
|
Binary file
|