openc3-cosmos-tool-bucketexplorer 5.4.1 → 5.4.3.pre.beta0.20230214172923
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e932a29d6c2a9db445ed962fa694d61ea3d981cf705cd0ab84b8f90d3a53f83
|
4
|
+
data.tar.gz: c6f7414c29ba3f703ae431f4bff94e3f7edc45549168cac72e812a36d4f83249
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 874e81e4eacdeed8c20f3226e10ba6382076461ffb2be17563ec745403ab222547e5cda0cbcd18126143ad042e144c6b9b409a37c7b5061c114500c22ca8d7bc
|
7
|
+
data.tar.gz: 4d47c7f6628ddea635169feeb0b9045857170a229bb95a724637ff9a3e6117ffa67acf732c7661fa06552e8515cf2bee898e07a1fb875291bf9a0f16fd677c71
|
@@ -0,0 +1,2 @@
|
|
1
|
+
(self["webpackChunk_openc3_cosmos_tool_bucketexplorer"]=self["webpackChunk_openc3_cosmos_tool_bucketexplorer"]||[]).push([[288],{1288:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return B}});t(7950),t(4908);function l(){var n="/openc3/plugins/packages/openc3-cosmos-tool-bucketexplorer/src/tools/BucketExplorer/BucketExplorer.vue",e="1ce1bcad6c48f870c6294214a3106980753a52ff",t=new Function("return this")(),o="__coverage__",i={path:"/openc3/plugins/packages/openc3-cosmos-tool-bucketexplorer/src/tools/BucketExplorer/BucketExplorer.vue",statementMap:{0:{start:{line:1,column:13},end:{line:9,column:1}},1:{start:{line:1,column:39},end:{line:1,column:43}},2:{start:{line:1,column:47},end:{line:1,column:59}},3:{start:{line:1,column:60},end:{line:8,column:1251}},4:{start:{line:1,column:247},end:{line:1,column:481}},5:{start:{line:1,column:311},end:{line:1,column:336}},6:{start:{line:1,column:336},end:{line:1,column:367}},7:{start:{line:1,column:759},end:{line:1,column:773}},8:{start:{line:8,column:134},end:{line:8,column:661}},9:{start:{line:8,column:622},end:{line:8,column:634}},10:{start:{line:8,column:714},end:{line:8,column:814}},11:{start:{line:8,column:858},end:{line:8,column:1237}},12:{start:{line:8,column:989},end:{line:8,column:1023}},13:{start:{line:8,column:1168},end:{line:8,column:1200}},14:{start:{line:10,column:22},end:{line:10,column:24}}},fnMap:{0:{name:"render",decl:{start:{line:1,column:22},end:{line:1,column:28}},loc:{start:{line:1,column:30},end:{line:9,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:224},end:{line:1,column:225}},loc:{start:{line:1,column:246},end:{line:1,column:482}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:294},end:{line:1,column:295}},loc:{start:{line:1,column:310},end:{line:1,column:368}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:1,column:743},end:{line:1,column:744}},loc:{start:{line:1,column:758},end:{line:1,column:774}},line:1},4:{name:"(anonymous_4)",decl:{start:{line:8,column:123},end:{line:8,column:124}},loc:{start:{line:8,column:133},end:{line:8,column:662}},line:8},5:{name:"(anonymous_5)",decl:{start:{line:8,column:606},end:{line:8,column:607}},loc:{start:{line:8,column:621},end:{line:8,column:635}},line:8},6:{name:"(anonymous_6)",decl:{start:{line:8,column:695},end:{line:8,column:696}},loc:{start:{line:8,column:713},end:{line:8,column:815}},line:8},7:{name:"(anonymous_7)",decl:{start:{line:8,column:839},end:{line:8,column:840}},loc:{start:{line:8,column:857},end:{line:8,column:1238}},line:8},8:{name:"(anonymous_8)",decl:{start:{line:8,column:972},end:{line:8,column:973}},loc:{start:{line:8,column:988},end:{line:8,column:1024}},line:8},9:{name:"(anonymous_9)",decl:{start:{line:8,column:1151},end:{line:8,column:1152}},loc:{start:{line:8,column:1167},end:{line:8,column:1201}},line:8}},branchMap:{0:{loc:{start:{line:8,column:866},end:{line:8,column:1065}},type:"cond-expr",locations:[{start:{line:8,column:892},end:{line:8,column:1056}},{start:{line:8,column:1057},end:{line:8,column:1065}}],line:8},1:{loc:{start:{line:8,column:1066},end:{line:8,column:1236}},type:"cond-expr",locations:[{start:{line:8,column:1092},end:{line:8,column:1227}},{start:{line:8,column:1228},end:{line:8,column:1236}}],line:8}},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},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1ce1bcad6c48f870c6294214a3106980753a52ff"},a=t[o]||(t[o]={});a[n]&&a[n].hash===e||(a[n]=i);var c=a[n];return l=function(){return c},c}l(),l().s[0]++;var o=function(){l().f[0]++;var n=(l().s[1]++,this),e=(l().s[2]++,n._self._c);return l().s[3]++,e("div",[e("top-bar",{attrs:{title:n.title}}),e("v-list",[e("span",{staticClass:"ma-2"},[n._v("Buckets (click to browse):")]),n._l(n.buckets,(function(t,o){return l().f[1]++,l().s[4]++,e("v-list-item",{key:o,on:{click:function(e){return l().f[2]++,l().s[5]++,e.stopPropagation(),l().s[6]++,n.selectBucket(t)}}},[e("v-icon",{staticClass:"mr-2"},[n._v("mdi-bucket")]),e("v-list-item-title",[n._v(n._s(t))])],1)}))],2),e("v-card",{attrs:{width:"100%"}},[e("v-card-title",[n._v(" "+n._s(n.bucket)+" Files "),e("v-spacer"),e("v-text-field",{attrs:{"append-icon":"mdi-magnify",label:"Search","single-line":"","hide-details":""},model:{value:n.search,callback:function(e){l().f[3]++,l().s[7]++,n.search=e},expression:"search"}})],1),e("v-data-table",{attrs:{headers:n.headers,items:n.files,search:n.search,"items-per-page":1e3,"footer-props":{showFirstLastPage:!0,itemsPerPageOptions:[1e3],firstIcon:"mdi-page-first",lastIcon:"mdi-page-last",prevIcon:"mdi-chevron-left",nextIcon:"mdi-chevron-right"},"calculate-widths":"","multi-sort":"",dense:""},on:{"click:row":n.fileClick},scopedSlots:n._u([{key:"top",fn:function(){return l().f[4]++,l().s[8]++,[e("v-row",{staticClass:"pa-5"},[e("v-icon",{staticClass:"ml-2",on:{click:n.backArrow}},[n._v("mdi-chevron-left-box-outline")]),e("span",{staticClass:".text-body-1 ma-2",attrs:{"data-test":"file-path"}},[n._v("/"+n._s(n.path))]),e("v-spacer"),e("span",{staticClass:"pa-1"},[n._v("Upload")]),e("v-file-input",{staticClass:"file-input",attrs:{"hide-input":"","prepend-icon":"mdi-upload","data-test":"upload-file"},model:{value:n.file,callback:function(e){l().f[5]++,l().s[9]++,n.file=e},expression:"file"}})],1)]},proxy:!0},{key:"item.name",fn:function(t){var o=t.item;return l().f[6]++,l().s[10]++,[e("v-icon",{staticClass:"mr-2"},[n._v(n._s(o.icon))]),n._v(n._s(o.name)+" ")]}},{key:"item.action",fn:function(t){var o=t.item;return l().f[7]++,l().s[11]++,["mdi-file"==o.icon?(l().b[0][0]++,e("v-icon",{staticClass:"mr-3",attrs:{"data-test":"download-file"},on:{click:function(e){return l().f[8]++,l().s[12]++,n.downloadFile(o.name)}}},[n._v("mdi-download-box")])):(l().b[0][1]++,n._e()),"mdi-file"==o.icon?(l().b[1][0]++,e("v-icon",{attrs:{"data-test":"delete-file"},on:{click:function(e){return l().f[9]++,l().s[13]++,n.deleteFile(o.name)}}},[n._v("mdi-delete")])):(l().b[1][1]++,n._e())]}}])})],1)],1)},i=(l().s[14]++,[]),a=t(5789),c=t(6964),s=t(9502),r=(t(2501),t(8178),t(6728),t(3450),function(){var n=this,e=n._self._c;return e("mounting-portal",{attrs:{"mount-to":"#openc3-menu",append:""}},[e("div",{staticClass:"v-toolbar__content"},[n._l(n.menus,(function(t,l){return e("v-menu",{key:l,attrs:{"offset-y":""},scopedSlots:n._u([{key:"activator",fn:function(l){var o=l.on,i=l.attrs;return[e("v-btn",n._g(n._b({staticClass:"mx-1",attrs:{outlined:"","data-test":n.formatDT("".concat(n.title," ").concat(t.label))}},"v-btn",i,!1),o),[e("span",{domProps:{textContent:n._s(t.label)}}),e("v-icon",{attrs:{right:""}},[n._v(" mdi-menu-down ")])],1)]}}],null,!0)},[e("v-list",[e("v-radio-group",{staticClass:"ma-0 pa-0",attrs:{value:t.radioGroup,"hide-details":"",dense:""}},[n._l(t.items,(function(l,o){return[l.divider?e("v-divider"):e("v-list-item",{key:o,attrs:{disabled:l.disabled,"data-test":n.formatDT("".concat(n.title," ").concat(t.label," ").concat(l.label))},on:{click:function(n){return l.command(l)}}},[l.radio?e("v-list-item-action",[e("v-radio",{attrs:{color:"secondary",label:l.label,value:l.label}})],1):n._e(),l.checkbox?e("v-list-item-action",[e("v-checkbox",{attrs:{color:"secondary",label:l.label},model:{value:l.checked,callback:function(e){n.$set(l,"checked",e)},expression:"option.checked"}})],1):n._e(),l.icon?e("v-list-item-icon",[e("v-icon",{attrs:{disabled:l.disabled}},[n._v(n._s(l.icon))])],1):n._e(),l.radio||l.checkbox?n._e():e("v-list-item-title",{style:"cursor: pointer;"+(l.disabled?"opacity: 0.2":"")},[n._v(n._s(l.label))])],1)]}))],2)],1)],1)})),e("v-spacer"),e("v-toolbar-title",[n._v(n._s(n.title))]),e("v-spacer")],2)])}),u=[],m=(t(5940),t(1639),{props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(n){return n.replaceAll(" ","-").toLowerCase()}},mounted:function(){"COSMOS "===this.title.substring(0,7)?document.title=this.title.substring(7):document.title=this.title}}),d=m,A=(t(4888),t(3483)),p=(0,A.Z)(d,r,u,!1,null,"2eb37f67",null),f=p.exports,h=(t(9529),t(1235),t(8188),t(8233),t(9644)),C=t.n(h),v=t(4091),b=new v["default"],k=C().create({baseURL:location.origin,timeout:6e4,params:{}});k.interceptors.response.use((function(n){return n}),(function(n){if(n.response){var e,t,l,o,i,a,c,s,r,u;if(401===n.response.status&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0),n.response.headers["ignore-errors"]&&n.response.headers["ignore-errors"].includes(n.response.status.toString()))return Promise.reject(n);var m="HTTP ".concat(n.response.status," - ");if(null!==(e=n.response)&&void 0!==e&&e.statusText&&(m+="".concat(n.response.statusText," ")),null!==(t=n.response)&&void 0!==t&&null!==(l=t.config)&&void 0!==l&&l.data&&(m+="".concat(n.response.config.data," ")),null!==(o=n.response)&&void 0!==o&&null!==(i=o.data)&&void 0!==i&&i.message)m+="".concat(n.response.data.message);else if(null!==(a=n.response)&&void 0!==a&&null!==(c=a.data)&&void 0!==c&&c.exception)m+="".concat(n.response.data.exception);else if(null!==(s=n.response)&&void 0!==s&&null!==(r=s.data)&&void 0!==r&&null!==(u=r.error)&&void 0!==u&&u.message)n.response.data.error.class&&(m+="".concat(n.response.data.error.class," ")),m+="".concat(n.response.data.error.message);else{var d;m+="".concat(null===(d=n.response)||void 0===d?void 0:d.data)}throw b.$notify&&b.$notify.serious({title:"Network error",body:m}),n}throw n}));var _=k,g=function(){var n=(0,s.Z)((0,a.Z)().mark((function n(e,t){var l,o,i,c,s,r,u,m,d,A=arguments;return(0,a.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(l=A.length>2&&void 0!==A[2]?A[2]:{},o=l.data,i=l.params,c=void 0===i?{}:i,s=l.headers,r=l.noAuth,u=void 0!==r&&r,m=l.noScope,d=void 0!==m&&m,u){n.next=11;break}return n.prev=2,n.next=5,OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity);case 5:n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](2),OpenC3Auth.login();case 10:s["Authorization"]=localStorage.openc3Token;case 11:return d||c["scope"]||(c["scope"]=window.openc3Scope),n.abrupt("return",_({method:e,url:t,data:o,params:c,headers:s}));case 13:case"end":return n.stop()}}),n,null,[[2,7]])})));return function(e,t){return n.apply(this,arguments)}}(),y={Accept:"application/json"},x=(0,c.Z)((0,c.Z)({},y),{},{"Content-Type":"application/json"}),w={get:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.params,l=e.headers,o=void 0===l?y:l,i=e.noScope,a=e.noAuth;return g("get",n,{params:t,headers:o,noScope:i,noAuth:a})},put:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.data,l=e.params,o=e.headers,i=void 0===o?x:o,a=e.noScope,c=e.noAuth;return g("put",n,{data:t,params:l,headers:i,noScope:a,noAuth:c})},post:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.data,l=e.params,o=e.headers,i=void 0===o?x:o,a=e.noScope,c=e.noAuth;return g("post",n,{data:t,params:l,headers:i,noScope:a,noAuth:c})},delete:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.params,l=e.headers,o=void 0===l?y:l,i=e.noScope,a=e.noAuth;return g("delete",n,{params:t,headers:o,noScope:i,noAuth:a})}};function T(){var n="/openc3/plugins/packages/openc3-cosmos-tool-bucketexplorer/src/tools/BucketExplorer/BucketExplorer.vue",e="d3e08799572223ba5c7b655173dc27aa6c47c468",t=new Function("return this")(),l="__coverage__",o={path:"/openc3/plugins/packages/openc3-cosmos-tool-bucketexplorer/src/tools/BucketExplorer/BucketExplorer.vue",statementMap:{0:{start:{line:11,column:4},end:{line:25,column:5}},1:{start:{line:28,column:4},end:{line:30,column:6}},2:{start:{line:29,column:6},end:{line:29,column:34}},3:{start:{line:31,column:4},end:{line:36,column:5}},4:{start:{line:32,column:18},end:{line:32,column:52}},5:{start:{line:33,column:6},end:{line:33,column:28}},6:{start:{line:34,column:6},end:{line:34,column:42}},7:{start:{line:35,column:6},end:{line:35,column:24}},8:{start:{line:41,column:6},end:{line:41,column:36}},9:{start:{line:41,column:30},end:{line:41,column:36}},10:{start:{line:43,column:41},end:{line:47,column:7}},11:{start:{line:50,column:23},end:{line:53,column:8}},12:{start:{line:54,column:6},end:{line:54,column:22}},13:{start:{line:55,column:6},end:{line:55,column:24}},14:{start:{line:60,column:6},end:{line:65,column:8}},15:{start:{line:66,column:6},end:{line:66,column:24}},16:{start:{line:69,column:6},end:{line:69,column:40}},17:{start:{line:69,column:34},end:{line:69,column:40}},18:{start:{line:70,column:6},end:{line:70,column:26}},19:{start:{line:71,column:6},end:{line:71,column:20}},20:{start:{line:72,column:6},end:{line:72,column:19}},21:{start:{line:76,column:6},end:{line:76,column:34}},22:{start:{line:76,column:28},end:{line:76,column:34}},23:{start:{line:77,column:18},end:{line:77,column:38}},24:{start:{line:78,column:6},end:{line:78,column:60}},25:{start:{line:81,column:6},end:{line:83,column:7}},26:{start:{line:82,column:8},end:{line:82,column:24}},27:{start:{line:84,column:6},end:{line:84,column:19}},28:{start:{line:87,column:6},end:{line:95,column:7}},29:{start:{line:88,column:8},end:{line:93,column:9}},30:{start:{line:90,column:10},end:{line:90,column:34}},31:{start:{line:92,column:10},end:{line:92,column:39}},32:{start:{line:94,column:8},end:{line:94,column:21}},33:{start:{line:98,column:6},end:{line:114,column:10}},34:{start:{line:105,column:23},end:{line:105,column:50}},35:{start:{line:106,column:10},end:{line:106,column:39}},36:{start:{line:107,column:10},end:{line:107,column:49}},37:{start:{line:108,column:10},end:{line:108,column:22}},38:{start:{line:111,column:10},end:{line:113,column:12}},39:{start:{line:117,column:6},end:{line:131,column:10}},40:{start:{line:123,column:10},end:{line:127,column:11}},41:{start:{line:130,column:10},end:{line:130,column:28}},42:{start:{line:134,column:6},end:{line:166,column:10}},43:{start:{line:140,column:10},end:{line:142,column:12}},44:{start:{line:141,column:12},end:{line:141,column:55}},45:{start:{line:143,column:10},end:{line:153,column:11}},46:{start:{line:145,column:14},end:{line:151,column:15}},47:{start:{line:156,column:10},end:{line:156,column:25}},48:{start:{line:157,column:10},end:{line:165,column:11}},49:{start:{line:158,column:12},end:{line:160,column:14}},50:{start:{line:162,column:12},end:{line:164,column:14}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:9},end:{line:26,column:3}},line:10},1:{name:"(anonymous_1)",decl:{start:{line:27,column:2},end:{line:27,column:3}},loc:{start:{line:27,column:12},end:{line:37,column:3}},line:27},2:{name:"(anonymous_2)",decl:{start:{line:28,column:48},end:{line:28,column:49}},loc:{start:{line:28,column:62},end:{line:30,column:5}},line:28},3:{name:"(anonymous_3)",decl:{start:{line:40,column:10},end:{line:40,column:11}},loc:{start:{line:40,column:28},end:{line:56,column:5}},line:40},4:{name:"(anonymous_4)",decl:{start:{line:59,column:4},end:{line:59,column:5}},loc:{start:{line:59,column:13},end:{line:67,column:5}},line:59},5:{name:"(anonymous_5)",decl:{start:{line:68,column:4},end:{line:68,column:5}},loc:{start:{line:68,column:25},end:{line:73,column:5}},line:68},6:{name:"(anonymous_6)",decl:{start:{line:74,column:4},end:{line:74,column:5}},loc:{start:{line:74,column:16},end:{line:85,column:5}},line:74},7:{name:"(anonymous_7)",decl:{start:{line:86,column:4},end:{line:86,column:5}},loc:{start:{line:86,column:21},end:{line:96,column:5}},line:86},8:{name:"(anonymous_8)",decl:{start:{line:97,column:4},end:{line:97,column:5}},loc:{start:{line:97,column:27},end:{line:115,column:5}},line:97},9:{name:"(anonymous_9)",decl:{start:{line:103,column:14},end:{line:103,column:15}},loc:{start:{line:103,column:28},end:{line:109,column:9}},line:103},10:{name:"(anonymous_10)",decl:{start:{line:110,column:15},end:{line:110,column:16}},loc:{start:{line:110,column:29},end:{line:114,column:9}},line:110},11:{name:"(anonymous_11)",decl:{start:{line:116,column:4},end:{line:116,column:5}},loc:{start:{line:116,column:25},end:{line:132,column:5}},line:116},12:{name:"(anonymous_12)",decl:{start:{line:122,column:14},end:{line:122,column:15}},loc:{start:{line:122,column:26},end:{line:128,column:9}},line:122},13:{name:"(anonymous_13)",decl:{start:{line:129,column:14},end:{line:129,column:15}},loc:{start:{line:129,column:28},end:{line:131,column:9}},line:129},14:{name:"(anonymous_14)",decl:{start:{line:133,column:4},end:{line:133,column:5}},loc:{start:{line:133,column:18},end:{line:167,column:5}},line:133},15:{name:"(anonymous_15)",decl:{start:{line:139,column:14},end:{line:139,column:15}},loc:{start:{line:139,column:28},end:{line:154,column:9}},line:139},16:{name:"(anonymous_16)",decl:{start:{line:140,column:44},end:{line:140,column:45}},loc:{start:{line:140,column:56},end:{line:142,column:11}},line:140},17:{name:"(anonymous_17)",decl:{start:{line:144,column:33},end:{line:144,column:34}},loc:{start:{line:144,column:43},end:{line:152,column:13}},line:144},18:{name:"(anonymous_18)",decl:{start:{line:155,column:15},end:{line:155,column:16}},loc:{start:{line:155,column:29},end:{line:166,column:9}},line:155}},branchMap:{0:{loc:{start:{line:31,column:4},end:{line:36,column:5}},type:"if",locations:[{start:{line:31,column:4},end:{line:36,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:31},1:{loc:{start:{line:41,column:6},end:{line:41,column:36}},type:"if",locations:[{start:{line:41,column:6},end:{line:41,column:36}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:41},2:{loc:{start:{line:69,column:6},end:{line:69,column:40}},type:"if",locations:[{start:{line:69,column:6},end:{line:69,column:40}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:69},3:{loc:{start:{line:76,column:6},end:{line:76,column:34}},type:"if",locations:[{start:{line:76,column:6},end:{line:76,column:34}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:76},4:{loc:{start:{line:81,column:6},end:{line:83,column:7}},type:"if",locations:[{start:{line:81,column:6},end:{line:83,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:81},5:{loc:{start:{line:87,column:6},end:{line:95,column:7}},type:"if",locations:[{start:{line:87,column:6},end:{line:95,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:87},6:{loc:{start:{line:88,column:8},end:{line:93,column:9}},type:"if",locations:[{start:{line:88,column:8},end:{line:93,column:9}},{start:{line:91,column:15},end:{line:93,column:9}}],line:88},7:{loc:{start:{line:157,column:10},end:{line:165,column:11}},type:"if",locations:[{start:{line:157,column:10},end:{line:165,column:11}},{start:{line:161,column:17},end:{line:165,column:11}}],line:157}},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,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50: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,18:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0]},inputSourceMap:{version:3,sources:["BucketExplorer.vue"],names:[],mappings:";AAyGA;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;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:"BucketExplorer.vue",sourceRoot:"src/tools/BucketExplorer",sourcesContent:["\x3c!--\n# Copyright 2023 OpenC3, Inc.\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 file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n--\x3e\n\n<template>\n <div>\n <top-bar :title=\"title\" />\n <v-list>\n <span class=\"ma-2\">Buckets (click to browse):</span>\n <v-list-item\n v-for=\"(bucket, index) in buckets\"\n :key=\"index\"\n @click.stop=\"selectBucket(bucket)\"\n >\n <v-icon class=\"mr-2\">mdi-bucket</v-icon\n ><v-list-item-title>{{ bucket }}</v-list-item-title>\n </v-list-item>\n </v-list>\n <v-card width=\"100%\">\n <v-card-title>\n {{ bucket }} Files\n <v-spacer />\n <v-text-field\n v-model=\"search\"\n append-icon=\"mdi-magnify\"\n label=\"Search\"\n single-line\n hide-details\n />\n </v-card-title>\n <v-data-table\n :headers=\"headers\"\n :items=\"files\"\n :search=\"search\"\n :items-per-page=\"1000\"\n :footer-props=\"{\n showFirstLastPage: true,\n itemsPerPageOptions: [1000],\n firstIcon: 'mdi-page-first',\n lastIcon: 'mdi-page-last',\n prevIcon: 'mdi-chevron-left',\n nextIcon: 'mdi-chevron-right',\n }\"\n @click:row=\"fileClick\"\n calculate-widths\n multi-sort\n dense\n >\n <template v-slot:top>\n <v-row class=\"pa-5\">\n <v-icon class=\"ml-2\" @click=\"backArrow\"\n >mdi-chevron-left-box-outline</v-icon\n ><span class=\".text-body-1 ma-2\" data-test=\"file-path\"\n >/{{ path }}</span\n >\n <v-spacer />\n <span class=\"pa-1\">Upload</span>\n <v-file-input\n v-model=\"file\"\n hide-input\n class=\"file-input\"\n prepend-icon=\"mdi-upload\"\n data-test=\"upload-file\"\n />\n </v-row>\n </template>\n <template v-slot:item.name=\"{ item }\">\n <v-icon class=\"mr-2\">{{ item.icon }}</v-icon\n >{{ item.name }}\n </template>\n <template v-slot:item.action=\"{ item }\">\n <v-icon\n class=\"mr-3\"\n v-if=\"item.icon == 'mdi-file'\"\n @click=\"downloadFile(item.name)\"\n data-test=\"download-file\"\n >mdi-download-box</v-icon\n >\n <v-icon\n v-if=\"item.icon == 'mdi-file'\"\n @click=\"deleteFile(item.name)\"\n data-test=\"delete-file\"\n >mdi-delete</v-icon\n >\n </template>\n </v-data-table>\n </v-card>\n </div>\n</template>\n\n<script>\nimport TopBar from '@openc3/tool-common/src/components/TopBar'\nimport Api from '@openc3/tool-common/src/services/api'\nimport axios from 'axios'\n\nexport default {\n components: {\n TopBar,\n },\n data() {\n return {\n title: 'COSMOS Bucket Explorer',\n search: '',\n bucket: '',\n buckets: [],\n path: '',\n file: null,\n files: [],\n headers: [\n { text: 'Name', value: 'name' },\n { text: 'Size', value: 'size' },\n { text: 'Modified Date', value: 'modified' },\n { text: 'Action', value: 'action' },\n ],\n }\n },\n created() {\n Api.get('/openc3-api/storage/buckets').then((response) => {\n this.buckets = response.data\n })\n if (this.$route.params.path) {\n let parts = this.$route.params.path.split('/')\n this.bucket = parts[0]\n this.path = parts.slice(1).join('/')\n this.updateFiles()\n }\n },\n watch: {\n // This is the upload function that is activated when the file gets set\n file: async function () {\n if (this.file === null) return\n // Reassign data to presignedRequest for readability\n const { data: presignedRequest } = await Api.get(\n `/openc3-api/storage/upload/${encodeURIComponent(\n `${this.path}${this.file.name}`\n )}?bucket=OPENC3_${this.bucket.toUpperCase()}_BUCKET`\n )\n // This pushes the file into storage by using the fields in the presignedRequest\n // See storage_controller.rb get_presigned_request()\n const response = await axios({\n ...presignedRequest,\n data: this.file,\n })\n this.file = null\n this.updateFiles()\n },\n },\n methods: {\n update() {\n this.$router.push({\n name: 'Bucket Explorer',\n params: {\n path: `${this.bucket}/${this.path}`,\n },\n })\n this.updateFiles()\n },\n selectBucket(bucket) {\n if (this.bucket === bucket) return\n this.bucket = bucket\n this.path = ''\n this.update()\n },\n backArrow() {\n // Nothing to do if we're at the root so return\n if (this.path === '') return\n let parts = this.path.split('/')\n this.path = parts.slice(0, parts.length - 2).join('/')\n // Only append the last slash if we're not at the root\n // The root is 2 because it's the path before clicking back\n if (parts.length > 2) {\n this.path += '/'\n }\n this.update()\n },\n fileClick(event) {\n if (event.icon === 'mdi-folder') {\n if (this.bucket === '') {\n // initial bucket click\n this.bucket = event.name\n } else {\n this.path += `${event.name}/`\n }\n this.update()\n }\n },\n downloadFile(filename) {\n Api.get(\n `/openc3-api/storage/download/${encodeURIComponent(\n this.path\n )}${filename}?bucket=OPENC3_${this.bucket.toUpperCase()}_BUCKET`\n )\n .then((response) => {\n // Make a link and then 'click' on it to start the download\n const link = document.createElement('a')\n link.href = response.data.url\n link.setAttribute('download', filename)\n link.click()\n })\n .catch((response) => {\n this.$notify.caution({\n title: `Unable to download file ${this.path}${filename} from bucket ${this.bucket}`,\n })\n })\n },\n deleteFile(filename) {\n this.$dialog\n .confirm(`Are you sure you want to delete: ${filename}`, {\n okText: 'Delete',\n cancelText: 'Cancel',\n })\n .then((dialog) => {\n return Api.delete(\n `/openc3-api/storage/delete/${encodeURIComponent(\n this.path\n )}${filename}?bucket=OPENC3_${this.bucket.toUpperCase()}_BUCKET`\n )\n })\n .then((response) => {\n this.updateFiles()\n })\n },\n updateFiles() {\n Api.get(\n `/openc3-api/storage/files/OPENC3_${this.bucket.toUpperCase()}_BUCKET/${\n this.path\n }`\n )\n .then((response) => {\n this.files = response.data[0].map((bucket) => {\n return { name: bucket, icon: 'mdi-folder' }\n })\n this.files = this.files.concat(\n response.data[1].map((item) => {\n return {\n name: item.name,\n icon: 'mdi-file',\n size: item.size,\n modified: item.modified,\n download: true,\n }\n })\n )\n })\n .catch((response) => {\n this.files = []\n if (response.data.message) {\n this.$notify.caution({\n title: response.data.message,\n })\n } else {\n this.$notify.caution({\n title: response.message,\n })\n }\n })\n },\n },\n}\n<\/script>\n\n<style scoped>\n.file-input {\n display: block;\n flex: none;\n padding-top: 0px;\n margin-top: 0px;\n}\n</style>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d3e08799572223ba5c7b655173dc27aa6c47c468"},i=t[l]||(t[l]={});i[n]&&i[n].hash===e||(i[n]=o);var a=i[n];return T=function(){return a},a}T();var E={components:{TopBar:f},data:function(){return T().f[0]++,T().s[0]++,{title:"COSMOS Bucket Explorer",search:"",bucket:"",buckets:[],path:"",file:null,files:[],headers:[{text:"Name",value:"name"},{text:"Size",value:"size"},{text:"Modified Date",value:"modified"},{text:"Action",value:"action"}]}},created:function(){var n=this;if(T().f[1]++,T().s[1]++,w.get("/openc3-api/storage/buckets").then((function(e){T().f[2]++,T().s[2]++,n.buckets=e.data})),T().s[3]++,this.$route.params.path){T().b[0][0]++;var e=(T().s[4]++,this.$route.params.path.split("/"));T().s[5]++,this.bucket=e[0],T().s[6]++,this.path=e.slice(1).join("/"),T().s[7]++,this.updateFiles()}else T().b[0][1]++},watch:{file:function(){var n=(0,s.Z)((0,a.Z)().mark((function n(){var e,t;return(0,a.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(T().f[3]++,T().s[8]++,null!==this.file){n.next=8;break}return T().b[1][0]++,T().s[9]++,n.abrupt("return");case 8:T().b[1][1]++;case 9:return T().s[10]++,n.next=12,w.get("/openc3-api/storage/upload/".concat(encodeURIComponent("".concat(this.path).concat(this.file.name)),"?bucket=OPENC3_").concat(this.bucket.toUpperCase(),"_BUCKET"));case 12:return e=n.sent,t=e.data,T().s[11]++,n.next=17,C()((0,c.Z)((0,c.Z)({},t),{},{data:this.file}));case 17:n.sent,T().s[12]++,this.file=null,T().s[13]++,this.updateFiles();case 22:case"end":return n.stop()}}),n,this)})));function e(){return n.apply(this,arguments)}return e}()},methods:{update:function(){T().f[4]++,T().s[14]++,this.$router.push({name:"Bucket Explorer",params:{path:"".concat(this.bucket,"/").concat(this.path)}}),T().s[15]++,this.updateFiles()},selectBucket:function(n){if(T().f[5]++,T().s[16]++,this.bucket===n)return T().b[2][0]++,void T().s[17]++;T().b[2][1]++,T().s[18]++,this.bucket=n,T().s[19]++,this.path="",T().s[20]++,this.update()},backArrow:function(){if(T().f[6]++,T().s[21]++,""===this.path)return T().b[3][0]++,void T().s[22]++;T().b[3][1]++;var n=(T().s[23]++,this.path.split("/"));T().s[24]++,this.path=n.slice(0,n.length-2).join("/"),T().s[25]++,n.length>2?(T().b[4][0]++,T().s[26]++,this.path+="/"):T().b[4][1]++,T().s[27]++,this.update()},fileClick:function(n){T().f[7]++,T().s[28]++,"mdi-folder"===n.icon?(T().b[5][0]++,T().s[29]++,""===this.bucket?(T().b[6][0]++,T().s[30]++,this.bucket=n.name):(T().b[6][1]++,T().s[31]++,this.path+="".concat(n.name,"/")),T().s[32]++,this.update()):T().b[5][1]++},downloadFile:function(n){var e=this;T().f[8]++,T().s[33]++,w.get("/openc3-api/storage/download/".concat(encodeURIComponent(this.path)).concat(n,"?bucket=OPENC3_").concat(this.bucket.toUpperCase(),"_BUCKET")).then((function(e){T().f[9]++;var t=(T().s[34]++,document.createElement("a"));T().s[35]++,t.href=e.data.url,T().s[36]++,t.setAttribute("download",n),T().s[37]++,t.click()})).catch((function(t){T().f[10]++,T().s[38]++,e.$notify.caution({title:"Unable to download file ".concat(e.path).concat(n," from bucket ").concat(e.bucket)})}))},deleteFile:function(n){var e=this;T().f[11]++,T().s[39]++,this.$dialog.confirm("Are you sure you want to delete: ".concat(n),{okText:"Delete",cancelText:"Cancel"}).then((function(t){return T().f[12]++,T().s[40]++,w["delete"]("/openc3-api/storage/delete/".concat(encodeURIComponent(e.path)).concat(n,"?bucket=OPENC3_").concat(e.bucket.toUpperCase(),"_BUCKET"))})).then((function(n){T().f[13]++,T().s[41]++,e.updateFiles()}))},updateFiles:function(){var n=this;T().f[14]++,T().s[42]++,w.get("/openc3-api/storage/files/OPENC3_".concat(this.bucket.toUpperCase(),"_BUCKET/").concat(this.path)).then((function(e){T().f[15]++,T().s[43]++,n.files=e.data[0].map((function(n){return T().f[16]++,T().s[44]++,{name:n,icon:"mdi-folder"}})),T().s[45]++,n.files=n.files.concat(e.data[1].map((function(n){return T().f[17]++,T().s[46]++,{name:n.name,icon:"mdi-file",size:n.size,modified:n.modified,download:!0}})))})).catch((function(e){T().f[18]++,T().s[47]++,n.files=[],T().s[48]++,e.data.message?(T().b[7][0]++,T().s[49]++,n.$notify.caution({title:e.data.message})):(T().b[7][1]++,T().s[50]++,n.$notify.caution({title:e.message}))}))}}},$=E,S=(t(8261),(0,A.Z)($,o,i,!1,null,"1be1ddea",null)),B=S.exports},5423:function(n,e,t){"use strict";t.r(e);var l=t(9601),o=t.n(l),i=t(2609),a=t.n(i),c=a()(o());c.push([n.id,".file-input[data-v-1be1ddea]{display:block;flex:none;padding-top:0;margin-top:0}",""]),e["default"]=c},6294:function(n,e,t){"use strict";t.r(e);var l=t(9601),o=t.n(l),i=t(2609),a=t.n(i),c=a()(o());c.push([n.id,".v-list[data-v-2eb37f67] .v-label{margin-left:5px}.v-list-item__icon[data-v-2eb37f67]{margin-right:15px!important}.v-list-item__title[data-v-2eb37f67]{color:#fff}",""]),e["default"]=c},8261:function(n,e,t){var l=t(5423);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var o=t(3514).Z;o("00d705a7",l,!0,{sourceMap:!1,shadowMode:!1})},4888:function(n,e,t){var l=t(6294);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var o=t(3514).Z;o("706a3f6d",l,!0,{sourceMap:!1,shadowMode:!1})}}]);
|
2
|
+
//# sourceMappingURL=288.js.map
|
@@ -0,0 +1 @@
|
|
1
|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AS,MAC7DA,EAAQE,SAAQJ,EAAOK,QAAUH,EAAQE,QAE5C,IAAIE,EAAM,UACGA,EAAI,WAAYJ,GAAS,EAAM,CAAC,WAAY,EAAM,YAAa,G","sources":["webpack://@openc3/cosmos-tool-bucketexplorer/./src/tools/BucketExplorer/BucketExplorer.vue","webpack://@openc3/cosmos-tool-bucketexplorer/../openc3-tool-common/src/components/TopBar.vue","webpack://@openc3/cosmos-tool-bucketexplorer/../openc3-tool-common/src/components/TopBar.vue?95da","webpack://@openc3/cosmos-tool-bucketexplorer/../openc3-tool-common/src/components/TopBar.vue?a437","webpack://@openc3/cosmos-tool-bucketexplorer/../openc3-tool-common/src/services/axios.js","webpack://@openc3/cosmos-tool-bucketexplorer/../openc3-tool-common/src/services/api.js","webpack://@openc3/cosmos-tool-bucketexplorer/src/tools/BucketExplorer/BucketExplorer.vue","webpack://@openc3/cosmos-tool-bucketexplorer/./src/tools/BucketExplorer/BucketExplorer.vue?4b33","webpack://@openc3/cosmos-tool-bucketexplorer/./src/tools/BucketExplorer/BucketExplorer.vue?98c2","webpack://@openc3/cosmos-tool-bucketexplorer/./src/tools/BucketExplorer/BucketExplorer.vue?f42d","webpack://@openc3/cosmos-tool-bucketexplorer/../openc3-tool-common/src/components/TopBar.vue?386c","webpack://@openc3/cosmos-tool-bucketexplorer/./src/tools/BucketExplorer/BucketExplorer.vue?c654","webpack://@openc3/cosmos-tool-bucketexplorer/../openc3-tool-common/src/components/TopBar.vue?9efc"],"sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('top-bar',{attrs:{\"title\":_vm.title}}),_c('v-list',[_c('span',{staticClass:\"ma-2\"},[_vm._v(\"Buckets (click to browse):\")]),_vm._l((_vm.buckets),function(bucket,index){return _c('v-list-item',{key:index,on:{\"click\":function($event){$event.stopPropagation();return _vm.selectBucket(bucket)}}},[_c('v-icon',{staticClass:\"mr-2\"},[_vm._v(\"mdi-bucket\")]),_c('v-list-item-title',[_vm._v(_vm._s(bucket))])],1)})],2),_c('v-card',{attrs:{\"width\":\"100%\"}},[_c('v-card-title',[_vm._v(\" \"+_vm._s(_vm.bucket)+\" Files \"),_c('v-spacer'),_c('v-text-field',{attrs:{\"append-icon\":\"mdi-magnify\",\"label\":\"Search\",\"single-line\":\"\",\"hide-details\":\"\"},model:{value:(_vm.search),callback:function ($$v) {_vm.search=$$v},expression:\"search\"}})],1),_c('v-data-table',{attrs:{\"headers\":_vm.headers,\"items\":_vm.files,\"search\":_vm.search,\"items-per-page\":1000,\"footer-props\":{\n showFirstLastPage: true,\n itemsPerPageOptions: [1000],\n firstIcon: 'mdi-page-first',\n lastIcon: 'mdi-page-last',\n prevIcon: 'mdi-chevron-left',\n nextIcon: 'mdi-chevron-right',\n },\"calculate-widths\":\"\",\"multi-sort\":\"\",\"dense\":\"\"},on:{\"click:row\":_vm.fileClick},scopedSlots:_vm._u([{key:\"top\",fn:function(){return [_c('v-row',{staticClass:\"pa-5\"},[_c('v-icon',{staticClass:\"ml-2\",on:{\"click\":_vm.backArrow}},[_vm._v(\"mdi-chevron-left-box-outline\")]),_c('span',{staticClass:\".text-body-1 ma-2\",attrs:{\"data-test\":\"file-path\"}},[_vm._v(\"/\"+_vm._s(_vm.path))]),_c('v-spacer'),_c('span',{staticClass:\"pa-1\"},[_vm._v(\"Upload\")]),_c('v-file-input',{staticClass:\"file-input\",attrs:{\"hide-input\":\"\",\"prepend-icon\":\"mdi-upload\",\"data-test\":\"upload-file\"},model:{value:(_vm.file),callback:function ($$v) {_vm.file=$$v},expression:\"file\"}})],1)]},proxy:true},{key:\"item.name\",fn:function({ item }){return [_c('v-icon',{staticClass:\"mr-2\"},[_vm._v(_vm._s(item.icon))]),_vm._v(_vm._s(item.name)+\" \")]}},{key:\"item.action\",fn:function({ item }){return [(item.icon == 'mdi-file')?_c('v-icon',{staticClass:\"mr-3\",attrs:{\"data-test\":\"download-file\"},on:{\"click\":function($event){return _vm.downloadFile(item.name)}}},[_vm._v(\"mdi-download-box\")]):_vm._e(),(item.icon == 'mdi-file')?_c('v-icon',{attrs:{\"data-test\":\"delete-file\"},on:{\"click\":function($event){return _vm.deleteFile(item.name)}}},[_vm._v(\"mdi-delete\")]):_vm._e()]}}])})],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('mounting-portal',{attrs:{\"mount-to\":\"#openc3-menu\",\"append\":\"\"}},[_c('div',{staticClass:\"v-toolbar__content\"},[_vm._l((_vm.menus),function(menu,i){return _c('v-menu',{key:i,attrs:{\"offset-y\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function({ on, attrs }){return [_c('v-btn',_vm._g(_vm._b({staticClass:\"mx-1\",attrs:{\"outlined\":\"\",\"data-test\":_vm.formatDT(`${_vm.title} ${menu.label}`)}},'v-btn',attrs,false),on),[_c('span',{domProps:{\"textContent\":_vm._s(menu.label)}}),_c('v-icon',{attrs:{\"right\":\"\"}},[_vm._v(\" mdi-menu-down \")])],1)]}}],null,true)},[_c('v-list',[_c('v-radio-group',{staticClass:\"ma-0 pa-0\",attrs:{\"value\":menu.radioGroup,\"hide-details\":\"\",\"dense\":\"\"}},[_vm._l((menu.items),function(option,j){return [(option.divider)?_c('v-divider'):_c('v-list-item',{key:j,attrs:{\"disabled\":option.disabled,\"data-test\":_vm.formatDT(`${_vm.title} ${menu.label} ${option.label}`)},on:{\"click\":function($event){return option.command(option)}}},[(option.radio)?_c('v-list-item-action',[_c('v-radio',{attrs:{\"color\":\"secondary\",\"label\":option.label,\"value\":option.label}})],1):_vm._e(),(option.checkbox)?_c('v-list-item-action',[_c('v-checkbox',{attrs:{\"color\":\"secondary\",\"label\":option.label},model:{value:(option.checked),callback:function ($$v) {_vm.$set(option, \"checked\", $$v)},expression:\"option.checked\"}})],1):_vm._e(),(option.icon)?_c('v-list-item-icon',[_c('v-icon',{attrs:{\"disabled\":option.disabled}},[_vm._v(_vm._s(option.icon))])],1):_vm._e(),(!option.radio && !option.checkbox)?_c('v-list-item-title',{style:('cursor: pointer;' + (option.disabled ? 'opacity: 0.2' : ''))},[_vm._v(_vm._s(option.label))]):_vm._e()],1)]})],2)],1)],1)}),_c('v-spacer'),_c('v-toolbar-title',[_vm._v(_vm._s(_vm.title))]),_c('v-spacer')],2)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TopBar.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TopBar.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TopBar.vue?vue&type=template&id=2eb37f67&scoped=true&\"\nimport script from \"./TopBar.vue?vue&type=script&lang=js&\"\nexport * from \"./TopBar.vue?vue&type=script&lang=js&\"\nimport style0 from \"./TopBar.vue?vue&type=style&index=0&id=2eb37f67&prod&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"2eb37f67\",\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# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license \n# if purchased from OpenC3, Inc.\n*/\n\nimport axios from 'axios'\nimport Vue from 'vue'\n\nconst vueInstance = new Vue()\n\nconst axiosInstance = axios.create({\n baseURL: location.origin,\n timeout: 60000,\n params: {},\n})\n\naxiosInstance.interceptors.response.use(\n (response) => response,\n (error) => {\n if (error.response) {\n if (error.response.status === 401) {\n OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity, true)\n }\n // Individual tools can set 'Ignore-Errors' to an error code\n // they potentially expect, e.g. '500', in which case we ignore it\n // For example in CommandSender.vue:\n // obs = this.api.cmd(targetName, commandName, paramList, {\n // 'Ignore-Errors': '500',\n // })\n if (\n error.response.headers['ignore-errors'] &&\n error.response.headers['ignore-errors'].includes(\n error.response.status.toString()\n )\n ) {\n return Promise.reject(error)\n }\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 if (vueInstance.$notify) {\n vueInstance.$notify.serious({\n title: 'Network error',\n body,\n })\n }\n throw error\n } else {\n throw error\n }\n }\n)\n\nexport default axiosInstance\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# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license \n# if purchased from OpenC3, Inc.\n*/\n\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 OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)\n } catch (error) {\n OpenC3Auth.login()\n }\n headers['Authorization'] = localStorage.openc3Token\n }\n if (!noScope && !params['scope']) {\n params['scope'] = window.openc3Scope\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 2023 OpenC3, Inc.\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 file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n-->\n\n<template>\n <div>\n <top-bar :title=\"title\" />\n <v-list>\n <span class=\"ma-2\">Buckets (click to browse):</span>\n <v-list-item\n v-for=\"(bucket, index) in buckets\"\n :key=\"index\"\n @click.stop=\"selectBucket(bucket)\"\n >\n <v-icon class=\"mr-2\">mdi-bucket</v-icon\n ><v-list-item-title>{{ bucket }}</v-list-item-title>\n </v-list-item>\n </v-list>\n <v-card width=\"100%\">\n <v-card-title>\n {{ bucket }} Files\n <v-spacer />\n <v-text-field\n v-model=\"search\"\n append-icon=\"mdi-magnify\"\n label=\"Search\"\n single-line\n hide-details\n />\n </v-card-title>\n <v-data-table\n :headers=\"headers\"\n :items=\"files\"\n :search=\"search\"\n :items-per-page=\"1000\"\n :footer-props=\"{\n showFirstLastPage: true,\n itemsPerPageOptions: [1000],\n firstIcon: 'mdi-page-first',\n lastIcon: 'mdi-page-last',\n prevIcon: 'mdi-chevron-left',\n nextIcon: 'mdi-chevron-right',\n }\"\n @click:row=\"fileClick\"\n calculate-widths\n multi-sort\n dense\n >\n <template v-slot:top>\n <v-row class=\"pa-5\">\n <v-icon class=\"ml-2\" @click=\"backArrow\"\n >mdi-chevron-left-box-outline</v-icon\n ><span class=\".text-body-1 ma-2\" data-test=\"file-path\"\n >/{{ path }}</span\n >\n <v-spacer />\n <span class=\"pa-1\">Upload</span>\n <v-file-input\n v-model=\"file\"\n hide-input\n class=\"file-input\"\n prepend-icon=\"mdi-upload\"\n data-test=\"upload-file\"\n />\n </v-row>\n </template>\n <template v-slot:item.name=\"{ item }\">\n <v-icon class=\"mr-2\">{{ item.icon }}</v-icon\n >{{ item.name }}\n </template>\n <template v-slot:item.action=\"{ item }\">\n <v-icon\n class=\"mr-3\"\n v-if=\"item.icon == 'mdi-file'\"\n @click=\"downloadFile(item.name)\"\n data-test=\"download-file\"\n >mdi-download-box</v-icon\n >\n <v-icon\n v-if=\"item.icon == 'mdi-file'\"\n @click=\"deleteFile(item.name)\"\n data-test=\"delete-file\"\n >mdi-delete</v-icon\n >\n </template>\n </v-data-table>\n </v-card>\n </div>\n</template>\n\n<script>\nimport TopBar from '@openc3/tool-common/src/components/TopBar'\nimport Api from '@openc3/tool-common/src/services/api'\nimport axios from 'axios'\n\nexport default {\n components: {\n TopBar,\n },\n data() {\n return {\n title: 'COSMOS Bucket Explorer',\n search: '',\n bucket: '',\n buckets: [],\n path: '',\n file: null,\n files: [],\n headers: [\n { text: 'Name', value: 'name' },\n { text: 'Size', value: 'size' },\n { text: 'Modified Date', value: 'modified' },\n { text: 'Action', value: 'action' },\n ],\n }\n },\n created() {\n Api.get('/openc3-api/storage/buckets').then((response) => {\n this.buckets = response.data\n })\n if (this.$route.params.path) {\n let parts = this.$route.params.path.split('/')\n this.bucket = parts[0]\n this.path = parts.slice(1).join('/')\n this.updateFiles()\n }\n },\n watch: {\n // This is the upload function that is activated when the file gets set\n file: async function () {\n if (this.file === null) return\n // Reassign data to presignedRequest for readability\n const { data: presignedRequest } = await Api.get(\n `/openc3-api/storage/upload/${encodeURIComponent(\n `${this.path}${this.file.name}`\n )}?bucket=OPENC3_${this.bucket.toUpperCase()}_BUCKET`\n )\n // This pushes the file into storage by using the fields in the presignedRequest\n // See storage_controller.rb get_presigned_request()\n const response = await axios({\n ...presignedRequest,\n data: this.file,\n })\n this.file = null\n this.updateFiles()\n },\n },\n methods: {\n update() {\n this.$router.push({\n name: 'Bucket Explorer',\n params: {\n path: `${this.bucket}/${this.path}`,\n },\n })\n this.updateFiles()\n },\n selectBucket(bucket) {\n if (this.bucket === bucket) return\n this.bucket = bucket\n this.path = ''\n this.update()\n },\n backArrow() {\n // Nothing to do if we're at the root so return\n if (this.path === '') return\n let parts = this.path.split('/')\n this.path = parts.slice(0, parts.length - 2).join('/')\n // Only append the last slash if we're not at the root\n // The root is 2 because it's the path before clicking back\n if (parts.length > 2) {\n this.path += '/'\n }\n this.update()\n },\n fileClick(event) {\n if (event.icon === 'mdi-folder') {\n if (this.bucket === '') {\n // initial bucket click\n this.bucket = event.name\n } else {\n this.path += `${event.name}/`\n }\n this.update()\n }\n },\n downloadFile(filename) {\n Api.get(\n `/openc3-api/storage/download/${encodeURIComponent(\n this.path\n )}${filename}?bucket=OPENC3_${this.bucket.toUpperCase()}_BUCKET`\n )\n .then((response) => {\n // Make a link and then 'click' on it to start the download\n const link = document.createElement('a')\n link.href = response.data.url\n link.setAttribute('download', filename)\n link.click()\n })\n .catch((response) => {\n this.$notify.caution({\n title: `Unable to download file ${this.path}${filename} from bucket ${this.bucket}`,\n })\n })\n },\n deleteFile(filename) {\n this.$dialog\n .confirm(`Are you sure you want to delete: ${filename}`, {\n okText: 'Delete',\n cancelText: 'Cancel',\n })\n .then((dialog) => {\n return Api.delete(\n `/openc3-api/storage/delete/${encodeURIComponent(\n this.path\n )}${filename}?bucket=OPENC3_${this.bucket.toUpperCase()}_BUCKET`\n )\n })\n .then((response) => {\n this.updateFiles()\n })\n },\n updateFiles() {\n Api.get(\n `/openc3-api/storage/files/OPENC3_${this.bucket.toUpperCase()}_BUCKET/${\n this.path\n }`\n )\n .then((response) => {\n this.files = response.data[0].map((bucket) => {\n return { name: bucket, icon: 'mdi-folder' }\n })\n this.files = this.files.concat(\n response.data[1].map((item) => {\n return {\n name: item.name,\n icon: 'mdi-file',\n size: item.size,\n modified: item.modified,\n download: true,\n }\n })\n )\n })\n .catch((response) => {\n this.files = []\n if (response.data.message) {\n this.$notify.caution({\n title: response.data.message,\n })\n } else {\n this.$notify.caution({\n title: response.message,\n })\n }\n })\n },\n },\n}\n</script>\n\n<style scoped>\n.file-input {\n display: block;\n flex: none;\n padding-top: 0px;\n margin-top: 0px;\n}\n</style>\n","import mod from \"-!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./BucketExplorer.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./BucketExplorer.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./BucketExplorer.vue?vue&type=template&id=1be1ddea&scoped=true&\"\nimport script from \"./BucketExplorer.vue?vue&type=script&lang=js&\"\nexport * from \"./BucketExplorer.vue?vue&type=script&lang=js&\"\nimport style0 from \"./BucketExplorer.vue?vue&type=style&index=0&id=1be1ddea&prod&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1be1ddea\",\n null\n \n)\n\nexport default component.exports","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".file-input[data-v-1be1ddea]{display:block;flex:none;padding-top:0;margin-top:0}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".v-list[data-v-2eb37f67] .v-label{margin-left:5px}.v-list-item__icon[data-v-2eb37f67]{margin-right:15px!important}.v-list-item__title[data-v-2eb37f67]{color:#fff}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!../../../../../node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[3]!../../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./BucketExplorer.vue?vue&type=style&index=0&id=1be1ddea&prod&scoped=true&lang=css&\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"00d705a7\", content, true, {\"sourceMap\":false,\"shadowMode\":false});","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!../../../../node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[3]!../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TopBar.vue?vue&type=style&index=0&id=2eb37f67&prod&scoped=true&lang=css&\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"706a3f6d\", content, true, {\"sourceMap\":false,\"shadowMode\":false});"],"names":["render","_vm","this","_c","_self","attrs","title","staticClass","_v","_l","buckets","bucket","index","key","on","$event","stopPropagation","selectBucket","_s","model","value","search","callback","$$v","expression","headers","files","showFirstLastPage","itemsPerPageOptions","firstIcon","lastIcon","prevIcon","nextIcon","fileClick","scopedSlots","_u","fn","backArrow","path","file","proxy","item","icon","name","downloadFile","_e","deleteFile","staticRenderFns","menus","menu","i","_g","_b","formatDT","label","domProps","radioGroup","items","option","j","divider","disabled","command","radio","checkbox","checked","$set","style","props","type","default","methods","mounted","document","component","vueInstance","Vue","axiosInstance","axios","baseURL","location","origin","timeout","params","interceptors","response","use","error","status","OpenC3Auth","updateToken","defaultMinValidity","includes","toString","Promise","reject","body","statusText","config","data","message","exception","class","$notify","serious","request","method","url","noAuth","noScope","login","localStorage","openc3Token","window","openc3Scope","acceptOnlyDefaultHeaders","Accept","fullDefaultHeaders","get","put","post","delete","components","TopBar","text","created","Api","watch","encodeURIComponent","presignedRequest","update","then","link","catch","confirm","okText","cancelText","updateFiles","size","modified","download","___CSS_LOADER_EXPORT___","push","module","id","content","__esModule","locals","exports","add"],"sourceRoot":""}
|