Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 3e7c955

Browse files
committed
Fix Scriptable-Transform regression and make its hard-coded metamodel data more robust.
1 parent f9ee2fa commit 3e7c955

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ui/app/scripts/stream/services/metamodel.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,14 @@ define(function (require) {
183183
} else if (p.sourceType === 'org.springframework.cloud.stream.app.scriptable.transform.processor.ScriptableTransformProcessorProperties') {
184184
if (p.name === 'script') {
185185
p.contentType = 'Plain Text';
186-
p.contentTypeProperty = 'language';
186+
// Add proeprty prefix if any is found.
187+
var prefix = '';
188+
var idx = p.id.lastIndexOf('.');
189+
if (idx >= 0) {
190+
prefix = p.id.substring(0, idx + 1);
191+
}
192+
// Prefix at the moment should be 'scriptable-transform.'
193+
p.contentTypeProperty = prefix + 'language';
187194
} else if (p.name === 'language') {
188195
p.options = ['groovy', 'javascript', 'ruby', 'python'];
189196
}

0 commit comments

Comments
 (0)