diff --git a/amundsen_application/static/.betterer.results b/amundsen_application/static/.betterer.results index 24a224ac0..9733d599d 100644 --- a/amundsen_application/static/.betterer.results +++ b/amundsen_application/static/.betterer.results @@ -7,10 +7,10 @@ exports[`strict null compilation`] = { "js/components/DashboardPage/DashboardOwnerEditor/index.tsx:3906399124": [ [46, 2, 4, "No overload matches this call.\\n The last overload gave the following error.\\n Argument of type \'null\' is not assignable to parameter of type \'{}\'.", "2087897566"] ], - "js/components/DashboardPage/index.spec.tsx:2960511959": [ - [57, 4, 8, "Argument of type \'Partial> | undefined\' is not assignable to parameter of type \'Partial>\'.\\n Type \'undefined\' is not assignable to type \'Partial>\'.", "2700611480"], - [242, 10, 18, "Type \'null\' is not assignable to type \'number\'.", "2901767208"], - [243, 10, 29, "Type \'null\' is not assignable to type \'number\'.", "1157138603"] + "js/components/DashboardPage/index.spec.tsx:644863281": [ + [53, 4, 8, "Argument of type \'Partial> | undefined\' is not assignable to parameter of type \'Partial>\'.\\n Type \'undefined\' is not assignable to type \'Partial>\'.", "2700611480"], + [212, 10, 18, "Type \'null\' is not assignable to type \'number\'.", "2901767208"], + [213, 10, 29, "Type \'null\' is not assignable to type \'number\'.", "1157138603"] ], "js/components/Feedback/index.tsx:1605423346": [ [46, 6, 7, "Type \'FC | undefined\' is not assignable to type \'FC\'.\\n Type \'undefined\' is not assignable to type \'FunctionComponent\'.", "3716929964"] @@ -21,29 +21,29 @@ exports[`strict null compilation`] = { [100, 32, 36, "No overload matches this call.\\n Overload 1 of 3, \'(node: ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>, options?: ShallowRendererProps | undefined): ShallowWrapper<...>\', gave the following error.\\n Argument of type \'Element | null\' is not assignable to parameter of type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.\\n Type \'null\' is not assignable to type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.\\n Overload 2 of 3, \'(node: ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>, options?: ShallowRendererProps | undefined): ShallowWrapper<...>\', gave the following error.\\n Argument of type \'Element | null\' is not assignable to parameter of type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.\\n Type \'null\' is not assignable to type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.\\n Overload 3 of 3, \'(node: ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>, options?: ShallowRendererProps | undefined): ShallowWrapper<...>\', gave the following error.\\n Argument of type \'Element | null\' is not assignable to parameter of type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.\\n Type \'null\' is not assignable to type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.", "788521834"], [110, 39, 4, "Argument of type \'null\' is not assignable to parameter of type \'Partial | undefined\'.", "2087897566"] ], - "js/components/ProfilePage/index.spec.tsx:1225244378": [ + "js/components/ProfilePage/index.spec.tsx:4086464143": [ [41, 6, 4, "Argument of type \'null\' is not assignable to parameter of type \'Partial>\'.", "2087897566"] ], - "js/components/ProfilePage/index.tsx:3239951064": [ - [177, 6, 7, "Type \'Element\' is not assignable to type \'never\'.", "3716929964"], - [178, 6, 3, "Type \'string\' is not assignable to type \'never\'.", "193424690"], - [179, 6, 5, "Type \'string\' is not assignable to type \'never\'.", "183222373"], - [184, 8, 7, "Type \'Element\' is not assignable to type \'never\'.", "3716929964"], - [185, 8, 3, "Type \'string\' is not assignable to type \'never\'.", "193424690"], - [186, 8, 5, "Type \'string\' is not assignable to type \'never\'.", "183222373"], - [203, 6, 6, "Type \'Element\' is not assignable to type \'null\'.", "1320372020"], - [205, 6, 6, "Type \'Element\' is not assignable to type \'null\'.", "1320372020"], - [210, 6, 8, "Type \'Element\' is not assignable to type \'null\'.", "2362717523"], - [214, 6, 8, "Type \'Element\' is not assignable to type \'null\'.", "2362717523"], - [230, 6, 7, "Type \'Element\' is not assignable to type \'null\'.", "2834855792"], - [232, 6, 7, "Type \'Element\' is not assignable to type \'null\'.", "2834855792"], - [247, 6, 9, "Type \'Element\' is not assignable to type \'null\'.", "4194995369"], - [251, 6, 9, "Type \'Element\' is not assignable to type \'null\'.", "4194995369"], - [267, 6, 11, "Type \'Element\' is not assignable to type \'null\'.", "4082075310"], - [271, 6, 11, "Type \'Element\' is not assignable to type \'null\'.", "4082075310"], - [287, 6, 10, "Type \'Element\' is not assignable to type \'null\'.", "1383320160"], - [291, 6, 10, "Type \'Element\' is not assignable to type \'null\'.", "1383320160"], - [363, 2, 15, "No overload matches this call.\\n The last overload gave the following error.\\n Argument of type \'(state: GlobalState) => { user: PeopleUser; resourceRelations: { table: { bookmarks: Bookmark[]; own: Resource[]; read: Resource[]; }; dashboard: { bookmarks: Bookmark[] | undefined; own: Resource[] | undefined; read: never[]; }; }; }\' is not assignable to parameter of type \'MapStateToPropsParam\'.\\n Type \'(state: GlobalState) => { user: PeopleUser; resourceRelations: { table: { bookmarks: Bookmark[]; own: Resource[]; read: Resource[]; }; dashboard: { bookmarks: Bookmark[] | undefined; own: Resource[] | undefined; read: never[]; }; }; }\' is not assignable to type \'MapStateToPropsFactory\'.\\n Type \'{ user: PeopleUser; resourceRelations: { table: { bookmarks: Bookmark[]; own: Resource[]; read: Resource[]; }; dashboard: { bookmarks: Bookmark[] | undefined; own: Resource[] | undefined; read: never[]; }; }; }\' is not assignable to type \'MapStateToProps\'.\\n Type \'{ user: PeopleUser; resourceRelations: { table: { bookmarks: Bookmark[]; own: Resource[]; read: Resource[]; }; dashboard: { bookmarks: Bookmark[] | undefined; own: Resource[] | undefined; read: never[]; }; }; }\' provides no match for the signature \'(state: {}, ownProps: {}): StateFromProps\'.", "1389821531"] + "js/components/ProfilePage/index.tsx:2593015022": [ + [178, 6, 7, "Type \'Element\' is not assignable to type \'never\'.", "3716929964"], + [179, 6, 3, "Type \'string\' is not assignable to type \'never\'.", "193424690"], + [180, 6, 5, "Type \'string\' is not assignable to type \'never\'.", "183222373"], + [185, 8, 7, "Type \'Element\' is not assignable to type \'never\'.", "3716929964"], + [186, 8, 3, "Type \'string\' is not assignable to type \'never\'.", "193424690"], + [187, 8, 5, "Type \'string\' is not assignable to type \'never\'.", "183222373"], + [204, 6, 6, "Type \'Element\' is not assignable to type \'null\'.", "1320372020"], + [206, 6, 6, "Type \'Element\' is not assignable to type \'null\'.", "1320372020"], + [211, 6, 8, "Type \'Element\' is not assignable to type \'null\'.", "2362717523"], + [215, 6, 8, "Type \'Element\' is not assignable to type \'null\'.", "2362717523"], + [222, 6, 7, "Type \'Element\' is not assignable to type \'null\'.", "2834855792"], + [224, 6, 7, "Type \'Element\' is not assignable to type \'null\'.", "2834855792"], + [240, 6, 9, "Type \'Element\' is not assignable to type \'null\'.", "4194995369"], + [244, 6, 9, "Type \'Element\' is not assignable to type \'null\'.", "4194995369"], + [260, 6, 11, "Type \'Element\' is not assignable to type \'null\'.", "4082075310"], + [264, 6, 11, "Type \'Element\' is not assignable to type \'null\'.", "4082075310"], + [280, 6, 10, "Type \'Element\' is not assignable to type \'null\'.", "1383320160"], + [284, 6, 10, "Type \'Element\' is not assignable to type \'null\'.", "1383320160"], + [356, 2, 15, "No overload matches this call.\\n The last overload gave the following error.\\n Argument of type \'(state: GlobalState) => { user: PeopleUser; resourceRelations: { table: { bookmarks: Bookmark[]; own: Resource[]; read: Resource[]; }; dashboard: { bookmarks: Bookmark[] | undefined; own: Resource[] | undefined; read: never[]; }; }; }\' is not assignable to parameter of type \'MapStateToPropsParam\'.\\n Type \'(state: GlobalState) => { user: PeopleUser; resourceRelations: { table: { bookmarks: Bookmark[]; own: Resource[]; read: Resource[]; }; dashboard: { bookmarks: Bookmark[] | undefined; own: Resource[] | undefined; read: never[]; }; }; }\' is not assignable to type \'MapStateToPropsFactory\'.\\n Type \'{ user: PeopleUser; resourceRelations: { table: { bookmarks: Bookmark[]; own: Resource[]; read: Resource[]; }; dashboard: { bookmarks: Bookmark[] | undefined; own: Resource[] | undefined; read: never[]; }; }; }\' is not assignable to type \'MapStateToProps\'.\\n Type \'{ user: PeopleUser; resourceRelations: { table: { bookmarks: Bookmark[]; own: Resource[]; read: Resource[]; }; dashboard: { bookmarks: Bookmark[] | undefined; own: Resource[] | undefined; read: never[]; }; }; }\' provides no match for the signature \'(state: {}, ownProps: {}): StateFromProps\'.", "1389821531"] ], "js/components/SearchPage/SearchFilter/FilterSection/index.spec.tsx:3610496091": [ [59, 13, 7, "Object is possibly \'undefined\'.", "3716929964"], @@ -104,19 +104,19 @@ exports[`strict null compilation`] = { "js/components/TableDetail/index.spec.tsx:2169788066": [ [32, 4, 8, "Argument of type \'Partial> | undefined\' is not assignable to parameter of type \'Partial>\'.\\n Type \'undefined\' is not assignable to type \'Partial>\'.", "2700611480"] ], - "js/components/TableDetail/index.tsx:2025163043": [ - [154, 10, 13, "Type \'null\' is not assignable to type \'((newValue: string, onSuccess?: (() => any) | undefined, onFailure?: (() => any) | undefined) => void) | undefined\'.", "67794331"], - [165, 6, 7, "Type \'Element\' is not assignable to type \'never\'.", "3716929964"], - [172, 6, 3, "Type \'string\' is not assignable to type \'never\'.", "193424690"], - [173, 6, 5, "Type \'string\' is not assignable to type \'never\'.", "183222373"], - [183, 8, 7, "Type \'Element\' is not assignable to type \'never\'.", "3716929964"], - [184, 11, 26, "Type \'{ itemsPerPage: number; source: string; }\' is missing the following properties from type \'Readonly & OwnProps>\': dashboards, isLoading, errorText", "2224258167"], - [189, 8, 3, "Type \'string\' is not assignable to type \'never\'.", "193424690"], - [190, 8, 5, "Type \'string | Element\' is not assignable to type \'never\'.\\n Type \'string\' is not assignable to type \'never\'.", "183222373"], - [264, 16, 7, "Type \'string | null\' is not assignable to type \'string | undefined\'.\\n Type \'null\' is not assignable to type \'string | undefined\'.", "3817619378"], - [306, 20, 35, "Argument of type \'ProgrammaticDescription[] | undefined\' is not assignable to parameter of type \'ProgrammaticDescription[]\'.\\n Type \'undefined\' is not assignable to type \'ProgrammaticDescription[]\'.", "4249007202"], - [320, 20, 36, "Argument of type \'ProgrammaticDescription[] | undefined\' is not assignable to parameter of type \'ProgrammaticDescription[]\'.\\n Type \'undefined\' is not assignable to type \'ProgrammaticDescription[]\'.", "2770872537"], - [325, 16, 36, "Argument of type \'ProgrammaticDescription[] | undefined\' is not assignable to parameter of type \'ProgrammaticDescription[]\'.\\n Type \'undefined\' is not assignable to type \'ProgrammaticDescription[]\'.", "2776557981"] + "js/components/TableDetail/index.tsx:1272928301": [ + [153, 10, 13, "Type \'null\' is not assignable to type \'((newValue: string, onSuccess?: (() => any) | undefined, onFailure?: (() => any) | undefined) => void) | undefined\'.", "67794331"], + [164, 6, 7, "Type \'Element\' is not assignable to type \'never\'.", "3716929964"], + [171, 6, 3, "Type \'string\' is not assignable to type \'never\'.", "193424690"], + [172, 6, 5, "Type \'string\' is not assignable to type \'never\'.", "183222373"], + [182, 8, 7, "Type \'Element\' is not assignable to type \'never\'.", "3716929964"], + [183, 11, 26, "Type \'{ itemsPerPage: number; source: string; }\' is missing the following properties from type \'Readonly & OwnProps>\': dashboards, isLoading, errorText", "2224258167"], + [188, 8, 3, "Type \'string\' is not assignable to type \'never\'.", "193424690"], + [189, 8, 5, "Type \'string | Element\' is not assignable to type \'never\'.\\n Type \'string\' is not assignable to type \'never\'.", "183222373"], + [261, 16, 7, "Type \'string | null\' is not assignable to type \'string | undefined\'.\\n Type \'null\' is not assignable to type \'string | undefined\'.", "3817619378"], + [303, 20, 35, "Argument of type \'ProgrammaticDescription[] | undefined\' is not assignable to parameter of type \'ProgrammaticDescription[]\'.\\n Type \'undefined\' is not assignable to type \'ProgrammaticDescription[]\'.", "4249007202"], + [317, 20, 36, "Argument of type \'ProgrammaticDescription[] | undefined\' is not assignable to parameter of type \'ProgrammaticDescription[]\'.\\n Type \'undefined\' is not assignable to type \'ProgrammaticDescription[]\'.", "2770872537"], + [322, 16, 36, "Argument of type \'ProgrammaticDescription[] | undefined\' is not assignable to parameter of type \'ProgrammaticDescription[]\'.\\n Type \'undefined\' is not assignable to type \'ProgrammaticDescription[]\'.", "2776557981"] ], "js/components/common/Announcements/AnnouncementsList/index.spec.tsx:1710887993": [ [95, 23, 124, "Object is possibly \'null\'.", "4248337497"] @@ -160,9 +160,6 @@ exports[`strict null compilation`] = { "js/components/common/EntityCard/EntityCardSection/index.tsx:1592385405": [ [40, 4, 23, "Object is possibly \'null\'.", "1725552512"] ], - "js/components/common/Flag/index.spec.tsx:910958978": [ - [63, 25, 4, "Argument of type \'null\' is not assignable to parameter of type \'string | undefined\'.", "2087897566"] - ], "js/components/common/Flag/index.tsx:128873066": [ [44, 27, 8, "Argument of type \'string | null\' is not assignable to parameter of type \'string\'.\\n Type \'null\' is not assignable to type \'string\'.", "4036080041"] ], @@ -185,19 +182,19 @@ exports[`strict null compilation`] = { "js/components/common/ResourceListItem/DashboardListItem/index.spec.tsx:53357032": [ [163, 14, 29, "Type \'null\' is not assignable to type \'number\'.", "1157138603"] ], - "js/components/common/ResourceListItem/TableListItem/index.spec.tsx:2421977441": [ - [162, 14, 18, "Type \'null\' is not assignable to type \'string | undefined\'.", "3750638477"], - [230, 14, 6, "Type \'null\' is not assignable to type \'Badge[] | undefined\'.", "1502764275"] + "js/components/common/ResourceListItem/TableListItem/index.spec.tsx:1564573503": [ + [161, 14, 18, "Type \'null\' is not assignable to type \'string | undefined\'.", "3750638477"], + [229, 14, 6, "Type \'null\' is not assignable to type \'Badge[] | undefined\'.", "1502764275"] ], - "js/components/common/ResourceListItem/UserListItem/index.tsx:3815984865": [ + "js/components/common/ResourceListItem/UserListItem/index.tsx:101883333": [ [31, 21, 49, "Argument of type \'Element\' is not assignable to parameter of type \'never\'.", "2430213531"], [34, 21, 49, "Argument of type \'Element\' is not assignable to parameter of type \'never\'.", "1883272571"] ], "js/components/common/ScrollTracker/index.tsx:727804392": [ [55, 30, 29, "Argument of type \'number | undefined\' is not assignable to parameter of type \'number\'.\\n Type \'undefined\' is not assignable to type \'number\'.", "745919071"] ], - "js/components/common/SearchBar/InlineSearchResults/SearchItemList/SearchItem/tests/index.spec.tsx:3022074895": [ - [63, 30, 36, "No overload matches this call.\\n Overload 1 of 3, \'(node: ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>, options?: ShallowRendererProps | undefined): ShallowWrapper<...>\', gave the following error.\\n Argument of type \'Element | null\' is not assignable to parameter of type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.\\n Type \'null\' is not assignable to type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.\\n Overload 2 of 3, \'(node: ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>, options?: ShallowRendererProps | undefined): ShallowWrapper<...>\', gave the following error.\\n Argument of type \'Element | null\' is not assignable to parameter of type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.\\n Type \'null\' is not assignable to type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.\\n Overload 3 of 3, \'(node: ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>, options?: ShallowRendererProps | undefined): ShallowWrapper<...>\', gave the following error.\\n Argument of type \'Element | null\' is not assignable to parameter of type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.\\n Type \'null\' is not assignable to type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.", "4042031348"] + "js/components/common/SearchBar/InlineSearchResults/SearchItemList/SearchItem/tests/index.spec.tsx:3109268054": [ + [62, 30, 36, "No overload matches this call.\\n Overload 1 of 3, \'(node: ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>, options?: ShallowRendererProps | undefined): ShallowWrapper<...>\', gave the following error.\\n Argument of type \'Element | null\' is not assignable to parameter of type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.\\n Type \'null\' is not assignable to type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.\\n Overload 2 of 3, \'(node: ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>, options?: ShallowRendererProps | undefined): ShallowWrapper<...>\', gave the following error.\\n Argument of type \'Element | null\' is not assignable to parameter of type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.\\n Type \'null\' is not assignable to type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.\\n Overload 3 of 3, \'(node: ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>, options?: ShallowRendererProps | undefined): ShallowWrapper<...>\', gave the following error.\\n Argument of type \'Element | null\' is not assignable to parameter of type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.\\n Type \'null\' is not assignable to type \'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>\'.", "4042031348"] ], "js/components/common/SearchBar/InlineSearchResults/tests/index.spec.tsx:2567444475": [ [51, 13, 56, "Conversion of type \'{ page_index: number; results: { display_name: string; email: string; employee_type: null; first_name: string; full_name: string; github_username: string; is_active: boolean; last_name: string; ... 7 more ...; user_id: string; }[]; total_results: number; }\' to type \'SearchResults\' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to \'unknown\' first.\\n Types of property \'results\' are incompatible.\\n Type \'{ display_name: string; email: string; employee_type: null; first_name: string; full_name: string; github_username: string; is_active: boolean; last_name: string; manager_email: string; manager_fullname: string; ... 5 more ...; user_id: string; }[]\' is not comparable to type \'UserResource[]\'.\\n Type \'{ display_name: string; email: string; employee_type: null; first_name: string; full_name: string; github_username: string; is_active: boolean; last_name: string; manager_email: string; manager_fullname: string; ... 5 more ...; user_id: string; }\' is not comparable to type \'UserResource\'.\\n Types of property \'employee_type\' are incompatible.\\n Type \'null\' is not comparable to type \'string\'.", "3811500358"] @@ -206,9 +203,9 @@ exports[`strict null compilation`] = { [30, 54, 8, "Argument of type \'Partial> | undefined\' is not assignable to parameter of type \'Partial>\'.\\n Type \'undefined\' is not assignable to type \'Partial>\'.", "2700611480"], [403, 30, 4, "Argument of type \'null\' is not assignable to parameter of type \'Partial | undefined\'.", "2087897566"] ], - "js/components/common/SearchBar/index.tsx:3840434542": [ - [248, 6, 11, "No overload matches this call.\\n The last overload gave the following error.\\n Type \'(() => SubmitSearchRequest) | null\' is not assignable to type \'ActionCreator\'.\\n Type \'null\' is not assignable to type \'ActionCreator\'.", "2296208050"], - [263, 4, 18, "No overload matches this call.\\n The last overload gave the following error.\\n Argument of type \'(dispatch: any, ownProps: any) => ActionCreator\' is not assignable to parameter of type \'DispatchFromProps\'.\\n Type \'(dispatch: any, ownProps: any) => ActionCreator\' is missing the following properties from type \'DispatchFromProps\': submitSearch, onInputChange, onSelectInlineResult", "2926224796"] + "js/components/common/SearchBar/index.tsx:280133100": [ + [253, 6, 11, "No overload matches this call.\\n The last overload gave the following error.\\n Type \'(() => SubmitSearchRequest) | null\' is not assignable to type \'ActionCreator\'.\\n Type \'null\' is not assignable to type \'ActionCreator\'.", "2296208050"], + [268, 4, 18, "No overload matches this call.\\n The last overload gave the following error.\\n Argument of type \'(dispatch: any, ownProps: any) => ActionCreator\' is not assignable to parameter of type \'DispatchFromProps\'.\\n Type \'(dispatch: any, ownProps: any) => ActionCreator\' is missing the following properties from type \'DispatchFromProps\': submitSearch, onInputChange, onSelectInlineResult", "2926224796"] ], "js/components/common/Tags/TagInput/index.tsx:3754832290": [ [63, 22, 6, "Type \'undefined\' is not assignable to type \'GetAllTagsRequest\'.", "1979467425"], @@ -307,31 +304,31 @@ exports[`strict null compilation`] = { [360, 18, 13, "Object is possibly \'undefined\'.", "1305766902"], [361, 17, 13, "Object is possibly \'undefined\'.", "1305766902"] ], - "js/ducks/search/sagas.ts:2537273293": [ - [116, 10, 7, "Property \'filters\' does not exist on type \'UpdateSearchStatePayload | undefined\'.", "1789297334"], - [116, 19, 8, "Property \'resource\' does not exist on type \'UpdateSearchStatePayload | undefined\'.", "2131237679"], - [116, 29, 9, "Property \'updateUrl\' does not exist on type \'UpdateSearchStatePayload | undefined\'.", "3222485055"], - [116, 40, 12, "Property \'submitSearch\' does not exist on type \'UpdateSearchStatePayload | undefined\'.", "30183583"] + "js/ducks/search/sagas.ts:2952790030": [ + [114, 10, 7, "Property \'filters\' does not exist on type \'UpdateSearchStatePayload | undefined\'.", "1789297334"], + [114, 19, 8, "Property \'resource\' does not exist on type \'UpdateSearchStatePayload | undefined\'.", "2131237679"], + [114, 29, 9, "Property \'updateUrl\' does not exist on type \'UpdateSearchStatePayload | undefined\'.", "3222485055"], + [114, 40, 12, "Property \'submitSearch\' does not exist on type \'UpdateSearchStatePayload | undefined\'.", "30183583"] ], "js/ducks/search/utils.ts:1054027285": [ [22, 13, 12, "Object is possibly \'undefined\'.", "589203217"], [24, 13, 11, "Object is possibly \'undefined\'.", "668071166"], [26, 13, 16, "Object is possibly \'undefined\'.", "3205469291"] ], - "js/ducks/tableMetadata/api/helpers.spec.ts:2186521600": [ - [191, 44, 8, "Argument of type \'{ display_name: null; email: string; employee_type: string; first_name: string; full_name: string; github_username: string; is_active: boolean; last_name: string; manager_email?: string | undefined; ... 5 more ...; user_id: string; }\' is not assignable to parameter of type \'PeopleUser\'.\\n Types of property \'display_name\' are incompatible.\\n Type \'null\' is not assignable to type \'string\'.", "3765169026"] + "js/ducks/tableMetadata/api/helpers.spec.ts:3775424408": [ + [184, 44, 8, "Argument of type \'{ display_name: null; email: string; employee_type: string; first_name: string; full_name: string; github_username: string; is_active: boolean; last_name: string; manager_email?: string | undefined; ... 5 more ...; user_id: string; }\' is not assignable to parameter of type \'PeopleUser\'.\\n Types of property \'display_name\' are incompatible.\\n Type \'null\' is not assignable to type \'string\'.", "3765169026"] ], - "js/ducks/tableMetadata/api/v0.ts:78752867": [ + "js/ducks/tableMetadata/api/v0.ts:1644381619": [ [137, 24, 7, "Argument of type \'Promise | undefined>\' is not assignable to parameter of type \'never\'.", "1363914868"] ], - "js/ducks/tableMetadata/reducer.ts:1854876685": [ - [66, 2, 10, "Type \'null\' is not assignable to type \'number\'.", "3382497788"] + "js/ducks/tableMetadata/index.spec.ts:535377148": [ + [485, 66, 4, "Argument of type \'null\' is not assignable to parameter of type \'(() => any) | undefined\'.", "2087897566"], + [512, 53, 4, "Argument of type \'null\' is not assignable to parameter of type \'(() => any) | undefined\'.", "2087897566"], + [625, 16, 4, "Argument of type \'null\' is not assignable to parameter of type \'(() => any) | undefined\'.", "2087897566"], + [657, 16, 4, "Argument of type \'null\' is not assignable to parameter of type \'(() => any) | undefined\'.", "2087897566"] ], - "js/ducks/tableMetadata/tests/index.spec.ts:4184850197": [ - [491, 66, 4, "Argument of type \'null\' is not assignable to parameter of type \'(() => any) | undefined\'.", "2087897566"], - [518, 53, 4, "Argument of type \'null\' is not assignable to parameter of type \'(() => any) | undefined\'.", "2087897566"], - [631, 16, 4, "Argument of type \'null\' is not assignable to parameter of type \'(() => any) | undefined\'.", "2087897566"], - [663, 16, 4, "Argument of type \'null\' is not assignable to parameter of type \'(() => any) | undefined\'.", "2087897566"] + "js/ducks/tableMetadata/reducer.ts:2668005658": [ + [65, 2, 10, "Type \'null\' is not assignable to type \'number\'.", "3382497788"] ], "js/ducks/tags/reducer.ts:419330645": [ [130, 16, 48, "Object is possibly \'undefined\'.", "1931932323"] diff --git a/amundsen_application/static/css/_icons.scss b/amundsen_application/static/css/_icons.scss index a204f332f..f56b7af4d 100644 --- a/amundsen_application/static/css/_icons.scss +++ b/amundsen_application/static/css/_icons.scss @@ -29,6 +29,10 @@ $users: ( users: '/static/images/icons/users.svg', ); +$check: ( + check: '/static/images/icons/check.svg', +); + // Given a Map of key/value pairs, generates a new class @mixin iconBackgrounds($map) { @each $name, $url in $map { @@ -43,6 +47,7 @@ span.icon { @include iconBackgrounds($data-stores); @include iconBackgrounds($dashboards); @include iconBackgrounds($users); + @include iconBackgrounds($check); background-color: $icon-bg; border: none; @@ -55,6 +60,8 @@ span.icon { } img.icon { + /*DEPRECATED: follow behavior above to generate + icons*/ background-color: $icon-bg; border: none; height: $icon-size; diff --git a/amundsen_application/static/images/icons/check.svg b/amundsen_application/static/images/icons/check.svg new file mode 100644 index 000000000..ca1e1383f --- /dev/null +++ b/amundsen_application/static/images/icons/check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/amundsen_application/static/js/components/DashboardPage/constants.ts b/amundsen_application/static/js/components/DashboardPage/constants.ts index 097dd4fb4..45d5a9722 100644 --- a/amundsen_application/static/js/components/DashboardPage/constants.ts +++ b/amundsen_application/static/js/components/DashboardPage/constants.ts @@ -7,4 +7,3 @@ export const ADD_DESC_TEXT = 'Add Description in'; export const EDIT_DESC_TEXT = 'Click to edit description in'; export const LAST_RUN_SUCCEEDED = 'succeeded'; -export const LAST_RUN_FAILED = 'failed'; diff --git a/amundsen_application/static/js/components/DashboardPage/index.spec.tsx b/amundsen_application/static/js/components/DashboardPage/index.spec.tsx index c3f3e60e0..365d340cb 100644 --- a/amundsen_application/static/js/components/DashboardPage/index.spec.tsx +++ b/amundsen_application/static/js/components/DashboardPage/index.spec.tsx @@ -10,13 +10,11 @@ import { shallow } from 'enzyme'; import LoadingSpinner from 'components/common/LoadingSpinner'; import Breadcrumb from 'components/common/Breadcrumb'; import BookmarkIcon from 'components/common/Bookmark/BookmarkIcon'; -import Flag from 'components/common/Flag'; import ResourceList from 'components/common/ResourceList'; import TabsComponent from 'components/common/TabsComponent'; import { dashboardMetadata } from 'fixtures/metadata/dashboard'; import { NO_TIMESTAMP_TEXT } from 'components/constants'; import { ResourceType } from 'interfaces'; -import { BadgeStyle } from 'config/config-types'; import ChartList from './ChartList'; import DashboardOwnerEditor from './DashboardOwnerEditor'; import ImagePreview from './ImagePreview'; @@ -139,26 +137,6 @@ describe('DashboardPage', () => { }); }); - describe('mapStatusToStyle', () => { - let wrapper; - - beforeAll(() => { - ({ wrapper } = setup()); - }); - - it('returns BadgeStyle.SUCCESS if status === LAST_RUN_SUCCEEDED', () => { - expect( - wrapper.instance().mapStatusToStyle(Constants.LAST_RUN_SUCCEEDED) - ).toBe(BadgeStyle.SUCCESS); - }); - - it('returns BadgeStyle.DANGER if status !== LAST_RUN_SUCCEEDED', () => { - expect(wrapper.instance().mapStatusToStyle('anythingelse')).toBe( - BadgeStyle.DANGER - ); - }); - }); - describe('render', () => { const { props, wrapper } = setup(); @@ -215,19 +193,13 @@ describe('DashboardPage', () => { expect(wrapper.find(DashboardOwnerEditor).exists()).toBe(true); }); - it('renders a Flag for last run state', () => { - const mockStyle = BadgeStyle.DANGER; - const mapStatusToStyleSpy = jest - .spyOn(wrapper.instance(), 'mapStatusToStyle') - .mockImplementationOnce(() => mockStyle); - wrapper.instance().forceUpdate(); - const element = wrapper.find('.last-run-state').find(Flag); - - expect(element.props().text).toBe(props.dashboard.last_run_state); - expect(mapStatusToStyleSpy).toHaveBeenCalledWith( - props.dashboard.last_run_state - ); - expect(element.props().labelStyle).toBe(mockStyle); + it('renders a ResourceStatusMarker for last run state', () => { + const expected = 1; + const actual = wrapper + .find('.last-run-state') + .find('ResourceStatusMarker').length; + + expect(actual).toEqual(expected); }); it('renders an ImagePreview with correct props', () => { diff --git a/amundsen_application/static/js/components/DashboardPage/index.tsx b/amundsen_application/static/js/components/DashboardPage/index.tsx index dacc08c8a..87e0880e6 100644 --- a/amundsen_application/static/js/components/DashboardPage/index.tsx +++ b/amundsen_application/static/js/components/DashboardPage/index.tsx @@ -13,7 +13,6 @@ import * as ReactMarkdown from 'react-markdown'; import AvatarLabel from 'components/common/AvatarLabel'; import Breadcrumb from 'components/common/Breadcrumb'; import BookmarkIcon from 'components/common/Bookmark/BookmarkIcon'; -import Flag from 'components/common/Flag'; import EditableSection from 'components/common/EditableSection'; import LoadingSpinner from 'components/common/LoadingSpinner'; import TabsComponent from 'components/common/TabsComponent'; @@ -25,15 +24,16 @@ import { DashboardMetadata } from 'interfaces/Dashboard'; import DashboardOwnerEditor from 'components/DashboardPage/DashboardOwnerEditor'; import QueryList from 'components/DashboardPage/QueryList'; import ChartList from 'components/DashboardPage/ChartList'; +import ResourceStatusMarker from 'components/common/ResourceStatusMarker'; import { formatDateTimeShort } from 'utils/dateUtils'; import ResourceList from 'components/common/ResourceList'; import { ADD_DESC_TEXT, EDIT_DESC_TEXT, - DASHBOARD_SOURCE, - LAST_RUN_SUCCEEDED, OWNER_HEADER_TEXT, + DASHBOARD_SOURCE, TABLES_PER_PAGE, + LAST_RUN_SUCCEEDED, } from 'components/DashboardPage/constants'; import TagInput from 'components/common/Tags/TagInput'; import { ResourceType } from 'interfaces'; @@ -109,11 +109,11 @@ export class DashboardPage extends React.Component< } } - mapStatusToStyle = (status: string): BadgeStyle => { + mapStatusToBoolean = (status: string): boolean => { if (status === LAST_RUN_SUCCEEDED) { - return BadgeStyle.SUCCESS; + return true; } - return BadgeStyle.DANGER; + return false; }; renderTabs() { @@ -304,10 +304,9 @@ export class DashboardPage extends React.Component< : NO_TIMESTAMP_TEXT}
- diff --git a/amundsen_application/static/js/components/ProfilePage/constants.ts b/amundsen_application/static/js/components/ProfilePage/constants.ts index 08266934c..9f345dd2b 100644 --- a/amundsen_application/static/js/components/ProfilePage/constants.ts +++ b/amundsen_application/static/js/components/ProfilePage/constants.ts @@ -18,3 +18,5 @@ export const GITHUB_LINK_TEXT = 'Github'; export const EMPTY_TEXT_PREFIX = 'User has no'; export const FOOTER_TEXT_PREFIX = 'View all'; + +export const NOT_ACTIVE_USER_TEXT = 'Alumni'; diff --git a/amundsen_application/static/js/components/ProfilePage/index.spec.tsx b/amundsen_application/static/js/components/ProfilePage/index.spec.tsx index 34376932e..2f9002948 100644 --- a/amundsen_application/static/js/components/ProfilePage/index.spec.tsx +++ b/amundsen_application/static/js/components/ProfilePage/index.spec.tsx @@ -335,23 +335,6 @@ describe('ProfilePage', () => { ); }); - it('renders Flag with correct props if user not active', () => { - const userCopy = { - ...globalState.user.profile.user, - is_active: false, - }; - const { wrapper } = setup({ - user: userCopy, - }); - expect( - wrapper.find('.header-title-text').find(Flag).props() - ).toMatchObject({ - caseType: 'sentenceCase', - labelStyle: BadgeStyle.DANGER, - text: 'Alumni', - }); - }); - it('renders user role', () => { expect(wrapper.find('#user-role').text()).toEqual('Tester'); }); @@ -366,6 +349,18 @@ describe('ProfilePage', () => { ); }); + it('renders alumni bullet is user not active', () => { + const userCopy = { + ...globalState.user.profile.user, + is_active: false, + }; + const { wrapper } = setup({ + user: userCopy, + }); + const expected = 1; + expect(wrapper.find('#alumni').length).toEqual(expected); + }); + it('renders github link with correct href', () => { expect(wrapper.find('#github-link').props().href).toEqual( 'https://github.com/githubName' diff --git a/amundsen_application/static/js/components/ProfilePage/index.tsx b/amundsen_application/static/js/components/ProfilePage/index.tsx index b60d2b6f0..17a9928e2 100644 --- a/amundsen_application/static/js/components/ProfilePage/index.tsx +++ b/amundsen_application/static/js/components/ProfilePage/index.tsx @@ -43,6 +43,7 @@ import { FOOTER_TEXT_PREFIX, GITHUB_LINK_TEXT, ITEMS_PER_PAGE, + NOT_ACTIVE_USER_TEXT, OWNED_LABEL, OWNED_SOURCE, OWNED_TITLE_PREFIX, @@ -213,16 +214,7 @@ export class ProfilePage extends React.Component< ); } else { userName = ( -

- {user.display_name} - {!user.is_active && ( - - )} -

+

{user.display_name}

); } @@ -238,6 +230,7 @@ export class ProfilePage extends React.Component< {user.manager_fullname && (
  • {`Manager: ${user.manager_fullname}`}
  • )} + {!user.is_active &&
  • {NOT_ACTIVE_USER_TEXT}
  • }
    ); diff --git a/amundsen_application/static/js/components/TableDetail/TableHeaderBullets/constants.ts b/amundsen_application/static/js/components/TableDetail/TableHeaderBullets/constants.ts new file mode 100644 index 000000000..d31b6f6c7 --- /dev/null +++ b/amundsen_application/static/js/components/TableDetail/TableHeaderBullets/constants.ts @@ -0,0 +1 @@ +export const TABLE_VIEW_TEXT = 'table view'; diff --git a/amundsen_application/static/js/components/TableDetail/TableHeaderBullets/index.spec.tsx b/amundsen_application/static/js/components/TableDetail/TableHeaderBullets/index.spec.tsx index 46e73dce0..85970be4f 100644 --- a/amundsen_application/static/js/components/TableDetail/TableHeaderBullets/index.spec.tsx +++ b/amundsen_application/static/js/components/TableDetail/TableHeaderBullets/index.spec.tsx @@ -15,6 +15,7 @@ import TableHeaderBullets, { TableHeaderBulletsProps } from '.'; const MOCK_RESOURCE_DISPLAY_NAME = 'Test'; const MOCK_DB_DISPLAY_NAME = 'AlsoTest'; +const TABLE_VIEW_TEXT = 'table view'; jest.mock('config/config-utils', () => ({ getDisplayNameByResource: jest.fn(), @@ -26,6 +27,7 @@ describe('TableHeaderBullets', () => { const props: TableHeaderBulletsProps = { database: 'hive', cluster: 'main', + isView: true, ...propOverrides, }; const wrapper = shallow(); @@ -71,5 +73,9 @@ describe('TableHeaderBullets', () => { it('renders a list with cluster', () => { expect(listElement.find('li').at(2).text()).toEqual(props.cluster); }); + + it('renders a list with table view', () => { + expect(listElement.find('li').at(3).text()).toEqual(TABLE_VIEW_TEXT); + }); }); }); diff --git a/amundsen_application/static/js/components/TableDetail/TableHeaderBullets/index.tsx b/amundsen_application/static/js/components/TableDetail/TableHeaderBullets/index.tsx index 3914cbdc5..9740ef314 100644 --- a/amundsen_application/static/js/components/TableDetail/TableHeaderBullets/index.tsx +++ b/amundsen_application/static/js/components/TableDetail/TableHeaderBullets/index.tsx @@ -10,20 +10,25 @@ import { import { ResourceType } from 'interfaces/Resources'; +import { TABLE_VIEW_TEXT } from './constants'; + export interface TableHeaderBulletsProps { cluster: string; database: string; + isView: boolean; } const TableHeaderBullets: React.FC = ({ cluster, database, + isView, }: TableHeaderBulletsProps) => { return (
    • {getDisplayNameByResource(ResourceType.table)}
    • {getSourceDisplayName(database, ResourceType.table)}
    • {cluster}
    • + {isView &&
    • {TABLE_VIEW_TEXT}
    • }
    ); }; @@ -31,6 +36,7 @@ const TableHeaderBullets: React.FC = ({ TableHeaderBullets.defaultProps = { cluster: '', database: '', + isView: false, }; export default TableHeaderBullets; diff --git a/amundsen_application/static/js/components/TableDetail/index.tsx b/amundsen_application/static/js/components/TableDetail/index.tsx index 4e3064690..1ac52acfd 100644 --- a/amundsen_application/static/js/components/TableDetail/index.tsx +++ b/amundsen_application/static/js/components/TableDetail/index.tsx @@ -27,7 +27,6 @@ import TabsComponent from 'components/common/TabsComponent'; import TagInput from 'components/common/Tags/TagInput'; import EditableText from 'components/common/EditableText'; import LoadingSpinner from 'components/common/LoadingSpinner'; -import Flag from 'components/common/Flag'; import ColumnList from 'components/TableDetail/ColumnList'; import DataPreviewButton from 'components/TableDetail/DataPreviewButton'; @@ -238,11 +237,9 @@ export class TableDetail extends React.Component< {data.badges.length > 0 && } - {data.is_view && ( - - )}
    diff --git a/amundsen_application/static/js/components/common/Card/styles.scss b/amundsen_application/static/js/components/common/Card/styles.scss index e7d27bb53..c4d97ec1a 100644 --- a/amundsen_application/static/js/components/common/Card/styles.scss +++ b/amundsen_application/static/js/components/common/Card/styles.scss @@ -86,9 +86,10 @@ $card-copy-max-lines: 3; @each $line in $shimmer-loader-items { .shimmer-row-line--#{$line} { - width: ( + width: + ( random($shimmer-loader-row-max-width - $shimmer-loader-row-min-width) + - $shimmer-loader-row-min-width + $shimmer-loader-row-min-width ) + px; } diff --git a/amundsen_application/static/js/components/common/ResourceListItem/UserListItem/index.spec.tsx b/amundsen_application/static/js/components/common/ResourceListItem/UserListItem/index.spec.tsx index b487900b8..2e96360fe 100644 --- a/amundsen_application/static/js/components/common/ResourceListItem/UserListItem/index.spec.tsx +++ b/amundsen_application/static/js/components/common/ResourceListItem/UserListItem/index.spec.tsx @@ -182,38 +182,6 @@ describe('UserListItem', () => { expect(resourceBadges.exists()).toBe(true); }); - it('does not render Alumni flag if user is active', () => { - expect(resourceBadges.find(Flag).exists()).toBe(false); - }); - - it('renders Alumni flag if user not active', () => { - const { wrapper } = setup({ - user: { - type: ResourceType.user, - display_name: 'firstname lastname', - email: 'test@test.com', - employee_type: 'fulltime', - first_name: 'firstname', - full_name: 'firstname lastname', - github_username: 'githubName', - is_active: false, - last_name: 'lastname', - manager_fullname: 'Test Manager', - profile_url: 'www.test.com', - role_name: 'Tester', - slack_id: 'www.slack.com', - team_name: 'QA', - user_id: 'test0', - }, - }); - const flagComponent = wrapper.find('.resource-badges').find(Flag); - expect(flagComponent.exists()).toBe(true); - expect(flagComponent.props()).toMatchObject({ - text: 'Alumni', - labelStyle: BadgeStyle.DANGER, - }); - }); - it('renders correct end icon', () => { const expectedClassName = 'icon icon-right'; expect(resourceBadges.find('img').props().className).toEqual( diff --git a/amundsen_application/static/js/components/common/ResourceListItem/UserListItem/index.tsx b/amundsen_application/static/js/components/common/ResourceListItem/UserListItem/index.tsx index 4bbd0c058..def5362ea 100644 --- a/amundsen_application/static/js/components/common/ResourceListItem/UserListItem/index.tsx +++ b/amundsen_application/static/js/components/common/ResourceListItem/UserListItem/index.tsx @@ -56,9 +56,6 @@ class UserListItem extends React.Component {
    User
    - {!user.is_active && ( - - )}
    diff --git a/amundsen_application/static/js/components/common/ResourceStatusMarker/index.spec.tsx b/amundsen_application/static/js/components/common/ResourceStatusMarker/index.spec.tsx new file mode 100644 index 000000000..9a60c017d --- /dev/null +++ b/amundsen_application/static/js/components/common/ResourceStatusMarker/index.spec.tsx @@ -0,0 +1,53 @@ +// Copyright Contributors to the Amundsen project. +// SPDX-License-Identifier: Apache-2.0 + +import * as React from 'react'; + +import { mount } from 'enzyme'; + +import ResourceStatusMarker, { StatusMarkerProps } from '.'; + +const setup = (propsOverrides?: Partial) => { + const props = { + stateText: '', + succeeded: false, + ...propsOverrides, + }; + const wrapper = mount( + + ); + return { props, wrapper }; +}; + +describe('RunStateContainer', () => { + describe('Succeded', () => { + it('renders SuccessState when lastRunState successful', () => { + const { wrapper } = setup({ + stateText: 'Succeeded', + succeeded: true, + }); + + const expected = 1; + const actual = wrapper.find('.success').length; + + expect(actual).toEqual(expected); + }); + }); + describe('Failed', () => { + const { wrapper } = setup({ + stateText: 'Failed', + }); + it('renders MissedState when lastRunState failed', () => { + const expected = 1; + const actual = wrapper.find('.failure').length; + + expect(actual).toEqual(expected); + }); + it('renders failure icon', () => { + const expected = 1; + const actual = wrapper.find('.failure-icon').length; + + expect(expected).toEqual(actual); + }); + }); +}); diff --git a/amundsen_application/static/js/components/common/ResourceStatusMarker/index.tsx b/amundsen_application/static/js/components/common/ResourceStatusMarker/index.tsx new file mode 100644 index 000000000..1b11cd657 --- /dev/null +++ b/amundsen_application/static/js/components/common/ResourceStatusMarker/index.tsx @@ -0,0 +1,51 @@ +// Copyright Contributors to the Amundsen project. +// SPDX-License-Identifier: Apache-2.0 + +import * as React from 'react'; + +import './styles.scss'; + +export interface StatusMarkerProps { + stateText: string; + succeeded: boolean; +} + +export interface StateProps { + stateText: string; +} + +const FailureState: React.FC = ({ stateText }: StateProps) => { + return ( +
    +
    +
    +
    +
    + {stateText} +
    + ); +}; + +const SuccessState: React.FC = ({ stateText }: StateProps) => { + return ( +
    +
    + +
    + {stateText} +
    + ); +}; + +const ResourceStatusMarker: React.FC = ({ + stateText, + succeeded, +}: StatusMarkerProps) => { + const state = stateText.charAt(0).toUpperCase() + stateText.slice(1); + if (succeeded) { + return ; + } + return ; +}; + +export default ResourceStatusMarker; diff --git a/amundsen_application/static/js/components/common/ResourceStatusMarker/styles.scss b/amundsen_application/static/js/components/common/ResourceStatusMarker/styles.scss new file mode 100644 index 000000000..7091e0a58 --- /dev/null +++ b/amundsen_application/static/js/components/common/ResourceStatusMarker/styles.scss @@ -0,0 +1,59 @@ +// Copyright Contributors to the Amundsen project. +// SPDX-License-Identifier: Apache-2.0 + +@import 'variables'; +@import 'typography-default'; + +$icon-status-color: #f2f2f2; +$icon-status-missed: $sunset60; +$icon-status-hit: #00824c; +$icon-size: 14px; + +.failure-icon, +.success-icon { + width: $icon-size; + height: $icon-size; + border-radius: 100%; + display: inline-block; + vertical-align: middle; +} + +.failure-icon { + background-color: $icon-status-missed; + + .exclamation-top { + width: 2px; + height: 4px; + background-color: $icon-status-color; + margin: 4px 6px 3px; + } + + .exclamation-bottom { + width: 2px; + height: 2px; + border-radius: 100%; + background-color: $icon-status-color; + margin: -2px 6px; + } +} + +.success-icon { + background-color: $icon-status-hit; + + .icon-check { + background-color: $icon-status-color; + width: 10px; + height: 10px; + margin-top: -6px; + margin-left: 2px; + min-width: 0; + } +} + +.status-text { + @extend %text-body-w2; + + display: inline-block; + margin-left: $spacer-1; + vertical-align: middle; +}