Skip to content

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

Merged
merged 3 commits into from
Oct 22, 2016

Conversation

cwang2016
Copy link
Contributor

Build LSST catalog search panel including two tabs, 'Search Catalogs' and 'Load Catalog'

  • add 'LSST Catalogs' to the firefly menu.
  • create LSST catalog search panel,
    . 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:

  • start firefly localhost:8080/firefly
  • select 'LSST Catalogs' and the search panel is started
  • select LSST catalog, either 'Deep Forced Source' or 'Deep Source' to see the metadata table update in the middle of the panel.
  • enter the spatial method search, select the column and enter the column search constraints in the middle metadata table.
  • click 'search' to get the data from the selected catalog.

Result:
All search result in this release is temporary and hard coded. It will be further updated once the catalog data is ready.

Copy link
Contributor

@robyww robyww left a 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 = () => {
Copy link
Contributor

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') {
Copy link
Contributor

Choose a reason for hiding this comment

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

is it alway 'y'?

Copy link
Contributor Author

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] + '#';
Copy link
Contributor

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);
Copy link
Contributor

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']) || "";
Copy link
Contributor

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

@cwang2016 cwang2016 merged commit b74bf37 into dev Oct 22, 2016
@cwang2016 cwang2016 deleted the DM-7761-LSSTCatalogGenSearch branch October 22, 2016 02:11
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.

2 participants