cosmosc2-tool-admin 5.0.2 → 5.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"js/837.js","mappings":"oLAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,QAAQ,CAACE,YAAY,OAAOC,MAAM,CAAC,aAAa,GAAG,MAAQ,WAAW,CAACH,EAAG,QAAQ,CAACA,EAAG,eAAe,CAACI,IAAI,YAAYF,YAAY,OAAOC,MAAM,CAAC,SAAW,GAAG,YAAY,GAAG,OAAS,OAAO,MAAQ,uCAAuCE,MAAM,CAACC,MAAOV,EAAS,MAAEW,SAAS,SAAUC,GAAMZ,EAAIa,MAAMD,GAAKE,WAAW,YAAY,IAAI,GAAGV,EAAG,QAAQ,CAACE,YAAY,YAAYC,MAAM,CAAC,aAAa,KAAK,CAACH,EAAG,QAAQ,CAACE,YAAY,OAAOC,MAAM,CAAC,MAAQ,UAAU,YAAY,eAAe,SAAWP,EAAIa,MAAME,OAAS,EAAE,QAAUf,EAAIgB,eAAeC,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOlB,EAAImB,WAAWC,YAAYpB,EAAIqB,GAAG,CAAC,CAACC,IAAI,SAASC,GAAG,WAAW,MAAO,CAACnB,EAAG,OAAO,CAACJ,EAAIwB,GAAG,kBAAkBC,OAAM,MAAS,CAACrB,EAAG,SAAS,CAACG,MAAM,CAAC,KAAO,GAAG,KAAO,KAAK,CAACP,EAAIwB,GAAG,sBAAsBpB,EAAG,OAAO,CAACJ,EAAIwB,GAAG,eAAe,GAAGpB,EAAG,YAAYA,EAAG,QAAQ,CAACE,YAAY,OAAOC,MAAM,CAAC,YAAY,iBAAiB,SAAWP,EAAIa,MAAME,OAAS,GAAGE,GAAG,CAAC,MAAQ,SAASC,GAAQlB,EAAI0B,oBAAqB,KAAQ,CAACtB,EAAG,SAA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Q,IAAR,QACQ,EAAR,kCADQ,IAAR,QAEQ,EAAR,oBAFQ,IAAR,QAGQ,EAAR,aAHQ,IAAR,QAIQ,YAARC,WAAU,IAAV,QAAU,IAAV,QACU,EAAV,eACA,KANQ,IAAR,QAOQ,EAAR,aAGI,cAxHJ,SAwHAvD,GAAA,wKACA,WADA,YAEA,sCAFA,sBAIA,mBAJA,8CAKA,6EALA,2CAOA,YAPA,iDCtU8Y,ICO1Y,GAAY,OACd,EACA9C,EACA6D,GACA,EACA,KACA,KACA,MAIF,EAAe,EAAiB","sources":["webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/PluginsTab.vue?f989","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/VariablesDialog.vue?5f2a","webpack://@cosmosc2/tool-admin/src/tools/CosmosAdmin/VariablesDialog.vue","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/VariablesDialog.vue?f1f8","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/VariablesDialog.vue","webpack://@cosmosc2/tool-admin/src/tools/CosmosAdmin/tabs/PluginsTab.vue","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/PluginsTab.vue?bc06","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/PluginsTab.vue"],"sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('v-row',{staticClass:\"px-2\",attrs:{\"no-gutters\":\"\",\"align\":\"center\"}},[_c('v-col',[_c('v-file-input',{ref:\"fileInput\",staticClass:\"mx-2\",attrs:{\"multiple\":\"\",\"show-size\":\"\",\"accept\":\".gem\",\"label\":\"Click to select plugin .gem file(s)\"},model:{value:(_vm.files),callback:function ($$v) {_vm.files=$$v},expression:\"files\"}})],1)],1),_c('v-row',{staticClass:\"px-2 pb-2\",attrs:{\"no-gutters\":\"\"}},[_c('v-btn',{staticClass:\"mx-2\",attrs:{\"color\":\"primary\",\"data-test\":\"pluginUpload\",\"disabled\":_vm.files.length < 1,\"loading\":_vm.loadingPlugin},on:{\"click\":function($event){return _vm.upload()}},scopedSlots:_vm._u([{key:\"loader\",fn:function(){return [_c('span',[_vm._v(\"Loading...\")])]},proxy:true}])},[_c('v-icon',{attrs:{\"left\":\"\",\"dark\":\"\"}},[_vm._v(\"mdi-cloud-upload\")]),_c('span',[_vm._v(\" Upload \")])],1),_c('v-spacer'),_c('v-btn',{staticClass:\"mx-2\",attrs:{\"data-test\":\"pluginDownload\",\"disabled\":_vm.files.length > 0},on:{\"click\":function($event){_vm.showDownloadDialog = true}}},[_c('v-icon',{attrs:{\"left\":\"\"}},[_vm._v(\"mdi-cloud-download\")]),_c('span',[_vm._v(\" Download \")])],1)],1),_c('v-alert',{attrs:{\"dismissible\":\"\",\"transition\":\"scale-transition\",\"type\":_vm.alertType},domProps:{\"textContent\":_vm._s(_vm.alert)},model:{value:(_vm.showAlert),callback:function ($$v) {_vm.showAlert=$$v},expression:\"showAlert\"}}),(Object.keys(_vm.processes).length > 0)?_c('v-list',{attrs:{\"data-test\":\"processList\"}},_vm._l((_vm.processes),function(process){return _c('div',{key:process.name},[_c('v-list-item',[_c('v-list-item-content',[_c('v-list-item-title',{domProps:{\"textContent\":_vm._s((\"Installing: \" + (process.detail) + \" - \" + (process.state)))}}),_c('v-list-item-subtitle',{domProps:{\"textContent\":_vm._s(' Updated At: ' + _vm.formatDate(process.updated_at))}})],1),_c('v-list-item-icon',[(process.state === 'Running')?_c('div',[_c('v-progress-circular',{attrs:{\"indeterminate\":\"\",\"color\":\"primary\"}})],1):_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.showOutput(process)}}},'v-icon',attrs,false),on),[_vm._v(\" mdi-eye \")])]}}],null,true)},[_c('span',[_vm._v(\"Show Output\")])])],1)],1),_c('v-divider')],1)}),0):_vm._e(),_c('v-list',{attrs:{\"data-test\":\"pluginList\"}},_vm._l((_vm.plugins),function(plugin,index){return _c('div',{key:index},[_c('v-list-item',[_c('v-list-item-content',[_c('v-list-item-title',{domProps:{\"textContent\":_vm._s(plugin)}})],1),_c('v-list-item-icon',[_c('div',{staticClass:\"mx-3\"},[_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.showPlugin(plugin)}}},'v-icon',attrs,false),on),[_vm._v(\" mdi-eye \")])]}}],null,true)},[_c('span',[_vm._v(\"Show Plugin Details\")])])],1),_c('div',{staticClass:\"mx-3\"},[_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.upgradePlugin(plugin)}}},'v-icon',attrs,false),on),[_vm._v(\" mdi-update \")])]}}],null,true)},[_c('span',[_vm._v(\"Upgrade Plugin\")])])],1),_c('div',{staticClass:\"mx-3\"},[_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.deletePlugin(plugin)}}},'v-icon',attrs,false),on),[_vm._v(\" mdi-delete \")])]}}],null,true)},[_c('span',[_vm._v(\"Delete Plugin\")])])],1)])],1),(index < _vm.plugins.length - 1)?_c('v-divider',{key:index}):_vm._e()],1)}),0),_c('variables-dialog',{attrs:{\"variables\":_vm.variables},on:{\"submit\":_vm.variablesCallback},model:{value:(_vm.showVariableDialog),callback:function ($$v) {_vm.showVariableDialog=$$v},expression:\"showVariableDialog\"}}),(_vm.showEditDialog)?_c('edit-dialog',{attrs:{\"title\":(\"Plugin: \" + _vm.dialogTitle),\"content\":_vm.jsonContent,\"readonly\":\"\"},on:{\"submit\":_vm.dialogCallback},model:{value:(_vm.showEditDialog),callback:function ($$v) {_vm.showEditDialog=$$v},expression:\"showEditDialog\"}}):_vm._e(),_c('download-dialog',{model:{value:(_vm.showDownloadDialog),callback:function ($$v) {_vm.showDownloadDialog=$$v},expression:\"showDownloadDialog\"}}),_c('simple-text-dialog',{attrs:{\"title\":\"Process Output\",\"text\":_vm.processOutput},model:{value:(_vm.showProcessOutput),callback:function ($$v) {_vm.showProcessOutput=$$v},expression:\"showProcessOutput\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-dialog',{attrs:{\"persistent\":\"\",\"width\":\"600\"},model:{value:(_vm.show),callback:function ($$v) {_vm.show=$$v},expression:\"show\"}},[_c('v-card',[_c('form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.submit.apply(null, arguments)}}},[_c('v-system-bar',[_c('v-spacer'),_c('span',[_vm._v(\" Update Plugin Variables \")]),_c('v-spacer')],1),_c('v-card-text',[_c('div',{staticClass:\"pa-3\"},[_vm._l((_vm.localVariables),function(plugin,index){return [_c('v-row',{key:index,staticClass:\"mt-3\"},[_c('v-col',{attrs:{\"cols\":\"12\"}},[_c('h3',[_vm._v(_vm._s(plugin.name))])])],1),_c('v-row',{key:plugin.name,staticClass:\"mt-3\"},_vm._l((plugin.variables),function(value,name){return _c('div',{key:name},[_c('v-col',[_c('v-text-field',{attrs:{\"clearable\":\"\",\"type\":\"text\",\"label\":name},model:{value:(plugin.variables[name]),callback:function ($$v) {_vm.$set(plugin.variables, name, $$v)},expression:\"plugin.variables[name]\"}})],1)],1)}),0),(index != _vm.localVariables.length - 1)?_c('v-divider',{key:plugin.name}):_vm._e()]}),_c('v-row',{staticClass:\"mt-1\"},[_c('v-btn',{attrs:{\"block\":\"\",\"color\":\"primary\",\"type\":\"submit\",\"data-test\":\"variables-dialog-ok\"}},[_vm._v(\" Ok \")])],1)],2)])],1)])],1)}\nvar staticRenderFns = []\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-dialog persistent v-model=\"show\" width=\"600\">\n <v-card>\n <form v-on:submit.prevent=\"submit\">\n <v-system-bar>\n <v-spacer />\n <span> Update Plugin Variables </span>\n <v-spacer />\n </v-system-bar>\n <v-card-text>\n <div class=\"pa-3\">\n <template v-for=\"(plugin, index) of localVariables\">\n <v-row class=\"mt-3\" :key=\"index\">\n <v-col cols=\"12\">\n <h3>{{ plugin.name }}</h3>\n </v-col>\n </v-row>\n <v-row class=\"mt-3\" :key=\"plugin.name\">\n <div v-for=\"(value, name) in plugin.variables\" :key=\"name\">\n <v-col>\n <v-text-field\n clearable\n type=\"text\"\n :label=\"name\"\n v-model=\"plugin.variables[name]\"\n />\n </v-col>\n </div>\n </v-row>\n <v-divider\n :key=\"plugin.name\"\n v-if=\"index != localVariables.length - 1\"\n />\n </template>\n <v-row class=\"mt-1\">\n <v-btn\n block\n color=\"primary\"\n type=\"submit\"\n data-test=\"variables-dialog-ok\"\n >\n Ok\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </form>\n </v-card>\n </v-dialog>\n</template>\n\n<script>\nexport default {\n props: {\n variables: {\n type: Array,\n required: true,\n },\n value: Boolean, // value is the default prop when using v-model\n },\n data() {\n return {\n localVariables: [],\n }\n },\n computed: {\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit('input', value) // input is the default event when using v-model\n },\n },\n },\n watch: {\n value: {\n immediate: true,\n handler: function () {\n this.localVariables = JSON.parse(JSON.stringify(this.variables)).filter(\n (plugin) => Object.keys(plugin.variables).length > 0 // don't show plugins that don't have any variables\n )\n },\n },\n },\n methods: {\n submit: function () {\n const allVariables = this.variables\n .filter((plugin) => Object.keys(plugin.variables).length === 0) // need to send back these so they get iterated over for calling install phase 2\n .concat(this.localVariables)\n this.$emit('submit', allVariables)\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./VariablesDialog.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./VariablesDialog.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./VariablesDialog.vue?vue&type=template&id=2660ea13&\"\nimport script from \"./VariablesDialog.vue?vue&type=script&lang=js&\"\nexport * from \"./VariablesDialog.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","<!--\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 <div>\n <v-row no-gutters align=\"center\" class=\"px-2\">\n <v-col>\n <v-file-input\n v-model=\"files\"\n multiple\n show-size\n accept=\".gem\"\n class=\"mx-2\"\n label=\"Click to select plugin .gem file(s)\"\n ref=\"fileInput\"\n />\n </v-col>\n </v-row>\n <v-row no-gutters class=\"px-2 pb-2\">\n <v-btn\n @click=\"upload()\"\n class=\"mx-2\"\n color=\"primary\"\n data-test=\"pluginUpload\"\n :disabled=\"files.length < 1\"\n :loading=\"loadingPlugin\"\n >\n <v-icon left dark>mdi-cloud-upload</v-icon>\n <span> Upload </span>\n <template v-slot:loader>\n <span>Loading...</span>\n </template>\n </v-btn>\n <v-spacer />\n <v-btn\n @click=\"showDownloadDialog = true\"\n class=\"mx-2\"\n data-test=\"pluginDownload\"\n :disabled=\"files.length > 0\"\n >\n <v-icon left>mdi-cloud-download</v-icon>\n <span> Download </span>\n </v-btn>\n </v-row>\n <!-- TODO This alert shows both success and failure. Make consistent with rest of COSMOS. -->\n <v-alert\n dismissible\n transition=\"scale-transition\"\n :type=\"alertType\"\n v-model=\"showAlert\"\n v-text=\"alert\"\n />\n <v-list v-if=\"Object.keys(processes).length > 0\" data-test=\"processList\">\n <div v-for=\"process in processes\" :key=\"process.name\">\n <v-list-item>\n <v-list-item-content>\n <v-list-item-title\n v-text=\"`Installing: ${process.detail} - ${process.state}`\"\n />\n <v-list-item-subtitle\n v-text=\"' Updated At: ' + formatDate(process.updated_at)\"\n ></v-list-item-subtitle>\n </v-list-item-content>\n <v-list-item-icon>\n <div v-if=\"process.state === 'Running'\">\n <v-progress-circular indeterminate color=\"primary\" />\n </div>\n <v-tooltip v-else bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-icon @click=\"showOutput(process)\" v-bind=\"attrs\" v-on=\"on\">\n mdi-eye\n </v-icon>\n </template>\n <span>Show Output</span>\n </v-tooltip>\n </v-list-item-icon>\n </v-list-item>\n <v-divider />\n </div>\n </v-list>\n <v-list data-test=\"pluginList\">\n <div v-for=\"(plugin, index) in plugins\" :key=\"index\">\n <v-list-item>\n <v-list-item-content>\n <v-list-item-title v-text=\"plugin\" />\n </v-list-item-content>\n <v-list-item-icon>\n <div class=\"mx-3\">\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-icon @click=\"showPlugin(plugin)\" v-bind=\"attrs\" v-on=\"on\">\n mdi-eye\n </v-icon>\n </template>\n <span>Show Plugin Details</span>\n </v-tooltip>\n </div>\n <div class=\"mx-3\">\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-icon\n @click=\"upgradePlugin(plugin)\"\n v-bind=\"attrs\"\n v-on=\"on\"\n >\n mdi-update\n </v-icon>\n </template>\n <span>Upgrade Plugin</span>\n </v-tooltip>\n </div>\n <div class=\"mx-3\">\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-icon\n @click=\"deletePlugin(plugin)\"\n v-bind=\"attrs\"\n v-on=\"on\"\n >\n mdi-delete\n </v-icon>\n </template>\n <span>Delete Plugin</span>\n </v-tooltip>\n </div>\n </v-list-item-icon>\n </v-list-item>\n <v-divider v-if=\"index < plugins.length - 1\" :key=\"index\" />\n </div>\n </v-list>\n <variables-dialog\n v-model=\"showVariableDialog\"\n :variables=\"variables\"\n @submit=\"variablesCallback\"\n />\n <edit-dialog\n v-model=\"showEditDialog\"\n v-if=\"showEditDialog\"\n :title=\"`Plugin: ${dialogTitle}`\"\n :content=\"jsonContent\"\n readonly\n @submit=\"dialogCallback\"\n />\n <download-dialog v-model=\"showDownloadDialog\" />\n <simple-text-dialog\n v-model=\"showProcessOutput\"\n title=\"Process Output\"\n :text=\"processOutput\"\n />\n </div>\n</template>\n\n<script>\nimport { toDate, format } from 'date-fns'\nimport Api from '@cosmosc2/tool-common/src/services/api'\nimport DownloadDialog from '@/tools/CosmosAdmin/DownloadDialog'\nimport EditDialog from '@/tools/CosmosAdmin/EditDialog'\nimport VariablesDialog from '@/tools/CosmosAdmin/VariablesDialog'\nimport SimpleTextDialog from '@cosmosc2/tool-common/src/components/SimpleTextDialog'\n\nexport default {\n components: {\n DownloadDialog,\n EditDialog,\n VariablesDialog,\n SimpleTextDialog,\n },\n data() {\n return {\n files: [],\n loadingPlugin: false,\n plugins: [],\n processes: {},\n alert: '',\n alertType: 'success',\n showAlert: false,\n variables: [],\n jsonContent: '',\n dialogTitle: '',\n showDownloadDialog: false,\n showProcessOutput: false,\n processOutput: '',\n showEditDialog: false,\n showVariableDialog: false,\n }\n },\n mounted() {\n this.update()\n this.updateProcesses()\n },\n methods: {\n showOutput: function (process) {\n this.processOutput = process.output\n this.showProcessOutput = true\n },\n update: function () {\n Api.get('/cosmos-api/plugins').then((response) => {\n this.plugins = response.data\n })\n },\n updateProcesses: function () {\n Api.get('/cosmos-api/process_status/plugin_install').then((response) => {\n this.processes = response.data\n if (Object.keys(this.processes).length > 0) {\n setTimeout(() => {\n this.updateProcesses()\n this.update()\n }, 10000)\n }\n })\n },\n formatDate(nanoSecs) {\n return format(\n toDate(parseInt(nanoSecs) / 1_000_000),\n 'yyyy-MM-dd HH:mm:ss.SSS'\n )\n },\n upload: function (existing = null) {\n const method = existing ? 'put' : 'post'\n const path = existing\n ? `/cosmos-api/plugins/${existing}`\n : '/cosmos-api/plugins'\n this.loadingPlugin = true\n const promises = this.files.map((file) => {\n const formData = new FormData()\n formData.append('plugin', file, file.name)\n return Api[method](path, { data: formData })\n })\n Promise.all(promises)\n .then((responses) => {\n this.alert = `Uploaded ${responses.length} file${\n responses.length > 1 ? 's' : ''\n }`\n this.alertType = 'success'\n this.showAlert = true\n setTimeout(() => {\n this.showAlert = false\n }, 5000)\n this.update()\n this.variables = responses.map((response) => {\n return {\n name: response.data.name,\n variables: response.data.variables,\n }\n })\n this.showVariableDialog = true\n })\n .catch((error) => {\n this.loadingPlugin = false\n this.files = []\n })\n },\n variablesCallback: function (updatedVariables) {\n this.showVariableDialog = false\n const promises = updatedVariables.map((plugin) => {\n return Api.post(`/cosmos-api/plugins/install/${plugin.name}`, {\n data: {\n variables: JSON.stringify(plugin.variables),\n },\n })\n })\n Promise.all(promises)\n .then((responses) => {\n this.loadingPlugin = false\n this.alert = `Started installing ${responses.length} plugin${\n responses.length > 1 ? 's' : ''\n }`\n this.alertType = 'success'\n this.showAlert = true\n this.files = []\n this.variables = []\n setTimeout(() => {\n this.showAlert = false\n this.updateProcesses()\n }, 5000)\n this.update()\n })\n .catch((error) => {\n this.loadingPlugin = false\n })\n },\n showPlugin: function (name) {\n Api.get(`/cosmos-api/plugins/${name}`).then((response) => {\n this.jsonContent = JSON.stringify(response.data, null, '\\t')\n this.dialogTitle = name\n this.showEditDialog = true\n })\n },\n dialogCallback: function (content) {\n this.showEditDialog = false\n },\n deletePlugin: function (plugin) {\n this.$dialog\n .confirm(`Are you sure you want to remove: ${plugin}`, {\n okText: 'Delete',\n cancelText: 'Cancel',\n })\n .then(function (dialog) {\n return Api.delete(`/cosmos-api/plugins/${plugin}`)\n })\n .then((response) => {\n this.alert = `Removed plugin ${plugin}`\n this.alertType = 'success'\n this.showAlert = true\n setTimeout(() => {\n this.showAlert = false\n }, 5000)\n this.update()\n })\n },\n async upgradePlugin(plugin) {\n this.files = []\n this.$refs.fileInput.$refs.input.click()\n // Wait for the file to be set by the dialog so upload works\n while (this.files.length === 0) {\n await new Promise((resolve) => setTimeout(resolve, 500))\n }\n this.upload(plugin)\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./PluginsTab.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./PluginsTab.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./PluginsTab.vue?vue&type=template&id=597b8548&\"\nimport script from \"./PluginsTab.vue?vue&type=script&lang=js&\"\nexport * from \"./PluginsTab.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","ref","model","value","callback","$$v","files","expression","length","loadingPlugin","on","$event","upload","scopedSlots","_u","key","fn","_v","proxy","showDownloadDialog","alertType","domProps","_s","alert","showAlert","Object","keys","processes","_l","process","name","formatDate","updated_at","state","_g","_b","showOutput","_e","plugin","index","showPlugin","upgradePlugin","deletePlugin","plugins","variables","variablesCallback","showVariableDialog","dialogTitle","jsonContent","dialogCallback","showEditDialog","processOutput","showProcessOutput","staticRenderFns","show","preventDefault","submit","apply","arguments","$set","localVariables","props","type","Array","required","Boolean","data","computed","get","set","$emit","watch","immediate","handler","JSON","parse","stringify","filter","methods","concat","allVariables","component","components","DownloadDialog","EditDialog","VariablesDialog","SimpleTextDialog","mounted","update","updateProcesses","output","Api","then","setTimeout","nanoSecs","format","toDate","existing","formData","append","file","method","path","Promise","all","promises","responses","catch","$dialog","confirm","okText","cancelText"],"sourceRoot":""}
1
+ {"version":3,"file":"js/837.js","mappings":"oLAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,QAAQ,CAACE,YAAY,OAAOC,MAAM,CAAC,aAAa,GAAG,MAAQ,WAAW,CAACH,EAAG,QAAQ,CAACA,EAAG,eAAe,CAACI,IAAI,YAAYF,YAAY,OAAOC,MAAM,CAAC,SAAW,GAAG,YAAY,GAAG,OAAS,OAAO,MAAQ,uCAAuCE,MAAM,CAACC,MAAOV,EAAS,MAAEW,SAAS,SAAUC,GAAMZ,EAAIa,MAAMD,GAAKE,WAAW,YAAY,IAAI,GAAGV,EAAG,QAAQ,CAACE,YAAY,YAAYC,MAAM,CAAC,aAAa,KAAK,CAACH,EAAG,QAAQ,CAACE,YAAY,OAAOC,MAAM,CAAC,MAAQ,UAAU,YAAY,eAAe,SAAWP,EAAIa,MAAME,OAAS,EAAE,QAAUf,EAAIgB,eAAeC,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOlB,EAAImB,WAAWC,YAAYpB,EAAIqB,GAAG,CAAC,CAACC,IAAI,SAASC,GAAG,WAAW,MAAO,CAACnB,EAAG,OAAO,CAACJ,EAAIwB,GAAG,kBAAkBC,OAAM,MAAS,CAACrB,EAAG,SAAS,CAACG,MAAM,CAAC,KAAO,GAAG,KAAO,KAAK,CAACP,EAAIwB,GAAG,sBAAsBpB,EAAG,OAAO,CAACJ,EAAIwB,GAAG,eAAe,GAAGpB,EAAG,YAAYA,EAAG,QAAQ,CAACE,YAAY,OAAOC,MAAM,CAAC,YAAY,iBAAiB,SAAWP,EAAIa,MAAME,OAAS,GAAGE,GAAG,CAAC,MAAQ,SAASC,GAAQlB,EAAI0B,oBAAqB,KAAQ,CAACtB,EAAG,SAAS,CAAC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AEA,sBACA,KAZA,YAaA,cAEAQ,OAAA,oCACA,uBAGApD,WAAAA,SAAAA,GAAA,mCACA0C,EAAAA,EAAAA,IAAAA,uBAAAA,OAAAA,IAAAA,MAAAA,SAAAA,GAAA,wBACA,+CADA,YAEA,gBAFA,YAGA,wBAGAjC,eAAAA,SAAAA,GAAA,wBACA,wBAEAP,aAAAA,SAAAA,GAAA,mCACA,aACAmD,QADA,2CACAvD,GAAA,CACAwD,OAAAA,SACAC,WAAAA,WAEAL,MAAA,YACA,OADA,wBACA,mDAEAA,MAAA,oCACA,oCADA,YAEA,sBAFA,YAGA,eAHA,YAIAN,YAAAA,WAAA,wBACA,iBACA,KANA,YAOA,eAGA3C,cAxHA,SAwHAH,GAAA,wKACA,WADA,YAEA,sCAFA,sBAIA,mBAJA,8CAKA,6EALA,2CAOA,YAPA,iDCtU8Y,ICO1Y,GAAY,OACd,EACA9C,EACA6D,GACA,EACA,KACA,KACA,MAIF,EAAe,EAAiB","sources":["webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/PluginsTab.vue?f989","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/VariablesDialog.vue?5f2a","webpack://@cosmosc2/tool-admin/src/tools/CosmosAdmin/VariablesDialog.vue","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/VariablesDialog.vue?f1f8","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/VariablesDialog.vue","webpack://@cosmosc2/tool-admin/src/tools/CosmosAdmin/tabs/PluginsTab.vue","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/PluginsTab.vue?bc06","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/PluginsTab.vue"],"sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('v-row',{staticClass:\"px-2\",attrs:{\"no-gutters\":\"\",\"align\":\"center\"}},[_c('v-col',[_c('v-file-input',{ref:\"fileInput\",staticClass:\"mx-2\",attrs:{\"multiple\":\"\",\"show-size\":\"\",\"accept\":\".gem\",\"label\":\"Click to select plugin .gem file(s)\"},model:{value:(_vm.files),callback:function ($$v) {_vm.files=$$v},expression:\"files\"}})],1)],1),_c('v-row',{staticClass:\"px-2 pb-2\",attrs:{\"no-gutters\":\"\"}},[_c('v-btn',{staticClass:\"mx-2\",attrs:{\"color\":\"primary\",\"data-test\":\"pluginUpload\",\"disabled\":_vm.files.length < 1,\"loading\":_vm.loadingPlugin},on:{\"click\":function($event){return _vm.upload()}},scopedSlots:_vm._u([{key:\"loader\",fn:function(){return [_c('span',[_vm._v(\"Loading...\")])]},proxy:true}])},[_c('v-icon',{attrs:{\"left\":\"\",\"dark\":\"\"}},[_vm._v(\"mdi-cloud-upload\")]),_c('span',[_vm._v(\" Upload \")])],1),_c('v-spacer'),_c('v-btn',{staticClass:\"mx-2\",attrs:{\"data-test\":\"pluginDownload\",\"disabled\":_vm.files.length > 0},on:{\"click\":function($event){_vm.showDownloadDialog = true}}},[_c('v-icon',{attrs:{\"left\":\"\"}},[_vm._v(\"mdi-cloud-download\")]),_c('span',[_vm._v(\" Download \")])],1)],1),_c('v-alert',{attrs:{\"dismissible\":\"\",\"transition\":\"scale-transition\",\"type\":_vm.alertType},domProps:{\"textContent\":_vm._s(_vm.alert)},model:{value:(_vm.showAlert),callback:function ($$v) {_vm.showAlert=$$v},expression:\"showAlert\"}}),(Object.keys(_vm.processes).length > 0)?_c('v-list',{attrs:{\"data-test\":\"processList\"}},_vm._l((_vm.processes),function(process){return _c('div',{key:process.name},[_c('v-list-item',[_c('v-list-item-content',[_c('v-list-item-title',{domProps:{\"textContent\":_vm._s((\"Installing: \" + (process.detail) + \" - \" + (process.state)))}}),_c('v-list-item-subtitle',{domProps:{\"textContent\":_vm._s(' Updated At: ' + _vm.formatDate(process.updated_at))}})],1),_c('v-list-item-icon',[(process.state === 'Running')?_c('div',[_c('v-progress-circular',{attrs:{\"indeterminate\":\"\",\"color\":\"primary\"}})],1):_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.showOutput(process)}}},'v-icon',attrs,false),on),[_vm._v(\" mdi-eye \")])]}}],null,true)},[_c('span',[_vm._v(\"Show Output\")])])],1)],1),_c('v-divider')],1)}),0):_vm._e(),_c('v-list',{attrs:{\"data-test\":\"pluginList\"}},_vm._l((_vm.plugins),function(plugin,index){return _c('div',{key:index},[_c('v-list-item',[_c('v-list-item-content',[_c('v-list-item-title',{domProps:{\"textContent\":_vm._s(plugin)}})],1),_c('v-list-item-icon',[_c('div',{staticClass:\"mx-3\"},[_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.showPlugin(plugin)}}},'v-icon',attrs,false),on),[_vm._v(\" mdi-eye \")])]}}],null,true)},[_c('span',[_vm._v(\"Show Plugin Details\")])])],1),_c('div',{staticClass:\"mx-3\"},[_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.upgradePlugin(plugin)}}},'v-icon',attrs,false),on),[_vm._v(\" mdi-update \")])]}}],null,true)},[_c('span',[_vm._v(\"Upgrade Plugin\")])])],1),_c('div',{staticClass:\"mx-3\"},[_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.deletePlugin(plugin)}}},'v-icon',attrs,false),on),[_vm._v(\" mdi-delete \")])]}}],null,true)},[_c('span',[_vm._v(\"Delete Plugin\")])])],1)])],1),(index < _vm.plugins.length - 1)?_c('v-divider',{key:index}):_vm._e()],1)}),0),_c('variables-dialog',{attrs:{\"variables\":_vm.variables},on:{\"submit\":_vm.variablesCallback},model:{value:(_vm.showVariableDialog),callback:function ($$v) {_vm.showVariableDialog=$$v},expression:\"showVariableDialog\"}}),(_vm.showEditDialog)?_c('edit-dialog',{attrs:{\"title\":(\"Plugin: \" + _vm.dialogTitle),\"content\":_vm.jsonContent,\"readonly\":\"\"},on:{\"submit\":_vm.dialogCallback},model:{value:(_vm.showEditDialog),callback:function ($$v) {_vm.showEditDialog=$$v},expression:\"showEditDialog\"}}):_vm._e(),_c('download-dialog',{model:{value:(_vm.showDownloadDialog),callback:function ($$v) {_vm.showDownloadDialog=$$v},expression:\"showDownloadDialog\"}}),_c('simple-text-dialog',{attrs:{\"title\":\"Process Output\",\"text\":_vm.processOutput},model:{value:(_vm.showProcessOutput),callback:function ($$v) {_vm.showProcessOutput=$$v},expression:\"showProcessOutput\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-dialog',{attrs:{\"persistent\":\"\",\"width\":\"600\"},model:{value:(_vm.show),callback:function ($$v) {_vm.show=$$v},expression:\"show\"}},[_c('v-card',[_c('form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.submit.apply(null, arguments)}}},[_c('v-system-bar',[_c('v-spacer'),_c('span',[_vm._v(\" Update Plugin Variables \")]),_c('v-spacer')],1),_c('v-card-text',[_c('div',{staticClass:\"pa-3\"},[_vm._l((_vm.localVariables),function(plugin,index){return [_c('v-row',{key:index,staticClass:\"mt-3\"},[_c('v-col',{attrs:{\"cols\":\"12\"}},[_c('h3',[_vm._v(_vm._s(plugin.name))])])],1),_c('v-row',{key:plugin.name,staticClass:\"mt-3\"},_vm._l((plugin.variables),function(value,name){return _c('div',{key:name},[_c('v-col',[_c('v-text-field',{attrs:{\"clearable\":\"\",\"type\":\"text\",\"label\":name},model:{value:(plugin.variables[name]),callback:function ($$v) {_vm.$set(plugin.variables, name, $$v)},expression:\"plugin.variables[name]\"}})],1)],1)}),0),(index != _vm.localVariables.length - 1)?_c('v-divider',{key:plugin.name}):_vm._e()]}),_c('v-row',{staticClass:\"mt-1\"},[_c('v-btn',{attrs:{\"block\":\"\",\"color\":\"primary\",\"type\":\"submit\",\"data-test\":\"variables-dialog-ok\"}},[_vm._v(\" Ok \")])],1)],2)])],1)])],1)}\nvar staticRenderFns = []\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-dialog persistent v-model=\"show\" width=\"600\">\n <v-card>\n <form v-on:submit.prevent=\"submit\">\n <v-system-bar>\n <v-spacer />\n <span> Update Plugin Variables </span>\n <v-spacer />\n </v-system-bar>\n <v-card-text>\n <div class=\"pa-3\">\n <template v-for=\"(plugin, index) of localVariables\">\n <v-row class=\"mt-3\" :key=\"index\">\n <v-col cols=\"12\">\n <h3>{{ plugin.name }}</h3>\n </v-col>\n </v-row>\n <v-row class=\"mt-3\" :key=\"plugin.name\">\n <div v-for=\"(value, name) in plugin.variables\" :key=\"name\">\n <v-col>\n <v-text-field\n clearable\n type=\"text\"\n :label=\"name\"\n v-model=\"plugin.variables[name]\"\n />\n </v-col>\n </div>\n </v-row>\n <v-divider\n :key=\"plugin.name\"\n v-if=\"index != localVariables.length - 1\"\n />\n </template>\n <v-row class=\"mt-1\">\n <v-btn\n block\n color=\"primary\"\n type=\"submit\"\n data-test=\"variables-dialog-ok\"\n >\n Ok\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </form>\n </v-card>\n </v-dialog>\n</template>\n\n<script>\nexport default {\n props: {\n variables: {\n type: Array,\n required: true,\n },\n value: Boolean, // value is the default prop when using v-model\n },\n data() {\n return {\n localVariables: [],\n }\n },\n computed: {\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit('input', value) // input is the default event when using v-model\n },\n },\n },\n watch: {\n value: {\n immediate: true,\n handler: function () {\n this.localVariables = JSON.parse(JSON.stringify(this.variables)).filter(\n (plugin) => Object.keys(plugin.variables).length > 0 // don't show plugins that don't have any variables\n )\n },\n },\n },\n methods: {\n submit: function () {\n const allVariables = this.variables\n .filter((plugin) => Object.keys(plugin.variables).length === 0) // need to send back these so they get iterated over for calling install phase 2\n .concat(this.localVariables)\n this.$emit('submit', allVariables)\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./VariablesDialog.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./VariablesDialog.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./VariablesDialog.vue?vue&type=template&id=2660ea13&\"\nimport script from \"./VariablesDialog.vue?vue&type=script&lang=js&\"\nexport * from \"./VariablesDialog.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","<!--\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 <div>\n <v-row no-gutters align=\"center\" class=\"px-2\">\n <v-col>\n <v-file-input\n v-model=\"files\"\n multiple\n show-size\n accept=\".gem\"\n class=\"mx-2\"\n label=\"Click to select plugin .gem file(s)\"\n ref=\"fileInput\"\n />\n </v-col>\n </v-row>\n <v-row no-gutters class=\"px-2 pb-2\">\n <v-btn\n @click=\"upload()\"\n class=\"mx-2\"\n color=\"primary\"\n data-test=\"pluginUpload\"\n :disabled=\"files.length < 1\"\n :loading=\"loadingPlugin\"\n >\n <v-icon left dark>mdi-cloud-upload</v-icon>\n <span> Upload </span>\n <template v-slot:loader>\n <span>Loading...</span>\n </template>\n </v-btn>\n <v-spacer />\n <v-btn\n @click=\"showDownloadDialog = true\"\n class=\"mx-2\"\n data-test=\"pluginDownload\"\n :disabled=\"files.length > 0\"\n >\n <v-icon left>mdi-cloud-download</v-icon>\n <span> Download </span>\n </v-btn>\n </v-row>\n <!-- TODO This alert shows both success and failure. Make consistent with rest of COSMOS. -->\n <v-alert\n dismissible\n transition=\"scale-transition\"\n :type=\"alertType\"\n v-model=\"showAlert\"\n v-text=\"alert\"\n />\n <v-list v-if=\"Object.keys(processes).length > 0\" data-test=\"processList\">\n <div v-for=\"process in processes\" :key=\"process.name\">\n <v-list-item>\n <v-list-item-content>\n <v-list-item-title\n v-text=\"`Installing: ${process.detail} - ${process.state}`\"\n />\n <v-list-item-subtitle\n v-text=\"' Updated At: ' + formatDate(process.updated_at)\"\n ></v-list-item-subtitle>\n </v-list-item-content>\n <v-list-item-icon>\n <div v-if=\"process.state === 'Running'\">\n <v-progress-circular indeterminate color=\"primary\" />\n </div>\n <v-tooltip v-else bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-icon @click=\"showOutput(process)\" v-bind=\"attrs\" v-on=\"on\">\n mdi-eye\n </v-icon>\n </template>\n <span>Show Output</span>\n </v-tooltip>\n </v-list-item-icon>\n </v-list-item>\n <v-divider />\n </div>\n </v-list>\n <v-list data-test=\"pluginList\">\n <div v-for=\"(plugin, index) in plugins\" :key=\"index\">\n <v-list-item>\n <v-list-item-content>\n <v-list-item-title v-text=\"plugin\" />\n </v-list-item-content>\n <v-list-item-icon>\n <div class=\"mx-3\">\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-icon @click=\"showPlugin(plugin)\" v-bind=\"attrs\" v-on=\"on\">\n mdi-eye\n </v-icon>\n </template>\n <span>Show Plugin Details</span>\n </v-tooltip>\n </div>\n <div class=\"mx-3\">\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-icon\n @click=\"upgradePlugin(plugin)\"\n v-bind=\"attrs\"\n v-on=\"on\"\n >\n mdi-update\n </v-icon>\n </template>\n <span>Upgrade Plugin</span>\n </v-tooltip>\n </div>\n <div class=\"mx-3\">\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-icon\n @click=\"deletePlugin(plugin)\"\n v-bind=\"attrs\"\n v-on=\"on\"\n >\n mdi-delete\n </v-icon>\n </template>\n <span>Delete Plugin</span>\n </v-tooltip>\n </div>\n </v-list-item-icon>\n </v-list-item>\n <v-divider v-if=\"index < plugins.length - 1\" :key=\"index\" />\n </div>\n </v-list>\n <variables-dialog\n v-model=\"showVariableDialog\"\n :variables=\"variables\"\n @submit=\"variablesCallback\"\n />\n <edit-dialog\n v-model=\"showEditDialog\"\n v-if=\"showEditDialog\"\n :title=\"`Plugin: ${dialogTitle}`\"\n :content=\"jsonContent\"\n readonly\n @submit=\"dialogCallback\"\n />\n <download-dialog v-model=\"showDownloadDialog\" />\n <simple-text-dialog\n v-model=\"showProcessOutput\"\n title=\"Process Output\"\n :text=\"processOutput\"\n />\n </div>\n</template>\n\n<script>\nimport { toDate, format } from 'date-fns'\nimport Api from '@cosmosc2/tool-common/src/services/api'\nimport DownloadDialog from '@/tools/CosmosAdmin/DownloadDialog'\nimport EditDialog from '@/tools/CosmosAdmin/EditDialog'\nimport VariablesDialog from '@/tools/CosmosAdmin/VariablesDialog'\nimport SimpleTextDialog from '@cosmosc2/tool-common/src/components/SimpleTextDialog'\n\nexport default {\n components: {\n DownloadDialog,\n EditDialog,\n VariablesDialog,\n SimpleTextDialog,\n },\n data() {\n return {\n files: [],\n loadingPlugin: false,\n plugins: [],\n processes: {},\n alert: '',\n alertType: 'success',\n showAlert: false,\n variables: [],\n jsonContent: '',\n dialogTitle: '',\n showDownloadDialog: false,\n showProcessOutput: false,\n processOutput: '',\n showEditDialog: false,\n showVariableDialog: false,\n }\n },\n mounted() {\n this.update()\n this.updateProcesses()\n },\n methods: {\n showOutput: function (process) {\n this.processOutput = process.output\n this.showProcessOutput = true\n },\n update: function () {\n Api.get('/cosmos-api/plugins').then((response) => {\n this.plugins = response.data\n })\n },\n updateProcesses: function () {\n Api.get('/cosmos-api/process_status/plugin_install').then((response) => {\n this.processes = response.data\n if (Object.keys(this.processes).length > 0) {\n setTimeout(() => {\n this.updateProcesses()\n this.update()\n }, 10000)\n }\n })\n },\n formatDate(nanoSecs) {\n return format(\n toDate(parseInt(nanoSecs) / 1_000_000),\n 'yyyy-MM-dd HH:mm:ss.SSS'\n )\n },\n upload: function (existing = null) {\n const method = existing ? 'put' : 'post'\n const path = existing\n ? `/cosmos-api/plugins/${existing}`\n : '/cosmos-api/plugins'\n this.loadingPlugin = true\n const promises = this.files.map((file) => {\n const formData = new FormData()\n formData.append('plugin', file, file.name)\n return Api[method](path, { data: formData })\n })\n Promise.all(promises)\n .then((responses) => {\n this.alert = `Uploaded ${responses.length} file${\n responses.length > 1 ? 's' : ''\n }`\n this.alertType = 'success'\n this.showAlert = true\n setTimeout(() => {\n this.showAlert = false\n }, 5000)\n this.update()\n this.variables = responses.map((response) => {\n return {\n name: response.data.name,\n variables: response.data.variables,\n }\n })\n this.showVariableDialog = true\n })\n .catch((error) => {\n this.loadingPlugin = false\n this.files = []\n })\n },\n variablesCallback: function (updatedVariables) {\n this.showVariableDialog = false\n const promises = updatedVariables.map((plugin) => {\n return Api.post(`/cosmos-api/plugins/install/${plugin.name}`, {\n data: {\n variables: JSON.stringify(plugin.variables),\n },\n })\n })\n Promise.all(promises)\n .then((responses) => {\n this.loadingPlugin = false\n this.alert = `Started installing ${responses.length} plugin${\n responses.length > 1 ? 's' : ''\n }`\n this.alertType = 'success'\n this.showAlert = true\n this.files = []\n this.variables = []\n setTimeout(() => {\n this.showAlert = false\n this.updateProcesses()\n }, 5000)\n this.update()\n })\n .catch((error) => {\n this.loadingPlugin = false\n })\n },\n showPlugin: function (name) {\n Api.get(`/cosmos-api/plugins/${name}`).then((response) => {\n this.jsonContent = JSON.stringify(response.data, null, '\\t')\n this.dialogTitle = name\n this.showEditDialog = true\n })\n },\n dialogCallback: function (content) {\n this.showEditDialog = false\n },\n deletePlugin: function (plugin) {\n this.$dialog\n .confirm(`Are you sure you want to remove: ${plugin}`, {\n okText: 'Delete',\n cancelText: 'Cancel',\n })\n .then(function (dialog) {\n return Api.delete(`/cosmos-api/plugins/${plugin}`)\n })\n .then((response) => {\n this.alert = `Removed plugin ${plugin}`\n this.alertType = 'success'\n this.showAlert = true\n setTimeout(() => {\n this.showAlert = false\n }, 5000)\n this.update()\n })\n },\n async upgradePlugin(plugin) {\n this.files = []\n this.$refs.fileInput.$refs.input.click()\n // Wait for the file to be set by the dialog so upload works\n while (this.files.length === 0) {\n await new Promise((resolve) => setTimeout(resolve, 500))\n }\n this.upload(plugin)\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./PluginsTab.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./PluginsTab.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./PluginsTab.vue?vue&type=template&id=597b8548&\"\nimport script from \"./PluginsTab.vue?vue&type=script&lang=js&\"\nexport * from \"./PluginsTab.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","ref","model","value","callback","$$v","files","expression","length","loadingPlugin","on","$event","upload","scopedSlots","_u","key","fn","_v","proxy","showDownloadDialog","alertType","domProps","_s","alert","showAlert","Object","keys","processes","_l","process","name","formatDate","updated_at","state","_g","_b","showOutput","_e","plugin","index","showPlugin","upgradePlugin","deletePlugin","plugins","variables","variablesCallback","showVariableDialog","dialogTitle","jsonContent","dialogCallback","showEditDialog","processOutput","showProcessOutput","staticRenderFns","show","preventDefault","submit","apply","arguments","$set","localVariables","props","type","required","data","computed","get","set","watch","immediate","handler","methods","filter","concat","component","components","DownloadDialog","EditDialog","VariablesDialog","SimpleTextDialog","mounted","update","Api","updateProcesses","setTimeout","nanoSecs","toDate","existing","formData","Promise","then","responses","catch","confirm","okText","cancelText"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(self["webpackChunk_cosmosc2_tool_admin"]=self["webpackChunk_cosmosc2_tool_admin"]||[]).push([[840],{9985:function(n,e,t){var o=t(8373),s=t(9490),l=(t(5047),t(2741)),i=function(){var n=(0,s.Z)(regeneratorRuntime.mark((function n(e,t){var o,s,i,a,c,r,u,m,d,A=arguments;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(o=A.length>2&&void 0!==A[2]?A[2]:{},s=o.data,i=o.params,a=void 0===i?{}:i,c=o.headers,r=o.noAuth,u=void 0!==r&&r,m=o.noScope,d=void 0!==m&&m,u){n.next=11;break}return n.prev=2,n.next=5,CosmosAuth.updateToken(CosmosAuth.defaultMinValidity);case 5:n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](2),CosmosAuth.login();case 10:c["Authorization"]=localStorage.cosmosToken;case 11:return d||a["scope"]||(a["scope"]=localStorage.scope),n.abrupt("return",(0,l.Z)({method:e,url:t,data:s,params:a,headers:c}));case 13:case"end":return n.stop()}}),n,null,[[2,7]])})));return function(e,t){return n.apply(this,arguments)}}(),a={Accept:"application/json"},c=(0,o.Z)((0,o.Z)({},a),{},{"Content-Type":"application/json"});e["Z"]={get:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.params,o=e.headers,s=void 0===o?a:o,l=e.noScope,c=e.noAuth;return i("get",n,{params:t,headers:s,noScope:l,noAuth:c})},put:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.data,o=e.params,s=e.headers,l=void 0===s?c:s,a=e.noScope,r=e.noAuth;return i("put",n,{data:t,params:o,headers:l,noScope:a,noAuth:r})},post:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.data,o=e.params,s=e.headers,l=void 0===s?c:s,a=e.noScope,r=e.noAuth;return i("post",n,{data:t,params:o,headers:l,noScope:a,noAuth:r})},delete:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.params,o=e.headers,s=void 0===o?a:o,l=e.noScope,c=e.noAuth;return i("delete",n,{params:t,headers:s,noScope:l,noAuth:c})}}},2741:function(n,e,t){var o=t(9644),s=t.n(o),l=t(4091),i=new l["default"],a=s().create({baseURL:location.origin,timeout:1e4,params:{}});a.interceptors.response.use((function(n){return n}),(function(n){if(401===n.response.status)delete localStorage.cosmosToken,CosmosAuth.login(location.href);else{var e,t,o,s,l,a,c,r="HTTP ".concat(n.response.status," - ");if(null!==(e=n.response)&&void 0!==e&&null!==(t=e.data)&&void 0!==t&&t.message)r+="".concat(n.response.data.message);else if(null!==(o=n.response)&&void 0!==o&&null!==(s=o.data)&&void 0!==s&&s.exception)r+="".concat(n.response.data.exception);else if(null!==(l=n.response)&&void 0!==l&&null!==(a=l.data)&&void 0!==a&&null!==(c=a.error)&&void 0!==c&&c.message)n.response.data.error.class&&(r+="".concat(n.response.data.error.class," ")),r+="".concat(n.response.data.error.message);else{var u;r+="".concat(null===(u=n.response)||void 0===u?void 0:u.data)}i.$notify.serious({title:"Network error",body:r})}throw n})),e["Z"]=a},8840:function(n,e,t){t.r(e),t.d(e,{default:function(){return v}});var o=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-row",{attrs:{"no-gutters":""}},[t("v-col",[t("v-file-input",{ref:"fileInput",staticClass:"mx-2",attrs:{multiple:"","show-size":"",accept:".gem",label:"Click to select .gem file(s) to add to internal gem server"},model:{value:n.files,callback:function(e){n.files=e},expression:"files"}})],1)],1),t("v-row",{staticClass:"px-2 pb-2",attrs:{"no-gutters":""}},[t("v-btn",{staticClass:"mx-2",attrs:{"data-test":"gemDownload",disabled:n.files.length>0},on:{click:function(e){n.showDownloadDialog=!0}}},[t("v-icon",{attrs:{left:"",dark:""}},[n._v("mdi-cloud-download")]),t("span",[n._v(" Download ")])],1),t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary","data-test":"gemUpload",disabled:n.files.length<1,loading:n.loadingGem},on:{click:function(e){return n.upload()}},scopedSlots:n._u([{key:"loader",fn:function(){return[t("span",[n._v("Loading...")])]},proxy:!0}])},[t("v-icon",{attrs:{left:"",dark:""}},[n._v("mdi-cloud-upload")]),t("span",[n._v(" Upload ")])],1)],1),t("v-alert",{attrs:{dismissible:"",transition:"scale-transition",type:n.alertType},domProps:{textContent:n._s(n.alert)},model:{value:n.showAlert,callback:function(e){n.showAlert=e},expression:"showAlert"}}),Object.keys(n.processes).length>0?t("v-list",{attrs:{"data-test":"processList"}},n._l(n.processes,(function(e){return t("div",{key:e.name},[t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",{domProps:{textContent:n._s("Installing: "+e.detail+" - "+e.state)}}),t("v-list-item-subtitle",{domProps:{textContent:n._s(" Updated At: "+n.formatDate(e.updated_at))}})],1),"Running"!==e.state?t("v-list-item-icon",[t("v-tooltip",{attrs:{bottom:""},scopedSlots:n._u([{key:"activator",fn:function(o){var s=o.on,l=o.attrs;return[t("v-icon",n._g(n._b({on:{click:function(t){return n.showOutput(e)}}},"v-icon",l,!1),s),[n._v(" mdi-eye ")])]}}],null,!0)},[t("span",[n._v("Show Output")])])],1):n._e()],1),t("v-divider")],1)})),0):n._e(),t("v-list",{attrs:{"data-test":"gemList"}},n._l(n.gems,(function(e,o){return t("div",{key:o},[t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",{domProps:{textContent:n._s(e)}})],1),t("v-list-item-icon",[t("v-tooltip",{attrs:{bottom:""},scopedSlots:n._u([{key:"activator",fn:function(o){var s=o.on,l=o.attrs;return[t("v-icon",n._g(n._b({on:{click:function(t){return n.deleteGem(e)}}},"v-icon",l,!1),s),[n._v(" mdi-delete ")])]}}],null,!0)},[t("span",[n._v("Delete Gem")])])],1)],1),o<n.gems.length-1?t("v-divider",{key:o}):n._e()],1)})),0),t("download-dialog",{model:{value:n.showDownloadDialog,callback:function(e){n.showDownloadDialog=e},expression:"showDownloadDialog"}}),t("simple-text-dialog",{attrs:{title:"Process Output",text:n.processOutput},model:{value:n.showProcessOutput,callback:function(e){n.showProcessOutput=e},expression:"showProcessOutput"}})],1)},s=[],l=(t(4769),t(8995),t(3450),t(8188),t(8673),t(6886),t(8178),t(108)),i=t(6700),a=t(9985),c=t(515),r=t(8911);function u(){var n="/cosmos/plugins/packages/cosmosc2-tool-admin/src/tools/CosmosAdmin/tabs/GemsTab.vue",e="eb09bad2d085d218e0dbf0d502d17775fe6da56e",t=new Function("return this")(),o="__coverage__",s={path:"/cosmos/plugins/packages/cosmosc2-tool-admin/src/tools/CosmosAdmin/tabs/GemsTab.vue",statementMap:{0:{start:{line:134,column:4},end:{line:145,column:5}},1:{start:{line:148,column:4},end:{line:148,column:17}},2:{start:{line:149,column:4},end:{line:149,column:26}},3:{start:{line:153,column:6},end:{line:153,column:41}},4:{start:{line:154,column:6},end:{line:154,column:35}},5:{start:{line:157,column:6},end:{line:159,column:8}},6:{start:{line:158,column:8},end:{line:158,column:33}},7:{start:{line:162,column:6},end:{line:170,column:8}},8:{start:{line:163,column:8},end:{line:163,column:38}},9:{start:{line:164,column:8},end:{line:169,column:9}},10:{start:{line:165,column:10},end:{line:168,column:19}},11:{start:{line:166,column:12},end:{line:166,column:34}},12:{start:{line:167,column:12},end:{line:167,column:25}},13:{start:{line:173,column:6},end:{line:176,column:7}},14:{start:{line:179,column:6},end:{line:179,column:28}},15:{start:{line:180,column:23},end:{line:184,column:8}},16:{start:{line:181,column:25},end:{line:181,column:39}},17:{start:{line:182,column:8},end:{line:182,column:47}},18:{start:{line:183,column:8},end:{line:183,column:63}},19:{start:{line:185,column:6},end:{line:202,column:10}},20:{start:{line:187,column:10},end:{line:189,column:12}},21:{start:{line:190,column:10},end:{line:190,column:36}},22:{start:{line:191,column:10},end:{line:191,column:31}},23:{start:{line:192,column:10},end:{line:192,column:33}},24:{start:{line:193,column:10},end:{line:193,column:25}},25:{start:{line:194,column:10},end:{line:197,column:18}},26:{start:{line:195,column:12},end:{line:195,column:34}},27:{start:{line:196,column:12},end:{line:196,column:34}},28:{start:{line:198,column:10},end:{line:198,column:23}},29:{start:{line:201,column:10},end:{line:201,column:36}},30:{start:{line:205,column:6},end:{line:221,column:10}},31:{start:{line:211,column:10},end:{line:211,column:54}},32:{start:{line:214,column:10},end:{line:214,column:43}},33:{start:{line:215,column:10},end:{line:215,column:36}},34:{start:{line:216,column:10},end:{line:216,column:31}},35:{start:{line:217,column:10},end:{line:219,column:18}},36:{start:{line:218,column:12},end:{line:218,column:34}},37:{start:{line:220,column:10},end:{line:220,column:23}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:133,column:2},end:{line:133,column:3}},loc:{start:{line:133,column:9},end:{line:146,column:3}},line:133},1:{name:"(anonymous_1)",decl:{start:{line:147,column:2},end:{line:147,column:3}},loc:{start:{line:147,column:12},end:{line:150,column:3}},line:147},2:{name:"(anonymous_2)",decl:{start:{line:152,column:16},end:{line:152,column:17}},loc:{start:{line:152,column:35},end:{line:155,column:5}},line:152},3:{name:"(anonymous_3)",decl:{start:{line:156,column:4},end:{line:156,column:5}},loc:{start:{line:156,column:13},end:{line:160,column:5}},line:156},4:{name:"(anonymous_4)",decl:{start:{line:157,column:39},end:{line:157,column:40}},loc:{start:{line:157,column:53},end:{line:159,column:7}},line:157},5:{name:"(anonymous_5)",decl:{start:{line:161,column:21},end:{line:161,column:22}},loc:{start:{line:161,column:33},end:{line:171,column:5}},line:161},6:{name:"(anonymous_6)",decl:{start:{line:162,column:61},end:{line:162,column:62}},loc:{start:{line:162,column:75},end:{line:170,column:7}},line:162},7:{name:"(anonymous_7)",decl:{start:{line:165,column:21},end:{line:165,column:22}},loc:{start:{line:165,column:27},end:{line:168,column:11}},line:165},8:{name:"(anonymous_8)",decl:{start:{line:172,column:4},end:{line:172,column:5}},loc:{start:{line:172,column:25},end:{line:177,column:5}},line:172},9:{name:"(anonymous_9)",decl:{start:{line:178,column:12},end:{line:178,column:13}},loc:{start:{line:178,column:24},end:{line:203,column:5}},line:178},10:{name:"(anonymous_10)",decl:{start:{line:180,column:38},end:{line:180,column:39}},loc:{start:{line:180,column:48},end:{line:184,column:7}},line:180},11:{name:"(anonymous_11)",decl:{start:{line:186,column:14},end:{line:186,column:15}},loc:{start:{line:186,column:29},end:{line:199,column:9}},line:186},12:{name:"(anonymous_12)",decl:{start:{line:194,column:21},end:{line:194,column:22}},loc:{start:{line:194,column:27},end:{line:197,column:11}},line:194},13:{name:"(anonymous_13)",decl:{start:{line:200,column:15},end:{line:200,column:16}},loc:{start:{line:200,column:26},end:{line:202,column:9}},line:200},14:{name:"(anonymous_14)",decl:{start:{line:204,column:15},end:{line:204,column:16}},loc:{start:{line:204,column:30},end:{line:222,column:5}},line:204},15:{name:"(anonymous_15)",decl:{start:{line:210,column:14},end:{line:210,column:15}},loc:{start:{line:210,column:32},end:{line:212,column:9}},line:210},16:{name:"(anonymous_16)",decl:{start:{line:213,column:14},end:{line:213,column:15}},loc:{start:{line:213,column:28},end:{line:221,column:9}},line:213},17:{name:"(anonymous_17)",decl:{start:{line:217,column:21},end:{line:217,column:22}},loc:{start:{line:217,column:27},end:{line:219,column:11}},line:217}},branchMap:{0:{loc:{start:{line:164,column:8},end:{line:169,column:9}},type:"if",locations:[{start:{line:164,column:8},end:{line:169,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:164},1:{loc:{start:{line:188,column:12},end:{line:188,column:43}},type:"cond-expr",locations:[{start:{line:188,column:35},end:{line:188,column:38}},{start:{line:188,column:41},end:{line:188,column:43}}],line:188}},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,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37: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,12:0,13:0,14:0,15:0,16:0,17:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,sources:["GemsTab.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0HA;AACA;AACA;AACA;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"GemsTab.vue",sourceRoot:"src/tools/CosmosAdmin/tabs",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 <div>\n <v-row no-gutters>\n <v-col>\n <v-file-input\n v-model="files"\n multiple\n show-size\n accept=".gem"\n class="mx-2"\n label="Click to select .gem file(s) to add to internal gem server"\n ref="fileInput"\n />\n </v-col>\n </v-row>\n <v-row no-gutters class="px-2 pb-2">\n <v-btn\n @click="showDownloadDialog = true"\n class="mx-2"\n data-test="gemDownload"\n :disabled="files.length > 0"\n >\n <v-icon left dark>mdi-cloud-download</v-icon>\n <span> Download </span>\n </v-btn>\n <v-spacer />\n <v-btn\n @click="upload()"\n class="mx-2"\n color="primary"\n data-test="gemUpload"\n :disabled="files.length < 1"\n :loading="loadingGem"\n >\n <v-icon left dark>mdi-cloud-upload</v-icon>\n <span> Upload </span>\n <template v-slot:loader>\n <span>Loading...</span>\n </template>\n </v-btn>\n </v-row>\n <v-alert\n v-model="showAlert"\n v-text="alert"\n dismissible\n transition="scale-transition"\n :type="alertType"\n />\n <v-list v-if="Object.keys(processes).length > 0" data-test="processList">\n <div v-for="process in processes" :key="process.name">\n <v-list-item>\n <v-list-item-content>\n <v-list-item-title\n v-text="\'Installing: \' + process.detail + \' - \' + process.state"\n />\n <v-list-item-subtitle\n v-text="\' Updated At: \' + formatDate(process.updated_at)"\n ></v-list-item-subtitle>\n </v-list-item-content>\n <v-list-item-icon v-if="process.state !== \'Running\'">\n <v-tooltip bottom>\n <template v-slot:activator="{ on, attrs }">\n <v-icon @click="showOutput(process)" v-bind="attrs" v-on="on">\n mdi-eye\n </v-icon>\n </template>\n <span>Show Output</span>\n </v-tooltip>\n </v-list-item-icon>\n </v-list-item>\n <v-divider />\n </div>\n </v-list>\n <v-list data-test="gemList">\n <div v-for="(gem, index) in gems" :key="index">\n <v-list-item>\n <v-list-item-content>\n <v-list-item-title v-text="gem" />\n </v-list-item-content>\n <v-list-item-icon>\n <v-tooltip bottom>\n <template v-slot:activator="{ on, attrs }">\n <v-icon @click="deleteGem(gem)" v-bind="attrs" v-on="on">\n mdi-delete\n </v-icon>\n </template>\n <span>Delete Gem</span>\n </v-tooltip>\n </v-list-item-icon>\n </v-list-item>\n <v-divider v-if="index < gems.length - 1" :key="index" />\n </div>\n </v-list>\n <download-dialog v-model="showDownloadDialog" />\n <simple-text-dialog\n v-model="showProcessOutput"\n title="Process Output"\n :text="processOutput"\n />\n </div>\n</template>\n\n<script>\nimport { toDate, format } from \'date-fns\'\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport DownloadDialog from \'@/tools/CosmosAdmin/DownloadDialog\'\nimport SimpleTextDialog from \'@cosmosc2/tool-common/src/components/SimpleTextDialog\'\n\nexport default {\n components: {\n DownloadDialog,\n SimpleTextDialog,\n },\n data() {\n return {\n showDownloadDialog: false,\n showProcessOutput: false,\n processOutput: \'\',\n files: [],\n loadingGem: false,\n gems: [],\n processes: {},\n alert: \'\',\n alertType: \'success\',\n showAlert: false,\n }\n },\n mounted() {\n this.update()\n this.updateProcesses()\n },\n methods: {\n showOutput: function (process) {\n this.processOutput = process.output\n this.showProcessOutput = true\n },\n update() {\n Api.get(\'/cosmos-api/gems\').then((response) => {\n this.gems = response.data\n })\n },\n updateProcesses: function () {\n Api.get(\'/cosmos-api/process_status/gem_install\').then((response) => {\n this.processes = response.data\n if (Object.keys(this.processes).length > 0) {\n setTimeout(() => {\n this.updateProcesses()\n this.update()\n }, 10000)\n }\n })\n },\n formatDate(nanoSecs) {\n return format(\n toDate(parseInt(nanoSecs) / 1_000_000),\n \'yyyy-MM-dd HH:mm:ss.SSS\'\n )\n },\n upload: function () {\n this.loadingGem = true\n const promises = this.files.map((file) => {\n const formData = new FormData()\n formData.append(\'gem\', file, file.name)\n return Api.post(\'/cosmos-api/gems\', { data: formData })\n })\n Promise.all(promises)\n .then((responses) => {\n this.alert = `Uploaded ${responses.length} gem${\n responses.length > 1 ? \'s\' : \'\'\n }`\n this.alertType = \'success\'\n this.showAlert = true\n this.loadingGem = false\n this.files = []\n setTimeout(() => {\n this.showAlert = false\n this.updateProcesses()\n }, 5000)\n this.update()\n })\n .catch((error) => {\n this.loadingPlugin = false\n })\n },\n deleteGem: function (gem) {\n this.$dialog\n .confirm(`Are you sure you want to remove: ${gem}`, {\n okText: \'Delete\',\n cancelText: \'Cancel\',\n })\n .then(function (dialog) {\n return Api.delete(`/cosmos-api/gems/${gem}`)\n })\n .then((response) => {\n this.alert = `Removed gem ${gem}`\n this.alertType = \'success\'\n this.showAlert = true\n setTimeout(() => {\n this.showAlert = false\n }, 5000)\n this.update()\n })\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"eb09bad2d085d218e0dbf0d502d17775fe6da56e"},l=t[o]||(t[o]={});l[n]&&l[n].hash===e||(l[n]=s);var i=l[n];return u=function(){return i},i}u();var m={components:{DownloadDialog:c.Z,SimpleTextDialog:r.Z},data:function(){return u().f[0]++,u().s[0]++,{showDownloadDialog:!1,showProcessOutput:!1,processOutput:"",files:[],loadingGem:!1,gems:[],processes:{},alert:"",alertType:"success",showAlert:!1}},mounted:function(){u().f[1]++,u().s[1]++,this.update(),u().s[2]++,this.updateProcesses()},methods:{showOutput:function(n){u().f[2]++,u().s[3]++,this.processOutput=n.output,u().s[4]++,this.showProcessOutput=!0},update:function(){var n=this;u().f[3]++,u().s[5]++,a.Z.get("/cosmos-api/gems").then((function(e){u().f[4]++,u().s[6]++,n.gems=e.data}))},updateProcesses:function(){var n=this;u().f[5]++,u().s[7]++,a.Z.get("/cosmos-api/process_status/gem_install").then((function(e){u().f[6]++,u().s[8]++,n.processes=e.data,u().s[9]++,Object.keys(n.processes).length>0?(u().b[0][0]++,u().s[10]++,setTimeout((function(){u().f[7]++,u().s[11]++,n.updateProcesses(),u().s[12]++,n.update()}),1e4)):u().b[0][1]++}))},formatDate:function(n){return u().f[8]++,u().s[13]++,(0,l.Z)((0,i.Z)(parseInt(n)/1e6),"yyyy-MM-dd HH:mm:ss.SSS")},upload:function(){var n=this;u().f[9]++,u().s[14]++,this.loadingGem=!0;var e=(u().s[15]++,this.files.map((function(n){u().f[10]++;var e=(u().s[16]++,new FormData);return u().s[17]++,e.append("gem",n,n.name),u().s[18]++,a.Z.post("/cosmos-api/gems",{data:e})})));u().s[19]++,Promise.all(e).then((function(e){u().f[11]++,u().s[20]++,n.alert="Uploaded ".concat(e.length," gem").concat(e.length>1?(u().b[1][0]++,"s"):(u().b[1][1]++,"")),u().s[21]++,n.alertType="success",u().s[22]++,n.showAlert=!0,u().s[23]++,n.loadingGem=!1,u().s[24]++,n.files=[],u().s[25]++,setTimeout((function(){u().f[12]++,u().s[26]++,n.showAlert=!1,u().s[27]++,n.updateProcesses()}),5e3),u().s[28]++,n.update()})).catch((function(e){u().f[13]++,u().s[29]++,n.loadingPlugin=!1}))},deleteGem:function(n){var e=this;u().f[14]++,u().s[30]++,this.$dialog.confirm("Are you sure you want to remove: ".concat(n),{okText:"Delete",cancelText:"Cancel"}).then((function(e){return u().f[15]++,u().s[31]++,a.Z["delete"]("/cosmos-api/gems/".concat(n))})).then((function(t){u().f[16]++,u().s[32]++,e.alert="Removed gem ".concat(n),u().s[33]++,e.alertType="success",u().s[34]++,e.showAlert=!0,u().s[35]++,setTimeout((function(){u().f[17]++,u().s[36]++,e.showAlert=!1}),5e3),u().s[37]++,e.update()}))}}},d=m,A=t(3287),p=(0,A.Z)(d,o,s,!1,null,null,null),v=p.exports}}]);
1
+ "use strict";(self["webpackChunk_cosmosc2_tool_admin"]=self["webpackChunk_cosmosc2_tool_admin"]||[]).push([[840],{9985:function(n,e,t){var o=t(8373),s=t(9490),l=(t(5047),t(2741)),i=function(){var n=(0,s.Z)(regeneratorRuntime.mark((function n(e,t){var o,s,i,a,c,r,u,m,d,A=arguments;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(o=A.length>2&&void 0!==A[2]?A[2]:{},s=o.data,i=o.params,a=void 0===i?{}:i,c=o.headers,r=o.noAuth,u=void 0!==r&&r,m=o.noScope,d=void 0!==m&&m,u){n.next=11;break}return n.prev=2,n.next=5,CosmosAuth.updateToken(CosmosAuth.defaultMinValidity);case 5:n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](2),CosmosAuth.login();case 10:c["Authorization"]=localStorage.cosmosToken;case 11:return d||a["scope"]||(a["scope"]=localStorage.scope),n.abrupt("return",(0,l.Z)({method:e,url:t,data:s,params:a,headers:c}));case 13:case"end":return n.stop()}}),n,null,[[2,7]])})));return function(e,t){return n.apply(this,arguments)}}(),a={Accept:"application/json"},c=(0,o.Z)((0,o.Z)({},a),{},{"Content-Type":"application/json"});e["Z"]={get:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.params,o=e.headers,s=void 0===o?a:o,l=e.noScope,c=e.noAuth;return i("get",n,{params:t,headers:s,noScope:l,noAuth:c})},put:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.data,o=e.params,s=e.headers,l=void 0===s?c:s,a=e.noScope,r=e.noAuth;return i("put",n,{data:t,params:o,headers:l,noScope:a,noAuth:r})},post:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.data,o=e.params,s=e.headers,l=void 0===s?c:s,a=e.noScope,r=e.noAuth;return i("post",n,{data:t,params:o,headers:l,noScope:a,noAuth:r})},delete:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.params,o=e.headers,s=void 0===o?a:o,l=e.noScope,c=e.noAuth;return i("delete",n,{params:t,headers:s,noScope:l,noAuth:c})}}},2741:function(n,e,t){var o=t(9644),s=t.n(o),l=t(4091),i=new l["default"],a=s().create({baseURL:location.origin,timeout:1e4,params:{}});a.interceptors.response.use((function(n){return n}),(function(n){if(401===n.response.status)delete localStorage.cosmosToken,CosmosAuth.login(location.href);else{var e,t,o,s,l,a,c,r,u,m,d="HTTP ".concat(n.response.status," - ");if(null!==(e=n.response)&&void 0!==e&&e.statusText&&(d+="".concat(n.response.statusText," ")),null!==(t=n.response)&&void 0!==t&&null!==(o=t.config)&&void 0!==o&&o.data&&(d+="".concat(n.response.config.data," ")),null!==(s=n.response)&&void 0!==s&&null!==(l=s.data)&&void 0!==l&&l.message)d+="".concat(n.response.data.message);else if(null!==(a=n.response)&&void 0!==a&&null!==(c=a.data)&&void 0!==c&&c.exception)d+="".concat(n.response.data.exception);else if(null!==(r=n.response)&&void 0!==r&&null!==(u=r.data)&&void 0!==u&&null!==(m=u.error)&&void 0!==m&&m.message)n.response.data.error.class&&(d+="".concat(n.response.data.error.class," ")),d+="".concat(n.response.data.error.message);else{var A;d+="".concat(null===(A=n.response)||void 0===A?void 0:A.data)}i.$notify.serious({title:"Network error",body:d})}throw n})),e["Z"]=a},8840:function(n,e,t){t.r(e),t.d(e,{default:function(){return v}});var o=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-row",{attrs:{"no-gutters":""}},[t("v-col",[t("v-file-input",{ref:"fileInput",staticClass:"mx-2",attrs:{multiple:"","show-size":"",accept:".gem",label:"Click to select .gem file(s) to add to internal gem server"},model:{value:n.files,callback:function(e){n.files=e},expression:"files"}})],1)],1),t("v-row",{staticClass:"px-2 pb-2",attrs:{"no-gutters":""}},[t("v-btn",{staticClass:"mx-2",attrs:{"data-test":"gemDownload",disabled:n.files.length>0},on:{click:function(e){n.showDownloadDialog=!0}}},[t("v-icon",{attrs:{left:"",dark:""}},[n._v("mdi-cloud-download")]),t("span",[n._v(" Download ")])],1),t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary","data-test":"gemUpload",disabled:n.files.length<1,loading:n.loadingGem},on:{click:function(e){return n.upload()}},scopedSlots:n._u([{key:"loader",fn:function(){return[t("span",[n._v("Loading...")])]},proxy:!0}])},[t("v-icon",{attrs:{left:"",dark:""}},[n._v("mdi-cloud-upload")]),t("span",[n._v(" Upload ")])],1)],1),t("v-alert",{attrs:{dismissible:"",transition:"scale-transition",type:n.alertType},domProps:{textContent:n._s(n.alert)},model:{value:n.showAlert,callback:function(e){n.showAlert=e},expression:"showAlert"}}),Object.keys(n.processes).length>0?t("v-list",{attrs:{"data-test":"processList"}},n._l(n.processes,(function(e){return t("div",{key:e.name},[t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",{domProps:{textContent:n._s("Installing: "+e.detail+" - "+e.state)}}),t("v-list-item-subtitle",{domProps:{textContent:n._s(" Updated At: "+n.formatDate(e.updated_at))}})],1),"Running"!==e.state?t("v-list-item-icon",[t("v-tooltip",{attrs:{bottom:""},scopedSlots:n._u([{key:"activator",fn:function(o){var s=o.on,l=o.attrs;return[t("v-icon",n._g(n._b({on:{click:function(t){return n.showOutput(e)}}},"v-icon",l,!1),s),[n._v(" mdi-eye ")])]}}],null,!0)},[t("span",[n._v("Show Output")])])],1):n._e()],1),t("v-divider")],1)})),0):n._e(),t("v-list",{attrs:{"data-test":"gemList"}},n._l(n.gems,(function(e,o){return t("div",{key:o},[t("v-list-item",[t("v-list-item-content",[t("v-list-item-title",{domProps:{textContent:n._s(e)}})],1),t("v-list-item-icon",[t("v-tooltip",{attrs:{bottom:""},scopedSlots:n._u([{key:"activator",fn:function(o){var s=o.on,l=o.attrs;return[t("v-icon",n._g(n._b({on:{click:function(t){return n.deleteGem(e)}}},"v-icon",l,!1),s),[n._v(" mdi-delete ")])]}}],null,!0)},[t("span",[n._v("Delete Gem")])])],1)],1),o<n.gems.length-1?t("v-divider",{key:o}):n._e()],1)})),0),t("download-dialog",{model:{value:n.showDownloadDialog,callback:function(e){n.showDownloadDialog=e},expression:"showDownloadDialog"}}),t("simple-text-dialog",{attrs:{title:"Process Output",text:n.processOutput},model:{value:n.showProcessOutput,callback:function(e){n.showProcessOutput=e},expression:"showProcessOutput"}})],1)},s=[],l=(t(4769),t(8995),t(3450),t(8188),t(8673),t(6886),t(8178),t(108)),i=t(6700),a=t(9985),c=t(515),r=t(8911);function u(){var n="/cosmos/plugins/packages/cosmosc2-tool-admin/src/tools/CosmosAdmin/tabs/GemsTab.vue",e="eb09bad2d085d218e0dbf0d502d17775fe6da56e",t=new Function("return this")(),o="__coverage__",s={path:"/cosmos/plugins/packages/cosmosc2-tool-admin/src/tools/CosmosAdmin/tabs/GemsTab.vue",statementMap:{0:{start:{line:134,column:4},end:{line:145,column:5}},1:{start:{line:148,column:4},end:{line:148,column:17}},2:{start:{line:149,column:4},end:{line:149,column:26}},3:{start:{line:153,column:6},end:{line:153,column:41}},4:{start:{line:154,column:6},end:{line:154,column:35}},5:{start:{line:157,column:6},end:{line:159,column:8}},6:{start:{line:158,column:8},end:{line:158,column:33}},7:{start:{line:162,column:6},end:{line:170,column:8}},8:{start:{line:163,column:8},end:{line:163,column:38}},9:{start:{line:164,column:8},end:{line:169,column:9}},10:{start:{line:165,column:10},end:{line:168,column:19}},11:{start:{line:166,column:12},end:{line:166,column:34}},12:{start:{line:167,column:12},end:{line:167,column:25}},13:{start:{line:173,column:6},end:{line:176,column:7}},14:{start:{line:179,column:6},end:{line:179,column:28}},15:{start:{line:180,column:23},end:{line:184,column:8}},16:{start:{line:181,column:25},end:{line:181,column:39}},17:{start:{line:182,column:8},end:{line:182,column:47}},18:{start:{line:183,column:8},end:{line:183,column:63}},19:{start:{line:185,column:6},end:{line:202,column:10}},20:{start:{line:187,column:10},end:{line:189,column:12}},21:{start:{line:190,column:10},end:{line:190,column:36}},22:{start:{line:191,column:10},end:{line:191,column:31}},23:{start:{line:192,column:10},end:{line:192,column:33}},24:{start:{line:193,column:10},end:{line:193,column:25}},25:{start:{line:194,column:10},end:{line:197,column:18}},26:{start:{line:195,column:12},end:{line:195,column:34}},27:{start:{line:196,column:12},end:{line:196,column:34}},28:{start:{line:198,column:10},end:{line:198,column:23}},29:{start:{line:201,column:10},end:{line:201,column:36}},30:{start:{line:205,column:6},end:{line:221,column:10}},31:{start:{line:211,column:10},end:{line:211,column:54}},32:{start:{line:214,column:10},end:{line:214,column:43}},33:{start:{line:215,column:10},end:{line:215,column:36}},34:{start:{line:216,column:10},end:{line:216,column:31}},35:{start:{line:217,column:10},end:{line:219,column:18}},36:{start:{line:218,column:12},end:{line:218,column:34}},37:{start:{line:220,column:10},end:{line:220,column:23}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:133,column:2},end:{line:133,column:3}},loc:{start:{line:133,column:9},end:{line:146,column:3}},line:133},1:{name:"(anonymous_1)",decl:{start:{line:147,column:2},end:{line:147,column:3}},loc:{start:{line:147,column:12},end:{line:150,column:3}},line:147},2:{name:"(anonymous_2)",decl:{start:{line:152,column:16},end:{line:152,column:17}},loc:{start:{line:152,column:35},end:{line:155,column:5}},line:152},3:{name:"(anonymous_3)",decl:{start:{line:156,column:4},end:{line:156,column:5}},loc:{start:{line:156,column:13},end:{line:160,column:5}},line:156},4:{name:"(anonymous_4)",decl:{start:{line:157,column:39},end:{line:157,column:40}},loc:{start:{line:157,column:53},end:{line:159,column:7}},line:157},5:{name:"(anonymous_5)",decl:{start:{line:161,column:21},end:{line:161,column:22}},loc:{start:{line:161,column:33},end:{line:171,column:5}},line:161},6:{name:"(anonymous_6)",decl:{start:{line:162,column:61},end:{line:162,column:62}},loc:{start:{line:162,column:75},end:{line:170,column:7}},line:162},7:{name:"(anonymous_7)",decl:{start:{line:165,column:21},end:{line:165,column:22}},loc:{start:{line:165,column:27},end:{line:168,column:11}},line:165},8:{name:"(anonymous_8)",decl:{start:{line:172,column:4},end:{line:172,column:5}},loc:{start:{line:172,column:25},end:{line:177,column:5}},line:172},9:{name:"(anonymous_9)",decl:{start:{line:178,column:12},end:{line:178,column:13}},loc:{start:{line:178,column:24},end:{line:203,column:5}},line:178},10:{name:"(anonymous_10)",decl:{start:{line:180,column:38},end:{line:180,column:39}},loc:{start:{line:180,column:48},end:{line:184,column:7}},line:180},11:{name:"(anonymous_11)",decl:{start:{line:186,column:14},end:{line:186,column:15}},loc:{start:{line:186,column:29},end:{line:199,column:9}},line:186},12:{name:"(anonymous_12)",decl:{start:{line:194,column:21},end:{line:194,column:22}},loc:{start:{line:194,column:27},end:{line:197,column:11}},line:194},13:{name:"(anonymous_13)",decl:{start:{line:200,column:15},end:{line:200,column:16}},loc:{start:{line:200,column:26},end:{line:202,column:9}},line:200},14:{name:"(anonymous_14)",decl:{start:{line:204,column:15},end:{line:204,column:16}},loc:{start:{line:204,column:30},end:{line:222,column:5}},line:204},15:{name:"(anonymous_15)",decl:{start:{line:210,column:14},end:{line:210,column:15}},loc:{start:{line:210,column:32},end:{line:212,column:9}},line:210},16:{name:"(anonymous_16)",decl:{start:{line:213,column:14},end:{line:213,column:15}},loc:{start:{line:213,column:28},end:{line:221,column:9}},line:213},17:{name:"(anonymous_17)",decl:{start:{line:217,column:21},end:{line:217,column:22}},loc:{start:{line:217,column:27},end:{line:219,column:11}},line:217}},branchMap:{0:{loc:{start:{line:164,column:8},end:{line:169,column:9}},type:"if",locations:[{start:{line:164,column:8},end:{line:169,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:164},1:{loc:{start:{line:188,column:12},end:{line:188,column:43}},type:"cond-expr",locations:[{start:{line:188,column:35},end:{line:188,column:38}},{start:{line:188,column:41},end:{line:188,column:43}}],line:188}},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,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37: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,12:0,13:0,14:0,15:0,16:0,17:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,sources:["GemsTab.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0HA;AACA;AACA;AACA;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"GemsTab.vue",sourceRoot:"src/tools/CosmosAdmin/tabs",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 <div>\n <v-row no-gutters>\n <v-col>\n <v-file-input\n v-model="files"\n multiple\n show-size\n accept=".gem"\n class="mx-2"\n label="Click to select .gem file(s) to add to internal gem server"\n ref="fileInput"\n />\n </v-col>\n </v-row>\n <v-row no-gutters class="px-2 pb-2">\n <v-btn\n @click="showDownloadDialog = true"\n class="mx-2"\n data-test="gemDownload"\n :disabled="files.length > 0"\n >\n <v-icon left dark>mdi-cloud-download</v-icon>\n <span> Download </span>\n </v-btn>\n <v-spacer />\n <v-btn\n @click="upload()"\n class="mx-2"\n color="primary"\n data-test="gemUpload"\n :disabled="files.length < 1"\n :loading="loadingGem"\n >\n <v-icon left dark>mdi-cloud-upload</v-icon>\n <span> Upload </span>\n <template v-slot:loader>\n <span>Loading...</span>\n </template>\n </v-btn>\n </v-row>\n <v-alert\n v-model="showAlert"\n v-text="alert"\n dismissible\n transition="scale-transition"\n :type="alertType"\n />\n <v-list v-if="Object.keys(processes).length > 0" data-test="processList">\n <div v-for="process in processes" :key="process.name">\n <v-list-item>\n <v-list-item-content>\n <v-list-item-title\n v-text="\'Installing: \' + process.detail + \' - \' + process.state"\n />\n <v-list-item-subtitle\n v-text="\' Updated At: \' + formatDate(process.updated_at)"\n ></v-list-item-subtitle>\n </v-list-item-content>\n <v-list-item-icon v-if="process.state !== \'Running\'">\n <v-tooltip bottom>\n <template v-slot:activator="{ on, attrs }">\n <v-icon @click="showOutput(process)" v-bind="attrs" v-on="on">\n mdi-eye\n </v-icon>\n </template>\n <span>Show Output</span>\n </v-tooltip>\n </v-list-item-icon>\n </v-list-item>\n <v-divider />\n </div>\n </v-list>\n <v-list data-test="gemList">\n <div v-for="(gem, index) in gems" :key="index">\n <v-list-item>\n <v-list-item-content>\n <v-list-item-title v-text="gem" />\n </v-list-item-content>\n <v-list-item-icon>\n <v-tooltip bottom>\n <template v-slot:activator="{ on, attrs }">\n <v-icon @click="deleteGem(gem)" v-bind="attrs" v-on="on">\n mdi-delete\n </v-icon>\n </template>\n <span>Delete Gem</span>\n </v-tooltip>\n </v-list-item-icon>\n </v-list-item>\n <v-divider v-if="index < gems.length - 1" :key="index" />\n </div>\n </v-list>\n <download-dialog v-model="showDownloadDialog" />\n <simple-text-dialog\n v-model="showProcessOutput"\n title="Process Output"\n :text="processOutput"\n />\n </div>\n</template>\n\n<script>\nimport { toDate, format } from \'date-fns\'\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport DownloadDialog from \'@/tools/CosmosAdmin/DownloadDialog\'\nimport SimpleTextDialog from \'@cosmosc2/tool-common/src/components/SimpleTextDialog\'\n\nexport default {\n components: {\n DownloadDialog,\n SimpleTextDialog,\n },\n data() {\n return {\n showDownloadDialog: false,\n showProcessOutput: false,\n processOutput: \'\',\n files: [],\n loadingGem: false,\n gems: [],\n processes: {},\n alert: \'\',\n alertType: \'success\',\n showAlert: false,\n }\n },\n mounted() {\n this.update()\n this.updateProcesses()\n },\n methods: {\n showOutput: function (process) {\n this.processOutput = process.output\n this.showProcessOutput = true\n },\n update() {\n Api.get(\'/cosmos-api/gems\').then((response) => {\n this.gems = response.data\n })\n },\n updateProcesses: function () {\n Api.get(\'/cosmos-api/process_status/gem_install\').then((response) => {\n this.processes = response.data\n if (Object.keys(this.processes).length > 0) {\n setTimeout(() => {\n this.updateProcesses()\n this.update()\n }, 10000)\n }\n })\n },\n formatDate(nanoSecs) {\n return format(\n toDate(parseInt(nanoSecs) / 1_000_000),\n \'yyyy-MM-dd HH:mm:ss.SSS\'\n )\n },\n upload: function () {\n this.loadingGem = true\n const promises = this.files.map((file) => {\n const formData = new FormData()\n formData.append(\'gem\', file, file.name)\n return Api.post(\'/cosmos-api/gems\', { data: formData })\n })\n Promise.all(promises)\n .then((responses) => {\n this.alert = `Uploaded ${responses.length} gem${\n responses.length > 1 ? \'s\' : \'\'\n }`\n this.alertType = \'success\'\n this.showAlert = true\n this.loadingGem = false\n this.files = []\n setTimeout(() => {\n this.showAlert = false\n this.updateProcesses()\n }, 5000)\n this.update()\n })\n .catch((error) => {\n this.loadingPlugin = false\n })\n },\n deleteGem: function (gem) {\n this.$dialog\n .confirm(`Are you sure you want to remove: ${gem}`, {\n okText: \'Delete\',\n cancelText: \'Cancel\',\n })\n .then(function (dialog) {\n return Api.delete(`/cosmos-api/gems/${gem}`)\n })\n .then((response) => {\n this.alert = `Removed gem ${gem}`\n this.alertType = \'success\'\n this.showAlert = true\n setTimeout(() => {\n this.showAlert = false\n }, 5000)\n this.update()\n })\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"eb09bad2d085d218e0dbf0d502d17775fe6da56e"},l=t[o]||(t[o]={});l[n]&&l[n].hash===e||(l[n]=s);var i=l[n];return u=function(){return i},i}u();var m={components:{DownloadDialog:c.Z,SimpleTextDialog:r.Z},data:function(){return u().f[0]++,u().s[0]++,{showDownloadDialog:!1,showProcessOutput:!1,processOutput:"",files:[],loadingGem:!1,gems:[],processes:{},alert:"",alertType:"success",showAlert:!1}},mounted:function(){u().f[1]++,u().s[1]++,this.update(),u().s[2]++,this.updateProcesses()},methods:{showOutput:function(n){u().f[2]++,u().s[3]++,this.processOutput=n.output,u().s[4]++,this.showProcessOutput=!0},update:function(){var n=this;u().f[3]++,u().s[5]++,a.Z.get("/cosmos-api/gems").then((function(e){u().f[4]++,u().s[6]++,n.gems=e.data}))},updateProcesses:function(){var n=this;u().f[5]++,u().s[7]++,a.Z.get("/cosmos-api/process_status/gem_install").then((function(e){u().f[6]++,u().s[8]++,n.processes=e.data,u().s[9]++,Object.keys(n.processes).length>0?(u().b[0][0]++,u().s[10]++,setTimeout((function(){u().f[7]++,u().s[11]++,n.updateProcesses(),u().s[12]++,n.update()}),1e4)):u().b[0][1]++}))},formatDate:function(n){return u().f[8]++,u().s[13]++,(0,l.Z)((0,i.Z)(parseInt(n)/1e6),"yyyy-MM-dd HH:mm:ss.SSS")},upload:function(){var n=this;u().f[9]++,u().s[14]++,this.loadingGem=!0;var e=(u().s[15]++,this.files.map((function(n){u().f[10]++;var e=(u().s[16]++,new FormData);return u().s[17]++,e.append("gem",n,n.name),u().s[18]++,a.Z.post("/cosmos-api/gems",{data:e})})));u().s[19]++,Promise.all(e).then((function(e){u().f[11]++,u().s[20]++,n.alert="Uploaded ".concat(e.length," gem").concat(e.length>1?(u().b[1][0]++,"s"):(u().b[1][1]++,"")),u().s[21]++,n.alertType="success",u().s[22]++,n.showAlert=!0,u().s[23]++,n.loadingGem=!1,u().s[24]++,n.files=[],u().s[25]++,setTimeout((function(){u().f[12]++,u().s[26]++,n.showAlert=!1,u().s[27]++,n.updateProcesses()}),5e3),u().s[28]++,n.update()})).catch((function(e){u().f[13]++,u().s[29]++,n.loadingPlugin=!1}))},deleteGem:function(n){var e=this;u().f[14]++,u().s[30]++,this.$dialog.confirm("Are you sure you want to remove: ".concat(n),{okText:"Delete",cancelText:"Cancel"}).then((function(e){return u().f[15]++,u().s[31]++,a.Z["delete"]("/cosmos-api/gems/".concat(n))})).then((function(t){u().f[16]++,u().s[32]++,e.alert="Removed gem ".concat(n),u().s[33]++,e.alertType="success",u().s[34]++,e.showAlert=!0,u().s[35]++,setTimeout((function(){u().f[17]++,u().s[36]++,e.showAlert=!1}),5e3),u().s[37]++,e.update()}))}}},d=m,A=t(3287),p=(0,A.Z)(d,o,s,!1,null,null,null),v=p.exports}}]);
2
2
  //# sourceMappingURL=840.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"js/840.js","mappings":"mLAqBMA,EAAO,kDAAG,WACdC,EACAC,GAFc,uJAGoD,GAAhEC,EAHY,EAGZA,KAHY,IAGNC,OAAAA,OAHM,MAGG,GAHH,EAGOC,EAHP,EAGOA,QAHP,IAGgBC,OAAAA,OAHhB,aAGgCC,QAAAA,OAHhC,SAKTD,EALS,0CAOJE,WAAWC,YAAYD,WAAWE,oBAP9B,0DASVF,WAAWG,QATD,QAWZN,EAAQ,iBAAmBO,aAAaC,YAX5B,eAaTN,GAAYH,EAAO,WACtBA,EAAO,SAAWQ,aAAaE,OAdnB,mBAgBPC,EAAAA,EAAAA,GAAM,CACXd,OAAAA,EACAC,IAAAA,EACAC,KAAAA,EACAC,OAAAA,EACAC,QAAAA,KArBY,yDAAH,wDAyBPW,EAA2B,CAC/BC,OAAQ,oBAGJC,GAAqB,kBACtBF,GADmB,IAEtB,eAAgB,qBAGlB,QACEG,IAAK,SACHC,GAEA,6DADkE,GAAhEhB,EACF,EADEA,OACF,IADUC,QAAAA,OACV,MADoBW,EACpB,EAD8CT,EAC9C,EAD8CA,QAAS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B,IAAN,uDACQ,IAAR,6BAEQ,OAHR,YAEQ+C,EAASC,OAAO,MAAOC,EAAMA,EAAKhC,MAF1C,YAGe,SAAS,mBAAoB,CAA5C/E,KAAAA,QALA,YAOMgH,QAAQC,IAAIC,GAClBV,MAAA,YAAQ,IAAR,QAAQ,IAAR,QACQ,EAAR,iDACAW,EAAAA,OAAAA,GAAAA,IAAAA,EAAAA,GAAAA,KAAAA,MAAAA,IAAAA,EAAAA,GAAAA,KAAAA,KAFQ,IAAR,QAIQ,EAAR,oBAJQ,IAAR,QAKQ,EAAR,aALQ,IAAR,QAMQ,EAAR,cANQ,IAAR,QAOQ,EAAR,SAPQ,IAAR,QAQQ,YAARV,WAAU,IAAV,QAAU,IAAV,QACU,EAAV,aADU,IAAV,QAEU,EAAV,oBACA,KAXQ,IAAR,QAYQ,EAAR,YAEAW,OAAA,YAAQ,IAAR,QAAQ,IAAR,QACQ,EAAR,qBAGI1B,UAAW,SAAfA,GAAA,mCACM/C,KAAK0E,QACXC,QADA,2CACA9B,GAAA,CACQ,OAAR+B,SACQ,WAARC,WAEAhB,MAAA,YACQ,OADA,IAAR,QAAQ,IAAR,QACA,gDAEAA,MAAA,YAAQ,IAAR,QAAQ,IAAR,QACQ,EAAR,+BADQ,IAAR,QAEQ,EAAR,oBAFQ,IAAR,QAGQ,EAAR,aAHQ,IAAR,QAIQ,YAARC,WAAU,IAAV,QAAU,IAAV,QACU,EAAV,eACA,KANQ,IAAR,QAOQ,EAAR,eC3N2Y,I,UCOvYgB,GAAY,OACd,EACAhF,EACAqD,GACA,EACA,KACA,KACA,MAIF,EAAe2B,EAAiB","sources":["webpack://@cosmosc2/tool-admin/../cosmosc2-tool-common/src/services/api.js","webpack://@cosmosc2/tool-admin/../cosmosc2-tool-common/src/services/axios.js","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/GemsTab.vue?7a5a","webpack://@cosmosc2/tool-admin/src/tools/CosmosAdmin/tabs/GemsTab.vue","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/GemsTab.vue?487a","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/GemsTab.vue"],"sourcesContent":["/*\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\nimport axios from './axios.js'\n\nconst request = async function (\n method,\n url,\n { data, params = {}, headers, noAuth = false, noScope = false } = {}\n) {\n if (!noAuth) {\n try {\n await CosmosAuth.updateToken(CosmosAuth.defaultMinValidity)\n } catch (error) {\n CosmosAuth.login()\n }\n headers['Authorization'] = localStorage.cosmosToken\n }\n if (!noScope && !params['scope']) {\n params['scope'] = localStorage.scope\n }\n return axios({\n method,\n url,\n data,\n params,\n headers,\n })\n}\n\nconst acceptOnlyDefaultHeaders = {\n Accept: 'application/json',\n}\n\nconst fullDefaultHeaders = {\n ...acceptOnlyDefaultHeaders,\n 'Content-Type': 'application/json',\n}\n\nexport default {\n get: function (\n path,\n { params, headers = acceptOnlyDefaultHeaders, noScope, noAuth } = {}\n ) {\n return request('get', path, { params, headers, noScope, noAuth })\n },\n\n put: function (\n path,\n { data, params, headers = fullDefaultHeaders, noScope, noAuth } = {}\n ) {\n return request('put', path, { data, params, headers, noScope, noAuth })\n },\n\n post: function (\n path,\n { data, params, headers = fullDefaultHeaders, noScope, noAuth } = {}\n ) {\n return request('post', path, { data, params, headers, noScope, noAuth })\n },\n\n delete: function (\n path,\n { params, headers = acceptOnlyDefaultHeaders, noScope, noAuth } = {}\n ) {\n return request('delete', path, { params, headers, noScope, noAuth })\n },\n}\n","/*\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\nimport axios from 'axios'\nimport Vue from 'vue'\n\nconst vueInstance = new Vue()\n\nconst axiosInstance = axios.create({\n baseURL: location.origin,\n timeout: 10000,\n params: {},\n})\n\naxiosInstance.interceptors.response.use(\n (response) => response,\n (error) => {\n if (error.response.status === 401) {\n delete localStorage.cosmosToken\n CosmosAuth.login(location.href)\n } else {\n let body = `HTTP ${error.response.status} - `\n if (error.response?.data?.message) {\n body += `${error.response.data.message}`\n } else if (error.response?.data?.exception) {\n body += `${error.response.data.exception}`\n } else if (error.response?.data?.error?.message) {\n if (error.response.data.error.class) {\n body += `${error.response.data.error.class} `\n }\n body += `${error.response.data.error.message}`\n } else {\n body += `${error.response?.data}`\n }\n vueInstance.$notify.serious({\n title: 'Network error',\n body,\n })\n }\n throw error\n }\n)\n\nexport default axiosInstance\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('v-row',{attrs:{\"no-gutters\":\"\"}},[_c('v-col',[_c('v-file-input',{ref:\"fileInput\",staticClass:\"mx-2\",attrs:{\"multiple\":\"\",\"show-size\":\"\",\"accept\":\".gem\",\"label\":\"Click to select .gem file(s) to add to internal gem server\"},model:{value:(_vm.files),callback:function ($$v) {_vm.files=$$v},expression:\"files\"}})],1)],1),_c('v-row',{staticClass:\"px-2 pb-2\",attrs:{\"no-gutters\":\"\"}},[_c('v-btn',{staticClass:\"mx-2\",attrs:{\"data-test\":\"gemDownload\",\"disabled\":_vm.files.length > 0},on:{\"click\":function($event){_vm.showDownloadDialog = true}}},[_c('v-icon',{attrs:{\"left\":\"\",\"dark\":\"\"}},[_vm._v(\"mdi-cloud-download\")]),_c('span',[_vm._v(\" Download \")])],1),_c('v-spacer'),_c('v-btn',{staticClass:\"mx-2\",attrs:{\"color\":\"primary\",\"data-test\":\"gemUpload\",\"disabled\":_vm.files.length < 1,\"loading\":_vm.loadingGem},on:{\"click\":function($event){return _vm.upload()}},scopedSlots:_vm._u([{key:\"loader\",fn:function(){return [_c('span',[_vm._v(\"Loading...\")])]},proxy:true}])},[_c('v-icon',{attrs:{\"left\":\"\",\"dark\":\"\"}},[_vm._v(\"mdi-cloud-upload\")]),_c('span',[_vm._v(\" Upload \")])],1)],1),_c('v-alert',{attrs:{\"dismissible\":\"\",\"transition\":\"scale-transition\",\"type\":_vm.alertType},domProps:{\"textContent\":_vm._s(_vm.alert)},model:{value:(_vm.showAlert),callback:function ($$v) {_vm.showAlert=$$v},expression:\"showAlert\"}}),(Object.keys(_vm.processes).length > 0)?_c('v-list',{attrs:{\"data-test\":\"processList\"}},_vm._l((_vm.processes),function(process){return _c('div',{key:process.name},[_c('v-list-item',[_c('v-list-item-content',[_c('v-list-item-title',{domProps:{\"textContent\":_vm._s('Installing: ' + process.detail + ' - ' + process.state)}}),_c('v-list-item-subtitle',{domProps:{\"textContent\":_vm._s(' Updated At: ' + _vm.formatDate(process.updated_at))}})],1),(process.state !== 'Running')?_c('v-list-item-icon',[_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.showOutput(process)}}},'v-icon',attrs,false),on),[_vm._v(\" mdi-eye \")])]}}],null,true)},[_c('span',[_vm._v(\"Show Output\")])])],1):_vm._e()],1),_c('v-divider')],1)}),0):_vm._e(),_c('v-list',{attrs:{\"data-test\":\"gemList\"}},_vm._l((_vm.gems),function(gem,index){return _c('div',{key:index},[_c('v-list-item',[_c('v-list-item-content',[_c('v-list-item-title',{domProps:{\"textContent\":_vm._s(gem)}})],1),_c('v-list-item-icon',[_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.deleteGem(gem)}}},'v-icon',attrs,false),on),[_vm._v(\" mdi-delete \")])]}}],null,true)},[_c('span',[_vm._v(\"Delete Gem\")])])],1)],1),(index < _vm.gems.length - 1)?_c('v-divider',{key:index}):_vm._e()],1)}),0),_c('download-dialog',{model:{value:(_vm.showDownloadDialog),callback:function ($$v) {_vm.showDownloadDialog=$$v},expression:\"showDownloadDialog\"}}),_c('simple-text-dialog',{attrs:{\"title\":\"Process Output\",\"text\":_vm.processOutput},model:{value:(_vm.showProcessOutput),callback:function ($$v) {_vm.showProcessOutput=$$v},expression:\"showProcessOutput\"}})],1)}\nvar staticRenderFns = []\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 <div>\n <v-row no-gutters>\n <v-col>\n <v-file-input\n v-model=\"files\"\n multiple\n show-size\n accept=\".gem\"\n class=\"mx-2\"\n label=\"Click to select .gem file(s) to add to internal gem server\"\n ref=\"fileInput\"\n />\n </v-col>\n </v-row>\n <v-row no-gutters class=\"px-2 pb-2\">\n <v-btn\n @click=\"showDownloadDialog = true\"\n class=\"mx-2\"\n data-test=\"gemDownload\"\n :disabled=\"files.length > 0\"\n >\n <v-icon left dark>mdi-cloud-download</v-icon>\n <span> Download </span>\n </v-btn>\n <v-spacer />\n <v-btn\n @click=\"upload()\"\n class=\"mx-2\"\n color=\"primary\"\n data-test=\"gemUpload\"\n :disabled=\"files.length < 1\"\n :loading=\"loadingGem\"\n >\n <v-icon left dark>mdi-cloud-upload</v-icon>\n <span> Upload </span>\n <template v-slot:loader>\n <span>Loading...</span>\n </template>\n </v-btn>\n </v-row>\n <v-alert\n v-model=\"showAlert\"\n v-text=\"alert\"\n dismissible\n transition=\"scale-transition\"\n :type=\"alertType\"\n />\n <v-list v-if=\"Object.keys(processes).length > 0\" data-test=\"processList\">\n <div v-for=\"process in processes\" :key=\"process.name\">\n <v-list-item>\n <v-list-item-content>\n <v-list-item-title\n v-text=\"'Installing: ' + process.detail + ' - ' + process.state\"\n />\n <v-list-item-subtitle\n v-text=\"' Updated At: ' + formatDate(process.updated_at)\"\n ></v-list-item-subtitle>\n </v-list-item-content>\n <v-list-item-icon v-if=\"process.state !== 'Running'\">\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-icon @click=\"showOutput(process)\" v-bind=\"attrs\" v-on=\"on\">\n mdi-eye\n </v-icon>\n </template>\n <span>Show Output</span>\n </v-tooltip>\n </v-list-item-icon>\n </v-list-item>\n <v-divider />\n </div>\n </v-list>\n <v-list data-test=\"gemList\">\n <div v-for=\"(gem, index) in gems\" :key=\"index\">\n <v-list-item>\n <v-list-item-content>\n <v-list-item-title v-text=\"gem\" />\n </v-list-item-content>\n <v-list-item-icon>\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-icon @click=\"deleteGem(gem)\" v-bind=\"attrs\" v-on=\"on\">\n mdi-delete\n </v-icon>\n </template>\n <span>Delete Gem</span>\n </v-tooltip>\n </v-list-item-icon>\n </v-list-item>\n <v-divider v-if=\"index < gems.length - 1\" :key=\"index\" />\n </div>\n </v-list>\n <download-dialog v-model=\"showDownloadDialog\" />\n <simple-text-dialog\n v-model=\"showProcessOutput\"\n title=\"Process Output\"\n :text=\"processOutput\"\n />\n </div>\n</template>\n\n<script>\nimport { toDate, format } from 'date-fns'\nimport Api from '@cosmosc2/tool-common/src/services/api'\nimport DownloadDialog from '@/tools/CosmosAdmin/DownloadDialog'\nimport SimpleTextDialog from '@cosmosc2/tool-common/src/components/SimpleTextDialog'\n\nexport default {\n components: {\n DownloadDialog,\n SimpleTextDialog,\n },\n data() {\n return {\n showDownloadDialog: false,\n showProcessOutput: false,\n processOutput: '',\n files: [],\n loadingGem: false,\n gems: [],\n processes: {},\n alert: '',\n alertType: 'success',\n showAlert: false,\n }\n },\n mounted() {\n this.update()\n this.updateProcesses()\n },\n methods: {\n showOutput: function (process) {\n this.processOutput = process.output\n this.showProcessOutput = true\n },\n update() {\n Api.get('/cosmos-api/gems').then((response) => {\n this.gems = response.data\n })\n },\n updateProcesses: function () {\n Api.get('/cosmos-api/process_status/gem_install').then((response) => {\n this.processes = response.data\n if (Object.keys(this.processes).length > 0) {\n setTimeout(() => {\n this.updateProcesses()\n this.update()\n }, 10000)\n }\n })\n },\n formatDate(nanoSecs) {\n return format(\n toDate(parseInt(nanoSecs) / 1_000_000),\n 'yyyy-MM-dd HH:mm:ss.SSS'\n )\n },\n upload: function () {\n this.loadingGem = true\n const promises = this.files.map((file) => {\n const formData = new FormData()\n formData.append('gem', file, file.name)\n return Api.post('/cosmos-api/gems', { data: formData })\n })\n Promise.all(promises)\n .then((responses) => {\n this.alert = `Uploaded ${responses.length} gem${\n responses.length > 1 ? 's' : ''\n }`\n this.alertType = 'success'\n this.showAlert = true\n this.loadingGem = false\n this.files = []\n setTimeout(() => {\n this.showAlert = false\n this.updateProcesses()\n }, 5000)\n this.update()\n })\n .catch((error) => {\n this.loadingPlugin = false\n })\n },\n deleteGem: function (gem) {\n this.$dialog\n .confirm(`Are you sure you want to remove: ${gem}`, {\n okText: 'Delete',\n cancelText: 'Cancel',\n })\n .then(function (dialog) {\n return Api.delete(`/cosmos-api/gems/${gem}`)\n })\n .then((response) => {\n this.alert = `Removed gem ${gem}`\n this.alertType = 'success'\n this.showAlert = true\n setTimeout(() => {\n this.showAlert = false\n }, 5000)\n this.update()\n })\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./GemsTab.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./GemsTab.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./GemsTab.vue?vue&type=template&id=5fbf694a&\"\nimport script from \"./GemsTab.vue?vue&type=script&lang=js&\"\nexport * from \"./GemsTab.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"names":["request","method","url","data","params","headers","noAuth","noScope","CosmosAuth","updateToken","defaultMinValidity","login","localStorage","cosmosToken","scope","axios","acceptOnlyDefaultHeaders","Accept","fullDefaultHeaders","get","path","put","post","delete","vueInstance","Vue","axiosInstance","baseURL","location","origin","timeout","interceptors","response","use","error","status","href","body","message","exception","class","$notify","serious","title","render","_vm","this","_h","$createElement","_c","_self","attrs","ref","staticClass","model","value","callback","$$v","files","expression","length","on","$event","showDownloadDialog","_v","loadingGem","upload","scopedSlots","_u","key","fn","proxy","alertType","domProps","_s","alert","showAlert","Object","keys","processes","_l","process","name","detail","state","formatDate","updated_at","_g","_b","showOutput","_e","gem","index","deleteGem","gems","processOutput","showProcessOutput","staticRenderFns","components","DownloadDialog","SimpleTextDialog","mounted","update","updateProcesses","methods","output","Api","then","setTimeout","nanoSecs","format","toDate","formData","append","file","Promise","all","promises","responses","catch","$dialog","confirm","okText","cancelText","component"],"sourceRoot":""}
1
+ {"version":3,"file":"js/840.js","mappings":"mLAqBMA,EAAO,kDAAG,WACdC,EACAC,GAFc,uJAGoD,GAAhEC,EAHY,EAGZA,KAHY,IAGNC,OAAAA,OAHM,MAGG,GAHH,EAGOC,EAHP,EAGOA,QAHP,IAGgBC,OAAAA,OAHhB,aAGgCC,QAAAA,OAHhC,SAKTD,EALS,0CAOJE,WAAWC,YAAYD,WAAWE,oBAP9B,0DASVF,WAAWG,QATD,QAWZN,EAAQ,iBAAmBO,aAAaC,YAX5B,eAaTN,GAAYH,EAAO,WACtBA,EAAO,SAAWQ,aAAaE,OAdnB,mBAgBPC,EAAAA,EAAAA,GAAM,CACXd,OAAAA,EACAC,IAAAA,EACAC,KAAAA,EACAC,OAAAA,EACAC,QAAAA,KArBY,yDAAH,wDAyBPW,EAA2B,CAC/BC,OAAQ,oBAGJC,GAAqB,kBACtBF,GADmB,IAEtB,eAAgB,qBAGlB,QACEG,IAAK,SACHC,GAEA,6DADkE,GAAhEhB,EACF,EADEA,OACF,IADUC,QAAAA,OACV,MADoBW,EACpB,EAD8CT,EAC9C,EAD8CA,QAASD,EACvD,EADuDA,OAEvD,OAAON,EAAQ,MAAOoB,EAAM,CAAEhB,OAAAA,EAAQC,QAAAA,EAASE,QAAAA,EAASD,OAAAA,KAG1De,IAAK,SACHD,GAEA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,EAAAA,MAFA,YAGA,6BAAA5G,KAAAA,QALA,YAOA6G,QAAAA,IAAAA,GACAC,MAAA,oCACA,mDACAC,EAAAA,OAAAA,GAAAA,IAAAA,EAAAA,GAAAA,KAAAA,MAAAA,IAAAA,EAAAA,GAAAA,KAAAA,KAFA,YAIA,sBAJA,YAKA,eALA,YAMA,gBANA,YAOA,WAPA,YAQAN,YAAAA,WAAA,wBACA,eADA,YAEA,sBACA,KAXA,YAYA,cAEAO,OAAA,oCACA,uBAGApB,UAAAA,SAAAA,GAAA,mCACA,aACAqB,QADA,2CACAvB,GAAA,CACAwB,OAAAA,SACAC,WAAAA,WAEAL,MAAA,YACA,OADA,wBACA,gDAEAA,MAAA,oCACA,iCADA,YAEA,sBAFA,YAGA,eAHA,YAIAL,YAAAA,WAAA,wBACA,iBACA,KANA,YAOA,iBC3N2Y,I,UCOvYW,GAAY,OACd,EACAzE,EACAqD,GACA,EACA,KACA,KACA,MAIF,EAAeoB,EAAiB","sources":["webpack://@cosmosc2/tool-admin/../cosmosc2-tool-common/src/services/api.js","webpack://@cosmosc2/tool-admin/../cosmosc2-tool-common/src/services/axios.js","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/GemsTab.vue?7a5a","webpack://@cosmosc2/tool-admin/src/tools/CosmosAdmin/tabs/GemsTab.vue","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/GemsTab.vue?487a","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/GemsTab.vue"],"sourcesContent":["/*\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\nimport axios from './axios.js'\n\nconst request = async function (\n method,\n url,\n { data, params = {}, headers, noAuth = false, noScope = false } = {}\n) {\n if (!noAuth) {\n try {\n await CosmosAuth.updateToken(CosmosAuth.defaultMinValidity)\n } catch (error) {\n CosmosAuth.login()\n }\n headers['Authorization'] = localStorage.cosmosToken\n }\n if (!noScope && !params['scope']) {\n params['scope'] = localStorage.scope\n }\n return axios({\n method,\n url,\n data,\n params,\n headers,\n })\n}\n\nconst acceptOnlyDefaultHeaders = {\n Accept: 'application/json',\n}\n\nconst fullDefaultHeaders = {\n ...acceptOnlyDefaultHeaders,\n 'Content-Type': 'application/json',\n}\n\nexport default {\n get: function (\n path,\n { params, headers = acceptOnlyDefaultHeaders, noScope, noAuth } = {}\n ) {\n return request('get', path, { params, headers, noScope, noAuth })\n },\n\n put: function (\n path,\n { data, params, headers = fullDefaultHeaders, noScope, noAuth } = {}\n ) {\n return request('put', path, { data, params, headers, noScope, noAuth })\n },\n\n post: function (\n path,\n { data, params, headers = fullDefaultHeaders, noScope, noAuth } = {}\n ) {\n return request('post', path, { data, params, headers, noScope, noAuth })\n },\n\n delete: function (\n path,\n { params, headers = acceptOnlyDefaultHeaders, noScope, noAuth } = {}\n ) {\n return request('delete', path, { params, headers, noScope, noAuth })\n },\n}\n","/*\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\nimport axios from 'axios'\nimport Vue from 'vue'\n\nconst vueInstance = new Vue()\n\nconst axiosInstance = axios.create({\n baseURL: location.origin,\n timeout: 10000,\n params: {},\n})\n\naxiosInstance.interceptors.response.use(\n (response) => response,\n (error) => {\n if (error.response.status === 401) {\n delete localStorage.cosmosToken\n CosmosAuth.login(location.href)\n } else {\n let body = `HTTP ${error.response.status} - `\n if (error.response?.statusText) {\n body += `${error.response.statusText} `\n }\n if (error.response?.config?.data) {\n body += `${error.response.config.data} `\n }\n if (error.response?.data?.message) {\n body += `${error.response.data.message}`\n } else if (error.response?.data?.exception) {\n body += `${error.response.data.exception}`\n } else if (error.response?.data?.error?.message) {\n if (error.response.data.error.class) {\n body += `${error.response.data.error.class} `\n }\n body += `${error.response.data.error.message}`\n } else {\n body += `${error.response?.data}`\n }\n vueInstance.$notify.serious({\n title: 'Network error',\n body,\n })\n }\n throw error\n }\n)\n\nexport default axiosInstance\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('v-row',{attrs:{\"no-gutters\":\"\"}},[_c('v-col',[_c('v-file-input',{ref:\"fileInput\",staticClass:\"mx-2\",attrs:{\"multiple\":\"\",\"show-size\":\"\",\"accept\":\".gem\",\"label\":\"Click to select .gem file(s) to add to internal gem server\"},model:{value:(_vm.files),callback:function ($$v) {_vm.files=$$v},expression:\"files\"}})],1)],1),_c('v-row',{staticClass:\"px-2 pb-2\",attrs:{\"no-gutters\":\"\"}},[_c('v-btn',{staticClass:\"mx-2\",attrs:{\"data-test\":\"gemDownload\",\"disabled\":_vm.files.length > 0},on:{\"click\":function($event){_vm.showDownloadDialog = true}}},[_c('v-icon',{attrs:{\"left\":\"\",\"dark\":\"\"}},[_vm._v(\"mdi-cloud-download\")]),_c('span',[_vm._v(\" Download \")])],1),_c('v-spacer'),_c('v-btn',{staticClass:\"mx-2\",attrs:{\"color\":\"primary\",\"data-test\":\"gemUpload\",\"disabled\":_vm.files.length < 1,\"loading\":_vm.loadingGem},on:{\"click\":function($event){return _vm.upload()}},scopedSlots:_vm._u([{key:\"loader\",fn:function(){return [_c('span',[_vm._v(\"Loading...\")])]},proxy:true}])},[_c('v-icon',{attrs:{\"left\":\"\",\"dark\":\"\"}},[_vm._v(\"mdi-cloud-upload\")]),_c('span',[_vm._v(\" Upload \")])],1)],1),_c('v-alert',{attrs:{\"dismissible\":\"\",\"transition\":\"scale-transition\",\"type\":_vm.alertType},domProps:{\"textContent\":_vm._s(_vm.alert)},model:{value:(_vm.showAlert),callback:function ($$v) {_vm.showAlert=$$v},expression:\"showAlert\"}}),(Object.keys(_vm.processes).length > 0)?_c('v-list',{attrs:{\"data-test\":\"processList\"}},_vm._l((_vm.processes),function(process){return _c('div',{key:process.name},[_c('v-list-item',[_c('v-list-item-content',[_c('v-list-item-title',{domProps:{\"textContent\":_vm._s('Installing: ' + process.detail + ' - ' + process.state)}}),_c('v-list-item-subtitle',{domProps:{\"textContent\":_vm._s(' Updated At: ' + _vm.formatDate(process.updated_at))}})],1),(process.state !== 'Running')?_c('v-list-item-icon',[_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.showOutput(process)}}},'v-icon',attrs,false),on),[_vm._v(\" mdi-eye \")])]}}],null,true)},[_c('span',[_vm._v(\"Show Output\")])])],1):_vm._e()],1),_c('v-divider')],1)}),0):_vm._e(),_c('v-list',{attrs:{\"data-test\":\"gemList\"}},_vm._l((_vm.gems),function(gem,index){return _c('div',{key:index},[_c('v-list-item',[_c('v-list-item-content',[_c('v-list-item-title',{domProps:{\"textContent\":_vm._s(gem)}})],1),_c('v-list-item-icon',[_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.deleteGem(gem)}}},'v-icon',attrs,false),on),[_vm._v(\" mdi-delete \")])]}}],null,true)},[_c('span',[_vm._v(\"Delete Gem\")])])],1)],1),(index < _vm.gems.length - 1)?_c('v-divider',{key:index}):_vm._e()],1)}),0),_c('download-dialog',{model:{value:(_vm.showDownloadDialog),callback:function ($$v) {_vm.showDownloadDialog=$$v},expression:\"showDownloadDialog\"}}),_c('simple-text-dialog',{attrs:{\"title\":\"Process Output\",\"text\":_vm.processOutput},model:{value:(_vm.showProcessOutput),callback:function ($$v) {_vm.showProcessOutput=$$v},expression:\"showProcessOutput\"}})],1)}\nvar staticRenderFns = []\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 <div>\n <v-row no-gutters>\n <v-col>\n <v-file-input\n v-model=\"files\"\n multiple\n show-size\n accept=\".gem\"\n class=\"mx-2\"\n label=\"Click to select .gem file(s) to add to internal gem server\"\n ref=\"fileInput\"\n />\n </v-col>\n </v-row>\n <v-row no-gutters class=\"px-2 pb-2\">\n <v-btn\n @click=\"showDownloadDialog = true\"\n class=\"mx-2\"\n data-test=\"gemDownload\"\n :disabled=\"files.length > 0\"\n >\n <v-icon left dark>mdi-cloud-download</v-icon>\n <span> Download </span>\n </v-btn>\n <v-spacer />\n <v-btn\n @click=\"upload()\"\n class=\"mx-2\"\n color=\"primary\"\n data-test=\"gemUpload\"\n :disabled=\"files.length < 1\"\n :loading=\"loadingGem\"\n >\n <v-icon left dark>mdi-cloud-upload</v-icon>\n <span> Upload </span>\n <template v-slot:loader>\n <span>Loading...</span>\n </template>\n </v-btn>\n </v-row>\n <v-alert\n v-model=\"showAlert\"\n v-text=\"alert\"\n dismissible\n transition=\"scale-transition\"\n :type=\"alertType\"\n />\n <v-list v-if=\"Object.keys(processes).length > 0\" data-test=\"processList\">\n <div v-for=\"process in processes\" :key=\"process.name\">\n <v-list-item>\n <v-list-item-content>\n <v-list-item-title\n v-text=\"'Installing: ' + process.detail + ' - ' + process.state\"\n />\n <v-list-item-subtitle\n v-text=\"' Updated At: ' + formatDate(process.updated_at)\"\n ></v-list-item-subtitle>\n </v-list-item-content>\n <v-list-item-icon v-if=\"process.state !== 'Running'\">\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-icon @click=\"showOutput(process)\" v-bind=\"attrs\" v-on=\"on\">\n mdi-eye\n </v-icon>\n </template>\n <span>Show Output</span>\n </v-tooltip>\n </v-list-item-icon>\n </v-list-item>\n <v-divider />\n </div>\n </v-list>\n <v-list data-test=\"gemList\">\n <div v-for=\"(gem, index) in gems\" :key=\"index\">\n <v-list-item>\n <v-list-item-content>\n <v-list-item-title v-text=\"gem\" />\n </v-list-item-content>\n <v-list-item-icon>\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-icon @click=\"deleteGem(gem)\" v-bind=\"attrs\" v-on=\"on\">\n mdi-delete\n </v-icon>\n </template>\n <span>Delete Gem</span>\n </v-tooltip>\n </v-list-item-icon>\n </v-list-item>\n <v-divider v-if=\"index < gems.length - 1\" :key=\"index\" />\n </div>\n </v-list>\n <download-dialog v-model=\"showDownloadDialog\" />\n <simple-text-dialog\n v-model=\"showProcessOutput\"\n title=\"Process Output\"\n :text=\"processOutput\"\n />\n </div>\n</template>\n\n<script>\nimport { toDate, format } from 'date-fns'\nimport Api from '@cosmosc2/tool-common/src/services/api'\nimport DownloadDialog from '@/tools/CosmosAdmin/DownloadDialog'\nimport SimpleTextDialog from '@cosmosc2/tool-common/src/components/SimpleTextDialog'\n\nexport default {\n components: {\n DownloadDialog,\n SimpleTextDialog,\n },\n data() {\n return {\n showDownloadDialog: false,\n showProcessOutput: false,\n processOutput: '',\n files: [],\n loadingGem: false,\n gems: [],\n processes: {},\n alert: '',\n alertType: 'success',\n showAlert: false,\n }\n },\n mounted() {\n this.update()\n this.updateProcesses()\n },\n methods: {\n showOutput: function (process) {\n this.processOutput = process.output\n this.showProcessOutput = true\n },\n update() {\n Api.get('/cosmos-api/gems').then((response) => {\n this.gems = response.data\n })\n },\n updateProcesses: function () {\n Api.get('/cosmos-api/process_status/gem_install').then((response) => {\n this.processes = response.data\n if (Object.keys(this.processes).length > 0) {\n setTimeout(() => {\n this.updateProcesses()\n this.update()\n }, 10000)\n }\n })\n },\n formatDate(nanoSecs) {\n return format(\n toDate(parseInt(nanoSecs) / 1_000_000),\n 'yyyy-MM-dd HH:mm:ss.SSS'\n )\n },\n upload: function () {\n this.loadingGem = true\n const promises = this.files.map((file) => {\n const formData = new FormData()\n formData.append('gem', file, file.name)\n return Api.post('/cosmos-api/gems', { data: formData })\n })\n Promise.all(promises)\n .then((responses) => {\n this.alert = `Uploaded ${responses.length} gem${\n responses.length > 1 ? 's' : ''\n }`\n this.alertType = 'success'\n this.showAlert = true\n this.loadingGem = false\n this.files = []\n setTimeout(() => {\n this.showAlert = false\n this.updateProcesses()\n }, 5000)\n this.update()\n })\n .catch((error) => {\n this.loadingPlugin = false\n })\n },\n deleteGem: function (gem) {\n this.$dialog\n .confirm(`Are you sure you want to remove: ${gem}`, {\n okText: 'Delete',\n cancelText: 'Cancel',\n })\n .then(function (dialog) {\n return Api.delete(`/cosmos-api/gems/${gem}`)\n })\n .then((response) => {\n this.alert = `Removed gem ${gem}`\n this.alertType = 'success'\n this.showAlert = true\n setTimeout(() => {\n this.showAlert = false\n }, 5000)\n this.update()\n })\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./GemsTab.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./GemsTab.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./GemsTab.vue?vue&type=template&id=5fbf694a&\"\nimport script from \"./GemsTab.vue?vue&type=script&lang=js&\"\nexport * from \"./GemsTab.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"names":["request","method","url","data","params","headers","noAuth","noScope","CosmosAuth","updateToken","defaultMinValidity","login","localStorage","cosmosToken","scope","axios","acceptOnlyDefaultHeaders","Accept","fullDefaultHeaders","get","path","put","post","delete","vueInstance","Vue","axiosInstance","baseURL","location","origin","timeout","interceptors","response","use","error","status","href","body","statusText","config","message","exception","class","$notify","serious","title","render","_vm","this","_h","$createElement","_c","_self","attrs","ref","staticClass","model","value","callback","$$v","files","expression","length","on","$event","showDownloadDialog","_v","loadingGem","upload","scopedSlots","_u","key","fn","proxy","alertType","domProps","_s","alert","showAlert","Object","keys","processes","_l","process","name","detail","state","formatDate","updated_at","_g","_b","showOutput","_e","gem","index","deleteGem","gems","processOutput","showProcessOutput","staticRenderFns","components","DownloadDialog","SimpleTextDialog","mounted","methods","update","Api","updateProcesses","setTimeout","nanoSecs","toDate","formData","Promise","then","responses","catch","confirm","okText","cancelText","component"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"js/864.js","mappings":"mLAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,QAAQ,CAACE,YAAY,CAAC,eAAe,QAAQC,MAAM,CAAC,aAAa,GAAG,MAAQ,WAAW,CAACH,EAAG,QAAQ,CAACG,MAAM,CAAC,KAAO,MAAM,CAACH,EAAG,QAAQ,CAACG,MAAM,CAAC,MAAQ,GAAG,MAAQ,UAAU,YAAY,UAAU,UAAYP,EAAIQ,OAASR,EAAIS,MAAQT,EAAIU,MAAMC,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOZ,EAAIa,SAAS,CAACb,EAAIc,GAAG,SAASV,EAAG,SAAS,CAACG,MAAM,CAAC,MAAQ,GAAG,KAAO,IAAIQ,SAAS,CAAC,YAAcf,EAAIgB,GAAGhB,EAAIU,UAAU,IAAI,GAAGN,EAAG,QAAQ,CAACG,MAAM,CAAC,KAAO,MAAM,CAACH,EAAG,eAAe,CAACa,YAAY,OAAOV,MAAM,CAAC,MAAQ,aAAaW,MAAM,CAACC,MAAOnB,EAAQ,KAAEoB,SAAS,SAAUC,GAAMrB,EAAIU,KAAKW,GAAKC,WAAW,WAAW,GAAGlB,EAAG,QAAQ,CAACG,MAAM,CAAC,KAAO,MAAM,CAACH,EAAG,eAAe,CAACa,YAAY,OAAOV,MAAM,CAAC,MAAQ,aAAaW,MAAM,CAACC,MAAOnB,EAAQ,KAAEoB,SAAS,SAAUC,GAAMrB,EAAIQ,KAAKa,GAAKC,WAAW,WAAW,GAAGlB,EAAG,QAAQ,CAACa,YAAY,OAAOV,MAAM,CAAC,KAAO,MAAM,CAACH,EAAG,eAAe,CAACG,MAAM,CAAC,MAAQ,YAAYW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BAFhB,cAJA,YASQgD,EAAAA,EAAIc,GAAQ9D,EAAK,CACfuC,KAAM,CACJiB,KAAMI,GAERT,OAAQ,CAAlBC,MAAAA,aACAC,MAAA,oCACU,EAAV,sBADA,YAEU,EAAV,oBAFA,YAGU,EAAV,aAHA,YAIUC,YAAW,WAArB,wBACY,EAAZ,eACA,KANA,YAOU,EAAV,iBArBA,eAyBI1B,WArFJ,SAqFA7B,GAAA,mCACMP,KAAKuE,QACXC,QADA,2CACAjE,GAAA,CACQ,OAARkE,SACQ,WAARC,WAEAb,MAAA,YACQ,OADA,IAAR,QAAQ,IAAR,QACA,8CACU,OAAVF,CAAY,MAAZC,gBAGAC,MAAA,YAAQ,IAAR,QAAQ,IAAR,QACQ,EAAR,gCADQ,IAAR,QAEQ,EAAR,oBAFQ,IAAR,QAGQ,EAAR,aAHQ,IAAR,QAIQ,YAARC,WAAU,IAAV,QAAU,IAAV,QACU,EAAV,eACA,KANQ,IAAR,QAOQ,EAAR,eCzO4Y,I,UCOxYa,GAAY,OACd,EACA7E,EACA8C,GACA,EACA,KACA,KACA,MAIF,EAAe+B,EAAiB","sources":["webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/ToolsTab.vue?fe88","webpack://@cosmosc2/tool-admin/src/tools/CosmosAdmin/tabs/ToolsTab.vue","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/ToolsTab.vue?5132","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/ToolsTab.vue"],"sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('v-row',{staticStyle:{\"padding-left\":\"10px\"},attrs:{\"no-gutters\":\"\",\"align\":\"center\"}},[_c('v-col',{attrs:{\"cols\":\"3\"}},[_c('v-btn',{attrs:{\"block\":\"\",\"color\":\"primary\",\"data-test\":\"toolAdd\",\"disabled\":!_vm.name || !_vm.url || !_vm.icon},on:{\"click\":function($event){return _vm.add()}}},[_vm._v(\" Add \"),_c('v-icon',{attrs:{\"right\":\"\",\"dark\":\"\"},domProps:{\"textContent\":_vm._s(_vm.icon)}})],1)],1),_c('v-col',{attrs:{\"cols\":\"3\"}},[_c('v-text-field',{staticClass:\"px-2\",attrs:{\"label\":\"Tool Icon\"},model:{value:(_vm.icon),callback:function ($$v) {_vm.icon=$$v},expression:\"icon\"}})],1),_c('v-col',{attrs:{\"cols\":\"3\"}},[_c('v-text-field',{staticClass:\"px-2\",attrs:{\"label\":\"Tool Name\"},model:{value:(_vm.name),callback:function ($$v) {_vm.name=$$v},expression:\"name\"}})],1),_c('v-col',{staticClass:\"px-2\",attrs:{\"cols\":\"3\"}},[_c('v-text-field',{attrs:{\"label\":\"Tool Url\"},model:{value:(_vm.url),callback:function ($$v) {_vm.url=$$v},expression:\"url\"}})],1)],1),_c('v-alert',{attrs:{\"type\":_vm.alertType,\"dismissible\":\"\",\"transition\":\"scale-transition\"},model:{value:(_vm.showAlert),callback:function ($$v) {_vm.showAlert=$$v},expression:\"showAlert\"}},[_vm._v(\" \"+_vm._s(_vm.alert)+\" \")]),_c('v-list',{attrs:{\"data-test\":\"toolList\",\"id\":\"toollist\"}},_vm._l((_vm.tools),function(tool,index){return _c('div',{key:tool},[_c('v-list-item',[_c('v-list-item-icon',[_c('v-icon',[_vm._v(\" mdi-drag-horizontal \")])],1),_c('v-list-item-content',[_c('v-list-item-title',{domProps:{\"textContent\":_vm._s(tool)}})],1),_c('v-list-item-icon',[_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.editTool(tool)}}},'v-icon',attrs,false),on),[_vm._v(\" mdi-pencil \")])]}}],null,true)},[_c('span',[_vm._v(\"Edit Tool\")])])],1),_c('v-list-item-icon',[_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.deleteTool(tool)}}},'v-icon',attrs,false),on),[_vm._v(\" mdi-delete \")])]}}],null,true)},[_c('span',[_vm._v(\"Delete Tool\")])])],1)],1),(index < _vm.tools.length - 1)?_c('v-divider',{key:index}):_vm._e()],1)}),0),_c('v-alert',{attrs:{\"type\":_vm.alertType,\"dismissible\":\"\",\"transition\":\"scale-transition\"},model:{value:(_vm.showAlert),callback:function ($$v) {_vm.showAlert=$$v},expression:\"showAlert\"}},[_vm._v(\" \"+_vm._s(_vm.alert)+\" \")]),(_vm.showDialog)?_c('edit-dialog',{attrs:{\"content\":_vm.jsonContent,\"title\":(\"Tool: \" + _vm.dialogTitle)},on:{\"submit\":_vm.dialogCallback},model:{value:(_vm.showDialog),callback:function ($$v) {_vm.showDialog=$$v},expression:\"showDialog\"}}):_vm._e()],1)}\nvar staticRenderFns = []\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 <div>\n <v-row no-gutters align=\"center\" style=\"padding-left: 10px\">\n <v-col cols=\"3\">\n <v-btn\n block\n color=\"primary\"\n data-test=\"toolAdd\"\n @click=\"add()\"\n :disabled=\"!name || !url || !icon\"\n >\n Add\n <v-icon right dark v-text=\"icon\" />\n </v-btn>\n </v-col>\n <v-col cols=\"3\">\n <v-text-field v-model=\"icon\" label=\"Tool Icon\" class=\"px-2\" />\n </v-col>\n <v-col cols=\"3\">\n <v-text-field v-model=\"name\" label=\"Tool Name\" class=\"px-2\" />\n </v-col>\n <v-col cols=\"3\" class=\"px-2\">\n <v-text-field v-model=\"url\" label=\"Tool Url\" />\n </v-col>\n </v-row>\n <v-alert\n :type=\"alertType\"\n v-model=\"showAlert\"\n dismissible\n transition=\"scale-transition\"\n >\n {{ alert }}\n </v-alert>\n <v-list data-test=\"toolList\" id=\"toollist\">\n <div v-for=\"(tool, index) in tools\" :key=\"tool\">\n <v-list-item>\n <v-list-item-icon>\n <v-icon> mdi-drag-horizontal </v-icon>\n </v-list-item-icon>\n <v-list-item-content>\n <v-list-item-title v-text=\"tool\" />\n </v-list-item-content>\n <v-list-item-icon>\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-icon @click=\"editTool(tool)\" v-bind=\"attrs\" v-on=\"on\">\n mdi-pencil\n </v-icon>\n </template>\n <span>Edit Tool</span>\n </v-tooltip>\n </v-list-item-icon>\n <v-list-item-icon>\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-icon @click=\"deleteTool(tool)\" v-bind=\"attrs\" v-on=\"on\">\n mdi-delete\n </v-icon>\n </template>\n <span>Delete Tool</span>\n </v-tooltip>\n </v-list-item-icon>\n </v-list-item>\n <v-divider v-if=\"index < tools.length - 1\" :key=\"index\" />\n </div>\n </v-list>\n <v-alert\n :type=\"alertType\"\n v-model=\"showAlert\"\n dismissible\n transition=\"scale-transition\"\n >\n {{ alert }}\n </v-alert>\n <edit-dialog\n v-model=\"showDialog\"\n v-if=\"showDialog\"\n :content=\"jsonContent\"\n :title=\"`Tool: ${dialogTitle}`\"\n @submit=\"dialogCallback\"\n />\n </div>\n</template>\n\n<script>\nimport Api from '@cosmosc2/tool-common/src/services/api'\nimport EditDialog from '@/tools/CosmosAdmin/EditDialog'\nimport Sortable from 'sortablejs'\n\nexport default {\n components: { EditDialog },\n data() {\n return {\n name: null,\n icon: '$astro-add-small',\n url: null,\n tools: [],\n alert: '',\n alertType: 'success',\n showAlert: false,\n jsonContent: '',\n dialogTitle: '',\n showDialog: false,\n tool_id: null,\n }\n },\n mounted() {\n this.update()\n var el = document.getElementById('toollist')\n var sortable = Sortable.create(el, { onUpdate: this.sortChanged })\n },\n methods: {\n sortChanged(evt) {\n Api.post(`/cosmos-api/tools/position/${this.tools[evt.oldIndex]}`, {\n data: {\n position: evt.newIndex,\n },\n params: { scope: 'DEFAULT' },\n }).then((response) => {\n this.alert = `Reordered tool ${this.tools[evt.oldIndex]}`\n this.alertType = 'success'\n this.showAlert = true\n setTimeout(() => {\n this.showAlert = false\n }, 5000)\n this.update()\n })\n },\n update() {\n Api.get('/cosmos-api/tools', { params: { scope: 'DEFAULT' } }).then(\n (response) => {\n this.tools = response.data\n this.name = ''\n this.url = ''\n }\n )\n },\n add() {\n Api.post('/cosmos-api/tools', {\n data: {\n id: this.name,\n json: JSON.stringify({\n name: this.name,\n icon: this.icon,\n url: this.url,\n window: 'NEW',\n }),\n },\n params: { scope: 'DEFAULT' },\n }).then((response) => {\n this.alert = `Added tool ${this.name}`\n this.alertType = 'success'\n this.showAlert = true\n setTimeout(() => {\n this.showAlert = false\n }, 5000)\n this.update()\n })\n },\n editTool(name) {\n Api.get(`/cosmos-api/tools/${name}`, {\n params: { scope: 'DEFAULT' },\n }).then((response) => {\n this.tool_id = name\n this.jsonContent = JSON.stringify(response.data, null, '\\t')\n this.dialogTitle = name\n this.showDialog = true\n })\n },\n dialogCallback(content) {\n this.showDialog = false\n if (content !== null) {\n let parsed = JSON.parse(content)\n let method = 'put'\n let url = `/cosmos-api/tools/${this.tool_id}`\n if (parsed['name'] !== this.tool_id) {\n method = 'post'\n url = '/cosmos-api/tools'\n }\n\n Api[method](url, {\n data: {\n json: content,\n },\n params: { scope: 'DEFAULT' },\n }).then((response) => {\n this.alert = 'Modified Tool'\n this.alertType = 'success'\n this.showAlert = true\n setTimeout(() => {\n this.showAlert = false\n }, 5000)\n this.update()\n })\n }\n },\n deleteTool(name) {\n this.$dialog\n .confirm(`Are you sure you want to remove: ${name}`, {\n okText: 'Delete',\n cancelText: 'Cancel',\n })\n .then(function (dialog) {\n return Api.delete(`/cosmos-api/tools/${name}`, {\n params: { scope: 'DEFAULT' },\n })\n })\n .then((response) => {\n this.alert = `Removed tool ${name}`\n this.alertType = 'success'\n this.showAlert = true\n setTimeout(() => {\n this.showAlert = false\n }, 5000)\n this.update()\n })\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./ToolsTab.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./ToolsTab.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ToolsTab.vue?vue&type=template&id=28938052&\"\nimport script from \"./ToolsTab.vue?vue&type=script&lang=js&\"\nexport * from \"./ToolsTab.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticStyle","attrs","name","url","icon","on","$event","add","_v","domProps","_s","staticClass","model","value","callback","$$v","expression","alertType","showAlert","alert","_l","tool","index","key","scopedSlots","_u","fn","ref","_g","_b","editTool","deleteTool","tools","length","_e","jsonContent","dialogTitle","dialogCallback","showDialog","staticRenderFns","components","EditDialog","data","tool_id","mounted","update","el","onUpdate","methods","sortChanged","evt","Api","position","newIndex","params","scope","then","setTimeout","id","json","JSON","stringify","window","content","parsed","method","$dialog","confirm","okText","cancelText","component"],"sourceRoot":""}
1
+ {"version":3,"file":"js/864.js","mappings":"mLAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,QAAQ,CAACE,YAAY,CAAC,eAAe,QAAQC,MAAM,CAAC,aAAa,GAAG,MAAQ,WAAW,CAACH,EAAG,QAAQ,CAACG,MAAM,CAAC,KAAO,MAAM,CAACH,EAAG,QAAQ,CAACG,MAAM,CAAC,MAAQ,GAAG,MAAQ,UAAU,YAAY,UAAU,UAAYP,EAAIQ,OAASR,EAAIS,MAAQT,EAAIU,MAAMC,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOZ,EAAIa,SAAS,CAACb,EAAIc,GAAG,SAASV,EAAG,SAAS,CAACG,MAAM,CAAC,MAAQ,GAAG,KAAO,IAAIQ,SAAS,CAAC,YAAcf,EAAIgB,GAAGhB,EAAIU,UAAU,IAAI,GAAGN,EAAG,QAAQ,CAACG,MAAM,CAAC,KAAO,MAAM,CAACH,EAAG,eAAe,CAACa,YAAY,OAAOV,MAAM,CAAC,MAAQ,aAAaW,MAAM,CAACC,MAAOnB,EAAQ,KAAEoB,SAAS,SAAUC,GAAMrB,EAAIU,KAAKW,GAAKC,WAAW,WAAW,GAAGlB,EAAG,QAAQ,CAACG,MAAM,CAAC,KAAO,MAAM,CAACH,EAAG,eAAe,CAACa,YAAY,OAAOV,MAAM,CAAC,MAAQ,aAAaW,MAAM,CAACC,MAAOnB,EAAQ,KAAEoB,SAAS,SAAUC,GAAMrB,EAAIQ,KAAKa,GAAKC,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,YAEA,sBAFA,YAGA,eAHA,YAIAC,YAAAA,WAAA,wBACA,iBACA,KANA,YAOA,mBArBA,eAyBAvB,WArFA,SAqFA7B,GAAA,mCACA,aACA2D,QADA,2CACA3D,GAAA,CACA4D,OAAAA,SACAC,WAAAA,WAEAV,MAAA,YACA,OADA,wBACA,8CACAF,OAAAA,CAAAC,MAAAA,gBAGAC,MAAA,oCACA,kCADA,YAEA,sBAFA,YAGA,eAHA,YAIAC,YAAAA,WAAA,wBACA,iBACA,KANA,YAOA,iBCzO4Y,I,UCOxYU,GAAY,OACd,EACAvE,EACA8C,GACA,EACA,KACA,KACA,MAIF,EAAeyB,EAAiB","sources":["webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/ToolsTab.vue?fe88","webpack://@cosmosc2/tool-admin/src/tools/CosmosAdmin/tabs/ToolsTab.vue","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/ToolsTab.vue?5132","webpack://@cosmosc2/tool-admin/./src/tools/CosmosAdmin/tabs/ToolsTab.vue"],"sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('v-row',{staticStyle:{\"padding-left\":\"10px\"},attrs:{\"no-gutters\":\"\",\"align\":\"center\"}},[_c('v-col',{attrs:{\"cols\":\"3\"}},[_c('v-btn',{attrs:{\"block\":\"\",\"color\":\"primary\",\"data-test\":\"toolAdd\",\"disabled\":!_vm.name || !_vm.url || !_vm.icon},on:{\"click\":function($event){return _vm.add()}}},[_vm._v(\" Add \"),_c('v-icon',{attrs:{\"right\":\"\",\"dark\":\"\"},domProps:{\"textContent\":_vm._s(_vm.icon)}})],1)],1),_c('v-col',{attrs:{\"cols\":\"3\"}},[_c('v-text-field',{staticClass:\"px-2\",attrs:{\"label\":\"Tool Icon\"},model:{value:(_vm.icon),callback:function ($$v) {_vm.icon=$$v},expression:\"icon\"}})],1),_c('v-col',{attrs:{\"cols\":\"3\"}},[_c('v-text-field',{staticClass:\"px-2\",attrs:{\"label\":\"Tool Name\"},model:{value:(_vm.name),callback:function ($$v) {_vm.name=$$v},expression:\"name\"}})],1),_c('v-col',{staticClass:\"px-2\",attrs:{\"cols\":\"3\"}},[_c('v-text-field',{attrs:{\"label\":\"Tool Url\"},model:{value:(_vm.url),callback:function ($$v) {_vm.url=$$v},expression:\"url\"}})],1)],1),_c('v-alert',{attrs:{\"type\":_vm.alertType,\"dismissible\":\"\",\"transition\":\"scale-transition\"},model:{value:(_vm.showAlert),callback:function ($$v) {_vm.showAlert=$$v},expression:\"showAlert\"}},[_vm._v(\" \"+_vm._s(_vm.alert)+\" \")]),_c('v-list',{attrs:{\"data-test\":\"toolList\",\"id\":\"toollist\"}},_vm._l((_vm.tools),function(tool,index){return _c('div',{key:tool},[_c('v-list-item',[_c('v-list-item-icon',[_c('v-icon',[_vm._v(\" mdi-drag-horizontal \")])],1),_c('v-list-item-content',[_c('v-list-item-title',{domProps:{\"textContent\":_vm._s(tool)}})],1),_c('v-list-item-icon',[_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.editTool(tool)}}},'v-icon',attrs,false),on),[_vm._v(\" mdi-pencil \")])]}}],null,true)},[_c('span',[_vm._v(\"Edit Tool\")])])],1),_c('v-list-item-icon',[_c('v-tooltip',{attrs:{\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({on:{\"click\":function($event){return _vm.deleteTool(tool)}}},'v-icon',attrs,false),on),[_vm._v(\" mdi-delete \")])]}}],null,true)},[_c('span',[_vm._v(\"Delete Tool\")])])],1)],1),(index < _vm.tools.length - 1)?_c('v-divider',{key:index}):_vm._e()],1)}),0),_c('v-alert',{attrs:{\"type\":_vm.alertType,\"dismissible\":\"\",\"transition\":\"scale-transition\"},model:{value:(_vm.showAlert),callback:function ($$v) {_vm.showAlert=$$v},expression:\"showAlert\"}},[_vm._v(\" \"+_vm._s(_vm.alert)+\" \")]),(_vm.showDialog)?_c('edit-dialog',{attrs:{\"content\":_vm.jsonContent,\"title\":(\"Tool: \" + _vm.dialogTitle)},on:{\"submit\":_vm.dialogCallback},model:{value:(_vm.showDialog),callback:function ($$v) {_vm.showDialog=$$v},expression:\"showDialog\"}}):_vm._e()],1)}\nvar staticRenderFns = []\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 <div>\n <v-row no-gutters align=\"center\" style=\"padding-left: 10px\">\n <v-col cols=\"3\">\n <v-btn\n block\n color=\"primary\"\n data-test=\"toolAdd\"\n @click=\"add()\"\n :disabled=\"!name || !url || !icon\"\n >\n Add\n <v-icon right dark v-text=\"icon\" />\n </v-btn>\n </v-col>\n <v-col cols=\"3\">\n <v-text-field v-model=\"icon\" label=\"Tool Icon\" class=\"px-2\" />\n </v-col>\n <v-col cols=\"3\">\n <v-text-field v-model=\"name\" label=\"Tool Name\" class=\"px-2\" />\n </v-col>\n <v-col cols=\"3\" class=\"px-2\">\n <v-text-field v-model=\"url\" label=\"Tool Url\" />\n </v-col>\n </v-row>\n <v-alert\n :type=\"alertType\"\n v-model=\"showAlert\"\n dismissible\n transition=\"scale-transition\"\n >\n {{ alert }}\n </v-alert>\n <v-list data-test=\"toolList\" id=\"toollist\">\n <div v-for=\"(tool, index) in tools\" :key=\"tool\">\n <v-list-item>\n <v-list-item-icon>\n <v-icon> mdi-drag-horizontal </v-icon>\n </v-list-item-icon>\n <v-list-item-content>\n <v-list-item-title v-text=\"tool\" />\n </v-list-item-content>\n <v-list-item-icon>\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-icon @click=\"editTool(tool)\" v-bind=\"attrs\" v-on=\"on\">\n mdi-pencil\n </v-icon>\n </template>\n <span>Edit Tool</span>\n </v-tooltip>\n </v-list-item-icon>\n <v-list-item-icon>\n <v-tooltip bottom>\n <template v-slot:activator=\"{ on, attrs }\">\n <v-icon @click=\"deleteTool(tool)\" v-bind=\"attrs\" v-on=\"on\">\n mdi-delete\n </v-icon>\n </template>\n <span>Delete Tool</span>\n </v-tooltip>\n </v-list-item-icon>\n </v-list-item>\n <v-divider v-if=\"index < tools.length - 1\" :key=\"index\" />\n </div>\n </v-list>\n <v-alert\n :type=\"alertType\"\n v-model=\"showAlert\"\n dismissible\n transition=\"scale-transition\"\n >\n {{ alert }}\n </v-alert>\n <edit-dialog\n v-model=\"showDialog\"\n v-if=\"showDialog\"\n :content=\"jsonContent\"\n :title=\"`Tool: ${dialogTitle}`\"\n @submit=\"dialogCallback\"\n />\n </div>\n</template>\n\n<script>\nimport Api from '@cosmosc2/tool-common/src/services/api'\nimport EditDialog from '@/tools/CosmosAdmin/EditDialog'\nimport Sortable from 'sortablejs'\n\nexport default {\n components: { EditDialog },\n data() {\n return {\n name: null,\n icon: '$astro-add-small',\n url: null,\n tools: [],\n alert: '',\n alertType: 'success',\n showAlert: false,\n jsonContent: '',\n dialogTitle: '',\n showDialog: false,\n tool_id: null,\n }\n },\n mounted() {\n this.update()\n var el = document.getElementById('toollist')\n var sortable = Sortable.create(el, { onUpdate: this.sortChanged })\n },\n methods: {\n sortChanged(evt) {\n Api.post(`/cosmos-api/tools/position/${this.tools[evt.oldIndex]}`, {\n data: {\n position: evt.newIndex,\n },\n params: { scope: 'DEFAULT' },\n }).then((response) => {\n this.alert = `Reordered tool ${this.tools[evt.oldIndex]}`\n this.alertType = 'success'\n this.showAlert = true\n setTimeout(() => {\n this.showAlert = false\n }, 5000)\n this.update()\n })\n },\n update() {\n Api.get('/cosmos-api/tools', { params: { scope: 'DEFAULT' } }).then(\n (response) => {\n this.tools = response.data\n this.name = ''\n this.url = ''\n }\n )\n },\n add() {\n Api.post('/cosmos-api/tools', {\n data: {\n id: this.name,\n json: JSON.stringify({\n name: this.name,\n icon: this.icon,\n url: this.url,\n window: 'NEW',\n }),\n },\n params: { scope: 'DEFAULT' },\n }).then((response) => {\n this.alert = `Added tool ${this.name}`\n this.alertType = 'success'\n this.showAlert = true\n setTimeout(() => {\n this.showAlert = false\n }, 5000)\n this.update()\n })\n },\n editTool(name) {\n Api.get(`/cosmos-api/tools/${name}`, {\n params: { scope: 'DEFAULT' },\n }).then((response) => {\n this.tool_id = name\n this.jsonContent = JSON.stringify(response.data, null, '\\t')\n this.dialogTitle = name\n this.showDialog = true\n })\n },\n dialogCallback(content) {\n this.showDialog = false\n if (content !== null) {\n let parsed = JSON.parse(content)\n let method = 'put'\n let url = `/cosmos-api/tools/${this.tool_id}`\n if (parsed['name'] !== this.tool_id) {\n method = 'post'\n url = '/cosmos-api/tools'\n }\n\n Api[method](url, {\n data: {\n json: content,\n },\n params: { scope: 'DEFAULT' },\n }).then((response) => {\n this.alert = 'Modified Tool'\n this.alertType = 'success'\n this.showAlert = true\n setTimeout(() => {\n this.showAlert = false\n }, 5000)\n this.update()\n })\n }\n },\n deleteTool(name) {\n this.$dialog\n .confirm(`Are you sure you want to remove: ${name}`, {\n okText: 'Delete',\n cancelText: 'Cancel',\n })\n .then(function (dialog) {\n return Api.delete(`/cosmos-api/tools/${name}`, {\n params: { scope: 'DEFAULT' },\n })\n })\n .then((response) => {\n this.alert = `Removed tool ${name}`\n this.alertType = 'success'\n this.showAlert = true\n setTimeout(() => {\n this.showAlert = false\n }, 5000)\n this.update()\n })\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./ToolsTab.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./ToolsTab.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ToolsTab.vue?vue&type=template&id=28938052&\"\nimport script from \"./ToolsTab.vue?vue&type=script&lang=js&\"\nexport * from \"./ToolsTab.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticStyle","attrs","name","url","icon","on","$event","add","_v","domProps","_s","staticClass","model","value","callback","$$v","expression","alertType","showAlert","alert","_l","tool","index","key","scopedSlots","_u","fn","ref","_g","_b","editTool","deleteTool","tools","length","_e","jsonContent","dialogTitle","dialogCallback","showDialog","staticRenderFns","components","EditDialog","data","tool_id","mounted","onUpdate","methods","sortChanged","evt","Api","position","params","scope","then","setTimeout","update","id","json","window","content","method","confirm","okText","cancelText","component"],"sourceRoot":""}