[mod] vuetify 1.5.16

This commit is contained in:
andy 2019-07-24 22:24:00 +01:00
parent 5ca759abeb
commit 466cfada2a
32 changed files with 920 additions and 213 deletions

View file

@ -1,5 +1,5 @@
WARNING=DO NOT MODIFY THIS FILE IF YOU DON'T UNDERSTAND
defaultDestination=C\:/Users/andy/Desktop/basex.versions/webapp
defaultDestination=C\:/Users/andy/basex.home/webapp
defaultVariables=
eclipse.preferences.version=1
includeTeamPrivateFiles=false

View file

@ -165,6 +165,7 @@
model: false,
children: [
{href: '/server/jobs',text: 'Running jobs',icon: 'dashboard'},
{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'},

View file

@ -42,6 +42,8 @@ function vue-api:xqdoc( )
(:~
: Returns folder info.
: @param $url location
: @param $protocol 'file' or 'xmldb'
:)
declare
%rest:GET %rest:path("/vue-poc/api/collection")

View file

@ -2,7 +2,7 @@ xquery version "3.1";
(:~ data locations for image feature :)
module namespace cfg = "quodatum:media.image.configure";
declare variable $cfg:DB-IMAGE:="media-images-20180817";
declare variable $cfg:DB-IMAGE:="media-images";
declare variable $cfg:IMAGEDIR:="P:/pictures/Pictures/";
declare variable $cfg:THUMBDIR:="C:/tmp/";

View file

@ -16,6 +16,7 @@
<span class="white--text">Image: {{ id }}</span>
<a :href="path" :download="id +'.jpg'"><v-icon>file_download</v-icon></a>
</v-toolbar>
<v-card-text>
<v-layout>
<v-flex xs5>
@ -24,7 +25,8 @@
</v-flex>
<v-flex xs7 >
<iframe :src="path" style="border:0;width:100%;height:100%;min-height:400px;">image</iframe>
<v-img v-if="loaded" src="/vue-poc/api/images/list/17236456/image" min-height="400px" height="100%" width="100%"/>
</v-flex>
</v-layout>
</v-card-text>
@ -40,18 +42,22 @@
}),
computed: {
path(){
return this.loaded?'/vue-poc/api/images/list/'+ this.id+ '/image':null
var a=this.loaded?'/vue-poc/api/images/list/'+ this.id+ '/image':null
console.log("path",a)
return a
},
meta(){
return this.loaded?'/vue-poc/api/images/list/'+ this.id+ '/meta':null
}
},
created:function(){
var id=this._props.id
var id=this.id
HTTP.get("images/list/"+id)
.then(r=>{
this.image=r.data
this.loaded=true
})
}
}

View file

@ -38,12 +38,14 @@
</v-toolbar-items>
</span>
<v-spacer></v-spacer>
<v-toolbar-items>
<v-btn @click.stop="pageBack()" :disabled="query.page==0" icon >
<v-avatar>
<v-icon>arrow_back</v-icon>
</v-avatar>
</v-btn>
<v-btn @click.stop="pageNext()" icon >
<v-avatar>
<v-icon>arrow_forward</v-icon>
@ -55,22 +57,33 @@
<v-progress-linear v-if="busy" v-bind:indeterminate="true" ></v-progress-linear>
<v-container v-if="!busy" fluid grid-list-md>
<v-layout row wrap v-touch="{ left: () => pageNext(), right: () => pageBack()}">
<v-flex height="80px"
xs2
<v-flex xs12 sm6 md4 lg3 xl2
v-for="image in images"
:key="image.name"
>
<v-card tile :elevation="2" :hover="true" color="grey lighten-3" >
<div :style="style(image)" v-bind:class="{ selcard: image.selected}"
@dblclick="go(image)" @click.prevent.stop="image.selected =! image.selected ">
<v-toolbar height="16px" >
<v-toolbar-title :title="image.path">{{image.name}}</v-toolbar-title>
<span v-if="image.keywords >0 ">#{{image.keywords}}</span>
<v-avatar icon small v-if="image.geo">
<v-icon>place</v-icon>
</v-avatar>
<v-spacer></v-spacer>
<a :href="src(image)" target="thumb" :title="image.id">
<v-avatar icon small >
<v-icon>search</v-icon>
</v-avatar>
</a>
</v-toolbar>
<div :style="style(image)" v-bind:class="{ selcard: image.selected}"
@dblclick="go(image)" @click.prevent.stop="image.selected =! image.selected ">
</div>
<a :href="src(image)" target="thumb">{{image.id}}</a>
<div v-if="image.selected" style="position:absolute;right:0;top:0" >
<v-icon class="white primary--text">check_circle</v-icon>
</div>

View file

