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

Update to Vue #42

Merged
merged 2 commits into from
Feb 13, 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
4 changes: 0 additions & 4 deletions app/atomic_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,3 @@ def __init__(self, services, name, description):
self.data_svc = services.get('data_svc')

self.log = logging.getLogger('atomic_gui')

@template('atomic.html')
async def splash(self, request):
return dict()
37 changes: 37 additions & 0 deletions gui/views/atomic.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<script setup>
import { inject, onMounted, computed } from "vue";
import { storeToRefs } from "pinia";
import { useAbilityStore } from '@/stores/abilityStore.js';
import { useAdversaryStore } from '@/stores/adversaryStore.js';

const $api = inject("$api");

const abilityStore = useAbilityStore();
const { abilities } = storeToRefs(abilityStore);
const adversaryStore = useAdversaryStore();
const { adversaries } = storeToRefs(adversaryStore);

onMounted(async () => {
await abilityStore.getAbilities($api);
await adversaryStore.getAdversaries($api);
});

const atomicAbilities = computed(() => abilities.value.filter((ability) => ability.plugin === "atomic"));
</script>

<template lang="pug">
.content
h2 Atomic
p The collection of abilities in the Red Canary Atomic test project.
hr

.is-flex.is-align-items-center.is-justify-content-center
.card.is-flex.is-flex-direction-column.is-align-items-center.p-4.m-4
h1.is-size-1.mb-0 {{ atomicAbilities.length || "---" }}
p abilities
router-link.button.is-primary.mt-4(to="/abilities?plugin=atomic")
span View Abilities
span.icon
font-awesome-icon(icon="fas fa-angle-right")

</template>
1 change: 0 additions & 1 deletion hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
async def enable(services):
atomic_gui = AtomicGUI(services, name, description)
app = services.get('app_svc').application
app.router.add_route('GET', '/plugin/atomic/gui', atomic_gui.splash)

# we only ingest data once, and save new abilities in the data/ folder of the plugin
if "abilities" not in os.listdir(data_dir):
Expand Down
44 changes: 0 additions & 44 deletions templates/atomic.html

This file was deleted.

Loading