Move to only using modern imports

This commit is contained in:
Ace Pace 2020-04-30 12:26:22 +03:00
parent 5101c50d95
commit 375bb7032a
9 changed files with 16 additions and 17 deletions

View File

@ -1,9 +1,9 @@
/*eslint no-console:0 */ /*eslint no-console:0 */
'use strict'; 'use strict';
require('core-js/fn/object/assign'); import assign from 'core-js/fn/object'
const webpack = require('webpack'); import webpack from 'webpack'
const WebpackDevServer = require('webpack-dev-server'); import WebpackDevServer from 'webpack-dev-server'
const config = require('./webpack.config'); import config from './webpack.config'
/** /**
* Flag indicating whether webpack compiled for the first time. * Flag indicating whether webpack compiled for the first time.

View File

@ -26,10 +26,10 @@ import 'react-toggle/style.css';
import 'react-table/react-table.css'; import 'react-table/react-table.css';
import VersionComponent from './side-menu/VersionComponent'; import VersionComponent from './side-menu/VersionComponent';
let logoImage = require('../images/monkey-icon.svg'); import logoImage from '../images/monkey-icon.svg';
let infectionMonkeyImage = require('../images/infection-monkey.svg'); import infectionMonkeyImage from '../images/infection-monkey.svg';
let guardicoreLogoImage = require('../images/guardicore-logo.png'); import guardicoreLogoImage from '../images/guardicore-logo.png';
let notificationIcon = require('../images/notification-logo-512x512.png'); import notificationIcon from '../images/notification-logo-512x512.png';
const reportZeroTrustRoute = '/report/zeroTrust'; const reportZeroTrustRoute = '/report/zeroTrust';

View File

@ -2,7 +2,7 @@ import React from 'react';
import '../../styles/NotFoundPage.scss'; import '../../styles/NotFoundPage.scss';
let monkeyDetective = require('../../images/detective-monkey.svg'); import monkeyDetective from '../../images/detective-monkey.svg';
class ConfigurePageComponent extends React.Component{ class ConfigurePageComponent extends React.Component{
constructor(props) { constructor(props) {

View File

@ -17,8 +17,7 @@ import PrintReportButton from './common/PrintReportButton';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faMinus } from '@fortawesome/free-solid-svg-icons/faMinus'; import { faMinus } from '@fortawesome/free-solid-svg-icons/faMinus';
import guardicoreLogoImage from '../../images/guardicore-logo.png'
let guardicoreLogoImage = require('../../images/guardicore-logo.png');
class ReportPageComponent extends AuthComponent { class ReportPageComponent extends AuthComponent {

View File

@ -5,7 +5,7 @@ import AttackReport from '../AttackReport';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faQuestionCircle} from '@fortawesome/free-solid-svg-icons/faQuestionCircle'; import {faQuestionCircle} from '@fortawesome/free-solid-svg-icons/faQuestionCircle';
const classNames = require('classnames'); import classNames from 'classnames';
class SelectedTechnique extends React.Component { class SelectedTechnique extends React.Component {

View File

@ -9,7 +9,7 @@ import { faToggleOn } from '@fortawesome/free-solid-svg-icons/faToggleON'
import {Button} from 'react-bootstrap'; import {Button} from 'react-bootstrap';
import AttackReport from '../AttackReport'; import AttackReport from '../AttackReport';
const classNames = require('classnames'); import classNames from 'classnames';
class TechniqueDropdowns extends React.Component{ class TechniqueDropdowns extends React.Component{

View File

@ -2,7 +2,7 @@ import React, {Component} from 'react';
import {Col} from 'react-bootstrap'; import {Col} from 'react-bootstrap';
import * as PropTypes from 'prop-types'; import * as PropTypes from 'prop-types';
let monkeyLogoImage = require('../../../images/monkey-icon.svg'); import monkeyLogoImage from '../../../images/monkey-icon.svg';
export const ReportTypes = { export const ReportTypes = {
zeroTrust: 'Zero Trust', zeroTrust: 'Zero Trust',

View File

@ -2,8 +2,8 @@ import React, {Component} from 'react';
import {Timeline, TimelineEvent} from 'react-event-timeline'; import {Timeline, TimelineEvent} from 'react-event-timeline';
import * as PropTypes from 'prop-types'; import * as PropTypes from 'prop-types';
let monkeyLocalIcon = require('../../../images/zerotrust/im-alert-machine-icon.svg'); import monkeyLocalIcon from '../../../images/zerotrust/im-alert-machine-icon.svg';
let monkeyNetworkIcon = require('../../../images/zerotrust/im-alert-network-icon.svg'); import monkeyNetworkIcon from '../../../images/zerotrust/im-alert-network-icon.svg';
const eventTypeToIcon = { const eventTypeToIcon = {
'monkey_local': monkeyLocalIcon, 'monkey_local': monkeyLocalIcon,

View File

@ -2,7 +2,7 @@ import StandardConfig from './StandardConfig';
import AwsConfig from './AwsConfig'; import AwsConfig from './AwsConfig';
import PasswordConfig from './PasswordConfig'; import PasswordConfig from './PasswordConfig';
const SERVER_CONFIG_JSON = require('../../../server_config.json'); import SERVER_CONFIG_JSON from '../../../server_config.json';
const CONFIG_DICT = const CONFIG_DICT =
{ {