|
@@ -76,32 +76,37 @@
|
|
|
<div slot="header">Node inspector:</div>
|
|
|
<div slot="body" class="flow-modal__body">
|
|
|
<div class="flow-modal__info">
|
|
|
- <svg class="flow-view preview activity flow-detail flow-linking" width="300" height="200" viewBox="0 0 300 200">
|
|
|
+ <svg class="flow-view preview activity flow-detail flow-linking" width="100%" height="100%" viewBox="0 0 300 200">
|
|
|
<flow-panzoom>
|
|
|
<flow-node
|
|
|
style="pointer-events:none"
|
|
|
ref="modalPreviewNode"
|
|
|
- transform="translate(150,100)"
|
|
|
:id="nodeInspect.id"
|
|
|
+ transform="translate(150,100)"
|
|
|
:match="{}"
|
|
|
:label="nodeInspect.label"
|
|
|
:inputs= "registry[nodeInspect.src].inputs"
|
|
|
:output= "registry[nodeInspect.src].output"
|
|
|
:activity= "activity[nodeInspect.id]"
|
|
|
:nodeStyle= "registry[nodeInspect.src].style"
|
|
|
- /></flow-panzoom>
|
|
|
+ />
|
|
|
+ </flow-panzoom>
|
|
|
</svg>
|
|
|
- <div class="flow-modal__sockets-properties">
|
|
|
+ <div class="flow-modal__params" v-if="nodeInspect.prop" @keydown.enter="nodeInspect=null">
|
|
|
+ <h3>Node Parameters</h3>
|
|
|
+ <div class="flow-modal__param" v-for="(v,k) in nodeInspect.prop">
|
|
|
+ <label>{{ k }}</label>
|
|
|
+ <input ref="nodeInspectProp" type="text" v-model="nodeInspect.prop[k]">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="flow-modal__properties">
|
|
|
+ <h3>Node Properties</h3>
|
|
|
<label>Description</label>
|
|
|
<div class="property">Bogus description</div>
|
|
|
<label>Help</label>
|
|
|
<div class="property">Connect to input a thing and goes to output another thing</div>
|
|
|
- <div class="flow-modal__params" v-if="nodeInspect.prop" @keydown.enter="nodeInspect=null">
|
|
|
- <div class="flow-modal__param" v-for="(v,k) in nodeInspect.prop">
|
|
|
- <label>{{ k }}</label>
|
|
|
- <input type="text" v-model="nodeInspect.prop[k]">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <label>Result</label>
|
|
|
+ <div class="property">{{ activity && activity[nodeInspect.id] && activity[nodeInspect.id].data }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<label>label</label>
|
|
@@ -113,8 +118,8 @@
|
|
|
@keydown.enter="nodeInspect=null"
|
|
|
>
|
|
|
</div>
|
|
|
- <div slot="footer">
|
|
|
- <button class="primary-invert" @click="nodeProcess(nodeInspect);nodeInspect=null">Run</button>
|
|
|
+ <div class="flow-modal__footer" slot="footer">
|
|
|
+ <button class="secondary-inverse" @click="nodeProcess(nodeInspect);nodeInspect = null">Run</button>
|
|
|
<button @click="nodeInspect=false">OK</button>
|
|
|
</div>
|
|
|
</hx-modal>
|
|
@@ -222,8 +227,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.$flowService.on('registry', (v) => {
|
|
|
- console.log('Registry received:', JSON.stringify(v))
|
|
|
-
|
|
|
let res = {}
|
|
|
for (let k of Object.keys(v.data)) {
|
|
|
const e = v.data[k]
|
|
@@ -240,7 +243,6 @@ export default {
|
|
|
this.registry = Object.assign({}, defRegistry, res)
|
|
|
})
|
|
|
this.$flowService.on('nodeActivity', (v) => {
|
|
|
- console.log('Received activity')
|
|
|
this.activity = v.data || {}
|
|
|
})
|
|
|
|
|
@@ -258,9 +260,14 @@ export default {
|
|
|
nodeInspectStart (node) { // node
|
|
|
this.nodeInspect = node
|
|
|
this.$nextTick(() => {
|
|
|
- if (!this.$refs.modalInput) return
|
|
|
- this.$refs.modalInput.setSelectionRange(0, this.$refs.modalInput.value.length)
|
|
|
- this.$refs.modalInput.focus()
|
|
|
+ if (!this.$refs.modalInput) { return }
|
|
|
+ let targetInput = this.$refs.modalInput
|
|
|
+ if (this.$refs.nodeInspectProp.length > 0) {
|
|
|
+ targetInput = this.$refs.nodeInspectProp[0]
|
|
|
+ }
|
|
|
+
|
|
|
+ targetInput.setSelectionRange(0, this.$refs.modalInput.value.length)
|
|
|
+ targetInput.focus()
|
|
|
})
|
|
|
},
|
|
|
nodeProcess (node) {
|
|
@@ -371,8 +378,10 @@ export default {
|
|
|
flex-flow:row;
|
|
|
}
|
|
|
|
|
|
+/* Columns */
|
|
|
.flow-modal__info > * {
|
|
|
margin-right:10px;
|
|
|
+ flex:1;
|
|
|
}
|
|
|
|
|
|
.flow-modal__body label {
|
|
@@ -388,4 +397,9 @@ export default {
|
|
|
font-size:12px;
|
|
|
}
|
|
|
|
|
|
+.flow-modal__footer {
|
|
|
+ display:flex;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+
|
|
|
</style>
|