summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-22 15:05:50 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-23 10:06:10 +0200
commitb32c5c06ee844072a760f776e5f37f7c32c97c8f (patch)
tree3f4c4e8b95dff0b63ab9126cf8aeb23ad2ae4065
parent2b98c0d580dd2fe5d103ea1ab16e69db56734cde (diff)
Update metadata and docs
-rw-r--r--.gitignore28
-rw-r--r--LICENSE.md21
-rw-r--r--README.md26
-rw-r--r--package.json26
-rw-r--r--src/components/map/elements/Backdrop.js2
-rw-r--r--src/components/map/elements/GrayLayer.js2
-rw-r--r--src/components/map/elements/HoverTile.js2
-rw-r--r--src/components/map/elements/RackFillBar.js2
-rw-r--r--src/components/map/elements/TileObject.js2
-rw-r--r--src/components/map/elements/TilePlusIcon.js2
-rw-r--r--src/components/map/elements/WallSegment.js2
-rw-r--r--src/components/map/groups/GridGroup.js2
-rw-r--r--src/components/map/groups/RackGroup.js2
-rw-r--r--src/components/map/groups/TileGroup.js2
-rw-r--r--src/components/sidebars/simulation/LoadMetricComponent.js2
-rw-r--r--src/pages/Home.js2
-rw-r--r--src/util/colors.js (renamed from src/colors/index.js)0
-rw-r--r--src/util/simulation-load.js2
18 files changed, 108 insertions, 19 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..8d7ac584
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,28 @@
+# Dependencies
+/node_modules
+
+# Testing
+/coverage
+
+# Production
+/build
+
+# Misc.
+.DS_Store
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# IntelliJ IDEA
+/.idea
+
+# Yarn
+yarn.lock
+
+# Sass output
+*.css
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 00000000..6fa9989a
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 tudelft-atlarge
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..36ba218f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,26 @@
+# OpenDC Frontend
+
+[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
+
+The user-facing component of the OpenDC stack, allowing users to build and interact with their own (virtual) datacenters. Built in *React.js* and *Redux*, with the help of `create-react-app`.
+
+
+## Architecture
+
+The codebase follows a standard React.js structure, with static assets being contained in the `public` folder, while dynamic components and their styles are contained in `src`.
+
+### Pages
+
+//
+
+### Components & Containers
+
+//
+
+### State Management
+
+//
+
+### API Interaction
+
+//
diff --git a/package.json b/package.json
index 7844f1de..089b7e9b 100644
--- a/package.json
+++ b/package.json
@@ -1,17 +1,29 @@
{
- "name": "opendc-frontend-experimental",
+ "name": "opendc-frontend",
"version": "0.1.0",
+ "description": "The user-facing component of the OpenDC stack, allowing users to build and interact with their own (virtual) datacenters.",
+ "keywords": [
+ "opendc",
+ "simulation",
+ "datacenter",
+ "frontend"
+ ],
+ "homepage": "http://opendc.org",
+ "bugs": {
+ "url": "https://github.com/atlarge-research/opendc-frontend/issues",
+ "email": "opendc@atlarge-research.com"
+ },
+ "author": "Georgios Andreadis <g.andreadis@atlarge-research.com> (http://gandreadis.com/)",
+ "license": "MIT",
"private": true,
"proxy": "http://localhost:8081",
"dependencies": {
"approximate-number": "^2.0.0",
- "bootstrap": "4.0.0-alpha.6",
"classnames": "^2.2.5",
- "history": "^4.6.3",
"isomorphic-fetch": "^2.2.1",
- "konva": "^1.6.7",
+ "konva": "^1.6.8",
"node-sass-chokidar": "^0.0.3",
- "npm-run-all": "^4.0.2",
+ "npm-run-all": "^4.1.1",
"prop-types": "^15.5.10",
"react": "^15.6.1",
"react-document-title": "^2.0.3",
@@ -21,8 +33,8 @@
"react-konva": "^1.1.4",
"react-mailto": "^0.4.0",
"react-redux": "^5.0.5",
- "react-router-dom": "^4.1.1",
- "react-scripts": "^1.0.11",
+ "react-router-dom": "^4.2.2",
+ "react-scripts": "^1.0.13",
"react-shortcuts": "^1.6.1",
"redux": "^3.7.2",
"redux-localstorage": "^0.4.1",
diff --git a/src/components/map/elements/Backdrop.js b/src/components/map/elements/Backdrop.js
index 32e95989..5022f747 100644
--- a/src/components/map/elements/Backdrop.js
+++ b/src/components/map/elements/Backdrop.js
@@ -1,6 +1,6 @@
import React from "react";
import {Rect} from "react-konva";
-import {BACKDROP_COLOR} from "../../../colors/index";
+import {BACKDROP_COLOR} from "../../../util/colors";
import {MAP_SIZE_IN_PIXELS} from "../MapConstants";
const Backdrop = () => (
diff --git a/src/components/map/elements/GrayLayer.js b/src/components/map/elements/GrayLayer.js
index dfcbe71a..0cd91df8 100644
--- a/src/components/map/elements/GrayLayer.js
+++ b/src/components/map/elements/GrayLayer.js
@@ -1,6 +1,6 @@
import React from "react";
import {Rect} from "react-konva";
-import {GRAYED_OUT_AREA_COLOR} from "../../../colors/index";
+import {GRAYED_OUT_AREA_COLOR} from "../../../util/colors";
import {MAP_SIZE_IN_PIXELS} from "../MapConstants";
const GrayLayer = ({onClick}) => (
diff --git a/src/components/map/elements/HoverTile.js b/src/components/map/elements/HoverTile.js
index 02d31714..b967f2f9 100644
--- a/src/components/map/elements/HoverTile.js
+++ b/src/components/map/elements/HoverTile.js
@@ -1,7 +1,7 @@
import PropTypes from "prop-types";
import React from "react";
import {Rect} from "react-konva";
-import {ROOM_HOVER_INVALID_COLOR, ROOM_HOVER_VALID_COLOR} from "../../../colors/index";
+import {ROOM_HOVER_INVALID_COLOR, ROOM_HOVER_VALID_COLOR} from "../../../util/colors";
import {TILE_SIZE_IN_PIXELS} from "../MapConstants";
const HoverTile = ({pixelX, pixelY, isValid, scale, onClick}) => (
diff --git a/src/components/map/elements/RackFillBar.js b/src/components/map/elements/RackFillBar.js
index 7b1351a5..5b36d442 100644
--- a/src/components/map/elements/RackFillBar.js
+++ b/src/components/map/elements/RackFillBar.js
@@ -6,7 +6,7 @@ import {
RACK_ENERGY_BAR_FILL_COLOR,
RACK_SPACE_BAR_BACKGROUND_COLOR,
RACK_SPACE_BAR_FILL_COLOR
-} from "../../../colors/index";
+} from "../../../util/colors";
import {
OBJECT_BORDER_WIDTH_IN_PIXELS,
OBJECT_MARGIN_IN_PIXELS,
diff --git a/src/components/map/elements/TileObject.js b/src/components/map/elements/TileObject.js
index b1d3315e..252fcfc2 100644
--- a/src/components/map/elements/TileObject.js
+++ b/src/components/map/elements/TileObject.js
@@ -1,7 +1,7 @@
import PropTypes from "prop-types";
import React from "react";
import {Rect} from "react-konva";
-import {OBJECT_BORDER_COLOR} from "../../../colors/index";
+import {OBJECT_BORDER_COLOR} from "../../../util/colors";
import {OBJECT_BORDER_WIDTH_IN_PIXELS, OBJECT_MARGIN_IN_PIXELS, TILE_SIZE_IN_PIXELS} from "../MapConstants";
const TileObject = ({positionX, positionY, color}) => (
diff --git a/src/components/map/elements/TilePlusIcon.js b/src/components/map/elements/TilePlusIcon.js
index ed5ef5b5..3283c3cd 100644
--- a/src/components/map/elements/TilePlusIcon.js
+++ b/src/components/map/elements/TilePlusIcon.js
@@ -1,7 +1,7 @@
import PropTypes from "prop-types";
import React from "react";
import {Group, Line} from "react-konva";
-import {TILE_PLUS_COLOR} from "../../../colors/index";
+import {TILE_PLUS_COLOR} from "../../../util/colors";
import {TILE_PLUS_MARGIN_IN_PIXELS, TILE_PLUS_WIDTH_IN_PIXELS, TILE_SIZE_IN_PIXELS} from "../MapConstants";
const TilePlusIcon = ({pixelX, pixelY, mapScale}) => {
diff --git a/src/components/map/elements/WallSegment.js b/src/components/map/elements/WallSegment.js
index ed3627bb..b029579b 100644
--- a/src/components/map/elements/WallSegment.js
+++ b/src/components/map/elements/WallSegment.js
@@ -1,7 +1,7 @@
import React from "react";
import {Line} from "react-konva";
-import {WALL_COLOR} from "../../../colors/index";
import Shapes from "../../../shapes/index";
+import {WALL_COLOR} from "../../../util/colors";
import {TILE_SIZE_IN_PIXELS, WALL_WIDTH_IN_PIXELS} from "../MapConstants";
const WallSegment = ({wallSegment}) => {
diff --git a/src/components/map/groups/GridGroup.js b/src/components/map/groups/GridGroup.js
index 1af29f6e..bd2a78c3 100644
--- a/src/components/map/groups/GridGroup.js
+++ b/src/components/map/groups/GridGroup.js
@@ -1,6 +1,6 @@
import React from "react";
import {Group, Line} from "react-konva";
-import {GRID_COLOR} from "../../../colors/index";
+import {GRID_COLOR} from "../../../util/colors";
import {GRID_LINE_WIDTH_IN_PIXELS, MAP_SIZE, MAP_SIZE_IN_PIXELS, TILE_SIZE_IN_PIXELS} from "../MapConstants";
const MAP_COORDINATE_ENTRIES = Array.from(new Array(MAP_SIZE), (x, i) => i);
diff --git a/src/components/map/groups/RackGroup.js b/src/components/map/groups/RackGroup.js
index a34a5543..7bf8855e 100644
--- a/src/components/map/groups/RackGroup.js
+++ b/src/components/map/groups/RackGroup.js
@@ -1,9 +1,9 @@
import React from "react";
import {Group} from "react-konva";
-import {RACK_BACKGROUND_COLOR} from "../../../colors/index";
import RackEnergyFillContainer from "../../../containers/map/RackEnergyFillContainer";
import RackSpaceFillContainer from "../../../containers/map/RackSpaceFillContainer";
import Shapes from "../../../shapes/index";
+import {RACK_BACKGROUND_COLOR} from "../../../util/colors";
import {convertLoadToSimulationColor} from "../../../util/simulation-load";
import TileObject from "../elements/TileObject";
diff --git a/src/components/map/groups/TileGroup.js b/src/components/map/groups/TileGroup.js
index c7991507..b88867b3 100644
--- a/src/components/map/groups/TileGroup.js
+++ b/src/components/map/groups/TileGroup.js
@@ -1,9 +1,9 @@
import PropTypes from "prop-types";
import React from "react";
import {Group} from "react-konva";
-import {ROOM_DEFAULT_COLOR, ROOM_IN_CONSTRUCTION_COLOR} from "../../../colors/index";
import RackContainer from "../../../containers/map/RackContainer";
import Shapes from "../../../shapes/index";
+import {ROOM_DEFAULT_COLOR, ROOM_IN_CONSTRUCTION_COLOR} from "../../../util/colors";
import {convertLoadToSimulationColor} from "../../../util/simulation-load";
import RoomTile from "../elements/RoomTile";
diff --git a/src/components/sidebars/simulation/LoadMetricComponent.js b/src/components/sidebars/simulation/LoadMetricComponent.js
index 19b9927b..d9a1ed71 100644
--- a/src/components/sidebars/simulation/LoadMetricComponent.js
+++ b/src/components/sidebars/simulation/LoadMetricComponent.js
@@ -1,5 +1,5 @@
import React from "react";
-import {SIM_HIGH_COLOR, SIM_LOW_COLOR, SIM_MID_HIGH_COLOR, SIM_MID_LOW_COLOR} from "../../../colors/index";
+import {SIM_HIGH_COLOR, SIM_LOW_COLOR, SIM_MID_HIGH_COLOR, SIM_MID_LOW_COLOR} from "../../../util/colors";
import {LOAD_NAME_MAP} from "../../../util/simulation-load";
const LoadMetricComponent = ({loadMetric}) => (
diff --git a/src/pages/Home.js b/src/pages/Home.js
index 1486f422..03df4dc5 100644
--- a/src/pages/Home.js
+++ b/src/pages/Home.js
@@ -1,4 +1,5 @@
import React from 'react';
+import DocumentTitle from "react-document-title";
import ContactSection from "../components/home/ContactSection";
import IntroSection from "../components/home/IntroSection";
import JumbotronHeader from "../components/home/JumbotronHeader";
@@ -49,6 +50,7 @@ class Home extends React.Component {
<TechnologiesSection/>
<TeamSection/>
<ContactSection/>
+ <DocumentTitle title="OpenDC"/>
</div>
</div>
);
diff --git a/src/colors/index.js b/src/util/colors.js
index 1e84e162..1e84e162 100644
--- a/src/colors/index.js
+++ b/src/util/colors.js
diff --git a/src/util/simulation-load.js b/src/util/simulation-load.js
index 55c37929..c81bb406 100644
--- a/src/util/simulation-load.js
+++ b/src/util/simulation-load.js
@@ -1,4 +1,4 @@
-import {SIM_HIGH_COLOR, SIM_LOW_COLOR, SIM_MID_HIGH_COLOR, SIM_MID_LOW_COLOR} from "../colors/index";
+import {SIM_HIGH_COLOR, SIM_LOW_COLOR, SIM_MID_HIGH_COLOR, SIM_MID_LOW_COLOR} from "./colors";
export const LOAD_NAME_MAP = {
LOAD: "computational load",