nutella_framework 0.6.18 → 0.6.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/framework_components/roomcast-bot/roomcast_bot.rb +34 -23
  4. data/framework_components/roomcast-bot/startup +3 -2
  5. data/framework_components/roomcast-main-app/dist/app.js +51 -14
  6. data/framework_components/roomcast-main-app/src/app/components/NutellaMixin.js +3 -1
  7. data/framework_components/roomcast-main-app/src/app/components/app/main.js +17 -6
  8. data/framework_components/roomcast-main-app/src/app/components/identity-selector/IdentitiesGrid.js +5 -1
  9. data/framework_components/roomcast-main-app/src/app/components/identity-selector/IdentityCard.js +19 -2
  10. data/framework_components/roomcast-main-app/src/app/components/identity-selector/main.js +5 -1
  11. data/framework_components/roomcast-main-app/src/app/components/login/main.js +0 -1
  12. data/framework_components/roomcast-package-creator/dist/app.js +78 -31
  13. data/framework_components/roomcast-package-creator/dist/main.css +15 -3
  14. data/framework_components/roomcast-package-creator/src/app/app.js +1 -0
  15. data/framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js +3 -11
  16. data/framework_components/roomcast-package-creator/src/app/components/NutellaMixin.js +50 -15
  17. data/framework_components/roomcast-package-creator/src/app/components/main.js +21 -2
  18. data/framework_components/roomcast-package-creator/src/less/main.less +9 -2
  19. data/framework_components/roomcast-teacher-controls/dist/app.js +77 -5
  20. data/framework_components/roomcast-teacher-controls/index.html +1 -3
  21. data/framework_components/roomcast-teacher-controls/src/app/components/ActivityCard.js +8 -0
  22. data/framework_components/roomcast-teacher-controls/src/app/components/Footer.js +5 -1
  23. data/framework_components/roomcast-teacher-controls/src/app/components/NutellaMixin.js +57 -0
  24. metadata +3 -3
  25. data/framework_components/roomcast-teacher-controls/src/app/components/Channel.js +0 -70
@@ -27,7 +27,9 @@ var NutellaMixin = {
27
27
  day: date.getDate(),
28
28
  time: date.getHours() + ":" +date.getMinutes() + ":" +date.getSeconds()
29
29
  };
30
- doc.info = info;
30
+ if(Object.keys(info).length !== 0) {
31
+ doc.info = info;
32
+ }
31
33
  nutella.net.publish('roomcast-log-bot/store', doc);
32
34
  },
33
35
 
