-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Blank getting started page added * update1 * wireframe progress * Progress on GettingStarted page * Filter layout for gettingStarted (Not used) * Overviewpage started * Progress on UI * Skeleton UI * Update Collection Choices * updated skeleton * Update Skeleton * rename button * add folder for lior * Progress on UI + files * Integration cards for sample data * adding a sample ndjson call (cherry picked from commit 5dda1b3) * Buttons for patterns * update * Working buttons update * Delete message * UI progress * UI update * new ndjsons and snapshots update --------- (cherry picked from commit 49f0630) Signed-off-by: Adam Tackett <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Adam Tackett <[email protected]> Co-authored-by: Shenoy Pratik <[email protected]>
- Loading branch information
1 parent
1354f7e
commit 2a1b809
Showing
186 changed files
with
12,565 additions
and
30 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
Binary file not shown.
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
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
80 changes: 80 additions & 0 deletions
80
public/components/getting_started/components/getting_started.tsx
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,80 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { EuiPage, EuiPageBody, EuiSpacer } from '@elastic/eui'; | ||
import React, { useEffect, useState } from 'react'; | ||
import { HomeProps } from 'public/components/getting_started/home'; | ||
import { GettingStartedConnectionsHeader } from './getting_started_header'; | ||
import { CollectAndShipData } from './getting_started_collectData'; | ||
import { QueryAndAnalyze } from './getting_started_queryAndAnalyze'; | ||
|
||
export const NewGettingStarted = (props: HomeProps) => { | ||
const { chrome } = props; | ||
const [selectedSource, setSelectedSource] = useState(''); | ||
const [isPickYourSourceOpen, setIsPickYourSourceOpen] = useState(true); | ||
const [isQueryDataOpen, setIsQueryDataOpen] = useState(false); | ||
const [indexPatterns, setIndexPatterns] = useState<string[]>([]); | ||
const [isSampleDataset, setIsSampleDataset] = useState(false); // New state | ||
|
||
useEffect(() => { | ||
chrome.setBreadcrumbs([ | ||
{ | ||
text: 'Getting Started', | ||
href: '#/', | ||
}, | ||
]); | ||
}, []); | ||
|
||
const handleSelectSource = (source: string) => { | ||
setSelectedSource(source); | ||
}; | ||
|
||
const togglePickYourSource = (isOpen: boolean) => { | ||
setIsPickYourSourceOpen(isOpen); | ||
if (isOpen) { | ||
setIsQueryDataOpen(false); | ||
} | ||
}; | ||
|
||
const toggleQueryData = (isOpen: boolean) => { | ||
setIsQueryDataOpen(isOpen); | ||
}; | ||
|
||
const setQueryDataOpen = (patterns: string[]) => { | ||
setIsPickYourSourceOpen(false); | ||
setIsQueryDataOpen(true); | ||
setIndexPatterns(patterns); | ||
}; | ||
|
||
const handleCardSelectionChange = (isSample: boolean) => { | ||
setIsSampleDataset(isSample); | ||
}; | ||
|
||
return ( | ||
<EuiPage> | ||
<EuiPageBody component="div"> | ||
<GettingStartedConnectionsHeader /> | ||
<EuiSpacer size="l" /> | ||
<CollectAndShipData | ||
isOpen={isPickYourSourceOpen} | ||
onToggle={togglePickYourSource} | ||
selectedTechnology={selectedSource} | ||
onMoveToQueryData={setQueryDataOpen} | ||
onSelectSource={handleSelectSource} | ||
onCardSelectionChange={handleCardSelectionChange} | ||
/> | ||
<EuiSpacer size="l" /> | ||
{!isSampleDataset && ( | ||
<QueryAndAnalyze | ||
isOpen={isQueryDataOpen} | ||
onToggle={toggleQueryData} | ||
selectedTechnology={selectedSource} | ||
indexPatterns={indexPatterns} | ||
/> | ||
)} | ||
</EuiPageBody> | ||
</EuiPage> | ||
); | ||
}; |
Oops, something went wrong.