-
Notifications
You must be signed in to change notification settings - Fork 16
DM-7761 Build LSST Catalog search form using the components from IRSA catalog search form #213
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, this was a big change. Beyond the other comment the big thing here is not to make CatalogConstraintsPanel
dependent on a mission.
Also, I found a bug in CatalogWatch that I push a fixed to on this branch.
@@ -141,21 +162,33 @@ export class CatalogConstraintsPanel extends React.Component { | |||
return; | |||
} | |||
|
|||
const request = {id: processId, 'catalog': catName, short: dd_short}; //Fetch DD master table | |||
const urldef = get(FieldGroupUtils.getGroupFields(this.props.groupKey), 'cattable.coldef', 'null'); | |||
var createDDRequest = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think createDDRequest needs to in a function passed to this component as a property. They way this component is not dependent on any mission.
It would probably need to pass an object as the paremeter
}); | ||
} else { // the table model may be freshly acquired or column selection status is updated as all columns are deselected | ||
anyTableModel.tableData.data.forEach((arow, index) => { | ||
if (arow[idxColSel] === 'y') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it alway 'y'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sometime it is 'n' in case the column is deselected or initially defined as deselected.
const nCols = tableModelFetched.tableData.columns.length; | ||
const u = (isEmpty(urldef) || urldef === 'null') ? '#' : urldef.match(/href='([^']+)'/)[1] + '#'; | ||
const u = (isEmpty(urlDef) || urlDef === 'null') ? '#' : urlDef.match(/href='([^']+)'/)[1] + '#'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isEmpty(null)
is true
right? I think this could be
const u = isEmpty(urlDef)....
i know it was like this before but go ahead and fix it.
} | ||
|
||
// TODO: wait until catalog table is set | ||
const radius = get(catTable[currentIdx], ['cat', '7'], 100); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i know the other ons is similar but I think you should use constants for the catalog columns.
get(catTable[currentIdx], ['cat', RADIUS_COL], 100);
|
||
// TODO: wait until catalog table is set | ||
const radius = get(catTable[currentIdx], ['cat', '7'], 100); | ||
const coldef = get(catTable[currentIdx], ['cat', '9']) || get(catTable[currentIdx], ['cat', '8']) || ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, probably other places
Build LSST catalog search panel including two tabs, 'Search Catalogs' and 'Load Catalog'
. reuse 'CatalogConstraintPanel' (used by IRSA catalog search form) component.
. making improvement on 'CatalogConstraintPanel' including
validation of column search constraints.
storing and restoring of column selection and constraint string.
. incorporating catalog spatial search features made in DM-7995.
. For 'Load Catalog', redisplay the filename of last uploaded file by button 'Choose File'.
(this feature is applied to all cases which use FileUpload and keep the uploaded filename)
Test:
Result:
All search result in this release is temporary and hard coded. It will be further updated once the catalog data is ready.