fix(my-joy-beta): fix regressions introduced by removing Title

This commit is contained in:
Sérgio Ramos 2017-12-22 02:11:50 +00:00
parent 0a409f0924
commit 4b84756e47
18 changed files with 35 additions and 64 deletions

View File

@ -14,7 +14,8 @@
"compile:es": "babel src --out-dir dist/es",
"compile:umd": "UMD=1 babel src --out-dir dist/umd",
"compile": "redrun -p compile:*",
"dev": "NODE_ENV=development npm run compile -- -- --watch --source-maps inline",
"dev":
"NODE_ENV=development npm run compile -- -- --watch --source-maps inline",
"prepublish": "NODE_ENV=production npm run compile"
},
"dependencies": {
@ -26,7 +27,7 @@
"babel-preset-joyent-portal": "^6.0.1",
"eslint": "^4.13.1",
"eslint-config-joyent-portal": "^3.2.0",
"joyent-react-scripts": "^6.5.0",
"joyent-react-scripts": "^6.5.1",
"react": "^16.2.0",
"redrun": "^5.10.0"
},

View File

@ -1,9 +1,6 @@
{
"presets": "joyent-portal",
"plugins": [
"styled-components",
["inline-react-svg", {
"ignorePattern": "libre-franklin"
}]
"styled-components"
]
}

View File

@ -63,7 +63,7 @@
"jest-snapshot": "^21.2.1",
"jest-styled-components": "^4.9.0",
"jest-transform-graphql": "^2.1.0",
"joyent-react-scripts": "^6.5.0",
"joyent-react-scripts": "^6.5.1",
"react-test-renderer": "^16.2.0",
"redrun": "^5.10.0",
"serve": "^6.4.1",

View File

