File tree 2 files changed +30
-2
lines changed 2 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ import { setBasePath } from 'lib/AJAX';
52
52
import Header from 'components/back4App/Header/Header.react' ;
53
53
import Sidebar from 'components/back4App/Sidebar/Sidebar.react' ;
54
54
import ServerSettings from 'dashboard/ServerSettings/ServerSettings.react' ;
55
+ import { ActionTypes } from 'lib/stores/back4App/AppsStore' ;
56
+ import subscribeTo from 'lib/subscribeTo' ;
55
57
56
58
import {
57
59
Router ,
@@ -61,12 +63,17 @@ import {
61
63
62
64
const ShowSchemaOverview = false ; //In progress features. Change false to true to work on this feature.
63
65
66
+ // @subscribeTo ('Apps', 'apps')
67
+ // @subscribeTo ('Schema', 'schema')
68
+ // @subscribeTo ('Jobs', 'jobs')
64
69
class App extends React . Component {
65
70
constructor ( props ) {
66
71
super ( props ) ;
67
72
this . state = {
68
73
sidebarIsOpen : false
69
74
} ;
75
+
76
+ console . log ( this . props . apps )
70
77
}
71
78
72
79
handleSidebarToggle ( isOpen ) {
@@ -196,8 +203,8 @@ class Dashboard extends React.Component {
196
203
}
197
204
} ) ;
198
205
return Parse . Promise . when ( appInfoPromises ) ;
199
- } ) . then ( function ( ) {
200
- Array . prototype . slice . call ( arguments ) . forEach ( app => {
206
+ } ) . then ( function ( resolvedApps ) {
207
+ resolvedApps . forEach ( app => {
201
208
AppsManager . addApp ( app ) ;
202
209
} ) ;
203
210
this . setState ( { configLoadingState : AsyncStatus . SUCCESS } ) ;
Original file line number Diff line number Diff line change
1
+ import keyMirror from 'lib/keyMirror' ;
2
+ import Parse from 'parse' ;
3
+ import { Map , List } from 'immutable' ;
4
+ import { registerStore } from 'lib/stores/StoreManager' ;
5
+
6
+ export const ActionTypes = keyMirror ( [
7
+ 'FETCH'
8
+ ] ) ;
9
+
10
+ // Apps state should be an Immutable Map with the following fields:
11
+ // - lastFetch: the last time all data was fetched from the server
12
+ // - apps: An Immutable Map of schedule ids to Maps of apps details
13
+
14
+ function AppsStore ( state , action ) {
15
+ switch ( action . type ) {
16
+ case ActionTypes . FETCH :
17
+ console . log ( 'AppsStore:FETCH' ) ;
18
+ }
19
+ }
20
+
21
+ registerStore ( 'Apps' , AppsStore ) ;
You can’t perform that action at this time.
0 commit comments