rhoconnect 3.3.1.beta4 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -137,7 +137,7 @@ module Rhoconnect
137
137
  sources_refs.each do |source_name,ref|
138
138
  s = ref[:source]
139
139
  stmt.execute(s.source_id,s.name,s.priority,s.partition_type.to_s,
140
- s.sync_type.to_s,refs_to_s(ref[:refs]),s.get_value(:metadata),s.schema,s.blob_attribs,s.has_many,s.get_value(:md_size),s.read_state.refresh_time)
140
+ s.sync_type.to_s,refs_to_s(ref[:refs]),s.get_value(:metadata),s.schema,s.blob_attribs,s.has_many,s.get_value(:md_size).to_i,s.read_state.refresh_time)
141
141
  end
142
142
  end
143
143
  end
@@ -154,7 +154,7 @@ module Rhoconnect
154
154
  db.execute_batch(File.open(schema,'r').read)
155
155
 
156
156
  src_counter = 1
157
- bulk_data.sources[0, -1].each do |source_name|
157
+ bulk_data.partition_sources[0, -1].each do |source_name|
158
158
  timer = start_timer("start importing sqlite data for #{source_name}")
159
159
  source = Source.load(source_name,{:app_id => bulk_data.app_id,
160
160
  :user_id => bulk_data.user_id})
@@ -250,7 +250,7 @@ _INSTALL_ASYNC_GEMS
250
250
  puts warning_for_async_gems
251
251
  end
252
252
  else
253
- settings.use_async_model = false
253
+ set :use_async_model, false
254
254
  end
255
255
  end
256
256
 
@@ -1,3 +1,3 @@
1
1
  module Rhoconnect
2
- VERSION = '3.3.1.beta4'
2
+ VERSION = '3.3.1'
3
3
  end
