= {}
9 | ): RouteComponentProps {
10 | const mockLocation: History.Location = {
11 | hash: '',
12 | key: '',
13 | pathname: '',
14 | search: '',
15 | state: {},
16 | ...location,
17 | };
18 |
19 | const props: RouteComponentProps
= {
20 | match: {
21 | isExact: true,
22 | params: data,
23 | path: '',
24 | url: '',
25 | },
26 | location: mockLocation,
27 | // This history object is a mock and `null`s many of the required methods. The
28 | // tests are designed not to trigger them, if they do, an error is expected.
29 | // So cast this as any.
30 | history: {
31 | length: 2,
32 | action: 'POP',
33 | location: mockLocation,
34 | push: null,
35 | replace: null,
36 | go: null,
37 | goBack: null,
38 | goForward: null,
39 | block: null,
40 | createHref: null,
41 | listen: null,
42 | },
43 | staticContext: {},
44 | };
45 |
46 | return props;
47 | }
48 |
--------------------------------------------------------------------------------
/amundsen_application/static/images/icons/Delta-Up.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/amundsen_application/static/images/icons/Null-Value.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/amundsen_application/static/js/pages/SearchPage/constants.ts:
--------------------------------------------------------------------------------
1 | import { ResourceType } from 'interfaces/Resources';
2 | import { getDisplayNameByResource } from 'config/config-utils';
3 |
4 | export const PAGINATION_PAGE_RANGE = 10;
5 | export const RESULTS_PER_PAGE = 10;
6 |
7 | // TODO: Hard-coded text strings should be translatable/customizable
8 | export const DOCUMENT_TITLE_SUFFIX = ' - Amundsen Search';
9 | export const SEARCHPAGE_TITLE = 'Amundsen Search';
10 |
11 | export const PAGE_INDEX_ERROR_MESSAGE =
12 | 'Page index out of bounds for available matches';
13 |
14 | export const SEARCH_DEFAULT_MESSAGE =
15 | 'Your search results will be shown here.\n\
16 | Try entering a search term or using any of the filters to the left.';
17 |
18 | export const SEARCH_SOURCE_NAME = 'search_results';
19 | export const SEARCH_ERROR_MESSAGE_PREFIX = 'Your search did not match any ';
20 | export const SEARCH_ERROR_MESSAGE_SUFFIX = ' results';
21 |
22 | export const RESOURCE_SELECTOR_TITLE = 'Resource';
23 | export const DASHBOARD_RESOURCE_TITLE = getDisplayNameByResource(
24 | ResourceType.dashboard
25 | );
26 | export const TABLE_RESOURCE_TITLE = getDisplayNameByResource(
27 | ResourceType.table
28 | );
29 | export const USER_RESOURCE_TITLE = getDisplayNameByResource(ResourceType.user);
30 |
--------------------------------------------------------------------------------
/amundsen_application/static/images/icons/Null Value.svg:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/amundsen_application/static/images/icons/Minimize.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/amundsen_application/static/images/icons/Info-Filled.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/amundsen_application/static/js/components/common/Card/card.story.tsx:
--------------------------------------------------------------------------------
1 | // Copyright Contributors to the Amundsen project.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | import React from 'react';
5 |
6 | import StorySection from '../StorySection';
7 | import Card from '.';
8 |
9 | export default {
10 | title: 'Components/Cards',
11 | };
12 |
13 | export const Cards = () => (
14 | <>
15 |
16 |
17 |
18 |
19 |
23 |
24 |
25 |
30 |
31 | >
32 | );
33 |
34 | Cards.storyName = 'Cards';
35 |
--------------------------------------------------------------------------------
/amundsen_application/static/js/components/ColumnList/utils.spec.ts:
--------------------------------------------------------------------------------
1 | // Copyright Contributors to the Amundsen project.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | import { getStatsInfoText } from './utils';
5 |
6 | describe('ColumnList utils', () => {
7 | describe('getStatsInfoText', () => {
8 | it('generates correct info text for a daily partition', () => {
9 | const startEpoch = 1568160000;
10 | const endEpoch = 1568160000;
11 | const expected = `Stats reflect data collected on Sep 11, 2019 only. (daily partition)`;
12 | const actual = getStatsInfoText(startEpoch, endEpoch);
13 |
14 | expect(actual).toEqual(expected);
15 | });
16 |
17 | it('generates correct info text for a date range', () => {
18 | const startEpoch = 1568160000;
19 | const endEpoch = 1571616000;
20 | const expected = `Stats reflect data collected between Sep 11, 2019 and Oct 21, 2019.`;
21 | const actual = getStatsInfoText(startEpoch, endEpoch);
22 |
23 | expect(actual).toEqual(expected);
24 | });
25 |
26 | it('generates correct when no dates are given', () => {
27 | const expected = `Stats reflect data collected over a recent period of time.`;
28 | const actual = getStatsInfoText();
29 |
30 | expect(actual).toEqual(expected);
31 | });
32 | });
33 | });
34 |
--------------------------------------------------------------------------------