-
Notifications
You must be signed in to change notification settings - Fork 901
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Shey Gao <[email protected]>
- Loading branch information
Shey Gao
committed
Jul 26, 2024
1 parent
e74ed2c
commit 044f558
Showing
19 changed files
with
339 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -228,4 +228,4 @@ export const DashboardListing = () => { | |
toastNotifications={notifications.toasts} | ||
/> | ||
); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -274,3 +274,4 @@ export function getRelativeToHistoryPath(absoluteUrl: string, history: History): | |
: parsedUrl.hash, | ||
}); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,4 +164,4 @@ export class SavedObjectLoader { | |
}; | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/plugins/vis_builder/public/saved_visualizations/migrate_to_visbuilder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
export function mapVisToVisBuilder(savedVis) { | ||
const visState = savedVis.visState; | ||
const searchSource = savedVis.searchSource; | ||
|
||
return { | ||
title: visState.title, | ||
visualizationState: { | ||
indexPattern: searchSource.getField('index').id, | ||
searchField: '', // This might need to be determined based on your specific use case | ||
activeVisualization: { | ||
name: visState.type, | ||
aggConfigParams: visState.aggs.aggs.map(agg => ({ | ||
id: agg.id, | ||
enabled: agg.enabled, | ||
type: agg.type, | ||
schema: agg.schema, | ||
params: agg.params, | ||
})), | ||
}, | ||
}, | ||
styleState: { | ||
addLegend: visState.params.addLegend || false, | ||
addTooltip: visState.params.addTooltip || false, | ||
legendPosition: visState.params.legendPosition || 'right', | ||
type: visState.type, | ||
}, | ||
uiState: savedVis.uiState.toJSON(), | ||
searchSource: { | ||
query: searchSource.getField('query'), | ||
filter: searchSource.getField('filter'), | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,4 +106,4 @@ export const VisualizeEditor = ({ onAppLeave }: VisualizeAppProps) => { | |
onAppLeave={onAppLeave} | ||
/> | ||
); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.