@@ -4,6 +4,51 @@ var Stats = Backbone.Model.extend({
4
4
  var session = new Session();
5
5
  this.set('api_token', session.getApiKey())
6
6
  },
7
+
8
+ get_sources: function(){
9
+ session = new Session();
10
+ $.ajax({
11
+ type: 'GET',
12
+ url: 'get_sources',
13
+ data: {api_token : session.getApiKey()},
14
+ success: function(resp){
15
+ r = JSON.parse(resp)
16
+ var list = "";
17
+ var list2 = "";
18
+ $.each(r, function(index,value){
19
+ list += "<div class='accordion-inner'><a id='"+value+"' class='http_timing'>- "+value+"</a></div>";
20
+ list2 += "<div class='accordion-inner'><a id='"+value+"m' class='source_timing_display'>- "+value+"</a></div>";
21
+ })
22
+ $("#collapseTwo").append(list);
23
+ $("#collapseThree").append(list2);
24
+ },
25
+ error: function(resp){
26
+ $("#collapseTwo").after("<li>No Adapters Available</li>")
27
+ $("#collapseThree").after("<li>No Adapters Available</li>")
28
+ }
29
+ })
30
+ },
31
+
32
+ get_http_routes: function(){
33
+ session = new Session();
34
+ $.ajax({
35
+ type: 'GET',
36
+ url: 'get_http_routes',
37
+ data: {api_token : session.getApiKey()},
38
+ success: function(resp){
39
+ r = JSON.parse(resp)
40
+ var list = "";
41
+ $.each(r, function(index,value){
42
+ value
43
+ list += "<div class='accordion-inner'><a id='"+value+"' class='http_timing_key'>- "+value+"</a></div>";
44
+ })
45
+ $("#collapseFour").append(list);
46
+ },
47
+ error: function(resp){
48
+ $("#collapseFour").after("<li>No Routes Available</li>")
49
+ }
50
+ })
51
+ },
7
52
 
8
53
  user_stats: function(){
9
54
  session = new Session();
@@ -43,12 +88,12 @@ var Stats = Backbone.Model.extend({
43
88
  })
44
89
  },
45
90
 
46
- source_timing: function(display_name){
91
+ source_timing: function(display_name,key){
47
92
  session = new Session();
48
93
  $.ajax({
49
94
  type: 'POST',
50
95
  url: 'source_timing',
51
- data: {api_token : session.getApiKey(),display_name : display_name},
96
+ data: {api_token : session.getApiKey(),display_name : display_name, key : key},
52
97
  success: function(resp){
53
98
  $('#stats_main').html(resp);
54
99
  },
@@ -79,6 +124,25 @@ var Stats = Backbone.Model.extend({
79
124
  $('#stats-alert').css('display','block');
80
125
  }
81
126
  })
127
+ },
128
+
129
+ http_timing_key: function(display_name){
130
+ session = new Session();
131
+ $.ajax({
132
+ type: 'POST',
133
+ url: 'http_timing_key',
134
+ data: {api_token : session.getApiKey(),display_name : display_name},
135
+ success: function(resp){
136
+ $('#stats_main').html(resp);
137
+ },
138
+ error: function(resp){
139
+ if(resp.status == 422){
140
+ new App.Views.Index()
141
+ }
142
+ $('#stats-alert')[0].innerHTML = "No Data Available";
143
+ $('#stats-alert').css('display','block');
144
+ }
145
+ })
82
146
  }
83
147
 
84
148
  })
@@ -0,0 +1,157 @@
1
+ /* =============================================================
2
+ * bootstrap-collapse.js v2.0.4
3
+ * http://twitter.github.com/bootstrap/javascript.html#collapse
4
+ * =============================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ============================================================ */
19
+
20
+
21
+ !function ($) {
22
+
23
+ "use strict"; // jshint ;_;
24
+
25
+
26
+ /* COLLAPSE PUBLIC CLASS DEFINITION
27
+ * ================================ */
28
+
29
+ var Collapse = function (element, options) {
30
+ this.$element = $(element)
31
+ this.options = $.extend({}, $.fn.collapse.defaults, options)
32
+
33
+ if (this.options.parent) {
34
+ this.$parent = $(this.options.parent)
35
+ }
36
+
37
+ this.options.toggle && this.toggle()
38
+ }
39
+
40
+ Collapse.prototype = {
41
+
42
+ constructor: Collapse
43
+
44
+ , dimension: function () {
45
+ var hasWidth = this.$element.hasClass('width')
46
+ return hasWidth ? 'width' : 'height'
47
+ }
48
+
49
+ , show: function () {
50
+ var dimension
51
+ , scroll
52
+ , actives
53
+ , hasData
54
+
55
+ if (this.transitioning) return
56
+
57
+ dimension = this.dimension()
58
+ scroll = $.camelCase(['scroll', dimension].join('-'))
59
+ actives = this.$parent && this.$parent.find('> .accordion-group > .in')
60
+
61
+ if (actives && actives.length) {
62
+ hasData = actives.data('collapse')
63
+ if (hasData && hasData.transitioning) return
64
+ actives.collapse('hide')
65
+ hasData || actives.data('collapse', null)
66
+ }
67
+
68
+ this.$element[dimension](0)
69
+ this.transition('addClass', $.Event('show'), 'shown')
70
+ this.$element[dimension](this.$element[0][scroll])
71
+ }
72
+
73
+ , hide: function () {
74
+ var dimension
75
+ if (this.transitioning) return
76
+ dimension = this.dimension()
77
+ this.reset(this.$element[dimension]())
78
+ this.transition('removeClass', $.Event('hide'), 'hidden')
79
+ this.$element[dimension](0)
80
+ }
81
+
82
+ , reset: function (size) {
83
+ var dimension = this.dimension()
84
+
85
+ this.$element
86
+ .removeClass('collapse')
87
+ [dimension](size || 'auto')
88
+ [0].offsetWidth
89
+
90
+ this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
91
+
92
+ return this
93
+ }
94
+
95
+ , transition: function (method, startEvent, completeEvent) {
96
+ var that = this
97
+ , complete = function () {
98
+ if (startEvent.type == 'show') that.reset()
99
+ that.transitioning = 0
100
+ that.$element.trigger(completeEvent)
101
+ }
102
+
103
+ this.$element.trigger(startEvent)
104
+
105
+ if (startEvent.isDefaultPrevented()) return
106
+
107
+ this.transitioning = 1
108
+
109
+ this.$element[method]('in')
110
+
111
+ $.support.transition && this.$element.hasClass('collapse') ?
112
+ this.$element.one($.support.transition.end, complete) :
113
+ complete()
114
+ }
115
+
116
+ , toggle: function () {
117
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
118
+ }
119
+
120
+ }
121
+
122
+
123
+ /* COLLAPSIBLE PLUGIN DEFINITION
124
+ * ============================== */
125
+
126
+ $.fn.collapse = function (option) {
127
+ return this.each(function () {
128
+ var $this = $(this)
129
+ , data = $this.data('collapse')
130
+ , options = typeof option == 'object' && option
131
+ if (!data) $this.data('collapse', (data = new Collapse(this, options)))
132
+ if (typeof option == 'string') data[option]()
133
+ })
134
+ }
135
+
136
+ $.fn.collapse.defaults = {
137
+ toggle: true
138
+ }
139
+
140
+ $.fn.collapse.Constructor = Collapse
141
+
142
+
143
+ /* COLLAPSIBLE DATA-API
144
+ * ==================== */
145
+
146
+ $(function () {
147
+ $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
148
+ var $this = $(this), href
149
+ , target = $this.attr('data-target')
150
+ || e.preventDefault()
151
+ || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
152
+ , option = $(target).data('collapse') ? 'toggle' : $this.data()
153
+ $(target).collapse(option)
154
+ })
155
+ })
156
+
157
+ }(window.jQuery);