Skip to content

Commit aed9939

Browse files
Merge pull request #78 from Caltech-IPAC/FIREFLY-1948-result-tabs-layout
FIREFLY-1948: Make use of results tabs layout control
2 parents 1a1f548 + d887176 commit aed9939

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

examples/filetable.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def filetable_to_firefly(
3333
Instance of FireflyClient connected to a Firefly server
3434
3535
topdir: "str"
36-
pathname for directory to search
36+
pathname for directory to search, must be an absolute path.
3737
3838
pattern: "str"
3939
filename pattern to search for, e.g. "*.fits"
@@ -159,15 +159,17 @@ def main():
159159
if printurl:
160160
input("Press Enter after you have opened the Firefly URL printed above...")
161161

162-
# TODO: figure out how to activate data products (meta) tab in Bi-View
163-
# if "slate" not in html_file:
164-
# fc.change_triview_layout(firefly_client.FireflyClient.BIVIEW_T_IChCov)
165-
# fc.dispatch('layout.updateLayout', {'images':{'selectedTab':'meta'}})
162+
if "slate" not in html_file:
163+
fc.change_triview_layout(firefly_client.FireflyClient.BIVIEW_T_IChCov)
164+
fc.dispatch('layout.updateLayout', {'rightSide': {'selectedTab': 'meta'}})
166165
r = fc.add_cell(0, 0, 1, 2, "tables", "main")
167166
fc.show_table(tbl_val, meta=metainfo)
168167
r = fc.add_cell(0, 1, 1, 2, "tableImageMeta", "image-meta")
169168
fc.show_image_metadata(viewer_id=r["cell_id"])
170169

171170

172171
if __name__ == "__main__":
172+
# Test example:
173+
# python filetable.py '/Users/jsinghal/dev/cm/__test_data' '*.*' --firefly_url http://localhost:8080/firefly/
174+
173175
main()

firefly_client/firefly_client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,7 @@ def show_xyplot(self, tbl_id, standalone=False, group_id=None, **chart_params):
12301230

12311231
payload = {'chartId': cid, 'chartType': 'scatter',
12321232
'groupId': group_id, 'viewerId': group_id,
1233+
'activateViewer': True,
12331234
'params': {'tbl_id': tbl_id, **chart_params}}
12341235

12351236
r = self.dispatch(ACTION_DICT['ShowXYPlot'], payload)
@@ -1281,6 +1282,7 @@ def show_histogram(self, tbl_id, group_id=None, **histogram_params):
12811282
payload = {'chartId': cid, 'chartType': 'histogram',
12821283
'groupId': group_id,
12831284
'viewerId': group_id,
1285+
'activateViewer': True,
12841286
'params': {'tbl_id': tbl_id, **histogram_params}}
12851287

12861288
r = self.dispatch(ACTION_DICT['ShowXYPlot'], payload)
@@ -1330,6 +1332,7 @@ def show_chart(self, group_id=None, **chart_params):
13301332
payload = {'chartId': chart_id,
13311333
'groupId': group_id,
13321334
'viewerId': group_id,
1335+
'activateViewer': True,
13331336
'chartType': 'plot.ly',
13341337
'closable': True}
13351338

0 commit comments

Comments
 (0)