diff --git a/src/vue-poc/app.vue b/src/vue-poc/app.vue index 6c1502a..0a66add 100644 --- a/src/vue-poc/app.vue +++ b/src/vue-poc/app.vue @@ -14,11 +14,8 @@ - - - - + + @@ -46,47 +43,23 @@ color="blue darken-3" dense dark > - - - {{$route.meta.title}} - - - + + {{$route.meta.title}} + - - - - - Session - - - logout - - - permission: {{$auth.permission}} - - - $route.path: {{$route.path}} - - - - + {{ $notification.unseen }} notifications - + - Full screen + Full screen + Dark theme @@ -108,7 +82,29 @@ - + + + + + + Session + + + logout + + + permission: {{$auth.permission}} + + + $route.path: {{$route.path}} + + + + @@ -149,26 +145,31 @@ model: false, children: [ {href: '/eval',text: 'Query',icon: 'play_circle_outline'}, - {href: '/tasks',text: 'Tasks',icon: 'update'}, + {href: '/edit',text: 'Edit',icon: 'mode_edit'}, {href: '/tabs',text: 'Tabs',icon: 'switch_camera'}, {href: '/validate',text: 'Validate',icon: 'playlist_add_check'}, - {href: '/transform',text: 'XSLT Transform',icon: 'forward'}, - - {href: '/history/tasks',text: 'history',icon: 'history'} + {href: '/transform',text: 'XSLT Transform',icon: 'forward'} ]}, + { - icon: 'folder_open', - text: 'Collections' , + icon: 'add_task', + text: 'Tasks' , model: false, children: [ - {href: '/database', text: 'Databases',icon: 'developer_mode' }, - {href: '/files', text: 'File system',icon: 'folder' }, - {href: '/documentation', text: 'Documentation',icon: 'library_books' }, - - {href: '/logdate',text: 'XML logs',icon: 'dns'}, - {href: '/history/files',text: 'history',icon: 'history'} + {href: '/tasks',text: 'Task list',icon: 'assignment'}, + {href: '/history/tasks',text: 'History',icon: 'history'} ]}, + { + icon: 'folder_open', + text: 'Collections' , + model: false, + children: [ + {href: '/database', text: 'Databases',icon: 'developer_mode' }, + {href: '/files', text: 'File system',icon: 'folder' }, + {href: '/documentation', text: 'Documentation',icon: 'library_books' }, + {href: '/history/files',text: 'history',icon: 'history'} + ]}, { icon: 'memory', text: 'Models' , @@ -190,14 +191,23 @@ {href: '/server/services',text: 'Services',icon: 'dashboard'}, {href: '/server/logs',text: 'Server logs',icon: 'dns'}, {href: '/server/users',text: 'Users',icon: 'supervisor_account'}, - {href: '/server/repo',text: 'Server code repository',icon: 'local_library'}, + {href: '/server/repo',text: 'Package repository',icon: 'local_library'}, {href: '/server/upload',text: 'Upload to server',icon: 'file_upload'}, - {href: '/server/ping',text: 'Ping',icon: 'update'}, - {href: '/server/dicetest',text: 'Dice performance',icon: 'update'}, + {href: '/server/settings',text: 'Server settings',icon: 'settings_applications'} ]}, + { + icon: 'hourglass_empty', + text: 'Performance' , + model: false, + children: [ + {href: '/logdate',text: 'XML logs',icon: 'dns'}, + {href: '/performance/ping',text: 'Ping',icon: 'update'}, + {href: '/performance/dicetest',text: 'Dice performance',icon: 'update'} + ] + }, { icon: 'camera_roll', text: 'Images' , diff --git a/src/vue-poc/components/mimetypes.js b/src/vue-poc/components/mimetypes.js index cec2a3e..7a3a6b0 100644 --- a/src/vue-poc/components/mimetypes.js +++ b/src/vue-poc/components/mimetypes.js @@ -1,5 +1,5 @@ // Mimetype info as vue extension. defines $MimeTypes -// +// $MimeTypes.mode // const MimeTypes=new function(){ var formatdom= t=>html_beautify(t, { indent_size: 3 ,indent_inner_html:true}); diff --git a/src/vue-poc/components/qd-table.vue b/src/vue-poc/components/qd-table.vue index 2c5fbad..c003d6d 100644 --- a/src/vue-poc/components/qd-table.vue +++ b/src/vue-poc/components/qd-table.vue @@ -1,19 +1,47 @@ - + diff --git a/src/vue-poc/features/components/tree.vue b/src/vue-poc/features/components/tree.vue index d685ba2..2cddd8a 100644 --- a/src/vue-poc/features/components/tree.vue +++ b/src/vue-poc/features/components/tree.vue @@ -2,7 +2,7 @@ + diff --git a/src/vue-poc/features/edit/edit.xqm b/src/vue-poc/features/edit/edit.xqm index c1dbed7..06a9215 100644 --- a/src/vue-poc/features/edit/edit.xqm +++ b/src/vue-poc/features/edit/edit.xqm @@ -8,7 +8,7 @@ import module namespace rest = "http://exquery.org/ns/restxq"; import module namespace session = "http://basex.org/modules/session"; import module namespace ufile = 'vue-poc/file' at "../../lib/file.xqm"; -import module namespace mt = 'quodatum.data.mimetype' at "../../lib/mimetype.xqm"; +import module namespace mt = 'urn:quodatum:data:mimetype' at "../../lib/mimetype.xqm"; declare namespace c="http://www.w3.org/ns/xproc-step"; diff --git a/src/vue-poc/features/eval/eval.vue b/src/vue-poc/features/eval/eval.vue index 23f1c99..6bea75e 100644 --- a/src/vue-poc/features/eval/eval.vue +++ b/src/vue-poc/features/eval/eval.vue @@ -60,14 +60,14 @@ - - - + + + - + Error diff --git a/src/vue-poc/features/job/job.vue b/src/vue-poc/features/job/job.vue index 35a9ff8..e5a0c38 100644 --- a/src/vue-poc/features/job/job.vue +++ b/src/vue-poc/features/job/job.vue @@ -34,10 +34,11 @@ {{ result }} - - {{ jobstate.text }} - - + + + + + diff --git a/src/vue-poc/features/job/jobs.vue b/src/vue-poc/features/job/jobs.vue index 3c1c307..aa4fc29 100644 --- a/src/vue-poc/features/job/jobs.vue +++ b/src/vue-poc/features/job/jobs.vue @@ -39,23 +39,27 @@ class="elevation-1" no-data-text="No Jobs currently running" > - + + + + + + + + @@ -70,8 +74,10 @@ value: 'id' }, { text: 'State', value: 'state' }, - { text: 'Registered', value: 'registered' }, + { text: 'Service?', value: 'isservice' }, // https://stackoverflow.com/a/58034316/3210344 { text: 'Start', value: 'start' }, + { text: 'Interval', value: 'interval' }, + { text: 'Registered', value: 'registered' }, { text: 'Duration', value: 'duration' }, { text: 'WriteL', value: 'writes' }, { text: 'ReadL', value: 'reads' }, @@ -92,7 +98,7 @@ HTTP.get("job") .then(r=>{ this.loading=false - this.items=r.data + this.items=r.data.items if(this.autorefresh) this.timer=setTimeout(()=>{ this.getJobs() }, 10000); }) diff --git a/src/vue-poc/features/job/jobs.xqm b/src/vue-poc/features/job/jobs.xqm index 1c08094..4e9a7ca 100644 --- a/src/vue-poc/features/job/jobs.xqm +++ b/src/vue-poc/features/job/jobs.xqm @@ -1,22 +1,21 @@ module namespace j = 'quodatum.test.jobs'; - +import module namespace entity ='quodatum.models.generated' at "../../models.gen.xqm"; +import module namespace dice = 'quodatum.web.dice/v4' at "../../lib/dice.xqm"; +import module namespace web = 'quodatum.web.utils4' at "../../lib/webutils.xqm"; (:~ : job list :) declare %rest:GET %rest:path("/vue-poc/api/job") +%rest:produces("application/json") %output:method("json") function j:list() as element(json) { - let $jlist:=jobs:list()[. != jobs:current()] !jobs:list-details(.) - return - {for $j in reverse($jlist) - return <_ type="object"> - {j:job-json($j)} - - } + let $entity:=$entity:list("basex.job") + let $items:=$entity?data() + return dice:response($items,$entity,web:dice()) }; @@ -26,27 +25,16 @@ as element(json) :) declare %rest:GET %rest:path("/vue-poc/api/job/{$job}") +%rest:produces("application/json") %output:method("json") function j:job($job) as element(json) { - let $j:=jobs:list-details($job) - return - {if($j) then j:job-json($j) else ()} - + let $this:=$entity:list("basex.job") + let $items:=$this?data() + let $fields:=$this?json + let $item:=$items[@id=$job] + (: just one :) + return {dice:json-flds($item,$fields)/*} }; -declare function j:job-json($j as element(job)) -as element(*)* -{ - {$j/@id/string()} - ,{$j/@type/string()} - ,{$j/@state/string()} - ,{$j/@user/string()} - ,{$j/@time/string()} - ,if($j/@start) then {$j/@start/string()} else () - ,{$j/@duration/string()} - ,{$j/string()} - ,{$j/@reads/string()} - ,{$j/@writes/string()} -}; \ No newline at end of file diff --git a/src/vue-poc/features/job/service1.vue b/src/vue-poc/features/job/service1.vue new file mode 100644 index 0000000..36fe6a5 --- /dev/null +++ b/src/vue-poc/features/job/service1.vue @@ -0,0 +1,113 @@ + + + + diff --git a/src/vue-poc/features/model/entity1.vue b/src/vue-poc/features/model/entity1.vue index 6fe6530..d1405c0 100644 --- a/src/vue-poc/features/model/entity1.vue +++ b/src/vue-poc/features/model/entity1.vue @@ -43,7 +43,7 @@ - + @@ -78,7 +78,8 @@ - + @@ -108,7 +109,7 @@ {text: "description", value: "description"}, {text: "xpath", value: "xpath"} ], - panel: [true, false, true] + panel: [1,2] } }, methods:{ diff --git a/src/vue-poc/features/namespaces/namespace.vue b/src/vue-poc/features/namespaces/namespace.vue index d42108a..1372c59 100644 --- a/src/vue-poc/features/namespaces/namespace.vue +++ b/src/vue-poc/features/namespaces/namespace.vue @@ -1,44 +1,9 @@