forked from opensearch-project/OpenSearch-Dashboards
-
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.
- Loading branch information
Ajay Gupta
committed
Apr 10, 2023
1 parent
70e8322
commit c54b96e
Showing
25 changed files
with
695 additions
and
35 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
17 changes: 17 additions & 0 deletions
17
src/plugins/point_in_time_management/public/components/breadcrumbs.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,17 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { i18n } from '@osd/i18n'; | ||
|
||
export function getListBreadcrumbs() { | ||
return [ | ||
{ | ||
text: i18n.translate('pitManagement.listBreadcrumb', { | ||
defaultMessage: 'Point in time', | ||
}), | ||
href: `/`, | ||
}, | ||
]; | ||
} |
5 changes: 5 additions & 0 deletions
5
..._in_time_management/public/components/empty_state/__snapshots__/empty_state.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
32 changes: 32 additions & 0 deletions
32
...anagement/public/components/pit_table/empty_state/__snapshots__/empty_state.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
...ins/point_in_time_management/public/components/pit_table/empty_state/empty_state.test.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,16 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import React from 'react'; | ||
import { EmptyState } from './empty_state'; | ||
import { shallow } from 'enzyme'; | ||
|
||
describe('EmptyState', () => { | ||
it('should render normally', () => { | ||
const component = shallow(<EmptyState />); | ||
|
||
expect(component).toMatchSnapshot(); | ||
}); | ||
}); |
29 changes: 29 additions & 0 deletions
29
src/plugins/point_in_time_management/public/components/pit_table/empty_state/empty_state.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,29 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { EuiButton, EuiEmptyPrompt } from '@elastic/eui'; | ||
import { FormattedMessage } from '@osd/i18n/react'; | ||
import React from 'react'; | ||
|
||
export const EmptyState = () => ( | ||
<EuiEmptyPrompt | ||
body={ | ||
<p> | ||
<FormattedMessage | ||
id="pointInTimeManagement.pointInTimeDescription" | ||
defaultMessage="No PIT objects have been created." | ||
/> | ||
</p> | ||
} | ||
actions={ | ||
<EuiButton iconType="plusInCircle" data-test-subj="createPITBtnInHeader"> | ||
<FormattedMessage | ||
id="pointInTimeManagement.header.createPointInTimeButton" | ||
defaultMessage="Create PIT" | ||
/> | ||
</EuiButton> | ||
} | ||
/> | ||
); |
6 changes: 6 additions & 0 deletions
6
src/plugins/point_in_time_management/public/components/pit_table/empty_state/index.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,6 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export { EmptyState } from './empty_state'; |
6 changes: 6 additions & 0 deletions
6
src/plugins/point_in_time_management/public/components/pit_table/index.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,6 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export { PITTableWithRouter } from './pit_table'; |
46 changes: 46 additions & 0 deletions
46
...anagement/public/components/pit_table/page_header/__snapshots__/page_header.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
src/plugins/point_in_time_management/public/components/pit_table/page_header/index.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,6 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export { PageHeader } from './page_header'; |
16 changes: 16 additions & 0 deletions
16
...ins/point_in_time_management/public/components/pit_table/page_header/page_header.test.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,16 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import React from 'react'; | ||
import { PageHeader } from './page_header'; | ||
import { shallow } from 'enzyme'; | ||
|
||
describe('PageHeader', () => { | ||
it('should render normally', () => { | ||
const component = shallow(<PageHeader />); | ||
|
||
expect(component).toMatchSnapshot(); | ||
}); | ||
}); |
39 changes: 39 additions & 0 deletions
39
src/plugins/point_in_time_management/public/components/pit_table/page_header/page_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,39 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { | ||
EuiButton, | ||
EuiPageContentHeader, | ||
EuiPageContentHeaderSection, | ||
EuiText, | ||
EuiTitle, | ||
} from '@elastic/eui'; | ||
import { FormattedMessage } from '@osd/i18n/react'; | ||
import React from 'react'; | ||
|
||
export const PageHeader = () => ( | ||
<> | ||
<EuiPageContentHeader> | ||
<EuiPageContentHeaderSection> | ||
<EuiTitle> | ||
<h1> | ||
<FormattedMessage id="pitManagement.header.pitTitle" defaultMessage="Point in Time" /> | ||
</h1> | ||
</EuiTitle> | ||
</EuiPageContentHeaderSection> | ||
<EuiButton fill={true} iconType="plusInCircle" data-test-subj="createPITBtnInHeader"> | ||
<FormattedMessage id="pitManagement.header.createPitButton" defaultMessage="Create PIT" /> | ||
</EuiButton> | ||
</EuiPageContentHeader> | ||
<EuiText size="s"> | ||
<p> | ||
<FormattedMessage | ||
id="pitManagement.pitDescription" | ||
defaultMessage="Create and manage point in time objects." | ||
/> | ||
</p> | ||
</EuiText> | ||
</> | ||
); |
Oops, something went wrong.