vuetify 2.2.8
This commit is contained in:
parent
6c4dff216d
commit
6cb35796a8
24 changed files with 606 additions and 91 deletions
src/vue-poc
app.vue
components
core.jsdata/vue-poc/entities
features
lib
models.gen.xqmrouter.jsstatic
|
@ -229,6 +229,7 @@
|
||||||
{href: '/labs/tree',text: 'Tree',icon: 'nature'},
|
{href: '/labs/tree',text: 'Tree',icon: 'nature'},
|
||||||
{href: '/labs/tree2',text: 'Tree 2',icon: 'nature'},
|
{href: '/labs/tree2',text: 'Tree 2',icon: 'nature'},
|
||||||
{href: '/labs/websocket',text: 'Web socket',icon: 'swap_calls'},
|
{href: '/labs/websocket',text: 'Web socket',icon: 'swap_calls'},
|
||||||
|
{href: '/labs/markdown',text: 'Markdown',icon: 'receipt'},
|
||||||
]},
|
]},
|
||||||
{href: '/settings',text: 'Settings',icon: 'settings' },
|
{href: '/settings',text: 'Settings',icon: 'settings' },
|
||||||
{href: '/about',text: 'About (v0.3.2)' , icon: 'help' },
|
{href: '/about',text: 'About (v0.3.2)' , icon: 'help' },
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
<v-card >
|
<v-card >
|
||||||
<v-toolbar color="blue lighten-3" dense>
|
<v-toolbar color="blue lighten-3" dense>
|
||||||
<v-card-title >{{ description }}</v-card-title>
|
<v-card-title >{{ description }}</v-card-title>
|
||||||
|
<v-spacer></v-spacer>
|
||||||
|
<router-link :to="{name:'edit', query:{url: url}}">
|
||||||
|
<v-icon :title="url">history</v-icon>{{ name }}
|
||||||
|
</router-link>
|
||||||
</v-toolbar>
|
</v-toolbar>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<v-form ref="form" lazy-validation>
|
<v-form ref="form" lazy-validation>
|
||||||
|
@ -37,7 +41,7 @@
|
||||||
</v-layout>
|
</v-layout>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
</v-form>
|
</v-form>
|
||||||
<div :title="url">{{ url }} {{ updating }}</div>
|
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-card-actions>
|
<v-card-actions>
|
||||||
<v-btn @click="clear()" id="btn-clear"
|
<v-btn @click="clear()" id="btn-clear"
|
||||||
|
@ -95,6 +99,11 @@
|
||||||
return this.$refs.form.validate()
|
return this.$refs.form.validate()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
name(){
|
||||||
|
return this.url && this.url.substring(this.url.lastIndexOf('/') + 1)
|
||||||
|
}
|
||||||
|
},
|
||||||
watch:{
|
watch:{
|
||||||
params(vold,vnew) {
|
params(vold,vnew) {
|
||||||
console.log("params: ",vnew)
|
console.log("params: ",vnew)
|
||||||
|
|
|
@ -195,5 +195,5 @@ var sockhost=('https:'==window.location.protocol?'wss:':'ws:')+'//'+ window.loca
|
||||||
//Vue.use({ install: install });
|
//Vue.use({ install: install });
|
||||||
var EditTabs=new Vue(GEditTabs)
|
var EditTabs=new Vue(GEditTabs)
|
||||||
Vue.use(Vuetify);
|
Vue.use(Vuetify);
|
||||||
|
Vue.use(VueMarkdown);
|
||||||
new Vuepoc().$mount('#app')
|
new Vuepoc().$mount('#app')
|
||||||
|
|
|
@ -3,12 +3,16 @@
|
||||||
|
|
||||||
<fields>
|
<fields>
|
||||||
<field name="time" type="xs:string">
|
<field name="time" type="xs:string">
|
||||||
<description>time of event</description>
|
<description>time of event e.g "09:44:15.186"</description>
|
||||||
<xpath>@date</xpath>
|
<xpath>@time</xpath>
|
||||||
|
</field>
|
||||||
|
<field name="start" type="xs:string">
|
||||||
|
<description>datetime of event</description>
|
||||||
|
<xpath>@start</xpath>
|
||||||
</field>
|
</field>
|
||||||
<field name="end" type="xs:string?">
|
<field name="end" type="xs:string?">
|
||||||
<description>end time of event</description>
|
<description>end time of event</description>
|
||||||
<xpath>self::*[@ms]!(xs:dateTime(@date)+ xs:dayTimeDuration("PT" || (@ms div 1000) || "S"))</xpath>
|
<xpath>@end</xpath>
|
||||||
</field>
|
</field>
|
||||||
<field name="address" type="xs:string">
|
<field name="address" type="xs:string">
|
||||||
<description>IP address</description>
|
<description>IP address</description>
|
||||||
|
|
|
@ -75,5 +75,15 @@
|
||||||
return {
|
return {
|
||||||
fab: false
|
fab: false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
refresh(){
|
||||||
|
HTTP.get("package.json")
|
||||||
|
.then(r=>{
|
||||||
|
console.log("status",r)
|
||||||
|
|
||||||
|
//this.$forceUpdate()
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}</script>
|
}</script>
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
show list of available files
|
||||||
|
-->
|
||||||
<template id="basexlogdate">
|
<template id="basexlogdate">
|
||||||
<v-container fluid>
|
<v-container fluid>
|
||||||
<v-card>
|
<v-card>
|
||||||
|
|
|
@ -11,12 +11,7 @@
|
||||||
:crumbs="[{to: '/logdate', text:'log files'}, {text: date, disabled: false, menu: 'todo'}]"
|
:crumbs="[{to: '/logdate', text:'log files'}, {text: date, disabled: false, menu: 'todo'}]"
|
||||||
>crumbs</qd-breadcrumbs>
|
>crumbs</qd-breadcrumbs>
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-btn @click="pageBack()" icon>
|
|
||||||
<v-avatar><v-icon>skip_previous</v-icon> </v-avatar>
|
|
||||||
</v-btn>
|
|
||||||
<v-btn @click="pageNext()" icon>
|
|
||||||
<v-avatar> <v-icon>skip_next</v-icon> </v-avatar>
|
|
||||||
</v-btn>
|
|
||||||
<v-menu
|
<v-menu
|
||||||
ref="menu"
|
ref="menu"
|
||||||
v-model="showFrom"
|
v-model="showFrom"
|
||||||
|
@ -35,18 +30,26 @@
|
||||||
prepend-icon="access_time"
|
prepend-icon="access_time"
|
||||||
readonly
|
readonly
|
||||||
v-on="on"
|
v-on="on"
|
||||||
|
class="mt-3"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
</template>
|
</template>
|
||||||
<v-time-picker
|
<v-time-picker
|
||||||
v-if="showFrom"
|
v-if="showFrom"
|
||||||
v-model="query.from"
|
v-model="query.from"
|
||||||
full-width use-seconds
|
use-seconds
|
||||||
@click:second="$refs.menu.save(query.from)"
|
@click:second="$refs.menu.save(query.from)"
|
||||||
></v-time-picker>
|
></v-time-picker>
|
||||||
</v-menu>
|
</v-menu>
|
||||||
|
<v-toolbar-items>
|
||||||
<qd-range :query="query"></qd-range>
|
<v-btn @click="pageBack()" icon>
|
||||||
|
<v-avatar><v-icon>skip_previous</v-icon> </v-avatar>
|
||||||
|
</v-btn>
|
||||||
|
<v-btn @click="pageNext()" icon title="increment From by window">
|
||||||
|
<v-avatar> <v-icon>skip_next</v-icon> </v-avatar>
|
||||||
|
</v-btn>
|
||||||
|
</v-toolbar-items>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
|
<qd-range :query="query"></qd-range>
|
||||||
<v-toolbar-items>
|
<v-toolbar-items>
|
||||||
<v-btn @click="fit">fit</v-btn>
|
<v-btn @click="fit">fit</v-btn>
|
||||||
<v-btn @click="getItems">
|
<v-btn @click="getItems">
|
||||||
|
@ -136,12 +139,14 @@ methods:{
|
||||||
//console.log("logxml",items)
|
//console.log("logxml",items)
|
||||||
// {id: 4, content: 'item 4', start: '2014-04-16', end: '2014-04-19', type: 'point'}
|
// {id: 4, content: 'item 4', start: '2014-04-16', end: '2014-04-19', type: 'point'}
|
||||||
this.data=items.map(x=>Object.assign({}, x,
|
this.data=items.map(x=>Object.assign({}, x,
|
||||||
{ start: x.time,
|
{
|
||||||
content: x.text.split(";",1)[0],
|
content: x.text.split(";",1)[0],
|
||||||
title: x.text,
|
title: x.text,
|
||||||
style: x.text.startsWith("[POST] ")?"background-color: red;": "background-color: yellow;",
|
style: x.text.startsWith("[POST] ")?"background-color: red;": "background-color: yellow;",
|
||||||
group: x.user}
|
group: x.user}
|
||||||
))
|
))
|
||||||
|
this.loading=false
|
||||||
|
return;
|
||||||
//https://stackoverflow.com/a/39637877/3210344 round(date, moment.duration(15, "minutes"), "ceil")
|
//https://stackoverflow.com/a/39637877/3210344 round(date, moment.duration(15, "minutes"), "ceil")
|
||||||
var roundDate= function (date, duration, method) {
|
var roundDate= function (date, duration, method) {
|
||||||
return moment(Math[method]((+date) / (+duration)) * (+duration));
|
return moment(Math[method]((+date) / (+duration)) * (+duration));
|
||||||
|
@ -157,7 +162,7 @@ methods:{
|
||||||
this.options.start=start.toDate()
|
this.options.start=start.toDate()
|
||||||
this.options.end=start.add(this.query.window,"s").toDate()
|
this.options.end=start.add(this.query.window,"s").toDate()
|
||||||
//console.log("data",this.data)
|
//console.log("data",this.data)
|
||||||
this.loading=false
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -173,10 +178,13 @@ watch:{
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
console.log("logxml: ",this.$route.query)
|
|
||||||
this.query=Object.assign(this.query,this.$route.query)
|
this.query=Object.assign(this.query,this.$route.query)
|
||||||
this.query.start=Number(this.query.start)
|
this.query.start=Number(this.query.start)
|
||||||
this.query.limit=Number(this.query.limit)
|
this.query.limit=Number(this.query.limit)
|
||||||
|
console.log("basexlogdate1 query: ",this.$route.query)
|
||||||
|
var v= this.query.from.match(/^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$/)
|
||||||
|
this.query.from= v? this.query.from : "00:00:00"
|
||||||
this.getItems();
|
this.getItems();
|
||||||
}
|
}
|
||||||
}</script>
|
}</script>
|
||||||
|
|
|
@ -24,18 +24,18 @@ as element(json)
|
||||||
:)
|
:)
|
||||||
declare
|
declare
|
||||||
%rest:GET %rest:path("/vue-poc/api/logxml")
|
%rest:GET %rest:path("/vue-poc/api/logxml")
|
||||||
%rest:query-param("from", "{ $time }")
|
%rest:query-param("from", "{ $from }", "00:00:00")
|
||||||
%rest:query-param("date", "{ $date }")
|
%rest:query-param("date", "{ $date }")
|
||||||
%rest:query-param("window", "{ $window }")
|
%rest:query-param("window", "{ $window }")
|
||||||
%output:method("json")
|
%output:method("json")
|
||||||
function j:archive( $date as xs:string,$time as xs:string,$window)
|
function j:archive( $date as xs:string,$from as xs:string,$window)
|
||||||
as element(json)
|
as element(json)
|
||||||
{
|
{
|
||||||
let $start:=xs:dateTime(concat($date,"T",$time))
|
let $start:=xs:dateTime(concat($date,"T",$from))=>trace("archive")
|
||||||
let $items:=db:open("vue-poc","/logs/")[contains(base-uri(),$date)]/entries/entry
|
let $items:=db:open("vue-poc","/logs/")[contains(base-uri(),$date)]/entries/entry
|
||||||
let $items:=$items transform with { insert node attribute date { concat($date,'T',@time) } into .}
|
|
||||||
let $items:= if ($time) then $items[xs:dateTime(@date) ge $start] else $items
|
let $items:= if ($from) then $items[@time ge $from] else $items
|
||||||
let $entity:=$entity:list("logxml")
|
let $entity:=$entity:list("logxml")=>prof:time("entity")
|
||||||
return dice:response($items,$entity,web:dice())
|
return dice:response($items,$entity,web:dice())
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -41,9 +41,11 @@ function vue-api:xqdoc( )
|
||||||
};
|
};
|
||||||
|
|
||||||
(:~
|
(:~
|
||||||
: Returns folder info.
|
: Returns contents of a collection. example calls
|
||||||
: @param $url location
|
: <code>/vue-poc/api/collection?url=/&protocol=xmldb</code>
|
||||||
: @param $protocol 'file' or 'xmldb'
|
: <code>/vue-poc/api/collection?url=/</code>
|
||||||
|
: @param $url collection identifier, a path
|
||||||
|
: @param $protocol 'webfile' or 'xmldb'
|
||||||
:)
|
:)
|
||||||
declare
|
declare
|
||||||
%rest:GET %rest:path("/vue-poc/api/collection")
|
%rest:GET %rest:path("/vue-poc/api/collection")
|
||||||
|
|
|
@ -43,3 +43,14 @@ return
|
||||||
</json>
|
</json>
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(:~
|
||||||
|
: sample markdown
|
||||||
|
:)
|
||||||
|
declare
|
||||||
|
%rest:GET %rest:path("/vue-poc/api/components/markdown")
|
||||||
|
function j:markdown()
|
||||||
|
as xs:string
|
||||||
|
{
|
||||||
|
let $uri:=resolve-uri("md-sample.md",static-base-uri())
|
||||||
|
return fn:unparsed-text($uri)
|
||||||
|
};
|
||||||
|
|
84
src/vue-poc/features/components/markdown.vue
Normal file
84
src/vue-poc/features/components/markdown.vue
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
https://github.com/miaolz123/vue-markdown
|
||||||
|
-->
|
||||||
|
<template id="markdown">
|
||||||
|
<v-container fluid>
|
||||||
|
<v-card>
|
||||||
|
<v-toolbar class="lime darken-1">
|
||||||
|
<v-card-title >Markdown</v-card-title>
|
||||||
|
<v-checkbox v-model="show" label="show" ></v-checkbox>
|
||||||
|
<v-checkbox v-model="html" label="html" ></v-checkbox>
|
||||||
|
<v-checkbox v-model="breaks" label="breaks" ></v-checkbox>
|
||||||
|
<v-checkbox v-model="linkify" label="linkify" ></v-checkbox>
|
||||||
|
<v-checkbox v-model="emoji" label="emoji" ></v-checkbox>
|
||||||
|
<v-checkbox v-model="typographer" label="typographer" ></v-checkbox>
|
||||||
|
<v-checkbox v-model="toc" label="toc" ></v-checkbox>
|
||||||
|
<v-spacer></v-spacer>
|
||||||
|
<qd-link href="https://github.com/miaolz123/vue-markdown">vue-markdown@2.2.4</qd-link>
|
||||||
|
</v-toolbar>
|
||||||
|
<v-card-text>
|
||||||
|
<div id="toc"></div>
|
||||||
|
<vue-markdown :watches="['show','html','breaks','linkify','emoji','typographer','toc']"
|
||||||
|
:source="source" :show="show" :html="html" :breaks="breaks" :linkify="linkify"
|
||||||
|
:emoji="emoji" :typographer="typographer" :toc="toc" v-on:rendered="allRight"
|
||||||
|
v-on:toc-rendered="tocAllRight" toc-id="toc">># h1 Heading 8-)
|
||||||
|
## level 2
|
||||||
|
### h3 Heading
|
||||||
|
|
||||||
|
## Horizontal Rules
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
## Typographic replacements
|
||||||
|
|
||||||
|
Enable typographer option to see result.
|
||||||
|
|
||||||
|
(c) (C) (r) (R) (tm) (TM) (p) (P) +-
|
||||||
|
</vue-markdown>
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
|
|
||||||
|
</v-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>{
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
source: "",
|
||||||
|
show: true,
|
||||||
|
html: false,
|
||||||
|
breaks: true,
|
||||||
|
linkify: false,
|
||||||
|
emoji: true,
|
||||||
|
typographer: true,
|
||||||
|
toc: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
allRight: function (htmlStr) {
|
||||||
|
console.log("markdown is parsed !");
|
||||||
|
},
|
||||||
|
tocAllRight: function (tocHtmlStr) {
|
||||||
|
console.log("toc is parsed :", tocHtmlStr);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created:function(){
|
||||||
|
|
||||||
|
HTTP.get("components/markdown")
|
||||||
|
.then(r=>{
|
||||||
|
console.log("data::::",r.data);
|
||||||
|
this.source=r.data;
|
||||||
|
})
|
||||||
|
.catch(err=> {
|
||||||
|
console.log(err);
|
||||||
|
alert("Get query error")
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("loaded markdown:");
|
||||||
|
}
|
||||||
|
}</script>
|
222
src/vue-poc/features/components/md-sample.md
Normal file
222
src/vue-poc/features/components/md-sample.md
Normal file
|
@ -0,0 +1,222 @@
|
||||||
|
# h1 Heading 8-)
|
||||||
|
<h2> h2 Heading by HTML</h2>
|
||||||
|
## h2 Heading
|
||||||
|
### h3 Heading
|
||||||
|
|
||||||
|
## Horizontal Rules
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
## Typographic replacements
|
||||||
|
|
||||||
|
Enable typographer option to see result.
|
||||||
|
|
||||||
|
(c) (C) (r) (R) (tm) (TM) (p) (P) +-
|
||||||
|
|
||||||
|
test.. test... test..... test?..... test!....
|
||||||
|
|
||||||
|
!!!!!! ???? ,, -- ---
|
||||||
|
|
||||||
|
"Smartypants, double quotes" and 'single quotes'
|
||||||
|
|
||||||
|
|
||||||
|
## Emphasis
|
||||||
|
|
||||||
|
**This is bold text**
|
||||||
|
|
||||||
|
__This is bold text__
|
||||||
|
|
||||||
|
*This is italic text*
|
||||||
|
|
||||||
|
_This is italic text_
|
||||||
|
|
||||||
|
~~Strikethrough~~
|
||||||
|
|
||||||
|
|
||||||
|
## Blockquotes
|
||||||
|
|
||||||
|
|
||||||
|
> Blockquotes can also be nested...
|
||||||
|
>> ...by using additional greater-than signs right next to each other...
|
||||||
|
> > > ...or with spaces between arrows.
|
||||||
|
|
||||||
|
|
||||||
|
## Lists
|
||||||
|
|
||||||
|
Unordered
|
||||||
|
|
||||||
|
+ Create a list by starting a line with `+`, `-`, or `*`
|
||||||
|
+ Sub-lists are made by indenting 2 spaces:
|
||||||
|
- Marker character change forces new list start:
|
||||||
|
* Ac tristique libero volutpat at
|
||||||
|
+ Facilisis in pretium nisl aliquet
|
||||||
|
- Nulla volutpat aliquam velit
|
||||||
|
+ Very easy!
|
||||||
|
|
||||||
|
Ordered
|
||||||
|
|
||||||
|
1. Lorem ipsum dolor sit amet
|
||||||
|
2. Consectetur adipiscing elit
|
||||||
|
3. Integer molestie lorem at massa
|
||||||
|
|
||||||
|
|
||||||
|
1. You can use sequential numbers...
|
||||||
|
1. ...or keep all the numbers as `1.`
|
||||||
|
|
||||||
|
Start numbering with offset:
|
||||||
|
|
||||||
|
57. foo
|
||||||
|
1. bar
|
||||||
|
|
||||||
|
|
||||||
|
## Code
|
||||||
|
|
||||||
|
Inline `code`
|
||||||
|
|
||||||
|
Indented code
|
||||||
|
|
||||||
|
// Some comments
|
||||||
|
line 1 of code
|
||||||
|
line 2 of code
|
||||||
|
line 3 of code
|
||||||
|
|
||||||
|
|
||||||
|
Block code "fences"
|
||||||
|
|
||||||
|
```
|
||||||
|
Sample text here...
|
||||||
|
```
|
||||||
|
Syntax highlighting
|
||||||
|
|
||||||
|
``` javascript
|
||||||
|
var foo = function (bar) {
|
||||||
|
return bar++;
|
||||||
|
};
|
||||||
|
|
||||||
|
console.log(foo(5));
|
||||||
|
```
|
||||||
|
|
||||||
|
``` go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
fmt.Println("Hello, world!")
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Tables
|
||||||
|
|
||||||
|
| Option | Description |
|
||||||
|
| ------ | ----------- |
|
||||||
|
| data | path to data files to supply the data that will be passed into templates. |
|
||||||
|
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||||
|
| ext | extension to be used for dest files. |
|
||||||
|
|
||||||
|
Right aligned columns
|
||||||
|
|
||||||
|
| Option | Description |
|
||||||
|
| ------:| -----------:|
|
||||||
|
| data | path to data files to supply the data that will be passed into templates. |
|
||||||
|
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||||
|
| ext | extension to be used for dest files. |
|
||||||
|
|
||||||
|
## Links
|
||||||
|
|
||||||
|
[vue-markdown](https://github.com/miaolz123/vue-markdown)
|
||||||
|
|
||||||
|
[link with title](https://github.com/miaolz123/vue-markdown "VueMarkdown")
|
||||||
|
|
||||||
|
Autoconverted link https://github.com/miaolz123/vue-markdown (enable linkify to see)
|
||||||
|
|
||||||
|
|
||||||
|
## Images
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Like links, Images also have a footnote style syntax
|
||||||
|
|
||||||
|
![Alt text][id]
|
||||||
|
|
||||||
|
With a reference later in the document defining the URL location:
|
||||||
|
|
||||||
|
[id]: dist/img/minion.png "The Dojocat"
|
||||||
|
|
||||||
|
|
||||||
|
### Emojies
|
||||||
|
|
||||||
|
> Classic markup: :wink: :cry: :laughing: :yum:
|
||||||
|
>
|
||||||
|
> Shortcuts (emoticons): :-) :-( 8-) ;)
|
||||||
|
|
||||||
|
|
||||||
|
### Subscript / Superscript
|
||||||
|
|
||||||
|
- 19^th^
|
||||||
|
- H~2~O
|
||||||
|
|
||||||
|
|
||||||
|
### \<ins>
|
||||||
|
|
||||||
|
++Inserted text++
|
||||||
|
|
||||||
|
|
||||||
|
### \<mark>
|
||||||
|
|
||||||
|
==Marked text==
|
||||||
|
|
||||||
|
|
||||||
|
### Footnotes
|
||||||
|
|
||||||
|
Footnote 1 link[^first].
|
||||||
|
|
||||||
|
Footnote 2 link[^second].
|
||||||
|
|
||||||
|
Inline footnote^[Text of inline footnote] definition.
|
||||||
|
|
||||||
|
Duplicated footnote reference[^second].
|
||||||
|
|
||||||
|
[^first]: Footnote **can have markup**
|
||||||
|
|
||||||
|
and multiple paragraphs.
|
||||||
|
|
||||||
|
[^second]: Footnote text.
|
||||||
|
|
||||||
|
|
||||||
|
### Definition lists
|
||||||
|
|
||||||
|
Term 1
|
||||||
|
|
||||||
|
: Definition 1
|
||||||
|
with lazy continuation.
|
||||||
|
|
||||||
|
Term 2 with *inline markup*
|
||||||
|
|
||||||
|
: Definition 2
|
||||||
|
|
||||||
|
{ some code, part of Definition 2 }
|
||||||
|
|
||||||
|
Third paragraph of definition 2.
|
||||||
|
|
||||||
|
_Compact style:_
|
||||||
|
|
||||||
|
Term 1
|
||||||
|
~ Definition 1
|
||||||
|
|
||||||
|
Term 2
|
||||||
|
~ Definition 2a
|
||||||
|
~ Definition 2b
|
||||||
|
|
||||||
|
|
||||||
|
### Abbreviations
|
||||||
|
|
||||||
|
This is HTML abbreviation example.
|
||||||
|
|
||||||
|
It converts "HTML", but keep intact partial entries like "xxxHTMLyyy" and so on.
|
||||||
|
|
||||||
|
*[HTML]: Hyper Text Markup Language
|
6
src/vue-poc/features/edit/edit.md
Normal file
6
src/vue-poc/features/edit/edit.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
single editor
|
||||||
|
|
||||||
|
/vue-poc/api/edit
|
||||||
|
|
||||||
|
protocol: webfile
|
||||||
|
url:
|
|
@ -119,14 +119,14 @@
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</template>
|
</template>
|
||||||
<v-list dense>
|
<v-list dense>
|
||||||
<v-list-item @click="acecmd('showSettingsMenu')" avatar >
|
<v-list-item @click="acecmd('showSettingsMenu')" >
|
||||||
<v-list-item-avatar>
|
<v-list-item-avatar>
|
||||||
<v-icon >settings</v-icon>
|
<v-icon >settings</v-icon>
|
||||||
</v-list-item-avatar>
|
</v-list-item-avatar>
|
||||||
<v-list-item-title @click="acecmd('showSettingsMenu')" >Show ACE settings</v-list-item-title>
|
<v-list-item-title @click="acecmd('showSettingsMenu')" >Show ACE settings</v-list-item-title>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
|
||||||
<v-list-item @click="acecmd('showKeyboardShortcuts')" avatar>
|
<v-list-item @click="acecmd('showKeyboardShortcuts')">
|
||||||
<v-list-item-avatar>
|
<v-list-item-avatar>
|
||||||
<v-icon >keyboard</v-icon>
|
<v-icon >keyboard</v-icon>
|
||||||
</v-list-item-avatar>
|
</v-list-item-avatar>
|
||||||
|
|
|
@ -18,15 +18,18 @@ declare namespace c="http://www.w3.org/ns/xproc-step";
|
||||||
declare
|
declare
|
||||||
%rest:GET %rest:path("/vue-poc/api/edit")
|
%rest:GET %rest:path("/vue-poc/api/edit")
|
||||||
%rest:query-param("url", "{$url}")
|
%rest:query-param("url", "{$url}")
|
||||||
%rest:query-param("protocol", "{$protocol}","webfile")
|
|
||||||
%rest:produces("application/json")
|
%rest:produces("application/json")
|
||||||
%output:method("json")
|
%output:method("json")
|
||||||
function vue-api:edit-get($url as xs:string,$protocol as xs:string)
|
function vue-api:edit-get($url as xs:string)
|
||||||
{
|
{
|
||||||
|
let $a:=analyze-string($url,"^\w*:")=>trace("PROTO")
|
||||||
|
let $protocol:=$a/fn:match/string()
|
||||||
|
let $protocol:=if ($protocol) then $protocol else "webfile"
|
||||||
let $reader := map{
|
let $reader := map{
|
||||||
"webfile":vue-api:get-webfile#1,
|
"webfile": vue-api:get-webfile#1,
|
||||||
"xmldb":vue-api:get-basexdb#1
|
"xmldb": vue-api:get-basexdb#1
|
||||||
}
|
}
|
||||||
|
let $reader:=trace($reader)
|
||||||
return $reader($protocol)($url)
|
return $reader($protocol)($url)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
1
src/vue-poc/features/tasks/readme.md
Normal file
1
src/vue-poc/features/tasks/readme.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Tasks
|
43
src/vue-poc/features/tasks/task/log.enrich.xq
Normal file
43
src/vue-poc/features/tasks/task/log.enrich.xq
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
(:~
|
||||||
|
: log enrich
|
||||||
|
: @author andy bunce
|
||||||
|
: @todo
|
||||||
|
:)
|
||||||
|
declare %updating function local:enrich($doc as document-node()){
|
||||||
|
let $date:=fn:analyze-string(db:path($doc),"(\d{4}-\d{2}-\d{2})")/fn:match/fn:group/string()
|
||||||
|
return
|
||||||
|
for $entry in $doc/entries/entry
|
||||||
|
return local:update-entry($entry,$date)
|
||||||
|
};
|
||||||
|
|
||||||
|
declare %updating function local:update-entry($entry,$date as xs:string){
|
||||||
|
let $start :=xs:dateTime(concat($date,"T",$entry/@time))
|
||||||
|
return (
|
||||||
|
local:set-start($entry,$start),
|
||||||
|
if($entry/@ms) then
|
||||||
|
let $end:=$start+ xs:dayTimeDuration("PT" || ($entry/@ms div 1000) || "S")
|
||||||
|
return local:set-end($entry,$end)
|
||||||
|
else
|
||||||
|
delete node $entry/@end
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
declare %updating function local:set-start($entry,$start as xs:dateTime)
|
||||||
|
{
|
||||||
|
if($entry/@start) then
|
||||||
|
replace value of node $entry/@start with $start
|
||||||
|
else
|
||||||
|
insert node attribute start {$start} into $entry
|
||||||
|
};
|
||||||
|
|
||||||
|
declare %updating function local:set-end($entry,$end )
|
||||||
|
{
|
||||||
|
if($entry/@end) then
|
||||||
|
replace value of node $entry/@end with $end
|
||||||
|
else
|
||||||
|
insert node attribute end {$end} into $entry
|
||||||
|
};
|
||||||
|
|
||||||
|
db:open("vue-poc","/logs")
|
||||||
|
!local:enrich(.),
|
||||||
|
update:output("Done")
|
|
@ -1,7 +1,7 @@
|
||||||
<tasks>
|
<tasks>
|
||||||
<task name="model" url="model.build/tx-model.xq">
|
<task name="model" url="model.build/tx-model.xq">
|
||||||
<title>Generate model.gen.xqm</title>
|
<title>Generate model.gen.xqm</title>
|
||||||
<description> Generate <code>model.gen.xqm</code>
|
<description> Generate <code>model.gen.xqm</code> from files in entity folder
|
||||||
</description>
|
</description>
|
||||||
</task>
|
</task>
|
||||||
|
|
||||||
|
@ -13,26 +13,21 @@
|
||||||
<title>Import files into a database</title>
|
<title>Import files into a database</title>
|
||||||
<description>Load files into database</description>
|
<description>Load files into database</description>
|
||||||
</task>
|
</task>
|
||||||
<task name="xqdoc2" url="xqdoc/tx-xqdoc2.xq">
|
|
||||||
<title>XQdoc 2</title>
|
|
||||||
<description>Generate xquery documentation for folder. Using standard task.</description>
|
|
||||||
</task>
|
|
||||||
|
|
||||||
<task name="xqdoc-rest2" url="xqdoc/tx-xqrest2.xq">
|
<task name="log.enrich" url="task/log.enrich.xq">
|
||||||
<title>XQdoc rest2</title>
|
<title>log enrich</title>
|
||||||
<description>XQdoc.2..</description>
|
<description>logs</description>
|
||||||
</task>
|
</task>
|
||||||
|
|
||||||
<task name="xqdoc3" url="xqdoc/tx-xqdoc3.xq">
|
|
||||||
<title>XQdoc to static</title>
|
|
||||||
<description>Generate xquery documentation for folder to static folder </description>
|
|
||||||
</task>
|
|
||||||
|
|
||||||
<task name="vuecompile">
|
<task name="vuecompile">
|
||||||
<title>vue compile</title>
|
<title>vue compile</title>
|
||||||
<description>compile</description>
|
<description>compile</description>
|
||||||
</task>
|
</task>
|
||||||
|
|
||||||
|
<task name="xqdoca" url="file:///C:/Users/andy/git/xqdoca/src/main/xqdoca.xq">
|
||||||
|
<title>Create xqDoc</title>
|
||||||
|
<description>xquery documentation</description>
|
||||||
|
</task>
|
||||||
|
|
||||||
<task name="newapp" url="task/tx-newapp.xq">
|
<task name="newapp" url="task/tx-newapp.xq">
|
||||||
<title>application template</title>
|
<title>application template</title>
|
||||||
<description>application template</description>
|
<description>application template</description>
|
||||||
|
@ -40,10 +35,4 @@
|
||||||
<param name="appname">Name for new application</param>
|
<param name="appname">Name for new application</param>
|
||||||
</params>
|
</params>
|
||||||
</task>
|
</task>
|
||||||
|
|
||||||
<task name="xqdoca" url="file:///C:/Users/andy/git/xqdoca/src/main/xqdoca.xq">
|
|
||||||
<title>Create xqDoc</title>
|
|
||||||
<description>xquery documentation</description>
|
|
||||||
</task>
|
|
||||||
|
|
||||||
</tasks>
|
</tasks>
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
:search="q"
|
:search="q"
|
||||||
class="elevation-1"
|
class="elevation-1"
|
||||||
>
|
>
|
||||||
<template v-slot:item.title="{ item }" >
|
<template v-slot:item.to="{ item }" >
|
||||||
<td ><router-link :to="'tasks/' + item.to" v-text="item.title"></router-link></td>
|
<td ><router-link :to="'tasks/' + item.to" v-text="item.to"></router-link></td>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot="no-data">
|
<template slot="no-data">
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
module namespace ufile = 'vue-poc/file';
|
module namespace ufile = 'vue-poc/file';
|
||||||
import module namespace fw="quodatum:file.walker";
|
import module namespace fw="quodatum:file.walker";
|
||||||
declare namespace c="http://www.w3.org/ns/xproc-step";
|
declare namespace c="http://www.w3.org/ns/xproc-step";
|
||||||
|
|
||||||
|
|
||||||
(:~
|
(:~
|
||||||
: resolve path relative to basex webpath
|
: resolve path relative to basex webpath
|
||||||
: file("/fred")=>C:\Program Files (x86)\BaseX\webapp\fred
|
: file("/fred")=>C:\Program Files (x86)\BaseX\webapp\fred
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(: entity access maps
|
(: entity access maps
|
||||||
: auto generated from xml files in entities folder at: 2019-12-13T21:11:55.13Z
|
: auto generated from xml files in entities folder at: 2020-01-29T22:51:17.628Z
|
||||||
:)
|
:)
|
||||||
|
|
||||||
module namespace entity = 'quodatum.models.generated';
|
module namespace entity = 'quodatum.models.generated';
|
||||||
|
@ -526,11 +526,12 @@ hof:top-k-by(admin:logs(), string#1, 2)
|
||||||
"description": " log entries in XML format",
|
"description": " log entries in XML format",
|
||||||
"access": map{
|
"access": map{
|
||||||
"address": function($_ as element()) as xs:string {$_/@address },
|
"address": function($_ as element()) as xs:string {$_/@address },
|
||||||
"end": function($_ as element()) as xs:string? {$_/self::*[@ms]!(xs:dateTime(@date)+ xs:dayTimeDuration("PT" || (@ms div 1000) || "S")) },
|
"end": function($_ as element()) as xs:string? {$_/@end },
|
||||||
"ms": function($_ as element()) as xs:integer {$_/@ms },
|
"ms": function($_ as element()) as xs:integer {$_/@ms },
|
||||||
|
"start": function($_ as element()) as xs:string {$_/@start },
|
||||||
"status": function($_ as element()) as xs:string {$_/@type },
|
"status": function($_ as element()) as xs:string {$_/@type },
|
||||||
"text": function($_ as element()) as xs:string {$_/. },
|
"text": function($_ as element()) as xs:string {$_/. },
|
||||||
"time": function($_ as element()) as xs:string {$_/@date },
|
"time": function($_ as element()) as xs:string {$_/@time },
|
||||||
"user": function($_ as element()) as xs:string {$_/@user } },
|
"user": function($_ as element()) as xs:string {$_/@user } },
|
||||||
|
|
||||||
"filter": function($item,$q) as xs:boolean{
|
"filter": function($item,$q) as xs:boolean{
|
||||||
|
@ -544,12 +545,16 @@ hof:top-k-by(admin:logs(), string#1, 2)
|
||||||
},
|
},
|
||||||
"end": function($_ as element()) as element(end)? {
|
"end": function($_ as element()) as element(end)? {
|
||||||
(: xs:string? :)
|
(: xs:string? :)
|
||||||
fn:data($_/self::*[@ms]!(xs:dateTime(@date)+ xs:dayTimeDuration("PT" || (@ms div 1000) || "S")))!element end { .}
|
fn:data($_/@end)!element end { .}
|
||||||
},
|
},
|
||||||
"ms": function($_ as element()) as element(ms)? {
|
"ms": function($_ as element()) as element(ms)? {
|
||||||
(: xs:integer :)
|
(: xs:integer :)
|
||||||
fn:data($_/@ms)!element ms { attribute type {'number'}, .}
|
fn:data($_/@ms)!element ms { attribute type {'number'}, .}
|
||||||
},
|
},
|
||||||
|
"start": function($_ as element()) as element(start)? {
|
||||||
|
(: xs:string :)
|
||||||
|
fn:data($_/@start)!element start { .}
|
||||||
|
},
|
||||||
"status": function($_ as element()) as element(status)? {
|
"status": function($_ as element()) as element(status)? {
|
||||||
(: xs:string :)
|
(: xs:string :)
|
||||||
fn:data($_/@type)!element status { .}
|
fn:data($_/@type)!element status { .}
|
||||||
|
@ -560,7 +565,7 @@ hof:top-k-by(admin:logs(), string#1, 2)
|
||||||
},
|
},
|
||||||
"time": function($_ as element()) as element(time)? {
|
"time": function($_ as element()) as element(time)? {
|
||||||
(: xs:string :)
|
(: xs:string :)
|
||||||
fn:data($_/@date)!element time { .}
|
fn:data($_/@time)!element time { .}
|
||||||
},
|
},
|
||||||
"user": function($_ as element()) as element(user)? {
|
"user": function($_ as element()) as element(user)? {
|
||||||
(: xs:string :)
|
(: xs:string :)
|
||||||
|
|
|
@ -69,7 +69,8 @@ const router = new VueRouter({
|
||||||
,children: [
|
,children: [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: Settings, meta:{title:"Settings ***", requiresAuth:true }
|
component: Settings,
|
||||||
|
meta:{title:"Settings ***", requiresAuth:true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'logs', name:"logs",
|
path: 'logs', name:"logs",
|
||||||
|
@ -110,6 +111,7 @@ const router = new VueRouter({
|
||||||
{ path: 'tree2', component: Tree2, meta:{title:"tree2"} },
|
{ path: 'tree2', component: Tree2, meta:{title:"tree2"} },
|
||||||
{ path: 'form', component: Brutusin, meta:{title:"Form demo"} },
|
{ path: 'form', component: Brutusin, meta:{title:"Form demo"} },
|
||||||
{ path: 'websocket', component: Websocket,meta:{title:"Web socket"} },
|
{ path: 'websocket', component: Websocket,meta:{title:"Web socket"} },
|
||||||
|
{ path: 'markdown', component: Markdown,meta:{title:"Markdown"} },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// generated 2019-12-13T23:01:01.285Z
|
// generated 2020-02-02T23:23:08.774Z
|
||||||
|
|
||||||
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/qd-autoheight.vue
|
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/qd-autoheight.vue
|
||||||
Vue.component('qd-autoheight',{template:`
|
Vue.component('qd-autoheight',{template:`
|
||||||
|
@ -792,6 +792,10 @@ Vue.component('vp-paramform',{template:`
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-toolbar color="blue lighten-3" dense>
|
<v-toolbar color="blue lighten-3" dense>
|
||||||
<v-card-title>{{ description }}</v-card-title>
|
<v-card-title>{{ description }}</v-card-title>
|
||||||
|
<v-spacer></v-spacer>
|
||||||
|
<router-link :to="{name:'edit', query:{url: url}}">
|
||||||
|
<v-icon :title="url">history</v-icon>{{ name }}
|
||||||
|
</router-link>
|
||||||
</v-toolbar>
|
</v-toolbar>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<v-form ref="form" lazy-validation>
|
<v-form ref="form" lazy-validation>
|
||||||
|
@ -815,7 +819,7 @@ Vue.component('vp-paramform',{template:`
|
||||||
</v-layout>
|
</v-layout>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
</v-form>
|
</v-form>
|
||||||
<div :title="url">{{ url }} {{ updating }}</div>
|
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-card-actions>
|
<v-card-actions>
|
||||||
<v-btn @click="clear()" id="btn-clear">Clear</v-btn>
|
<v-btn @click="clear()" id="btn-clear">Clear</v-btn>
|
||||||
|
@ -869,6 +873,11 @@ Vue.component('vp-paramform',{template:`
|
||||||
return this.$refs.form.validate()
|
return this.$refs.form.validate()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
name(){
|
||||||
|
return this.url && this.url.substring(this.url.lastIndexOf('/') + 1)
|
||||||
|
}
|
||||||
|
},
|
||||||
watch:{
|
watch:{
|
||||||
params(vold,vnew) {
|
params(vold,vnew) {
|
||||||
console.log("params: ",vnew)
|
console.log("params: ",vnew)
|
||||||
|
@ -1634,6 +1643,16 @@ const About=Vue.extend({template:`
|
||||||
return {
|
return {
|
||||||
fab: false
|
fab: false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
refresh(){
|
||||||
|
HTTP.get("package.json")
|
||||||
|
.then(r=>{
|
||||||
|
console.log("status",r)
|
||||||
|
|
||||||
|
//this.$forceUpdate()
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -1760,21 +1779,23 @@ const Basexlogdate1=Vue.extend({template:`
|
||||||
<v-card-title>
|
<v-card-title>
|
||||||
<qd-breadcrumbs @todo="showmenu= ! showmenu" :crumbs="[{to: '/logdate', text:'log files'}, {text: date, disabled: false, menu: 'todo'}]">crumbs</qd-breadcrumbs>
|
<qd-breadcrumbs @todo="showmenu= ! showmenu" :crumbs="[{to: '/logdate', text:'log files'}, {text: date, disabled: false, menu: 'todo'}]">crumbs</qd-breadcrumbs>
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-btn @click="pageBack()" icon>
|
|
||||||
<v-avatar><v-icon>skip_previous</v-icon> </v-avatar>
|
|
||||||
</v-btn>
|
|
||||||
<v-btn @click="pageNext()" icon>
|
|
||||||
<v-avatar> <v-icon>skip_next</v-icon> </v-avatar>
|
|
||||||
</v-btn>
|
|
||||||
<v-menu ref="menu" v-model="showFrom" :close-on-content-click="false" :nudge-right="40" :return-value.sync="query.from" transition="scale-transition" offset-y max-width="290px" min-width="100px">
|
<v-menu ref="menu" v-model="showFrom" :close-on-content-click="false" :nudge-right="40" :return-value.sync="query.from" transition="scale-transition" offset-y max-width="290px" min-width="100px">
|
||||||
<template v-slot:activator="{ on }">
|
<template v-slot:activator="{ on }">
|
||||||
<v-text-field v-model="query.from" label="Start time" prepend-icon="access_time" readonly v-on="on"></v-text-field>
|
<v-text-field v-model="query.from" label="Start time" prepend-icon="access_time" readonly v-on="on" class="mt-3"></v-text-field>
|
||||||
</template>
|
</template>
|
||||||
<v-time-picker v-if="showFrom" v-model="query.from" full-width use-seconds @click:second="$refs.menu.save(query.from)"></v-time-picker>
|
<v-time-picker v-if="showFrom" v-model="query.from" use-seconds @click:second="$refs.menu.save(query.from)"></v-time-picker>
|
||||||
</v-menu>
|
</v-menu>
|
||||||
|
<v-toolbar-items>
|
||||||
<qd-range :query="query"></qd-range>
|
<v-btn @click="pageBack()" icon>
|
||||||
|
<v-avatar><v-icon>skip_previous</v-icon> </v-avatar>
|
||||||
|
</v-btn>
|
||||||
|
<v-btn @click="pageNext()" icon title="increment From by window">
|
||||||
|
<v-avatar> <v-icon>skip_next</v-icon> </v-avatar>
|
||||||
|
</v-btn>
|
||||||
|
</v-toolbar-items>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
|
<qd-range :query="query"></qd-range>
|
||||||
<v-toolbar-items>
|
<v-toolbar-items>
|
||||||
<v-btn @click="fit">fit</v-btn>
|
<v-btn @click="fit">fit</v-btn>
|
||||||
<v-btn @click="getItems">
|
<v-btn @click="getItems">
|
||||||
|
@ -1862,12 +1883,14 @@ methods:{
|
||||||
//console.log("logxml",items)
|
//console.log("logxml",items)
|
||||||
// {id: 4, content: 'item 4', start: '2014-04-16', end: '2014-04-19', type: 'point'}
|
// {id: 4, content: 'item 4', start: '2014-04-16', end: '2014-04-19', type: 'point'}
|
||||||
this.data=items.map(x=>Object.assign({}, x,
|
this.data=items.map(x=>Object.assign({}, x,
|
||||||
{ start: x.time,
|
{
|
||||||
content: x.text.split(";",1)[0],
|
content: x.text.split(";",1)[0],
|
||||||
title: x.text,
|
title: x.text,
|
||||||
style: x.text.startsWith("[POST] ")?"background-color: red;": "background-color: yellow;",
|
style: x.text.startsWith("[POST] ")?"background-color: red;": "background-color: yellow;",
|
||||||
group: x.user}
|
group: x.user}
|
||||||
))
|
))
|
||||||
|
this.loading=false
|
||||||
|
return;
|
||||||
//https://stackoverflow.com/a/39637877/3210344 round(date, moment.duration(15, "minutes"), "ceil")
|
//https://stackoverflow.com/a/39637877/3210344 round(date, moment.duration(15, "minutes"), "ceil")
|
||||||
var roundDate= function (date, duration, method) {
|
var roundDate= function (date, duration, method) {
|
||||||
return moment(Math[method]((+date) / (+duration)) * (+duration));
|
return moment(Math[method]((+date) / (+duration)) * (+duration));
|
||||||
|
@ -1883,7 +1906,7 @@ methods:{
|
||||||
this.options.start=start.toDate()
|
this.options.start=start.toDate()
|
||||||
this.options.end=start.add(this.query.window,"s").toDate()
|
this.options.end=start.add(this.query.window,"s").toDate()
|
||||||
//console.log("data",this.data)
|
//console.log("data",this.data)
|
||||||
this.loading=false
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1899,10 +1922,13 @@ watch:{
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
console.log("logxml: ",this.$route.query)
|
|
||||||
this.query=Object.assign(this.query,this.$route.query)
|
this.query=Object.assign(this.query,this.$route.query)
|
||||||
this.query.start=Number(this.query.start)
|
this.query.start=Number(this.query.start)
|
||||||
this.query.limit=Number(this.query.limit)
|
this.query.limit=Number(this.query.limit)
|
||||||
|
console.log("basexlogdate1 query: ",this.$route.query)
|
||||||
|
var v= this.query.from.match(/^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$/)
|
||||||
|
this.query.from= v? this.query.from : "00:00:00"
|
||||||
this.getItems();
|
this.getItems();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2450,6 +2476,85 @@ const Files=Vue.extend({template:`
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/components/markdown.vue
|
||||||
|
const Markdown=Vue.extend({template:`
|
||||||
|
<v-container fluid>
|
||||||
|
<v-card>
|
||||||
|
<v-toolbar class="lime darken-1">
|
||||||
|
<v-card-title>Markdown</v-card-title>
|
||||||
|
<v-checkbox v-model="show" label="show"></v-checkbox>
|
||||||
|
<v-checkbox v-model="html" label="html"></v-checkbox>
|
||||||
|
<v-checkbox v-model="breaks" label="breaks"></v-checkbox>
|
||||||
|
<v-checkbox v-model="linkify" label="linkify"></v-checkbox>
|
||||||
|
<v-checkbox v-model="emoji" label="emoji"></v-checkbox>
|
||||||
|
<v-checkbox v-model="typographer" label="typographer"></v-checkbox>
|
||||||
|
<v-checkbox v-model="toc" label="toc"></v-checkbox>
|
||||||
|
<v-spacer></v-spacer>
|
||||||
|
<qd-link href="https://github.com/miaolz123/vue-markdown">vue-markdown@2.2.4</qd-link>
|
||||||
|
</v-toolbar>
|
||||||
|
<v-card-text>
|
||||||
|
<div id="toc"></div>
|
||||||
|
<vue-markdown :watches="['show','html','breaks','linkify','emoji','typographer','toc']" :source="source" :show="show" :html="html" :breaks="breaks" :linkify="linkify" :emoji="emoji" :typographer="typographer" :toc="toc" v-on:rendered="allRight" v-on:toc-rendered="tocAllRight" toc-id="toc">># h1 Heading 8-)
|
||||||
|
## level 2
|
||||||
|
### h3 Heading
|
||||||
|
|
||||||
|
## Horizontal Rules
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
## Typographic replacements
|
||||||
|
|
||||||
|
Enable typographer option to see result.
|
||||||
|
|
||||||
|
(c) (C) (r) (R) (tm) (TM) (p) (P) +-
|
||||||
|
</vue-markdown>
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
|
|
||||||
|
</v-container>
|
||||||
|
`,
|
||||||
|
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
source: "",
|
||||||
|
show: true,
|
||||||
|
html: false,
|
||||||
|
breaks: true,
|
||||||
|
linkify: false,
|
||||||
|
emoji: true,
|
||||||
|
typographer: true,
|
||||||
|
toc: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
allRight: function (htmlStr) {
|
||||||
|
console.log("markdown is parsed !");
|
||||||
|
},
|
||||||
|
tocAllRight: function (tocHtmlStr) {
|
||||||
|
console.log("toc is parsed :", tocHtmlStr);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created:function(){
|
||||||
|
|
||||||
|
HTTP.get("components/markdown")
|
||||||
|
.then(r=>{
|
||||||
|
console.log("data::::",r.data);
|
||||||
|
this.source=r.data;
|
||||||
|
})
|
||||||
|
.catch(err=> {
|
||||||
|
console.log(err);
|
||||||
|
alert("Get query error")
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("loaded markdown:");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/components/svg.vue
|
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/components/svg.vue
|
||||||
const Svg=Vue.extend({template:`
|
const Svg=Vue.extend({template:`
|
||||||
<v-container fluid>
|
<v-container fluid>
|
||||||
|
@ -2901,14 +3006,14 @@ const Edit=Vue.extend({template:`
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</template>
|
</template>
|
||||||
<v-list dense>
|
<v-list dense>
|
||||||
<v-list-item @click="acecmd('showSettingsMenu')" avatar>
|
<v-list-item @click="acecmd('showSettingsMenu')">
|
||||||
<v-list-item-avatar>
|
<v-list-item-avatar>
|
||||||
<v-icon>settings</v-icon>
|
<v-icon>settings</v-icon>
|
||||||
</v-list-item-avatar>
|
</v-list-item-avatar>
|
||||||
<v-list-item-title @click="acecmd('showSettingsMenu')">Show ACE settings</v-list-item-title>
|
<v-list-item-title @click="acecmd('showSettingsMenu')">Show ACE settings</v-list-item-title>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
|
||||||
<v-list-item @click="acecmd('showKeyboardShortcuts')" avatar>
|
<v-list-item @click="acecmd('showKeyboardShortcuts')">
|
||||||
<v-list-item-avatar>
|
<v-list-item-avatar>
|
||||||
<v-icon>keyboard</v-icon>
|
<v-icon>keyboard</v-icon>
|
||||||
</v-list-item-avatar>
|
</v-list-item-avatar>
|
||||||
|
@ -6912,8 +7017,8 @@ const Tasks=Vue.extend({template:`
|
||||||
|
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<v-data-table :headers="headers" :items="items" hide-default-footer :search="q" class="elevation-1">
|
<v-data-table :headers="headers" :items="items" hide-default-footer :search="q" class="elevation-1">
|
||||||
<template v-slot:item.title="{ item }">
|
<template v-slot:item.to="{ item }">
|
||||||
<td><router-link :to="'tasks/' + item.to" v-text="item.title"></router-link></td>
|
<td><router-link :to="'tasks/' + item.to" v-text="item.to"></router-link></td>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot="no-data">
|
<template slot="no-data">
|
||||||
|
@ -7594,7 +7699,8 @@ const router = new VueRouter({
|
||||||
,children: [
|
,children: [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: Settings, meta:{title:"Settings ***", requiresAuth:true }
|
component: Settings,
|
||||||
|
meta:{title:"Settings ***", requiresAuth:true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'logs', name:"logs",
|
path: 'logs', name:"logs",
|
||||||
|
@ -7635,6 +7741,7 @@ const router = new VueRouter({
|
||||||
{ path: 'tree2', component: Tree2, meta:{title:"tree2"} },
|
{ path: 'tree2', component: Tree2, meta:{title:"tree2"} },
|
||||||
{ path: 'form', component: Brutusin, meta:{title:"Form demo"} },
|
{ path: 'form', component: Brutusin, meta:{title:"Form demo"} },
|
||||||
{ path: 'websocket', component: Websocket,meta:{title:"Web socket"} },
|
{ path: 'websocket', component: Websocket,meta:{title:"Web socket"} },
|
||||||
|
{ path: 'markdown', component: Markdown,meta:{title:"Markdown"} },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -7906,6 +8013,7 @@ const Vuepoc=Vue.extend({template:`
|
||||||
{href: '/labs/tree',text: 'Tree',icon: 'nature'},
|
{href: '/labs/tree',text: 'Tree',icon: 'nature'},
|
||||||
{href: '/labs/tree2',text: 'Tree 2',icon: 'nature'},
|
{href: '/labs/tree2',text: 'Tree 2',icon: 'nature'},
|
||||||
{href: '/labs/websocket',text: 'Web socket',icon: 'swap_calls'},
|
{href: '/labs/websocket',text: 'Web socket',icon: 'swap_calls'},
|
||||||
|
{href: '/labs/markdown',text: 'Markdown',icon: 'receipt'},
|
||||||
]},
|
]},
|
||||||
{href: '/settings',text: 'Settings',icon: 'settings' },
|
{href: '/settings',text: 'Settings',icon: 'settings' },
|
||||||
{href: '/about',text: 'About (v0.3.2)' , icon: 'help' },
|
{href: '/about',text: 'About (v0.3.2)' , icon: 'help' },
|
||||||
|
@ -8191,6 +8299,6 @@ var sockhost=('https:'==window.location.protocol?'wss:':'ws:')+'//'+ window.loca
|
||||||
//Vue.use({ install: install });
|
//Vue.use({ install: install });
|
||||||
var EditTabs=new Vue(GEditTabs)
|
var EditTabs=new Vue(GEditTabs)
|
||||||
Vue.use(Vuetify);
|
Vue.use(Vuetify);
|
||||||
|
Vue.use(VueMarkdown);
|
||||||
new Vuepoc().$mount('#app')
|
new Vuepoc().$mount('#app')
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
<link rel="shortcut icon" href="/vue-poc/ui/icon.png"/>
|
<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/css?family=Roboto:300,400,500,700,400italic"/>
|
||||||
<link rel="stylesheet" href="//fonts.googleapis.com/icon?family=Material+Icons"/>
|
<link rel="stylesheet" href="//fonts.googleapis.com/icon?family=Material+Icons"/>
|
||||||
<link rel="stylesheet" href="//unpkg.com/vuetify@2.1.14/dist/vuetify.min.css" type="text/css"/>
|
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@mdi/font@4.x/css/materialdesignicons.min.css" >
|
||||||
|
<link rel="stylesheet" href="//unpkg.com/vuetify@2.2.8/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="//unpkg.com/@riophae/vue-treeselect@0.0.29/dist/vue-treeselect.min.css"/>
|
||||||
<link rel="stylesheet" href="/vue-poc/ui/prism/prism.css" type="text/css"/>
|
<link rel="stylesheet" href="/vue-poc/ui/prism/prism.css" type="text/css"/>
|
||||||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.0.3/dist/leaflet.css"/>
|
<link rel="stylesheet" href="//unpkg.com/leaflet@1.0.3/dist/leaflet.css"/>
|
||||||
|
@ -36,10 +37,10 @@
|
||||||
|
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.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/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="//cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.js" crossorigin="anonymous"></script>
|
||||||
<script src="//unpkg.com/vuex@3.1.0/dist/vuex.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="//cdnjs.cloudflare.com/ajax/libs/qs/6.4.0/qs.js" crossorigin="anonymous" ></script>
|
||||||
<script src="//unpkg.com/vuetify@2.1.14/dist/vuetify.min.js" crossorigin="anonymous"></script>
|
<script src="//unpkg.com/vuetify@2.2.8/dist/vuetify.min.js" crossorigin="anonymous"></script>
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.7/ace.js" crossorigin="anonymous"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.7/ace.js" crossorigin="anonymous"></script>
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.7/ext-language_tools.js" crossorigin="anonymous"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.7/ext-language_tools.js" crossorigin="anonymous"></script>
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.7/ext-linking.js" crossorigin="anonymous" charset="utf-8"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.7/ext-linking.js" crossorigin="anonymous" charset="utf-8"></script>
|
||||||
|
@ -48,6 +49,7 @@
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.9.0/beautify-css.js" crossorigin="anonymous"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.9.0/beautify-css.js" crossorigin="anonymous"></script>
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.9.0/beautify-html.js" crossorigin="anonymous"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.9.0/beautify-html.js" crossorigin="anonymous"></script>
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/localforage/1.7.1/localforage.js" crossorigin="anonymous"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/localforage/1.7.1/localforage.js" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.js" crossorigin="anonymous"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.js" crossorigin="anonymous"></script>
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/vis/4.20.1/vis-timeline-graph2d.min.js" crossorigin="anonymous"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/vis/4.20.1/vis-timeline-graph2d.min.js" crossorigin="anonymous"></script>
|
||||||
<script src="//unpkg.com/vue-clip@1.0.0/dist/vue-clip.js" crossorigin="anonymous"></script>
|
<script src="//unpkg.com/vue-clip@1.0.0/dist/vue-clip.js" crossorigin="anonymous"></script>
|
||||||
|
@ -55,7 +57,7 @@
|
||||||
|
|
||||||
<script src="/vue-poc/ui/prism/prism.js" crossorigin="anonymous"></script>
|
<script src="/vue-poc/ui/prism/prism.js" crossorigin="anonymous"></script>
|
||||||
<script src="//unpkg.com/vue-prism-component@1.1.1/dist/vue-prism-component.min.js" crossorigin="anonymous"></script>
|
<script src="//unpkg.com/vue-prism-component@1.1.1/dist/vue-prism-component.min.js" crossorigin="anonymous"></script>
|
||||||
|
<script src="//cdn.jsdelivr.net/npm/vue-markdown@2.2.4/dist/vue-markdown.js" crossorigin="anonymous"></script>
|
||||||
<script src="//unpkg.com/leaflet@1.0.3/dist/leaflet.js" crossorigin="anonymous"></script>
|
<script src="//unpkg.com/leaflet@1.0.3/dist/leaflet.js" crossorigin="anonymous"></script>
|
||||||
<script src="//unpkg.com/vue2-leaflet@1.0.2/dist/vue2-leaflet.js" crossorigin="anonymous"></script>
|
<script src="//unpkg.com/vue2-leaflet@1.0.2/dist/vue2-leaflet.js" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue