Skip to content

Commit

Permalink
Merge branch 'master' into fix-3103
Browse files Browse the repository at this point in the history
  • Loading branch information
berggren authored Aug 27, 2024
2 parents 0224d06 + da4f3e6 commit f22ab62
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions data/timesketch.conf
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ SIGMA_TAG_DELAY = 5

#-------------------------------------------------------------------------------
# DFIQ - Digital Forensics Investigation Questions
DFIQ_ENABLED = False
DFIQ_PATH = '/etc/timesketch/dfiq/'

# Intelligence tag metadata configuration
Expand Down
2 changes: 1 addition & 1 deletion timesketch/api/v1/resources/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get(self):
JSON object with system settings.
"""
# Settings from timesketch.conf to expose to the frontend clients.
settings_to_return = ["LLM_PROVIDER"]
settings_to_return = ["LLM_PROVIDER", "DFIQ_ENABLED"]
result = {}

for setting in settings_to_return:
Expand Down
2 changes: 1 addition & 1 deletion timesketch/api/v1/resources_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1401,5 +1401,5 @@ def test_system_settings_resource(self):
"""Authenticated request to get system settings."""
self.login()
response = self.client.get(self.resource_url)
expected_response = {"LLM_PROVIDER": "test"}
expected_response = {"DFIQ_ENABLED": False, "LLM_PROVIDER": "test"}
self.assertEqual(response.json, expected_response)
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
-->
<template>
<v-container fluid>
<v-card class="mx-3 mt-3 mb-7" outlined :class="$vuetify.theme.dark ? '' : 'context-card-light-grey-background'">
<v-card class="mx-3 mt-3 mb-3" outlined :class="$vuetify.theme.dark ? '' : 'context-card-light-grey-background'">
<v-toolbar flat dense style="background-color: transparent">
<span v-if="isLoading">
<v-progress-circular :size="20" :width="1" indeterminate color="primary" class="mr-3"></v-progress-circular>
Expand Down
7 changes: 5 additions & 2 deletions timesketch/frontend-ng/src/views/Sketch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,12 @@ limitations under the License.
<v-main class="notransition">
<!-- Scenario context -->
<!--<ts-scenario-navigation v-if="sketch.status && hasTimelines && !isArchived"></ts-scenario-navigation>-->
<ts-question-card v-if="sketch.status && hasTimelines && !isArchived"></ts-question-card>
<ts-question-card v-if="sketch.status && hasTimelines && !isArchived && systemSettings.DFIQ_ENABLED"></ts-question-card>

<router-view
v-if="sketch.status && hasTimelines && !isArchived"
@setTitle="(title) => (this.title = title)"
class="mt-n3"
class="mt-4"
></router-view>
</v-main>

Expand Down Expand Up @@ -465,6 +465,9 @@ export default {
currentRouteName() {
return this.$route.name
},
systemSettings() {
return this.$store.state.systemSettings
},
},
methods: {
archiveSketch: function () {
Expand Down
1 change: 1 addition & 0 deletions timesketch/lib/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class TestConfig(object):
INTELLIGENCE_TAG_METADATA = "./data/intelligence_tag_metadata.yaml"
CONTEXT_LINKS_CONFIG_PATH = "./test_tools/test_events/mock_context_links.yaml"
LLM_PROVIDER = "test"
DFIQ_ENABLED = False
DATA_TYPES_PATH = "./test_data/nl2q/test_data_types.csv"
PROMPT_NL2Q = "./test_data/nl2q/test_prompt_nl2q"
EXAMPLES_NL2Q = "./test_data/nl2q/test_examples_nl2q"
Expand Down

0 comments on commit f22ab62

Please sign in to comment.