-
Notifications
You must be signed in to change notification settings - Fork 54
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 (#1049)
* Manage datasources (#967) * fix name change bug and modify test to test behavior Signed-off-by: Derek Ho <dxho@amazon.com> * get rid of lint Signed-off-by: Derek Ho <dxho@amazon.com> * test for flyout Signed-off-by: Derek Ho <dxho@amazon.com> * flyout to medium size Signed-off-by: Derek Ho <dxho@amazon.com> * make accelerate extensible Signed-off-by: Derek Ho <dxho@amazon.com> * get datasources and hook up to pplservice Signed-off-by: Derek Ho <dxho@amazon.com> * get flint working Signed-off-by: Derek Ho <dxho@amazon.com> * add datasource page with steps and buttons on bottom bar Signed-off-by: Derek Ho <dxho@amazon.com> * datasources as a new plugin and mostly working Signed-off-by: Derek Ho <dxho@amazon.com> * hook up manage to show datasources call Signed-off-by: Derek Ho <dxho@amazon.com> * update two tables with descriptions Signed-off-by: Derek Ho <dxho@amazon.com> * make some updates to the page Signed-off-by: Derek Ho <dxho@amazon.com> * cleanup unused files for data connections Signed-off-by: Derek Ho <dxho@amazon.com> * cleanup and add overview panel columns Signed-off-by: Derek Ho <dxho@amazon.com> * render tabs Signed-off-by: Derek Ho <dxho@amazon.com> * add unit tests Signed-off-by: Derek Ho <dxho@amazon.com> * update data test subj and snapshot Signed-off-by: Derek Ho <dxho@amazon.com> * Add datasources to management overview Signed-off-by: Derek Ho <dxho@amazon.com> * remove spark logo and update snapshot Signed-off-by: Derek Ho <dxho@amazon.com> * refactor routes out Signed-off-by: Derek Ho <dxho@amazon.com> * separate out the roles Signed-off-by: Derek Ho <dxho@amazon.com> * bump version back to 3.0 Signed-off-by: Derek Ho <dxho@amazon.com> --------- Signed-off-by: Derek Ho <dxho@amazon.com> * Add acceleration management UI (#989) * add acceleration management UI skeleton Signed-off-by: Shenoy Pratik <sgguruda@amazon.com> * Create new documentation link for acc Signed-off-by: Shenoy Pratik <sgguruda@amazon.com> * fix typos and minor bugs Signed-off-by: Shenoy Pratik <sgguruda@amazon.com> * update snapshot Signed-off-by: Shenoy Pratik <sgguruda@amazon.com> * update window location to hash Signed-off-by: Shenoy Pratik <sgguruda@amazon.com> * remove unused headers Signed-off-by: Shenoy Pratik <sgguruda@amazon.com> --------- Signed-off-by: Shenoy Pratik <sgguruda@amazon.com> * Rename data sources to data connections (#1004) * rename data sources to data connections Signed-off-by: Derek Ho <dxho@amazon.com> * final cleanup Signed-off-by: Derek Ho <dxho@amazon.com> * update acceleration breadcrumb Signed-off-by: Derek Ho <dxho@amazon.com> * fix API call for data connection page Signed-off-by: Derek Ho <dxho@amazon.com> * fix integ test and data test subj and snapshot Signed-off-by: Derek Ho <dxho@amazon.com> --------- Signed-off-by: Derek Ho <dxho@amazon.com> * Add fallback to show if user does not have datasource API permissions (#1008) * add fallback ui for manage and view datasources Signed-off-by: Derek Ho <dxho@amazon.com> * always show datasources via pplservice Signed-off-by: Derek Ho <dxho@amazon.com> --------- Signed-off-by: Derek Ho <dxho@amazon.com> * Add access control tab content (#992) * basic rendering for the access control tab Signed-off-by: Derek Ho <dxho@amazon.com> * hook up basic radio groups and euicombo boxes for query and acceleration permissions Signed-off-by: Derek Ho <dxho@amazon.com> * refactor and clean up unuseed inports Signed-off-by: Derek Ho <dxho@amazon.com> * remove unused import Signed-off-by: Derek Ho <dxho@amazon.com> * fix import and snapshot Signed-off-by: Derek Ho <dxho@amazon.com> * fix test Signed-off-by: Derek Ho <dxho@amazon.com> * Address PR comments Signed-off-by: Derek Ho <dxho@amazon.com> * Address PR comments Signed-off-by: Derek Ho <dxho@amazon.com> * Remove unused files and variables Signed-off-by: Derek Ho <dxho@amazon.com> --------- Signed-off-by: Derek Ho <dxho@amazon.com> * Delete datasource and Connection Configuration Tab (#1024) * Address previous PR comments and implement rudimentary delete Signed-off-by: Derek Ho <dxho@amazon.com> * Implement modal and instant delete showing up in list Signed-off-by: Derek Ho <dxho@amazon.com> * Refactor save or cancel to a shared component, implement hard coded datasource configurations tab Signed-off-by: Derek Ho <dxho@amazon.com> * Update test with mock role data Signed-off-by: Derek Ho <dxho@amazon.com> * Add most functionality of edit connectiondetails Signed-off-by: Derek Ho <dxho@amazon.com> * Address PR comments Signed-off-by: Derek Ho <dxho@amazon.com> --------- Signed-off-by: Derek Ho <dxho@amazon.com> * Get most of the workflow working for configure datasource Signed-off-by: Derek Ho <dxho@amazon.com> * remove acceleration components Signed-off-by: Shenoy Pratik <sgguruda@amazon.com> * Update data connection to datasources in a few more places and update tests Signed-off-by: Derek Ho <dxho@amazon.com> * Rename and re-organize in folders Signed-off-by: Derek Ho <dxho@amazon.com> * Fix import path in testing file Signed-off-by: Derek Ho <dxho@amazon.com> * Get Initial S3 configuration working Signed-off-by: Derek Ho <dxho@amazon.com> * Configure S3 Data Source Working Signed-off-by: Derek Ho <dxho@amazon.com> * Fix query permissions display Signed-off-by: Derek Ho <dxho@amazon.com> * Fix merge conflict Signed-off-by: Derek Ho <dxho@amazon.com> * Clean up PR Signed-off-by: Derek Ho <dxho@amazon.com> * Add s3 logo in manage table Signed-off-by: Derek Ho <dxho@amazon.com> * Fix up PR according to UX feedback Signed-off-by: Derek Ho <dxho@amazon.com> * Remove successfully Signed-off-by: Derek Ho <dxho@amazon.com> * Update test Signed-off-by: Derek Ho <dxho@amazon.com> * Address PR comments Signed-off-by: Derek Ho <dxho@amazon.com> * Update test in accordance to useLocation Signed-off-by: Derek Ho <dxho@amazon.com> --------- Signed-off-by: Derek Ho <dxho@amazon.com> Signed-off-by: Shenoy Pratik <sgguruda@amazon.com> Co-authored-by: Shenoy Pratik <sgguruda@amazon.com>
- 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.