XQDoc for
-
+ ,id:
diff --git a/src/vue-poc/lib/xqdoc/xqdoc-proj.xqm b/src/vue-poc/lib/xqdoc/xqdoc-proj.xqm
index f69b9c1..8e47776 100644
--- a/src/vue-poc/lib/xqdoc/xqdoc-proj.xqm
+++ b/src/vue-poc/lib/xqdoc/xqdoc-proj.xqm
@@ -14,8 +14,11 @@ declare variable $xqd:XML:=map{"indent": "no"};
declare variable $xqd:mod-xslt external :="html-module.xsl";
declare variable $xqd:index-xslt external :="html-index.xsl";
-(:~ save documentation for files to target
- :
+(:~
+ : save documentation for files to target
+ : @param $files c:directory-list
+ : @param $target where to save
+ : @param $opts
:)
declare function xqd:save-xq($files,$target,$params as map(*))
{
diff --git a/src/vue-poc/models.gen.xqm b/src/vue-poc/models.gen.xqm
index 1a55218..252bd00 100644
--- a/src/vue-poc/models.gen.xqm
+++ b/src/vue-poc/models.gen.xqm
@@ -1,5 +1,5 @@
(: entity access maps
- : auto generated from xml files in entities folder at: 2018-06-20T22:41:55.037+01:00
+ : auto generated from xml files in entities folder at: 2018-06-27T22:03:58.364+01:00
:)
module namespace entity = 'quodatum.models.generated';
diff --git a/src/vue-poc/models/adminlog.xml b/src/vue-poc/models/entities/adminlog.xml
similarity index 94%
rename from src/vue-poc/models/adminlog.xml
rename to src/vue-poc/models/entities/adminlog.xml
index 77bb12b..c737b79 100644
--- a/src/vue-poc/models/adminlog.xml
+++ b/src/vue-poc/models/entities/adminlog.xml
@@ -27,8 +27,7 @@
.
-
-
- fa fa-calendar
+
+
hof:top-k-by(admin:logs(), hof:id#1, 2)/string()!reverse(admin:logs(.,true()))
\ No newline at end of file
diff --git a/src/vue-poc/models/entity.field.xml b/src/vue-poc/models/entities/entity.field.xml
similarity index 68%
rename from src/vue-poc/models/entity.field.xml
rename to src/vue-poc/models/entities/entity.field.xml
index 31fa6fd..fe15d68 100644
--- a/src/vue-poc/models/entity.field.xml
+++ b/src/vue-poc/models/entities/entity.field.xml
@@ -1,8 +1,8 @@
-
- About an entity field.
-
+
+ About an entity field.
+
name
@@ -21,13 +21,12 @@
ent:xpath
- containing entity
- ../../@name
-
+ containing entity
+ ../../@name
+
-
+
name description
- glyphicon glyphicon-minus
collection("doc-doc")//ent:field
\ No newline at end of file
diff --git a/src/vue-poc/models/entity.xml b/src/vue-poc/models/entities/entity.xml
similarity index 95%
rename from src/vue-poc/models/entity.xml
rename to src/vue-poc/models/entities/entity.xml
index 78ea12e..21b0342 100644
--- a/src/vue-poc/models/entity.xml
+++ b/src/vue-poc/models/entities/entity.xml
@@ -30,7 +30,7 @@
css class for icon
- ent:iconclass
+ ent:views/@iconclass
The number of fields for this entity
@@ -48,6 +48,7 @@
parent entity link if any
fn:concat("/data/entity/",ent:parent/@name)
+
-
+
name description
-
- glyphicon glyphicon-list-alt
+
collection("vue-poc")//ent:entity
\ No newline at end of file
diff --git a/src/vue-poc/models/entities/filehistory.xml b/src/vue-poc/models/entities/filehistory.xml
new file mode 100644
index 0000000..0947588
--- /dev/null
+++ b/src/vue-poc/models/entities/filehistory.xml
@@ -0,0 +1,29 @@
+
+ vue-poc file view events
+
+
+
+ time of event
+ @when
+
+
+ user
+ @user
+
+
+ id
+ @id
+
+
+ mode eg file basexdb
+ h:file/@mode
+
+
+
+ path
+ h:file/@url
+
+
+
+ doc("vue-poc/history.xml")/h:history/h:event[h:file]
+
\ No newline at end of file
diff --git a/src/vue-poc/models/jobrun.xml b/src/vue-poc/models/entities/jobrun.xml
similarity index 95%
rename from src/vue-poc/models/jobrun.xml
rename to src/vue-poc/models/entities/jobrun.xml
index 10996c0..d4ce9f2 100644
--- a/src/vue-poc/models/jobrun.xml
+++ b/src/vue-poc/models/entities/jobrun.xml
@@ -28,10 +28,9 @@
string-length(result)
-
+
name description
- fa fa-file-code-o
collection("vue-poc/jobrun")/jobrun
\ No newline at end of file
diff --git a/src/vue-poc/models/namespace.xml b/src/vue-poc/models/entities/namespace.xml
similarity index 70%
rename from src/vue-poc/models/namespace.xml
rename to src/vue-poc/models/entities/namespace.xml
index 7229b70..df2d585 100644
--- a/src/vue-poc/models/namespace.xml
+++ b/src/vue-poc/models/entities/namespace.xml
@@ -10,15 +10,14 @@
@prefix
- about the namespace
- description
-
-
+ about the namespace
+ description
+
+
-
- xmlns description
-
- label
+
+ xmlns description
+
collection("vue-poc")/namespaces/namespace
\ No newline at end of file
diff --git a/src/vue-poc/models/entities/query.xml b/src/vue-poc/models/entities/query.xml
new file mode 100644
index 0000000..0377169
--- /dev/null
+++ b/src/vue-poc/models/entities/query.xml
@@ -0,0 +1,32 @@
+
+ An replx query
+
+
+
+
+ unique id
+ @id
+
+
+ date
+ created
+
+
+ query
+ query
+
+
+ result
+ substring(result,0,1000)
+
+
+ result
+ string-length(result)
+
+
+
+ name description
+
+ collection("replx/queries")/query
+
+
\ No newline at end of file
diff --git a/src/vue-poc/models/search-result.xml b/src/vue-poc/models/entities/search-result.xml
similarity index 93%
rename from src/vue-poc/models/search-result.xml
rename to src/vue-poc/models/entities/search-result.xml
index 275a21c..e8d1831 100644
--- a/src/vue-poc/models/search-result.xml
+++ b/src/vue-poc/models/entities/search-result.xml
@@ -18,6 +18,6 @@
"app.item.index({'name':'benchx'})"
- fa fa-question-circle
+
\ No newline at end of file
diff --git a/src/vue-poc/models/thumbnail.xml b/src/vue-poc/models/entities/thumbnail.xml
similarity index 96%
rename from src/vue-poc/models/thumbnail.xml
rename to src/vue-poc/models/entities/thumbnail.xml
index 11794d9..00e0613 100644
--- a/src/vue-poc/models/thumbnail.xml
+++ b/src/vue-poc/models/entities/thumbnail.xml
@@ -38,10 +38,8 @@
-
+
name
-
- fa fa-file
collection($cfg:DB-IMAGE || "/image")/image
\ No newline at end of file
diff --git a/src/vue-poc/models/users.xml b/src/vue-poc/models/entities/user.xml
similarity index 81%
rename from src/vue-poc/models/users.xml
rename to src/vue-poc/models/entities/user.xml
index 48817ec..9c972d7 100644
--- a/src/vue-poc/models/users.xml
+++ b/src/vue-poc/models/entities/user.xml
@@ -1,5 +1,5 @@
- users
+ A BaseX user
@@ -11,8 +11,6 @@
@permission
-
-
- fa fa-calendar
+
user:list-details()
\ No newline at end of file
diff --git a/src/vue-poc/models/xqdoc.xml b/src/vue-poc/models/entities/xqdoc.xml
similarity index 88%
rename from src/vue-poc/models/xqdoc.xml
rename to src/vue-poc/models/entities/xqdoc.xml
index fc7c12a..234f3ca 100644
--- a/src/vue-poc/models/xqdoc.xml
+++ b/src/vue-poc/models/entities/xqdoc.xml
@@ -11,8 +11,6 @@
@root
-
-
- fa fa-calendar
+
()
\ No newline at end of file
diff --git a/src/vue-poc/models/filehistory.xml b/src/vue-poc/models/filehistory.xml
deleted file mode 100644
index 569c83a..0000000
--- a/src/vue-poc/models/filehistory.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
- vue-poc file view events
-
-
-
- time of event
- @when
-
-
- user
- @user
-
-
- id
- @id
-
-
- mode eg file basexdb
- h:file/@mode
-
-
-
- path
- h:file/@url
-
-
-
-
- fa fa-calendar
- doc("vue-poc/history.xml")/h:history/h:event[h:file]
-
\ No newline at end of file
diff --git a/src/vue-poc/models/query.xml b/src/vue-poc/models/query.xml
deleted file mode 100644
index ceda7d1..0000000
--- a/src/vue-poc/models/query.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
- An replx query
-
-
-
-
- unique id
- @id
-
-
- date
- created
-
-
- query
- query
-
-
- result
- substring(result,0,1000)
-
-
- result
- string-length(result)
-
-
-
- name description
-
- fa fa-file-code-o
- collection("replx/queries")/query
-
-
\ No newline at end of file
diff --git a/src/vue-poc/models/schemas/entity.xsd b/src/vue-poc/models/schemas/entity.xsd
new file mode 100644
index 0000000..ec9b8f5
--- /dev/null
+++ b/src/vue-poc/models/schemas/entity.xsd
@@ -0,0 +1,89 @@
+
+
+
+ Root element for entity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ about the entity
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/vue-poc/static/app-gen.js b/src/vue-poc/static/app-gen.js
index fcf2c4a..6bc6d7c 100644
--- a/src/vue-poc/static/app-gen.js
+++ b/src/vue-poc/static/app-gen.js
@@ -1,4 +1,4 @@
-// generated 2018-06-24T22:46:13.105+01:00
+// generated 2018-07-06T22:33:10.411+01:00
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/qd-autoheight.vue
Vue.component('qd-autoheight',{template:`
@@ -50,6 +50,46 @@ Vue.component('qd-confirm',{template:`
);
+// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/qd-fileupload.vue
+Vue.component('qd-fileupload',{template:`
+
+
+
+
+
+
+
+
+
+
+ {{ file.name }} {{ file.status }}
+
+
+
+
+ `,
+
+ data () {
+ return {
+ options: {
+ url: '/vue-poc/api/upload',
+ paramName: 'file',
+ maxFilesize: {
+ limit: 1,
+ message: '{{ filesize }} is greater than the {{ maxFilesize }}'
+ },
+ maxFiles: {
+ limit: 5,
+ message: 'You can only upload a max of 5 files'
+ }
+ }
+ }
+ }
+
+ }
+
+ );
+
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/qd-fullscreen.vue
Vue.component('qd-fullscreen',{template:`
@@ -153,7 +193,7 @@ Vue.component('qd-panel',{template:`
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/qd-search.vue
Vue.component('qd-search',{template:`
-
+
`,
data:function(){return {
@@ -169,7 +209,7 @@ Vue.component('qd-search',{template:`
this.loading = true
// Simulated ajax query
setTimeout(() => {
- this.items2 = ["aa","bb",this.si],
+ this.items2 = ["aa","bb"],
this.loading = false
}, 500)
},
@@ -194,9 +234,13 @@ Vue.component('qd-table',{template:`
- Refresh
+
+ refresh
+
+ {{ entity }}
-
+
+
@@ -217,8 +261,14 @@ Vue.component('qd-table',{template:`
]
},
dataUri:{
- default: "users"
- }
+ default: "entity"
+ },
+ noDataMsg:{
+ default: "No USERS found @todo"
+ },
+ entity:{
+ default: "entity"
+ }
},
data: function(){
return {
@@ -230,18 +280,19 @@ Vue.component('qd-table',{template:`
}
},
methods:{
- getData(){
+ getItems(){
this.loading=true;
HTTP.get(this.dataUri)
.then(r=>{
- this.loading=false
- this.items=r.data
+ this.loading=false;
+ console.log("items",r);
+ this.items=r.data.items;
})
}
},
created:function(){
- console.log("qd-table")
- this.getData()
+ console.log("qd-table");
+ this.getItems();
}
}
@@ -890,7 +941,12 @@ const Notfound=Vue.extend({template:`
const About=Vue.extend({template:`
-
+
+
+
+
+ Vue-poc
+
account_circle
close
@@ -905,11 +961,6 @@ const About=Vue.extend({template:`
delete
-
-
-
- Vue-poc
-
A development environment for managing XML sources and processes.
@@ -1032,29 +1083,28 @@ const Log=Vue.extend({template:`
-
-
- add_circle
-
-
-
-
+
refresh
+
+
+ add
+
-
- settings
-
-
- Settings TODO
-
-
- Autorefresh
-
-
-
+
+
+ settings
+
+
+ Settings
+
+
+
+
+
+
@@ -1095,6 +1145,9 @@ const Log=Vue.extend({template:`
}
},
methods:{
+ address(text){
+ return "%" + text;
+ },
getItems(){
this.loading=true
HTTP.get("log",{params:this.q})
@@ -1654,7 +1707,7 @@ const Tree=Vue.extend({template:`
- vue-jstree@1.0.11
+ vue-jstree@2.1.16
todo
@@ -4048,10 +4101,9 @@ const Namespace=Vue.extend({template:`
load(){
this.loading= true
- HTTP.get("data/namespace",{params:{}})
+ HTTP.get("data/namespace",{params:{q:this.q}})
.then(r=>{
this.items= r.data.items
- this.q= null
this.loading= false
})
.catch(error=> {
@@ -4418,6 +4470,7 @@ const Repo=Vue.extend({template:`
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/scratch.vue
const Scratch=Vue.extend({template:`
+ up load
@@ -4430,8 +4483,13 @@ const Scratch=Vue.extend({template:`
ace:"here "
}
},
+ methods:{
+ upit:function(s){
+ alert("up")
+ }
+ },
mounted:function(){
- console.log("notfound",this.$route.path)
+ console.log("scratch",this.$route.path)
}
}
@@ -5269,12 +5327,25 @@ const Thumbnail=Vue.extend({template:`
-
- output todo
-
-
- Back
+
+
+ Back
go
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -5283,9 +5354,13 @@ const Thumbnail=Vue.extend({template:`
data(){
return {
- image:"http://images.metmuseum.org/CRDImages/ep/original/DT46.jpg",
+ image:"https://cdn.pixabay.com/photo/2017/10/31/07/49/horses-2904536_960_720.jpg",
step: 0,
- taskxml:" "
+ taskxml:" ",
+ items:[
+ {
+ src: 'https://cdn.pixabay.com/photo/2017/10/31/07/49/horses-2904536_960_720.jpg'
+ }]
}
},
methods:{
@@ -5331,7 +5406,13 @@ const Thumbnail=Vue.extend({template:`
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/users/users.vue
const Users=Vue.extend({template:`
-
+
+
+
+ {{ props.item.id}}
+ {{ props.item.state }}
+
+
@@ -5354,28 +5435,31 @@ const Users=Vue.extend({template:`
}
},
- created:function(){
- console.log("qd-table")
- }
+created:function(){
+ console.log("users")
+}
}
);
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/validate/validate.vue
const Validate=Vue.extend({template:`
-
+
+
+ {{ snackbar.msg }}
+ Close
+
play_circle_outline Validate
- ms. Height:
-
+ ms.
settings
- Settings................
+ @TODO.......
stuff
@@ -5383,13 +5467,21 @@ const Validate=Vue.extend({template:`
-
-
-
- test here
-
-
+
+
+
+
+
+
+
+
+
+ Result: {{ result }}
+
+
+
+
`,
@@ -5400,38 +5492,53 @@ const Validate=Vue.extend({template:`
elapsed: null,
height: null,
result: null,
- doc: "c:/test.xml",
- schema: "c:/schema.xsd"
- }
+ fields:[
+ {model: "schema", label: "Schema (xsd url)"},
+ {model: "doc", label: "Doc (url)"}
+
+ ],
+ rules: {
+ required: value => !!value || 'Required.'
+ },
+ params:{
+ doc: "C:/Users/andy/git/vue-poc/src/vue-poc/models/adminlog.xml",
+ schema: "C:/Users/andy/git/vue-poc/src/vue-poc/models/schemas/entity.xsd"
+ },
+ snackbar:{show:false,msg:"",context:"success"}
+ }
},
methods:{
onResize(){
- this.height = window.innerHeight
+ //console.log("EL",this.$el);
+ var el=this.$refs["auto"];
+ var h=window.innerHeight - el.getBoundingClientRect().top -32;
+ var h=Math.max(1,h) ;
+ //console.log("resize h",h,el.style)
+ el.style.height=h +"px";
},
- validate(){
+ validate(){
this.loading=true
this.start = performance.now();
- HTTPNE.get("validate",Qs.stringify({doc: this.doc, schema: this.schema}))
+ HTTP.post("validate",Qs.stringify(this.params))
.then(r=>{
- console.log(r)
+ console.log(r);
+ this.snackbar={show:true,msg:r.data.msg,context:"success"};
this.elapsed=Math.floor(performance.now() - this.start);
this.loading=false
if(r.data.rc==0){
- this.result=r.data.result
+ this.result=r.data
}else{
- this.result=r.data.info
+ this.result=r.data
}
})
.catch(r=> {
- console.log("error",r)
+ console.log("error",r.response.data)
+ this.snackbar={show: true, msg: r.response.data, context: "error"}
this.result=r.message + ": "+ r.config.url + "\n"+ r.response.data
this.loading=false
});
},
- },
- created:function(){
- console.log("notfound",this.$route.query.q)
}
}
@@ -5805,8 +5912,9 @@ const Vuepoc=Vue.extend({template:`
-
-
+
+
+
@@ -6001,7 +6109,7 @@ const Vuepoc=Vue.extend({template:`
Vue.config.errorHandler = function (err, vm, info) {
// handle error
// `info` is a Vue-specific error info, e.g. which lifecycle hook
- console.error(err, vm, info);
+ console.log('[Global Error Handler]: Error in ' + info + ': ' + err);
var msg=JSON.stringify(err)
that.showAlert("vue error:\n"+msg)
//alert("vue error");
@@ -6022,9 +6130,9 @@ const Vuepoc=Vue.extend({template:`
HTTP.get("status")
.then(r=>{
- console.log("status",r.data)
- Object.assign(Auth,r.data)
- this.$forceUpdate()
+ console.log("status",r)
+ //Object.assign(Auth,r.data)
+ //this.$forceUpdate()
})
},
diff --git a/src/vue-poc/static/app.css b/src/vue-poc/static/app.css
index 6787a28..d2ac37a 100644
--- a/src/vue-poc/static/app.css
+++ b/src/vue-poc/static/app.css
@@ -135,6 +135,10 @@ height: 100%;
background-color: green;
border: thick double #32a1ce;
}
+
+.contain {
+ object-fit: contain;
+}
.canvas {
overflow: hidden;
}
diff --git a/src/vue-poc/static/app.html b/src/vue-poc/static/app.html
index 68a1ac5..c0d03ee 100644
--- a/src/vue-poc/static/app.html
+++ b/src/vue-poc/static/app.html
@@ -11,7 +11,7 @@
-
+
@@ -22,7 +22,7 @@
-vue-poc (v0.3.5)
+vue-poc (v0.3.6)
@@ -38,7 +38,7 @@
-
+
@@ -49,8 +49,8 @@
-
-
+
+
diff --git a/src/vue-poc/tasks/generate-model-local.xq b/src/vue-poc/tasks/generate-model-local.xq
deleted file mode 100644
index f5c5462..0000000
--- a/src/vue-poc/tasks/generate-model-local.xq
+++ /dev/null
@@ -1,19 +0,0 @@
-(:~
- : Update `generated/models.xqm` from files in `data/models`
- : using file:///C:/Users/andy/workspace/app-doc/src/doc/data/doc/models
- :)
-
-declare namespace task="https://github.com/Quodatum/app-doc/task";
-import module namespace bf = 'quodatum.tools.buildfields' at "../lib/entity-gen.xqm";
-
-declare variable $efolder:="C:/Users/andy/git/vue-poc/src/vue-poc/models";
-declare variable $target:="C:/Users/andy/git/vue-poc/src/vue-poc/models.gen.xqm";
-
-let $config:='import module namespace cfg = "quodatum:media.image.configure" at "config.xqm";'
-
-let $src:=bf:module(bf:entities($efolder),$config)
-return (
- file:write-text($target,$src)
- ,db:output("generated " || $target)
-)
-
Vue-poc
+
account_circle
close
@@ -905,11 +961,6 @@ const About=Vue.extend({template:`
delete
-
-
-
- Vue-poc
-
A development environment for managing XML sources and processes.
@@ -1032,29 +1083,28 @@ const Log=Vue.extend({template:`
-
-
- add_circle
-
-
-
-
+
refresh
+
+
+ add
+
-
- settings
-
-
- Settings TODO
-
-
- Autorefresh
-
-
-
+
+
+ settings
+
+
+ Settings
+
+
+
+
+
+
@@ -1095,6 +1145,9 @@ const Log=Vue.extend({template:`
}
},
methods:{
+ address(text){
+ return "%" + text;
+ },
getItems(){
this.loading=true
HTTP.get("log",{params:this.q})
@@ -1654,7 +1707,7 @@ const Tree=Vue.extend({template:`
- vue-jstree@1.0.11
+ vue-jstree@2.1.16
todo
@@ -4048,10 +4101,9 @@ const Namespace=Vue.extend({template:`
load(){
this.loading= true
- HTTP.get("data/namespace",{params:{}})
+ HTTP.get("data/namespace",{params:{q:this.q}})
.then(r=>{
this.items= r.data.items
- this.q= null
this.loading= false
})
.catch(error=> {
@@ -4418,6 +4470,7 @@ const Repo=Vue.extend({template:`
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/scratch.vue
const Scratch=Vue.extend({template:`
+ up load
@@ -4430,8 +4483,13 @@ const Scratch=Vue.extend({template:`
ace:"here "
}
},
+ methods:{
+ upit:function(s){
+ alert("up")
+ }
+ },
mounted:function(){
- console.log("notfound",this.$route.path)
+ console.log("scratch",this.$route.path)
}
}
@@ -5269,12 +5327,25 @@ const Thumbnail=Vue.extend({template:`
-
- output todo
-
-
- Back
+
+
+ Back
go
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -5283,9 +5354,13 @@ const Thumbnail=Vue.extend({template:`
data(){
return {
- image:"http://images.metmuseum.org/CRDImages/ep/original/DT46.jpg",
+ image:"https://cdn.pixabay.com/photo/2017/10/31/07/49/horses-2904536_960_720.jpg",
step: 0,
- taskxml:" "
+ taskxml:" ",
+ items:[
+ {
+ src: 'https://cdn.pixabay.com/photo/2017/10/31/07/49/horses-2904536_960_720.jpg'
+ }]
}
},
methods:{
@@ -5331,7 +5406,13 @@ const Thumbnail=Vue.extend({template:`
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/users/users.vue
const Users=Vue.extend({template:`
-
+
+
+
+ {{ props.item.id}}
+ {{ props.item.state }}
+
+
@@ -5354,28 +5435,31 @@ const Users=Vue.extend({template:`
}
},
- created:function(){
- console.log("qd-table")
- }
+created:function(){
+ console.log("users")
+}
}
);
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/validate/validate.vue
const Validate=Vue.extend({template:`
-
+
+
+ {{ snackbar.msg }}
+ Close
+
play_circle_outline Validate
- ms. Height:
-
+ ms.
settings
- Settings................
+ @TODO.......
stuff
@@ -5383,13 +5467,21 @@ const Validate=Vue.extend({template:`
-
-
-
- test here
-
-
+
+
+
+
+
+
+
+
+
+ Result: {{ result }}
+
+
+
+
`,
@@ -5400,38 +5492,53 @@ const Validate=Vue.extend({template:`
elapsed: null,
height: null,
result: null,
- doc: "c:/test.xml",
- schema: "c:/schema.xsd"
- }
+ fields:[
+ {model: "schema", label: "Schema (xsd url)"},
+ {model: "doc", label: "Doc (url)"}
+
+ ],
+ rules: {
+ required: value => !!value || 'Required.'
+ },
+ params:{
+ doc: "C:/Users/andy/git/vue-poc/src/vue-poc/models/adminlog.xml",
+ schema: "C:/Users/andy/git/vue-poc/src/vue-poc/models/schemas/entity.xsd"
+ },
+ snackbar:{show:false,msg:"",context:"success"}
+ }
},
methods:{
onResize(){
- this.height = window.innerHeight
+ //console.log("EL",this.$el);
+ var el=this.$refs["auto"];
+ var h=window.innerHeight - el.getBoundingClientRect().top -32;
+ var h=Math.max(1,h) ;
+ //console.log("resize h",h,el.style)
+ el.style.height=h +"px";
},
- validate(){
+ validate(){
this.loading=true
this.start = performance.now();
- HTTPNE.get("validate",Qs.stringify({doc: this.doc, schema: this.schema}))
+ HTTP.post("validate",Qs.stringify(this.params))
.then(r=>{
- console.log(r)
+ console.log(r);
+ this.snackbar={show:true,msg:r.data.msg,context:"success"};
this.elapsed=Math.floor(performance.now() - this.start);
this.loading=false
if(r.data.rc==0){
- this.result=r.data.result
+ this.result=r.data
}else{
- this.result=r.data.info
+ this.result=r.data
}
})
.catch(r=> {
- console.log("error",r)
+ console.log("error",r.response.data)
+ this.snackbar={show: true, msg: r.response.data, context: "error"}
this.result=r.message + ": "+ r.config.url + "\n"+ r.response.data
this.loading=false
});
},
- },
- created:function(){
- console.log("notfound",this.$route.query.q)
}
}
@@ -5805,8 +5912,9 @@ const Vuepoc=Vue.extend({template:`
-
-
+
+
+
@@ -6001,7 +6109,7 @@ const Vuepoc=Vue.extend({template:`
Vue.config.errorHandler = function (err, vm, info) {
// handle error
// `info` is a Vue-specific error info, e.g. which lifecycle hook
- console.error(err, vm, info);
+ console.log('[Global Error Handler]: Error in ' + info + ': ' + err);
var msg=JSON.stringify(err)
that.showAlert("vue error:\n"+msg)
//alert("vue error");
@@ -6022,9 +6130,9 @@ const Vuepoc=Vue.extend({template:`
HTTP.get("status")
.then(r=>{
- console.log("status",r.data)
- Object.assign(Auth,r.data)
- this.$forceUpdate()
+ console.log("status",r)
+ //Object.assign(Auth,r.data)
+ //this.$forceUpdate()
})
},
diff --git a/src/vue-poc/static/app.css b/src/vue-poc/static/app.css
index 6787a28..d2ac37a 100644
--- a/src/vue-poc/static/app.css
+++ b/src/vue-poc/static/app.css
@@ -135,6 +135,10 @@ height: 100%;
background-color: green;
border: thick double #32a1ce;
}
+
+.contain {
+ object-fit: contain;
+}
.canvas {
overflow: hidden;
}
diff --git a/src/vue-poc/static/app.html b/src/vue-poc/static/app.html
index 68a1ac5..c0d03ee 100644
--- a/src/vue-poc/static/app.html
+++ b/src/vue-poc/static/app.html
@@ -11,7 +11,7 @@
-
+
@@ -22,7 +22,7 @@
-vue-poc (v0.3.5)
+vue-poc (v0.3.6)
@@ -38,7 +38,7 @@
-
+
@@ -49,8 +49,8 @@
-
-
+
+
diff --git a/src/vue-poc/tasks/generate-model-local.xq b/src/vue-poc/tasks/generate-model-local.xq
deleted file mode 100644
index f5c5462..0000000
--- a/src/vue-poc/tasks/generate-model-local.xq
+++ /dev/null
@@ -1,19 +0,0 @@
-(:~
- : Update `generated/models.xqm` from files in `data/models`
- : using file:///C:/Users/andy/workspace/app-doc/src/doc/data/doc/models
- :)
-
-declare namespace task="https://github.com/Quodatum/app-doc/task";
-import module namespace bf = 'quodatum.tools.buildfields' at "../lib/entity-gen.xqm";
-
-declare variable $efolder:="C:/Users/andy/git/vue-poc/src/vue-poc/models";
-declare variable $target:="C:/Users/andy/git/vue-poc/src/vue-poc/models.gen.xqm";
-
-let $config:='import module namespace cfg = "quodatum:media.image.configure" at "config.xqm";'
-
-let $src:=bf:module(bf:entities($efolder),$config)
-return (
- file:write-text($target,$src)
- ,db:output("generated " || $target)
-)
-
Vue-poc -
A development environment for managing XML sources and processes. @@ -1032,29 +1083,28 @@ const Log=Vue.extend({template:`Result: {{ result }}
+