Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grouping style elements in 1 place #216

Merged
merged 1 commit into from
Jul 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 46 additions & 46 deletions dashboard/assets.go

Large diffs are not rendered by default.

12 changes: 1 addition & 11 deletions dashboard/src/deployment/DeploymentDetails.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
import { Loader } from 'semantic-ui-react';
import React, { Component } from 'react';
import ReactTimeout from 'react-timeout';
import styled from 'react-emotion';

import { LoaderBox } from '../style/style';
import { withAuth } from '../auth/Auth.js';
import api, { isUnauthorized } from '../api/api';
import Loading from '../util/Loading';
import MemberList from './MemberList';

const LoaderBox = styled('span')`
float: right;
width: 0;
padding-right: 1em;
margin-right: 1em;
margin-top: 1em;
max-width: 0;
display: inline-block;
`;

const MemberGroupsView = ({memberGroups, namespace}) => (
<div>
{memberGroups.map((item) => <MemberList
Expand Down
10 changes: 1 addition & 9 deletions dashboard/src/deployment/DeploymentList.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,13 @@ import { Icon, Loader, Popup, Table } from 'semantic-ui-react';
import { Link } from "react-router-dom";
import React, { Component } from 'react';
import ReactTimeout from 'react-timeout';
import styled from 'react-emotion';

import { LoaderBoxForTable as LoaderBox } from '../style/style';
import { withAuth } from '../auth/Auth';
import api, { isUnauthorized } from '../api/api';
import CommandInstruction from '../util/CommandInstruction';
import Loading from '../util/Loading';

const LoaderBox = styled('span')`
float: right;
width: 0;
padding-right: 1em;
max-width: 0;
display: inline-block;
`;

const HeaderView = ({loading}) => (
<Table.Header>
<Table.Row>
Expand Down
16 changes: 1 addition & 15 deletions dashboard/src/deployment/DeploymentOperator.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import { Header, Menu, Message, Segment } from 'semantic-ui-react';
import React, { Component } from 'react';
import styled from 'react-emotion';

import { StyledMenu, StyledContentBox } from '../style/style';
import DeploymentDetails from './DeploymentDetails';
import DeploymentList from './DeploymentList';
import LogoutContext from '../auth/LogoutContext';

const StyledMenu = styled(Menu)`
width: 15rem !important;
@media (max-width: 768px) {
width: 10rem !important;
}
`;

const StyledContentBox = styled('div')`
margin-left: 15rem;
@media (max-width: 768px) {
margin-left: 10rem;
}
`;

const ListView = () => (
<div>
<Header dividing>
Expand Down
7 changes: 0 additions & 7 deletions dashboard/src/logo.svg

This file was deleted.

12 changes: 1 addition & 11 deletions dashboard/src/replication/DeploymentReplicationDetails.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
import { Header, Loader, Segment } from 'semantic-ui-react';
import React, { Component } from 'react';
import ReactTimeout from 'react-timeout';
import styled from 'react-emotion';

import { Field, FieldContent as FC, FieldLabel as FL } from '../style/style';
import { LoaderBox } from '../style/style';
import { withAuth } from '../auth/Auth';
import api, { isUnauthorized } from '../api/api';
import Loading from '../util/Loading';

const LoaderBox = styled('span')`
float: right;
width: 0;
padding-right: 1em;
margin-right: 1em;
margin-top: 1em;
max-width: 0;
display: inline-block;
`;

const EndpointView = ({title, deploymentName, masterEndpoint, authKeyfileSecretName, authUserSecretName, tlsCACert, tlsCACertSecretName}) => (
<Segment>
<Header>{title}</Header>
Expand Down
10 changes: 1 addition & 9 deletions dashboard/src/replication/DeploymentReplicationList.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,13 @@ import { Icon, Loader, Popup, Table } from 'semantic-ui-react';
import { Link } from "react-router-dom";
import React, { Component } from 'react';
import ReactTimeout from 'react-timeout';
import styled from 'react-emotion';

import { LoaderBoxForTable as LoaderBox } from '../style/style';
import { withAuth } from '../auth/Auth';
import api, { isUnauthorized } from '../api/api';
import CommandInstruction from '../util/CommandInstruction';
import Loading from '../util/Loading';

const LoaderBox = styled('span')`
float: right;
width: 0;
padding-right: 1em;
max-width: 0;
display: inline-block;
`;

const HeaderView = ({loading}) => (
<Table.Header>
<Table.Row>
Expand Down
16 changes: 1 addition & 15 deletions dashboard/src/replication/DeploymentReplicationOperator.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import { Header, Menu, Message, Segment } from 'semantic-ui-react';
import React, { Component } from 'react';
import styled from 'react-emotion';

import { StyledMenu, StyledContentBox } from '../style/style';
import DeploymentReplicationDetails from './DeploymentReplicationDetails';
import DeploymentReplicationList from './DeploymentReplicationList';
import LogoutContext from '../auth/LogoutContext';

const StyledMenu = styled(Menu)`
width: 15rem !important;
@media (max-width: 768px) {
width: 10rem !important;
}
`;

const StyledContentBox = styled('div')`
margin-left: 15rem;
@media (max-width: 768px) {
margin-left: 10rem;
}
`;

const ListView = () => (
<div>
<Header dividing>
Expand Down
10 changes: 1 addition & 9 deletions dashboard/src/storage/StorageList.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
import { Loader, Table } from 'semantic-ui-react';
import React, { Component } from 'react';
import ReactTimeout from 'react-timeout';
import styled from 'react-emotion';

import { LoaderBoxForTable as LoaderBox } from '../style/style';
import { withAuth } from '../auth/Auth';
import api, { isUnauthorized } from '../api/api';
import Loading from '../util/Loading';
import StorageRow from './StorageRow';

const LoaderBox = styled('span')`
float: right;
width: 0;
padding-right: 1em;
max-width: 0;
display: inline-block;
`;

const HeaderView = ({loading}) => (
<Table.Header>
<Table.Row>
Expand Down
16 changes: 1 addition & 15 deletions dashboard/src/storage/StorageOperator.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
import { Header, Menu, Message, Segment } from 'semantic-ui-react';
import React, { Component } from 'react';
import styled from 'react-emotion';

import { StyledMenu, StyledContentBox } from '../style/style';
import LogoutContext from '../auth/LogoutContext';
import StorageList from './StorageList';

const StyledMenu = styled(Menu)`
width: 15rem !important;
@media (max-width: 768px) {
width: 10rem !important;
}
`;

const StyledContentBox = styled('div')`
margin-left: 15rem;
@media (max-width: 768px) {
margin-left: 10rem;
}
`;

const ListView = () => (
<div>
<Header dividing>
Expand Down
10 changes: 1 addition & 9 deletions dashboard/src/storage/VolumeList.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
import { Icon, Loader, Popup, Table } from 'semantic-ui-react';
import React, { Component } from 'react';
import ReactTimeout from 'react-timeout';
import styled from 'react-emotion';

import { LoaderBoxForTable as LoaderBox } from '../style/style';
import { withAuth } from '../auth/Auth';
import api, { isUnauthorized } from '../api/api';
import CommandInstruction from '../util/CommandInstruction';
import Loading from '../util/Loading';

const LoaderBox = styled('span')`
float: right;
width: 0;
padding-right: 1em;
max-width: 0;
display: inline-block;
`;

const HeaderView = ({loading}) => (
<Table.Header>
<Table.Row>
Expand Down
33 changes: 33 additions & 0 deletions dashboard/src/style/style.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import styled from 'react-emotion';
import { Menu } from 'semantic-ui-react';

export const Field = styled('div')`
padding-top: 0.3em;
Expand All @@ -19,3 +20,35 @@ export const FieldContent = styled('div')`
export const FieldIcons = styled('div')`
float: right;
`;

export const LoaderBox = styled('span')`
float: right;
width: 0;
padding-right: 1em;
margin-right: 1em;
margin-top: 1em;
max-width: 0;
display: inline-block;
`;

export const LoaderBoxForTable = styled('span')`
float: right;
width: 0;
padding-right: 1em;
max-width: 0;
display: inline-block;
`;

export const StyledMenu = styled(Menu)`
width: 15rem !important;
@media (max-width: 768px) {
width: 10rem !important;
}
`;

export const StyledContentBox = styled('div')`
margin-left: 15rem;
@media (max-width: 768px) {
margin-left: 10rem;
}
`;