forked from p15670423/monkey
Move to only using modern imports
This commit is contained in:
parent
5101c50d95
commit
375bb7032a
|
@ -1,9 +1,9 @@
|
|||
/*eslint no-console:0 */
|
||||
'use strict';
|
||||
require('core-js/fn/object/assign');
|
||||
const webpack = require('webpack');
|
||||
const WebpackDevServer = require('webpack-dev-server');
|
||||
const config = require('./webpack.config');
|
||||
import assign from 'core-js/fn/object'
|
||||
import webpack from 'webpack'
|
||||
import WebpackDevServer from 'webpack-dev-server'
|
||||
import config from './webpack.config'
|
||||
|
||||
/**
|
||||
* Flag indicating whether webpack compiled for the first time.
|
||||
|
|
|
@ -26,10 +26,10 @@ import 'react-toggle/style.css';
|
|||
import 'react-table/react-table.css';
|
||||
import VersionComponent from './side-menu/VersionComponent';
|
||||
|
||||
let logoImage = require('../images/monkey-icon.svg');
|
||||
let infectionMonkeyImage = require('../images/infection-monkey.svg');
|
||||
let guardicoreLogoImage = require('../images/guardicore-logo.png');
|
||||
let notificationIcon = require('../images/notification-logo-512x512.png');
|
||||
import logoImage from '../images/monkey-icon.svg';
|
||||
import infectionMonkeyImage from '../images/infection-monkey.svg';
|
||||
import guardicoreLogoImage from '../images/guardicore-logo.png';
|
||||
import notificationIcon from '../images/notification-logo-512x512.png';
|
||||
|
||||
const reportZeroTrustRoute = '/report/zeroTrust';
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
|
||||
import '../../styles/NotFoundPage.scss';
|
||||
|
||||
let monkeyDetective = require('../../images/detective-monkey.svg');
|
||||
import monkeyDetective from '../../images/detective-monkey.svg';
|
||||
|
||||
class ConfigurePageComponent extends React.Component{
|
||||
constructor(props) {
|
||||
|
|
|
@ -17,8 +17,7 @@ import PrintReportButton from './common/PrintReportButton';
|
|||
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faMinus } from '@fortawesome/free-solid-svg-icons/faMinus';
|
||||
|
||||
let guardicoreLogoImage = require('../../images/guardicore-logo.png');
|
||||
import guardicoreLogoImage from '../../images/guardicore-logo.png'
|
||||
|
||||
|
||||
class ReportPageComponent extends AuthComponent {
|
||||
|
|
|
@ -5,7 +5,7 @@ import AttackReport from '../AttackReport';
|
|||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faQuestionCircle} from '@fortawesome/free-solid-svg-icons/faQuestionCircle';
|
||||
|
||||
const classNames = require('classnames');
|
||||
import classNames from 'classnames';
|
||||
|
||||
class SelectedTechnique extends React.Component {
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import { faToggleOn } from '@fortawesome/free-solid-svg-icons/faToggleON'
|
|||
import {Button} from 'react-bootstrap';
|
||||
import AttackReport from '../AttackReport';
|
||||
|
||||
const classNames = require('classnames');
|
||||
import classNames from 'classnames';
|
||||
|
||||
class TechniqueDropdowns extends React.Component{
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import React, {Component} from 'react';
|
|||
import {Col} from 'react-bootstrap';
|
||||
import * as PropTypes from 'prop-types';
|
||||
|
||||
let monkeyLogoImage = require('../../../images/monkey-icon.svg');
|
||||
import monkeyLogoImage from '../../../images/monkey-icon.svg';
|
||||
|
||||
export const ReportTypes = {
|
||||
zeroTrust: 'Zero Trust',
|
||||
|
|
|
@ -2,8 +2,8 @@ import React, {Component} from 'react';
|
|||
import {Timeline, TimelineEvent} from 'react-event-timeline';
|
||||
import * as PropTypes from 'prop-types';
|
||||
|
||||
let monkeyLocalIcon = require('../../../images/zerotrust/im-alert-machine-icon.svg');
|
||||
let monkeyNetworkIcon = require('../../../images/zerotrust/im-alert-network-icon.svg');
|
||||
import monkeyLocalIcon from '../../../images/zerotrust/im-alert-machine-icon.svg';
|
||||
import monkeyNetworkIcon from '../../../images/zerotrust/im-alert-network-icon.svg';
|
||||
|
||||
const eventTypeToIcon = {
|
||||
'monkey_local': monkeyLocalIcon,
|
||||
|
|
|
@ -2,7 +2,7 @@ import StandardConfig from './StandardConfig';
|
|||
import AwsConfig from './AwsConfig';
|
||||
import PasswordConfig from './PasswordConfig';
|
||||
|
||||
const SERVER_CONFIG_JSON = require('../../../server_config.json');
|
||||
import SERVER_CONFIG_JSON from '../../../server_config.json';
|
||||
|
||||
const CONFIG_DICT =
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue