diff --git a/src/vue-poc/app.vue b/src/vue-poc/app.vue
index f493f4a..f9d468e 100644
--- a/src/vue-poc/app.vue
+++ b/src/vue-poc/app.vue
@@ -150,11 +150,11 @@
text: 'Server' ,
model: false,
children: [
- {href: '/jobs',text: 'Running jobs',icon: 'dashboard'},
- {href: '/logs',text: 'Server logs',icon: 'dns'},
+ {href: '/server/jobs',text: 'Running jobs',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: '/ping',text: 'Ping',icon: 'update'}
+ {href: '/server/ping',text: 'Ping',icon: 'update'}
]},
{
icon: 'camera_roll',
@@ -196,7 +196,7 @@
]},
{href: '/settings',text: 'Settings',icon: 'settings' },
- {href: '/about',text: 'About (v0.3.0)' , icon: 'help' },
+ {href: '/about',text: 'About (v0.3.1)' , icon: 'help' },
]
}},
@@ -204,7 +204,7 @@
session(){
- this.$router.push({path: '/session'})
+ this.$router.push({path: '/about'})
},
logout(){
diff --git a/src/vue-poc/features/adminlog/logadd.vue b/src/vue-poc/features/adminlog/logadd.vue
new file mode 100644
index 0000000..aa38da9
--- /dev/null
+++ b/src/vue-poc/features/adminlog/logadd.vue
@@ -0,0 +1,90 @@
+
+
+
+
+
+ arrow_back
+
+ Create log entry
+
+
+
+ submit
+
+ clear
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/vue-poc/features/adminlog/logs.vue b/src/vue-poc/features/adminlog/logs.vue
index a769653..cd67a29 100644
--- a/src/vue-poc/features/adminlog/logs.vue
+++ b/src/vue-poc/features/adminlog/logs.vue
@@ -3,6 +3,7 @@
+
refresh
-
+
+
+
+ add_circle
+
+
diff --git a/src/vue-poc/features/adminlog/logs.xqm b/src/vue-poc/features/adminlog/logs.xqm
index 1d2279d..ff6bde0 100644
--- a/src/vue-poc/features/adminlog/logs.xqm
+++ b/src/vue-poc/features/adminlog/logs.xqm
@@ -13,33 +13,19 @@ as element(json)
{
let $entity:=$entity:list("basexlog")
let $items:=$entity("data")()
- let $items:=$items[not(ends-with(. ,"/vue-poc/api/log"))]
+ let $items:=$items[false() or not(ends-with(. ,"/vue-poc/api/log"))]
(: let $_:=admin:write-log("hello admin:write-log") :)
return dice:response($items,$entity,web:dice())
};
-(:~
- : job info
- :)
declare
-%rest:GET %rest:path("/vue-poc/api/log/{$log}")
-%output:method("json")
-function j:log($log)
-as element(json)
+%rest:POST %rest:path("/vue-poc/api/log/add")
+%output:method("text")
+function j:add()
{
- let $j:=jobs:list-details($log)
- return
- {j:job-json($j)}
-
+let $type:="INFO"
+let $text:="A log message"
+ return ("AAAA",
+ admin:write-log($text, $type )
+ )
};
-
-declare function j:job-json($j)
-as element(*)*
-{
- {$j/@id/string()}
- ,{$j/@type/string()}
- ,{$j/@state/string()}
- ,{$j/@user/string()}
- ,{$j/@duration/string()}
- ,{$j/string()}
-};
\ No newline at end of file
diff --git a/src/vue-poc/features/collection/history.vue b/src/vue-poc/features/collection/history.vue
index c4c440d..35d6031 100644
--- a/src/vue-poc/features/collection/history.vue
+++ b/src/vue-poc/features/collection/history.vue
@@ -5,7 +5,7 @@
History
-
+
Example Chip
@@ -19,7 +19,7 @@
- info
+ switch_camera
@@ -49,7 +49,7 @@
router.push({ path: 'edit', query: { url:item.url, protocol:item.protocol }})
},
doEdit2(item){
- alert("dd")
+ router.push({ path: 'tabs', query: { url:item.protocol + ":" +item.url }})
}
},
created:function(){
diff --git a/src/vue-poc/features/pipeline/pipe.xq b/src/vue-poc/features/pipeline/pipe.xq
new file mode 100644
index 0000000..2d9f659
--- /dev/null
+++ b/src/vue-poc/features/pipeline/pipe.xq
@@ -0,0 +1,18 @@
+import module namespace qipe='http://quodatum.com/ns/pipeline' at "../../lib/pipeline.xqm" ;
+
+declare namespace docinfo="http://www.lexis-nexis.com/glp/docinfo";
+declare variable $src:="C:\Users\BUNCEAX\Desktop\08s3\data\";
+
+let $ip:=file:list($src,false(), "*.xml")
+let $ip:=subsequence($ip,1,100)!doc(concat($src,.))
+let $d:=
+
+
+
+
+ return qipe:run($d,$ip) =>count()
+
diff --git a/src/vue-poc/lib/pipeline.xqm b/src/vue-poc/lib/pipeline.xqm
index 3114011..f2972c5 100644
--- a/src/vue-poc/lib/pipeline.xqm
+++ b/src/vue-poc/lib/pipeline.xqm
@@ -14,7 +14,7 @@ declare variable $qipe:DEBUG:=false(); (: currently unused :)
: @param $initial starting data as sequence
: @result
:)
-declare function qipe:run($pipe as document-node(),$initial as item()* )
+declare function qipe:run($pipe as node(),$initial as item()* )
as item()*
{
let $steps:=$pipe/*/qipe:*
diff --git a/src/vue-poc/router.js b/src/vue-poc/router.js
index 34c16b6..fe6f8a9 100644
--- a/src/vue-poc/router.js
+++ b/src/vue-poc/router.js
@@ -43,7 +43,7 @@ const router = new VueRouter({
{ path: '/server/repo', component: Repo,meta:{title:"Repository"} },
{ path: '/files', component: Files,meta:{title:"File system"},props:{protocol:"webfile"} },
{ path: '/database', component: Files,meta:{title:"Databases"},props:{protocol:"xmldb"} },
- { path: '/ping', component: Ping,meta:{title:"Ping"} },
+
{ path: '/settings', component: { template: '' }
,children: [
{
@@ -62,6 +62,29 @@ const router = new VueRouter({
}
]
},
+
+ { path: '/server', component: { template: '' }
+ ,children: [
+ {
+ path: '',
+ component: Settings, meta:{title:"Settings"}
+ },
+ {
+ path: 'logs', name:"logs",
+ component: Log,
+ meta:{title:"Server logs"}
+ },
+ {
+ path: 'logs/add', name:"addlog",
+ component: Logadd,
+ meta:{title:"add Server logs"}
+ },
+ { path: 'jobs', name:"jobs", component: Jobs, meta:{title:"Jobs running"} },
+ { path: 'jobs/:job', name:"jobShow", component: Job, props: true, meta:{title:"Job Status"} },
+ { path: 'ping', component: Ping,meta:{title:"Ping"} }
+ ]
+ },
+
{ path: '/history', component: History, meta:{title:"File History"} },
{ path: '/puzzle', component: Puzzle, meta:{title:"Jigsaw"} },
{ path: '/svg', component: Svg, meta:{title:"SVG"} },
diff --git a/src/vue-poc/static/app-gen.js b/src/vue-poc/static/app-gen.js
index 7bf186c..c2ab8dd 100644
--- a/src/vue-poc/static/app-gen.js
+++ b/src/vue-poc/static/app-gen.js
@@ -1,4 +1,4 @@
-// generated 2018-06-17T15:48:13.622+01:00
+// generated 2018-06-19T23:27:38.406+01:00
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/qd-autoheight.vue
Vue.component('qd-autoheight',{template:`
@@ -950,14 +950,92 @@ const About=Vue.extend({template:`
}
);
+// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/adminlog/logadd.vue
+const Logadd=Vue.extend({template:`
+
+
+
+ arrow_back
+
+ Create log entry
+
+
+
+ submit
+
+ clear
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `,
+
+ data: () => ({
+ valid: true,
+ name: '',
+ nameRules: [
+ v => !!v || 'Name is required',
+ v => (v && v.length <= 10) || 'Name must be less than 10 characters'
+ ],
+
+ type: "INFO",
+ types: [
+ 'INFO',
+ 'TEST'
+ ],
+ checkbox: false
+ }),
+
+ methods: {
+ submit () {
+ if (this.$refs.form.validate()) {
+ // Native form submission is not yet supported
+ HTTP.post("log/add",{
+ name: this.name,
+ type: this.type,
+ checkbox: this.checkbox
+ })
+ .then(r=>{
+ alert("ok")
+ })
+ }
+ },
+ clear () {
+ this.$refs.form.reset()
+ }
+ },
+ mounted:function(){
+ console.log("logadd",this.$route.path)
+ }
+}
+
+ );
+
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/adminlog/logs.vue
const Log=Vue.extend({template:`
+
refresh
-
+
+
+
+ add_circle
+
+
@@ -1015,8 +1093,9 @@ const Log=Vue.extend({template:`
created:function(){
this.getItems()
},
- beforeDestroy(){
+ beforeRouteLeave(to, from, next){
if(this.timer) clearTimeout(this.timer);
+ return next()
}
}
@@ -1310,7 +1389,7 @@ const History=Vue.extend({template:`
History
-
+
Example Chip
@@ -1324,7 +1403,7 @@ const History=Vue.extend({template:`
- info
+ switch_camera
@@ -1353,7 +1432,7 @@ const History=Vue.extend({template:`
router.push({ path: 'edit', query: { url:item.url, protocol:item.protocol }})
},
doEdit2(item){
- alert("dd")
+ router.push({ path: 'tabs', query: { url:item.protocol + ":" +item.url }})
}
},
created:function(){
@@ -5565,7 +5644,7 @@ const router = new VueRouter({
{ path: '/server/repo', component: Repo,meta:{title:"Repository"} },
{ path: '/files', component: Files,meta:{title:"File system"},props:{protocol:"webfile"} },
{ path: '/database', component: Files,meta:{title:"Databases"},props:{protocol:"xmldb"} },
- { path: '/ping', component: Ping,meta:{title:"Ping"} },
+
{ path: '/settings', component: { template: '' }
,children: [
{
@@ -5584,6 +5663,29 @@ const router = new VueRouter({
}
]
},
+
+ { path: '/server', component: { template: '' }
+ ,children: [
+ {
+ path: '',
+ component: Settings, meta:{title:"Settings"}
+ },
+ {
+ path: 'logs', name:"logs",
+ component: Log,
+ meta:{title:"Server logs"}
+ },
+ {
+ path: 'logs/add', name:"addlog",
+ component: Logadd,
+ meta:{title:"add Server logs"}
+ },
+ { path: 'jobs', name:"jobs", component: Jobs, meta:{title:"Jobs running"} },
+ { path: 'jobs/:job', name:"jobShow", component: Job, props: true, meta:{title:"Job Status"} },
+ { path: 'ping', component: Ping,meta:{title:"Ping"} }
+ ]
+ },
+
{ path: '/history', component: History, meta:{title:"File History"} },
{ path: '/puzzle', component: Puzzle, meta:{title:"Jigsaw"} },
{ path: '/svg', component: Svg, meta:{title:"SVG"} },
@@ -5783,11 +5885,11 @@ const Vuepoc=Vue.extend({template:`
text: 'Server' ,
model: false,
children: [
- {href: '/jobs',text: 'Running jobs',icon: 'dashboard'},
- {href: '/logs',text: 'Server logs',icon: 'dns'},
+ {href: '/server/jobs',text: 'Running jobs',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: '/ping',text: 'Ping',icon: 'update'}
+ {href: '/server/ping',text: 'Ping',icon: 'update'}
]},
{
icon: 'camera_roll',
@@ -5829,7 +5931,7 @@ const Vuepoc=Vue.extend({template:`
]},
{href: '/settings',text: 'Settings',icon: 'settings' },
- {href: '/about',text: 'About (v0.3.0)' , icon: 'help' },
+ {href: '/about',text: 'About (v0.3.1)' , icon: 'help' },
]
}},
@@ -5837,7 +5939,7 @@ const Vuepoc=Vue.extend({template:`
session(){
- this.$router.push({path: '/session'})
+ this.$router.push({path: '/about'})
},
logout(){