rjack-solr 4.1.0.0-java → 4.2.1.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/History.rdoc +5 -0
  2. data/Manifest.txt +7 -3
  3. data/Rakefile +1 -0
  4. data/init/rjack-solr +1 -1
  5. data/lib/rjack-solr/base.rb +1 -1
  6. data/lib/rjack-solr/org.restlet-2.1.1.jar +0 -0
  7. data/lib/rjack-solr/org.restlet.ext.servlet-2.1.1.jar +0 -0
  8. data/lib/rjack-solr/solr-core-4.2.1.jar +0 -0
  9. data/lib/rjack-solr/{solr-solrj-4.1.0.jar → solr-solrj-4.2.1.jar} +0 -0
  10. data/pom.xml +2 -2
  11. data/webapp/META-INF/MANIFEST.MF +3 -3
  12. data/webapp/META-INF/NOTICE.txt +12 -0
  13. data/webapp/WEB-INF/web.xml +14 -0
  14. data/webapp/admin.html +6 -2
  15. data/webapp/css/styles/analysis.css +2 -3
  16. data/webapp/css/styles/cloud.css +52 -0
  17. data/webapp/css/styles/common.css +1 -7
  18. data/webapp/css/styles/index.css +0 -5
  19. data/webapp/css/styles/menu.css +43 -30
  20. data/webapp/css/styles/schema-browser.css +99 -28
  21. data/webapp/img/ico/home.png +0 -0
  22. data/webapp/js/main.js +0 -1
  23. data/webapp/js/scripts/analysis.js +8 -5
  24. data/webapp/js/scripts/app.js +153 -37
  25. data/webapp/js/scripts/cores.js +1 -7
  26. data/webapp/js/scripts/dataimport.js +3 -8
  27. data/webapp/js/scripts/index.js +39 -32
  28. data/webapp/js/scripts/java-properties.js +1 -1
  29. data/webapp/js/scripts/logging.js +2 -2
  30. data/webapp/js/scripts/ping.js +1 -1
  31. data/webapp/js/scripts/plugins.js +2 -6
  32. data/webapp/js/scripts/query.js +2 -2
  33. data/webapp/js/scripts/schema-browser.js +148 -148
  34. data/webapp/js/scripts/threads.js +1 -1
  35. data/webapp/tpl/analysis.html +1 -1
  36. data/webapp/tpl/cloud.html +11 -0
  37. data/webapp/tpl/schema-browser.html +19 -11
  38. metadata +21 -13
  39. data/lib/rjack-solr/solr-core-4.1.0.jar +0 -0
  40. data/webapp/js/lib/jquery.sparkline.js +0 -1271
@@ -20,12 +20,6 @@ sammy.bind
20
20
  'cores_load_data',
21
21
  function( event, params )
