|
@@ -43,17 +43,32 @@
|
|
@input="documentUpdate"-->
|
|
@input="documentUpdate"-->
|
|
<hx-split
|
|
<hx-split
|
|
dir="horizontal"
|
|
dir="horizontal"
|
|
- :resizeable="funcsActive && funcsResizeable"
|
|
|
|
|
|
+ :resizeable="funcsActive"
|
|
:split="funcsActive?funcsSize:'0px'"
|
|
:split="funcsActive?funcsSize:'0px'"
|
|
@onSplitResize="funcsSizeUpdate"
|
|
@onSplitResize="funcsSizeUpdate"
|
|
|
|
|
|
>
|
|
>
|
|
- <flow-panel
|
|
|
|
- :registry="registry"
|
|
|
|
- @toggleResizeable="funcsResizeable=!funcsResizeable"
|
|
|
|
- @toggleStickySockets="managerStickySockets=!managerStickySockets"
|
|
|
|
- />
|
|
|
|
-
|
|
|
|
|
|
+ <div class="flow-panel__container">
|
|
|
|
+ <div class="flow-panel__selector">
|
|
|
|
+ <button @click="panel='palette'">Funcs</button>
|
|
|
|
+ <button @click="panel='inspector'">Inspector</button>
|
|
|
|
+ </div>
|
|
|
|
+ <transition name="fade">
|
|
|
|
+ <flow-funcs
|
|
|
|
+ v-show="panel=='palette'"
|
|
|
|
+ :registry="registry"
|
|
|
|
+ @toggleResizeable="funcsResizeable=!funcsResizeable"
|
|
|
|
+ @toggleStickySockets="managerStickySockets=!managerStickySockets"
|
|
|
|
+ /></transition>
|
|
|
|
+ <transition name="fade">
|
|
|
|
+ <flow-inspector
|
|
|
|
+ v-show="panel=='inspector'"
|
|
|
|
+ :registry="registry"
|
|
|
|
+ :activity="activity"
|
|
|
|
+ :node-inspect="nodeInspect"
|
|
|
|
+ @nodeProcess="nodeProcess($event)"
|
|
|
|
+ /></transition>
|
|
|
|
+ </div>
|
|
<flow-manager
|
|
<flow-manager
|
|
ref="flowManager"
|
|
ref="flowManager"
|
|
:activity="activity"
|
|
:activity="activity"
|
|
@@ -72,7 +87,7 @@
|
|
<!-- Node inspector -->
|
|
<!-- Node inspector -->
|
|
<!-- Move this to a different place -->
|
|
<!-- Move this to a different place -->
|
|
<!-- And rename it to inspector -->
|
|
<!-- And rename it to inspector -->
|
|
- <hx-modal
|
|
|
|
|
|
+ <!--<hx-modal
|
|
class="flow-modal"
|
|
class="flow-modal"
|
|
v-if="nodeInspect"
|
|
v-if="nodeInspect"
|
|
@close="nodeInspect=null"
|
|
@close="nodeInspect=null"
|
|
@@ -110,15 +125,22 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="flow-modal__properties">
|
|
<div class="flow-modal__properties">
|
|
|
|
+
|
|
<h3>Node Properties</h3>
|
|
<h3>Node Properties</h3>
|
|
<label>Description</label>
|
|
<label>Description</label>
|
|
<div class="property">Bogus description</div>
|
|
<div class="property">Bogus description</div>
|
|
<label>Help</label>
|
|
<label>Help</label>
|
|
<div class="property">Connect to input a thing and goes to output another thing</div>
|
|
<div class="property">Connect to input a thing and goes to output another thing</div>
|
|
- <label>Result</label>
|
|
|
|
- <div class="property">{{ activity && activity[nodeInspect.id] && activity[nodeInspect.id].data }}</div>
|
|
|
|
- <label>Error</label>
|
|
|
|
- <div class="property">{{ activity && activity[nodeInspect.id] && activity[nodeInspect.id].error }}</div>
|
|
|
|
|
|
+ <div v-if="activity && activity[nodeInspect.id] && activity[nodeInspect.id].data" class="flow-modal__properties-result">
|
|
|
|
+ <label>Result</label>
|
|
|
|
+ <div class="property">{{ activity && activity[nodeInspect.id] && activity[nodeInspect.id].data }}</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="activity && activity[nodeInspect.id] && activity[nodeInspect.id].error" class="flow-modal__properties-error">
|
|
|
|
+ <label>Error</label>
|
|
|
|
+ <div class="property">{{ activity && activity[nodeInspect.id] && activity[nodeInspect.id].error }}</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div style="flex: 1 0 100%;"> </div>
|
|
|
|
+ <button class="flow-modal__button-run primary-inverse" @click="nodeProcess(nodeInspect)">Run</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<label>label</label>
|
|
<label>label</label>
|
|
@@ -130,10 +152,9 @@
|
|
v-model="nodeInspect.label" >
|
|
v-model="nodeInspect.label" >
|
|
</div>
|
|
</div>
|
|
<div class="flow-modal__footer" slot="footer">
|
|
<div class="flow-modal__footer" slot="footer">
|
|
- <button @click="nodeInspect=false">Dismiss</button>
|
|
|
|
- <button class="primary-inverse" @click="nodeProcess(nodeInspect);nodeInspect = null">Run</button>
|
|
|
|
|
|
+ <button class="primary" @click="nodeInspect=false">OK</button>
|
|
</div>
|
|
</div>
|
|
- </hx-modal>
|
|
|
|
|
|
+ </hx-modal>-->
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -143,70 +164,27 @@ import AppChat from '@/components/chat'
|
|
import FlowManager from '@/components/flow/manager'
|
|
import FlowManager from '@/components/flow/manager'
|
|
import FlowNode from '@/components/flow/node'
|
|
import FlowNode from '@/components/flow/node'
|
|
import FlowPanzoom from '@/components/flow/panzoom'
|
|
import FlowPanzoom from '@/components/flow/panzoom'
|
|
-import FlowPanel from './panel'
|
|
|
|
|
|
+import FlowFuncs from './panel-funcs'
|
|
|
|
+import FlowInspector from './panel-inspector'
|
|
import HxSplit from '@/components/shared/hx-split'
|
|
import HxSplit from '@/components/shared/hx-split'
|
|
import HxModal from '@/components/shared/hx-modal'
|
|
import HxModal from '@/components/shared/hx-modal'
|
|
|
|
+import defRegistry from './defregistry'
|
|
import 'reset-css/reset.css'
|
|
import 'reset-css/reset.css'
|
|
|
|
|
|
import '@/assets/dark-theme.css'
|
|
import '@/assets/dark-theme.css'
|
|
import '@/assets/style.css'
|
|
import '@/assets/style.css'
|
|
// import nodeData from './nodedata'
|
|
// import nodeData from './nodedata'
|
|
|
|
|
|
-const defRegistry = {
|
|
|
|
- 'Input': {
|
|
|
|
- categories: ['core'],
|
|
|
|
- output: 'interface {}',
|
|
|
|
- style: { color: '#686', textColor: '#fff', shape: 'circle' },
|
|
|
|
- props: {} // should be sent in the node
|
|
|
|
- },
|
|
|
|
- 'Variable': {
|
|
|
|
- categories: ['core'],
|
|
|
|
- output: 'interface {}',
|
|
|
|
- style: { color: '#88a', textColor: '#000' },
|
|
|
|
- props: {init: ''}
|
|
|
|
- },
|
|
|
|
- 'Const': {
|
|
|
|
- categories: ['core'],
|
|
|
|
- output: 'interface {}',
|
|
|
|
- style: {
|
|
|
|
- color: '#555',
|
|
|
|
- textColor: '#333'
|
|
|
|
- },
|
|
|
|
- props: {value: ''}
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
export default {
|
|
export default {
|
|
- components: {FlowManager, FlowPanel, FlowNode, FlowPanzoom, HxSplit, HxModal, AppChat},
|
|
|
|
|
|
+ components: {FlowManager, FlowNode, FlowPanzoom, FlowInspector, FlowFuncs, HxSplit, HxModal, AppChat},
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
registry: JSON.parse(JSON.stringify(defRegistry)),
|
|
registry: JSON.parse(JSON.stringify(defRegistry)),
|
|
activity: {},
|
|
activity: {},
|
|
|
|
|
|
- /* {
|
|
|
|
- // Fixed default stuff
|
|
|
|
- 'Test': {
|
|
|
|
- group: 'Generic',
|
|
|
|
- output: 'any',
|
|
|
|
- style: {
|
|
|
|
- shape: 'thing'
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- 'MatMul': { group: 'Machine learning', inputs: [ '[]float32', '[]float32' ], output: '[]float32', style: { color: '#a44', textColor: 'white' } },
|
|
|
|
- 'Activator': { group: 'Machine learning', inputs: [ '[]float32' ], output: '[]float32', style: { color: '#a44', textColor: 'white', shape: 'circle' } },
|
|
|
|
|
|
+ panel: 'palette',
|
|
|
|
|
|
- 'test': { group: 'Text', inputs: [ '[]float32', 'string' ], output: 'string', style: {'color': '#a93'} },
|
|
|
|
- 'reverse': { group: 'Text', inputs: [ 'string' ], output: 'string', style: {'color': '#a93'} },
|
|
|
|
-
|
|
|
|
- 'fetch': { group: 'json', output: 'json', style: {'color': '#99a'} },
|
|
|
|
- 'jsonExtract': { group: 'json', inputs: ['json'], output: 'string', style: {'color': '#99a'} },
|
|
|
|
-
|
|
|
|
- 'string': { group: 'Visualization', inputs: ['string'], style: {'color': '#9a9'} },
|
|
|
|
- 'lineGraph': { group: 'Visualization', inputs: ['[]float32', '[]float32'], style: {'color': '#9a9'} }
|
|
|
|
- }, */
|
|
|
|
-
|
|
|
|
- nodeInspect: false,
|
|
|
|
|
|
+ nodeInspect: null,
|
|
|
|
|
|
funcsSize: '250px',
|
|
funcsSize: '250px',
|
|
funcsActive: true,
|
|
funcsActive: true,
|
|
@@ -255,6 +233,10 @@ export default {
|
|
this.$flowService.on('nodeActivity', (v) => {
|
|
this.$flowService.on('nodeActivity', (v) => {
|
|
this.activity = v.data || {}
|
|
this.activity = v.data || {}
|
|
})
|
|
})
|
|
|
|
+ this.$flowService.on('sessionLog', (v) => {
|
|
|
|
+ // Make this elsewhere
|
|
|
|
+ console.log(v.data)
|
|
|
|
+ })
|
|
|
|
|
|
// Connected
|
|
// Connected
|
|
this.$flowService.connected(() => {
|
|
this.$flowService.connected(() => {
|
|
@@ -269,7 +251,9 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
nodeInspectStart (node) { // node
|
|
nodeInspectStart (node) { // node
|
|
this.nodeInspect = node
|
|
this.nodeInspect = node
|
|
|
|
+ this.panel = 'inspector'
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
|
+ // panel input
|
|
if (!this.$refs.modalInput) { return }
|
|
if (!this.$refs.modalInput) { return }
|
|
let targetInput = this.$refs.modalInput
|
|
let targetInput = this.$refs.modalInput
|
|
if (this.$refs.nodeInspectProp && this.$refs.nodeInspectProp.length > 0) {
|
|
if (this.$refs.nodeInspectProp && this.$refs.nodeInspectProp.length > 0) {
|
|
@@ -348,10 +332,11 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
.split:not(.resizeable) .content:first-child {
|
|
.split:not(.resizeable) .content:first-child {
|
|
- transition: all 0.3s;
|
|
|
|
|
|
+ transition: all var(--transition-speed);
|
|
}
|
|
}
|
|
|
|
|
|
.split.resizeable.horizontal .splitter::after {
|
|
.split.resizeable.horizontal .splitter::after {
|
|
|
|
+ opacity:0.4;
|
|
display:flex;
|
|
display:flex;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
align-items: center;
|
|
align-items: center;
|
|
@@ -363,7 +348,7 @@ export default {
|
|
left:0;
|
|
left:0;
|
|
width:10px;
|
|
width:10px;
|
|
background: rgba(0,0,0,0.4);
|
|
background: rgba(0,0,0,0.4);
|
|
- transition: all 0.3s;
|
|
|
|
|
|
+ transition: var(--transition-speed);
|
|
}
|
|
}
|
|
|
|
|
|
.app-horizontal {
|
|
.app-horizontal {
|
|
@@ -382,13 +367,33 @@ export default {
|
|
height:100%;
|
|
height:100%;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+.flow-panel__container {
|
|
|
|
+ display:flex;
|
|
|
|
+ flex-flow:column;
|
|
|
|
+ flex:1;
|
|
|
|
+ overflow:hidden;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.flow-panel__selector {
|
|
|
|
+ color: var(--normal);
|
|
|
|
+ display:flex;
|
|
|
|
+ align-content: stretch;
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
+ height:50px;
|
|
|
|
+ border-bottom:solid 1px var(--primary);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.flow-panel__selector button{
|
|
|
|
+ flex:1;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/*
|
|
.flow-modal__info {
|
|
.flow-modal__info {
|
|
padding-bottom:20px;
|
|
padding-bottom:20px;
|
|
display:flex;
|
|
display:flex;
|
|
flex-flow:row;
|
|
flex-flow:row;
|
|
}
|
|
}
|
|
|
|
|
|
-/* Columns */
|
|
|
|
.flow-modal__info > * {
|
|
.flow-modal__info > * {
|
|
margin-right:10px;
|
|
margin-right:10px;
|
|
flex:1;
|
|
flex:1;
|
|
@@ -407,7 +412,16 @@ export default {
|
|
font-size:12px;
|
|
font-size:12px;
|
|
}
|
|
}
|
|
|
|
|
|
-.flow-modal__footer {
|
|
|
|
|
|
+.flow-modal__properties-error .property{
|
|
|
|
+ color: red;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.flow-modal__button-run {
|
|
|
|
+ align-self: flex-end;
|
|
|
|
+ width:100%;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+.flow-modal__footer {
|
|
|
|
+}*/
|
|
|
|
+
|
|
</style>
|
|
</style>
|