@ -6,7 +6,6 @@ import find from 'lodash.find';
import get from 'lodash.get';
import {
Title,
ViewContainer,
StatusLoader,
Message,
@ -26,7 +25,6 @@ const CreateSnapshot = ({
handleSubmit,
handleCancel
}) => {
const _title = <Title>Create Snapshot</Title>;
const _loading = !(loading && !instance) ? null : <StatusLoader />;
const CreateSnapshotForm = reduxForm({
@ -51,7 +49,6 @@ const CreateSnapshot = ({
return (
<ViewContainer center={Boolean(_loading)} main>
{_title}
{_loading}
{_error}
{_form}

View File

@ -6,7 +6,6 @@ import get from 'lodash.get';
import {
ViewContainer,
Title,
StatusLoader,
Message,
MessageDescription,
@ -17,7 +16,6 @@ import ListDNS from '@graphql/list-dns.gql';
const DNS = ({ instance, loading, error }) => {
const { name, dns_names } = instance || {};
const _title = <Title>DNS</Title>;
const _loading = loading && !name && !dns_names && <StatusLoader />;
const _summary = !_loading &&
instance && <pre>{JSON.stringify(dns_names, null, 2)}</pre>;
@ -35,7 +33,6 @@ const DNS = ({ instance, loading, error }) => {
return (
<ViewContainer center={Boolean(_loading)} main>
{_title}
{_loading}
{_error}
{_summary}

View File

@ -7,7 +7,6 @@ import get from 'lodash.get';
import {
ViewContainer,
Title,
StatusLoader,
Message,
MessageDescription,
@ -31,7 +30,6 @@ const Firewall = ({
error
}) => {
const values = forceArray(firewallRules);
const _title = <Title>Firewall</Title>;
const _loading = !(loading && !values.length) ? null : <StatusLoader />;
const _firewall =
@ -70,7 +68,6 @@ const Firewall = ({
return (
<ViewContainer center={Boolean(_loading)} main>
{_title}
{_loading}
{_error}
{_firewall}

View File

@ -11,7 +11,6 @@ import get from 'lodash.get';
import {
ViewContainer,
Title,
StatusLoader,
Message,
MessageDescription,
@ -37,7 +36,6 @@ const Metadata = ({
handleUpdate,
handleCreate
}) => {
const _title = <Title>Metadata</Title>;
const _loading = !(loading && !values.length) ? null : <StatusLoader />;
// metadata items forms
@ -96,8 +94,7 @@ const Metadata = ({
>
{KeyValue}
</ReduxForm>
)
}
)}
</Value>
);
@ -114,7 +111,6 @@ const Metadata = ({
return (
<ViewContainer center={Boolean(_loading)} main>
{_title}
{_loading}
{_error}
{_metadata}

View File

@ -7,7 +7,6 @@ import get from 'lodash.get';
import {
ViewContainer,
Title,
StatusLoader,
Message,
MessageDescription,
@ -25,7 +24,6 @@ import { Network as InstanceNetwork } from '@components/instances';
const Networks = ({ networks = [], loading, error }) => {
const values = forceArray(networks);
const _title = <Title>Networks</Title>;
const _loading = !(loading && !values.length) ? null : <StatusLoader />;
const _networks =
@ -67,7 +65,6 @@ const Networks = ({ networks = [], loading, error }) => {
return (
<ViewContainer center={Boolean(_loading)} main>
{_title}
{_loading}
{_error}
{_networks}

View File

@ -7,7 +7,6 @@ import get from 'lodash.get';
import {
StatusLoader,
Title,
ViewContainer,
Message,
MessageTitle,
@ -26,7 +25,6 @@ const Resize = ({ match, loading, error, instance, packages }) => {
const _packages = forceArray(packages);
const _title = <Title>Resize</Title>;
const _loading = !(loading && (!_packages.length || !instance)) ? null : (
<StatusLoader />
);
@ -45,7 +43,6 @@ const Resize = ({ match, loading, error, instance, packages }) => {
return (
<ViewContainer center={Boolean(_loading)} main>
{_title}
{_loading}
{_error}
{_resize}

View File

@ -11,7 +11,6 @@ import { reduxForm, stopSubmit, startSubmit, change } from 'redux-form';
import {
ViewContainer,
Title,
Message,
MessageTitle,
MessageDescription
@ -37,8 +36,6 @@ const Snapshots = ({
error,
handleAction
}) => {
const _title = <Title>Snapshots</Title>;
const _values = forceArray(snapshots);
const _loading = !_values.length && loading;
@ -55,7 +52,6 @@ const Snapshots = ({
return (
<ViewContainer main>
{_title}
{_error}
<SnapshotsListForm
snapshots={_values}
@ -81,13 +77,15 @@ export default compose(
const { name } = variables;
const instance = find(get(rest, 'machines', []), ['name', name]);
const snapshots = get(instance, 'snapshots', []).map(
({ created, updated, ...rest }) => ({
...rest,
created: moment.utc(created).unix(),
updated: moment.utc(updated).unix()
})
);
const snapshots = get(
instance,
'snapshots',
[]
).map(({ created, updated, ...rest }) => ({
...rest,
created: moment.utc(created).unix(),
updated: moment.utc(updated).unix()
}));
const index = GenIndex(
snapshots.map(({ name, ...rest }) => ({ ...rest, id: name }))

View File

@ -15,7 +15,8 @@
"compile:es": "babel src --out-dir dist/es --ignore spec.js",
"compile:umd": "UMD=1 babel src --out-dir dist/umd --ignore spec.js",
"compile": "redrun -p compile:*",
"dev": "NODE_ENV=development npm run compile -- -- --watch --source-maps inline",
"dev":
"NODE_ENV=development npm run compile -- -- --watch --source-maps inline",
"styleguide:build": "NODE_ENV=production styleguidist build",
"styleguide": "NODE_ENV=development styleguidist server",
"prepublish": "NODE_ENV=production npm run compile"
@ -46,7 +47,7 @@
"eslint": "^4.13.1",
"eslint-config-joyent-portal": "^3.2.0",
"jest-styled-components": "^4.9.0",
"joyent-react-scripts": "^6.5.0",
"joyent-react-scripts": "^6.5.1",
"lodash.isboolean": "^3.0.3",
"react": "^16.2.0",
"react-docgen": "^3.0.0-beta8",

View File

@ -9,8 +9,10 @@
"dev": "NODE_ENV=development joyent-react-scripts start",
"build": "NODE_ENV=production joyent-react-scripts build",
"fmt": "prettier --write --single-quote *.js src/*.js src/**/*.js",
"lint-ci": "eslint . --fix --ext .js --ext .md && echo 0 `# stylelint './src/**/*.js'`",
"lint": "eslint . --fix --ext .js --ext .md && echo 0 `# stylelint './src/**/*.js'`",
"lint-ci":
"eslint . --fix --ext .js --ext .md && echo 0 `# stylelint './src/**/*.js'`",
"lint":
"eslint . --fix --ext .js --ext .md && echo 0 `# stylelint './src/**/*.js'`",
"prepublish": "echo 0"
},
"dependencies": {
@ -32,9 +34,9 @@
"babel-preset-joyent-portal": "^6.0.1",
"eslint": "^4.11.0",
"eslint-config-joyent-portal": "^3.2.0",
"joyent-react-scripts": "^6.5.0",
"joyent-react-scripts": "^6.5.1",
"prettier": "^1.8.2",
"stylelint": "^8.4.0",
"stylelint-config-joyent-portal": "^2.0.1"
}
}
}

View File

@ -1,8 +1,3 @@
{
"presets": "joyent-portal",
"plugins": [
["inline-react-svg", {
"ignorePattern": "libre-franklin"
}]
]
"presets": "joyent-portal"
}

View File

@ -6,7 +6,8 @@
"repository": "github:yldio/joyent-portal",
"main": "build/",
"scripts": {
"dev": "REACT_APP_GQL_PORT=4000 PORT=3069 REACT_APP_GQL_PROTOCOL=http joyent-react-scripts start",
"dev":
"REACT_APP_GQL_PORT=4000 PORT=3069 REACT_APP_GQL_PROTOCOL=http joyent-react-scripts start",
"start": "PORT=3069 joyent-react-scripts start",
"build": "NODE_ENV=production joyent-react-scripts build",
"lint:css": "echo 0 `# stylelint './src/**/*.js'`",
@ -62,7 +63,7 @@
"jest-snapshot": "^21.2.1",
"jest-styled-components": "^4.9.0",
"jest-transform-graphql": "^2.1.0",
"joyent-react-scripts": "^6.5.0",
"joyent-react-scripts": "^6.5.1",
"lodash.sortby": "^4.7.0",
"mz": "^2.7.0",
"react-scripts": "^1.0.17",

View File

@ -6,7 +6,7 @@ import remcalc from 'remcalc';
import {
Header,
HeaderBrand,
TritonIcon beta,
TritonIcon,
HeaderNav,
HeaderItem,
DataCenterIcon,
@ -20,7 +20,7 @@ const HeaderBrandStyled = styled(HeaderBrand)`
const NavHeader = () => (
<Header>
<HeaderBrandStyled>
<TritonIcon beta />
<TritonIcon />
</HeaderBrandStyled>
<HeaderNav>
<li>

View File

@ -1,8 +1,3 @@
{
"presets": "joyent-portal",
"plugins": [
["inline-react-svg", {
"ignorePattern": "libre-franklin"
}]
]
"presets": "joyent-portal"
}

View File

@ -56,7 +56,7 @@
"jest-snapshot": "^21.2.1",
"jest-styled-components": "^4.9.0",
"jest-transform-graphql": "^2.1.0",
"joyent-react-scripts": "^6.5.0",
"joyent-react-scripts": "^6.5.1",
"lodash.sortby": "^4.7.0",
"mz": "^2.7.0",
"react-scripts": "^1.0.17",

View File

@ -6132,9 +6132,9 @@ joyent-manifest-editor@^1.4.0:
prop-types "^15.6.0"
react-codemirror "^1.0.0"
joyent-react-scripts@^6.5.0:
version "6.5.0"
resolved "https://registry.yarnpkg.com/joyent-react-scripts/-/joyent-react-scripts-6.5.0.tgz#eec24ccd879c8edcce8ec2d10b5838cb6ddeb42c"
joyent-react-scripts@^6.5.1:
version "6.5.1"
resolved "https://registry.yarnpkg.com/joyent-react-scripts/-/joyent-react-scripts-6.5.1.tgz#8f6fafa7dc6ac7e9bee1ad268cc9da827dbb26c5"
dependencies:
apr-for-each "^1.0.6"
apr-main "^2.0.2"