From 81a4a21f01d294e2ab54e52a272467a596b96487 Mon Sep 17 00:00:00 2001
From: Alexander Schlemmer <alexander.schlemmer@ds.mpg.de>
Date: Mon, 6 Sep 2021 14:59:00 +0200
Subject: [PATCH] ENH: first description of module

---
 src/core/js/ext_data_analysis.js | 51 ++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/src/core/js/ext_data_analysis.js b/src/core/js/ext_data_analysis.js
index f302a3c1..b9957deb 100644
--- a/src/core/js/ext_data_analysis.js
+++ b/src/core/js/ext_data_analysis.js
@@ -1,3 +1,51 @@
+/*
+ * ** header with license infoc
+ * ...
+ */
+
+'use strict';
+
+/**
+ * description of the module ...
+ *
+ * @module ext_flight_preview
+ * @version 0.1
+ *
+ * @requires somelibrary
+ * (pass the dependencies as arguments)
+ */
+var ext_flight_preview = function (somelibrary) {
+
+    var init = function (toolbox) {
+        /* initialization of the module */
+    }
+
+    /**
+     * doc string
+     */
+    var some_function = function (arg1, arg2) {
+    }
+
+    /* the main function must return the initialization of the module */
+    return {
+        init: init,
+    };
+//pass the dependencies as arguments here as well
+}(somelibrary);
+
+// this will be replaced by require.js in the future.
+$(document).ready(function() {
+    // use a variable starting with `BUILD_MODULE_` to enable your module
+    // the build variable has to be enabled in the `build.properties.d/` directory.
+    // Otherwise the module will not be activated.
+    if ("${BUILD_MODULE_EXT_BOTTOM_LINE}" === "ENABLED") {
+        caosdb_modules.register(ext_flight_preview);
+    }
+});
+
+// -------------------------
+
+
 
 function runCorrAnalysis(entity_id) {
     console.log(entity_id);
@@ -13,3 +61,6 @@ for (ent of ents) {
 	$(ent).find(".caosdb-v-entity-header-buttons-list").prepend(button);
     }
 }
+
+// load configuration for data analysis module
+var config = await load_config("data_analysis.json");
-- 
GitLab