rhoconnect 3.3.1.beta2 → 3.3.1.beta3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,101 @@
1
+ PATH
2
+ remote: ../../
3
+ specs:
4
+ rhoconnect (3.3.1.beta3)
5
+ bundler (~> 1.0)
6
+ json (~> 1.6.0)
7
+ rake (~> 0.9.2)
8
+ redis (>= 2.2.0)
9
+ resque (~> 1.20.0)
10
+ rest-client (~> 1.6.1)
11
+ rubyzip (~> 0.9.4)
12
+ sinatra (~> 1.3)
13
+ templater (~> 1.0.0)
14
+ thor (~> 0.15.0)
15
+ uuidtools (>= 2.1.1)
16
+
17
+ GEM
18
+ remote: http://rubygems.org/
19
+ specs:
20
+ SystemTimer (1.2.3)
21
+ async-rack (0.5.1)
22
+ rack (~> 1.1)
23
+ daemons (1.1.8)
24
+ diff-lcs (1.1.2)
25
+ eventmachine (0.12.10)
26
+ extlib (0.9.15)
27
+ highline (1.6.13)
28
+ json (1.6.7)
29
+ mime-types (1.19)
30
+ multi_json (1.3.6)
31
+ multi_xml (0.5.1)
32
+ rack (1.4.1)
33
+ rack-fiber_pool (0.9.2)
34
+ rack-parser (0.1.2)
35
+ multi_json
36
+ multi_xml
37
+ rack
38
+ rack-protection (1.2.0)
39
+ rack
40
+ rack-test (0.6.1)
41
+ rack (>= 1.0)
42
+ rake (0.9.2.2)
43
+ redis (2.2.2)
44
+ redis-namespace (1.0.3)
45
+ redis (< 3.0.0)
46
+ resque (1.20.0)
47
+ multi_json (~> 1.0)
48
+ redis-namespace (~> 1.0.2)
49
+ sinatra (>= 0.9.2)
50
+ vegas (~> 0.1.2)
51
+ rest-client (1.6.7)
52
+ mime-types (>= 1.16)
53
+ rhomobile-debug (1.0.6)
54
+ rspec (2.6.0)
55
+ rspec-core (~> 2.6.0)
56
+ rspec-expectations (~> 2.6.0)
57
+ rspec-mocks (~> 2.6.0)
58
+ rspec-core (2.6.4)
59
+ rspec-expectations (2.6.0)
60
+ diff-lcs (~> 1.1.2)
61
+ rspec-mocks (2.6.0)
62
+ rubyzip (0.9.9)
63
+ sinatra (1.3.2)
64
+ rack (~> 1.3, >= 1.3.6)
65
+ rack-protection (~> 1.2)
66
+ tilt (~> 1.3, >= 1.3.3)
67
+ templater (1.0.0)
68
+ diff-lcs (>= 1.1.2)
69
+ extlib (>= 0.9.5)
70
+ highline (>= 1.4.0)
71
+ thin (1.4.1)
72
+ daemons (>= 1.0.9)
73
+ eventmachine (>= 0.12.6)
74
+ rack (>= 1.0.0)
75
+ thor (0.15.4)
76
+ tilt (1.3.3)
77
+ uuidtools (2.1.3)
78
+ vegas (0.1.11)
79
+ rack (>= 1.0.0)
80
+
81
+ PLATFORMS
82
+ ruby
83
+
84
+ DEPENDENCIES
85
+ SystemTimer (~> 1.2.3)
86
+ async-rack
87
+ dbd-jdbc (>= 0.1.4)
88
+ dbi (>= 0.4.5)
89
+ eventmachine (~> 1.0.0.beta)
90
+ jdbc-sqlite3 (>= 3.7.2)
91
+ jruby-openssl (>= 0.7.4)
92
+ rack-fiber_pool
93
+ rack-parser
94
+ rack-test (>= 0.5.3)
95
+ rhoconnect!
96
+ rhomobile-debug (>= 1.0.2)
97
+ rspec (~> 2.6.0)
98
+ thin
99
+ trinidad
100
+ warbler
101
+ win32-process
Binary file
@@ -1,4 +1,4 @@
1
1
  Server.api4 :save_adapter, :post, "/rc/#{Rhoconnect::API_VERSION}/system/appserver", \
