File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed
src/internal-plugins/metrics/lib Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 144
144
"@mongodb-js/compass-crud" : " 0.7.1" ,
145
145
"@mongodb-js/compass-deployment-awareness" : " ^5.0.0" ,
146
146
"@mongodb-js/compass-document-validation" : " ^5.0.0" ,
147
- "@mongodb-js/compass-license" : " ^0.0.1 " ,
147
+ "@mongodb-js/compass-license" : " ^0.0.2 " ,
148
148
"@mongodb-js/compass-query-history" : " ^2.0.1" ,
149
149
"@mongodb-js/compass-security" : " ^0.0.2" ,
150
150
"@mongodb-js/compass-serverstats" : " ^10.0.0" ,
Original file line number Diff line number Diff line change @@ -166,6 +166,15 @@ const DocumentsTableViewResource = BaseResource.extend({
166
166
}
167
167
} ) ;
168
168
169
+ // License resources uses 'viewed' as action
170
+ const LicenseResource = BaseResource . extend ( {
171
+ id : 'License' ,
172
+ eventTrackers : [ 'stitch' ] ,
173
+ viewed : function ( metadata , callback ) {
174
+ this . _send_event ( metadata , callback ) ;
175
+ }
176
+ } ) ;
177
+
169
178
const AutoUpdateResource = BaseResource . extend ( {
170
179
id : 'Auto Update' ,
171
180
eventTrackers : [ 'ga' , 'intercom' , 'stitch' ] ,
@@ -205,6 +214,7 @@ featureResources.Document = new DocumentResource();
205
214
featureResources . Documents = new DocumentsResource ( ) ;
206
215
featureResources . DocumentsListView = new DocumentsListViewResource ( ) ;
207
216
featureResources . DocumentsTableView = new DocumentsTableViewResource ( ) ;
217
+ featureResources . License = new LicenseResource ( ) ;
208
218
209
219
debug ( 'feature resources' , featureResources ) ;
210
220
Original file line number Diff line number Diff line change @@ -186,5 +186,14 @@ module.exports = [
186
186
action : 'paginated' ,
187
187
condition : ( ) => true ,
188
188
metadata : ( ) => ( { } )
189
+ } ,
190
+ {
191
+ store : 'License.Store' ,
192
+ resource : 'License' ,
193
+ action : 'viewed' ,
194
+ condition : ( ) => true ,
195
+ metadata : ( state ) => ( {
196
+ 'license accepted' : state . isAgreed
197
+ } )
189
198
}
190
199
] ;
You can’t perform that action at this time.
0 commit comments