Skip to content

Commit

Permalink
Added splunk support (#201)
Browse files Browse the repository at this point in the history
* WIP

Signed-off-by: Jacob Henry <jchenry@mitre.org>

* It works

Signed-off-by: Jacob Henry <jchenry@mitre.org>

* Splunk GUI WIP

Signed-off-by: Jacob Henry <jchenry@mitre.org>

* Error code tweaks

Signed-off-by: Jacob Henry <jchenry@mitre.org>

* Added experimental toolbar for later use

Signed-off-by: Jacob Henry <jchenry@mitre.org>

* It now properly searches and shows results

Signed-off-by: Jacob Henry <jchenry@mitre.org>

* Improved overall user friendliness

Signed-off-by: Jacob Henry <jchenry@mitre.org>

* Added better support for catching parsing errors

Signed-off-by: Jacob Henry <jchenry@mitre.org>

* Improved S3 error handling

Signed-off-by: Jacob Henry <jchenry@mitre.org>

* Added release change info

Signed-off-by: Jacob Henry <jchenry@mitre.org>

* Summoned clippy-esque doc helper

Signed-off-by: Jacob Henry <jchenry@mitre.org>

* Removed some old junk files

Signed-off-by: Jacob Henry <jchenry@mitre.org>

* Made an explicit show help button

Signed-off-by: Jacob Henry <jchenry@mitre.org>

* Fixed help link

Signed-off-by: Jacob Henry <jchenry@mitre.org>
  • Loading branch information
Mitriol authored Mar 15, 2020
1 parent 98dbf6c commit b35496b
Show file tree
Hide file tree
Showing 18 changed files with 1,280 additions and 138 deletions.
115 changes: 67 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@
"@types/d3": "^5.7.2",
"@types/diff": "^4.0.2",
"@types/prismjs": "^1.16.0",
"@types/xml-js": "^1.0.0",
"@vue/cli": "^4.0.5",
"apexcharts": "^3.10.1",
"aws-sdk": "^2.573.0",
"babel-plugin-prismjs": "^1.1.1",
"chroma-js": "^2.1.0",
"connect": "^3.7.0",
"core-js": "^3.4.1",
"d3": "^5.13.1",
"d3": "^5.15.0",
"date-fns": "^2.6.0",
"diff": "^4.0.1",
"file-saver": "^2.0.2",
Expand Down Expand Up @@ -67,7 +68,8 @@
"vue-toasted": "^1.1.27",
"vuetify": "^2.1.10",
"vuex": "^3.1.2",
"xlsx": "^0.15.2"
"xlsx": "^0.15.2",
"xml-js": "^1.6.11"
},
"devDependencies": {
"@mdi/font": "^3.9.97",
Expand Down Expand Up @@ -95,7 +97,7 @@
"fibers": "^4.0.2",
"lint-staged": "^8.1.5",
"material-design-icons-iconfont": "^5.0.1",
"node-sass": "^4.13.0",
"node-sass": "^4.13.1",
"prettier": "^1.19.1",
"sass": "^1.23.6",
"sass-loader": "^7.3.1",
Expand Down
50 changes: 50 additions & 0 deletions src/components/generic/ErrorTooltip.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<template>
<v-tooltip :value="errors.length" top :open-on-hover="false">
<template #activator="data">
<slot v-on="data.on" />
</template>
<ul>
<li><strong>Errors encountered:</strong></li>
<li v-for="item in errors" :key="item.key" v-text="item.text" />
</ul>
</v-tooltip>
</template>

<script lang="ts">
import Vue from "vue";
import Component from "vue-class-component";
interface ErrorItem {
key: number;
text: string;
}
// We declare the props separately to make props types inferable.
const Props = Vue.extend({
props: {}
});
@Component({
components: {}
})
export default class ErrorTooltip extends Props {
/** What error is currently shown, if any. Shared between stages. */
errors: ErrorItem[] = [];
/** Need this for proper key resolution */
counter: number = 0;
/** Callback to show errors */
show_error(message: string): void {
// Increment counter
this.counter += 1;
// Add the error, but clear it after X seconds
this.errors.push({
text: message,
key: this.counter
});
setTimeout(() => this.errors.shift(), 12000);
}
}
</script>
46 changes: 46 additions & 0 deletions src/components/generic/ExperimentalTooltip.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<template>
<div>
<div>
<span ref="a">Alpha</span>
<span ref="b">Beta</span>
<span ref="c">Gamma</span>
<span ref="d">Delta</span>
</div>

<v-tooltip
v-if="!!test_ref"
:activator="test_ref"
:attach="test_ref"
:open-on-hover="false"
v-model="test_model"
content-class="test_class"
>
<span> {{ index }}</span>
</v-tooltip>
</div>
</template>

<script lang="ts">
import Vue from "vue";
import Component from "vue-class-component";
// We declare the props separately to make props types inferable.
const Props = Vue.extend({
props: {}
});
@Component({
components: {}
})
export default class SplunkReader extends Props {
test_model = true;
test_ref: Element | Vue | null = null;
index = 0;
shunt() {
this.index = (this.index + 1) % 4;
let refid = ["a", "b", "c", "d"][this.index];
this.test_ref = this.$refs[refid] as Element;
console.log(this.test_ref);
}
}
</script>
Loading

0 comments on commit b35496b

Please sign in to comment.