@ -3,32 +3,19 @@
image report
-->
<template id="report">
<v-container fluid>
<v-card >
<v-toolbar class="orange darken-1">
<v-btn icon to="./"><v-icon>arrow_back</v-icon></v-btn>
<v-card-title >
<v-chip >Settings</v-chip>
</v-card-title>
<v-spacer></v-spacer>
</v-toolbar>
<v-progress-linear v-if="busy" v-bind:indeterminate="true" ></v-progress-linear>
<v-card-text >
<ul>
<template id="report"> <v-container fluid> <v-card>
<v-toolbar class="orange darken-1"> <v-btn icon to="./">
<v-icon>arrow_back</v-icon></v-btn> <v-card-title> <v-chip>Settings</v-chip>
</v-card-title> <v-spacer></v-spacer> </v-toolbar> <v-progress-linear v-if="busy"
v-bind:indeterminate="true"></v-progress-linear> <v-card-text>
<ul v-if="report">
<li>DB: {{ report.imagedb }}</li>
<li><a :href="'/vue-poc/ui/database?url=/' + report.imagedb + '/'" target="new">db</a></li>
<li></li>
<li></li>
<li></li>
</ul>
<pre>
</ul>
<pre>
{{ report | pretty }}
</pre>
</v-card-text>
</v-card>
</v-container>
</template>
</pre> </v-card-text> </v-card> </v-container> </template>
<script>{
data: ()=>({

View file

@ -4,19 +4,17 @@
-->
<template id="keywords">
<v-container fluid>
<v-card >
<v-toolbar class="orange darken-1">
<v-toolbar dense class="orange darken-1">
<v-btn icon to="./"><v-icon>arrow_back</v-icon></v-btn>
<v-card-title >
<v-chip >click to show</v-chip>
<v-card-title>
<v-chip>click to show</v-chip>
</v-card-title>
<v-spacer></v-spacer>
<v-text-field prepend-icon="search" label="Filter..." v-model="q" type="search"
hide-details single-line @keyup.enter="setfilter"
:append-icon="this.q?'clear':''" @click:append="e=>this.q=''"></v-text-field>
</v-toolbar>
<v-text-field prepend-icon="search"
label="Filter..." v-model="q" type="search" hide-details
single-line @keyup.enter="setfilter" :append-icon="this.q?'clear':''"
@click:append="e=>this.q=''"></v-text-field> </v-toolbar>
<v-card-text>
<v-progress-linear v-if="busy" v-bind:indeterminate="true" ></v-progress-linear>
<v-container v-if="!busy" fluid grid-list-md>
@ -38,7 +36,6 @@
</v-container>
</v-card-text>
</v-card>
</v-container>
</template>
<script>{

View file

@ -16,4 +16,9 @@ declare %updating function local:put($data,$path)
let $opt:=map{"include-info":true()}
let $files:=fw:directory-list($cfg:IMAGEDIR,$opt)
return $files=>local:put('/pics.xml')
let $meta:=<meta created="{ current-dateTime() }">
<imagedir>{ $cfg:IMAGEDIR }></imagedir>
</meta>
return ($files=>local:put('/pics.xml'),
$meta=>local:put('pics-meta.xml')
)

View file

@ -0,0 +1,51 @@
(:~
: enrich file list for images
:)
import module namespace cfg = "quodatum:media.image.configure" at "../config.xqm";
declare namespace c="http://www.w3.org/ns/xproc-step";
declare %updating function local:put($data,$path)
{
if(db:exists($cfg:DB-IMAGE)) then
db:replace($cfg:DB-IMAGE,$path,$data)
else
db:create($cfg:DB-IMAGE,$data,$path)
};
declare function local:type($path as xs:string)
as xs:string
{
try{
fetch:content-type($path)
}catch * {
"**ERR"
}
};
declare %updating function local:meta($doc)
{
insert node (attribute { 'dc-updated' } { current-dateTime() }) into $doc/*
};
declare %updating function local:original($doc)
{
for $f in $doc//c:file[ends-with(../@xml:base,"originals/")]
return insert node (attribute { 'original' } {true() }) into $f
};
declare %updating function local:content-type($doc)
{
for $f in $doc//c:file
let $loc:= $f/../@xml:base || $f/@name
let $mime:="?" (: local:type($loc) :)
return insert node attribute { 'content-type' } { $mime } into $f
};
let $doc:=db:open($cfg:DB-IMAGE,"/pics.xml")
let $doc:= $doc transform with {
local:meta(/)
,local:original(/)
,local:content-type(/)
}
return $doc

View file

@ -7,9 +7,10 @@ import module namespace cfg = "quodatum:media.image.configure" at "../config.xqm
import module namespace imgmeta = "expkg-zone58:image.metadata" ;
declare namespace c="http://www.w3.org/ns/xproc-step";
declare variable $CHUNK as xs:integer external := 100;
declare variable $dir-uri:=``[`{ $cfg:DB-IMAGE }`/pics.xml]``;
declare variable $doc:=doc( $dir-uri);
declare variable $CHUNK:=15000;
declare variable $meta:="/meta/";
let $done:=uri-collection($cfg:DB-IMAGE ||$meta)
let $files:= $doc//c:file[ends-with(lower-case(@name),".jpg")]
@ -22,4 +23,7 @@ return (for $f in subsequence($todo,1, $CHUNK)
let $dbpath:=$meta || $f || "/meta.xml"
let $meta:=imgmeta:read(trace($spath))
return db:replace($cfg:DB-IMAGE,$dbpath,$meta),
update:output($todo=>count()))
let $msg:=out:format("%d / %d (%f)",count($todo),count($relpath),1 - count($todo) div count($relpath))
return update:output($msg)
)

View file

@ -6,21 +6,53 @@ import module namespace t="expkg-zone58:image.thumbnailator";
import module namespace cfg = "quodatum:media.image.configure" at "../config.xqm";
declare namespace c="http://www.w3.org/ns/xproc-step";
declare variable $CHUNK:=1000;
declare variable $CHUNK as xs:integer external := 5;
declare variable $DEST:="/pics.xml";
declare variable $SIZE:=xs:integer(100);
(:~
: true if thumbnail not found
:)
declare function local:missing($f as xs:string)
as xs:boolean
{
let $_:=$f
return not(file:exists($cfg:THUMBDIR || $f))
and file:exists($cfg:IMAGEDIR || "../" || $f)
};
(:~
: find 1st chunk valid items
:)
declare function local:chunk($items as item()*,
$fn as function(*),
$chunksize as xs:integer)
{
fold-left($items,(),
function($result,$curr){
if(count($result) ge $chunksize) then
($result,$curr)
else if($fn($curr)) then
($result,$curr)
else
$result
}
)
};
declare %updating function local:store-thumb($f as xs:string)
{
let $src:=$cfg:IMAGEDIR || "../" || trace($f)
let $src:=$cfg:IMAGEDIR || "../" || trace($f,"gen thumb: ")
let $trg:= $cfg:THUMBDIR || $f
return try{
fetch:binary($src)=>t:size($SIZE)=>local:write-binary($trg)
} catch * {
update:output("bad: " || $f)
prof:dump("bad: " || $f),
local:write-binary(convert:string-to-hex('bad'),$trg)
}
};
(:~ create folder if missing) :)
declare %updating function local:write-binary($data,$url as xs:string)
{
@ -36,13 +68,9 @@ declare %updating function local:write-binary($data,$url as xs:string)
let $files:= doc($cfg:DB-IMAGE || $DEST)//c:file[ends-with(lower-case(@name),".jpg")]
let $relpath:= $files!( ancestor-or-self::*/@name=>string-join("/"))
let $relpath:=filter($relpath,function($f){
not(file:exists($cfg:THUMBDIR || $f))
and file:exists($cfg:IMAGEDIR || "../" || $f)
})
let $todo:= $relpath=>subsequence(1, $CHUNK)
let $todo:= local:chunk($relpath,local:missing#1,$CHUNK)
let $msg:=out:format("%d / %d (%f)",count($todo),count($relpath),1 - count($todo) div count($relpath))
return (
$todo!local:store-thumb(.),
update:output($relpath=>count())
subsequence($todo,1,$CHUNK)!local:store-thumb(.),
update:output($msg)
)

View file

@ -0,0 +1,60 @@
(:~
: generate thumbs
: @return initial number of missing docs
:)
import module namespace t="expkg-zone58:image.thumbnailator";
import module namespace cfg = "quodatum:media.image.configure" at "../config.xqm";
declare namespace c="http://www.w3.org/ns/xproc-step";
declare variable $CHUNK:= 2;
declare variable $DEST:="/pics.xml";
declare variable $SIZE:=xs:integer(100);
(:~
: true if thumbnail not found
:)
declare function local:missing($f as xs:string)
as xs:boolean
{
let $_:=$f
return not(file:exists($cfg:THUMBDIR || $f))
and file:exists($cfg:IMAGEDIR || "../" || $f)
};
(:~
: find 1st chunk valid items
:)
declare function local:chunk($items as item()*,
$fn as function(*),
$chunksize as xs:integer)
{
fold-left($items,(),
function($result,$curr){
if(count($result) ge $chunksize) then
($result,$curr)
else if(local:missing($curr)) then
($result,$curr)
else
$result
}
)
};
let $files:= doc($cfg:DB-IMAGE || $DEST)//c:file[ends-with(lower-case(@name),".jpg")]
let $relpath:= $files!( ancestor-or-self::*/@name=>string-join("/"))
(: let $relpath:=filter($relpath,local:missing#1) :)
(: let $relpath:=fold-left($relpath,(),
function($result,$curr){
if(count($result) ge $CHUNK) then
$result
else if(local:missing($curr)) then
($result,$curr)
else
$result
}
) :)
return local:chunk($relpath,local:missing#1,$CHUNK)

View file

@ -1,4 +1,6 @@
<!DOCTYPE html>
<!--
-->
<template id="job">
<v-card >
<v-toolbar >
@ -12,14 +14,17 @@
<v-chip label class="grey white--text"><v-icon class="red">lock</v-icon>{{ jobstate.writes }}</v-chip>
<v-chip label class="grey white--text"><v-icon class="amber">lock</v-icon>{{ jobstate.reads }}</v-chip>
<v-spacer></v-spacer>
<v-chip class="primary white--text">
<v-avatar>
<v-icon>account_circle</v-icon>
</v-avatar>
{{ jobstate.user }}</v-chip>
<v-chip class="green white--text">
<v-avatar ><v-icon>timer</v-icon></v-avatar>
{{ jobstate.duration }}</v-chip>
<v-btn icon :loading="loading" @click="getJob()" :disabled="loading || finished">
<v-icon>refresh</v-icon>
</v-btn>

View file

@ -1,3 +1,17 @@
<jobs>
<job base-uri="file:///C:/Users/andy/git/vue-poc/src/vue-poc/tasks/file2" id="cleanup" interval="PT1M">admin:write-log("cleanup","QDS")</job>
<job base-uri="file:///C:/Users/andy/basex.home/webapp/" id="thumbs" interval="PT5M">
let $showtime:=function($a, $start){
out:format(" (time %d ms)",prof:current-ms()-$start)
}(?,prof:current-ms())
let $xq:= 'file:///C:/Users/andy/basex.home/webapp/vue-poc/features/images/tasks/pics-04-store-thumbs.xq'
return try {
admin:write-log("start","THUMB"),
xquery:eval-update(xs:anyURI($xq),map{"CHUNK": 20}),
admin:write-log("state20: " || update:cache() || $showtime(""),"THUMB")
}catch * {
admin:write-log("err: " || $err:description,"THUMB")
}
</job>
</jobs>

View file

@ -19,6 +19,8 @@ as element(json)
}</json>
};
(:~
: job info
:)
@ -42,7 +44,7 @@ as element(*)*
,<state>{$j/@state/string()}</state>
,<user>{$j/@user/string()}</user>
,<registered>{$j/@time/string()}</registered>
,<start>{$j/@start/string()}</start>
,if($j/@start) then <start>{$j/@start/string()}</start> else ()
,<duration>{$j/@duration/string()}</duration>
,<text>{$j/string()}</text>
,<reads>{$j/@reads/string()}</reads>

View file

@ -0,0 +1,114 @@
<!DOCTYPE html>
<template id="services">
<v-card >
<v-toolbar >
<v-text-field
prepend-icon="filter_list"
label="Filter jobs"
single-line
hide-details
clearable
v-model="search"
></v-text-field>
<v-spacer></v-spacer>
<v-btn
@click="stop()"
:disabled="noSelection"
>Stop</v-btn>
<v-btn icon ><v-icon>add</v-icon></v-btn>
<v-spacer></v-spacer>
<v-btn
icon
:loading="loading"
@click="getJobs()"
@dblclick="autorefresh = !autorefresh"
:disabled="loading"
>
<v-icon>{{ autorefresh?'refresh':'arrow_downward' }}</v-icon>
</v-btn>
</v-toolbar>
<v-data-table
:headers="headers"
:items="items"
:search="search"
v-model="selected"
select-all
class="elevation-1"
no-data-text="No Jobs currently running"
>
<template slot="items" slot-scope="props">
<td class="vtop">
<v-checkbox
primary
hide-details
v-model="props.selected"
></v-checkbox>
</td>
<td class="vtop"> <router-link :to="{name: 'jobShow', params: {job: props.item.id }}">{{props.item.id}}</router-link></td>
<td class="vtop "><div>{{ props.item.running }}</div>
<td class="vtop " :title="props.item.interval">{{ props.item.interval }}</td>
<td class="vtop " :title="props.item.base-uri">{{ props.item['base-uri'] }}</td>
<td class="vtop ">{{ props.item.query }}</td>
</template>
</v-data-table>
</v-card>
</template>
<script>{
data: function(){
return {
headers: [
{
text: 'Job id',
left: true,
value: 'id'
},
{ text: 'Running', value: 'running' },
{ text: 'Interval', value: 'interval' },
{ text: 'Base-uri', value: 'base-uri' },
{ text: 'Query', value: 'query' },
],
items:[
],
selected: [],
search: "",
loading: false,
autorefresh: true,
timer:null
}
},
methods:{
load(){
this.loading= true
HTTP.get("data/service",{params:{q:this.q}})
.then(r=>{
this.items= r.data.items
this.loading= false
if(this.autorefresh) this.timer=setTimeout(()=>{ this.load() }, 10000);
})
},
stop(){
var s=this.selected.map((j)=>{return j.id}).join(",")
console.log("AAA",this.selected)
alert(s)
}
},
computed: {
// a computed getter
noSelection: function () {
// `this` points to the vm instance
return this.selected.length==0
},
},
created(){
this.load()
},
beforeDestroy(){
if(this.timer) clearTimeout(this.timer);
}
}
</script>

View file

@ -23,8 +23,11 @@
:key="item.id"
>
<v-card :hover="true" >
<v-card-title color="#26c6da">{{ item.id }}</v-card-title>
<v-card-text>{{ item.name }}</v-card-text>
<v-toolbar color="blue lighten-3" dense>
<v-card-title >{{ item.name }}</v-card-title>
</v-toolbar>
<v-card-text>{{ item.id }}</v-card-text>
<v-card-text>{{ item.created | formatDate }}</v-card-text>
<v-card-actions>
<a :href="item.href" target="_new">go</a>
</v-card-actions>
@ -46,9 +49,11 @@
},
methods:{
get() {
this.loading=true;
HTTP.get('xqdocjob')
.then((res) => {
this.items = res.data;
this.loading=false;
});
},
doEdit(item){

View file

@ -45,7 +45,7 @@
md4
lg3
>
<v-card :hover="true" active-class="default-class qd-active" max-height="200px">
<v-card :hover="true" active-class="default-class qd-active" height="200px" max-height="200px">
<v-toolbar color="blue lighten-3" dense>
<v-toolbar-title>
@ -56,13 +56,14 @@
</v-toolbar-title>
</v-card-title>
</v-toolbar>
<v-card-text>{{ props.item.description }}</<v-card-text>
<v-card-text>
<v-card-text >{{ props.item.description }}</<v-card-text>
<v-card-actions green>
Fields
<v-badge >
<span slot="badge">{{ props.item.nfields }}</span>
Fields
</v-badge>
</v-card-text>
</v-card-actions>
</v-card>
</v-flex>
</v-data-iterator>

View file

@ -14,13 +14,17 @@ declare
function j:list()
as element(json)
{
let $jlist:=file:list(db:option("webpath") || "/static/xqdoc/")
let $xqdoc-folder:=db:option("webpath") || "/static/xqdoc/"
return <json type="array">
{for $j in reverse($jlist)
{for $di in file:list($xqdoc-folder)
let $meta:= $xqdoc-folder || $di || "xqdoca.xml"
where fn:doc-available($meta)
let $doc:=doc($meta)/xqdoca
return <_ type="object">
<id>{ $j }</id>
<name>todo</name>
<href>/static/xqdoc/{ $j }index.html</href>
<id>{ $di}</id>
<created>{ $doc/@created/string() }</created>
<name>{ $doc/project/string() }</name>
<href>/static/xqdoc/{ $di }index.html</href>
</_>
}</json>
};

View file

@ -12,7 +12,7 @@
<p>Read json data for 1st page for entity.</p>
<v-flex xs12 sm6>
<v-combobox
v-model="url"
v-model="entity"
:items="entities" item-text="name"
label="Select target" clearable open-on-clear
></v-combobox>
@ -38,10 +38,10 @@
<tr>
<td>
{{ url && url.name }}
{{ entity && entity.name }}
</td>
<td>
<v-btn @click="get()" :disabled="!url" >
<v-btn @click="get()" :disabled="!entity" >
Read <v-icon right>compare_arrows</v-icon>
</v-btn>
</td>
@ -87,7 +87,7 @@
return {
getValues: new perfStat(),
repeat: {get:false},
url: null,
entity: null,
counter: 0,
result: null,
entities: null
@ -97,8 +97,8 @@
get(){
var _start = performance.now();
console.log("FFFFF"," "+ this.url.parentlink)
HTTP.get(this.url.parentlink,axios_json)
console.log("entity:", this.entity)
HTTP.get(this.entity.datalink,axios_json)
.then(r=>{
var elapsed=Math.floor(performance.now() - _start);
this.counter++;

View file

@ -15,8 +15,10 @@ import module namespace store = 'quodatum.store' at "../../../lib/store.xqm";
declare variable $efolder as xs:anyURI external := xs:anyURI("C:/Users/andy/git/vue-poc/src/vue-poc");
declare variable $id as element(last-id):=db:open("vue-poc","/state.xml")/state/last-id;
let $path:="static/xqdoc/" || "33" || "/"
let $root:=db:option("webpath")=>file:path-to-uri()
let $target:=resolve-uri($path,$root)
let $target:="file:///" || db:option("webpath") || "/static/xqdoc/" || $id || "/"
let $state:=xqd:read($efolder)=>trace("READ: ")
let $opts:=map{

View file

@ -1,4 +1,5 @@
xquery version "3.1";
module namespace mt = 'quodatum.data.mimetype';
declare namespace MediaType='java:org.basex.util.http.MediaType';
declare %basex:lazy variable $mt:lines:="media-types.properties"=>fn:unparsed-text-lines();

View file

@ -1,5 +1,5 @@
(: entity access maps
: auto generated from xml files in entities folder at: 2019-02-23T22:59:34.827Z
: auto generated from xml files in entities folder at: 2019-07-04T23:21:15.539+01:00
:)
module namespace entity = 'quodatum.models.generated';
@ -188,6 +188,7 @@ hof:top-k-by(admin:logs(), string#1, 2)
",
"access": map{
"code": function($_ as element()) as xs:string? {$_/ent:data },
"datalink": function($_ as element()) as xs:string {$_/fn:concat("/data/",@name,"") },
"description": function($_ as element()) as xs:string {$_/ent:description },
"fieldslink": function($_ as element()) as xs:string {$_/fn:concat("/data/entity/",@name,"/field") },
"iconclass": function($_ as element()) as xs:string {$_/ent:views/@iconclass },
@ -210,6 +211,10 @@ hof:top-k-by(admin:logs(), string#1, 2)
(: xs:string? :)
fn:data($_/ent:data)!element code { .}
},
"datalink": function($_ as element()) as element(datalink)? {
(: xs:string :)
fn:data($_/fn:concat("/data/",@name,""))!element datalink { .}
},
"description": function($_ as element()) as element(description)? {
(: xs:string :)
fn:data($_/ent:description)!element description { .}
@ -503,13 +508,13 @@ hof:top-k-by(admin:logs(), string#1, 2)
},
"service": map{
"name": "service",
"description": "basex services ",
"description": "basex services a list of all jobs that have been persistently registered as Services.",
"access": map{
"base-uri": function($_ as element()) as xs:string {$_/@base-uri },
"id": function($_ as element()) as xs:string {$_/@id },
"interval": function($_ as element()) as xs:string {$_/@interval },
"query": function($_ as element()) as xs:string {$_/. },
"running": function($_ as element()) as xs:boolean {$_/jobs:list()=@id } },
"running": function($_ as element()) as xs:boolean {$_/(@id = jobs:list-details()/@id) } },
"filter": function($item,$q) as xs:boolean{
some $e in ( ) satisfies
@ -534,7 +539,7 @@ hof:top-k-by(admin:logs(), string#1, 2)
},
"running": function($_ as element()) as element(running)? {
(: xs:boolean :)
fn:data($_/jobs:list()=@id)!element running { attribute type {'boolean'}, .}
fn:data($_/(@id = jobs:list-details()/@id))!element running { attribute type {'boolean'}, .}
} },
"data": function() as element(job)*

View file

@ -1,6 +1,6 @@
<entity name="basexjob" xmlns="https://github.com/Quodatum/app-doc/entity">
<description>A BaseX job</description>
<namespace prefix="xqdoc" uri="http://www.xqdoc.org/1.0" />
<namespace prefix="xqdoc" uri="http://www.xqdoc.org/1.0"/>
<fields>
<field name="id" type="xs:string">
<description>unique id</description>

View file

@ -40,6 +40,10 @@
<description>Links for fields description</description>
<xpath>fn:concat("/data/entity/",@name,"/field")</xpath>
</field>
<field name="datalink" type="xs:string">
<description>Link to read data</description>
<xpath>fn:concat("/data/",@name,"")</xpath>
</field>
<field name="parent" type="xs:string?">
<description>parent entity, if any</description>
<xpath>ent:parent/@name</xpath>

View file

@ -19,7 +19,7 @@
</field>
<field name="running" type="xs:boolean">
<description>service is running</description>
<xpath>jobs:list()=@id</xpath>
<xpath>(@id = jobs:list-details()/@id)</xpath>
</field>
</fields>
<views iconclass="shop" />

View file

@ -0,0 +1,295 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Copyright (c)2010 Elsevier, Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* The use of the Apache License does not indicate that this project is
* affiliated with the Apache Software Foundation.
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.xqdoc.org/1.0" xmlns="http://www.xqdoc.org/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified">
<!-- Simple type for defining the uris associated
with things such as library modules associated
with functions, variables, imports, etc. -->
<xsd:simpleType name="uri">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<!-- Simple type for defining the type associated
with things such as global variables, function
parameters, and function return types etc. -->
<xsd:complexType name="type">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="occurrence" type="occurrence" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- Complex type for function parameters -->
<xsd:complexType name="parameters">
<xsd:sequence>
<xsd:element name="parameter" type="parameter" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type for an individual function parameter -->
<xsd:complexType name="parameter">
<xsd:sequence>
<xsd:element name="name" type="name" minOccurs="0"/>
<xsd:element name="type" type="type" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type for the return value from a function -->
<xsd:complexType name="return">
<xsd:sequence>
<xsd:element name="type" type="type" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<!-- Simple type used for definging the number of occurrences for a global variable, function parameter
or function return type -->
<xsd:simpleType name="occurrence">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="?"/>
<xsd:enumeration value="*"/>
<xsd:enumeration value="+"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Simple type for defining the names associated
with things such as functions, paramters, module name, etc. -->
<xsd:simpleType name="name">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<!-- Complex type used for defining the functions
invoked from within a particular function. -->
<xsd:complexType name="invoked">
<xsd:sequence>
<xsd:element name="uri" type="uri"/>
<xsd:element name="name" type="name"/>
</xsd:sequence>
<xsd:attribute name="arity" type="xsd:integer" use="optional"/>
</xsd:complexType>
<!-- Complex type used for defining a custom comment type.
The type attribute allows the differentiation of the custom
comment types. If the custom comment is @example, then the
value in the 'tag' attribute would be 'example'. -->
<xsd:complexType name="custom">
<xsd:complexContent>
<xsd:extension base="mixed-text">
<xsd:attribute name="tag" type="xsd:string" use="required"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<!-- Complex type used for defining the comments associated
with a library module, imports, variables, or functions.
The follow xqdoc 'directives' map to the equivalent
elements defined below ... with the exception of description
where there is no directive.
@author ...... author
@version ..... version
@param ....... param
@return ...... return
@error ....... error
@deprecated .. deprecated
@since ....... since
@see ......... see -->
<xsd:complexType name="comment">
<xsd:sequence>
<xsd:element name="description" type="mixed-text" minOccurs="0"/>
<xsd:element name="author" type="mixed-text" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="version" type="mixed-text" minOccurs="0"/>
<xsd:element name="param" type="mixed-text" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="return" type="mixed-text" minOccurs="0"/>
<xsd:element name="error" type="mixed-text" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="deprecated" type="mixed-text" minOccurs="0"/>
<xsd:element name="see" type="mixed-text" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="since" type="mixed-text" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="custom" type="custom" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type used for comment text to allow the inclusion
of embedded HTML markup within comments. -->
<xsd:complexType name="mixed-text" mixed="true">
<xsd:sequence>
<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type used for defining information about the package
version (and date) used to generate the internal xqdoc XML.
Date should be the date when the XML xqdoc file is genearted.
Version should either be the version of the XQDoc conversion package
used to generate the XML or 'n/a' if the XML is generated from
some other mechanism (i.e. scripts from XHTML for MarkLogic). -->
<xsd:complexType name="control">
<xsd:sequence>
<xsd:element name="date" type="xsd:string"/>
<xsd:element name="version">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1.0"/>
<xsd:enumeration value="N/A"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type used for defining the module URI and any
high-level comments associated with the module. -->
<xsd:complexType name="module">
<xsd:sequence>
<xsd:element name="uri" type="uri"/>
<xsd:element name="name" type="name" minOccurs="0"/>
<xsd:element name="comment" type="comment" minOccurs="0"/>
<xsd:element name="body" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="type" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="main"/>
<xsd:enumeration value="library"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
<!-- Complex type used for defining the namespaces defined within
the library module. -->
<xsd:complexType name="namespaces">
<xsd:sequence>
<xsd:element name="namespace" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:attribute name="prefix" use="required"/>
<xsd:attribute name="uri" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type used for defining the variable names defined within
the library module and any comments associated with the variables. -->
<xsd:complexType name="variables">
<xsd:sequence>
<xsd:element name="variable" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="uri" type="uri" minOccurs="0"/>
<xsd:element name="name" type="name"/>
<xsd:element name="comment" type="comment" minOccurs="0"/>
<xsd:element name="annotations" type="annotations" minOccurs="0"/>
<xsd:element name="type" type="type" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type used for defining the annotations defined for
a variable or function. -->
<xsd:complexType name="annotations">
<xsd:sequence>
<xsd:element name="annotation" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="literal" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="mixed-text">
<xsd:attribute name="type" type="xsd:string" use="required"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="name" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type used for defining the imported modules within the
the library module and any comments associated with the imports. -->
<xsd:complexType name="imports">
<xsd:sequence>
<xsd:element name="import" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="uri" type="uri"/>
<xsd:element name="comment" type="comment" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="type" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="library"/>
<xsd:enumeration value="schema"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type used for defining the functions contained within the
the library module and any comments associated with the functions.
Any 'invoked' functions associated with this function should also
be defined. -->
<xsd:complexType name="functions">
<xsd:sequence>
<xsd:element name="function" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="comment" type="comment" minOccurs="0"/>
<xsd:element name="name" type="name"/>
<xsd:element name="annotations" type="annotations" minOccurs="0"/>
<xsd:element name="signature" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="parameters" type="parameters" minOccurs="0" maxOccurs="1"/>
<xsd:element name="return" type="parameter" minOccurs="0" maxOccurs="1"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="invoked" type="invoked" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="ref-variable" type="invoked" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
<xsd:element name="body" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="arity" type="xsd:integer" use="optional"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Complex type used for defining the global root element of xqdoc.
There should be '1' xqdoc xml file for each library module. -->
<xsd:element name="xqdoc">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="control" type="control"/>
<xsd:element name="module" type="module"/>
<xsd:element name="imports" type="imports" minOccurs="0"/>
<xsd:element name="namespaces" type="namespaces" minOccurs="0"/>
<xsd:element name="variables" type="variables" minOccurs="0"/>
<xsd:element name="functions" type="functions" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>

View file

@ -1,13 +1,13 @@
{
"name": "vue-poc",
"version": "0.1.99",
"version": "0.2.0",
"description": "A vue test",
"dependencies": {
"ace": "1.4.3",
"vuetify": "1.5.6",
"vue": "2.6.7",
"ace": "1.4.5",
"vuetify": "1.5.16",
"vue": "2.6.10",
"vuex": "3.0.1",
"vue-router": "3.0.2",
"vue-router": "3.0.3",
"vue-treeselect": "0.0.25",
"google-material": "0.0.0",
"js-beautify": "1.9.0",

View file

@ -82,6 +82,7 @@ const router = new VueRouter({
{ path: 'jobs', name:"jobs", component: Jobs, meta:{title:"Jobs running"} },
{ path: 'jobs/:job', name:"jobShow", component: Job, props: true, meta:{title:"Job Status"} },
{ path: 'services', component: Services, meta:{title:"Services"} },
{ path: 'upload', component: Upload,meta:{title:"Upload"} },
{ path: 'settings', component: Basexsettings,meta:{title:"BaseX settings"} },

View file

@ -1,4 +1,4 @@
// generated 2019-04-13T21:49:49.993+01:00
// generated 2019-07-24T10:31:16.914+01:00
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/qd-autoheight.vue
Vue.component('qd-autoheight',{template:`
@ -3603,6 +3603,7 @@ const Image=Vue.extend({template:`
<span class="white--text">Image: {{ id }}</span>
<a :href="path" :download="id +'.jpg'"><v-icon>file_download</v-icon></a>
</v-toolbar>
<v-card-text>
<v-layout>
<v-flex xs5>
@ -3611,8 +3612,9 @@ const Image=Vue.extend({template:`
</v-flex>
<v-flex xs7>
<iframe :src="path" style="border:0;width:100%;height:100%;min-height:400px;">image</iframe>
</v-flex>
<v-img v-if="loaded" src="/vue-poc/api/images/list/17236456/image" min-height="400px" height="100%" width="100%">
</v-img></v-flex>
</v-layout>
</v-card-text>
</v-card>
@ -3626,18 +3628,22 @@ const Image=Vue.extend({template:`
}),
computed: {
path(){
return this.loaded?'/vue-poc/api/images/list/'+ this.id+ '/image':null
var a=this.loaded?'/vue-poc/api/images/list/'+ this.id+ '/image':null
console.log("path",a)
return a
},
meta(){
return this.loaded?'/vue-poc/api/images/list/'+ this.id+ '/meta':null
}
},
created:function(){
var id=this._props.id
var id=this.id
HTTP.get("images/list/"+id)
.then(r=>{
this.image=r.data
this.loaded=true
})
}
}
@ -3680,12 +3686,14 @@ const Images=Vue.extend({template:`
</v-toolbar-items>
</span>
<v-spacer></v-spacer>
<v-toolbar-items>
<v-btn @click.stop="pageBack()" :disabled="query.page==0" icon>
<v-avatar>
<v-icon>arrow_back</v-icon>
</v-avatar>
</v-btn>
<v-btn @click.stop="pageNext()" icon>
<v-avatar>
<v-icon>arrow_forward</v-icon>
@ -3697,16 +3705,28 @@ const Images=Vue.extend({template:`
<v-progress-linear v-if="busy" v-bind:indeterminate="true"></v-progress-linear>
<v-container v-if="!busy" fluid grid-list-md>
<v-layout row wrap v-touch="{ left: () => pageNext(), right: () => pageBack()}">
<v-flex height="80px" xs2 v-for="image in images" :key="image.name">
<v-flex xs12 sm6 md4 lg3 xl2 v-for="image in images" :key="image.name">
<v-card tile :elevation="2" :hover="true" color="grey lighten-3">
<div :style="style(image)" v-bind:class="{ selcard: image.selected}" @dblclick="go(image)" @click.prevent.stop="image.selected =! image.selected ">
<v-toolbar height="16px">
<v-toolbar-title :title="image.path">{{image.name}}</v-toolbar-title>
<span v-if="image.keywords >0 ">#{{image.keywords}}</span>
<v-avatar icon small v-if="image.geo">
<v-icon>place</v-icon>
</v-avatar>
<v-spacer></v-spacer>
<a :href="src(image)" target="thumb" :title="image.id">
<v-avatar icon small>
<v-icon>search</v-icon>
</v-avatar>
</a>
</v-toolbar>
<div :style="style(image)" v-bind:class="{ selcard: image.selected}" @dblclick="go(image)" @click.prevent.stop="image.selected =! image.selected ">
</div>
<a :href="src(image)" target="thumb">{{image.id}}</a>
<div v-if="image.selected" style="position:absolute;right:0;top:0">
<v-icon class="white primary--text">check_circle</v-icon>
</div>
@ -4084,31 +4104,17 @@ const Imagesfilter=Vue.extend({template:`
);
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/images/ireport.vue
const Report=Vue.extend({template:`
<v-container fluid>
<v-card>
<v-toolbar class="orange darken-1">
<v-btn icon to="./"><v-icon>arrow_back</v-icon></v-btn>
<v-card-title>
<v-chip>Settings</v-chip>
</v-card-title>
<v-spacer></v-spacer>
</v-toolbar>
<v-progress-linear v-if="busy" v-bind:indeterminate="true"></v-progress-linear>
<v-card-text>
<ul>
const Report=Vue.extend({template:` <v-container fluid> <v-card>
<v-toolbar class="orange darken-1"> <v-btn icon to="./">
<v-icon>arrow_back</v-icon></v-btn> <v-card-title> <v-chip>Settings</v-chip>
</v-card-title> <v-spacer></v-spacer> </v-toolbar> <v-progress-linear v-if="busy" v-bind:indeterminate="true"></v-progress-linear> <v-card-text>
<ul v-if="report">
<li>DB: {{ report.imagedb }}</li>
<li><a :href="'/vue-poc/ui/database?url=/' + report.imagedb + '/'" target="new">db</a></li>
<li></li>
<li></li>
<li></li>
</ul>
<pre> {{ report | pretty }}
</pre>
</v-card-text>
</v-card>
</v-container>
`,
</ul>
<pre> {{ report | pretty }}
</pre> </v-card-text> </v-card> </v-container> `,
data: ()=>({
busy: false,
@ -4138,17 +4144,14 @@ const Report=Vue.extend({template:`
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/images/keywords.vue
const Keywords=Vue.extend({template:`
<v-container fluid>
<v-card>
<v-toolbar class="orange darken-1">
<v-toolbar dense class="orange darken-1">
<v-btn icon to="./"><v-icon>arrow_back</v-icon></v-btn>
<v-card-title>
<v-chip>click to show</v-chip>
</v-card-title>
<v-spacer></v-spacer>
<v-text-field prepend-icon="search" label="Filter..." v-model="q" type="search" hide-details single-line @keyup.enter="setfilter" :append-icon="this.q?'clear':''" @click:append="e=>this.q=''"></v-text-field>
</v-toolbar>
<v-text-field prepend-icon="search" label="Filter..." v-model="q" type="search" hide-details single-line @keyup.enter="setfilter" :append-icon="this.q?'clear':''" @click:append="e=>this.q=''"></v-text-field> </v-toolbar>
<v-card-text>
<v-progress-linear v-if="busy" v-bind:indeterminate="true"></v-progress-linear>
<v-container v-if="!busy" fluid grid-list-md>
@ -4166,7 +4169,6 @@ const Keywords=Vue.extend({template:`
</v-container>
</v-card-text>
</v-card>
</v-container>
`,
data: ()=>({
@ -4243,14 +4245,17 @@ const Job=Vue.extend({template:`
<v-chip label class="grey white--text"><v-icon class="red">lock</v-icon>{{ jobstate.writes }}</v-chip>
<v-chip label class="grey white--text"><v-icon class="amber">lock</v-icon>{{ jobstate.reads }}</v-chip>
<v-spacer></v-spacer>
<v-chip class="primary white--text">
<v-avatar>
<v-icon>account_circle</v-icon>
</v-avatar>
{{ jobstate.user }}</v-chip>
<v-chip class="green white--text">
<v-avatar><v-icon>timer</v-icon></v-avatar>
{{ jobstate.duration }}</v-chip>
<v-btn icon :loading="loading" @click="getJob()" :disabled="loading || finished">
<v-icon>refresh</v-icon>
</v-btn>
@ -4405,6 +4410,93 @@ const Jobs=Vue.extend({template:`
);
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/job/services.vue
const Services=Vue.extend({template:`
<v-card>
<v-toolbar>
<v-text-field prepend-icon="filter_list" label="Filter jobs" single-line hide-details clearable v-model="search"></v-text-field>
<v-spacer></v-spacer>
<v-btn @click="stop()" :disabled="noSelection">Stop</v-btn>
<v-btn icon><v-icon>add</v-icon></v-btn>
<v-spacer></v-spacer>
<v-btn icon :loading="loading" @click="getJobs()" @dblclick="autorefresh = !autorefresh" :disabled="loading">
<v-icon>{{ autorefresh?'refresh':'arrow_downward' }}</v-icon>
</v-btn>
</v-toolbar>
<v-data-table :headers="headers" :items="items" :search="search" v-model="selected" select-all class="elevation-1" no-data-text="No Jobs currently running">
<template slot="items" slot-scope="props">
<td class="vtop">
<v-checkbox primary hide-details v-model="props.selected"></v-checkbox>
</td>
<td class="vtop"> <router-link :to="{name: 'jobShow', params: {job: props.item.id }}">{{props.item.id}}</router-link></td>
<td class="vtop "><div>{{ props.item.running }}</div>
</td><td class="vtop " :title="props.item.interval">{{ props.item.interval }}</td>
<td class="vtop " :title="props.item.base-uri">{{ props.item['base-uri'] }}</td>
<td class="vtop ">{{ props.item.query }}</td>
</template>
</v-data-table>
</v-card>
`,
data: function(){
return {
headers: [
{
text: 'Job id',
left: true,
value: 'id'
},
{ text: 'Running', value: 'running' },
{ text: 'Interval', value: 'interval' },
{ text: 'Base-uri', value: 'base-uri' },
{ text: 'Query', value: 'query' },
],
items:[
],
selected: [],
search: "",
loading: false,
autorefresh: true,
timer:null
}
},
methods:{
load(){
this.loading= true
HTTP.get("data/service",{params:{q:this.q}})
.then(r=>{
this.items= r.data.items
this.loading= false
if(this.autorefresh) this.timer=setTimeout(()=>{ this.load() }, 10000);
})
},
stop(){
var s=this.selected.map((j)=>{return j.id}).join(",")
console.log("AAA",this.selected)
alert(s)
}
},
computed: {
// a computed getter
noSelection: function () {
// `this` points to the vm instance
return this.selected.length==0
},
},
created(){
this.load()
},
beforeDestroy(){
if(this.timer) clearTimeout(this.timer);
}
}
);
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/login/login.vue
const Login=Vue.extend({template:`
<v-layout>
@ -4551,8 +4643,11 @@ const Documentation=Vue.extend({template:`
<v-layout row wrap>
<v-flex height="80px" xs2 v-for="item in items" :key="item.id">
<v-card :hover="true">
<v-card-title color="#26c6da">{{ item.id }}</v-card-title>
<v-card-text>{{ item.name }}</v-card-text>
<v-toolbar color="blue lighten-3" dense>
<v-card-title>{{ item.name }}</v-card-title>
</v-toolbar>
<v-card-text>{{ item.id }}</v-card-text>
<v-card-text>{{ item.created | formatDate }}</v-card-text>
<v-card-actions>
<a :href="item.href" target="_new">go</a>
</v-card-actions>
@ -4573,9 +4668,11 @@ const Documentation=Vue.extend({template:`
},
methods:{
get() {
this.loading=true;
HTTP.get('xqdocjob')
.then((res) => {
this.items = res.data;
this.loading=false;
});
},
doEdit(item){
@ -4615,7 +4712,7 @@ const Entity=Vue.extend({template:`
<v-data-iterator content-tag="v-layout" row wrap :loading="loading" :items="items" :search="q" :rows-per-page-items="rowsPerPageItems" :pagination.sync="pagination" select-all :value="selected">
<v-flex slot="item" slot-scope="props" xs12 sm6 md4 lg3>
<v-card :hover="true" active-class="default-class qd-active" max-height="200px">
<v-card :hover="true" active-class="default-class qd-active" height="200px" max-height="200px">
<v-toolbar color="blue lighten-3" dense>
<v-toolbar-title>
@ -4627,12 +4724,13 @@ const Entity=Vue.extend({template:`
</v-toolbar>
<v-card-text>{{ props.item.description }}<!--<v-card-text-->
<v-card-text>
<v-card-actions green>
Fields
<v-badge>
<span slot="badge">{{ props.item.nfields }}</span>
Fields
</v-badge>
</v-card-text>
</v-card-actions>
</v-card-text></v-card>
</v-flex>
</v-data-iterator>
@ -5546,7 +5644,7 @@ const Dicetest=Vue.extend({template:`
<v-card-text>
<p>Read json data for 1st page for entity.</p>
<v-flex xs12 sm6>
<v-combobox v-model="url" :items="entities" item-text="name" label="Select target" clearable open-on-clear></v-combobox>
<v-combobox v-model="entity" :items="entities" item-text="name" label="Select target" clearable open-on-clear></v-combobox>
</v-flex>
@ -5569,10 +5667,10 @@ const Dicetest=Vue.extend({template:`
<tr>
<td>
{{ url &amp;&amp; url.name }}
{{ entity &amp;&amp; entity.name }}
</td>
<td>
<v-btn @click="get()" :disabled="!url">
<v-btn @click="get()" :disabled="!entity">
Read <v-icon right>compare_arrows</v-icon>
</v-btn>
</td>
@ -5617,7 +5715,7 @@ const Dicetest=Vue.extend({template:`
return {
getValues: new perfStat(),
repeat: {get:false},
url: null,
entity: null,
counter: 0,
result: null,
entities: null
@ -5627,8 +5725,8 @@ const Dicetest=Vue.extend({template:`
get(){
var _start = performance.now();
console.log("FFFFF"," "+ this.url.parentlink)
HTTP.get(this.url.parentlink,axios_json)
console.log("entity:", this.entity)
HTTP.get(this.entity.datalink,axios_json)
.then(r=>{
var elapsed=Math.floor(performance.now() - _start);
this.counter++;
@ -7234,6 +7332,7 @@ const router = new VueRouter({
{ path: 'jobs', name:"jobs", component: Jobs, meta:{title:"Jobs running"} },
{ path: 'jobs/:job', name:"jobShow", component: Job, props: true, meta:{title:"Job Status"} },
{ path: 'services', component: Services, meta:{title:"Services"} },
{ path: 'upload', component: Upload,meta:{title:"Upload"} },
{ path: 'settings', component: Basexsettings,meta:{title:"BaseX settings"} },
@ -7468,6 +7567,7 @@ const Vuepoc=Vue.extend({template:`
model: false,
children: [
{href: '/server/jobs',text: 'Running jobs',icon: 'dashboard'},
{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'},

View file

@ -10,7 +10,7 @@
<link rel="shortcut icon" href="/vue-poc/ui/icon.png"/>
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic"/>
<link rel="stylesheet" href="//fonts.googleapis.com/icon?family=Material+Icons"/>
<link rel="stylesheet" href="//unpkg.com/vuetify@1.5.12/dist/vuetify.min.css" type="text/css"/>
<link rel="stylesheet" href="//unpkg.com/vuetify@1.5.16/dist/vuetify.min.css" type="text/css"/>
<link rel="stylesheet" href="//unpkg.com/@riophae/vue-treeselect@0.0.29/dist/vue-treeselect.min.css"/>
<link rel="stylesheet" href="/vue-poc/ui/prism/prism.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="//unpkg.com/leaflet@1.0.3/dist/leaflet.css"/>
@ -34,15 +34,15 @@
</div>
</div>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.6.7/vue.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue-router/3.0.2/vue-router.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue-router/3.0.3/vue-router.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.1/axios.js" crossorigin="anonymous"></script>
<script src="//unpkg.com/vuex@3.1.0/dist/vuex.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/qs/6.4.0/qs.js" crossorigin="anonymous" ></script>
<script src="//unpkg.com/vuetify@1.5.12/dist/vuetify.min.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.3/ace.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.3/ext-language_tools.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.3/ext-linking.js" crossorigin="anonymous" charset="utf-8"></script>
<script src="//unpkg.com/vuetify@1.5.16/dist/vuetify.min.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.5/ace.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.5/ext-language_tools.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.5/ext-linking.js" crossorigin="anonymous" charset="utf-8"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/4.13.0/d3.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.9.0/beautify.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.9.0/beautify-css.js" crossorigin="anonymous"></script>