22
22
  {
23
- if( app.cores_data )
24
- {
25
- params.callback( app.cores_data );
26
- return true;
27
- }
28
-
29
23
  $.ajax
30
24
  (
31
25
  {
@@ -335,7 +329,7 @@ sammy.get
335
329
  .ajaxForm
336
330
  (
337
331
  {
338
- url : app.config.solr_path + app.config.core_admin_path + '?wt=json',
332
+ url : app.config.solr_path + app.config.core_admin_path + '?wt=json&indexInfo=false',
339
333
  dataType : 'json',
340
334
  beforeSubmit : function( array, form, options )
341
335
  {
@@ -440,11 +440,6 @@ sammy.get
440
440
  var messages_count = 0;
441
441
  for( var key in messages ) { messages_count++; }
442
442
 
443
- var format_number = function format_number( number )
444
- {
445
- return ( number || 0 ).toString().replace( /\B(?=(\d{3})+(?!\d))/g, '\'' );
446
- };
447
-
448
443
  function dataimport_compute_details( response, details_element, elapsed_seconds )
449
444
  {
450
445
  details_element
@@ -464,10 +459,10 @@ sammy.get
464
459
  {
465
460
  var value = parseInt( response.statusMessages[document_config[key]], 10 );
466
461
 
467
- var detail = '<abbr title="' + document_config[key].esc() + '">' + key.esc() + '</abbr>: ' + format_number( value ).esc();
462
+ var detail = '<abbr title="' + document_config[key].esc() + '">' + key.esc() + '</abbr>: ' + app.format_number( value ).esc();
468
463
  if( elapsed_seconds && 'skipped' !== key.toLowerCase() )
469
464
  {
470
- detail += ' <span>(' + format_number( Math.round( value / elapsed_seconds ) ).esc() + '/s)</span>'
465
+ detail += ' <span>(' + app.format_number( Math.round( value / elapsed_seconds ) ).esc() + '/s)</span>'
471
466
  }
472
467
 
473
468
  document_details.push( detail );
@@ -523,7 +518,7 @@ sammy.get
523
518
  /\d{4,}/g,
524
519
  function( match, position, string )
525
520
  {
526
- return format_number( parseInt( match, 10 ) );
521
+ return app.format_number( parseInt( match, 10 ) );
527
522
  }
528
523
  );
529
524
 
@@ -97,8 +97,8 @@ var system_info = function( element, system_data )
97
97
  {
98
98
  // -- usage
99
99
 
100
- var load_average = ( system_data['system']['uptime'] || '' ).match( /load average: (.+)/ );
101
- if( load_average && load_average[1] )
100
+ var load_average = ( system_data['system']['uptime'] || '' ).match( /load averages?: (\d+[.,]\d\d),? (\d+[.,]\d\d),? (\d+[.,]\d\d)/ );
101
+ if( load_average )
102
102
  {
103
103
  var hl = $( '#system h2', element );
104
104
 
@@ -106,20 +106,20 @@ var system_info = function( element, system_data )
106
106
  .remove();
107
107
 
108
108
  hl
109
- .append( ' <small class="bar-desc">' + load_average[1].split( ', ' ).join( ' ' ).esc() + '</small>' );
109
+ .append( ' <small class="bar-desc">' + load_average.slice( 1 ).join( ' ' ).replace( /,/g, '.' ).esc() + '</small>' );
110
110
  }
111
111
 
112
112
  // -- physical-memory-bar
113
113
 
114
114
  var bar_holder = $( '#physical-memory-bar', element );
115
- if( !system_data['system']['totalPhysicalMemorySize'] )
115
+ if( system_data['system']['totalPhysicalMemorySize'] === undefined || system_data['system']['freePhysicalMemorySize'] === undefined )
116
116
  {
117
117
  bar_holder.hide();
118
118
  }
119
119
  else
120
120
  {
121
121
  bar_holder.show();
122
-
122
+
123
123
  var bar_data = {
124
124
  'max' : parse_memory_value( system_data['system']['totalPhysicalMemorySize'] ),
125
125
  'total' : parse_memory_value( system_data['system']['totalPhysicalMemorySize'] - system_data['system']['freePhysicalMemorySize'] )
@@ -131,7 +131,7 @@ var system_info = function( element, system_data )
131
131
  // -- swap-space-bar
132
132
 
133
133
  var bar_holder = $( '#swap-space-bar', element );
134
- if( !system_data['system']['totalSwapSpaceSize'] )
134
+ if( system_data['system']['totalSwapSpaceSize'] === undefined || system_data['system']['freeSwapSpaceSize'] === undefined )
135
135
  {
136
136
  bar_holder.hide();
137
137
  }
@@ -147,10 +147,10 @@ var system_info = function( element, system_data )
147
147
  generate_bar( bar_holder, bar_data, true );
148
148
  }
149
149
 
150
- // -- swap-space-bar
150
+ // -- file-descriptor-bar
151
151
 
152
152
  var bar_holder = $( '#file-descriptor-bar', element );
153
- if( !system_data['system']['maxFileDescriptorCount'] )
153
+ if( system_data['system']['maxFileDescriptorCount'] === undefined || system_data['system']['openFileDescriptorCount'] === undefined )
154
154
  {
155
155
  bar_holder.hide();
156
156
  }
@@ -172,32 +172,42 @@ var system_info = function( element, system_data )
172
172
 
173
173
  // -- memory-bar
174
174
 
175
- var jvm_memory = $.extend
176
- (
177
- {
178
- 'free' : null,
179
- 'total' : null,
180
- 'max' : null,
181
- 'used' : null,
182
- 'raw' : {
175
+ var bar_holder = $( '#jvm-memory-bar', element );
176
+ if( system_data['jvm']['memory'] === undefined )
177
+ {
178
+ bar_holder.hide();
179
+ }
180
+ else
181
+ {
182
+ bar_holder.show();
183
+
184
+ var jvm_memory = $.extend
185
+ (
186
+ {
183
187
  'free' : null,
184
188
  'total' : null,
185
189
  'max' : null,
186
190
  'used' : null,
187
- 'used%' : null
188
- }
189
- },
190
- system_data['jvm']['memory']
191
- );
192
-
193
- var bar_holder = $( '#jvm-memory-bar', element );
194
- var bar_data = {
195
- 'max' : parse_memory_value( jvm_memory['raw']['max'] || jvm_memory['max'] ),
196
- 'total' : parse_memory_value( jvm_memory['raw']['total'] || jvm_memory['total'] ),
197
- 'used' : parse_memory_value( jvm_memory['raw']['used'] || jvm_memory['used'] )
198
- };
191
+ 'raw' : {
192
+ 'free' : null,
193
+ 'total' : null,
194
+ 'max' : null,
195
+ 'used' : null,
196
+ 'used%' : null
197
+ }
198
+ },
199
+ system_data['jvm']['memory']
200
+ );
201
+
202
+ var bar_data = {
203
+ 'max' : parse_memory_value( jvm_memory['raw']['max'] || jvm_memory['max'] ),
204
+ 'total' : parse_memory_value( jvm_memory['raw']['total'] || jvm_memory['total'] ),
205
+ 'used' : parse_memory_value( jvm_memory['raw']['used'] || jvm_memory['used'] )
206
+ };
207
+
208
+ generate_bar( bar_holder, bar_data, true );
209
+ }
199
210
 
200
- generate_bar( bar_holder, bar_data, true );
201
211
  }
202
212
 
203
213
  // #/
@@ -208,9 +218,6 @@ sammy.get
208
218
  {
209
219
  var content_element = $( '#content' );
210
220
 
211
- $( '#menu-wrapper #index' )
212
- .addClass( 'active' );
213
-
214
221
  content_element
215
222
  .html( '<div id="index"></div>' );
216
223
 
@@ -21,7 +21,7 @@ sammy.get
21
21
  /^#\/(~java-properties)$/,
22
22
  function( context )
23
23
  {
24
- var core_basepath = $( 'li[data-basepath]', app.menu_element ).attr( 'data-basepath' );
24
+ var core_basepath = $( '[data-basepath]', app.menu_element ).attr( 'data-basepath' );
25
25
  var content_element = $( '#content' );
26
26
 
27
27
  content_element
@@ -406,7 +406,7 @@ sammy.get
406
406
  /^#\/(~logging)$/,
407
407
  function( context )
408
408
  {
409
- var core_basepath = $( 'li[data-basepath]', app.menu_element ).attr( 'data-basepath' );
409
+ var core_basepath = $( '[data-basepath]', app.menu_element ).attr( 'data-basepath' );
410
410
  loglevel_path = core_basepath + '/admin/logging';
411
411
  var content_element = $( '#content' );
412
412
 
@@ -492,7 +492,7 @@ sammy.get
492
492
  /^#\/(~logging)\/level$/,
493
493
  function( context )
494
494
  {
495
- var core_basepath = $( 'li[data-basepath]', app.menu_element ).attr( 'data-basepath' );
495
+ var core_basepath = $( '[data-basepath]', app.menu_element ).attr( 'data-basepath' );
496
496
  loglevel_path = core_basepath + '/admin/logging';
497
497
  var content_element = $( '#content' );
498
498
 
@@ -15,7 +15,7 @@
15
15
  limitations under the License.
16
16
  */
17
17
 
18
- $( '.ping a', app.menu_element )
18
+ $( '.ping a', app.core_menu )
19
19
  .live
20
20
  (
21
21
  'click',
@@ -254,12 +254,8 @@ var render_plugin_data = function( plugin_data, plugin_sort, types )
254
254
 
255
255
  for( var stats_key in details[detail_key] )
256
256
  {
257
- var stats_value = details[detail_key][stats_key];
258
-
259
- if( 'readerDir' === stats_key )
260
- {
261
- stats_value = stats_value.replace( /@/g, '@&#8203;' );
262
- }
257
+ var stats_value = new String( details[detail_key][stats_key] );
258
+ stats_value = stats_value.replace( /([\(@])/g, '$1&#8203;' );
263
259
 
264
260
  content += '<li><dl class="clearfix">' + "\n";
265
261
  content += '<dt>' + stats_key + ':</dt>' + "\n";
@@ -130,7 +130,7 @@ sammy.get
130
130
 
131
131
  var fieldsets = $( '> fieldset', query_form );
132
132
 
133
- var fields = fieldsets.first().formToArray();
133
+ var fields = fieldsets.first().formToArray( true );
134
134
  add_to_form_values( fields );
135
135
 
136
136
  fieldsets.not( '.common' )
@@ -140,7 +140,7 @@ sammy.get
140
140
  {
141
141
  if( $( 'legend input', set ).is( ':checked' ) )
142
142
  {
143
- var fields = $( set ).formToArray();
143
+ var fields = $( set ).formToArray( true );
144
144
  add_to_form_values( fields );
145
145
  }
146
146
  }
@@ -66,9 +66,7 @@ var load_terminfo = function( trigger_element, core_basepath, field, data_elemen
66
66
  },
67
67
  success : function( response, text_status, xhr )
68
68
  {
69
- $( 'span', trigger_element )
70
- .removeClass( 'loader' );
71
-
69
+ var additional_styles = [];
72
70
  var field_data = response.fields[field];
73
71
 
74
72
  if( !field_data || !( field_data.topTerms && field_data.histogram ) )
@@ -79,6 +77,11 @@ var load_terminfo = function( trigger_element, core_basepath, field, data_elemen
79
77
  return false;
80
78
  }
81
79
 
80
+ var get_width = function get_width()
81
+ {
82
+ return $( this ).width();
83
+ }
84
+
82
85
  var topterms_holder_element = $( '.topterms-holder', data_element );
83
86
  var histogram_holder_element = $( '.histogram-holder', data_element );
84
87
 
@@ -111,7 +114,7 @@ var load_terminfo = function( trigger_element, core_basepath, field, data_elemen
111
114
 
112
115
  topterms_frq_last = topterms[i+1];
113
116
  topterms_content += '<li class="clearfix">'
114
- + '<p><span>' + topterms_frq_last.esc() + '</span></p>' + "\n"
117
+ + '<p><span>' + app.format_number( topterms_frq_last ) + '</span></p>' + "\n"
115
118
  + '<ul>' + "\n";
116
119
  }
117
120
 
@@ -129,6 +132,13 @@ var load_terminfo = function( trigger_element, core_basepath, field, data_elemen
129
132
  topterms_table_element
130
133
  .html( topterms_content );
131
134
 
135
+ var max_width = 10 + Math.max.apply( Math, $( 'p', topterms_table_element ).map( get_width ).get() );
136
+ additional_styles.push
137
+ (
138
+ topterms_table_element.selector + ' p { width: ' + max_width + 'px !important; }' + "\n" +
139
+ topterms_table_element.selector + ' ul { margin-left: ' + ( max_width + 5 ) + 'px !important; }'
140
+ );
141
+
132
142
  topterms_count_element
133
143
  .val( topterms_count );
134
144
 
@@ -152,52 +162,57 @@ var load_terminfo = function( trigger_element, core_basepath, field, data_elemen
152
162
  histogram_holder_element
153
163
  .show();
154
164
 
155
- var histogram_element = $( '.histogram', histogram_holder_element );
156
-
157
165
  var histogram_values = luke_array_to_hash( field_data.histogram );
158
- var histogram_legend = '';
159
-
160
- histogram_holder_element
161
- .show();
162
-
166
+ var histogram_entries = [];
167
+
168
+ var histogram_max = null;
163
169
  for( var key in histogram_values )
164
170
  {
165
- histogram_legend += '<dt><span>' + key + '</span></dt>' + "\n" +
166
- '<dd title="' + key + '">' +
167
- '<span>' + histogram_values[key] + '</span>' +
168
- '</dd>' + "\n";
171
+ histogram_max = Math.max( histogram_max, histogram_values[key] );
169
172
  }
170
173
 
171
- $( 'dl', histogram_holder_element )
172
- .html( histogram_legend );
173
-
174
- var histogram_values = luke_array_to_struct( field_data.histogram ).values;
175
-
176
- histogram_element
177
- .sparkline
174
+ for( var key in histogram_values )
175
+ {
176
+ histogram_entries.push
178
177
  (
179
- histogram_values,
180
- {
181
- type : 'bar',
182
- barColor : '#c0c0c0',
183
- zeroColor : '#000000',
184
- height : histogram_element.height(),
185
- barWidth : 46,
186
- barSpacing : 3
187
- }
178
+ '<li>' + "\n" +
179
+ ' <dl class="clearfix" style="width: ' + ( ( histogram_values[key] / histogram_max ) * 100 ) + '%;">' + "\n" +
180
+ ' <dt><span>' + app.format_number( key ) + '</span></dt>' + "\n" +
181
+ ' <dd><span>' + app.format_number( histogram_values[key] ) + '</span></dd>' + "\n" +
182
+ ' </dl>' + "\n" +
183
+ '</li>'
188
184
  );
185
+ }
186
+
187
+ $( 'ul', histogram_holder_element )
188
+ .html( histogram_entries.join( "\n" ) );
189
+
190
+ $( 'ul li:even', histogram_holder_element )
191
+ .addClass( 'odd' );
189
192
 
190
- 1 === histogram_values.length
191
- ? histogram_element.addClass( 'single' )
192
- : histogram_element.removeClass( 'single' );
193
+ var max_width = 10 + Math.max.apply( Math, $( 'dt', histogram_holder_element ).map( get_width ).get() );
194
+ additional_styles.push
195
+ (
196
+ histogram_holder_element.selector + ' ul { margin-left: ' + max_width + 'px !important; }' + "\n" +
197
+ histogram_holder_element.selector + ' li dt { left: ' + ( max_width * -1 ) + 'px !important; width: ' + max_width + 'px !important; }'
198
+ );
193
199
  }
194
200
 
201
+ if( additional_styles )
202
+ {
203
+ terminfo_element
204
+ .prepend( '<style type="text/css">' + additional_styles.join( "\n" ) + '</style>' );
205
+ }
195
206
  },
196
207
  error : function( xhr, text_status, error_thrown)
197
208
  {
209
+ terminfo_element
210
+ .addClass( 'disabled' );
198
211
  },
199
212
  complete : function( xhr, text_status )
200
213
  {
214
+ $( 'span', trigger_element )
215
+ .removeClass( 'loader' );
201
216
  }
202
217
  }
203
218
  );
@@ -213,7 +228,7 @@ sammy.bind
213
228
  var related_select_element = $( '#related select', params.schema_browser_element )
214
229
  var type = 'index';
215
230
 
216
- var sammy_basepath = '#/' + $( 'p a', params.active_core ).html() + '/schema-browser';
231
+ var sammy_basepath = app.core_menu.find( '.active a' ).attr( 'href' );
217
232
 
218
233
  if( !related_navigation_meta.hasClass( 'done' ) )
219
234
  {
@@ -625,7 +640,7 @@ sammy.bind
625
640
  }
626
641
 
627
642
  related_select_element
628
- .attr( 'rel', '#/' + $( 'p a', params.active_core ).html() + '/schema-browser' )
643
+ .attr( 'rel', app.core_menu.find( '.active a' ).attr( 'href' ) )
629
644
  .append( related_options )
630
645
  .chosen();
631
646
 
@@ -713,52 +728,6 @@ sammy.get
713
728
  data_element
714
729
  .show();
715
730
 
716
- var keystring_to_list = function( keystring, element_class )
717
- {
718
- var key_list = keystring.replace( /-/g, '' ).split( '' );
719
- var list = [];
720
-
721
- for( var i in key_list )
722
- {
723
- var option_key = schema_browser_data.key[key_list[i]];
724
-
725
- if( !option_key )
726
- {
727
- option_key = schema_browser_data.key[key_list[i].toLowerCase()];
728
- }
729
-
730
- if( !option_key )
731
- {
732
- option_key = schema_browser_data.key[key_list[i].toUpperCase()];
733
- }
734
-
735
- if( option_key )
736
- {
737
- list.push
738
- (
739
- '<dd ' + ( element_class ? ' class="' + element_class + '"' : '' ) + '>' +
740
- option_key +
741
- ',</dd>'
742
- );
743
- }
744
- }
745
-
746
- list[list.length-1] = list[key_list.length-1].replace( /,/, '' );
747
-
748
- return list;
749
- }
750
-
751
- var flags = null;
752
-
753
- if( is_f && schema_browser_data.fields[field] && schema_browser_data.fields[field].flags )
754
- {
755
- flags = schema_browser_data.fields[field].flags;
756
- }
757
- else if( is_df && schema_browser_data.dynamic_fields[field] && schema_browser_data.dynamic_fields[field].flags )
758
- {
759
- flags = schema_browser_data.dynamic_fields[field].flags;
760
- }
761
-
762
731
  // -- head
763
732
 
764
733
  var head_element = $( '.head', data_element );
@@ -786,72 +755,6 @@ sammy.get
786
755
  $( '.partial', data_element )
787
756
  .toggle( partial_state );
788
757
 
789
- // -- properties
790
- var properties_element = $( 'dt.properties', options_element );
791
- if( flags )
792
- {
793
- var properties_keys = keystring_to_list( flags, 'properties' );
794
-
795
- $( 'dd.properties', options_element )
796
- .remove();
797
-
798
- properties_element
799
- .show()
800
- .after( properties_keys.join( "\n" ) );
801
- }
802
- else
803
- {
804
- $( '.properties', options_element )
805
- .hide();
806
- }
807
-
808
- // -- schema
809
- var schema_element = $( 'dt.schema', options_element );
810
- if( is_f && schema_browser_data.fields[field] && schema_browser_data.fields[field].schema )
811
- {
812
- var schema_keys = keystring_to_list( schema_browser_data.fields[field].schema, 'schema' );
813
-
814
- $( 'dd.schema', options_element )
815
- .remove();
816
-
817
- schema_element
818
- .show()
819
- .after( schema_keys.join( "\n" ) );
820
- }
821
- else
822
- {
823
- $( '.schema', options_element )
824
- .hide();
825
- }
826
-
827
- // -- index
828
- var index_element = $( 'dt.index', options_element );
829
- if( is_f && schema_browser_data.fields[field] && schema_browser_data.fields[field].index )
830
- {
831
- var index_keys = [];
832
-
833
- if( 0 === schema_browser_data.fields[field].index.indexOf( '(' ) )
834
- {
835
- index_keys.push( '<dd class="index">' + schema_browser_data.fields[field].index + '</dd>' );
836
- }
837
- else
838
- {
839
- index_keys = keystring_to_list( schema_browser_data.fields[field].index, 'index' );
840
- }
841
-
842
- $( 'dd.index', options_element )
843
- .remove();
844
-
845
- index_element
846
- .show()
847
- .after( index_keys.join( "\n" ) );
848
- }
849
- else
850
- {
851
- $( '.index', options_element )
852
- .hide();
853
- }
854
-
855
758
  // -- docs
856
759
  var docs_element = $( 'dt.docs', options_element );
857
760
  if( is_f && schema_browser_data.fields[field] && schema_browser_data.fields[field].docs )
@@ -920,6 +823,103 @@ sammy.get
920
823
  $( '.similarity', options_element ).hide();
921
824
  }
922
825
 
826
+
827
+ // -- flags table
828
+ var flags_table = $( 'table.flags', data_element );
829
+
830
+ var flags_arr = [];
831
+ for( var key in schema_browser_data.key )
832
+ {
833
+ flags_arr.push( '<th data-key="' + key + '">' + schema_browser_data.key[key] + '</th>' );
834
+ }
835
+
836
+ $( 'thead tr', flags_table )
837
+ .append( flags_arr.join( "\n" ) );
838
+
839
+
840
+ var flags_body = $( 'tbody', flags_table );
841
+ flags_body.empty();
842
+
843
+ var generate_flags_row = function generate_flags_row( flags_str, title )
844
+ {
845
+ var flags_arr = [ '<th>' + title.esc() + '</th>' ];
846
+
847
+ if( 0 === flags_str.indexOf( '(' ) )
848
+ {
849
+ flags_arr.push( '<td colspan="2" class="text">' + flags_str + '</td>' );
850
+ }
851
+ else
852
+ {
853
+ var i = 0;
854
+ for( var key in schema_browser_data.key )
855
+ {
856
+ var flag_match = key === flags_str[i];
857
+
858
+ var flag_cell = '<td '
859
+ + ' data-key="' + key + '"'
860
+ + ' class="' + ( flag_match ? 'check' : '' ) + '"'
861
+ + '>'
862
+ + ( flag_match ? '<span>√</span>' : '&nbsp;' )
863
+ + '</td>';
864
+
865
+ flags_arr.push( flag_cell );
866
+ i++;
867
+ }
868
+ }
869
+
870
+ flags_body
871
+ .append( '<tr>' + flags_arr.join( "\n" ) + '</tr>' );
872
+ };
873
+
874
+ var flags = null;
875
+ if( is_f && schema_browser_data.fields[field] && schema_browser_data.fields[field].flags )
876
+ {
877
+ flags = schema_browser_data.fields[field].flags;
878
+ }
879
+ else if( is_df && schema_browser_data.dynamic_fields[field] && schema_browser_data.dynamic_fields[field].flags )
880
+ {
881
+ flags = schema_browser_data.dynamic_fields[field].flags;
882
+ }
883
+
884
+ if( flags )
885
+ {
886
+ generate_flags_row( flags, 'Properties' );
887
+ }
888
+
889
+ if( is_f && schema_browser_data.fields[field] && schema_browser_data.fields[field].schema )
890
+ {
891
+ generate_flags_row( schema_browser_data.fields[field].schema, 'Schema' );
892
+ }
893
+
894
+ if( is_f && schema_browser_data.fields[field] && schema_browser_data.fields[field].index )
895
+ {
896
+ generate_flags_row( schema_browser_data.fields[field].index, 'Index' );
897
+ }
898
+
899
+
900
+ if( 0 !== $( 'tr', flags_body ).size() )
901
+ {
902
+ var col_count = 0;
903
+ for( var key in schema_browser_data.key )
904
+ {
905
+ var cols = $( '[data-key="' + key + '"]', flags_table );
906
+
907
+ var col_used = 0 !== cols.filter( '.check' ).size();
908
+ col_count += col_used;
909
+
910
+ cols.toggle( col_used );
911
+ }
912
+
913
+ $( 'td[colspan]', flags_body )
914
+ .attr( 'colspan', col_count );
915
+
916
+ flags_table.show();
917
+ }
918
+ else
919
+ {
920
+ flags_table.hide();
921
+ }
922
+
923
923
  var analyzer_element = $( '.analyzer', data_element );
924
924
  var analyzer_data = null;
925
925