Skip to content

Commit

Permalink
moved from mako to js plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
francoismg committed Nov 18, 2024
1 parent b55fe8f commit 102b923
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
<params>
<param type="dataset" var_name_in_template="hda" required="true">dataset_id</param>
</params>
<template>fits_graph_viewer.mako</template>
<entry_point entry_point_type="script" src="fits_graph_viewer.js"/>
</visualization>
8 changes: 5 additions & 3 deletions config/plugins/visualizations/fits_graph_viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
"main": "index.js",
"license": "AFL-3.0",
"dependencies": {
"webpack": "^5.94.0",
"webpack-cli": "^5.1.4",
"astrovisjs": "0.9.92"
"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"
Expand Down
10 changes: 9 additions & 1 deletion config/plugins/visualizations/fits_graph_viewer/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import {init} from 'astrovisjs/dist/astrovis/astrovis';

document.addEventListener('DOMContentLoaded', () => {
init('astrovisdiv', file_url);

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);
});

This file was deleted.

0 comments on commit 102b923

Please sign in to comment.