1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-26 13:48:33 +02:00

Merge branch 'master' into add_sdk_version

This commit is contained in:
Ivar Conradi Østhus 2017-06-29 11:27:54 +02:00 committed by GitHub
commit 73a0ffccee
44 changed files with 1623 additions and 1661 deletions

View File

@ -67,13 +67,13 @@
"babel-preset-stage-0": "^6.5.0",
"babel-preset-stage-2": "^6.13.0",
"css-loader": "^0.25.0",
"eslint": "^3.4.0",
"eslint-config-finn": "1.0.0-alpha.11",
"eslint-config-finn-react": "^1.0.0-alpha.2",
"eslint-plugin-react": "^6.2.0",
"eslint": "^4.1.1",
"eslint-config-finn": "^2.0.0",
"eslint-config-finn-react": "^2.0.0",
"eslint-plugin-react": "^7.1.0",
"extract-text-webpack-plugin": "^1.0.1",
"identity-obj-proxy": "^3.0.0",
"jest": "^19.0.2",
"jest": "^20.0.4",
"node-sass": "~3.12.1",
"postcss-loader": "^0.13.0",
"react-test-renderer": "^15.4.2",

View File

@ -3,7 +3,6 @@ import { ProgressBar, Card } from 'react-mdl';
import { AppsLinkList, styles as commonStyles } from '../common';
class ClientStrategies extends Component {
componentDidMount () {
this.props.fetchAll();
}

View File

@ -13,7 +13,6 @@ const trim = (value) => {
};
class AddFeatureToggleComponent extends Component {
componentWillMount () {
// TODO unwind this stuff
if (this.props.initCallRequired === true) {
@ -92,7 +91,6 @@ class AddFeatureToggleComponent extends Component {
</form>
);
}
};
AddFeatureToggleComponent.propTypes = {

View File

@ -2,7 +2,6 @@ import React, { PropTypes } from 'react';
import { Menu, MenuItem, IconButton } from 'react-mdl';
class AddStrategy extends React.Component {
static propTypes () {
return {
strategies: PropTypes.array.isRequired,

View File

@ -5,7 +5,6 @@ import HTML5Backend from 'react-dnd-html5-backend';
@DragDropContext(HTML5Backend) // eslint-disable-line new-cap
class StrategiesList extends React.Component {
static propTypes () {
return {
strategies: PropTypes.array.isRequired,

View File

@ -5,7 +5,6 @@ import AddStrategy from './strategies-add';
import { HeaderTitle } from '../../common';
class StrategiesSection extends React.Component {
static propTypes () {
return {
strategies: PropTypes.array.isRequired,

View File

@ -45,7 +45,6 @@ const dragTarget = {
isDragging: monitor.isDragging(),
}))
class StrategyConfigure extends React.Component {
static propTypes () {
return {
strategy: PropTypes.object.isRequired,

View File

@ -6,7 +6,6 @@ import {
} from 'react-mdl';
export default class InputList extends Component {
static propTypes = {
name: PropTypes.string.isRequired,
list: PropTypes.array.isRequired,

View File

@ -7,7 +7,6 @@ import { MenuItemWithIcon, DropdownButton, styles as commonStyles } from '../com
import styles from './feature.scss';
export default class FeatureListComponent extends React.PureComponent {
static propTypes () {
return {
toggleFeature: PropTypes.func.isRequired,
@ -89,12 +88,12 @@ export default class FeatureListComponent extends React.PureComponent {
<hr/>
<List>
{features.map((feature, i) =>
<Feature key={i}
(<Feature key={i}
settings={settings}
metricsLastHour={featureMetrics.lastHour[feature.name]}
metricsLastMinute={featureMetrics.lastMinute[feature.name]}
feature={feature}
toggleFeature={toggleFeature}/>
toggleFeature={toggleFeature}/>)
)}
</List>
</Card>

View File

@ -58,7 +58,7 @@ class Progress extends Component {
const current = this.state.percentageText;
targetState.cyclesCounter --;
targetState.cyclesCounter--;
if (targetState.cyclesCounter <= 0) {
this.setState({ percentageText: targetState.target });
return;

View File

@ -14,7 +14,6 @@ const TABS = {
};
export default class ViewFeatureToggleComponent extends React.Component {
constructor (props) {
super(props);
}

View File

@ -4,7 +4,6 @@ import HistoryList from './history-list-container';
import { styles as commonStyles } from '../common';
class History extends PureComponent {
componentDidMount () {
this.props.fetchHistory();
}

View File

@ -59,7 +59,6 @@ function buildDiff (diff, idx) {
}
class HistoryItem extends PureComponent {
static propTypes () {
return {
entry: PropTypes.object,

View File

@ -3,7 +3,6 @@ import React, { PropTypes, PureComponent } from 'react';
import style from './history.scss';
class HistoryItem extends PureComponent {
static propTypes () {
return {
entry: PropTypes.object,

View File

@ -8,7 +8,6 @@ import { formatFullDateTime } from '../common/util';
import styles from './history.scss';
class HistoryList extends Component {
toggleShowDiff () {
this.props.updateSetting('showData', !this.props.settings.showData);
}

View File

@ -2,7 +2,6 @@ import React, { Component, PropTypes } from 'react';
import HistoryList from './history-list-container';
class HistoryListToggle extends Component {
static propTypes () {
return {
toggleName: PropTypes.string.isRequired,

View File

@ -80,18 +80,17 @@ const CreateHeader = () => (
const Parameters = ({ input = [], count = 0, updateInList }) => (
<div>{
<div>{
gerArrayWithEntries(count)
.map((v, i) => <Parameter
.map((v, i) => (<Parameter
key={i}
set={(v) => updateInList('parameters', i, v, true)}
index={i}
input={input[i]}
/>)
}</div>);
/>))
}</div>);
class AddStrategy extends Component {
static propTypes () {
return {
input: PropTypes.object,

View File

@ -5,7 +5,6 @@ import { List, ListItem, ListItemContent, IconButton, Grid, Cell } from 'react-m
import { HeaderTitle } from '../common';
class StrategiesListComponent extends Component {
static contextTypes = {
router: React.PropTypes.object,
}
@ -34,7 +33,11 @@ class StrategiesListComponent extends Component {
<strong>{strategy.name}</strong>
</Link>
</ListItemContent>
{
strategy.editable === false ?
'' :
<IconButton name="delete" onClick={() => removeStrategy(strategy)} />
}
</ListItem>
)) : <ListItem>No entries</ListItem>}
</List>

View File

@ -60,21 +60,24 @@ export default class StrategyDetails extends Component {
const tabContent = this.getTabContent(activeTabId);
return (
<Grid className="mdl-color--white">
return (<Grid className="mdl-color--white">
<Cell col={12}>
<HeaderTitle title={strategy.name} subtitle={strategy.description} />
<Tabs activeTab={activeTabId} ripple>
<Tab onClick={() => this.goToTab('view')}>Details</Tab>
<Tab onClick={() => this.goToTab('edit')}>Edit</Tab>
</Tabs>
{strategy.editable === false ? '' : <Tabs activeTab={activeTabId} ripple>
<Tab onClick={() => this.goToTab('view')}>
Details
</Tab>
<Tab onClick={() => this.goToTab('edit')}>
Edit
</Tab>
</Tabs>}
<section>
<div className="content">
{tabContent}
</div>
</section>
</Cell>
</Grid>
);
</Grid>);
}
}

File diff suppressed because it is too large Load Diff