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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5162efb36c1aa6f6205d0a49903efbe45e26d95e
4
- data.tar.gz: c42f4e6e9bc0bbae7525288073007bfebea5c2f9
3
+ metadata.gz: 2a4dfe1aa792f938ac0f26e68019c68ba000bc6b
4
+ data.tar.gz: 1acd756f55caf9a2c7b22f8230e40663764469d0
5
5
  SHA512:
6
- metadata.gz: 429569b7470affe52e14afa7d9ded95cc9b2ec7ad6b2dc807cc867a3d6adbdf9629749d41a3b7de61706e0be83249291df20375f5ca366ebb7f2132803825ddd
7
- data.tar.gz: ece0708621855e97f5532febe6b27423dc88fcd0ef7ce0298b4ac769ae0a8a15ae5bcb5eae3c6671a6ac35ee3bb85ac37a29747810a29ac56c8fe6c9481f5280
6
+ metadata.gz: cb6bc7927877787672d7803bf6338c81d1050703bc79557e4d321a9291664a9b47ae910e65874dcc79f4f19ab698cb7cbfa400e05a2880cbad417ee757bedb31
7
+ data.tar.gz: fb2d8e7c663ff96ad9974a6565e67a9fd0230dedccc8c0924bff49e404fc04503a5e67f70b6dce25e1ebe7df7701ee275a430960d21e53cab24607c7f03c30f1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.18
1
+ 0.6.19
@@ -12,6 +12,29 @@ puts 'Initializing RoomCast...'
12
12
  #channels_db = nutella.persist.get_json_object_store('channels')
13
13
  #channelsData_db = nutella.persist.get_json_object_store('channels-data')
14
14
 
15
+ def load_default_configs(app_id, run_id, config_id)
16
+ configs_db = nutella.f.persist.get_run_json_object_store(app_id, run_id, 'configs')
17
+ reply = {
18
+ "1"=> {
19
+ "name"=> "Default activity",
20
+ "mapping"=> [{
21
+ "family"=> "Public",
22
+ "items"=> [{
23
+ "name"=> "",
24
+ "channels"=> []
25
+ }]
26
+ }, {
27
+ "family"=> "Personal",
28
+ "items"=> []
29
+ }]
30
+ }
31
+ }
32
+ configs_db['configs'] = reply
33
+ configs_db['currentConfig'] = 1
34
+ configs_db['launchTime'] = Time.now.to_f * 1000
35
+ reply
36
+ end
37
+
15
38
  nutella.f.net.subscribe_to_all_runs('configs/update', lambda do |message, app_id, run_id, from|
16
39
  new_configs = message
17
40
 
@@ -42,36 +65,19 @@ nutella.f.net.handle_requests_on_all_runs('configs/retrieve', lambda do |request
42
65
  configs_db = nutella.f.persist.get_run_json_object_store(app_id, run_id, 'configs')
43
66
  reply = configs_db['configs']
44
67
  if reply == nil
45
- reply = {
46
- "1"=> {
47
- "name"=> "Default activity",
48
- "mapping"=> [{
49
- "family"=> "Public",
50
- "items"=> [{
51
- "name"=> "",
52
- "channels"=> []
53
- }]
54
- }, {
55
- "family"=> "Personal",
56
- "items"=> []
57
- }]
58
- }
59
- }
68
+ reply = load_default_configs(app_id, run_id, 'configs')
60
69
  end
61
-
62
70
  if configs_db['currentConfig'] == nil
63
71
  configs_db['currentConfig'] = 1
64
72
  end
65
-
66
73
  if configs_db['launchTime'] == nil
67
74
  configs_db['launchTime'] = Time.now.to_f * 1000
68
75
  end
69
-
70
76
  reply
71
77
  end
72
78
  end)
73
79
 
74
- # 'mapping' is the current running configuration
80
+ # 'mapping' is the current running configuration (used from main app)
75
81
  nutella.f.net.handle_requests_on_all_runs('mapping/retrieve', lambda do |request, app_id, run_id, from|
76
82
  reply = {}
77
83
  if request == {}
@@ -81,10 +87,15 @@ nutella.f.net.handle_requests_on_all_runs('mapping/retrieve', lambda do |request
81
87
  if configs_db == nil
82
88
  reply = []
83
89
  else
84
- configs = configs_db['configs']
85
- id = '%d' % configs_db['currentConfig']
86
- config = configs[id]
87
- reply = config['mapping']
90
+ if configs_db['configs'] == nil
91
+ load_default_configs(app_id, run_id, 'configs')
92
+ reply = []
93
+ else
94
+ configs = configs_db['configs']
95
+ id = '%d' % configs_db['currentConfig']
96
+ config = configs[id]
97
+ reply = config['mapping']
98
+ end
88
99
  end
89
100
  reply
90
101
  end
@@ -1,5 +1,6 @@
1
1
  #!/bin/sh
2
2
 
3
3
  BASEDIR=$(dirname $0)
4
- ruby $BASEDIR/roomcast_bot.rb > /dev/null 2>&1 &
5
- echo $! > $BASEDIR/.pid
4
+ #ruby $BASEDIR/roomcast_bot.rb > /dev/null 2>&1 &
5
+ ruby $BASEDIR/roomcast_bot.rb >> roomcast-log.txt 2>&1 &
6
+ echo $! > $BASEDIR/.pid