openc3-tool-base 5.18.0 → 5.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/tools/base/51.openc3-tool-base.js +1 -1
- data/tools/base/51.openc3-tool-base.js.map +1 -1
- data/tools/base/index-allow-http.html +20 -20
- data/tools/base/index.html +20 -20
- data/tools/base/js/auth.js +1 -1
- data/tools/base/js/vue-2.7.16.min.js +1 -1
- data/tools/base/js/vuetify-2.7.1.min.js +1 -1
- data/tools/base/openc3-tool-base.js +1 -1
- data/tools/base/openc3-tool-base.js.map +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb7c7f5c0e62e5bbfbcd3d359d76e094e5f05013ad4126f00c37fcb2bd20e4b5
|
4
|
+
data.tar.gz: b4808aadf810edf90b877ba25081ac0409ab2d81d1896caf8012214964593c3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89a26bd17a7d33d2c7f5c7bcbe01c92a8e0264e9befc0f101779821055e10882bed3ceb6d345338f854b3601f529c4ba451f89f0144b70c93f94e825da422af8
|
7
|
+
data.tar.gz: d1588994ff67239d656f643877f5afa81f76e5b1ba84de4e9a280649c84411c7224ef1b21a3353f5e6e0675e0ba8ffce1efcd7a227e58be8529652e4aac65c8e
|
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";(self.webpackChunktool_base=self.webpackChunktool_base||[]).push([[51],{51:(s,t,e)=>{e.r(t),e.d(t,{default:()=>i});var o=function(){var s=this,t=s.$createElement,e=s._self._c||t;return e("v-card",[e("v-card-title",[s._v(" Login ")]),s._v(" "),e("v-card-subtitle",[s._v("\n "+s._s(s.isSet?"Enter the":"Create a")+"\n password to begin using OpenC3\n ")]),s._v(" "),e("v-card-text",[e("v-form",[s.isSet&&s.reset?e("v-text-field",{attrs:{type:"password",label:"Old Password"},model:{value:s.oldPassword,callback:function(t){s.oldPassword=t},expression:"oldPassword"}}):s._e(),s._v(" "),e("v-text-field",{attrs:{type:"password",label:(!s.isSet||s.reset?"New ":"")+"Password","data-test":"new-password"},model:{value:s.password,callback:function(t){s.password=t},expression:"password"}}),s._v(" "),s.reset?e("v-text-field",{attrs:{rules:[s.rules.matchPassword],type:"password",label:"Confirm Password","data-test":"confirm-password"},model:{value:s.confirmPassword,callback:function(t){s.confirmPassword=t},expression:"confirmPassword"}}):s._e(),s._v(" "),s.reset?e("v-btn",{attrs:{type:"submit",large:"",color:s.isSet?"warn":"success",disabled:!s.formValid,"data-test":"set-password"},on:{click:function(t){return t.preventDefault(),s.setPassword.apply(null,arguments)}}},[s._v("\n Set\n ")]):e("v-container",[e("v-row",[e("v-btn",{attrs:{type:"submit",large:"",color:"success",disabled:!s.formValid},on:{click:function(t){return t.preventDefault(),s.verifyPassword.apply(null,arguments)}}},[s._v("\n Login\n ")]),s._v(" "),e("v-spacer"),s._v(" "),e("v-btn",{attrs:{text:"",small:""},on:{click:s.showReset}},[s._v(" Change Password ")])],1)],1)],1)],1),s._v(" "),e("v-alert",{attrs:{type:s.alertType,dismissible:""},model:{value:s.showAlert,callback:function(t){s.showAlert=t},expression:"showAlert"}},[s._v("\n "+s._s(s.alert)+"\n ")])],1)};o._withStripped=!0;var
|
1
|
+
"use strict";(self.webpackChunktool_base=self.webpackChunktool_base||[]).push([[51],{51:(s,t,e)=>{e.r(t),e.d(t,{default:()=>i});var o=function(){var s=this,t=s.$createElement,e=s._self._c||t;return e("v-card",[e("v-card-title",[s._v(" Login ")]),s._v(" "),e("v-card-subtitle",[s._v("\n "+s._s(s.isSet?"Enter the":"Create a")+"\n password to begin using OpenC3\n ")]),s._v(" "),e("v-card-text",[e("v-form",[s.isSet&&s.reset?e("v-text-field",{attrs:{type:"password",label:"Old Password"},model:{value:s.oldPassword,callback:function(t){s.oldPassword=t},expression:"oldPassword"}}):s._e(),s._v(" "),e("v-text-field",{attrs:{type:"password",label:(!s.isSet||s.reset?"New ":"")+"Password","data-test":"new-password"},model:{value:s.password,callback:function(t){s.password=t},expression:"password"}}),s._v(" "),s.reset?e("v-text-field",{attrs:{rules:[s.rules.matchPassword],type:"password",label:"Confirm Password","data-test":"confirm-password"},model:{value:s.confirmPassword,callback:function(t){s.confirmPassword=t},expression:"confirmPassword"}}):s._e(),s._v(" "),s.reset?e("v-btn",{attrs:{type:"submit",large:"",color:s.isSet?"warn":"success",disabled:!s.formValid,"data-test":"set-password"},on:{click:function(t){return t.preventDefault(),s.setPassword.apply(null,arguments)}}},[s._v("\n Set\n ")]):e("v-container",[e("v-row",[e("v-btn",{attrs:{type:"submit",large:"",color:"success",disabled:!s.formValid},on:{click:function(t){return t.preventDefault(),s.verifyPassword.apply(null,arguments)}}},[s._v("\n Login\n ")]),s._v(" "),e("v-spacer"),s._v(" "),e("v-btn",{attrs:{text:"",small:""},on:{click:s.showReset}},[s._v(" Change Password ")])],1)],1)],1)],1),s._v(" "),e("v-alert",{attrs:{type:s.alertType,dismissible:""},model:{value:s.showAlert,callback:function(t){s.showAlert=t},expression:"showAlert"}},[s._v("\n "+s._s(s.alert)+"\n ")])],1)};o._withStripped=!0;var a=e(162);const r={data:()=>({isSet:!0,password:"",confirmPassword:"",oldPassword:"",reset:!1,alert:"",alertType:"success",showAlert:!1}),computed:{options:function(){return{noAuth:!0,noScope:!0}},rules:function(){return{matchPassword:()=>this.password===this.confirmPassword||"Passwords must match"}},formValid:function(){return this.reset?this.isSet?!!this.oldPassword&&!!this.password&&this.password===this.confirmPassword:!!this.password&&this.password===this.confirmPassword:!!this.password}},created:function(){a.A.get("/openc3-api/auth/token-exists",this.options).then((s=>{this.isSet=!!s.data.result,this.isSet||(this.reset=!0)}))},methods:{showReset:function(){this.reset=!0},login:function(s){localStorage.openc3Token=s.data;const t=new URLSearchParams(window.location.search).get("redirect");t.startsWith("/tools/")?window.location=decodeURI(t):window.location="/"},verifyPassword:function(){this.showAlert=!1,a.A.post("/openc3-api/auth/verify",{data:{token:this.password},...this.options}).then((s=>{this.login(s)})).catch((s=>{this.alert="Incorrect password",this.alertType="warning",this.showAlert=!0}))},setPassword:function(){this.showAlert=!1,a.A.post("/openc3-api/auth/set",{data:{old_token:this.oldPassword,token:this.password},...this.options}).then((s=>{this.login(s)}))}}};var n=(0,e(486).A)(r,o,[],!1,null,null,null);n.options.__file="packages/openc3-tool-common/src/tools/base/components/Login.vue";const i=n.exports}}]);
|
2
2
|
//# sourceMappingURL=51.openc3-tool-base.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"51.openc3-tool-base.js","mappings":"gIAAA,IAAIA,EAAS,WACX,IAAIC,EAAMC,KACNC,EAAKF,EAAIG,eACTC,EAAKJ,EAAIK,MAAMD,IAAMF,EACzB,OAAOE,EACL,SACA,CACEA,EAAG,eAAgB,CAACJ,EAAIM,GAAG,aAC3BN,EAAIM,GAAG,KACPF,EAAG,kBAAmB,CACpBJ,EAAIM,GACF,SACEN,EAAIO,GAAGP,EAAIQ,MAAQ,YAAc,YACjC,8CAGNR,EAAIM,GAAG,KACPF,EACE,cACA,CACEA,EACE,SACA,CACEJ,EAAIQ,OAASR,EAAIS,MACbL,EAAG,eAAgB,CACjBM,MAAO,CAAEC,KAAM,WAAYC,MAAO,gBAClCC,MAAO,CACLC,MAAOd,EAAIe,YACXC,SAAU,SAAUC,GAClBjB,EAAIe,YAAcE,CACpB,EACAC,WAAY,iBAGhBlB,EAAImB,KACRnB,EAAIM,GAAG,KACPF,EAAG,eAAgB,CACjBM,MAAO,CACLC,KAAM,WACNC,QAASZ,EAAIQ,OAASR,EAAIS,MAAQ,OAAS,IAAM,WACjD,YAAa,gBAEfI,MAAO,CACLC,MAAOd,EAAIoB,SACXJ,SAAU,SAAUC,GAClBjB,EAAIoB,SAAWH,CACjB,EACAC,WAAY,cAGhBlB,EAAIM,GAAG,KACPN,EAAIS,MACAL,EAAG,eAAgB,CACjBM,MAAO,CACLW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://tool-base/../packages/openc3-tool-common/src/tools/base/components/Login.vue?085f","webpack://tool-base/../packages/openc3-tool-common/src/tools/base/components/Login.vue","webpack://tool-base/../packages/openc3-tool-common/src/tools/base/components/Login.vue?ebfd","webpack://tool-base/../packages/openc3-tool-common/src/tools/base/components/Login.vue?dc66"],"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 OpenC3\\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# Modified by OpenC3, Inc.\n# All changes Copyright 2024, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\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 OpenC3\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 '../../../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('/openc3-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.openc3Token = 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('/openc3-api/auth/verify', {\n data: {\n token: this.password,\n },\n ...this.options,\n })\n .then((response) => {\n this.login()\n })\n .catch((error) => {\n this.alert = 'Incorrect password'\n this.alertType = 'warning'\n this.showAlert = true\n })\n },\n setPassword: function () {\n this.showAlert = false\n Api.post('/openc3-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 \"-!../../../../../../openc3-tool-base/node_modules/babel-loader/lib/index.js!../../../../../../openc3-tool-base/node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../openc3-tool-base/node_modules/babel-loader/lib/index.js!../../../../../../openc3-tool-base/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=c187c65e&\"\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 \"!../../../../../../openc3-tool-base/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(\"/openc3/plugins/openc3-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('c187c65e')) {\n api.createRecord('c187c65e', component.options)\n } else {\n api.reload('c187c65e', component.options)\n }\n module.hot.accept(\"./Login.vue?vue&type=template&id=c187c65e&\", function () {\n api.rerender('c187c65e', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"packages/openc3-tool-common/src/tools/base/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","Api","get","then","response","result","methods","login","localStorage","openc3Token","redirect","URLSearchParams","window","location","search","decodeURI","post","token","catch","error","old_token","component","__file"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"51.openc3-tool-base.js","mappings":"gIAAA,IAAIA,EAAS,WACX,IAAIC,EAAMC,KACNC,EAAKF,EAAIG,eACTC,EAAKJ,EAAIK,MAAMD,IAAMF,EACzB,OAAOE,EACL,SACA,CACEA,EAAG,eAAgB,CAACJ,EAAIM,GAAG,aAC3BN,EAAIM,GAAG,KACPF,EAAG,kBAAmB,CACpBJ,EAAIM,GACF,SACEN,EAAIO,GAAGP,EAAIQ,MAAQ,YAAc,YACjC,8CAGNR,EAAIM,GAAG,KACPF,EACE,cACA,CACEA,EACE,SACA,CACEJ,EAAIQ,OAASR,EAAIS,MACbL,EAAG,eAAgB,CACjBM,MAAO,CAAEC,KAAM,WAAYC,MAAO,gBAClCC,MAAO,CACLC,MAAOd,EAAIe,YACXC,SAAU,SAAUC,GAClBjB,EAAIe,YAAcE,CACpB,EACAC,WAAY,iBAGhBlB,EAAImB,KACRnB,EAAIM,GAAG,KACPF,EAAG,eAAgB,CACjBM,MAAO,CACLC,KAAM,WACNC,QAASZ,EAAIQ,OAASR,EAAIS,MAAQ,OAAS,IAAM,WACjD,YAAa,gBAEfI,MAAO,CACLC,MAAOd,EAAIoB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ACAoD,MAAA,KAAA/C,aAEA,KAAA0B,UACAM,MAAAC,IACA,KAAAG,MAAAH,EAAA,GAEA,I,IE/KIkB,GAAY,E,OAAA,GACd,EACAxE,EHqJoB,IGnJpB,EACA,KACA,KACA,MAuBFwE,EAAUzB,QAAQ0B,OAAS,kEAC3B,QAAeD,EAAiB,O","sources":["webpack://tool-base/../packages/openc3-tool-common/src/tools/base/components/Login.vue?085f","webpack://tool-base/../packages/openc3-tool-common/src/tools/base/components/Login.vue","webpack://tool-base/../packages/openc3-tool-common/src/tools/base/components/Login.vue?ebfd","webpack://tool-base/../packages/openc3-tool-common/src/tools/base/components/Login.vue?dc66"],"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 OpenC3\\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# Modified by OpenC3, Inc.\n# All changes Copyright 2024, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\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 OpenC3\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 '../../../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('/openc3-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 (response) {\n localStorage.openc3Token = response.data\n const redirect = new URLSearchParams(window.location.search).get(\n 'redirect',\n )\n if (redirect.startsWith('/tools/')) {\n // Valid relative redirect URL\n window.location = decodeURI(redirect)\n } else {\n window.location = '/'\n }\n },\n verifyPassword: function () {\n this.showAlert = false\n Api.post('/openc3-api/auth/verify', {\n data: {\n token: this.password,\n },\n ...this.options,\n })\n .then((response) => {\n this.login(response)\n })\n .catch((error) => {\n this.alert = 'Incorrect password'\n this.alertType = 'warning'\n this.showAlert = true\n })\n },\n setPassword: function () {\n this.showAlert = false\n Api.post('/openc3-api/auth/set', {\n data: {\n old_token: this.oldPassword,\n token: this.password,\n },\n ...this.options,\n }).then((response) => {\n this.login(response)\n })\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../../openc3-tool-base/node_modules/babel-loader/lib/index.js!../../../../../../openc3-tool-base/node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../openc3-tool-base/node_modules/babel-loader/lib/index.js!../../../../../../openc3-tool-base/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=c187c65e&\"\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 \"!../../../../../../openc3-tool-base/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(\"/openc3/plugins/openc3-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('c187c65e')) {\n api.createRecord('c187c65e', component.options)\n } else {\n api.reload('c187c65e', component.options)\n }\n module.hot.accept(\"./Login.vue?vue&type=template&id=c187c65e&\", function () {\n api.rerender('c187c65e', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"packages/openc3-tool-common/src/tools/base/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","Api","get","then","response","result","methods","login","localStorage","openc3Token","redirect","URLSearchParams","window","location","search","startsWith","decodeURI","post","token","catch","error","old_token","component","__file"],"sourceRoot":""}
|
@@ -1,20 +1,20 @@
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="UTF-8"
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta http-equiv="X-UA-Compatible" content="ie=edge"/><title>OpenC3</title><link rel="stylesheet" href="/css/roboto.css"/><link rel="stylesheet" href="/css/materialdesignicons-7.4.47.min.css"/><link rel="stylesheet" href="/css/vuetify-2.7.1.min.css"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><meta name="theme-color" content="#ffffff"/><script src="/js/regenerator-runtime-0.14.1.min.js"></script><meta http-equiv="Content-Security-Policy" content="default-src 'self' blob: data: http: https:; script-src 'unsafe-inline' 'unsafe-eval' http: https: blob:; connect-src blob: http: https: wss: ws:; style-src 'unsafe-inline' http: https:; object-src 'none';"/><meta name="importmap-type" content="systemjs-importmap"/><script type="systemjs-importmap">{
|
2
|
+
"imports": {
|
3
|
+
"single-spa": "/js/single-spa-5.9.5.min.js",
|
4
|
+
"vue": "/js/vue-2.7.16.min.js",
|
5
|
+
"vuetify": "/js/vuetify-2.7.1.min.js",
|
6
|
+
"vue-router": "/js/vue-router-3.5.4.min.js",
|
7
|
+
"vuex": "/js/vuex-3.6.2.min.js",
|
8
|
+
"openc3-tool-base": "/openc3-tool-base.js"
|
9
|
+
}
|
10
|
+
}</script><link rel="preload" href="/js/single-spa-5.9.5.min.js" as="script"/><link rel="preload" href="/js/vue-2.7.16.min.js" as="script"/><link rel="preload" href="/js/vuetify-2.7.1.min.js" as="script"/><link rel="preload" href="/js/vue-router-3.5.4.min.js" as="script"/><link rel="preload" href="/js/vuex-3.6.2.min.js" as="script"/><script type="systemjs-importmap" src="/openc3-api/map.json"></script><script src="/js/auth.js"></script><script src="/js/import-map-overrides-3.1.1.min.js"></script><script src="/js/systemjs-6.15.1.min.js"></script><script src="/js/amd.min.js"></script><script src="/js/named-register.min.js"></script></head><body><div id="openc3-main"></div><import-map-overrides-full show-when-local-storage="devtools"></import-map-overrides-full><script>;(function () {
|
11
|
+
Promise.all([
|
12
|
+
System.import('single-spa'),
|
13
|
+
System.import('vue'),
|
14
|
+
System.import('vuetify'),
|
15
|
+
System.import('vue-router'),
|
16
|
+
System.import('vuex'),
|
17
|
+
]).then(function (modules) {
|
18
|
+
System.import('openc3-tool-base')
|
19
|
+
})
|
20
|
+
})()</script></body></html>
|
data/tools/base/index.html
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="UTF-8"
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta http-equiv="X-UA-Compatible" content="ie=edge"/><title>OpenC3</title><link rel="stylesheet" href="/css/roboto.css"/><link rel="stylesheet" href="/css/materialdesignicons-7.4.47.min.css"/><link rel="stylesheet" href="/css/vuetify-2.7.1.min.css"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><meta name="theme-color" content="#ffffff"/><script src="/js/regenerator-runtime-0.14.1.min.js"></script><meta http-equiv="Content-Security-Policy" content="default-src 'self' blob: data: https: http://localhost:* http://host.docker.internal:* http://*.local:*; script-src 'unsafe-inline' 'unsafe-eval' https: blob: http://localhost:* http://host.docker.internal:* http://*.local:*; connect-src blob: https: wss: http://localhost:* http://host.docker.internal:* http://*.local:* ws://localhost:* ws://host.docker.internal:* ws://*.local:*; style-src 'unsafe-inline' https: http://localhost:* http://host.docker.internal:* http://*.local:*; object-src 'none';"/><meta name="importmap-type" content="systemjs-importmap"/><script type="systemjs-importmap">{
|
2
|
+
"imports": {
|
3
|
+
"single-spa": "/js/single-spa-5.9.5.min.js",
|
4
|
+
"vue": "/js/vue-2.7.16.min.js",
|
5
|
+
"vuetify": "/js/vuetify-2.7.1.min.js",
|
6
|
+
"vue-router": "/js/vue-router-3.5.4.min.js",
|
7
|
+
"vuex": "/js/vuex-3.6.2.min.js",
|
8
|
+
"openc3-tool-base": "/openc3-tool-base.js"
|
9
|
+
}
|
10
|
+
}</script><link rel="preload" href="/js/single-spa-5.9.5.min.js" as="script"/><link rel="preload" href="/js/vue-2.7.16.min.js" as="script"/><link rel="preload" href="/js/vuetify-2.7.1.min.js" as="script"/><link rel="preload" href="/js/vue-router-3.5.4.min.js" as="script"/><link rel="preload" href="/js/vuex-3.6.2.min.js" as="script"/><script type="systemjs-importmap" src="/openc3-api/map.json"></script><script src="/js/auth.js"></script><script src="/js/import-map-overrides-3.1.1.min.js"></script><script src="/js/systemjs-6.15.1.min.js"></script><script src="/js/amd.min.js"></script><script src="/js/named-register.min.js"></script></head><body><div id="openc3-main"></div><import-map-overrides-full show-when-local-storage="devtools"></import-map-overrides-full><script>;(function () {
|
11
|
+
Promise.all([
|
12
|
+
System.import('single-spa'),
|
13
|
+
System.import('vue'),
|
14
|
+
System.import('vuetify'),
|
15
|
+
System.import('vue-router'),
|
16
|
+
System.import('vuex'),
|
17
|
+
]).then(function (modules) {
|
18
|
+
System.import('openc3-tool-base')
|
19
|
+
})
|
20
|
+
})()</script></body></html>
|
data/tools/base/js/auth.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const emptyPromise=function(e=null){return new Promise((n=>{n(e)}))};class Auth{updateToken(e,n=!1){return localStorage.openc3Token&&!n||(this.clearTokens(),this.login(location.href)),emptyPromise()}setTokens(){}clearTokens(){delete localStorage.openc3Token}login(e){
|
1
|
+
const emptyPromise=function(e=null){return new Promise((n=>{n(e)}))};class Auth{updateToken(e,n=!1){return localStorage.openc3Token&&!n||(this.clearTokens(),this.login(location.href)),emptyPromise()}setTokens(){}clearTokens(){delete localStorage.openc3Token}login(e){let n=new URL(e),t=n.pathname;n.search&&(t+=n.search),/^\/login/.test(location.pathname)||(location=`/login?redirect=${encodeURI(t)}`)}logout(){this.clearTokens(),location.reload()}user(){return{name:"Anonymous"}}userroles(){return["admin"]}getInitOptions(){}init(){return emptyPromise(!0)}}let OpenC3Auth=new Auth;Object.defineProperty(OpenC3Auth,"defaultMinValidity",{value:30,writable:!1,enumerable:!0,configurable:!1});
|