Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(inventoryList): issues/442 activate last seen tooltip #445

Merged
merged 1 commit into from
Oct 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ exports[`OpenshiftView Component should display an alternate graph on query-stri
"id": "inventoryId",
},
Object {
"cell": [Function],
"id": "lastSeen",
},
]
Expand All @@ -121,6 +122,7 @@ exports[`OpenshiftView Component should display an alternate graph on query-stri
"isSortable": true,
},
Object {
"cell": [Function],
"id": "lastSeen",
"isSortable": true,
},
Expand Down Expand Up @@ -242,6 +244,7 @@ exports[`OpenshiftView Component should have a fallback title: title 1`] = `
"id": "inventoryId",
},
Object {
"cell": [Function],
"id": "lastSeen",
},
]
Expand All @@ -264,6 +267,7 @@ exports[`OpenshiftView Component should have a fallback title: title 1`] = `
"isSortable": true,
},
Object {
"cell": [Function],
"id": "lastSeen",
"isSortable": true,
},
Expand Down Expand Up @@ -299,7 +303,9 @@ Object {
lorem
</Button>,
"lorem inventory id",
"lorem month ago",
<DateFormat
date="lorem date obj"
/>,
],
"columnHeaders": Array [
"t(curiosity-inventory.header, [object Object])",
Expand All @@ -317,7 +323,7 @@ Object {
},
"lastSeen": Object {
"title": "t(curiosity-inventory.header, [object Object])",
"value": "lorem month ago",
"value": "lorem date obj",
},
"loremIpsum": Object {
"title": "t(curiosity-inventory.header, [object Object])",
Expand Down Expand Up @@ -354,7 +360,9 @@ Object {
</React.Fragment>,
10,
12,
"lorem month ago",
<DateFormat
date="lorem date obj"
/>,
],
"columnHeaders": Array [
"t(curiosity-inventory.header, [object Object])",
Expand Down Expand Up @@ -382,7 +390,7 @@ Object {
},
"lastSeen": Object {
"title": "t(curiosity-inventory.header, [object Object])",
"value": "lorem month ago",
"value": "lorem date obj",
},
"loremIpsum": Object {
"title": "t(curiosity-inventory.header, [object Object])",
Expand Down Expand Up @@ -435,6 +443,7 @@ Object {
"id": "inventoryId",
},
Object {
"cell": [Function],
"id": "lastSeen",
},
],
Expand All @@ -460,6 +469,7 @@ Object {
"isSortable": true,
},
Object {
"cell": [Function],
"id": "lastSeen",
"isSortable": true,
},
Expand Down Expand Up @@ -574,6 +584,7 @@ exports[`OpenshiftView Component should render a non-connected component: non-co
"id": "inventoryId",
},
Object {
"cell": [Function],
"id": "lastSeen",
},
]
Expand All @@ -596,6 +607,7 @@ exports[`OpenshiftView Component should render a non-connected component: non-co
"isSortable": true,
},
Object {
"cell": [Function],
"id": "lastSeen",
"isSortable": true,
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/openshiftView/__tests__/openshiftView.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('OpenshiftView Component', () => {
numberOfGuests: 3,
sockets: 10,
cores: 12,
lastSeen: 'lorem month ago',
lastSeen: 'lorem date obj',
loremIpsum: 'hello world'
}
});
Expand All @@ -76,7 +76,7 @@ describe('OpenshiftView Component', () => {
displayName: 'lorem',
inventoryId: 'lorem inventory id',
subscriptionManagerId: 'lorem subscription id',
lastSeen: 'lorem month ago',
lastSeen: 'lorem date obj',
loremIpsum: 'hello world'
}
});
Expand Down
5 changes: 4 additions & 1 deletion src/components/openshiftView/openshiftView.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
chart_color_blue_300 as chartColorBlueDark
} from '@patternfly/react-tokens';
import { Badge, Button } from '@patternfly/react-core';
import { DateFormat } from '@redhat-cloud-services/frontend-components/components/cjs/DateFormat';
import { PageLayout, PageHeader, PageSection, PageToolbar } from '../pageLayout/pageLayout';
import {
RHSM_API_QUERY_GRANULARITY_TYPES as GRANULARITY_TYPES,
Expand Down Expand Up @@ -279,7 +280,8 @@ OpenshiftView.defaultProps = {
id: 'inventoryId'
},
{
id: 'lastSeen'
id: 'lastSeen',
cell: obj => (obj?.lastSeen?.value && <DateFormat date={obj?.lastSeen?.value} />) || ''
}
],
initialInventoryFilters: [
Expand Down Expand Up @@ -331,6 +333,7 @@ OpenshiftView.defaultProps = {
},
{
id: 'lastSeen',
cell: obj => (obj?.lastSeen?.value && <DateFormat date={obj?.lastSeen?.value} />) || '',
isSortable: true
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ exports[`RhelView Component should display an alternate graph on query-string up
"id": "inventoryId",
},
Object {
"cell": [Function],
"id": "lastSeen",
},
]
Expand All @@ -107,6 +108,7 @@ exports[`RhelView Component should display an alternate graph on query-string up
"isSortable": true,
},
Object {
"cell": [Function],
"id": "lastSeen",
"isSortable": true,
},
Expand Down Expand Up @@ -214,6 +216,7 @@ exports[`RhelView Component should have a fallback title: title 1`] = `
"id": "inventoryId",
},
Object {
"cell": [Function],
"id": "lastSeen",
},
]
Expand All @@ -235,6 +238,7 @@ exports[`RhelView Component should have a fallback title: title 1`] = `
"isSortable": true,
},
Object {
"cell": [Function],
"id": "lastSeen",
"isSortable": true,
},
Expand Down Expand Up @@ -269,7 +273,9 @@ Object {
lorem
</Button>,
"lorem inventory id",
"lorem month ago",
<DateFormat
date="lorem date obj"
/>,
],
"columnHeaders": Array [
"t(curiosity-inventory.header, [object Object])",
Expand All @@ -287,7 +293,7 @@ Object {
},
"lastSeen": Object {
"title": "t(curiosity-inventory.header, [object Object])",
"value": "lorem month ago",
"value": "lorem date obj",
},
"loremIpsum": Object {
"title": "t(curiosity-inventory.header, [object Object])",
Expand Down Expand Up @@ -323,7 +329,9 @@ Object {
</Badge>
</React.Fragment>,
10,
"lorem month ago",
<DateFormat
date="lorem date obj"
/>,
],
"columnHeaders": Array [
"t(curiosity-inventory.header, [object Object])",
Expand All @@ -350,7 +358,7 @@ Object {
},
"lastSeen": Object {
"title": "t(curiosity-inventory.header, [object Object])",
"value": "lorem month ago",
"value": "lorem date obj",
},
"loremIpsum": Object {
"title": "t(curiosity-inventory.header, [object Object])",
Expand Down Expand Up @@ -402,6 +410,7 @@ Object {
"id": "inventoryId",
},
Object {
"cell": [Function],
"id": "lastSeen",
},
],
Expand All @@ -421,6 +430,7 @@ Object {
"isSortable": true,
},
Object {
"cell": [Function],
"id": "lastSeen",
"isSortable": true,
},
Expand Down Expand Up @@ -521,6 +531,7 @@ exports[`RhelView Component should render a non-connected component: non-connect
"id": "inventoryId",
},
Object {
"cell": [Function],
"id": "lastSeen",
},
]
Expand All @@ -542,6 +553,7 @@ exports[`RhelView Component should render a non-connected component: non-connect
"isSortable": true,
},
Object {
"cell": [Function],
"id": "lastSeen",
"isSortable": true,
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/rhelView/__tests__/rhelView.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('RhelView Component', () => {
numberOfGuests: 3,
sockets: 10,
cores: 12,
lastSeen: 'lorem month ago',
lastSeen: 'lorem date obj',
loremIpsum: 'hello world'
}
});
Expand All @@ -76,7 +76,7 @@ describe('RhelView Component', () => {
displayName: 'lorem',
inventoryId: 'lorem inventory id',
subscriptionManagerId: 'lorem subscription id',
lastSeen: 'lorem month ago',
lastSeen: 'lorem date obj',
loremIpsum: 'hello world'
}
});
Expand Down
5 changes: 4 additions & 1 deletion src/components/rhelView/rhelView.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
chart_color_purple_300 as chartColorPurpleDark
} from '@patternfly/react-tokens';
import { Badge, Button } from '@patternfly/react-core';
import { DateFormat } from '@redhat-cloud-services/frontend-components/components/cjs/DateFormat';
import { PageLayout, PageHeader, PageSection, PageToolbar } from '../pageLayout/pageLayout';
import {
RHSM_API_QUERY_SORT_DIRECTION_TYPES as SORT_DIRECTION_TYPES,
Expand Down Expand Up @@ -201,7 +202,8 @@ RhelView.defaultProps = {
id: 'inventoryId'
},
{
id: 'lastSeen'
id: 'lastSeen',
cell: obj => (obj?.lastSeen?.value && <DateFormat date={obj?.lastSeen?.value} />) || ''
}
],
initialInventoryFilters: [
Expand Down Expand Up @@ -247,6 +249,7 @@ RhelView.defaultProps = {
},
{
id: 'lastSeen',
cell: obj => (obj?.lastSeen?.value && <DateFormat date={obj?.lastSeen?.value} />) || '',
isSortable: true
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ Object {
Object {
"displayName": "db.lorem.com",
"insightsId": "d6214a0b-b344-4778-831c-d53dcacb2da3",
"lastSeen": "17 days ago",
"lastSeen": 2019-07-03T00:00:00.000Z,
"subscriptionManagerId": "adafd9d5-5b00-42fa-a6c9-75801d45cc6d",
},
Object {
"displayName": "db.ipsum.com",
"insightsId": "9358e312-1c9f-42f4-8910-dcef6e970852",
"lastSeen": "in a month",
"lastSeen": 2019-09-04T00:00:00.000Z,
"subscriptionManagerId": "b101a72f-1859-4489-acb8-d6d31c2578c4",
},
],
Expand Down Expand Up @@ -61,13 +61,13 @@ Object {
Object {
"displayName": null,
"insightsId": "d6214a0b-b344-4778-831c-d53dcacb2da3",
"lastSeen": "in a year",
"lastSeen": null,
"subscriptionManagerId": "adafd9d5-5b00-42fa-a6c9-75801d45cc6d",
},
Object {
"displayName": "db.example.com",
"insightsId": "9358e312-1c9f-42f4-8910-dcef6e970852",
"lastSeen": "in a month",
"lastSeen": 2019-09-04T00:00:00.000Z,
"subscriptionManagerId": null,
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Object {
"hardwareType": "physical",
"insightsId": "d6214a0b-b344-4778-831c-d53dcacb2da3",
"inventoryId": null,
"lastSeen": "17 days ago",
"lastSeen": 2019-07-03T00:00:00.000Z,
"numberOfGuests": null,
"sockets": 1,
"subscriptionManagerId": null,
Expand All @@ -35,7 +35,7 @@ Object {
"hardwareType": "physical",
"insightsId": "9358e312-1c9f-42f4-8910-dcef6e970852",
"inventoryId": null,
"lastSeen": "in a month",
"lastSeen": 2019-09-04T00:00:00.000Z,
"numberOfGuests": null,
"sockets": 1,
"subscriptionManagerId": null,
Expand Down Expand Up @@ -85,7 +85,7 @@ Object {
"hardwareType": "physical",
"insightsId": "9358e312-1c9f-42f4-8910-dcef6e970852",
"inventoryId": null,
"lastSeen": "in a month",
"lastSeen": 2019-09-04T00:00:00.000Z,
"numberOfGuests": null,
"sockets": 1,
"subscriptionManagerId": null,
Expand All @@ -111,7 +111,7 @@ Object {
"hardwareType": "physical",
"insightsId": "d6214a0b-b344-4778-831c-d53dcacb2da3",
"inventoryId": null,
"lastSeen": "17 days ago",
"lastSeen": 2019-07-03T00:00:00.000Z,
"numberOfGuests": null,
"sockets": 1,
"subscriptionManagerId": null,
Expand All @@ -137,7 +137,7 @@ Object {
"hardwareType": "physical",
"insightsId": "d6214a0b-b344-4778-831c-d53dcacb2da3",
"inventoryId": null,
"lastSeen": "17 days ago",
"lastSeen": 2019-07-03T00:00:00.000Z,
"numberOfGuests": null,
"sockets": 1,
"subscriptionManagerId": null,
Expand All @@ -163,7 +163,7 @@ Object {
"hardwareType": "physical",
"insightsId": "9358e312-1c9f-42f4-8910-dcef6e970852",
"inventoryId": null,
"lastSeen": "in a month",
"lastSeen": 2019-09-04T00:00:00.000Z,
"numberOfGuests": null,
"sockets": 1,
"subscriptionManagerId": null,
Expand All @@ -189,7 +189,7 @@ Object {
"hardwareType": null,
"insightsId": "d6214a0b-b344-4778-831c-d53dcacb2da3",
"inventoryId": null,
"lastSeen": "in a year",
"lastSeen": null,
"numberOfGuests": null,
"sockets": 1,
"subscriptionManagerId": null,
Expand All @@ -200,7 +200,7 @@ Object {
"hardwareType": "physical",
"insightsId": "9358e312-1c9f-42f4-8910-dcef6e970852",
"inventoryId": null,
"lastSeen": "in a month",
"lastSeen": 2019-09-04T00:00:00.000Z,
"numberOfGuests": null,
"sockets": null,
"subscriptionManagerId": null,
Expand Down
Loading