forked from opensearch-project/dashboards-observability
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure S3 datasource flow (opensearch-project#1049)
* Manage datasources (opensearch-project#967) * fix name change bug and modify test to test behavior Signed-off-by: Derek Ho <[email protected]> * get rid of lint Signed-off-by: Derek Ho <[email protected]> * test for flyout Signed-off-by: Derek Ho <[email protected]> * flyout to medium size Signed-off-by: Derek Ho <[email protected]> * make accelerate extensible Signed-off-by: Derek Ho <[email protected]> * get datasources and hook up to pplservice Signed-off-by: Derek Ho <[email protected]> * get flint working Signed-off-by: Derek Ho <[email protected]> * add datasource page with steps and buttons on bottom bar Signed-off-by: Derek Ho <[email protected]> * datasources as a new plugin and mostly working Signed-off-by: Derek Ho <[email protected]> * hook up manage to show datasources call Signed-off-by: Derek Ho <[email protected]> * update two tables with descriptions Signed-off-by: Derek Ho <[email protected]> * make some updates to the page Signed-off-by: Derek Ho <[email protected]> * cleanup unused files for data connections Signed-off-by: Derek Ho <[email protected]> * cleanup and add overview panel columns Signed-off-by: Derek Ho <[email protected]> * render tabs Signed-off-by: Derek Ho <[email protected]> * add unit tests Signed-off-by: Derek Ho <[email protected]> * update data test subj and snapshot Signed-off-by: Derek Ho <[email protected]> * Add datasources to management overview Signed-off-by: Derek Ho <[email protected]> * remove spark logo and update snapshot Signed-off-by: Derek Ho <[email protected]> * refactor routes out Signed-off-by: Derek Ho <[email protected]> * separate out the roles Signed-off-by: Derek Ho <[email protected]> * bump version back to 3.0 Signed-off-by: Derek Ho <[email protected]> --------- Signed-off-by: Derek Ho <[email protected]> * Add acceleration management UI (opensearch-project#989) * add acceleration management UI skeleton Signed-off-by: Shenoy Pratik <[email protected]> * Create new documentation link for acc Signed-off-by: Shenoy Pratik <[email protected]> * fix typos and minor bugs Signed-off-by: Shenoy Pratik <[email protected]> * update snapshot Signed-off-by: Shenoy Pratik <[email protected]> * update window location to hash Signed-off-by: Shenoy Pratik <[email protected]> * remove unused headers Signed-off-by: Shenoy Pratik <[email protected]> --------- Signed-off-by: Shenoy Pratik <[email protected]> * Rename data sources to data connections (opensearch-project#1004) * rename data sources to data connections Signed-off-by: Derek Ho <[email protected]> * final cleanup Signed-off-by: Derek Ho <[email protected]> * update acceleration breadcrumb Signed-off-by: Derek Ho <[email protected]> * fix API call for data connection page Signed-off-by: Derek Ho <[email protected]> * fix integ test and data test subj and snapshot Signed-off-by: Derek Ho <[email protected]> --------- Signed-off-by: Derek Ho <[email protected]> * Add fallback to show if user does not have datasource API permissions (opensearch-project#1008) * add fallback ui for manage and view datasources Signed-off-by: Derek Ho <[email protected]> * always show datasources via pplservice Signed-off-by: Derek Ho <[email protected]> --------- Signed-off-by: Derek Ho <[email protected]> * Add access control tab content (opensearch-project#992) * basic rendering for the access control tab Signed-off-by: Derek Ho <[email protected]> * hook up basic radio groups and euicombo boxes for query and acceleration permissions Signed-off-by: Derek Ho <[email protected]> * refactor and clean up unuseed inports Signed-off-by: Derek Ho <[email protected]> * remove unused import Signed-off-by: Derek Ho <[email protected]> * fix import and snapshot Signed-off-by: Derek Ho <[email protected]> * fix test Signed-off-by: Derek Ho <[email protected]> * Address PR comments Signed-off-by: Derek Ho <[email protected]> * Address PR comments Signed-off-by: Derek Ho <[email protected]> * Remove unused files and variables Signed-off-by: Derek Ho <[email protected]> --------- Signed-off-by: Derek Ho <[email protected]> * Delete datasource and Connection Configuration Tab (opensearch-project#1024) * Address previous PR comments and implement rudimentary delete Signed-off-by: Derek Ho <[email protected]> * Implement modal and instant delete showing up in list Signed-off-by: Derek Ho <[email protected]> * Refactor save or cancel to a shared component, implement hard coded datasource configurations tab Signed-off-by: Derek Ho <[email protected]> * Update test with mock role data Signed-off-by: Derek Ho <[email protected]> * Add most functionality of edit connectiondetails Signed-off-by: Derek Ho <[email protected]> * Address PR comments Signed-off-by: Derek Ho <[email protected]> --------- Signed-off-by: Derek Ho <[email protected]> * Get most of the workflow working for configure datasource Signed-off-by: Derek Ho <[email protected]> * remove acceleration components Signed-off-by: Shenoy Pratik <[email protected]> * Update data connection to datasources in a few more places and update tests Signed-off-by: Derek Ho <[email protected]> * Rename and re-organize in folders Signed-off-by: Derek Ho <[email protected]> * Fix import path in testing file Signed-off-by: Derek Ho <[email protected]> * Get Initial S3 configuration working Signed-off-by: Derek Ho <[email protected]> * Configure S3 Data Source Working Signed-off-by: Derek Ho <[email protected]> * Fix query permissions display Signed-off-by: Derek Ho <[email protected]> * Fix merge conflict Signed-off-by: Derek Ho <[email protected]> * Clean up PR Signed-off-by: Derek Ho <[email protected]> * Add s3 logo in manage table Signed-off-by: Derek Ho <[email protected]> * Fix up PR according to UX feedback Signed-off-by: Derek Ho <[email protected]> * Remove successfully Signed-off-by: Derek Ho <[email protected]> * Update test Signed-off-by: Derek Ho <[email protected]> * Address PR comments Signed-off-by: Derek Ho <[email protected]> * Update test in accordance to useLocation Signed-off-by: Derek Ho <[email protected]> --------- Signed-off-by: Derek Ho <[email protected]> Signed-off-by: Shenoy Pratik <[email protected]> Co-authored-by: Shenoy Pratik <[email protected]>
- Loading branch information
Showing
31 changed files
with
943 additions
and
89 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
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
38 changes: 0 additions & 38 deletions
38
public/components/data_connections/components/data_connections_header.tsx
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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
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
77 changes: 77 additions & 0 deletions
77
public/components/datasources/components/data_connections_header.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,77 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { | ||
EuiLink, | ||
EuiPageHeader, | ||
EuiPageHeaderSection, | ||
EuiSpacer, | ||
EuiTab, | ||
EuiTabs, | ||
EuiText, | ||
EuiTitle, | ||
} from '@elastic/eui'; | ||
import React, { useState } from 'react'; | ||
import { useLocation } from 'react-router-dom'; | ||
import { OPENSEARCH_DOCUMENTATION_URL } from '../../../../common/constants/data_connections'; | ||
|
||
const tabs = [ | ||
{ | ||
id: 'manage', | ||
name: 'Manage data source', | ||
disabled: false, | ||
}, | ||
{ | ||
id: 'new', | ||
name: 'New data source', | ||
disabled: false, | ||
}, | ||
]; | ||
|
||
export const DataConnectionsHeader = () => { | ||
const location = useLocation().pathname.substring(1); | ||
|
||
const [selectedTabId, setSelectedTabId] = useState(location ? location : 'manage'); | ||
|
||
const onSelectedTabChanged = (id) => { | ||
setSelectedTabId(id); | ||
window.location.hash = id; | ||
}; | ||
|
||
const renderTabs = () => { | ||
return tabs.map((tab, index) => ( | ||
<EuiTab | ||
onClick={() => onSelectedTabChanged(tab.id)} | ||
isSelected={tab.id === selectedTabId} | ||
disabled={tab.disabled} | ||
key={index} | ||
> | ||
{tab.name} | ||
</EuiTab> | ||
)); | ||
}; | ||
|
||
return ( | ||
<div> | ||
<EuiPageHeader> | ||
<EuiPageHeaderSection> | ||
<EuiTitle size="l" data-test-subj="dataconnections-header"> | ||
<h1>Data sources</h1> | ||
</EuiTitle> | ||
</EuiPageHeaderSection> | ||
</EuiPageHeader> | ||
<EuiSpacer size="s" /> | ||
<EuiText size="s" color="subdued"> | ||
Connect and manage compatible OpenSearch and OpenSearch Dashboard data sources.{' '} | ||
<EuiLink external={true} href={OPENSEARCH_DOCUMENTATION_URL} target="blank"> | ||
Learn more | ||
</EuiLink> | ||
</EuiText> | ||
<EuiSpacer size="l" /> | ||
<EuiTabs display="condensed">{renderTabs()}</EuiTabs> | ||
<EuiSpacer size="s" /> | ||
</div> | ||
); | ||
}; |
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
File renamed without changes.
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
File renamed without changes.
Oops, something went wrong.