2
2
  true, {:verb => :post, :url => ['/api/save_adapter', '/api/source/save_adapter']} do |params,user|
3
- Rhoconnect.appserver = params[:attributes]['adapter_url'] || params['adapter_url']
3
+ Rhoconnect.appserver = params['adapter_url'] || params[:attributes]['adapter_url']
4
4
  end
@@ -1,3 +1,3 @@
1
1
  module Rhoconnect
2
- VERSION = '3.3.1.beta2'
2
+ VERSION = '3.3.1.beta3'
3
3
  end
@@ -14,9 +14,8 @@ App.Controllers.Admins = Backbone.Router.extend({
14
14
  "users/new" : "new_user",
15
15
  "user/:id" : "show_user",
16
16
  "user/newping/:id" : "new_ping",
17
- "users/newping" : "new_ping_all",
17
+ "users/newping" : "new_ping_all",
18
18
  "device/:device_id/:user_id" : "user_device",
19
- "change_admin" : "change_admin",
20
19
  "stats" : "stats"
21
20
  },
22
21
 
@@ -11,6 +11,7 @@ var Client = Backbone.Model.extend({
11
11
  },
12
12
 
13
13
  get_clients: function(user_id){
14
+ var session = new Session();
14
15
  $.ajax({
15
16
  type: 'get',
16
17
  url: '/rc/v1/users/' + user_id + '/clients',
@@ -37,6 +38,7 @@ var Client = Backbone.Model.extend({
37
38
  },
38
39
 
39
40
  list_client_docs: function(client_id,source_id){
41
+ var session = new Session();
40
42
  $.ajax({
41
43
  type: 'GET',
42
44
  url: '/rc/v1/clients/' + client_id + '/sources/' + source_id + '/docnames',
@@ -63,6 +65,7 @@ var Client = Backbone.Model.extend({
63
65
  },
64
66
 
65
67
  get_client_params: function(client_id){
68
+ var session = new Session();
66
69
  $.ajax({
67
70
  type: 'GET',
68
71
  url: '/rc/v1/clients/' + client_id,
@@ -47,8 +47,10 @@ var Doc = Backbone.Model.extend({
47
47
  }
48
48
  $('tr.remove-tr-doc').remove();
49
49
  $('#docdata-table tr:last').after(data);
50
- $(".query-status")[0].firstChild.className = "label label-success";
51
- $(".query-status")[0].firstChild.innerHTML = "success";
50
+ if($(".query-status")[0] != undefined){
51
+ $(".query-status")[0].firstChild.className = "label label-success";
52
+ $(".query-status")[0].firstChild.innerHTML = "success";
53
+ }
52
54
  },
53
55
  error: function(resp){
54
56
  if(resp.status == 422){
@@ -11,6 +11,7 @@ var User = Backbone.Model.extend({
11
11
  },
12
12
 
13
13
  get_users: function(tble_name){
14
+ var session = new Session();
14
15
  var tble_name = tble_name;
15
16
  $.ajax({
16
17
  type: 'GET',
@@ -48,6 +49,7 @@ var User = Backbone.Model.extend({
48
49
  create_user: function(){
49
50
  var login = $('#new-login').val();
50
51
  var password = $('#new-password').val();
52
+ var session = new Session();
51
53
  $.ajax({
52
54
  type: 'POST',
53
55
  url: '/rc/v1/users',
@@ -69,6 +71,7 @@ var User = Backbone.Model.extend({
69
71
  },
70
72
 
71
73
  delete_user: function(){
74
+ var session = new Session();
72
75
  if(confirm("Are you sure you want to delete this user?")){
73
76
  $.ajax({
74
77
  type: 'DELETE',
@@ -92,6 +95,7 @@ var User = Backbone.Model.extend({
92
95
  },
93
96
 
94
97
  new_ping: function(){
98
+ var session = new Session();
95
99
  $.ajax({
96
100
  type: 'GET',
97
101
  url: '/rc/v1/sources/type/user',
@@ -27,10 +27,7 @@
27
27
  <script language="javascript" type="text/javascript" src='views/new_user.js'></script>
28
28
  <script language="javascript" type="text/javascript" src='views/show_user.js'></script>
29
29
  <script language="javascript" type="text/javascript" src='views/show_device.js'></script>
30
- <script language="javascript" type="text/javascript" src='views/new_ping.js'></script>
31
- <script language="javascript" type="text/javascript" src='views/edit_user.js'></script>
32
- <script language="javascript" type="text/javascript" src='views/settings.js'></script>
33
- <script language="javascript" type="text/javascript" src='views/api_token.js'></script>
30
+ <script language="javascript" type="text/javascript" src='views/new_ping.js'></script>
34
31
  <script language="javascript" type="text/javascript" src='views/stats.js'></script>
35
32
  <script language="javascript" type="text/javascript" src='models/session.js'></script>
36
33
  <script language="javascript" type="text/javascript" src='models/source.js'></script>
@@ -1,16 +1,16 @@
1
- App.Views.ApiToken = Backbone.View.extend({
2
-
3
- initialize: function() {
4
- this.render();
5
- },
6
-
7
- render: function() {
8
- session = new Session()
9
- $('#secondary-nav').css('display','block');
10
- out = "<h3>API Token</h3>"
11
- out += "<code>"+ session.getApiKey() +"</code>"
12
-
13
- $(this.el).html(out);
14
- $('#settings_main').html(this.el);
15
- }
16
- });
1
+ // App.Views.ApiToken = Backbone.View.extend({
2
+ //
3
+ // initialize: function() {
4
+ // this.render();
5
+ // },
6
+ //
7
+ // render: function() {
8
+ // session = new Session()
9
+ // $('#secondary-nav').css('display','block');
10
+ // out = "<h3>API Token</h3>"
11
+ // out += "<code>"+ session.getApiKey() +"</code>"
12
+ //
13
+ // $(this.el).html(out);
14
+ // $('#settings_main').html(this.el);
15
+ // }
16
+ // });
@@ -47,12 +47,12 @@ App.Views.Doc = Backbone.View.extend({
47
47
 
48
48
  render: function(dbkey) {
49
49
  $('#secondary-nav').css('display','block');
50
- out = "<div class='page-header well'><h2>Document&nbsp;"+dbkey+"</h2></div>";
50
+ out = "<div class='page-header'><h2>Document&nbsp;"+dbkey+"</h2></div>";
51
51
  out += "<div id='docalert' class='alert alert-error' style='display:none'></div>";
52
- out += "<form 'string_s' class='form-horizontal'>";
53
- out += "<input type='text' name='data' value='' class='input-xlarge' placeholder='Upload string'/>";
54
- out += "<input type='submit' value='Submit' class='btn btn-primary' style='margin-left:10px'>";
55
- out += "</form>";
52
+ //out += "<form 'string_s' class='form-horizontal'>";
53
+ //out += "<input type='text' name='data' value='' class='input-xlarge' placeholder='Upload string'/>";
54
+ //out += "<input type='submit' value='Submit' class='btn btn-primary' style='margin-left:10px'>";
55
+ //out += "</form>";
56
56
  out += "<table id='docdata-table' class='table table-bordered'><tr></tr>";
57
57
  out += "<tr class='remove-tr-doc'><td colspan='2' style='text-align:center'>Loading...</td></tr>"
58
58
  out += "</table>"
@@ -1,46 +1,46 @@
1
- App.Views.EditUser = Backbone.View.extend({
2
-
3
- events: {
4
- "submit form" : "edit"
5
- },
6
-
7
- initialize: function() {
8
- this.render();
9
- },
10
-
11
- edit: function(e){
12
- e.preventDefault();
13
- var session = new Session()
14
- var password = $("#password2").val();
15
- $.ajax({
16
- type: 'PUT',
17
- url: '/rc/v1/users/' + 'rhoadmin',
18
- data: {attributes : {login : 'rhoadmin', password : password}},
19
- beforeSend: function (HttpRequest) {
20
- HttpRequest.setRequestHeader("X-RhoConnect-API-TOKEN", session.getApiKey());
21
- },
22
- success: function(){
23
- //router.navigate("users", true);
24
- },
25
- error: function(resp){
26
- if(resp.status == 422){
27
- new App.Views.Index()
28
- }
29
- $('#settings-alert')[0].innerHTML = resp.responseText;
30
- $('#settings-alert').css('display','block');
31
- }
32
- })
33
- },
34
-
35
- render: function() {
36
- $('#secondary-nav').css('display','block');
37
- out = "<h3>Change Admin Password</h3>"
38
- out += "<form>"
39
- out += "<input id='password2' type='password' name='password' value='' placeholder='Enter new password' style='margin:0'/>"
40
- out += "<input type='submit' class='btn btn-primary' value='Save' style='margin-left:10px'/>"
41
- out += "</form>"
42
-
43
- $(this.el).html(out);
44
- $('#settings_main').html(this.el);
45
- }
46
- });
1
+ // App.Views.EditUser = Backbone.View.extend({
2
+ //
3
+ // events: {
4
+ // "submit form" : "edit"
5
+ // },
6
+ //
7
+ // initialize: function() {
8
+ // this.render();
9
+ // },
10
+ //
11
+ // edit: function(e){
12
+ // e.preventDefault();
13
+ // var session = new Session()
14
+ // var password = $("#password2").val();
15
+ // $.ajax({
16
+ // type: 'PUT',
17
+ // url: '/rc/v1/users/' + 'rhoadmin',
18
+ // data: {attributes : {login : 'rhoadmin', password : password}},
19
+ // beforeSend: function (HttpRequest) {
20
+ // HttpRequest.setRequestHeader("X-RhoConnect-API-TOKEN", session.getApiKey());
21
+ // },
22
+ // success: function(){
23
+ // //router.navigate("users", true);
24
+ // },
25
+ // error: function(resp){
26
+ // if(resp.status == 422){
27
+ // new App.Views.Index()
28
+ // }
29
+ // $('#settings-alert')[0].innerHTML = resp.responseText;
30
+ // $('#settings-alert').css('display','block');
31
+ // }
32
+ // })
33
+ // },
34
+ //
35
+ // render: function() {
36
+ // $('#secondary-nav').css('display','block');
37
+ // out = "<h3>Change Admin Password</h3>"
38
+ // out += "<form>"
39
+ // out += "<input id='password2' type='password' name='password' value='' placeholder='Enter new password' style='margin:0'/>"
40
+ // out += "<input type='submit' class='btn btn-primary' value='Save' style='margin-left:10px'/>"
41
+ // out += "</form>"
42
+ //
43
+ // $(this.el).html(out);
44
+ // $('#settings_main').html(this.el);
45
+ // }
46
+ // });
@@ -4,7 +4,7 @@ App.Views.Home = Backbone.View.extend({
4
4
  "click a#reset" : "reset",
5
5
  "click #app_url" : "set_adapter",
6
6
  "submit form" : "edit",
7
- "click #api_btn" : "toggle_api_token"
7
+ "click #api_btn" : "toggle_api_token"
8
8
  },
9
9
 
10
10
  initialize: function() {
@@ -121,22 +121,7 @@ App.Views.Home = Backbone.View.extend({
121
121
  out += "<td width='40%'><p style='margin-top:10px'>If you are using <a href='http://docs.rhomobile.com/rhoconnect/plugin-intro' target='_blank'>RhoConnect Plugins</a>, you will need to ";
122
122
  out += "define your backend app URL either here or in the plugin configuration. For example, if you are using the rhoconnect-rb plugin in your rails app running locally, use the URL http://localhost:3000. <em><b>This needs to be set in order to use RhoConnect Plugins.</b></em></p></td>"
123
123
  out += "</table>"
124
-
125
- out += "<div class='span12' style='margin-top:20px'><h2>Getting Started with RhoConnect</h2>";
126
- out += "<ol style='font-size:18px;margin-top:20px'><li>The Home Screen</li>";
127
- out += "<ul style='margin:20px'>"
128
- out += "<li>Sync Server URL<p style='margin-top:5px'>Use this url in your client application to sync with RhoConnect</p></li>"
129
- out += "<li>App partition sources</li><p style='margin-top:5px'>This is a list of all your source adapters partitioned by :app. Click on the source links to view the attributes and document key/values stored in redis</p>"
130
- out += "<li><a class='btn btn-danger'>Reset</a> button</li>"
131
- out += "<p style='margin-top:5px'>The reset button will clear the redis db of all data. <b><em>Be careful when resetting the db as you will lose all your user information and document data!</em></b></p>"
132
- out += "</ul>"
133
- out += "<li>Server Doc</li>";
134
- out += "<p style='margin:10px'>Enter a key to view the stored value in the database. You can also set and delete keys here.</p>"
135
- out += "<li>Users</li>"
136
- out += "<p style='margin:10px'>View a list of registered users here. You can also create,delete, and ping users. Viewing a particular user will allow you to view source adapters partitioned by user as well as that user's registered devices."
137
- out += "</ul>"
138
- out += "<li>Statistics</li>"
139
- out += "<p style='margin-top:10px'>If you do not see a link to Statistics, it is not enabled in your config.ru file. By default Rhoconnect apps will have this line <code>Rhoconnect::Server.enable :stats</code> commented out. "
124
+ out += "<p style='margin-top:10px'>*If Statistics is greyed out, it is not enabled in your config.ru file. By default Rhoconnect apps will have this line <code>Rhoconnect::Server.enable :stats</code> commented out. "
140
125
  out += "Older versions of RhoConnect will not have this line in the config.ru file at all. Uncomment or add the line above to enable Statistics. The Statistics tab will have different graphs to measure metrics/performance for RhoConnect.</p>"
141
126
  out += "</ol>"
142
127
  out += "<div class='pull-right'>"
@@ -43,16 +43,21 @@ App.Views.NewPing = Backbone.View.extend({
43
43
 
44
44
  render: function(name) {
45
45
  $('#secondary-nav').css('display','block');
46
- out = "<div class='page-header well'><h2>Ping User/s</h2></div>";
46
+ out = "<div class='page-header'><h2>Ping User/s</h2></div>";
47
47
  out += "<div id='ping-alert' class='alert alert-error' style='display:none'></div>";
48
48
  out += "<form><table id='users_table' class='table table-bordered'>";
49
49
  out += "<input id='pinguser' type='hidden' name='user_id' value='"+name+"' class='input-xlarge' />";
50
- out += "<tr><td>Message:</td><td><input id='pingmessage' type='text' name='message' value='push message' class='input-xlarge' /></td></tr>";
51
- out += "<tr><td>Sources</td><td><input type='text' name='sources' id='sources' value='' class='input-xlarge'/></td></tr>";
52
- out += "<tr><td>Sound</td><td><input id='pingsound' type='text' name='badge' value='welcome.mp3' class='input-medium'/></td></tr>";
53
- out += "<tr><td>Badge</td><td><input id='pingbadge' type='text' name='badge' value='1' class='input-small'/></td></tr>";
54
- out += "<tr><td>Vibrate</td><td><input id='pingvibrate' type='text' name='vibrate' value='2' class='input-small'/>&nbsp;(seconds)</td></tr>"
55
- out += "<tr><td colspan=2><input type='submit' class='btn btn-primary' value='Ping!' /></td></tr>"
50
+ out += "<tr><td>Message:</td><td><input id='pingmessage' type='text' name='message' value='push message' class='input-xlarge' /></td>";
51
+ out += "<td>Message to be displayed in push notification</td></tr>"
52
+ out += "<tr><td>Sources</td><td><input type='text' name='sources' id='sources' value='' class='input-xlarge'/></td>";
53
+ out += "<td>List of sources to be synchronized</td></tr>"
54
+ out += "<tr><td>Sound</td><td><input id='pingsound' type='text' name='badge' value='welcome.mp3' class='input-medium'/></td>";
55
+ out += "<td>allows you to play audio file if it exists on client</td></tr>"
56
+ out += "<tr><td>Badge</td><td><input id='pingbadge' type='text' name='badge' value='1' class='input-small'/></td>";
57
+ out += "<td>Number displayed on device next to app when push notification arrives. Available for iPhone</td></tr>"
58
+ out += "<tr><td>Vibrate</td><td><input id='pingvibrate' type='text' name='vibrate' value='2' class='input-small'/>&nbsp;(seconds)</td>"
59
+ out += "<td>Duration of vibration when push notification is received</td></tr>"
60
+ out += "<tr><td colspan=3><input type='submit' class='btn btn-primary' value='Ping!' /></td></tr>"
56
61
  out += "</table></form>";
57
62
 
58
63
  $(this.el).html(out);
@@ -15,7 +15,7 @@ App.Views.NewUser = Backbone.View.extend({
15
15
 
16
16
  render: function() {
17
17
  $('#secondary-nav').css('display','block');
18
- out = "<div class='page-header well'><h2>New user</h2></div>";
18
+ out = "<div class='page-header'><h2>New user</h2></div>";
19
19
  out += "<div id='newuser-alert' class='alert alert-error' style='display:none'></div>";
20
20
  out += "<form>"
21
21
  out += "<input id='new-login' type='text' name='login' placeholder='login' style='margin:0'/>";
@@ -92,15 +92,17 @@ App.Views.ServerDoc = Backbone.View.extend({
92
92
 
93
93
  render: function(dbkey) {
94
94
  $('#secondary-nav').css('display','block');
95
- out = "<div class='page-header well'><h2>Document&nbsp;"+dbkey+"</h2></div>";
95
+ out = "<div class='page-header'><h2>Document&nbsp;"+dbkey+"</h2>";
96
+ out += "<p>Enter a document key to view the stored values in redis. You can also set and delete data here.</p></div>"
96
97
  out += "<div id='docalert' class='alert alert-error' style='display:none'></div>";
98
+
97
99
  out += "<form id='db_key_form' class='form-horizontal'>";
98
- out += "<input id='input_key' type='text' name='dbkey' value='"+dbkey+"' class='input-xlarge' placeholder='Enter DB key'/>";
100
+ out += "<input id='input_key' type='text' name='dbkey' value='"+dbkey+"' class='input-xlarge' placeholder='Enter document key'/>";
99
101
  out += "<input type='submit' value='Submit' class='btn btn-primary' style='margin-left:10px'><div class='query-status' style='display:inline;margin-left:10px;visibility:hidden'><span class=''></span></div>";
100
102
  out += "</form>";
101
- if(dbkey != ""){
103
+ if(dbkey != ""){
102
104
  out += "<form id='string_s' class='form-horizontal'>";
103
- out += "<input id='data' type='text' name='data' value='' class='input-xlarge' placeholder='Upload String'/>";
105
+ out += "<input id='data' type='text' name='data' value='' class='input-xlarge' placeholder='Enter document value'/>";
104
106
  out += "<input type='submit' value='Submit' class='btn btn-primary' style='margin-left:10px'><div class='upload-status' style='display:inline;margin-left:10px;visibility:hidden'><span class=''></span></div>";
105
107
  out += "</form>";
106
108
  out += "<table id='docdata-table' class='table table-bordered'><tr></tr></table>";
@@ -1,53 +1,53 @@
1
- App.Views.Settings = Backbone.View.extend({
2
-
3
- events: {
4
- "click a#change_admin" : "change_admin",
5
- "click a#api_token" : "api_token",
6
- "click a#backend_app" : "backend_app"
7
- },
8
-
9
- initialize: function() {
10
- this.render();
11
- new App.Views.EditUser()
12
- },
13
-
14
- change_admin: function(){
15
- this.change_tab('change_admin')
16
- new App.Views.EditUser()
17
- },
18
-
19
- api_token: function(){
20
- this.change_tab('api_token')
21
- new App.Views.ApiToken()
22
- },
23
-
24
- backend_app: function(){
25
- this.change_tab('backend_app')
26
- adapter = new Adapter();
27
- new App.Views.SetAdapter({model: adapter })
28
- },
29
-
30
- change_tab: function(tab){
31
- $('#change_admin').parent().attr('class','');
32
- $('#api_token').parent().attr('class','');
33
- $('#backend_app').parent().attr('class','');
34
- $('#'+tab).parent().attr('class','active');
35
- },
36
-
37
- render: function() {
38
- $('#secondary-nav').css('display','block');
39
- out = "<div id='settings-alert' class='alert alert-error' style='display:none'></div>"
40
- out += "<div class='tabs-left'><ul class='nav nav-tabs'>"
41
- out += "<li class='active'><a id='change_admin'>Change Admin Password</a></li>"
42
- out += "<li><a id='api_token'>API Token</a></li>"
43
- out += "<li><a id='backend_app'>Plugin Settings</a></li>"
44
- out += "</ul>"
45
- out += "<div id='settings_main'>"
46
- out += "</div>"
47
- out += "</div></div>"
48
-
49
- $(this.el).html(out);
50
- $('#main_content').html(this.el);
51
- return this
52
- }
53
- });
1
+ // App.Views.Settings = Backbone.View.extend({
2
+ //
3
+ // events: {
4
+ // "click a#change_admin" : "change_admin",
5
+ // "click a#api_token" : "api_token",
6
+ // "click a#backend_app" : "backend_app"
7
+ // },
8
+ //
9
+ // initialize: function() {
10
+ // this.render();
11
+ // new App.Views.EditUser()
12
+ // },
13
+ //
14
+ // change_admin: function(){
15
+ // this.change_tab('change_admin')
16
+ // new App.Views.EditUser()
17
+ // },
18
+ //
19
+ // api_token: function(){
20
+ // this.change_tab('api_token')
21
+ // new App.Views.ApiToken()
22
+ // },
23
+ //
24
+ // backend_app: function(){
25
+ // this.change_tab('backend_app')
26
+ // adapter = new Adapter();
27
+ // new App.Views.SetAdapter({model: adapter })
28
+ // },
29
+ //
30
+ // change_tab: function(tab){
31
+ // $('#change_admin').parent().attr('class','');
32
+ // $('#api_token').parent().attr('class','');
33
+ // $('#backend_app').parent().attr('class','');
34
+ // $('#'+tab).parent().attr('class','active');
35
+ // },
36
+ //
37
+ // render: function() {
38
+ // $('#secondary-nav').css('display','block');
39
+ // out = "<div id='settings-alert' class='alert alert-error' style='display:none'></div>"
40
+ // out += "<div class='tabs-left'><ul class='nav nav-tabs'>"
41
+ // out += "<li class='active'><a id='change_admin'>Change Admin Password</a></li>"
42
+ // out += "<li><a id='api_token'>API Token</a></li>"
43
+ // out += "<li><a id='backend_app'>Plugin Settings</a></li>"
44
+ // out += "</ul>"
45
+ // out += "<div id='settings_main'>"
46
+ // out += "</div>"
47
+ // out += "</div></div>"
48
+ //
49
+ // $(this.el).html(out);
50
+ // $('#main_content').html(this.el);
51
+ // return this
52
+ // }
53
+ // });
@@ -44,7 +44,7 @@ App.Views.ShowDevice = Backbone.View.extend({
44
44
 
45
45
  render: function(device_id) {
46
46
  $('#secondary-nav').css('display','block');
47
- out = "<div class='page-header well'><span style='font-size:24px;line-height:36px;font-weight:bold'>Device: "+device_id+"</span>";
47
+ out = "<div class='page-header'><span style='font-size:24px;line-height:36px;font-weight:bold'>Device: "+device_id+"</span>";
48
48
  out += "<span class='pull-right'><a id='delete-device' class='btn btn-danger'>Delete Device</a></span></div>";
49
49
  out += "<div id='showdevice-alert' class='alert alert-error' style='display:none'></div>";
50
50
  out += "<table id='deviceattr-table' class='table table-bordered'>";
@@ -10,7 +10,7 @@ App.Views.ShowUser = Backbone.View.extend({
10
10
  client = new Client();
11
11
  client.get_clients(name);
12
12
  source = new Source();
13
- source.set('partition_type','user');
13
+ source.set('partition_type','all');
14
14
  source.set('user_id',name);
15
15
  source.set('doctype','source');
16
16
  source.fetch();
@@ -23,7 +23,7 @@ App.Views.ShowUser = Backbone.View.extend({
23
23
 
24
24
  render: function(name) {
25
25
  $('#secondary-nav').css('display','block');
26
- out = "<div class='page-header well'><div style='font-size:24px;font-weight:bold;display:inline'>User: "+name+"</div><div class='pull-right' style='display:inline'>";
26
+ out = "<div class='page-header'><div style='font-size:24px;font-weight:bold;display:inline'>User: "+name+"</div><div class='pull-right' style='display:inline'>";
27
27
  out += "<a id='delete-user' class='btn btn-danger'>Delete User</a><a href='#user/newping/"+name+"' class='btn' style='margin-left:10px'>Ping User</a></div></div>";
28
28
  out += "<div id='showuser-alert' class='alert alert-error' style='display:none'></div>";
29
29
  out += "<table id='source-table' class='table table-bordered'>";
@@ -18,13 +18,14 @@ App.Views.SourceDocs = Backbone.View.extend({
18
18
 
19
19
  render: function(source_id) {
20
20
  $('#secondary-nav').css('display','block');
21
- out = "<div class='page-header well'><h1>"+source_id+"</h1></div>";
21
+ out = "<div class='page-header'><h1>"+source_id+"</h1></div>";
22
22
  out += "<div class='docalert alert-error' style='display:none'></div>";
23
- out += "<table id='sourceparams-table' class='table table-bordered'><thead><tr><th><h3>Attributes</h3></th></tr></thead>";
24
- out += "<tr class='remove-tr-src'><td colspan='2' style='text-align:center'>Loading...</td></tr>"
23
+ out += "<table id='sourceparams-table' class='table table-bordered'><thead><tr><th><h3>Attributes</h3></th>";
24
+ out += "<td>Attributes for source adapter. <a href='http://docs.rhomobile.com/rhoconnect/source-adapters' target='_blank'>Read more</a></td></tr></thead>"
25
+ out += "<tr class='remove-tr-src'><td colspan='2' style='text-align:center'>Loading...</td></tr>";
25
26
  out += "</table>";
26
- out += "<table id='sourcedocs-table' class='table table-bordered'><tr><th class='span5'><h3>Documents</h3></th></tr>";
27
- out += "<tr class='remove-tr-docs'><td colspan='2' style='text-align:center'>Loading...</td></tr>"
27
+ out += "<table id='sourcedocs-table' class='table table-bordered'><tr><th class='span5'><h3>Documents</h3></th><td>Redis documents for source adapter. <a href='http://docs.rhomobile.com/rhoconnect/source-adapters#data-partitioning' target='_blank'>Read more</a></td></tr>";
28
+ out += "<tr class='remove-tr-docs'><td colspan='2' style='text-align:center'>Loading...</td></tr>";
28
29
  out += "</table>";
29
30
  $(this.el).html(out);
30
31
  $('#main_content').html(this.el);