fix lint errors

dependabot/npm_and_yarn/Src/WebController/UI/websocket-extensions-0.1.4
Andras Toth 2020-05-19 15:35:09 +01:00
parent 1be86e7ddb
commit a024263fbb
14 changed files with 66 additions and 61 deletions

View File

@ -46,8 +46,10 @@ import { namespace } from 'vuex-class';
import { Component, Prop, Watch, Mixins } from 'vue-property-decorator';
import { NodeKlass, C3Node, C3FieldDefault } from '@/types/c3types';
import { GetCapabilityForFn } from '@/store/C3Capability';
import { GetTypeNameForInterfaceFn } from '@/store/C3Capability';
import {
GetCapabilityForFn,
GetTypeNameForInterfaceFn
} from '@/store/C3Capability';
import C3 from '@/c3';
import Input from '@/components/form/Input.vue';
@ -308,7 +310,7 @@ export default class GeneralForm extends Mixins(C3) {
} else {
this.addNotify({
type: 'info',
message: "Command not set up correctly, Form can't be generated."
message: `Command not set up correctly, Form can't be generated.`
});
}
}

View File

@ -20,7 +20,7 @@
legend="TargetSuffix"
class="form-element"
:selected="selectedTargetSuffix"
:options="{ dll: 'dll', exe: 'exe', shellcode: 'shellcode'}"
:options="{ dll: 'dll', exe: 'exe', shellcode: 'shellcode' }"
:border="true"
@change="changeTargetSuffix($event, targetSuffix)"
/>
@ -34,7 +34,10 @@
/>
</div>
<div class="c3modal-form">
<DonutForm v-if="donutSelected" @change="changeDonutForm($event, formData)" />
<DonutForm
v-if="donutSelected"
@change="changeDonutForm($event, formData)"
/>
</div>
<div class="c3modal-form">
<h1>Add Command</h1>
@ -48,12 +51,16 @@
/>
</div>
<dir class="flex-row c3modal-actions">
<button class="c3btn c3btn--grey" v-on:click.self="closeThisModal()">Cancel</button>
<button class="c3btn c3btn--grey" v-on:click.self="closeThisModal()">
Cancel
</button>
<button
class="c3btn c3btn"
v-on:click="createNewRelay()"
:disabled="formIsValid"
>Create and Download Relay</button>
>
Create and Download Relay
</button>
</dir>
</div>
</div>
@ -210,11 +217,10 @@ export default class CreateRelayModal extends Mixins(C3) {
public changeTargetSuffix(t: string): void {
this.targetSuffix = t;
if (this.targetSuffix === 'shellcode') {
this.donutSelected = true;
} else {
this.donutSelected = false;
}
this.donutSelected =
this.targetSuffix === 'shellcode'
? (this.donutSelected = true)
: (this.donutSelected = false);
}
public changeArchitecture(a: string): void {

View File

@ -107,9 +107,9 @@ export default class OptionsModal extends Mixins(C3) {
}
}
created() {
public created() {
this.c3Url = this.getUrl;
this.c3Port = parseInt(this.getPort);
this.c3Port = parseInt(this.getPort, 10);
}
}
</script>

View File

@ -70,11 +70,10 @@ export default class InterfaceList extends Mixins(C3, Partial) {
get c3Interfaces() {
let interfaces = [];
if (this.interfaceTypeFilter === 'ALL') {
interfaces = this.getInterfaces();
} else {
interfaces = this.getInterfaces([this.interfaceTypeFilter as NodeKlass]);
}
interfaces =
this.interfaceTypeFilter === 'ALL'
? this.getInterfaces()
: this.getInterfaces([this.interfaceTypeFilter as NodeKlass]);
if (this.returnChannelFilter === 'YES') {
interfaces = interfaces.filter((c3Node: C3Node) => {

View File

@ -153,11 +153,9 @@ export default class RouteList extends Mixins(C3, Partial) {
if (!!this.parentKlass && this.parentKlass === NodeKlass.Relay) {
const relay = this.getRelay(this.parentId);
if (!!relay) {
apiURL = apiURL + `${relay.parentId}/relay/${this.parentId}/command`;
} else {
apiURL = apiURL + `${this.parentId}/command`;
}
apiURL = !!relay
? apiURL + `${relay.parentId}/relay/${this.parentId}/command`
: apiURL + `${this.parentId}/command`;
}
axios({

View File

@ -115,11 +115,8 @@ const mutations: MutationTree<VisState> = {
setTreeView(visState, b: boolean): void {
visState.options.layout.hierarchical.enabled = b;
if (b === true) {
visState.options.physics.stabilization.onlyDynamicEdges = true;
} else {
visState.options.physics.stabilization.onlyDynamicEdges = false;
}
visState.options.physics.stabilization.onlyDynamicEdges =
b === true ? true : false;
},
setPhysics(visState, b: boolean): void {
@ -169,11 +166,7 @@ const actions: ActionTree<VisState, RootState> = {
// If relay last seen begore gateway last start than we think gateway maybe down
if (target.klass === NodeKlass.Relay) {
if (!!target.timestamp) {
if (target.timestamp < gatewayStartTime) {
active = false;
} else {
active = true;
}
active = target.timestamp < gatewayStartTime ? false : true;
}
// if gateway down the hole network down

View File

@ -1,7 +1,10 @@
import { RootState } from '@/types/store/RootState';
import { RootState } from './../../../src/types/store/RootState';
import { Module, ActionTree } from 'vuex';
import { CapabilityState } from '@/store/C3Capability';
import { getters, mutations } from '@/store/C3Capability';
import {
CapabilityState,
getters,
mutations
} from './../../../src/store/C3Capability';
import { capability } from './mockCapability';
const namespaced: boolean = true;

View File

@ -1,7 +1,10 @@
import { RootState } from '@/types/store/RootState';
import { RootState } from './../../../src/types/store/RootState';
import { Module, ActionTree } from 'vuex';
import { C3CommandState } from '@/store/C3Command';
import { getters, mutations } from '@/store/C3Command';
import {
C3CommandState,
getters,
mutations
} from './../../../src/store/C3Command';
import { commands } from './mockCommandLogs';
const namespaced: boolean = true;

View File

@ -1,8 +1,7 @@
import { C3State } from '@/types/c3types';
import { mutations } from '@/store/C3Module';
import { RootState } from '@/types/store/RootState';
import { C3State } from './../../../src/types/c3types';
import { mutations, getters } from './../../../src/store/C3Module';
import { RootState } from './../../../src/types/store/RootState';
import { Module, ActionTree } from 'vuex';
import { getters } from '@/store/C3Module';
import { gateways } from './mockGateways';
import { gateway } from './mockGateway';
import { nodes } from './mockNodes';

View File

@ -521,13 +521,13 @@ export const capability = {
],
{
description:
"This token is what channel needs to interact with Slack's API",
'This token is what channel needs to interact with Slacks API',
min: 1,
name: 'Slack token',
type: 'string'
},
{
description: "Name of Slack's channel used by api",
description: 'Name of Slacks channel used by api',
min: 4,
name: 'Channel name',
randomize: true,
@ -1153,13 +1153,13 @@ export const capability = {
],
{
description:
"This token is what channel needs to interact with Slack's API",
'This token is what channel needs to interact with Slacks API',
min: 1,
name: 'Slack token',
type: 'string'
},
{
description: "Name of Slack's channel used by api",
description: 'Name of Slacks channel used by api',
min: 4,
name: 'Channel name',
randomize: true,
@ -1180,13 +1180,13 @@ export const capability = {
},
{
description:
"This token is what channel needs to interact with Slack's API",
'This token is what channel needs to interact with Slacks API',
min: 1,
name: 'Slack token',
type: 'string'
},
{
description: "Name of Slack's channel used by api",
description: 'Name of Slacks channel used by api',
min: 4,
name: 'Channel name',
randomize: true,
@ -1697,13 +1697,13 @@ export const capability = {
],
{
description:
"This token is what channel needs to interact with Slack's API",
'This token is what channel needs to interact with Slacks API',
min: 1,
name: 'Slack token',
type: 'string'
},
{
description: "Name of Slack's channel used by api",
description: 'Name of Slacks channel used by api',
min: 4,
name: 'Channel name',
randomize: true,
@ -1724,13 +1724,13 @@ export const capability = {
},
{
description:
"This token is what channel needs to interact with Slack's API",
'This token is what channel needs to interact with Slacks API',
min: 1,
name: 'Slack token',
type: 'string'
},
{
description: "Name of Slack's channel used by api",
description: 'Name of Slacks channel used by api',
min: 4,
name: 'Channel name',
randomize: true,

View File

@ -1,6 +1,6 @@
// tslint:disable max-line-length
import { C3Node, NodeKlass } from '@/types/c3types';
import { C3Node, NodeKlass } from './../../../src/types/c3types';
export const nodes: C3Node[] = [
{

View File

@ -1,4 +1,4 @@
import { C3Node, NodeKlass } from '@/types/c3types';
import { C3Node, NodeKlass } from './../../../src/types/c3types';
export const gateways = ['a1d0'];

View File

@ -1,8 +1,8 @@
import { modalModule } from '@/store/ModalModule';
import { paginateModule } from '@/store/PaginateModule';
import { visModule } from '@/store/VisModule';
import { modalModule } from './../../../src/store/ModalModule';
import { paginateModule } from './../../../src/store/PaginateModule';
import { visModule } from './../../../src/store/VisModule';
import { c3Module } from './c3module';
import { notifyModule } from '@/store/NotifyModule';
import { notifyModule } from './../../../src/store/NotifyModule';
import { c3Capability } from './c3capability';
import { c3CommandModule } from './c3command';

View File

@ -10,6 +10,8 @@
"interface-name": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"no-consecutive-blank-lines": false
"no-consecutive-blank-lines": false,
"no-submodule-imports": false,
"no-implicit-dependencies": false
}
}