Skip to content

Commit 302537d

Browse files
committed
DM-11376: set backgroundable defaults to false. Enable backgrounding for catalog and suit searches.
1 parent 111676f commit 302537d

File tree

7 files changed

+29
-21
lines changed

7 files changed

+29
-21
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ There are several branches the this repository. Here are the ones that you shou
4747
- [Java 1.8] http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
4848
This is the version we are using to compile and run Firefly.
4949

50-
- [Gradle 2.3+] (https://gradle.org/downloads)
50+
- [Gradle 3.x] (https://gradle.org/downloads)
5151
Gradle is an open source build automation system.
5252

5353

src/firefly/js/api/ApiHighlevelBuild.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function doShowTable(llApi, targetDiv, request, options={}) {
100100
request = oldApi(llApi, params, options);
101101
}
102102

103-
options = Object.assign({tbl_group: divToGrp(targetDiv), backgroundable:false}, options);
103+
options = Object.assign({tbl_group: divToGrp(targetDiv)}, options);
104104
const contProps = {tbl_group: options.tbl_group};
105105

106106
Object.keys(options).forEach( (k) => {

src/firefly/js/tables/TableUtil.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ import {doUpload} from '../ui/FileUpload.jsx';
1919
import {dispatchAddSaga} from '../core/MasterSaga.js';
2020
import {getWsConnId} from '../core/messaging/WebSocketClient.js';
2121

22+
export const TableTagMeta = 'META_INFO.TableTag'; // a tag describing the content of this table. ie. 'catalog', 'imagemeta'
2223
export const COL_TYPE = new Enum(['ALL', 'NUMBER', 'TEXT']);
2324
export const MAX_ROW = Math.pow(2,31) - 1;
2425
/* TABLE_REQUEST should match QueryUtil on the server-side */
2526

26-
const LSSTQueryPID = 'LSSTCataLogSearch';
27+
28+
2729

2830

2931
/**
@@ -154,7 +156,7 @@ export function makeLsstCatalogRequest(title, project, database, catalog, params
154156
title = title || catalog;
155157
options.use = options.use || 'lsst_catalog_overlay';
156158
const tbl_id = options.tbl_id || uniqueTblId();
157-
const id = get(params, 'SearchMethod')==='Table'?'LSSTMultiObjectSearch':LSSTQueryPID;
159+
const id = get(params, 'SearchMethod')==='Table'?'LSSTMultiObjectSearch':'LSSTCataLogSearch';
158160
const UserTargetWorldPt = params.UserTargetWorldPt || params.position; // may need to convert to worldpt.
159161
const table_name = catalog;
160162
const meta_table = catalog;

src/firefly/js/tables/TablesCntlr.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ function tableSearch(action) {
316316
if (!action.err) {
317317
dispatch(action);
318318
var {request={}, options={}} = action.payload;
319-
const {tbl_ui_id, backgroundable = true} = options;
319+
const {tbl_ui_id, backgroundable = false} = options;
320320
const {tbl_id} = request;
321321
const title = get(request, 'META_INFO.title');
322322
request.pageSize = options.pageSize = options.pageSize || request.pageSize || 100;

src/firefly/js/tables/ui/TablePanel.jsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@ const TT_EXPAND = 'Expand this panel to take up a larger area';
3333
export class TablePanel extends PureComponent {
3434
constructor(props) {
3535
super(props);
36+
this.componentWillReceiveProps(props);
37+
38+
this.toggleFilter = this.toggleFilter.bind(this);
39+
this.toggleTextView = this.toggleTextView.bind(this);
40+
this.clearFilter = this.clearFilter.bind(this);
41+
this.saveTable = this.saveTable.bind(this);
42+
this.toggleOptions = this.toggleOptions.bind(this);
43+
this.expandTable = this.expandTable.bind(this);
44+
this.onOptionUpdate = this.onOptionUpdate.bind(this);
45+
this.onOptionReset = this.onOptionReset.bind(this);
46+
}
47+
48+
componentWillReceiveProps(props) {
3649
var {tbl_id, tbl_ui_id, tableModel, showUnits, showFilters, pageSize} = props;
3750

3851
if (!tbl_id && tableModel) {
@@ -45,15 +58,6 @@ export class TablePanel extends PureComponent {
4558
this.tableConnector = TableConnector.newInstance(tbl_id, tbl_ui_id, tableModel, showUnits, showFilters, pageSize);
4659
const uiState = TblUtil.getTableUiById(tbl_ui_id);
4760
this.state = Object.assign({}, this.props, uiState);
48-
49-
this.toggleFilter = this.toggleFilter.bind(this);
50-
this.toggleTextView = this.toggleTextView.bind(this);
51-
this.clearFilter = this.clearFilter.bind(this);
52-
this.saveTable = this.saveTable.bind(this);
53-
this.toggleOptions = this.toggleOptions.bind(this);
54-
this.expandTable = this.expandTable.bind(this);
55-
this.onOptionUpdate = this.onOptionUpdate.bind(this);
56-
this.onOptionReset = this.onOptionReset.bind(this);
5761
}
5862

5963
componentDidMount() {

src/firefly/js/visualize/ui/CatalogSelectViewPanel.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
import React, {PureComponent} from 'react';
66
import PropTypes from 'prop-types';
77
import {FormPanel} from '../../ui/FormPanel.jsx';
8-
import { get, merge, isEmpty, isFunction} from 'lodash';
8+
import { get, merge, isEmpty, isFunction, set} from 'lodash';
99
import {updateMerge} from '../../util/WebUtil.js';
1010
import {ListBoxInputField} from '../../ui/ListBoxInputField.jsx';
11-
import {doFetchTable, makeTblRequest, makeIrsaCatalogRequest, makeVOCatalogRequest} from '../../tables/TableUtil.js';
11+
import {doFetchTable, makeTblRequest, makeIrsaCatalogRequest, makeVOCatalogRequest, TableTagMeta} from '../../tables/TableUtil.js';
1212
import {CatalogTableListField} from './CatalogTableListField.jsx';
1313
import {CatalogConstraintsPanel} from './CatalogConstraintsPanel.jsx';
1414
import {FieldGroup} from '../../ui/FieldGroup.jsx';
@@ -209,8 +209,8 @@ function doCatalog(request) {
209209
tReq.selcols = colsSearched;
210210
}
211211
//console.log('final request: ' + JSON.stringify(tReq));
212-
213-
dispatchTableSearch(tReq);
212+
set(tReq, TableTagMeta, 'catalog');
213+
dispatchTableSearch(tReq, {backgroundable:true});
214214
}
215215

216216
//TODO parse whatever format and return SQL standard

src/firefly/js/visualize/ui/LSSTCatalogSelectViewPanel.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {dispatchHideDropDown} from '../../core/LayoutCntlr.js';
2121
import {getAppOptions} from '../../core/AppDataCntlr.js';
2222
import {ServerParams} from '../../data/ServerParams.js';
2323
import {dispatchTableSearch} from '../../tables/TablesCntlr.js';
24-
import {makeTblRequest, makeLsstCatalogRequest} from '../../tables/TableUtil.js';
24+
import {makeTblRequest, makeLsstCatalogRequest, TableTagMeta} from '../../tables/TableUtil.js';
2525
import {CatalogConstraintsPanel, getTblId} from './CatalogConstraintsPanel.jsx';
2626
import {validateSql, validateConstraints} from './CatalogSelectViewPanel.jsx';
2727
import {LSSTImageSpatialType} from './LSSTImageSpatialType.jsx';
@@ -426,7 +426,8 @@ function doImage(request, imgPart) {
426426

427427
);
428428
};
429-
dispatchTableSearch(tReq, {leftButtons: [downloadButton]});
429+
set(tReq, TableTagMeta, 'lsst-imagemeta');
430+
dispatchTableSearch(tReq, {leftButtons: [downloadButton], backgroundable:true});
430431
}
431432

432433
/**
@@ -494,7 +495,8 @@ function doCatalog(request, spatPart) {
494495

495496
tReq = addConstraintToQuery(tReq);
496497

497-
dispatchTableSearch(tReq);
498+
set(tReq, TableTagMeta, 'lsst-catalog');
499+
dispatchTableSearch(tReq, {backgroundable:true});
498500
}
499501

500502
/**

0 commit comments

Comments
 (0)