diff --git a/client/admin/admin.less b/client/admin/admin.less
index 432f92e8b..e66ead5e3 100644
--- a/client/admin/admin.less
+++ b/client/admin/admin.less
@@ -111,6 +111,10 @@ body {
vertical-align : middle;
text-align : center;
border-right : 1px solid;
+ max-width:50ch;
+ overflow:hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
&:last-child { border-right : none; }
}
diff --git a/client/admin/brewUtils/brewCleanup/brewCleanup.jsx b/client/admin/brewUtils/brewCleanup/brewCleanup.jsx
index cd60e6728..5f19fb474 100644
--- a/client/admin/brewUtils/brewCleanup/brewCleanup.jsx
+++ b/client/admin/brewUtils/brewCleanup/brewCleanup.jsx
@@ -67,6 +67,7 @@ const BrewCleanup = ({})=>{
return null;
}
+
return <>
{`Results - ${brewList.length} brews` }
@@ -74,21 +75,21 @@ const BrewCleanup = ({})=>{
Title
Last Update
- Created
+ last viewed
Storage
{brewList
.sort((a, b)=>{ // Sort brews from most recently updated
- if(a.updatedAt > b.updatedAt) return -1;
+ if(a.lastViewed > b.lastViewed) return -1;
return 1;
})
.map((brew, idx)=>{
return
{brew.title || 'No Title'}
{Moment(brew.updatedAt).fromNow()}
- {brew.createdAt ? Moment(brew.createdAt).fromNow() : 'No creation date'}
+ {brew.lastViewed ? Moment(brew.lastViewed).fromNow() : 'No creation date'}
{brew.googleId ? 'Google' : 'Homebrewery'}
;
})}
@@ -101,7 +102,7 @@ const BrewCleanup = ({})=>{
if(type === 'junk' && junkBrewCollection.length === 0 || type === 'lost' && lostBrewCollection.length === 0) return No Matching Brews found.
;
return
- {renderBrewList(type)}
+
cleanup(type)} className='remove'>
{pending
?
@@ -109,7 +110,7 @@ const BrewCleanup = ({})=>{
}
Found {type === 'junk' ? junkBrewCollection.length : lostBrewCollection.length} Brews that could be removed.
-
+ {renderBrewList(type)}
;
};
const renderJunkBrewCleanup = ()=>{
diff --git a/server/admin.api.js b/server/admin.api.js
index c47e72c60..161570dc2 100644
--- a/server/admin.api.js
+++ b/server/admin.api.js
@@ -50,14 +50,16 @@ export default function createAdminApi(vite) {
];
const lostBrewsPipeline = [
- { $match : {
- updatedAt : { $lt: Moment().subtract(365, 'days').toDate() },
- lastViewed : { $lt: Moment().subtract(365, 'days').toDate() }
- }},
- { $match: {
- authors : [],
- }},
- { $limit: 300 }
+ {
+ $match: {
+ authors: [],
+ updatedAt: { $lt: Moment().subtract(9, 'years').toDate() },
+ lastViewed: { $lt: Moment().subtract(9, 'years').toDate() }
+ }
+ },
+ {
+ $limit: 1000
+ }
];
/* Search for brews that aren't compressed (missing the compressed text field) */