-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created a two-step configuration wizard, modified navbar to change co…
…nfiguration Also modified the splunk-local target in Makefile to depend on the venv and disable caching locally. Created a Rest API handler to be able to call the Flare SDK endpoints from Javascript Created a Home page with Lorem Ipsum
- Loading branch information
Marc-Antoine Hinse
committed
Oct 24, 2024
1 parent
ebddaba
commit 55f3616
Showing
15 changed files
with
201 additions
and
41 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
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
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
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
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
2 changes: 0 additions & 2 deletions
2
flare_splunk_integration/appserver/static/javascript/views/util.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
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
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,26 @@ | ||
import sys | ||
import os | ||
import splunk # type: ignore[import-not-found] | ||
import json | ||
from typing import Any | ||
|
||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "vendor")) | ||
from flareio import FlareApiClient | ||
|
||
|
||
def parseParams(payload: str) -> dict[str, Any]: | ||
params = {} | ||
for param_entry in payload.split("&"): | ||
param = param_entry.split("=", 1) | ||
params[param[0]] = param[1] | ||
return params | ||
|
||
|
||
class FlareUserTenants(splunk.rest.BaseRestHandler): | ||
def handle_POST(self): | ||
payload = self.request["payload"] | ||
params = parseParams(payload) | ||
self.flare_client = FlareApiClient(api_key=params["serverKey"]) | ||
user_tenants_response = self.flare_client.get("firework/v2/me/tenants") | ||
self.response.setHeader("Content-Type", "application/json") | ||
self.response.write(json.dumps(user_tenants_response.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
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 |
---|---|---|
@@ -1,8 +1,6 @@ | ||
<nav search_view="search"> | ||
<view name="search" default='true' /> | ||
<view name="analytics_workspace" /> | ||
<view name="datasets" /> | ||
<view name="reports" /> | ||
<view name="alerts" /> | ||
<view name="dashboards" /> | ||
<nav search_view="search" color="#272735"> | ||
<view name="home" default='true' /> | ||
<view name="search" /> | ||
<view name="configuration" /> | ||
<a href="https://app.flare.io/" target="_blank">Flare Platform</a> | ||
</nav> |
4 changes: 2 additions & 2 deletions
4
...ault/data/ui/views/setupPageDashboard.xml → ...n/default/data/ui/views/configuration.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
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 @@ | ||
<dashboard version="1.1" hideEdit="true"> | ||
<label>Home</label> | ||
|
||
<row> | ||
<panel> | ||
<html> | ||
|
||
<h1>What is Lorem Ipsum?</h1> | ||
<p> | ||
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. | ||
</p> | ||
|
||
</html> | ||
</panel> | ||
</row> | ||
</dashboard> |
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,4 @@ | ||
[script:flare_external_requests_user_tenants] | ||
match=/retrieve_user_tenants | ||
handler=flare_external_requests.FlareUserTenants | ||
python.version = python3 |
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,3 @@ | ||
[expose:flare_external_requests_user_tenants] | ||
pattern=retrieve_user_tenants | ||
methods=POST |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
[mypy] | ||
exclude = (vendor*)/$ | ||
follow_imports = skip | ||
mypy_path = flare_splunk_integration/bin/vendor |