From e0c5d678601a56ed9b22d9adbe59de61920510e8 Mon Sep 17 00:00:00 2001 From: pearchery Date: Sat, 23 Jun 2018 13:56:59 -0700 Subject: [PATCH 1/8] Icon header for container page - Icon header for container page - Icons from fontawesome.com --- daemon/web/index.html | 2 ++ daemon/web/pages/containers/Containers.js | 3 ++- daemon/web/styles/typography.sass | 2 +- daemon/web/webpack.config.js | 6 +++--- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/daemon/web/index.html b/daemon/web/index.html index 5e88917e..514bd6b7 100644 --- a/daemon/web/index.html +++ b/daemon/web/index.html @@ -4,6 +4,8 @@ + + Inertia Web diff --git a/daemon/web/pages/containers/Containers.js b/daemon/web/pages/containers/Containers.js index 235b6cd0..c686121a 100644 --- a/daemon/web/pages/containers/Containers.js +++ b/daemon/web/pages/containers/Containers.js @@ -1,6 +1,7 @@ import React from 'react'; import { connect } from 'react-redux'; import TerminalView from '../../components/TerminalView/TerminalView'; +import IconHeader from '../../components/IconHeader/IconHeader'; const mocklogs = [ 'log1asdasdasdasdasdasdasdssdasdasdssdasdasdssdasdasdssdasdasdsa', @@ -21,7 +22,7 @@ class ContainersWrapper extends React.Component { render() { return (
-

Hello!

+
); diff --git a/daemon/web/styles/typography.sass b/daemon/web/styles/typography.sass index af54d586..bfa70794 100644 --- a/daemon/web/styles/typography.sass +++ b/daemon/web/styles/typography.sass @@ -2,7 +2,7 @@ h1 font-family: Rubik - font-size: 16px + font-size: 24px font-weight: 500 letter-spacing: 1px color: $grey diff --git a/daemon/web/webpack.config.js b/daemon/web/webpack.config.js index 97588e29..ad0d618c 100644 --- a/daemon/web/webpack.config.js +++ b/daemon/web/webpack.config.js @@ -13,9 +13,9 @@ const config = { inline: true, contentBase: './public', publicPath: '/web/', - proxy: { - '/': { target: 'https://127.0.0.1:4303', secure: false }, - }, + // proxy: { + // '/': { target: 'https://127.0.0.1:4303', secure: false }, + // }, }, devtool: 'inline-source-map', module: { From fd1ead909fae570311abf9bc5db81d64b2112294 Mon Sep 17 00:00:00 2001 From: pearchery Date: Sat, 23 Jun 2018 15:14:52 -0700 Subject: [PATCH 2/8] Implemented icon header --- .../web/components/IconHeader/IconHeader.js | 23 +++++++++++++++++++ daemon/web/components/IconHeader/index.sass | 14 +++++++++++ 2 files changed, 37 insertions(+) create mode 100644 daemon/web/components/IconHeader/IconHeader.js create mode 100644 daemon/web/components/IconHeader/index.sass diff --git a/daemon/web/components/IconHeader/IconHeader.js b/daemon/web/components/IconHeader/IconHeader.js new file mode 100644 index 00000000..674f0682 --- /dev/null +++ b/daemon/web/components/IconHeader/IconHeader.js @@ -0,0 +1,23 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import './index.sass'; + +const icons = { + dashboard: , + containers: , + team: , + settings: +}; + +const IconHeader = ({ title, type }) => ( +
+ {icons[type]} +

{title}

+
+); + +IconHeader.propTypes = { + title: PropTypes.string, +}; + +export default IconHeader; \ No newline at end of file diff --git a/daemon/web/components/IconHeader/index.sass b/daemon/web/components/IconHeader/index.sass new file mode 100644 index 00000000..63126c97 --- /dev/null +++ b/daemon/web/components/IconHeader/index.sass @@ -0,0 +1,14 @@ +@import '../../styles/index' +@import '../../styles/typography' + +.header + color: $grey + display: inline + margin-left: 10px; + font-weight: bold; + +i + color: $grey + +.iconheader + margin: 30px 0 30px 40px \ No newline at end of file From 0079e22481771d9f84fc298762d1134e6a12dd4d Mon Sep 17 00:00:00 2001 From: pearchery Date: Sat, 23 Jun 2018 15:16:19 -0700 Subject: [PATCH 3/8] Small fixes --- daemon/web/components/IconHeader/index.sass | 1 - 1 file changed, 1 deletion(-) diff --git a/daemon/web/components/IconHeader/index.sass b/daemon/web/components/IconHeader/index.sass index 63126c97..6e223cc5 100644 --- a/daemon/web/components/IconHeader/index.sass +++ b/daemon/web/components/IconHeader/index.sass @@ -1,5 +1,4 @@ @import '../../styles/index' -@import '../../styles/typography' .header color: $grey From 2af1f0feda6996ec603e40849349ebad575e3d71 Mon Sep 17 00:00:00 2001 From: asitu Date: Thu, 28 Jun 2018 20:14:51 -0700 Subject: [PATCH 4/8] Fixed lint issues --- daemon/web/actions/dashboard.js | 1 - daemon/web/actions/login.js | 2 +- .../web/components/IconHeader/IconHeader.js | 19 ++++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/daemon/web/actions/dashboard.js b/daemon/web/actions/dashboard.js index bc92a53d..f645e9bb 100644 --- a/daemon/web/actions/dashboard.js +++ b/daemon/web/actions/dashboard.js @@ -5,7 +5,6 @@ import { export const testAction = payload => (dispatch) => { // remove later - console.log('dashboard action fired!'); dispatch({ type: TEST_DASHBOARD_ACTION, payload, diff --git a/daemon/web/actions/login.js b/daemon/web/actions/login.js index c6fd21f3..d80bc6aa 100644 --- a/daemon/web/actions/login.js +++ b/daemon/web/actions/login.js @@ -10,4 +10,4 @@ export const testAction = payload => (dispatch) => { type: TEST_LOGIN_ACTION, payload, }); -}; +}; \ No newline at end of file diff --git a/daemon/web/components/IconHeader/IconHeader.js b/daemon/web/components/IconHeader/IconHeader.js index 674f0682..41e67111 100644 --- a/daemon/web/components/IconHeader/IconHeader.js +++ b/daemon/web/components/IconHeader/IconHeader.js @@ -3,21 +3,22 @@ import PropTypes from 'prop-types'; import './index.sass'; const icons = { - dashboard: , - containers: , - team: , - settings: + dashboard: , + containers: , + team: , + settings: , }; const IconHeader = ({ title, type }) => ( -
- {icons[type]} -

{title}

-
+
+ {icons[type]} +

{title}

+
); IconHeader.propTypes = { - title: PropTypes.string, + title: PropTypes.string.isRequired, + type: PropTypes.string.isRequired, }; export default IconHeader; \ No newline at end of file From 0ce1433ff99124bfe6e4fca77995ce843e7662d5 Mon Sep 17 00:00:00 2001 From: asitu Date: Thu, 28 Jun 2018 20:19:23 -0700 Subject: [PATCH 5/8] Added iconheader to containers page --- daemon/web/pages/containers/Containers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/web/pages/containers/Containers.js b/daemon/web/pages/containers/Containers.js index c686121a..e0f0cd5c 100644 --- a/daemon/web/pages/containers/Containers.js +++ b/daemon/web/pages/containers/Containers.js @@ -22,7 +22,8 @@ class ContainersWrapper extends React.Component { render() { return (
- + +
); From e80fa0540d1bdbbdea5deb7a46f20406ddfb4248 Mon Sep 17 00:00:00 2001 From: asitu Date: Thu, 28 Jun 2018 20:42:08 -0700 Subject: [PATCH 6/8] removed proxy --- daemon/web/webpack.config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/web/webpack.config.js b/daemon/web/webpack.config.js index ad0d618c..97588e29 100644 --- a/daemon/web/webpack.config.js +++ b/daemon/web/webpack.config.js @@ -13,9 +13,9 @@ const config = { inline: true, contentBase: './public', publicPath: '/web/', - // proxy: { - // '/': { target: 'https://127.0.0.1:4303', secure: false }, - // }, + proxy: { + '/': { target: 'https://127.0.0.1:4303', secure: false }, + }, }, devtool: 'inline-source-map', module: { From 6c077ba5601d8ce76661754c0f006fe9f922c51d Mon Sep 17 00:00:00 2001 From: asitu Date: Thu, 28 Jun 2018 21:14:02 -0700 Subject: [PATCH 7/8] Fixed more lint errors --- daemon/web/actions/login.js | 3 +-- daemon/web/actions/main.js | 1 - daemon/web/components/IconHeader/IconHeader.js | 2 +- daemon/web/pages/containers/Containers.js | 1 + 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/daemon/web/actions/login.js b/daemon/web/actions/login.js index d80bc6aa..478bed39 100644 --- a/daemon/web/actions/login.js +++ b/daemon/web/actions/login.js @@ -5,9 +5,8 @@ import { export const testAction = payload => (dispatch) => { // remove later - console.log('login action fired!'); dispatch({ type: TEST_LOGIN_ACTION, payload, }); -}; \ No newline at end of file +}; diff --git a/daemon/web/actions/main.js b/daemon/web/actions/main.js index 370c8f6e..aef78297 100644 --- a/daemon/web/actions/main.js +++ b/daemon/web/actions/main.js @@ -5,7 +5,6 @@ import { export const testAction = payload => (dispatch) => { // remove later - console.log('main action fired!'); dispatch({ type: TEST_MAIN_ACTION, payload, diff --git a/daemon/web/components/IconHeader/IconHeader.js b/daemon/web/components/IconHeader/IconHeader.js index 41e67111..fe9c2cca 100644 --- a/daemon/web/components/IconHeader/IconHeader.js +++ b/daemon/web/components/IconHeader/IconHeader.js @@ -21,4 +21,4 @@ IconHeader.propTypes = { type: PropTypes.string.isRequired, }; -export default IconHeader; \ No newline at end of file +export default IconHeader; diff --git a/daemon/web/pages/containers/Containers.js b/daemon/web/pages/containers/Containers.js index e0f0cd5c..803165bb 100644 --- a/daemon/web/pages/containers/Containers.js +++ b/daemon/web/pages/containers/Containers.js @@ -3,6 +3,7 @@ import { connect } from 'react-redux'; import TerminalView from '../../components/TerminalView/TerminalView'; import IconHeader from '../../components/IconHeader/IconHeader'; + const mocklogs = [ 'log1asdasdasdasdasdasdasdssdasdasdssdasdasdssdasdasdssdasdasdsa', 'log2asdasdasdasdsdassdasdasdssdasdasdssdasdasdssdasdasdsdsdasds', From 360208b00dc54808e654c718df82bbc4c11db529 Mon Sep 17 00:00:00 2001 From: asitu Date: Thu, 28 Jun 2018 21:33:10 -0700 Subject: [PATCH 8/8] Fixed more lint issues --- daemon/web/pages/login/Login.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/web/pages/login/Login.js b/daemon/web/pages/login/Login.js index 81528879..3c7dadbb 100644 --- a/daemon/web/pages/login/Login.js +++ b/daemon/web/pages/login/Login.js @@ -45,7 +45,9 @@ class LoginWrapper extends React.Component { async handleLoginSubmit() { // TODO: disable authentication until we get it working + /* eslint-disable no-console */ console.log(this.state.username, this.state.password); + /* eslint-enable no-console */ this.props.testAction(); // const response = await InertiaAPI.login( // this.state.username,