mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
add metricsdb, fix lint
This commit is contained in:
parent
2c768200c9
commit
ee95e8e960
@ -17,7 +17,6 @@ module.exports = function (app, config) {
|
||||
});
|
||||
|
||||
app.post('/metrics', (req, res) => {
|
||||
|
||||
// TODO: validate input and reply with http errorcode
|
||||
try {
|
||||
// not required with header: Content-Type: application/json
|
||||
|
@ -11,6 +11,8 @@ const EventStore = require('../../lib/event-store');
|
||||
const eventStore = new EventStore(eventDb);
|
||||
const featureDb = require('../../lib/db/feature')(knex, eventStore);
|
||||
const strategyDb = require('../../lib/db/strategy')(knex, eventStore);
|
||||
const metricsDb = require('../../lib/db/metrics')(knex);
|
||||
|
||||
|
||||
const app = require('../../app')({
|
||||
baseUriPath: '',
|
||||
@ -19,6 +21,7 @@ const app = require('../../app')({
|
||||
eventStore,
|
||||
featureDb,
|
||||
strategyDb,
|
||||
metricsDb,
|
||||
});
|
||||
|
||||
BPromise.promisifyAll(request);
|
||||
|
@ -18,5 +18,8 @@
|
||||
"spread":true,
|
||||
"restParams": true
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"no-shadow": 0
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ import ListComponent from './archive-list-component';
|
||||
import { fetchArchive, revive } from '../../store/archive-actions';
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
const archive = state.archive.get('list').toArray(); // eslint-disable-line no-shadow
|
||||
const archive = state.archive.get('list').toArray();
|
||||
|
||||
return {
|
||||
archive,
|
||||
|
@ -5,7 +5,7 @@ import Chip from 'react-toolbox/lib/chip';
|
||||
import Switch from 'react-toolbox/lib/switch';
|
||||
|
||||
const ArchivedFeature = ({ feature, revive }) => {
|
||||
const { name, description, enabled, strategies } = feature; // eslint-disable-line no-shadow
|
||||
const { name, description, enabled, strategies } = feature;
|
||||
const actions = [
|
||||
<div>{strategies && strategies.map(s => <Chip><small>{s.name}</small></Chip>)}</div>,
|
||||
<FontIcon style={{ cursor: 'pointer' }} value="restore" onClick={() => revive(feature)} />,
|
||||
|
@ -9,7 +9,7 @@ import Chip from 'react-toolbox/lib/chip';
|
||||
import style from './feature.scss';
|
||||
|
||||
const Feature = ({ feature, onFeatureClick, onFeatureRemove }) => {
|
||||
const { name, description, enabled, strategies } = feature; // eslint-disable-line no-shadow
|
||||
const { name, description, enabled, strategies } = feature;
|
||||
|
||||
const actions = [
|
||||
<div key="strategies">{strategies && strategies.map((s, i) => <Chip key={i}><small>{s.name}</small></Chip>)}</div>,
|
||||
|
@ -3,7 +3,7 @@ import ListComponent from './history-list-component';
|
||||
import { fetchHistory } from '../../store/history-actions';
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
const history = state.history.get('list').toArray(); // eslint-disable-line no-shadow
|
||||
const history = state.history.get('list').toArray();
|
||||
|
||||
return {
|
||||
history,
|
||||
|
@ -27,7 +27,7 @@ class HistoryList extends Component {
|
||||
}
|
||||
|
||||
render () {
|
||||
const { history } = this.props; // eslint-disable-line no-shadow
|
||||
const { history } = this.props;
|
||||
|
||||
return (
|
||||
<List ripple >
|
||||
|
Loading…
Reference in New Issue
Block a user