@@ -88,7 +88,6 @@ var Main = React.createClass({
88
88
  * @param rid current identity
89
89
  */
90
90
  updateChannelsForRid: function(message, rid) {
91
-
92
91
  var self = this;
93
92
  var myChannelsId = [];
94
93
  var myChannels = [];
@@ -135,7 +134,6 @@ var Main = React.createClass({
135
134
  }
136
135
  });
137
136
  this.setState({players: newPlayers});
138
- console.log(catalogue, players, newPlayers);
139
137
  },
140
138
 
141
139
  getInitialState: function() {
@@ -212,8 +210,8 @@ var Main = React.createClass({
212
210
 
213
211
  // #LOG action
214
212
  this.logAction('playChannel', this.props.params.app_id, this.props.params.run_id, {
215
- channelName: this.state.channelsCatalogue[id].name,
216
- packageName: this.state.rid,
213
+ channel_name: this.state.channelsCatalogue[id].name,
214
+ package_name: this.state.rid
217
215
  });
218
216
  },
219
217
 
@@ -256,7 +254,11 @@ var Main = React.createClass({
256
254
  },
257
255
 
258
256
  handleLogout: function() {
259
- //this.handleSelectedResource(null);
257
+ // #LOG action
258
+ this.logAction('logout', this.props.params.app_id, this.props.params.run_id, {
259
+ package_name: this.state.rid
260
+ });
261
+
260
262
  this.props.onSwitchPage(1);
261
263
  },
262
264
 
@@ -265,7 +267,8 @@ var Main = React.createClass({
265
267
  <IdentitySelector
266
268
  params = {this.props.params}
267
269
  onSetRid = {this.handleSetRid}
268
- mode = {mode}/>);
270
+ mode = {mode}
271
+ old_rid = {this._old_rid} />);
269
272
  },
270
273
 
271
274
  componentWillUnmount: function() {
@@ -330,10 +333,18 @@ var Main = React.createClass({
330
333
  if(id) {
331
334
  if(ids.indexOf(id) !== -1) {
332
335
  this.updateChannelsForRid(mapping, this.state.rid);
336
+ // #LOG action
337
+ this.logAction('transitionActivity', this.props.app_id, this.props.run_id, {
338
+ old_package_name: id,
339
+ new_package_name: id,
340
+ transparent: true
341
+ });
333
342
  } else {
343
+ this._old_rid = id;
334
344
  this.setState({rid: null, modal: 'activity'});
335
345
  }
336
346
  } else {
347
+ this._old_rid = id;
337
348
  this.setState({rid: null, modal: 'activity'});
338
349
  }
339
350
  },
@@ -74,7 +74,11 @@ var IdentitiesGrid = React.createClass({
74
74
  cardStyle={cardStyle}
75
75
  hasBeenSelected={self.state.hasBeenSelected}
76
76
  onSelectedIdentity={self.setHasBeenSelected}
77
- onSetRid = {self.props.onSetRid} />);
77
+ onSetRid = {self.props.onSetRid}
78
+ mode = {self.props.mode}
79
+ app_id={self.props.app_id}
80
+ run_id={self.props.run_id}
81
+ old_rid={self.props.old_rid} />);
78
82
  });
79
83
 
80
84
  return (
@@ -1,12 +1,12 @@
1
-
2
1
  var React = require('react');
3
2
  var Mui = require('material-ui');
4
3
  var Paper = Mui.Paper;
5
4
  var iOSMixin = require('./iOSMixin');
5
+ var NutellaMixin = require('../NutellaMixin');
6
6
 
7
7
  var IdentityCard = React.createClass({
8
8
 
9
- mixins: [iOSMixin],
9
+ mixins: [iOSMixin, NutellaMixin],
10
10
 
11
11
  componentDidMount: function() {
12
12
  var self= this;
@@ -34,6 +34,23 @@ var IdentityCard = React.createClass({
34
34
 
35
35
  // Trigger native animation
36
36
  var callback = function() {
37
+
38
+ // #LOG action
39
+ console.log(self.props.mode);
40
+ if(self.props.mode === 'id') {
41
+ self.logAction('login', self.props.app_id, self.props.run_id, {
42
+ package_name: self.props.name
43
+ });
44
+ } else {
45
+ if(self.props.mode === 'activity') {
46
+ self.logAction('transitionActivity', self.props.app_id, self.props.run_id, {
47
+ old_package_name: self.props.old_rid,
48
+ new_package_name: self.props.name,
49
+ transparent: self.props.name === self.props.old_rid
50
+ });
51
+ }
52
+ }
53
+
37
54
  // Exit point from identity-selector
38
55
  self.props.onSetRid(self.props.name);
39
56
  };
@@ -91,7 +91,11 @@ var Main = React.createClass({
91
91
 
92
92
  <IdentitiesGrid
93
93
  identities={this.state.identities}
94
- onSetRid = {this.props.onSetRid} />
94
+ onSetRid={this.props.onSetRid}
95
+ mode={this.props.mode}
96
+ app_id={this.props.params.app_id}
97
+ run_id={this.props.params.run_id}
98
+ old_rid={this.props.old_rid} />
95
99
 
96
100
  </div>
97
101
 
@@ -13,7 +13,6 @@ var Main = React.createClass({
13
13
  componentDidMount: function() {
14
14
  var query_parameters = NUTELLA.parseURLParameters();
15
15
  var broker = 'ltg.evl.uic.edu';
16
- //var broker = 'localhost';
17
16
  if(query_parameters.broker) {
18
17
  broker = query_parameters.broker;
19
18
  }