diff --git a/sekoia.io/README/inputs.conf.spec b/sekoia.io/README/inputs.conf.spec index 7292bba..9001995 100644 --- a/sekoia.io/README/inputs.conf.spec +++ b/sekoia.io/README/inputs.conf.spec @@ -3,3 +3,4 @@ python.version = python3 api_key = feed_id = proxy_url = +api_root_url = diff --git a/sekoia.io/app.manifest b/sekoia.io/app.manifest index 8b619cd..8a9eee6 100644 --- a/sekoia.io/app.manifest +++ b/sekoia.io/app.manifest @@ -5,7 +5,7 @@ "id": { "group": null, "name": "sekoia.io", - "version": "1.1.2" + "version": "1.2.1" }, "author": [ { diff --git a/sekoia.io/appserver/static/javascript/views/setup_page.js b/sekoia.io/appserver/static/javascript/views/setup_page.js index 0067ecf..5522ec2 100644 --- a/sekoia.io/appserver/static/javascript/views/setup_page.js +++ b/sekoia.io/appserver/static/javascript/views/setup_page.js @@ -34,6 +34,7 @@ define(["backbone", "jquery", "splunkjs/splunk"], function (Backbone, jquery, sp jquery("#api_key").val(input["api_key"]); jquery("#feed_id").val(input["feed_id"]); jquery("#proxy_url").val(input["proxy_url"]); + jquery("#api_root_url").val(input["api_root_url"]); } Object.keys(this.current_settings["lookups"]).forEach((name) => { @@ -125,7 +126,7 @@ define(["backbone", "jquery", "splunkjs/splunk"], function (Backbone, jquery, sp // Extract Feed Settings - feed_id = values[1].value.trim(); + var feed_id = values[1].value.trim(); if (feed_id == "") { feed_id = "d6092c37-d8d7-45c3-8aff-c4dc26030608"; } @@ -134,15 +135,16 @@ define(["backbone", "jquery", "splunkjs/splunk"], function (Backbone, jquery, sp const feed_settings = { api_key: "", feed_id: feed_id, - proxy_url: values[2].value.trim(), + api_root_url: values[2].value.trim(), + proxy_url: values[3].value.trim(), }; // Extract Lookups const lookups = new Array(); var i = 0; - while (i * 3 + 3 < values.length) { - const offset = 3 + i * 3; + while (i * 3 + 4 < values.length) { + const offset = 4 + i * 3; lookups.push({ type: values[offset].value.trim(), query: values[offset + 1].value.trim(), diff --git a/sekoia.io/appserver/static/javascript/views/setup_page_template.js b/sekoia.io/appserver/static/javascript/views/setup_page_template.js index ad951ab..06c3195 100644 --- a/sekoia.io/appserver/static/javascript/views/setup_page_template.js +++ b/sekoia.io/appserver/static/javascript/views/setup_page_template.js @@ -52,6 +52,14 @@ function get_template() { You can find more information on feeds in the documentation.

+ +

+ (optional) URL root of your SEKOIA.IO TIP API (e.g. https://api.sekoia.io or https://my.sekoiaio.tip.local/api) +

+