From 53623fad76274e39206b8e073e371775ea96946b Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Mon, 17 May 2021 12:16:10 +0200 Subject: ui: Migrate to FontAwesome 5 React library This change updates the frontend to use the FontAwesome 5 React library that renders SVG icons as opposed to CSS icon fonts. This migration resolves a couple of issues we had with server-side rendering of the previous FontAwesome icons. --- .../src/components/app/map/LoadingScreen.js | 5 +- .../app/map/controls/ExportCanvasComponent.js | 4 +- .../app/map/controls/ZoomControlComponent.js | 6 ++- .../src/components/app/sidebars/Sidebar.js | 6 ++- .../app/sidebars/project/PortfolioListComponent.js | 20 ++++---- .../app/sidebars/project/ScenarioListComponent.js | 16 +++--- .../app/sidebars/project/TopologyListComponent.js | 21 ++++---- .../app/sidebars/topology/NameComponent.js | 5 +- .../building/NewRoomConstructionComponent.js | 17 ++++--- .../topology/machine/BackToRackComponent.js | 4 +- .../sidebars/topology/machine/UnitAddComponent.js | 25 +++++---- .../app/sidebars/topology/machine/UnitComponent.js | 10 +++- .../sidebars/topology/machine/UnitTabsComponent.js | 28 ++++++---- .../sidebars/topology/rack/AddPrefabComponent.js | 9 ++-- .../sidebars/topology/rack/BackToRoomComponent.js | 9 ++-- .../sidebars/topology/rack/EmptySlotComponent.js | 17 ++++--- .../app/sidebars/topology/rack/MachineComponent.js | 26 ++++++---- .../topology/room/BackToBuildingComponent.js | 4 +- .../sidebars/topology/room/DeleteRoomComponent.js | 9 ++-- .../topology/room/RackConstructionComponent.js | 23 +++++---- .../src/components/home/ContactSection.js | 21 +++++--- .../src/components/home/IntroSection.js | 10 ++-- .../src/components/home/JumbotronHeader.js | 9 +++- .../src/components/home/ScreenshotSection.js | 12 ++++- .../src/components/home/SimulationSection.js | 17 +++++-- .../src/components/home/TeamSection.js | 59 +++++++++++----------- .../src/components/home/TechnologiesSection.js | 11 ++-- .../components/navigation/AppNavbarComponent.js | 5 +- .../src/components/navigation/LogoutButton.js | 5 +- .../src/components/navigation/Navbar.js | 9 +++- .../src/components/not-found/TerminalWindow.js | 4 +- .../components/projects/ProjectActionButtons.js | 8 +-- .../src/components/projects/ProjectList.js | 4 +- .../src/components/projects/ProjectRow.js | 4 +- 34 files changed, 273 insertions(+), 169 deletions(-) (limited to 'opendc-web/opendc-web-ui/src/components') diff --git a/opendc-web/opendc-web-ui/src/components/app/map/LoadingScreen.js b/opendc-web/opendc-web-ui/src/components/app/map/LoadingScreen.js index 7efea9b0..ddb94990 100644 --- a/opendc-web/opendc-web-ui/src/components/app/map/LoadingScreen.js +++ b/opendc-web/opendc-web-ui/src/components/app/map/LoadingScreen.js @@ -1,9 +1,10 @@ import React from 'react' -import FontAwesome from 'react-fontawesome' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faSpinner } from '@fortawesome/free-solid-svg-icons' const LoadingScreen = () => (
- + Loading your project...
) diff --git a/opendc-web/opendc-web-ui/src/components/app/map/controls/ExportCanvasComponent.js b/opendc-web/opendc-web-ui/src/components/app/map/controls/ExportCanvasComponent.js index 8487f47b..9e8cb36a 100644 --- a/opendc-web/opendc-web-ui/src/components/app/map/controls/ExportCanvasComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/map/controls/ExportCanvasComponent.js @@ -1,4 +1,6 @@ import React from 'react' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faCamera } from '@fortawesome/free-solid-svg-icons' const ExportCanvasComponent = () => ( ) diff --git a/opendc-web/opendc-web-ui/src/components/app/map/controls/ZoomControlComponent.js b/opendc-web/opendc-web-ui/src/components/app/map/controls/ZoomControlComponent.js index 65944bea..6bae792c 100644 --- a/opendc-web/opendc-web-ui/src/components/app/map/controls/ZoomControlComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/map/controls/ZoomControlComponent.js @@ -1,4 +1,6 @@ import React from 'react' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faPlus, faMinus } from '@fortawesome/free-solid-svg-icons' const ZoomControlComponent = ({ zoomInOnCenter }) => { return ( @@ -8,14 +10,14 @@ const ZoomControlComponent = ({ zoomInOnCenter }) => { title="Zoom in" onClick={() => zoomInOnCenter(true)} > - + ) diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/Sidebar.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/Sidebar.js index 64e95014..ccaa4144 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/Sidebar.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/Sidebar.js @@ -2,6 +2,8 @@ import PropTypes from 'prop-types' import classNames from 'classnames' import React, { useState } from 'react' import { collapseButton, collapseButtonRight, sidebar, sidebarRight } from './Sidebar.module.scss' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faAngleLeft, faAngleRight } from '@fortawesome/free-solid-svg-icons' function Sidebar({ isRight, collapsible = true, children }) { const [isCollapsed, setCollapsed] = useState(false) @@ -14,9 +16,9 @@ function Sidebar({ isRight, collapsible = true, children }) { onClick={() => setCollapsed(!isCollapsed)} > {(isCollapsed && isRight) || (!isCollapsed && !isRight) ? ( - + ) : ( - + )} ) diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/project/PortfolioListComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/project/PortfolioListComponent.js index ae965939..9dd36d5e 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/project/PortfolioListComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/project/PortfolioListComponent.js @@ -2,10 +2,11 @@ import PropTypes from 'prop-types' import React from 'react' import { Portfolio } from '../../../../shapes' import Link from 'next/link' -import FontAwesome from 'react-fontawesome' import ScenarioListContainer from '../../../../containers/app/sidebars/project/ScenarioListContainer' import { Button, Col, Row } from 'reactstrap' import classNames from 'classnames' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faPlus, faPlay, faTrash } from '@fortawesome/free-solid-svg-icons' function PortfolioListComponent({ portfolios, @@ -20,7 +21,7 @@ function PortfolioListComponent({

Portfolios

@@ -40,16 +41,15 @@ function PortfolioListComponent({ - diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/project/ScenarioListComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/project/ScenarioListComponent.js index 168b8e02..131a00b5 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/project/ScenarioListComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/project/ScenarioListComponent.js @@ -2,9 +2,10 @@ import PropTypes from 'prop-types' import React from 'react' import { Scenario } from '../../../../shapes' import Link from 'next/link' -import FontAwesome from 'react-fontawesome' import { Button, Col, Row } from 'reactstrap' import classNames from 'classnames' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faPlus, faPlay, faTrash } from '@fortawesome/free-solid-svg-icons' function ScenarioListComponent({ scenarios, @@ -35,23 +36,26 @@ function ScenarioListComponent({ color="primary" outline disabled - className="mr-1 fa fa-play" + className="mr-1" onClick={() => onChooseScenario(scenario.portfolioId, scenario._id)} - /> + > + + ))}
diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/project/TopologyListComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/project/TopologyListComponent.js index d5627abc..ac58669b 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/project/TopologyListComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/project/TopologyListComponent.js @@ -1,9 +1,10 @@ import PropTypes from 'prop-types' import React from 'react' import { Topology } from '../../../../shapes' -import FontAwesome from 'react-fontawesome' import { Button, Col, Row } from 'reactstrap' import classNames from 'classnames' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faPlus, faPlay, faTrash } from '@fortawesome/free-solid-svg-icons' function TopologyListComponent({ topologies, currentTopologyId, onChooseTopology, onNewTopology, onDeleteTopology }) { return ( @@ -11,7 +12,7 @@ function TopologyListComponent({ topologies, currentTopologyId, onChooseTopology

Topologies

@@ -26,19 +27,17 @@ function TopologyListComponent({ topologies, currentTopologyId, onChooseTopology {topology.name} - ))} diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/NameComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/NameComponent.js index 5fb0dc55..b4cbc78f 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/NameComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/NameComponent.js @@ -1,11 +1,12 @@ import React from 'react' -import FontAwesome from 'react-fontawesome' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faPencilAlt } from '@fortawesome/free-solid-svg-icons' const NameComponent = ({ name, onEdit }) => (

{name}

) diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/building/NewRoomConstructionComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/building/NewRoomConstructionComponent.js index fd552c1e..b1461743 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/building/NewRoomConstructionComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/building/NewRoomConstructionComponent.js @@ -1,24 +1,27 @@ import React from 'react' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faPlus, faCheck, faTimes } from '@fortawesome/free-solid-svg-icons' +import { Button } from 'reactstrap' const NewRoomConstructionComponent = ({ onStart, onFinish, onCancel, currentRoomInConstruction }) => { if (currentRoomInConstruction === '-1') { return (
- + Construct a new room
) } return (
-
- +
-
- + +
+
) } diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/machine/BackToRackComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/machine/BackToRackComponent.js index 70d522b2..eac99643 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/machine/BackToRackComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/machine/BackToRackComponent.js @@ -1,8 +1,10 @@ import React from 'react' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faAngleLeft } from '@fortawesome/free-solid-svg-icons' const BackToRackComponent = ({ onClick }) => (
- + Back to rack
) diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/machine/UnitAddComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/machine/UnitAddComponent.js index f80fccc8..532add37 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/machine/UnitAddComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/machine/UnitAddComponent.js @@ -1,29 +1,28 @@ import PropTypes from 'prop-types' import React, { useRef } from 'react' +import { Button, Form, FormGroup, Input } from 'reactstrap' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faPlus } from '@fortawesome/free-solid-svg-icons' function UnitAddComponent({ units, onAdd }) { const unitSelect = useRef(null) return ( -
-
- {units.map((unit) => ( ))} - - -
-
+ + + ) } diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/machine/UnitComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/machine/UnitComponent.js index de55e506..aa473f91 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/machine/UnitComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/machine/UnitComponent.js @@ -1,5 +1,7 @@ import React from 'react' import { UncontrolledPopover, PopoverHeader, PopoverBody, Button } from 'reactstrap' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faTrash, faInfoCircle } from '@fortawesome/free-solid-svg-icons' function UnitComponent({ index, unitType, unit, onDelete }) { let unitInfo @@ -37,13 +39,17 @@ function UnitComponent({ index, unitType, unit, onDelete }) {
  • {unit.name} - Unit Information {unitInfo} - +
  • ) diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/machine/UnitTabsComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/machine/UnitTabsComponent.js index 6599fefd..ebb5f479 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/machine/UnitTabsComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/machine/UnitTabsComponent.js @@ -1,5 +1,5 @@ import React, { useState } from 'react' -import { Nav, NavItem, NavLink, TabContent, TabPane } from 'reactstrap' +import { Nav, NavItem, NavLink, Row, TabContent, TabPane } from 'reactstrap' import UnitAddContainer from '../../../../../containers/app/sidebars/topology/machine/UnitAddContainer' import UnitListContainer from '../../../../../containers/app/sidebars/topology/machine/UnitListContainer' @@ -10,7 +10,7 @@ const UnitTabsComponent = () => { } return ( -
    +
    - - +
    + + +
    - - +
    + + +
    - - +
    + + +
    - - +
    + + +
    diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/rack/AddPrefabComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/rack/AddPrefabComponent.js index 75418f9d..d0218f38 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/rack/AddPrefabComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/rack/AddPrefabComponent.js @@ -1,10 +1,13 @@ import React from 'react' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faSave } from '@fortawesome/free-solid-svg-icons' +import { Button } from 'reactstrap' const AddPrefabComponent = ({ onClick }) => ( -
    - +
    + ) export default AddPrefabComponent diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/rack/BackToRoomComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/rack/BackToRoomComponent.js index c14775bf..f6a6f79b 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/rack/BackToRoomComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/rack/BackToRoomComponent.js @@ -1,10 +1,13 @@ import React from 'react' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faAngleLeft } from '@fortawesome/free-solid-svg-icons' +import { Button } from 'reactstrap' const BackToRoomComponent = ({ onClick }) => ( -
    - +
    + ) export default BackToRoomComponent diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/rack/EmptySlotComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/rack/EmptySlotComponent.js index d7e30f1d..d6fa9dc9 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/rack/EmptySlotComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/rack/EmptySlotComponent.js @@ -1,13 +1,18 @@ import React from 'react' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faPlus } from '@fortawesome/free-solid-svg-icons' +import { ListGroupItem, Badge, Button } from 'reactstrap' const EmptySlotComponent = ({ position, onAdd }) => ( -
  • - {position} - -
  • + + ) export default EmptySlotComponent diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/rack/MachineComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/rack/MachineComponent.js index 4db0e7fe..36b15c71 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/rack/MachineComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/rack/MachineComponent.js @@ -1,13 +1,16 @@ import React from 'react' +import Image from 'next/image' import { Machine } from '../../../../../shapes' +import { Badge, ListGroupItem } from 'reactstrap' const UnitIcon = ({ id, type }) => ( -
    - + {'Machine
    ) @@ -17,22 +20,23 @@ const MachineComponent = ({ position, machine, onClick }) => { machine.cpuIds.length + machine.gpuIds.length + machine.memoryIds.length + machine.storageIds.length === 0 return ( -
  • - {position} + + {position} +
    {machine.cpuIds.length > 0 ? : undefined} {machine.gpuIds.length > 0 ? : undefined} {machine.memoryIds.length > 0 ? : undefined} {machine.storageIds.length > 0 ? : undefined} - {hasNoUnits ? ( - Machine with no units - ) : undefined} + {hasNoUnits ? Machine with no units : undefined}
    -
  • + ) } diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/room/BackToBuildingComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/room/BackToBuildingComponent.js index 64c0a1f6..696b345b 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/room/BackToBuildingComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/room/BackToBuildingComponent.js @@ -1,8 +1,10 @@ import React from 'react' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faAngleLeft } from '@fortawesome/free-solid-svg-icons' const BackToBuildingComponent = ({ onClick }) => (
    - + Back to building
    ) diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/room/DeleteRoomComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/room/DeleteRoomComponent.js index 78417359..242f7a2b 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/room/DeleteRoomComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/room/DeleteRoomComponent.js @@ -1,10 +1,13 @@ import React from 'react' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faTrash } from '@fortawesome/free-solid-svg-icons' +import { Button } from 'reactstrap' const DeleteRoomComponent = ({ onClick }) => ( -
    - +
    + ) export default DeleteRoomComponent diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/room/RackConstructionComponent.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/room/RackConstructionComponent.js index 44566f61..19d6b309 100644 --- a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/room/RackConstructionComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/room/RackConstructionComponent.js @@ -1,26 +1,29 @@ -import classNames from 'classnames' import React from 'react' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faTimes, faPlus } from '@fortawesome/free-solid-svg-icons' +import { Button } from 'reactstrap' const RackConstructionComponent = ({ onStart, onStop, inRackConstructionMode, isEditingRoom }) => { if (inRackConstructionMode) { return ( -
    - +
    + ) } return ( -
    (isEditingRoom ? undefined : onStart())} > - + Start rack construction -
    + ) } diff --git a/opendc-web/opendc-web-ui/src/components/home/ContactSection.js b/opendc-web/opendc-web-ui/src/components/home/ContactSection.js index 25daaccf..60a7e6a3 100644 --- a/opendc-web/opendc-web-ui/src/components/home/ContactSection.js +++ b/opendc-web/opendc-web-ui/src/components/home/ContactSection.js @@ -1,8 +1,10 @@ import React from 'react' -import FontAwesome from 'react-fontawesome' +import Image from 'next/image' import { Row, Col } from 'reactstrap' import ContentSection from './ContentSection' - +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faExclamationTriangle, faEnvelope } from '@fortawesome/free-solid-svg-icons' +import { faGithub } from '@fortawesome/free-brands-svg-icons' import { contactSection, tudelftIcon } from './ContactSection.module.scss' const ContactSection = () => ( @@ -10,14 +12,14 @@ const ContactSection = () => ( - +
    atlarge-research/opendc - +
    opendc@atlarge-research.com @@ -25,7 +27,14 @@ const ContactSection = () => ( - TU Delft + TU Delft @@ -39,7 +48,7 @@ const ContactSection = () => ( - +
    Disclaimer: OpenDC is an experimental tool. Your data may get lost, overwritten, or otherwise become unavailable. diff --git a/opendc-web/opendc-web-ui/src/components/home/IntroSection.js b/opendc-web/opendc-web-ui/src/components/home/IntroSection.js index 7b467889..67e8cd8b 100644 --- a/opendc-web/opendc-web-ui/src/components/home/IntroSection.js +++ b/opendc-web/opendc-web-ui/src/components/home/IntroSection.js @@ -1,4 +1,5 @@ import React from 'react' +import Image from 'next/image' import { Container, Row, Col } from 'reactstrap' const IntroSection = ({ className }) => ( @@ -14,9 +15,12 @@ const IntroSection = ({ className }) => ( - Schematic top-down view of a datacenter

    diff --git a/opendc-web/opendc-web-ui/src/components/home/JumbotronHeader.js b/opendc-web/opendc-web-ui/src/components/home/JumbotronHeader.js index 0d3217f9..98aa0af2 100644 --- a/opendc-web/opendc-web-ui/src/components/home/JumbotronHeader.js +++ b/opendc-web/opendc-web-ui/src/components/home/JumbotronHeader.js @@ -1,6 +1,9 @@ import React from 'react' +import Image from 'next/image' import { Container, Jumbotron, Button } from 'reactstrap' import { jumbotronHeader, jumbotron, dc } from './JumbotronHeader.module.scss' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons' const JumbotronHeader = () => (

    @@ -10,7 +13,9 @@ const JumbotronHeader = () => ( OpenDC

    Collaborative Datacenter Simulation and Exploration for Everybody

    - OpenDC +
    + OpenDC +

    diff --git a/opendc-web/opendc-web-ui/src/components/home/ScreenshotSection.js b/opendc-web/opendc-web-ui/src/components/home/ScreenshotSection.js index 4f634b28..9673b7b7 100644 --- a/opendc-web/opendc-web-ui/src/components/home/ScreenshotSection.js +++ b/opendc-web/opendc-web-ui/src/components/home/ScreenshotSection.js @@ -1,4 +1,5 @@ import React from 'react' +import Image from 'next/image' import { Row, Col } from 'reactstrap' import ContentSection from './ContentSection' import { screenshot } from './ScreenshotSection.module.scss' @@ -6,11 +7,18 @@ import { screenshot } from './ScreenshotSection.module.scss' const ScreenshotSection = ({ className, name, title, imageUrl, caption, imageIsRight, children }) => ( - + {children} - {caption} + {caption}
    {caption}
    diff --git a/opendc-web/opendc-web-ui/src/components/home/SimulationSection.js b/opendc-web/opendc-web-ui/src/components/home/SimulationSection.js index 44ce905b..c154cc26 100644 --- a/opendc-web/opendc-web-ui/src/components/home/SimulationSection.js +++ b/opendc-web/opendc-web-ui/src/components/home/SimulationSection.js @@ -1,4 +1,5 @@ import React from 'react' +import Image from 'next/image' import { Col, Row } from 'reactstrap' import ContentSection from './ContentSection' @@ -18,9 +19,12 @@ const SimulationSection = ({ className }) => { - Running an experiment in OpenDC Running an experiment in OpenDC @@ -39,7 +43,14 @@ const SimulationSection = ({ className }) => { - OpenDC's Architecture + OpenDC's Architecture OpenDC's Architecture diff --git a/opendc-web/opendc-web-ui/src/components/home/TeamSection.js b/opendc-web/opendc-web-ui/src/components/home/TeamSection.js index 4e8a3906..bbbe241e 100644 --- a/opendc-web/opendc-web-ui/src/components/home/TeamSection.js +++ b/opendc-web/opendc-web-ui/src/components/home/TeamSection.js @@ -1,43 +1,44 @@ import React from 'react' +import Image from 'next/image' import { Row, Col } from 'reactstrap' import ContentSection from './ContentSection' const TeamLead = ({ photoId, name, description }) => ( - - -

    {name}

    -
    {description}
    - + + + {name} + + +

    {name}

    +
    {description}
    + +
    ) const TeamMember = ({ photoId, name }) => ( - - -
    {name}
    - + + + {name} + + +
    {name}
    + +
    ) diff --git a/opendc-web/opendc-web-ui/src/components/home/TechnologiesSection.js b/opendc-web/opendc-web-ui/src/components/home/TechnologiesSection.js index 6fdf4e5c..efedebb7 100644 --- a/opendc-web/opendc-web-ui/src/components/home/TechnologiesSection.js +++ b/opendc-web/opendc-web-ui/src/components/home/TechnologiesSection.js @@ -1,35 +1,36 @@ import React from 'react' -import FontAwesome from 'react-fontawesome' import { ListGroup, ListGroupItem } from 'reactstrap' import ContentSection from './ContentSection' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faWindowMaximize, faTv, faDatabase, faCogs } from '@fortawesome/free-solid-svg-icons' const TechnologiesSection = ({ className }) => ( - + Browser JavaScript, React, Redux, Konva - + Server Python, Flask, FlaskSocketIO, OpenAPI - + Database MongoDB - + Simulator Kotlin diff --git a/opendc-web/opendc-web-ui/src/components/navigation/AppNavbarComponent.js b/opendc-web/opendc-web-ui/src/components/navigation/AppNavbarComponent.js index 7b1eaae2..28207968 100644 --- a/opendc-web/opendc-web-ui/src/components/navigation/AppNavbarComponent.js +++ b/opendc-web/opendc-web-ui/src/components/navigation/AppNavbarComponent.js @@ -1,16 +1,17 @@ import React from 'react' -import FontAwesome from 'react-fontawesome' import Link from 'next/link' import { NavLink } from 'reactstrap' import Navbar, { NavItem } from './Navbar' import {} from './Navbar.module.scss' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faList } from '@fortawesome/free-solid-svg-icons' const AppNavbarComponent = ({ project, fullWidth }) => ( - + My Projects diff --git a/opendc-web/opendc-web-ui/src/components/navigation/LogoutButton.js b/opendc-web/opendc-web-ui/src/components/navigation/LogoutButton.js index 0c0feeb1..4ab577e0 100644 --- a/opendc-web/opendc-web-ui/src/components/navigation/LogoutButton.js +++ b/opendc-web/opendc-web-ui/src/components/navigation/LogoutButton.js @@ -1,11 +1,12 @@ import PropTypes from 'prop-types' import React from 'react' -import FontAwesome from 'react-fontawesome' import { NavLink } from 'reactstrap' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faSignOutAlt } from '@fortawesome/free-solid-svg-icons' const LogoutButton = ({ onLogout }) => ( - + ) diff --git a/opendc-web/opendc-web-ui/src/components/navigation/Navbar.js b/opendc-web/opendc-web-ui/src/components/navigation/Navbar.js index 5c9ea1b8..690a7bdf 100644 --- a/opendc-web/opendc-web-ui/src/components/navigation/Navbar.js +++ b/opendc-web/opendc-web-ui/src/components/navigation/Navbar.js @@ -1,6 +1,7 @@ import React, { useState } from 'react' import Link from 'next/link' import { useRouter } from 'next/router' +import Image from 'next/image' import { Navbar as RNavbar, NavItem as RNavItem, @@ -16,6 +17,8 @@ import Logout from '../../containers/auth/Logout' import ProfileName from '../../containers/auth/ProfileName' import { login, navbar, opendcBrand } from './Navbar.module.scss' import { useAuth } from '../../auth' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faGithub } from '@fortawesome/free-brands-svg-icons' export const NAVBAR_HEIGHT = 60 @@ -25,7 +28,7 @@ const GitHubLink = () => ( className="ml-2 mr-3 text-dark" style={{ position: 'relative', top: 7 }} > - + ) @@ -87,7 +90,9 @@ const Navbar = ({ fullWidth, children }) => { - OpenDC +
    + OpenDC +
    diff --git a/opendc-web/opendc-web-ui/src/components/not-found/TerminalWindow.js b/opendc-web/opendc-web-ui/src/components/not-found/TerminalWindow.js index 28fd81e9..e6200b10 100644 --- a/opendc-web/opendc-web-ui/src/components/not-found/TerminalWindow.js +++ b/opendc-web/opendc-web-ui/src/components/not-found/TerminalWindow.js @@ -3,6 +3,8 @@ import Link from 'next/link' import BlinkingCursor from './BlinkingCursor' import CodeBlock from './CodeBlock' import { terminalWindow, terminalHeader, terminalBody, segfault, subTitle, homeBtn } from './TerminalWindow.module.scss' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faHome } from '@fortawesome/free-solid-svg-icons' const TerminalWindow = () => (
    @@ -25,7 +27,7 @@ const TerminalWindow = () => (
    - GET ME BACK TO OPENDC + GET ME BACK TO OPENDC
    diff --git a/opendc-web/opendc-web-ui/src/components/projects/ProjectActionButtons.js b/opendc-web/opendc-web-ui/src/components/projects/ProjectActionButtons.js index 96970fd9..0725e42b 100644 --- a/opendc-web/opendc-web-ui/src/components/projects/ProjectActionButtons.js +++ b/opendc-web/opendc-web-ui/src/components/projects/ProjectActionButtons.js @@ -2,12 +2,14 @@ import PropTypes from 'prop-types' import React from 'react' import Link from 'next/link' import { Button } from 'reactstrap' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faPlay, faUsers, faTrash } from '@fortawesome/free-solid-svg-icons' const ProjectActionButtons = ({ projectId, onViewUsers, onDelete }) => ( ) diff --git a/opendc-web/opendc-web-ui/src/components/projects/ProjectList.js b/opendc-web/opendc-web-ui/src/components/projects/ProjectList.js index cb17b835..dc3f85ec 100644 --- a/opendc-web/opendc-web-ui/src/components/projects/ProjectList.js +++ b/opendc-web/opendc-web-ui/src/components/projects/ProjectList.js @@ -2,13 +2,15 @@ import PropTypes from 'prop-types' import React from 'react' import { Project } from '../../shapes' import ProjectRow from './ProjectRow' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faQuestionCircle } from '@fortawesome/free-solid-svg-icons' const ProjectList = ({ projects }) => { return (
    {projects.length === 0 ? (
    - + No projects here yet... Add some with the 'New Project' button!
    ) : ( diff --git a/opendc-web/opendc-web-ui/src/components/projects/ProjectRow.js b/opendc-web/opendc-web-ui/src/components/projects/ProjectRow.js index 9a95b777..91368de8 100644 --- a/opendc-web/opendc-web-ui/src/components/projects/ProjectRow.js +++ b/opendc-web/opendc-web-ui/src/components/projects/ProjectRow.js @@ -1,10 +1,10 @@ -import classNames from 'classnames' import React from 'react' import ProjectActions from '../../containers/projects/ProjectActions' import { Project } from '../../shapes' import { AUTH_DESCRIPTION_MAP, AUTH_ICON_MAP } from '../../util/authorizations' import { parseAndFormatDateTime } from '../../util/date-time' import { useAuth } from '../../auth' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' const ProjectRow = ({ project }) => { const { user } = useAuth() @@ -14,7 +14,7 @@ const ProjectRow = ({ project }) => { {project.name} {parseAndFormatDateTime(project.datetimeLastEdited)} - + {AUTH_DESCRIPTION_MAP[level]} -- cgit v1.2.3