mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
Link to strategy from applications page
This commit is contained in:
parent
23bf4cb1fb
commit
ef969ffff4
@ -1,9 +1,9 @@
|
||||
import React, { Component } from 'react';
|
||||
import React, { PureComponent } from 'react';
|
||||
|
||||
import { Link } from 'react-router';
|
||||
import { Grid, Cell } from 'react-mdl';
|
||||
|
||||
class ClientStrategies extends Component {
|
||||
class ClientStrategies extends PureComponent {
|
||||
|
||||
componentDidMount () {
|
||||
this.props.fetchApplication(this.props.appName);
|
||||
@ -23,7 +23,6 @@ class ClientStrategies extends Component {
|
||||
return (
|
||||
<div>
|
||||
<h5>{appName}</h5>
|
||||
|
||||
<Grid>
|
||||
<Cell col={4}>
|
||||
<h6>Instances</h6>
|
||||
@ -32,9 +31,15 @@ class ClientStrategies extends Component {
|
||||
</ol>
|
||||
</Cell>
|
||||
<Cell col={4}>
|
||||
<h6>Strategies</h6>
|
||||
<h6>Implemented strategies</h6>
|
||||
<ol className="demo-list-item mdl-list">
|
||||
{/*strategies.map((name, i) => <li className="mdl-list__item" key={i}>{name}</li>)*/}
|
||||
{strategies.map((name, i) => (
|
||||
<li className="mdl-list__item" key={`${name}-${i}`}>
|
||||
<Link to={`/strategies/view/${name}`}>
|
||||
{name}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
</Cell>
|
||||
<Cell col={4}>
|
||||
|
@ -13,6 +13,7 @@ import Features from './page/features';
|
||||
import CreateFeatureToggle from './page/features/create';
|
||||
import EditFeatureToggle from './page/features/edit';
|
||||
import Strategies from './page/strategies';
|
||||
import StrategyView from './page/strategies/show';
|
||||
import CreateStrategies from './page/strategies/create';
|
||||
import HistoryPage from './page/history';
|
||||
import HistoryTogglePage from './page/history/toggle';
|
||||
@ -38,6 +39,7 @@ ReactDOM.render(
|
||||
<Route pageTitle="Features" path="/features/edit/:name" component={EditFeatureToggle} />
|
||||
<Route pageTitle="Strategies" path="/strategies" component={Strategies} />
|
||||
<Route pageTitle="Strategies" path="/strategies/create" component={CreateStrategies} />
|
||||
<Route pageTitle="Strategies" path="/strategies/view/:strategyName" component={StrategyView} />
|
||||
<Route pageTitle="History" path="/history" component={HistoryPage} />
|
||||
<Route pageTitle="History" path="/history/:toggleName" component={HistoryTogglePage} />
|
||||
<Route pageTitle="Archive" path="/archive" component={Archive} />
|
||||
|
7
frontend/src/page/strategies/show.js
Normal file
7
frontend/src/page/strategies/show.js
Normal file
@ -0,0 +1,7 @@
|
||||
import React from 'react';
|
||||
|
||||
const render = ({ params }) => (
|
||||
<div>Show details of strategy: {params.strategyName} (applications implementing it, toggles using it etc)!</div>
|
||||
);
|
||||
|
||||
export default render;
|
Loading…
Reference in New Issue
Block a user