Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query parameter can select ActiveTab #350

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1048,27 +1048,27 @@ <h2 id="detection-title" @click="startEdit('detection-title', 'title')" v-if="!i
<v-tabs grow v-model="activeTab" v-else>
<v-tab id="detection_summaryTab" href="#summary">
<v-icon left>fa-comments</v-icon>
<div class="d-none d-lg-block">Overview</div>
<div class="d-none d-lg-block">{{ i18n.overview }}</div>
</v-tab>
<v-tab id="detection_commentsTab" href="#comments">
<v-icon left>fa-paperclip</v-icon>
<div class="d-none d-lg-block">Comments</div>
<div class="d-none d-lg-block">{{ i18n.comments }}</div>
</v-tab>
<v-tab id="detection_signatureTab" href="#signature">
<v-tab id="detection_signatureTab" href="#source">
<v-icon left>fa-eye</v-icon>
<div class="d-none d-lg-block">Detection Source</div>
<div class="d-none d-lg-block">{{ i18n.detectionSource }}</div>
</v-tab>
<!-- <v-tab id="detection_playbookTab" href="#playbook">
<v-icon left>fa-book-bookmark</v-icon>
<div class="d-none d-lg-block">Investigative Playbook</div>
</v-tab> -->
<v-tab id="detection_tuningTab" href="#tuning">
<v-icon left>fa-link</v-icon>
<div class="d-none d-lg-block">Tuning</div>
<div class="d-none d-lg-block">{{ i18n.tuning }}</div>
</v-tab>
<v-tab id="detection_historyTab" href="#history">
<v-icon left>fa-history</v-icon>
<div class="d-none d-lg-block">History</div>
<div class="d-none d-lg-block">{{ i18n.history }}</div>
</v-tab>

<v-tab-item value="summary">
Expand Down Expand Up @@ -4767,7 +4767,7 @@ <h4 v-if="!$root.loading">{{ i18n.settingsCustomized }} {{ settingsCustomized }}
<li>
{{i18n.configQLSigmaHeader}}
<ul>
<li>
<li>
<router-link :to="{name: 'config', query: {s: 'soc.config.server.modules.elastalertengine.sigmaRulePackages'}}">{{i18n.configQLSigmaRuleset}}</router-link>
</li>
</ul>
Expand Down
3 changes: 3 additions & 0 deletions html/js/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ const i18n = {
detectionId: 'Detection Id',
detectionLogic: 'Detection Logic',
detectionSeverity: 'Severity',
detectionSource: 'Detection Source',
detectionTitle: 'Detection Title',
detectionType: 'Detection Type',
disable: 'Disable',
Expand Down Expand Up @@ -575,6 +576,7 @@ const i18n = {
osUptime: 'OS Uptime',
other: 'Other',
overrideExpand: 'Show all override fields',
overview: 'Overview',
owner: 'Owner',
packages: 'Packages',
packets: 'Captured Packets',
Expand Down Expand Up @@ -819,6 +821,7 @@ const i18n = {
trafficManOutAbbr: 'Mgmt Out',
transcriptCyberChefHelp: 'Send the transcript to CyberChef',
ttr: 'Time Tracking',
tuning: 'Tuning',
type: 'Type',
unaccepted: 'Pending',
unassigned: 'unassigned',
Expand Down
6 changes: 5 additions & 1 deletion html/js/routes/detection.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,11 @@ routes.push({ path: '/detection/:id', name: 'detection', component: {
this.loadUrlParameters();
},
loadUrlParameters() {

this.$nextTick(() => {
if (this.$route.query.tab) {
this.activeTab = this.$route.query.tab;
}
});
},
newDetection() {
let author = [this.$root.user.firstName, this.$root.user.lastName].filter(x => x).join(' ');
Expand Down
Loading