-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated blessed-vue in examples to 2.0.1, make components example in …
…dashboard.
- Loading branch information
Showing
11 changed files
with
111 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -208,9 +208,9 @@ blessed-contrib@^4.8.5: | |
term-canvas "0.0.5" | ||
x256 ">=0.0.1" | ||
|
||
blessed-vue@^2.0.0: | ||
version "2.0.0" | ||
resolved "https://registry.yarnpkg.com/blessed-vue/-/blessed-vue-2.0.0.tgz#124c57b56761fa08bc3a9f9ac3c078a2b96282ec" | ||
[email protected].1: | ||
version "2.0.1" | ||
resolved "https://registry.yarnpkg.com/blessed-vue/-/blessed-vue-2.0.1.tgz#542b322d7cf8a0674f81a21729772bceef8056c0" | ||
dependencies: | ||
blessed "^0.1.81" | ||
blessed-contrib "^4.8.5" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<template> | ||
<line-graph :lineData="lineData" :style="logStyle"/> | ||
</template> | ||
|
||
<script> | ||
import moment from 'moment' | ||
import LineGraph from './line.js' | ||
let counter = 12; | ||
let interval | ||
export default { | ||
name: 'log-component', | ||
components: { | ||
LineGraph | ||
}, | ||
data: () => { | ||
return { | ||
logStyle: { | ||
bg: 'black', | ||
fg: 'white', | ||
border: { | ||
fg: 'green', | ||
// bg: 'red' | ||
} | ||
}, | ||
lineData: { | ||
x: ['t1', 't2', 't3', 't4', 't5', 't6', 't7', 't8', 't9', 't10', 't11', 't12'], | ||
y: [5, 1, 7, 5, 2, 4, 9, 1, 7, 3, 4, 5] | ||
} | ||
} | ||
}, | ||
mounted () { | ||
interval = setInterval(() => { | ||
this.lineData = { | ||
x: [...this.lineData.x.slice(1), `t${++counter}`], | ||
y: [...this.lineData.y.slice(1), Math.floor(Math.random() * 10 % 10) + 1] | ||
} | ||
}, 1000) | ||
}, | ||
beforeDestroy () { | ||
if(interval) { | ||
clearInterval(interval) | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<template> | ||
<bar label="Press F1 to swap to line graph" :top="0" :left="0" :maxHeight="10" :width="100" :height="20" :style="logStyle" :data="barData"/> | ||
</template> | ||
|
||
<script> | ||
import moment from 'moment' | ||
let counter = 10; | ||
let interval | ||
export default { | ||
name: 'bar-component', | ||
data: () => { | ||
return { | ||
logStyle: { | ||
bg: 'black', | ||
fg: 'white', | ||
border: { | ||
fg: 'green', | ||
} | ||
}, | ||
barData: { | ||
titles: ['t1', 't2', 't3', 't4', 't5', 't6', 't7', 't8', 't9', 't10'], | ||
data: [5, 1, 7, 5, 2, 4, 7, 5, 2, 3] | ||
} | ||
} | ||
}, | ||
mounted () { | ||
interval = setInterval(() => { | ||
this.barData = { | ||
titles: [...this.barData.titles.slice(1), `t${++counter}`], | ||
data: [...this.barData.data.slice(1), Math.floor(Math.random() * 10 % 10) + 1] | ||
} | ||
}, 1000) | ||
}, | ||
beforeDestroy () { | ||
if(interval) { | ||
clearInterval(interval) | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -191,9 +191,9 @@ blessed-contrib@^4.8.5: | |
term-canvas "0.0.5" | ||
x256 ">=0.0.1" | ||
|
||
[email protected].0: | ||
version "2.0.0" | ||
resolved "https://registry.yarnpkg.com/blessed-vue/-/blessed-vue-2.0.0.tgz#124c57b56761fa08bc3a9f9ac3c078a2b96282ec" | ||
[email protected].1: | ||
version "2.0.1" | ||
resolved "https://registry.yarnpkg.com/blessed-vue/-/blessed-vue-2.0.1.tgz#542b322d7cf8a0674f81a21729772bceef8056c0" | ||
dependencies: | ||
blessed "^0.1.81" | ||
blessed-contrib "^4.8.5" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -350,9 +350,9 @@ blessed-contrib@^4.8.5: | |
term-canvas "0.0.5" | ||
x256 ">=0.0.1" | ||
|
||
[email protected].0: | ||
version "2.0.0" | ||
resolved "https://registry.yarnpkg.com/blessed-vue/-/blessed-vue-2.0.0.tgz#124c57b56761fa08bc3a9f9ac3c078a2b96282ec" | ||
[email protected].1: | ||
version "2.0.1" | ||
resolved "https://registry.yarnpkg.com/blessed-vue/-/blessed-vue-2.0.1.tgz#542b322d7cf8a0674f81a21729772bceef8056c0" | ||
dependencies: | ||
blessed "^0.1.81" | ||
blessed-contrib "^4.8.5" | ||
|