-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19003 from esg-epfl-apc/fits-graph-visualization-…
…plugin-pr FITS file table graph visualization plugin
- Loading branch information
Showing
6 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
config/plugins/visualizations/fits_graph_viewer/config/fits_graph_viewer.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE visualization SYSTEM "../../visualization.dtd"> | ||
<visualization name="FITS Graph viewer" embeddable="false"> | ||
<description>Basic plugin for fits file table visualization</description> | ||
<data_sources> | ||
<data_source> | ||
<model_class>HistoryDatasetAssociation</model_class> | ||
<test type="isinstance" test_attr="datatype" result_type="datatype">binary.FITS</test> | ||
<to_param param_attr="id">dataset_id</to_param> | ||
</data_source> | ||
</data_sources> | ||
<params> | ||
<param type="dataset" var_name_in_template="hda" required="true">dataset_id</param> | ||
</params> | ||
<entry_point entry_point_type="script" src="fits_graph_viewer.js"/> | ||
</visualization> |
21 changes: 21 additions & 0 deletions
21
config/plugins/visualizations/fits_graph_viewer/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "fits-graph-visualization", | ||
"version": "1.0.0", | ||
"keywords": [ | ||
"galaxy", | ||
"visualization" | ||
], | ||
"main": "index.js", | ||
"license": "AFL-3.0", | ||
"dependencies": { | ||
"astrovisjs": "0.9.92", | ||
"webpack": "^5.94.0" | ||
}, | ||
"devDependencies": { | ||
"webpack-cli": "^5.1.4" | ||
}, | ||
"scripts": { | ||
"build": "npx webpack build --config webpack.prod.js --output-path=./static" | ||
} | ||
} | ||
|
13 changes: 13 additions & 0 deletions
13
config/plugins/visualizations/fits_graph_viewer/src/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {init} from 'astrovisjs/dist/astrovis/astrovis'; | ||
|
||
document.addEventListener('DOMContentLoaded', () => { | ||
|
||
const {root, visualization_config} = JSON.parse( | ||
document.getElementById("app") | ||
.getAttribute("data-incoming") || "{}"); | ||
|
||
const dataset_id = visualization_config.dataset_id; | ||
const file_url = root + "datasets/" + dataset_id + "/display" | ||
|
||
init('app', file_url); | ||
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions
9
config/plugins/visualizations/fits_graph_viewer/webpack.prod.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
mode: 'production', | ||
entry: './src/index.js', | ||
output: { | ||
filename: 'fits_graph_viewer.js' | ||
}, | ||
}; |