@@ -27,45 +27,56 @@ export default class DashboardView extends React.Component {
27
27
28
28
let features = this . context . currentApp . enabledFeatures ;
29
29
30
- let anyTruthyKeys = object => typeof object == 'object' && Object . keys ( object ) . some ( key => object [ key ] ) ;
31
-
32
30
let coreSubsections = [ ] ;
33
- if ( anyTruthyKeys ( features . schemas ) ) {
31
+ if ( features . schemas &&
32
+ features . schemas . addField &&
33
+ features . schemas . removeField &&
34
+ features . schemas . addClass &&
35
+ features . schemas . removeClass ) {
34
36
coreSubsections . push ( {
35
37
name : 'Browser' ,
36
38
link : '/browser'
37
39
} ) ;
38
40
}
39
41
40
- if ( anyTruthyKeys ( features . cloudCode ) ) {
42
+ if ( features . cloudCode && features . cloudCode . viewCode ) {
41
43
coreSubsections . push ( {
42
44
name : 'Cloud Code' ,
43
45
link : '/cloud_code'
44
46
} ) ;
45
47
}
46
48
47
- if ( anyTruthyKeys ( features . webhooks ) ) {
49
+ //webhooks requires removal of heroku link code, then it should work.
50
+ /*
51
+ if (features.hooks && features.hooks.create && features.hooks.read && features.hooks.update && features.hooks.delete) {
48
52
coreSubsections.push({
49
53
name: 'Webhooks',
50
54
link: '/webhooks'
51
55
});
52
56
}
57
+ */
53
58
54
- if ( anyTruthyKeys ( features . jobs ) ) {
59
+ /* Jobs not supported
60
+ if (...) {
55
61
coreSubsections.push({
56
62
name: 'Jobs',
57
63
link: '/jobs'
58
64
});
59
65
}
66
+ */
60
67
61
- if ( anyTruthyKeys ( features . logs ) ) {
68
+ if ( features . logs && features . logs . info && features . logs . error ) {
62
69
coreSubsections . push ( {
63
70
name : 'Logs' ,
64
71
link : '/logs'
65
72
} ) ;
66
73
}
67
74
68
- if ( anyTruthyKeys ( features . config ) ) {
75
+ if ( features . globalConfig &&
76
+ features . globalConfig . create &&
77
+ features . globalConfig . read &&
78
+ features . globalConfig . update &&
79
+ features . globalConfig . delete ) {
69
80
coreSubsections . push ( {
70
81
name : 'Config' ,
71
82
link : '/config'
@@ -85,8 +96,9 @@ export default class DashboardView extends React.Component {
85
96
}
86
97
let pushSubsections = [ ] ;
87
98
88
- // The current UI requires instant and scheduled push (and other stuff)
89
- if ( features . push && features . push . instantPush && features . push . scheduledPush ) {
99
+ // The push UI requires immediate and scheduled push (and some ruby endpoints that we will have to remove)
100
+ /*
101
+ if (features.push && features.push.immediatePush && features.push.scheduledPush) {
90
102
pushSubsections({
91
103
name: 'Send New Push',
92
104
link: '/push/activity'
@@ -105,27 +117,28 @@ export default class DashboardView extends React.Component {
105
117
name: 'Audiences',
106
118
link: '/push/audiences'
107
119
});
108
- }
120
+ }*/
109
121
110
122
let analyticsSidebarSections = [ ] ;
111
123
112
124
//These analytics pages may never make it into parse server
113
125
/*
114
- if (features.analyticsOverview ) {
126
+ if (... ) {
115
127
analyticsSidebarSections.push({
116
128
name: 'Overview',
117
129
link: '/analytics/overview'
118
130
});
119
131
}
120
132
121
- if (features.explorer ) {
133
+ if (... ) {
122
134
analyticsSidebarSections.push({
123
135
name: 'Explorer',
124
136
link: '/analytics/explorer'
125
137
});
126
138
}*/
127
139
128
- //These ones might
140
+ //These ones might, but require some endpoints to added to Parse Server
141
+ /*
129
142
if (features.analytics && features.analytics.retentionAnalysis) {
130
143
analyticsSidebarSections.push({
131
144
name: 'Retention',
@@ -146,10 +159,11 @@ export default class DashboardView extends React.Component {
146
159
link: '/analytics/slow_queries'
147
160
});
148
161
}
162
+ */
149
163
150
164
let settingsSections = [ ] ;
151
165
152
- // Settings - nothing remotely like this in parse-server yet.
166
+ // Settings - nothing remotely like this in parse-server yet. Maybe it will arrive soon.
153
167
/*
154
168
if (features.generalSettings) {
155
169
settingsSections.push({
0 commit comments