From 3fb522534cff61576ac58ae466a2752585b8c44e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 1 Jun 2020 19:45:15 +0200 Subject: setting up the database... --- frontend/actions.js | 2 +- frontend/api/index.js | 10 +++------- frontend/index.js | 1 - frontend/store.js | 1 + frontend/types.js | 2 +- frontend/views/index.js | 10 ---------- frontend/views/upload/components/upload.index.js | 3 --- frontend/views/upload/upload.reducer.js | 3 --- 8 files changed, 6 insertions(+), 26 deletions(-) (limited to 'frontend') diff --git a/frontend/actions.js b/frontend/actions.js index fcbb6fc..31e0a52 100644 --- a/frontend/actions.js +++ b/frontend/actions.js @@ -13,6 +13,6 @@ export default ]) .map(p => [p[0], bindActionCreators(p[1], store.dispatch)]) .concat([ - ['socket', socketActions], + // ['socket', socketActions], ]) .reduce((a,b) => (a[b[0]] = b[1])&&a,{}) \ No newline at end of file diff --git a/frontend/api/index.js b/frontend/api/index.js index b33d2e6..26a8baa 100644 --- a/frontend/api/index.js +++ b/frontend/api/index.js @@ -17,12 +17,8 @@ so you can do ... export { util } export const actions = [ - 'collection', + 'graph', + 'page', + 'tile', 'upload', - 'media', - 'featureIndex', - 'detectionIndex', - 'detection', - 'modelzoo', - 'mediaImport', ].reduce((a,b) => (a[b] = crud_actions(b)) && a, {}) diff --git a/frontend/index.js b/frontend/index.js index 39bcf86..94cac35 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -4,7 +4,6 @@ import { Provider } from 'react-redux' import App from './app' -import * as socket from './socket' import { store, history } from './store' const container = document.createElement('div') diff --git a/frontend/store.js b/frontend/store.js index e3adb9e..445125b 100644 --- a/frontend/store.js +++ b/frontend/store.js @@ -10,6 +10,7 @@ import uploadReducer from './views/upload/upload.reducer' const createRootReducer = history => ( combineReducers({ auth: (state = {}) => state, + router: connectRouter(history), upload: uploadReducer, // collection: collectionReducer, }) diff --git a/frontend/types.js b/frontend/types.js index 2e948f4..cf48b67 100644 --- a/frontend/types.js +++ b/frontend/types.js @@ -1,9 +1,9 @@ import { with_type, crud_type } from './api/crud.types' +export const api = crud_type('api', []) export const graph = crud_type('graph', []) export const page = crud_type('page', []) export const tile = crud_type('tile', []) - export const upload = crud_type('upload', []) export const system = with_type('system', [ diff --git a/frontend/views/index.js b/frontend/views/index.js index d1e4243..5f88c96 100644 --- a/frontend/views/index.js +++ b/frontend/views/index.js @@ -1,11 +1 @@ -export { Container as detectionIndex } from './detectionIndex' -export { Container as featureIndex } from './featureIndex' -export { Container as import } from './mediaImport' -export { Container as collection } from './collection' -export { Container as dashboard } from './dashboard' -export { Container as detection } from './detection' -export { Container as modelzoo } from './modelzoo' -export { Container as search } from './search' export { Container as upload } from './upload' -export { Container as media } from './media' -export { Container as task } from './task' diff --git a/frontend/views/upload/components/upload.index.js b/frontend/views/upload/components/upload.index.js index 4435043..6123001 100644 --- a/frontend/views/upload/components/upload.index.js +++ b/frontend/views/upload/components/upload.index.js @@ -8,8 +8,6 @@ import actions from '../../../actions' import UploadIndexOptions from './upload.indexOptions' import UploadMenu from './upload.menu' -import CollectionMediaToggle from '../../collectionMedia/collectionMedia.toggle.js' - // const { result, collectionLookup } = this.props export default class UploadIndex extends Component { @@ -104,4 +102,3 @@ const UploadItem = ({ data }) => { ) } - // diff --git a/frontend/views/upload/upload.reducer.js b/frontend/views/upload/upload.reducer.js index 674fcf8..98dc0a1 100644 --- a/frontend/views/upload/upload.reducer.js +++ b/frontend/views/upload/upload.reducer.js @@ -13,9 +13,6 @@ const reducer = crudReducer('upload') export default function uploadReducer(state = initialState, action) { // console.log(action.type, action) - if (action.type === types.search.loaded && action.tag === 'query') { - // console.log("infer:", action.data.infer) - } state = reducer(state, action) switch (action.type) { default: -- cgit v1.2.3-70-g09d2