Skip to content

Commit

Permalink
Merge pull request #28 from BC-SECURITY/dev
Browse files Browse the repository at this point in the history
v1.2.2
  • Loading branch information
vinnybod authored May 9, 2020
2 parents b6c86c8 + 84e02a7 commit 93507bb
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 110 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.2] - 2020-05-09
- Gained a little vertical real estate by updating layout of the Agent page
- Switched vue-router to hash mode
- Default width changed to 1200 because the agent table is a bit wider
- If refreshing the app and already logged in, it will attempt to go to the same page instead of defaulting to listeners
- Fixed a width issue in the AgentCommandViewer

## [1.2.1] - 2020-05-04
- Fixed a bug related to the loading icon in the agent command viewer
- May the Fourth be with you
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "starkiller",
"version": "1.2.1",
"version": "1.2.2",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default {
if (this.isLoggedIn === false && !this.isLoginPage) {
this.$router.push({ name: 'home' });
} else if (this.isLoggedIn === true && this.$route.name !== 'listeners') {
} else if (this.isLoggedIn === true && this.$route.name === 'home') {
this.$router.push({ name: 'listeners' });
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protocol.registerSchemesAsPrivileged([{ scheme: 'app', privileges: { secure: tru
function createWindow() {
// Create the browser window.
win = new BrowserWindow({
width: 1000,
width: 1200,
height: 700,
webPreferences: {
nodeIntegration: true,
Expand Down
2 changes: 1 addition & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const routes = [
];

const router = new VueRouter({
mode: 'history',
mode: 'hash',
base: process.env.BASE_URL,
routes,
});
Expand Down
213 changes: 107 additions & 106 deletions src/views/AgentEdit.vue
Original file line number Diff line number Diff line change
@@ -1,114 +1,116 @@
<template>
<div>
<v-breadcrumbs :items="breads" />
<div
class="mb-2"
style="display: flex; justify-content: flex-end;"
style="display: flex; justify-content: space-between;"
>
<!-- TODO Wrap this into a component? -->
<v-dialog
ref="nameDialog"
v-model="dialog"
max-width="500px"
>
<v-card>
<v-card-title>
<span class="headline">Rename</span>
</v-card-title>
<v-card-text>
<v-form
ref="nameForm"
>
<v-container>
<v-row>
<v-col
cols="12"
>
<v-text-field
v-model="nameForm.name"
label="Name"
:rules="nameRules['name']"
outlined
dense
required
/>
</v-col>
</v-row>
</v-container>
</v-form>
</v-card-text>
<v-card-actions>
<v-spacer />
<v-breadcrumbs :items="breads" />
<div class="pt-2">
<!-- TODO Wrap this into a component? -->
<v-dialog
ref="nameDialog"
v-model="dialog"
max-width="500px"
>
<v-card>
<v-card-title>
<span class="headline">Rename</span>
</v-card-title>
<v-card-text>
<v-form
ref="nameForm"
>
<v-container>
<v-row>
<v-col
cols="12"
>
<v-text-field
v-model="nameForm.name"
label="Name"
:rules="nameRules['name']"
outlined
dense
required
/>
</v-col>
</v-row>
</v-container>
</v-form>
</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn
color="blue darken-1"
text
@click="dialog = false"
>
Close
</v-btn>
<v-btn
color="blue darken-1"
text
:loading="nameLoading"
@click="renameAgent"
>
Save
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-tooltip
bottom
>
<template v-slot:activator="{ on }">
<v-btn
color="blue darken-1"
text
@click="dialog = false"
color="primary"
class="mr-2"
fab
x-small
v-on="on"
@click="dialog = true"
>
Close
<v-icon
style="padding-left: 4px"
>
fa-user-edit
</v-icon>
</v-btn>
</template>
<span>Rename Agent</span>
</v-tooltip>
<v-tooltip bottom>
<template v-slot:activator="{ on }">
<v-btn
color="blue darken-1"
text
:loading="nameLoading"
@click="renameAgent"
color="primary"
class="mr-2"
fab
x-small
v-on="on"
@click="clearQueue"
>
Save
<v-icon>fa-calendar-times</v-icon>
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-tooltip
bottom
>
<template v-slot:activator="{ on }">
<v-btn
color="primary"
class="mr-2"
fab
x-small
v-on="on"
@click="dialog = true"
>
<v-icon
style="padding-left: 4px"
</template>
<span>Clear Queued Tasks</span>
</v-tooltip>
<v-tooltip bottom>
<template v-slot:activator="{ on }">
<v-btn
color="error"
class="mr-2"
fab
x-small
v-on="on"
@click="killAgent"
>
fa-user-edit
</v-icon>
</v-btn>
</template>
<span>Rename Agent</span>
</v-tooltip>
<v-tooltip bottom>
<template v-slot:activator="{ on }">
<v-btn
color="primary"
class="mr-2"
fab
x-small
v-on="on"
@click="clearQueue"
>
<v-icon>fa-calendar-times</v-icon>
</v-btn>
</template>
<span>Clear Queued Tasks</span>
</v-tooltip>
<v-tooltip bottom>
<template v-slot:activator="{ on }">
<v-btn
color="error"
fab
x-small
v-on="on"
@click="killAgent"
>
<v-icon>fa-trash-alt</v-icon>
</v-btn>
</template>
<span>Kill Agent</span>
</v-tooltip>
<v-icon>fa-trash-alt</v-icon>
</v-btn>
</template>
<span>Kill Agent</span>
</v-tooltip>
</div>
</div>
<div class="split-view">
<div :style="splitPaneHeight()">
<split-pane
:min-percent="20"
:default-percent="60"
Expand Down Expand Up @@ -238,6 +240,11 @@ export default {
this.getAgent(this.$route.params.id);
},
methods: {
splitPaneHeight() {
/* Not the prettiest thing, but seems to cover most window sizes to avoid page scroll.
That's 94vh - height of breadcrumbs (57) - height of footer (36px) */
return 'height: calc(96vh - 57px - 36px';
},
getAgent(id) {
agentApi.getAgent(id)
.then((data) => {
Expand Down Expand Up @@ -283,13 +290,6 @@ export default {
</script>

<style>
.split-view {
/* Not the prettiest thing, but seems to cover most window sizes to avoid page scroll.
That's 94vh - height of breadcrumbs (57) - height of interact buttons (32px)
- height of footer (36px) */
height: calc(94vh - 57px - 32px - 36px);
}
.scrollable-pane {
max-height: 100%;
overflow: auto;
Expand All @@ -299,5 +299,6 @@ export default {
background-color: white;
height: 100%;
overflow-y: auto;
overflow-x: hidden;
}
</style>

0 comments on commit 93507bb

Please sign in to comment.