diff --git a/src/vue-poc/app.vue b/src/vue-poc/app.vue index 57e2780..ae6a4f5 100644 --- a/src/vue-poc/app.vue +++ b/src/vue-poc/app.vue @@ -132,7 +132,8 @@ {href: '/tabs',text: 'Tabs',icon: 'switch_camera'}, {href: '/validate',text: 'Validate',icon: 'playlist_add_check'}, {href: '/transform',text: 'XSLT Transform',icon: 'forward'}, - {href: '/tasks',text: 'Tasks',icon: 'update'} + {href: '/tasks',text: 'Tasks',icon: 'update'}, + {href: '/history/tasks',text: 'history',icon: 'history'} ]}, { icon: 'folder_open', @@ -142,7 +143,7 @@ {href: '/database', text: 'Databases',icon: 'developer_mode' }, {href: '/files', text: 'File system',icon: 'folder' }, - {href: '/history',text: 'history',icon: 'history'} + {href: '/history/files',text: 'history',icon: 'history'} ]}, { icon: 'memory', diff --git a/src/vue-poc/components/qd-table.vue b/src/vue-poc/components/qd-table.vue index 04ed544..f1baeda 100644 --- a/src/vue-poc/components/qd-table.vue +++ b/src/vue-poc/components/qd-table.vue @@ -6,7 +6,7 @@ - {{ props.item.name }} - {{ props.item.permission }} + XX{{ props.item.name }} + YY{{ foo(props.item) }} + zz{{ foo(props.index) }} @@ -64,7 +65,7 @@ default: "entity" }, noDataMsg:{ - default: "No USERS found @todo" + default: "No data found." }, entity:{ default: "entity" @@ -88,6 +89,9 @@ console.log("items",r.data.items,"headers ",this.headers); this.items=r.data.items; }) + }, + foo(x){ + return 42 } }, created:function(){ diff --git a/src/vue-poc/features/catalog/test.xq b/src/vue-poc/features/catalog/test.xq new file mode 100644 index 0000000..4a7631b --- /dev/null +++ b/src/vue-poc/features/catalog/test.xq @@ -0,0 +1,3 @@ +fetch:xml("http://transpect.io/test/test.xml", +map{"catfile": "C:\Users\andy\Desktop\basex.versions\basex.91.0831\etc\mycatalog.xml"} +) \ No newline at end of file diff --git a/src/vue-poc/features/edit/edit.xqm b/src/vue-poc/features/edit/edit.xqm index d88268e..3bb079b 100644 --- a/src/vue-poc/features/edit/edit.xqm +++ b/src/vue-poc/features/edit/edit.xqm @@ -59,7 +59,7 @@ function vue-api:edit-post($url as xs:string,$data) : Returns a file content. :) declare -%rest:GET %rest:path("/vue-poc/api/get") +%rest:GET %rest:path("/vue-poc/api/get2") %rest:query-param("url", "{$url}") function vue-api:get-webfile($url as xs:string?) as element(json) @@ -79,15 +79,21 @@ as element(json) (:~ : Returns a file content. + : @param $url starts with protocol :) declare -%rest:GET %rest:path("/vue-poc/api/get2") +%rest:GET %rest:path("/vue-poc/api/get") %rest:query-param("url", "{$url}") %output:method("json") function vue-api:get-file($url as xs:string?) as element(json) { - let $path := $url + let $protocol := substring-before($url,":") + let $path:=if($protocol eq "webfile") then + substring-after($url,":") =>ufile:web() + else + $url + return if( file:exists($path))then let $type:=mt:type($path) let $fetch:=mt:fetch-fn($type("treat-as")) diff --git a/src/vue-poc/features/edit/tabs.vue b/src/vue-poc/features/edit/tabs.vue index 8684d2f..c108dfc 100644 --- a/src/vue-poc/features/edit/tabs.vue +++ b/src/vue-poc/features/edit/tabs.vue @@ -18,7 +18,7 @@ - subscriptions + Actionarrow_drop_down Actions @@ -29,7 +29,7 @@ - + *{{ nextId }} @@ -338,15 +338,14 @@ beforeRouteEnter (to, from, next) { Promise.all([settings.getItem('settings/ace'), - settings.getItem('edit/items'), - settings.getItem('edit/currentId'), + settings.getItem('edit/items') ]) .then(function(values) { next(vm => { vm.aceSettings = values[0]; vm.items = values[1]; - vm.currentId = values[2]; - //console.log("done all",values); + vm.currentId = vm.items.length+1; + console.log("nextid: ",vm.currentId); }) }) }, @@ -356,14 +355,16 @@ // be navigated away from. // has access to `this` component instance. settings.setItem('edit/items',this.items); - settings.setItem('edit/currentId',this.currentId); next(true); }, created:function(){ var url=this.$route.query.url; - if(url)this.loadItem(url); + if(url){ + this.loadItem(url); + }else{ var id=this.$route.query.id; this.currentId=id?id:null; + } } } diff --git a/src/vue-poc/features/collection/history.vue b/src/vue-poc/features/history/filehistory.vue similarity index 73% rename from src/vue-poc/features/collection/history.vue rename to src/vue-poc/features/history/filehistory.vue index 35d6031..fa493b6 100644 --- a/src/vue-poc/features/collection/history.vue +++ b/src/vue-poc/features/history/filehistory.vue @@ -1,8 +1,8 @@ -