From 74fa6e0371a2f5f893903f41307e4f8f6d7beb3b Mon Sep 17 00:00:00 2001 From: John Callahan Date: Tue, 14 Jan 2020 13:41:52 -0500 Subject: [PATCH] Add "Show All" option to Domain Records This uses the same Local Storage key as Linodes, Domains, Volumes, and NodeBalancers, so if you select "Show All" on one of those pages, you'll see all of your Domain Records listed as well. --- .../src/features/Domains/DomainRecords.tsx | 40 +++++++------------ 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/packages/manager/src/features/Domains/DomainRecords.tsx b/packages/manager/src/features/Domains/DomainRecords.tsx index bed9abcc95a..93250887243 100644 --- a/packages/manager/src/features/Domains/DomainRecords.tsx +++ b/packages/manager/src/features/Domains/DomainRecords.tsx @@ -48,6 +48,7 @@ import { getErrorStringOrDefault } from 'src/utilities/errorUtils'; import scrollErrorIntoView from 'src/utilities/scrollErrorIntoView'; +import { storage } from 'src/utilities/storage'; import ActionMenu from './DomainRecordActionMenu'; import Drawer from './DomainRecordDrawer'; @@ -282,31 +283,19 @@ class DomainRecords extends React.Component { }, { title: 'Default TTL', - render: compose( - msToReadable, - pathOr(0, ['ttl_sec']) - ) + render: compose(msToReadable, pathOr(0, ['ttl_sec'])) }, { title: 'Refresh Rate', - render: compose( - msToReadable, - pathOr(0, ['refresh_sec']) - ) + render: compose(msToReadable, pathOr(0, ['refresh_sec'])) }, { title: 'Retry Rate', - render: compose( - msToReadable, - pathOr(0, ['retry_sec']) - ) + render: compose(msToReadable, pathOr(0, ['retry_sec'])) }, { title: 'Expire Time', - render: compose( - msToReadable, - pathOr(0, ['expire_sec']) - ) + render: compose(msToReadable, pathOr(0, ['expire_sec'])) }, { title: '', @@ -708,7 +697,12 @@ class DomainRecords extends React.Component { > {({ data: orderedData, handleOrderChange, order, orderBy }) => { return ( - + {({ count, data: paginatedData, @@ -779,6 +773,7 @@ class DomainRecords extends React.Component { page={page} pageSize={pageSize} eventCategory={`${type.title.toLowerCase()} panel`} + showAll /> ); @@ -835,10 +830,7 @@ const msToReadable = (v: number): null | string => 2419200: '4 weeks' }); -const getTTL = compose( - msToReadable, - pathOr(0, ['ttl_sec']) -); +const getTTL = compose(msToReadable, pathOr(0, ['ttl_sec'])); const typeEq = propEq('type'); @@ -918,11 +910,7 @@ const getNSRecords = compose< DomainRecord[], DomainRecord[], DomainRecord[] ->( - prependLinodeNS, - filter(typeEq('NS')), - pathOr([], ['domainRecords']) -); +>(prependLinodeNS, filter(typeEq('NS')), pathOr([], ['domainRecords'])); const styled = withStyles(styles);