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

Commit 6a88707

Browse files
oodamienilayaperumalg
authored andcommitted
Stream builder: fix parser string to property
Resolves #773
1 parent 40424d6 commit 6a88707

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

ui/src/app/streams/stream-deploy/builder/builder.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export class StreamDeployBuilderComponent implements OnInit, OnDestroy {
219219
array.push(group);
220220
};
221221
this.properties.forEach((line: string) => {
222-
const arr = line.split('=');
222+
const arr = line.split(/=(.*)/);
223223
const key = arr[0] as string;
224224
const value = arr[1] as string;
225225
const appKey = key.split('.')[1];
@@ -261,7 +261,7 @@ export class StreamDeployBuilderComponent implements OnInit, OnDestroy {
261261
const deployerKeys: Array<string> = builder.streamDeployConfig.deployers.map(deployer => deployer.name);
262262
builder.errors.global = [];
263263
this.properties.forEach((line: string) => {
264-
const arr = line.split('=');
264+
const arr = line.split(/=(.*)/);
265265
const key = arr[0] as string;
266266
const value = arr[1] as string;
267267
const appKey = key.split('.')[1];

ui/src/app/streams/stream-deploy/free-text/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
4242
font-size: 15px;
4343
padding: 10px 10px 0;
44+
width: 100%
4445
}
4546
}
4647

ui/src/app/streams/stream-deploy/stream-deploy.validator.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ export class StreamDeployValidator {
9696
.map((a) => a.trim())
9797
.filter((a) => a.toString())
9898
.map((a: String) => {
99-
tmp = a.split('=');
100-
if (tmp.length !== 2) {
99+
tmp = a.split(/=(.*)/);
100+
if (tmp.length !== 3) {
101101
throw new Error();
102102
}
103103
if (!StreamDeployValidator.propertyPlatformRegex.test(tmp[0])) {
@@ -123,8 +123,8 @@ export class StreamDeployValidator {
123123
if (value === '') {
124124
return true;
125125
}
126-
const tmp = value.split('=');
127-
if (tmp.length !== 2) {
126+
const tmp = value.split(/=(.*)/);
127+
if (tmp.length !== 3) {
128128
return 'Not valid';
129129
}
130130
if (!StreamDeployValidator.propertyPlatformRegex.test(tmp[0])) {
@@ -167,8 +167,8 @@ export class StreamDeployValidator {
167167
if (properties) {
168168
for (const prop of properties) {
169169
if (prop && prop.length > 0 && !prop.startsWith('#')) {
170-
const keyValue = prop.split('=');
171-
if (keyValue.length < 2) {
170+
const keyValue = prop.split(/=(.*)/);
171+
if (keyValue.length < 3) {
172172
return {
173173
validateDeploymentProperties: {
174174
reason: `Invalid deployment property "${prop}" must contain a single "=".`

0 commit comments

Comments
 (0)