Skip to content

administration: adds harvester view#701

Open
jrcastro2 wants to merge 2 commits intoCERNDocumentServer:masterfrom
jrcastro2:add-harvest-reports
Open

administration: adds harvester view#701
jrcastro2 wants to merge 2 commits intoCERNDocumentServer:masterfrom
jrcastro2:add-harvest-reports

Conversation

@jrcastro2
Copy link
Contributor

@jrcastro2 jrcastro2 commented Feb 18, 2026

/**
* Custom Empty Results component (without showing the query)
*/
export const CustomEmptyResults = () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this to hide the query from the user, the default one shows it and we are "manipulating" it ot add the timestamp

Copy link
Contributor

@kpsherva kpsherva Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a feeling this could have been solved by hidden_params in search view

const { sortOptions, sortOrderDisabled } = useContext(SearchConfigurationContext);

// Derive selected run from query string
const runIdFromQuery = extractRunIdFromQuery(currentQueryState.queryString, runs);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldnt find a better way. Happy to hear other ideas but I had issues with RSK storing the value of the run in this cmp. It would always fall back to initalquery set and not properly store it. So cant keep track of which run is being showed (unless the run id would be part of the URL params, since the audit logs have no reference to it, it doesn't make any sense to me)

Copy link
Contributor

@kpsherva kpsherva Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's chat in a call about this... I need more context to understand what is happening.
I mostly understand that this does some kind of pre-filtering? Wouldn't using hidden_params solve it?

/**
* Extract user's search terms from full query string
*/
export const extractUserSearch = (queryString) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we need to "enrich" the URL with the timestamp information to select a run we want to hide this from the user

@jrcastro2 jrcastro2 force-pushed the add-harvest-reports branch 2 times, most recently from 943fd8e to f23971e Compare February 24, 2026 12:09
from cds_rdm.permissions import can_access_administration_menu


def require_admin_or_harvester_curator(f):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my comment in the invenio-administration PR

]

@staticmethod
def disabled():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO No need to hide this behind a feature flag

for run in runs
]

def get_context(self, **kwargs):
Copy link
Contributor

@kpsherva kpsherva Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was actually more than what I had in mind, nice UX addition, thanks!

return;
}

const downloadUrl = `/harvester-reports/download?q=${encodeURIComponent(query)}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ment this endpoint more to be included in the email, but this works as well

@jrcastro2 jrcastro2 force-pushed the add-harvest-reports branch from f23971e to a778af4 Compare March 9, 2026 11:03
* Restrict harvester-curator to get only system
  user actions
@jrcastro2 jrcastro2 force-pushed the add-harvest-reports branch from a778af4 to 5c3bce1 Compare March 9, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

harvester - reports for curators

2 participants