-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
Showing
18 changed files
with
1,280 additions
and
138 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,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> |
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,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> |
Oops, something went wrong.