Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic label bug fixed #959

Merged
merged 132 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
95b7e2a
WIP
alonkeyval Jul 30, 2023
91375ca
Merge branch 'main' of github.com:alonkeyval/odigos into TASK-149-ove…
alonkeyval Jul 30, 2023
3f0700a
WIP
alonkeyval Jul 30, 2023
9e4a5ac
source manage card
alonkeyval Jul 30, 2023
e03bf92
Merge pull request #344 from alonkeyval/TASK-149-overview-container
alonkeyval Jul 30, 2023
0c4b42e
fixed pr comments
alonkeyval Jul 30, 2023
d5fe630
fixed pr comments
alonkeyval Jul 30, 2023
fbaa04c
Merge branch 'main' of github.com:alonkeyval/odigos into TASK-142-dis…
alonkeyval Jul 30, 2023
5504348
sources list display
alonkeyval Jul 30, 2023
ae80c0a
change image url to cloud front
alonkeyval Jul 30, 2023
79f2c53
fixed pr comments
alonkeyval Jul 30, 2023
8267a10
Merge pull request #346 from alonkeyval/TASK-107-overview-sources-card
alonkeyval Jul 30, 2023
5fffc40
add new action menu
alonkeyval Jul 30, 2023
18cd5c4
on add btn click
alonkeyval Jul 30, 2023
3ac58d1
Merge pull request #347 from alonkeyval/TASK-142-display-source-manag…
alonkeyval Jul 30, 2023
ab642bd
WIP
alonkeyval Jul 30, 2023
b6287db
Merge pull request #348 from alonkeyval/TASK-143-add-new-source-btn
alonkeyval Jul 31, 2023
64c31c4
restructe source filter option
alonkeyval Jul 31, 2023
4192289
filters
alonkeyval Jul 31, 2023
1006d44
WIP
alonkeyval Jul 31, 2023
537aa75
new back button
alonkeyval Jul 31, 2023
ab32b46
WIP
alonkeyval Jul 31, 2023
d1c9029
Merge pull request #359 from alonkeyval/TASK-145-handle-new-sources-c…
alonkeyval Jul 31, 2023
042cb10
Merge branch 'main' of github.com:alonkeyval/odigos into overview-sou…
alonkeyval Jul 31, 2023
0d97d64
filter instromented apps
alonkeyval Jul 31, 2023
f38568b
WIP
alonkeyval Jul 31, 2023
d57d024
WIP
alonkeyval Jul 31, 2023
6b1a812
WIP
alonkeyval Jul 31, 2023
d6e9f6f
WIP
alonkeyval Jul 31, 2023
7c655a0
WIP
alonkeyval Jul 31, 2023
fbe5504
WIP
alonkeyval Aug 1, 2023
8a93e8a
fixed pr comments
alonkeyval Aug 1, 2023
d9958c8
fixed pr comments
alonkeyval Aug 1, 2023
89dc8ae
Task 158 back button (#360)
alonkeyval Aug 1, 2023
5d5bf9b
fixed pr comments
alonkeyval Aug 1, 2023
a682311
Merge remote-tracking branch 'upstream/main' into TASK-141-sources-ov…
alonkeyval Aug 1, 2023
15ba9c3
Merge remote-tracking branch 'upstream/TASK-141-sources-overview' int…
alonkeyval Aug 1, 2023
a131614
fixed pr comments
alonkeyval Aug 1, 2023
180fd5d
hide checkboxs
alonkeyval Aug 1, 2023
d4d5211
WIP
alonkeyval Aug 1, 2023
97e1983
Merge branch 'main' of github.com:alonkeyval/odigos into TASK-161-zer…
alonkeyval Aug 1, 2023
61fc2fc
WIP
alonkeyval Aug 1, 2023
49f6983
fixed pr comments
alonkeyval Aug 1, 2023
b1f12e7
remove scrollbars
alonkeyval Aug 1, 2023
f81d618
WIP
alonkeyval Aug 1, 2023
5e68cdd
added quick help
alonkeyval Aug 2, 2023
32bec3d
WIP
alonkeyval Aug 2, 2023
e368ede
Merge remote-tracking branch 'upstream/main' into TASK-141-sources-ov…
alonkeyval Aug 2, 2023
4d7b99d
Merge remote-tracking branch 'upstream/TASK-141-sources-overview' int…
alonkeyval Aug 2, 2023
f91d357
create destinaion flow match url
alonkeyval Aug 2, 2023
f0e6d64
new dest flow
alonkeyval Aug 2, 2023
0a30a23
manage dest flow
alonkeyval Aug 2, 2023
71e52b7
fixed pr comments
alonkeyval Aug 2, 2023
55cae09
Overview sources (#364)
alonkeyval Aug 2, 2023
60a61ee
WIP
alonkeyval Aug 2, 2023
c44837e
WIP
alonkeyval Aug 2, 2023
6253cbc
Merge branch 'main' into TASK-141-sources-overview
alonkeyval Aug 2, 2023
59029f1
Merge branch 'TASK-141-sources-overview' into TASK-156-match-url-to-a…
alonkeyval Aug 2, 2023
924cee2
fixed pr comments
alonkeyval Aug 2, 2023
004ca63
restruce file system
alonkeyval Aug 2, 2023
cf77635
wip
alonkeyval Aug 2, 2023
4616dcf
add pen icon and danger zone
alonkeyval Aug 2, 2023
5d85d7c
manage delete source
alonkeyval Aug 3, 2023
b655e18
WIP
alonkeyval Aug 3, 2023
592be7e
WIP
alonkeyval Aug 3, 2023
ef93cc6
WIP
alonkeyval Aug 3, 2023
9e322bf
WIP
alonkeyval Aug 3, 2023
5ad8d1d
WIP
alonkeyval Aug 3, 2023
26033f7
Task 165 manage source (#368)
alonkeyval Aug 3, 2023
4e02ce6
WIP
alonkeyval Aug 3, 2023
b49275e
delete files
alonkeyval Aug 3, 2023
beb029f
WIP
alonkeyval Aug 3, 2023
4c28472
move page logic to container
alonkeyval Aug 3, 2023
5eb7361
move page logic to container
alonkeyval Aug 3, 2023
5fe763a
WIP
alonkeyval Aug 3, 2023
bfb54d8
Task 168 refactor (#370)
alonkeyval Aug 3, 2023
0662844
Merge branch 'TASK-141-sources-overview' into main
alonkeyval Aug 3, 2023
f15d28d
WIP
alonkeyval Aug 3, 2023
cfbfc2a
Merge remote-tracking branch 'upstream/main'
alonkeyval Aug 6, 2023
c9d170e
edit resource name
alonkeyval Aug 6, 2023
3b8983c
refactor sources|
alonkeyval Aug 6, 2023
0dbc53d
change files names
alonkeyval Aug 7, 2023
bb9c9d5
change files names
alonkeyval Aug 7, 2023
c2e13cd
delete dest fixed
alonkeyval Aug 7, 2023
61183a4
WIP
alonkeyval Aug 7, 2023
c374b8e
refactor services
alonkeyval Aug 7, 2023
55be5ce
Merge branch 'main' of github.com:alonkeyval/odigos
alonkeyval Aug 7, 2023
f1618a5
WIP
alonkeyval Aug 7, 2023
fd269a6
change file names
alonkeyval Aug 7, 2023
8769e67
WIP
alonkeyval Aug 7, 2023
f5220c5
WIP
alonkeyval Aug 7, 2023
7626088
add contact button
alonkeyval Aug 8, 2023
cef20f6
WIP
alonkeyval Aug 9, 2023
52f92f0
fixed setup source and destinations list wrapping
alonkeyval Aug 9, 2023
6095f4d
manage destination list set up
alonkeyval Aug 9, 2023
960f16d
remove unused code
alonkeyval Aug 10, 2023
d62193b
fixed repeat numbers
alonkeyval Aug 10, 2023
ac1b8f9
remove comments
alonkeyval Aug 10, 2023
419d22c
Merge branch 'TASK-217-centerlize-lists' into TASK-218-remove-next-stop
alonkeyval Aug 10, 2023
68ffb8c
Merge branch 'keyval-dev:main' into main
alonkeyval Aug 10, 2023
5bb8c42
Merge branch 'main' of github.com:alonkeyval/odigos into TASK-218-rem…
alonkeyval Aug 10, 2023
883d21b
WIP
alonkeyval Aug 10, 2023
d6f4127
focus on hover
alonkeyval Aug 10, 2023
7c0e27a
types
alonkeyval Aug 10, 2023
d2ae596
fixed focus issue
alonkeyval Aug 10, 2023
0d38d2a
remove scroll bar on firefox
alonkeyval Aug 10, 2023
0a35b8c
fixed focus issue
alonkeyval Aug 10, 2023
fec0da9
WIP
alonkeyval Aug 10, 2023
41f1d1d
WIP
alonkeyval Aug 10, 2023
41d9ec0
WIP
alonkeyval Aug 10, 2023
b91dcfc
Merge branch 'keyval-dev:main' into main
alonkeyval Aug 10, 2023
0581273
Merge branch 'keyval-dev:main' into main
alonkeyval Aug 16, 2023
7f83013
Merge branch 'keyval-dev:main' into main
alonkeyval Aug 16, 2023
764b34e
Merge branch 'keyval-dev:main' into main
alonkeyval Aug 17, 2023
aae797f
Merge branch 'keyval-dev:main' into main
alonkeyval Aug 24, 2023
eccae08
WIP
alonkeyval Aug 24, 2023
cbc404c
chore: merge master
alonkeyval Sep 13, 2023
4133dbd
Merge branch 'main' of github.com:keyval-dev/odigos
alonkeyval Oct 24, 2023
0e20d78
Merge branch 'main' of github.com:keyval-dev/odigos
alonkeyval Oct 25, 2023
0e03acd
Merge branch 'main' of github.com:keyval-dev/odigos
alonkeyval Nov 12, 2023
792fa0e
Merge branch 'main' of github.com:keyval-dev/odigos
alonkeyval Nov 28, 2023
dc00780
Merge branch 'main' of github.com:keyval-dev/odigos
alonkeyval Dec 25, 2023
5ea8080
Merge branch 'main' of github.com:keyval-dev/odigos
alonkeyval Dec 25, 2023
af2c604
Merge branch 'main' of github.com:keyval-dev/odigos
alonkeyval Dec 26, 2023
a5458e1
Merge branch 'main' of github.com:keyval-dev/odigos
alonkeyval Jan 3, 2024
f59a287
Merge branch 'main' of github.com:keyval-dev/odigos
alonkeyval Jan 8, 2024
88b0f44
Merge branch 'main' of github.com:keyval-dev/odigos
alonkeyval Jan 8, 2024
d5b91f9
Merge branch 'main' of github.com:keyval-dev/odigos
alonkeyval Jan 29, 2024
692e8de
Merge branch 'main' of github.com:keyval-dev/odigos
alonkeyval Feb 4, 2024
6d2aa66
Merge branch 'main' of github.com:keyval-dev/odigos
alonkeyval Feb 5, 2024
10bdc06
Merge branch 'main' of github.com:keyval-dev/odigos
alonkeyval Feb 8, 2024
d829133
chore: wip
alonkeyval Feb 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
KeyvalText,
MultiInput,
} from '@/design.system';
import { safeJsonParse } from '@/utils/functions/strings';

export function renderFields(
fields: Field[],
Expand Down Expand Up @@ -55,12 +56,16 @@ export function renderFields(
</FieldWrapper>
);
case INPUT_TYPES.MULTI_INPUT:
const userInputData = dynamicFields[name]
? JSON.parse(dynamicFields[name])
: null;
const userInputData = safeJsonParse<string[] | null>(
dynamicFields[name],
null
);

// Use safeJsonParse to parse field?.initial_value, defaulting to an empty string if not available.
// This assumes that the initial value is supposed to be a string when parsed successfully.
// Adjust the fallback value as necessary to match the expected type
const initialList =
userInputData || JSON.parse(field?.initial_value || '');
userInputData || safeJsonParse<string[]>(field?.initial_value, []);

return (
<FieldWrapper key={name}>
Expand Down
2 changes: 1 addition & 1 deletion frontend/webapp/hooks/sources/useSources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function useSources() {

function upsertSources({ sectionData, onSuccess, onError }) {
const sourceNamesSet = new Set(
sources.map((source: SelectedSources) => source.name)
sources?.map((source: SelectedSources) => source.name)
);
const updatedSectionData: SelectedSources = {};

Expand Down
11 changes: 11 additions & 0 deletions frontend/webapp/utils/functions/strings.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
export function capitalizeFirstLetter(string: string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}

export function safeJsonParse<T>(str: string | undefined, fallback: T): T {
if (!str) return fallback;
try {
const parsed = JSON.parse(str) as T;
return parsed;
} catch (e) {
console.error('Error parsing JSON string:', e);
return fallback;
}
}
Loading