Skip to content

Commit

Permalink
Create prometheus datasource flow (opensearch-project#1054)
Browse files Browse the repository at this point in the history
* 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]>

* Initial commit adding prometheus logo and icon

Signed-off-by: Derek Ho <[email protected]>

* Get the major flow working

Signed-off-by: Derek Ho <[email protected]>

* Fix app navigation

Signed-off-by: Derek Ho <[email protected]>

* Fix up PR

Signed-off-by: Derek Ho <[email protected]>

* Remove management redirection for now and fix test and add cards

Signed-off-by: Derek Ho <[email protected]>

* Remove type filter and update test according to UX feedback

Signed-off-by: Derek Ho <[email protected]>

* Add link and update test

Signed-off-by: Derek Ho <[email protected]>

* Address PR comments

Signed-off-by: Derek Ho <[email protected]>

* Include useful info in the error toast

Signed-off-by: Derek Ho <[email protected]>

* Update actions in manage table according to UX feedback

Signed-off-by: Derek Ho <[email protected]>

* Add update button and update tests

Signed-off-by: Derek Ho <[email protected]>

* Remove unused code until further implementation

Signed-off-by: Derek Ho <[email protected]>

* Fix router files

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
derek-ho and ps48 authored Sep 29, 2023
1 parent ae399e2 commit 6ef3f4b
Show file tree
Hide file tree
Showing 19 changed files with 1,297 additions and 294 deletions.
2 changes: 1 addition & 1 deletion common/types/data_connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ export interface PermissionsConfigurationProps {

export type Role = EuiComboBoxOptionOption;

export type DatasourceType = 'SPARK' | 'S3GLUE' | 'OPENSEARCH';
export type DatasourceType = 'SPARK' | 'S3GLUE' | 'OPENSEARCH' | 'PROMETHEUS';
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,96 @@ exports[`Data Connection Page test Renders data connection page with data 1`] =
</div>
</div>
</div>
<div
class="euiFlexItem"
>
<div
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow euiPanel--isClickable euiCard euiCard--centerAligned euiCard--isClickable euiCard--hasIcon"
>
<div
class="euiCard__top"
>
<svg
aria-hidden="true"
class="euiIcon euiIcon--xxLarge euiIcon-isLoading euiCard__icon"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
/>
</div>
<div
class="euiCard__content"
>
<span
class="euiTitle euiTitle--small euiCard__title"
id="random_html_idTitle"
>
<button
aria-describedby=" random_html_idDescription"
class="euiCard__titleButton"
>
Tables
</button>
</span>
<div
class="euiText euiText--small euiCard__description"
id="random_html_idDescription"
>
<p>
Manually Define Tables
</p>
</div>
</div>
</div>
</div>
<div
class="euiFlexItem"
>
<div
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow euiPanel--isClickable euiCard euiCard--centerAligned euiCard--isClickable euiCard--hasIcon"
>
<div
class="euiCard__top"
>
<svg
aria-hidden="true"
class="euiIcon euiIcon--xxLarge euiIcon-isLoading euiCard__icon"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
/>
</div>
<div
class="euiCard__content"
>
<span
class="euiTitle euiTitle--small euiCard__title"
id="random_html_idTitle"
>
<button
aria-describedby=" random_html_idDescription"
class="euiCard__titleButton"
>
Integrations data
</button>
</span>
<div
class="euiText euiText--small euiCard__description"
id="random_html_idDescription"
>
<p>
Explore data faster through integrations
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,147 @@
exports[`Manage Data Connections Description test Renders manage data connections description 1`] = `
<Component>
<div>
<EuiTitle
size="s"
>
<h2
className="euiTitle euiTitle--small"
>
Manage existing data sources
</h2>
</EuiTitle>
<EuiSpacer
size="s"
>
<div
className="euiSpacer euiSpacer--s"
/>
</EuiSpacer>
<EuiText
color="subdued"
size="s"
<EuiFlexGroup
justifyContent="spaceBetween"
>
<div
className="euiText euiText--small"
className="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--justifyContentSpaceBetween euiFlexGroup--directionRow euiFlexGroup--responsive"
>
<EuiTextColor
color="subdued"
component="div"
<EuiFlexItem
grow={false}
>
<div
className="euiFlexItem euiFlexItem--flexGrowZero"
>
<EuiTitle
size="s"
>
<h2
className="euiTitle euiTitle--small"
>
Manage existing data sources
</h2>
</EuiTitle>
<EuiSpacer
size="s"
>
<div
className="euiSpacer euiSpacer--s"
/>
</EuiSpacer>
<EuiText
color="subdued"
size="s"
>
<div
className="euiText euiText--small"
>
<EuiTextColor
color="subdued"
component="div"
>
<div
className="euiTextColor euiTextColor--subdued"
>
Manage already created data sources or
<EuiLink
href="#/new"
>
<a
className="euiLink euiLink--primary"
href="#/new"
rel="noreferrer"
>
create a new data source
</a>
</EuiLink>
</div>
</EuiTextColor>
</div>
</EuiText>
</div>
</EuiFlexItem>
<EuiFlexItem
grow={false}
>
<div
className="euiTextColor euiTextColor--subdued"
className="euiFlexItem euiFlexItem--flexGrowZero"
>
Manage already created data sources.
<EuiButton
iconType="refresh"
>
<EuiButtonDisplay
baseClassName="euiButton"
disabled={false}
element="button"
iconType="refresh"
isDisabled={false}
type="button"
>
<button
className="euiButton euiButton--primary"
disabled={false}
style={
Object {
"minWidth": undefined,
}
}
type="button"
>
<EuiButtonContent
className="euiButton__content"
iconSide="left"
iconType="refresh"
textProps={
Object {
"className": "euiButton__text",
}
}
>
<span
className="euiButtonContent euiButton__content"
>
<EuiIcon
className="euiButtonContent__icon"
color="inherit"
size="m"
type="refresh"
>
<EuiIconEmpty
aria-hidden={true}
className="euiIcon euiIcon--medium euiIcon--inherit euiIcon-isLoading euiButtonContent__icon"
focusable="false"
role="img"
style={null}
>
<svg
aria-hidden={true}
className="euiIcon euiIcon--medium euiIcon--inherit euiIcon-isLoading euiButtonContent__icon"
focusable="false"
height={16}
role="img"
style={null}
viewBox="0 0 16 16"
width={16}
xmlns="http://www.w3.org/2000/svg"
/>
</EuiIconEmpty>
</EuiIcon>
<span
className="euiButton__text"
>
Refresh
</span>
</span>
</EuiButtonContent>
</button>
</EuiButtonDisplay>
</EuiButton>
</div>
</EuiTextColor>
</EuiFlexItem>
</div>
</EuiText>
</EuiFlexGroup>
<EuiHorizontalRule
size="full"
>
Expand Down
Loading

0 comments on commit 6ef3f4b

Please sign in to comment.