Skip to content

IRSA-581: Expose to public Firefly API table selection info. #423

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 1 commit into from
Jul 26, 2017

Conversation

loitly
Copy link
Contributor

@loitly loitly commented Jul 25, 2017

https://caltech-ipac.atlassian.net/browse/IRSA-581

Exposes table selection information to public Firefly API.
Test: http://localhost:8080/firefly/demo/ffapi-highlevel-test.html
To the right of the 2 table panels, there's a 'show selected' button.
Once clicked, it will display selected 'crval1' and 'crval2' values of the table to the left(http://we..)
Use view source to see code sample.
Here is the added function:

/**
 * returns an array of all the values for a columns
 * @param {string} tbl_id
 * @param {string[]} columnNames  defaults to all columns
 * @return {Promise.<TableModel>}
 * @func getSelectedData
 * @public
 * @memberof firefly.util.table
 */
export function getSelectedData(tbl_id, columnNames=[])


@loitly loitly requested review from ejoliet and wmiipac July 25, 2017 18:06
Copy link
Contributor

@ejoliet ejoliet left a comment

Choose a reason for hiding this comment

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

Works perfectly! I have a question: is there a way i can get the filtered table based on all the columns instead of a range of columns?
Good to go!

Copy link
Contributor

@wmiipac wmiipac left a comment

Choose a reason for hiding this comment

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

Works as expected. Just learned the usage of JS Promise methods. Nice work!
I will play with it in the irsa application, will have question later, I am sure.

@loitly
Copy link
Contributor Author

loitly commented Jul 26, 2017

is there a way i can get the filtered table based on all the columns instead of a range of columns?

Yes, if columnNames is not given, it will return all columns.

@loitly loitly merged commit 2dd9a9c into dev Jul 26, 2017
@loitly loitly deleted the IRSA-581_api_table_selectinfo branch July 26, 2017 18:07
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.

3 participants