mushy 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/mushy/builder/api.rb +8 -8
- data/lib/mushy/builder/index.rb +81 -76
- data/lib/mushy/fluxs/browser.rb +1 -0
- data/mushy.gemspec +3 -1
- metadata +29 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8288db70f609116945bca0ee58a47ff6e9e0231e1c9ae1a80358753f206d628c
|
4
|
+
data.tar.gz: fbc52d93b74c3f47c60dd9db7a28f0c1eca705b9306027fb28e5f3d10dd82202
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f55e3d8fed0ec636afca90380fd029753c295570a21c13ac56428c92b424e1a07a43fcf7fb47048b26d3586715fe343db6a3242bb3c86683be285dc23c21fa8
|
7
|
+
data.tar.gz: eccde58b22427b95ac22cbdd47bbedbf2eeaa2b9d8446057d2f3a027676858b3838859ae8a47bb1506fc9c6e44d240906edcdb2209a4531b6afae963da7e08f1
|
data/lib/mushy/builder/api.rb
CHANGED
@@ -40,14 +40,14 @@ module Mushy
|
|
40
40
|
{
|
41
41
|
fluxs: Mushy::Flux.all.select { |x| x.respond_to? :details }.map do |flux|
|
42
42
|
details = flux.details
|
43
|
-
details[:config][:incoming_split] = { type: 'text', description: 'Split an incoming event into multiple events by this key, an each event will be processed independently.', default: '' }
|
44
|
-
details[:config][:outgoing_split] = { type: 'text', description: 'Split an outgoing event into multiple events by this key.', default: '' }
|
45
|
-
details[:config][:merge] = { type: 'text', description: 'A comma-delimited list of fields from the event to carry through. Use * to merge all fields.', default: '' }
|
46
|
-
details[:config][:group] = { type: 'text', description: 'Group events by a field, which is stored in a key. The format is group_by|group_key.', default: '' }
|
47
|
-
details[:config][:limit] = { type: 'integer', description: 'Limit the number of events to this number.', default: '' }
|
48
|
-
details[:config][:join] = { type: 'text', description: 'Join all of the events from this flux into one event, under this name.', default: '' }
|
49
|
-
details[:config][:sort] = { type: 'text', description: 'Sort by this key.', default: '' }
|
50
|
-
details[:config][:model] = { type: 'keyvalue', description: 'Reshape the outgoing events.', value: {}, default: {} }
|
43
|
+
details[:config][:incoming_split] = { type: 'text', shrink: true, description: 'Split an incoming event into multiple events by this key, an each event will be processed independently.', default: '' }
|
44
|
+
details[:config][:outgoing_split] = { type: 'text', shrink: true, description: 'Split an outgoing event into multiple events by this key.', default: '' }
|
45
|
+
details[:config][:merge] = { type: 'text', shrink: true, description: 'A comma-delimited list of fields from the event to carry through. Use * to merge all fields.', default: '' }
|
46
|
+
details[:config][:group] = { type: 'text', shrink: true, description: 'Group events by a field, which is stored in a key. The format is group_by|group_key.', default: '' }
|
47
|
+
details[:config][:limit] = { type: 'integer', shrink: true, description: 'Limit the number of events to this number.', default: '' }
|
48
|
+
details[:config][:join] = { type: 'text', shrink: true, description: 'Join all of the events from this flux into one event, under this name.', default: '' }
|
49
|
+
details[:config][:sort] = { type: 'text', shrink: true, description: 'Sort by this key.', default: '' }
|
50
|
+
details[:config][:model] = { type: 'keyvalue', shrink: true, description: 'Reshape the outgoing events.', value: {}, default: {} }
|
51
51
|
|
52
52
|
details[:config]
|
53
53
|
.select { |_, v| v[:type] == 'keyvalue' }
|
data/lib/mushy/builder/index.rb
CHANGED
@@ -12,15 +12,21 @@ module Mushy
|
|
12
12
|
</head>
|
13
13
|
<body>
|
14
14
|
<div id="app">
|
15
|
-
<table>
|
15
|
+
<table v-if="setup.showFlux == false">
|
16
|
+
<tr>
|
17
|
+
<th>Name</th>
|
18
|
+
<th>Parent</th>
|
19
|
+
<th>Actions</th>
|
20
|
+
</tr>
|
16
21
|
<tr v-for="flux in flow.fluxs">
|
17
22
|
<td>{{flux.name}}</td>
|
18
|
-
<td>{{flux.
|
19
|
-
<td><
|
23
|
+
<td>{{flux_name_for(flux.parent, flow.fluxs)}}</td>
|
24
|
+
<td><button v-on:click.prevent.stop="edit({ flux: flux, setup: setup, configs: configs })">Edit</button></td>
|
20
25
|
</tr>
|
21
26
|
</table>
|
22
|
-
<
|
23
|
-
<
|
27
|
+
<button v-if="setup.showFlux == false" v-on:click.prevent.stop="startNew({ setup: setup, configs: configs })">Start a New Flux</button>
|
28
|
+
<button v-if="setup.showFlux == false" v-on:click.prevent.stop="saveFlow({ setup: setup, flow: flow })">Save This Flow</button>
|
29
|
+
<button v-if="setup.showFlux" v-on:click.prevent.stop="setup.showFlux = false">< Go Back To List</button>
|
24
30
|
<div v-if="setup.showFlux">
|
25
31
|
<mip-heavy :data="setup"></mip-heavy>
|
26
32
|
<mip-heavy v-for="(data, id) in configs" v-show="setup.flux.value === id" :data="data"></mip-heavy>
|
@@ -48,28 +54,32 @@ module Mushy
|
|
48
54
|
|
49
55
|
var components = {
|
50
56
|
label: {
|
51
|
-
props: ['label', 'description'],
|
52
|
-
template: '<label :for="id" v-if="label != \\'\\'">{{label || ' + fancyName('id') + '}} <i v-show="description">({{description}})</i></label>'
|
57
|
+
props: ['label', 'description', 'hide_description'],
|
58
|
+
template: '<label :for="id" v-if="label != \\'\\'">{{label || ' + fancyName('id') + '}} <i v-show="description && !hide_description">({{description}})</i></label>'
|
53
59
|
},
|
54
60
|
text: {
|
55
|
-
props: ['label', 'placeholder', 'disabled', 'readonly', 'value', 'description'],
|
56
|
-
template: '<div><mip-label :id="id" :label="label" :description="description"></mip-label><input type="text" :name="id" :placeholder="placeholder" v-bind:value="value" v-on:input="$emit(\\'update:value\\', $event.target.value);" :disabled="disabled == \\'true\\'" :readonly="readonly == \\'true\\'"></div>'
|
61
|
+
props: ['label', 'placeholder', 'disabled', 'readonly', 'value', 'description', 'shrink'],
|
62
|
+
template: '<div><mip-label :id="id" :label="label" :description="description" :hide_description="shrink"></mip-label> <a href="#" v-on:click.prevent.stop="shrink=false" v-show="shrink && !value">[^]</a><input type="text" :name="id" v-if="value || !shrink" :placeholder="placeholder" v-bind:value="value" v-on:input="$emit(\\'update:value\\', $event.target.value);" :disabled="disabled == \\'true\\'" :readonly="readonly == \\'true\\'"></div>'
|
63
|
+
},
|
64
|
+
hide: {
|
65
|
+
props: ['label', 'description'],
|
66
|
+
template: '<mip-label :id="id" :label="label" :description="description" v-if="false"></mip-label>'
|
57
67
|
},
|
58
68
|
integer: {
|
59
|
-
props: ['label', 'placeholder', 'disabled', 'readonly', 'value', 'description'],
|
60
|
-
template: '<div><mip-label :id="id" :label="label" :description="description"></mip-label><input type="text" :name="id" :placeholder="placeholder" v-bind:value="value" v-on:input="$emit(\\'update:value\\', $event.target.value);" :disabled="disabled == \\'true\\'" :readonly="readonly == \\'true\\'"></div>'
|
69
|
+
props: ['label', 'placeholder', 'disabled', 'readonly', 'value', 'description', 'shrink'],
|
70
|
+
template: '<div><mip-label :id="id" :label="label" :description="description" :hide_description="shrink"></mip-label> <a href="#" v-on:click.prevent.stop="shrink=false" v-show="shrink && !value">[^]</a><input type="text" :name="id" v-if="value || !shrink" :placeholder="placeholder" v-bind:value="value" v-on:input="$emit(\\'update:value\\', $event.target.value);" :disabled="disabled == \\'true\\'" :readonly="readonly == \\'true\\'"></div>'
|
61
71
|
},
|
62
72
|
email: {
|
63
|
-
props: ['label', 'placeholder', 'disabled', 'readonly', 'value', 'description'],
|
64
|
-
template: '<div><mip-label :id="id" :label="label" :description="description"></mip-label><input type="email" :name="id" :placeholder="placeholder" v-bind:value="value" v-on:input="$emit(\\'update:value\\', $event.target.value)" :disabled="disabled == \\'true\\'" :readonly="readonly == \\'true\\'"></div>'
|
73
|
+
props: ['label', 'placeholder', 'disabled', 'readonly', 'value', 'description', 'shrink'],
|
74
|
+
template: '<div><mip-label :id="id" :label="label" :description="description" :hide_description="shrink"></mip-label> <a href="#" v-on:click.prevent.stop="shrink=false" v-show="shrink && !value">[^]</a><input type="email" :name="id" v-if="value || !shrink" :placeholder="placeholder" v-bind:value="value" v-on:input="$emit(\\'update:value\\', $event.target.value)" :disabled="disabled == \\'true\\'" :readonly="readonly == \\'true\\'"></div>'
|
65
75
|
},
|
66
76
|
textarea: {
|
67
|
-
props: ['label', 'placeholder', 'disabled', 'readonly', 'value', 'description'],
|
68
|
-
template: '<div><mip-label :id="id" :label="label" :description="description"></mip-label><textarea :name="id" :placeholder="placeholder" v-bind:value="value" v-on:input="$emit(\\'update:value\\', $event.target.value)" :disabled="disabled == \\'true\\'" :readonly="readonly == \\'true\\'"></textarea></div>'
|
77
|
+
props: ['label', 'placeholder', 'disabled', 'readonly', 'value', 'description', 'shrink'],
|
78
|
+
template: '<div><mip-label :id="id" :label="label" :description="description" :hide_description="shrink"></mip-label> <a href="#" v-on:click.prevent.stop="shrink=false" v-show="shrink && !value">[^]</a><textarea :name="id" v-if="value || !shrink" :placeholder="placeholder" v-bind:value="value" v-on:input="$emit(\\'update:value\\', $event.target.value)" :disabled="disabled == \\'true\\'" :readonly="readonly == \\'true\\'"></textarea></div>'
|
69
79
|
},
|
70
80
|
json: {
|
71
|
-
props: ['label', 'placeholder', 'disabled', 'readonly', 'value', 'description'],
|
72
|
-
template: '<div><mip-label :id="id" :label="label" :description="description"></mip-label
|
81
|
+
props: ['label', 'placeholder', 'disabled', 'readonly', 'value', 'description', 'shrink'],
|
82
|
+
template: '<div><mip-label :id="id" :label="label" :description="description" :hide_description="shrink"></mip-label> <a href="#" v-on:click.prevent.stop="shrink=false" v-show="shrink && !value">[^]</a><textarea :name="id" v-if="value || !shrink" :placeholder="placeholder" v-bind:value="value" v-on:input="$emit(\\'update:value\\', $event.target.value)" :disabled="disabled == \\'true\\'" :readonly="readonly == \\'true\\'"></textarea></div>'
|
73
83
|
},
|
74
84
|
jsonview: {
|
75
85
|
data: function() {
|
@@ -83,20 +93,20 @@ module Mushy
|
|
83
93
|
template: '<div><mip-label :id="id" :label="label" :description="description"></mip-label> <a href="#" v-on:click.prevent.stop="view=toggle(view)">{{(view == \\'beautiful\\' ? \\'>\\' : \\'^\\')}}</a><a href="#" v-on:click.prevent.stop="copy(view, value)">copy</a><pre><code>{{show(view, value)}}</code></pre></div>'
|
84
94
|
},
|
85
95
|
radio: {
|
86
|
-
props: ['label', 'value', 'options', 'description'],
|
87
|
-
template: '<div><mip-label :id="id" :label="label" :description="description"></mip-label><div v-for="option in options"><input type="radio" :name="id" v-bind:value="option" v-on:input="$emit(\\'update:value\\', $event.target.value)" :checked="value == option"> <label for="option">{{option}}</label></div></div>'
|
96
|
+
props: ['label', 'value', 'options', 'description', 'shrink'],
|
97
|
+
template: '<div><mip-label :id="id" :label="label" :description="description" :hide_description="shrink"></mip-label> <a href="#" v-on:click.prevent.stop="shrink=false" v-show="shrink && !value">[^]</a><div v-for="option in options"><input type="radio" :name="id" v-bind:value="option" v-if="value || !shrink" v-on:input="$emit(\\'update:value\\', $event.target.value)" :checked="value == option"> <label for="option">{{option}}</label></div></div>'
|
88
98
|
},
|
89
99
|
select: {
|
90
|
-
props: ['label', 'value', 'options', 'description'],
|
91
|
-
template: '<div><mip-label :id="id" :label="label" :description="description"></mip-label><select :name="id" v-on:input="$emit(\\'update:value\\', $event.target.value)"><option v-for="option in options" v-bind:value="option" :selected="value == option">{{option}}</option></select></div>'
|
100
|
+
props: ['label', 'value', 'options', 'description', 'shrink'],
|
101
|
+
template: '<div><mip-label :id="id" :label="label" :description="description" :hide_description="shrink"></mip-label> <a href="#" v-on:click.prevent.stop="shrink=false" v-show="shrink && !value">[^]</a><select :name="id" v-if="value || !shrink" v-on:input="$emit(\\'update:value\\', $event.target.value)"><option v-for="option in options" v-bind:value="option" :selected="value == option">{{option}}</option></select></div>'
|
92
102
|
},
|
93
103
|
selectrecord: {
|
94
|
-
props: ['label', 'value', 'options', 'description'],
|
95
|
-
template: '<div><mip-label :id="id" :label="label" :description="description"></mip-label><select :name="id" v-on:input="$emit(\\'update:value\\', $event.target.value)"><option v-for="option in options" v-bind:value="option.id" :selected="value == option.id">{{option.name}}</option></select></div>'
|
104
|
+
props: ['label', 'value', 'options', 'description', 'shrink'],
|
105
|
+
template: '<div><mip-label :id="id" :label="label" :description="description" :hide_description="shrink"></mip-label> <a href="#" v-on:click.prevent.stop="shrink=false" v-show="shrink && !value">[^]</a><select :name="id" v-if="value || !shrink" v-on:input="$emit(\\'update:value\\', $event.target.value)"><option v-for="option in options" v-bind:value="option.id" :selected="value == option.id">{{option.name}}</option></select></div>'
|
96
106
|
},
|
97
107
|
boolean: {
|
98
|
-
props: ['label', 'value', 'options', 'description'],
|
99
|
-
template: '<div><mip-label :id="id" :label="label" :description="description"></mip-label><select :name="id" v-on:input="$emit(\\'update:value\\', $event.target.value)"><option v-for="option in [true, false]" v-bind:value="option" :selected="value == option">{{option}}</option></select></div>'
|
108
|
+
props: ['label', 'value', 'options', 'description', 'shrink'],
|
109
|
+
template: '<div><mip-label :id="id" :label="label" :description="description" :hide_description="shrink"></mip-label> <a href="#" v-on:click.prevent.stop="shrink=false" v-show="shrink && !value">[^]</a><select :name="id" v-if="(value != undefined && value != null && value != \\'\\') || !shrink" v-on:input="$emit(\\'update:value\\', $event.target.value)"><option v-for="option in [true, false]" v-bind:value="option" :selected="value == option">{{option}}</option></select></div>'
|
100
110
|
},
|
101
111
|
table: {
|
102
112
|
props: ['value', 'description'],
|
@@ -117,12 +127,13 @@ module Mushy
|
|
117
127
|
}
|
118
128
|
};
|
119
129
|
},
|
120
|
-
props: ['value', 'editors', 'label', 'description'],
|
121
|
-
template: '<div><mip-label :id="id" :label="label" :description="description"></mip-label><table><tr><th v-for="(d, i) in value[0]">{{' + fancyName('i') + '}}</th></tr><tr v-for="(v, z) in value"><td v-for="(d, i) in v">{{d}}</td><td><a href="#" v-on:click.prevent.stop="removeRecord(v, value, z)">[x]</a></td></tr><tr><td v-for="editor in editors"><mip-thing :data="editor.field" :id="editor.id"></mip-thing></td><td><a href="#" v-on:click.prevent.stop="addRecord(editors, value)">[Add]</a></td></tr></table></div>'
|
130
|
+
props: ['value', 'editors', 'label', 'description', 'shrink'],
|
131
|
+
template: '<div><mip-label :id="id" :label="label" :description="description" :hide_description="shrink"></mip-label> <a href="#" v-on:click.prevent.stop="shrink=false" v-show="shrink && value.length == 0">[^]</a><table v-if="value.length > 0 || !shrink"><tr><th v-for="(d, i) in value[0]">{{' + fancyName('i') + '}}</th></tr><tr v-for="(v, z) in value"><td v-for="(d, i) in v">{{d}}</td><td><a href="#" v-on:click.prevent.stop="removeRecord(v, value, z)">[x]</a></td></tr><tr><td v-for="editor in editors"><mip-thing :data="editor.field" :id="editor.id"></mip-thing></td><td><a href="#" v-on:click.prevent.stop="addRecord(editors, value)">[Add]</a></td></tr></table></div>'
|
122
132
|
},
|
123
133
|
keyvalue: {
|
124
134
|
data: function() {
|
125
135
|
return {
|
136
|
+
actionText: function(value, others) { found = false; for(var i in others){ if (i == value) found = true; } return found ? 'Replace' : 'Add'; },
|
126
137
|
removeRecord: function(data, key) { Vue.delete(data, key) },
|
127
138
|
addRecord: function(editors, data) {
|
128
139
|
Vue.set(data, editors[0].field.value, editors[1].field.value)
|
@@ -131,12 +142,12 @@ module Mushy
|
|
131
142
|
}
|
132
143
|
};
|
133
144
|
},
|
134
|
-
props: ['value', 'label', 'editors', 'description'],
|
135
|
-
template: '<div><mip-label :id="id" :label="label" :description="description"></mip-label><table><tr v-for="(v, k) in value"><td>{{k}}</td><td>{{v}}</td><td><
|
145
|
+
props: ['value', 'label', 'editors', 'description', 'shrink'],
|
146
|
+
template: '<div><mip-label :id="id" :label="label" :description="description" :hide_description="shrink"></mip-label> <a href="#" v-on:click.prevent.stop="shrink=false" v-show="shrink">[^]</a><table v-if="JSON.stringify(value) != \\'{}\\' || !shrink"><tr v-for="(v, k) in value"><td>{{k}}</td><td>{{v}}</td><td><button v-on:click.prevent.stop="removeRecord(value, k)">Remove {{k}}</button></td></tr><tr><td v-for="editor in editors"><mip-thing :data="editor.field" :id="editor.id"></mip-thing></td><td><button v-on:click.prevent.stop="addRecord(editors, value)" v-show="editors[0].field.value">{{actionText(editors[0].field.value, value)}} {{editors[0].field.value}}</button></td></tr></table></div>'
|
136
147
|
},
|
137
148
|
button: {
|
138
|
-
props: ['click', 'description'],
|
139
|
-
template: '<button v-on:click.prevent.stop="click(pull(this))">{{id}}</button>'
|
149
|
+
props: ['click', 'description', 'name'],
|
150
|
+
template: '<button v-on:click.prevent.stop="click(pull(this))">{{name || id}}</button>'
|
140
151
|
}
|
141
152
|
};
|
142
153
|
|
@@ -188,32 +199,6 @@ module Mushy
|
|
188
199
|
template: '<div><mip-thing v-for="(d, id) in data" :data="d" :id="id"></mip-thing></div>',
|
189
200
|
});
|
190
201
|
|
191
|
-
var sample = {
|
192
|
-
email: { type: 'email', value: 'darren@cauthon.com' },
|
193
|
-
first_name: { type: 'text', value: 'Darren' },
|
194
|
-
description: { type: 'textarea', value: 'more data' },
|
195
|
-
size: { type: 'select', value: 'medium', options: ['small', 'medium', 'large']},
|
196
|
-
heynow: { type: 'keyvalue',
|
197
|
-
value: {
|
198
|
-
first_name: 'John',
|
199
|
-
last_name: 'Doe',
|
200
|
-
},
|
201
|
-
editors: [
|
202
|
-
{ id: 'new_key', target: 'key', field: { type: 'text', value: '', default: '' } },
|
203
|
-
{ id: 'new_value', target: 'value', field: { type: 'text', value: '', default: '' } }
|
204
|
-
] },
|
205
|
-
past: { type: 'editgrid',
|
206
|
-
value: [
|
207
|
-
{ name: 'Godzilla', quantity: 1 },
|
208
|
-
{ name: 'Mothra', quantity: 2 },
|
209
|
-
],
|
210
|
-
editors: [
|
211
|
-
{ id: 'new_name', target: 'name', field: { type: 'text', value: '', default: '' } },
|
212
|
-
{ id: 'new_quantity', target: 'quantity', field: { type: 'select', value: '1', options: [1, 2, 3], default: 1 } }
|
213
|
-
] },
|
214
|
-
super_action: { type: 'button', click: function(x) { console.log(x) } },
|
215
|
-
};
|
216
|
-
|
217
202
|
var app = null;
|
218
203
|
|
219
204
|
axios.get('/fluxs')
|
@@ -237,8 +222,7 @@ module Mushy
|
|
237
222
|
|
238
223
|
var setup = {
|
239
224
|
showFlux: false,
|
240
|
-
|
241
|
-
id: { type: 'text', value: '' },
|
225
|
+
id: { type: 'hide', value: '' },
|
242
226
|
name: { type: 'text', value: '' },
|
243
227
|
flux: { type: 'select', value: fluxdata.fluxs[0].name, options: options},
|
244
228
|
parent: { type: 'selectrecord', value: '', options: flowdata.fluxs },
|
@@ -246,18 +230,7 @@ module Mushy
|
|
246
230
|
|
247
231
|
for (var key in configs)
|
248
232
|
{
|
249
|
-
configs[key].
|
250
|
-
app.results = [];
|
251
|
-
Vue.set(app.results, 'loading', true);
|
252
|
-
axios.post('/run', { config: c, setup: thingToData(app.setup) })
|
253
|
-
.then(function(r){
|
254
|
-
Vue.set(app.results, 'loading', false);
|
255
|
-
for (var key in r.data.result)
|
256
|
-
app.results.push({darren: { type:'jsonview', value: r.data.result[key], view: 'thin' }});
|
257
|
-
});
|
258
|
-
} };
|
259
|
-
|
260
|
-
configs[key].save = { type: 'button', click: function(config) {
|
233
|
+
configs[key].save = { type: 'button', name: 'Save This Flux', click: function(config) {
|
261
234
|
var setup = thingToData(app.setup);
|
262
235
|
var flux = {
|
263
236
|
id: setup.id,
|
@@ -276,12 +249,39 @@ module Mushy
|
|
276
249
|
app.flow.fluxs[index] = flux;
|
277
250
|
|
278
251
|
app.setup.id.value = '';
|
252
|
+
|
253
|
+
Vue.set(app.setup, 'showFlux', false);
|
279
254
|
}
|
280
255
|
};
|
256
|
+
|
257
|
+
configs[key].test_event = { type: 'json', value: '{}', default: '{}' };
|
258
|
+
|
259
|
+
configs[key].run_test = { type: 'button', name: 'Test Run This Flux', click: function(c) {
|
260
|
+
app.results = [];
|
261
|
+
Vue.set(app.results, 'loading', true);
|
262
|
+
var the_setup = thingToData(app.setup);
|
263
|
+
the_setup.event = c.test_event;
|
264
|
+
axios.post('/run', { config: c, setup: the_setup })
|
265
|
+
.then(function(r){
|
266
|
+
Vue.set(app.results, 'loading', false);
|
267
|
+
var index = 1;
|
268
|
+
for (var key in r.data.result)
|
269
|
+
{
|
270
|
+
var result = {};
|
271
|
+
result['event_' + index] = { type: 'jsonview', value: r.data.result[key], view: 'thin' };
|
272
|
+
app.results.push(result);
|
273
|
+
index += 1;
|
274
|
+
}
|
275
|
+
});
|
276
|
+
} };
|
281
277
|
}
|
282
278
|
|
283
|
-
var loadThisFlux = function(
|
279
|
+
var loadThisFlux = function(args)
|
284
280
|
{
|
281
|
+
var flux = args.flux;
|
282
|
+
var setup = args.setup;
|
283
|
+
var config = args.config;
|
284
|
+
|
285
285
|
Vue.set(setup.id, 'value', flux.id);
|
286
286
|
Vue.set(setup.name, 'value', flux.name);
|
287
287
|
Vue.set(setup.flux, 'value', flux.flux);
|
@@ -300,6 +300,7 @@ module Mushy
|
|
300
300
|
setup.parent.options = options;
|
301
301
|
|
302
302
|
Vue.set(setup, 'showFlux', true);
|
303
|
+
app.results = [];
|
303
304
|
};
|
304
305
|
|
305
306
|
function uuidv4() {
|
@@ -315,15 +316,15 @@ module Mushy
|
|
315
316
|
startNew: function(x) {
|
316
317
|
flux = {
|
317
318
|
id: uuidv4(),
|
318
|
-
name: '
|
319
|
+
name: '',
|
319
320
|
config: {}
|
320
321
|
};
|
321
|
-
loadThisFlux(flux, x.setup, x.configs);
|
322
|
+
loadThisFlux({ flux: flux, setup: x.setup, configs: x.configs });
|
322
323
|
},
|
323
324
|
edit: function(x) {
|
324
325
|
var flux = x.flux;
|
325
326
|
|
326
|
-
loadThisFlux(x.flux, x.setup, x.configs);
|
327
|
+
loadThisFlux({ flux: x.flux, setup: x.setup, configs: x.configs });
|
327
328
|
},
|
328
329
|
saveFlow: function(input)
|
329
330
|
{
|
@@ -331,11 +332,15 @@ module Mushy
|
|
331
332
|
var flow = input.flow;
|
332
333
|
axios.post('/save', flow)
|
333
334
|
.then(function(result){
|
334
|
-
Vue.set(setup, '
|
335
|
+
Vue.set(setup, 'showFlux', false);
|
335
336
|
});
|
336
337
|
},
|
337
338
|
configs: configs,
|
338
339
|
setup: setup,
|
340
|
+
flux_name_for: function(id, fluxes) {
|
341
|
+
var flux = fluxes.filter(function(x){ return x.id == id })[0];
|
342
|
+
return flux != undefined ? flux.name : '';
|
343
|
+
},
|
339
344
|
results: [],
|
340
345
|
}
|
341
346
|
});
|
data/lib/mushy/fluxs/browser.rb
CHANGED
@@ -27,6 +27,7 @@ module Mushy
|
|
27
27
|
cookies: {
|
28
28
|
description: 'Cookies for the web request. These can be received from a previous browser event with {{cookies}}, or can be typed manually.',
|
29
29
|
type: 'editgrid',
|
30
|
+
shrink: true,
|
30
31
|
value: [],
|
31
32
|
editors: [
|
32
33
|
{ id: 'name', target: 'name', field: { type: 'text', value: '', default: '' } },
|
data/mushy.gemspec
CHANGED
@@ -4,7 +4,7 @@ require 'mushy/version'
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'mushy'
|
7
|
-
s.version = '0.0.
|
7
|
+
s.version = '0.0.7'
|
8
8
|
s.date = '2020-11-23'
|
9
9
|
s.summary = 'Process streams of work using common modules.'
|
10
10
|
s.description = 'This tool assists in the creation and processing of workflows.'
|
@@ -17,6 +17,8 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.license = 'MIT'
|
18
18
|
|
19
19
|
s.add_development_dependency 'minitest'
|
20
|
+
s.add_runtime_dependency 'sinatra'
|
21
|
+
s.add_runtime_dependency 'symbolized'
|
20
22
|
s.add_runtime_dependency 'thor'
|
21
23
|
s.add_runtime_dependency 'liquid'
|
22
24
|
s.add_runtime_dependency 'ferrum'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mushy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darren Cauthon
|
@@ -24,6 +24,34 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: sinatra
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: symbolized
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: thor
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|