mongo3 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/helpers/collection_helper.rb +36 -22
- data/lib/helpers/main_helper.rb +1 -1
- data/lib/mongo3.rb +1 -1
- data/lib/views/collections/_rows.erb +1 -1
- data/lib/views/explore/explore.erb +0 -1
- metadata +13 -3
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'will_paginate/view_helpers/base'
|
2
2
|
require 'will_paginate/view_helpers/link_renderer'
|
3
3
|
|
4
|
+
# BOZO !! Refact helpers...
|
4
5
|
module WillPaginate::ViewHelpers
|
5
6
|
class LinkRenderer
|
6
7
|
def url( page )
|
@@ -11,30 +12,43 @@ end
|
|
11
12
|
|
12
13
|
|
13
14
|
module CollectionHelper
|
14
|
-
|
15
|
-
|
16
|
-
include WillPaginate::ViewHelpers::Base
|
15
|
+
helpers do
|
16
|
+
include WillPaginate::ViewHelpers::Base
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
18
|
+
# Attempts to format an attribute to some human readable format
|
19
|
+
def format_value( value )
|
20
|
+
if value.is_a?( Fixnum)
|
21
|
+
value.to_s.gsub(/(\d)(?=\d{3}+(\.\d*)?$)/, '\1,')
|
22
|
+
elsif value.is_a?(Hash)
|
23
|
+
buff = []
|
24
|
+
value.each_pair { |k,v| buff << "#{k}:#{format_value(v)}"}
|
25
|
+
buff.join( "," )
|
26
|
+
elsif value.is_a?(Array)
|
27
|
+
value.join(",")
|
28
|
+
else
|
29
|
+
value
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
# format indexes to key:orientation
|
34
|
+
def format_index( pair )
|
35
|
+
buff = []
|
36
|
+
buff << pair.first
|
37
|
+
buff << orientation( pair.last )
|
38
|
+
buff.join( ":" )
|
39
|
+
end
|
25
40
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
41
|
+
# converts orientation to human
|
42
|
+
def orientation( value )
|
43
|
+
return "id" if value.is_a?(Mongo::ObjectID)
|
44
|
+
case( value.to_i )
|
45
|
+
when Mongo::ASCENDING
|
46
|
+
"asc"
|
47
|
+
when Mongo::DESCENDING
|
48
|
+
"desc"
|
49
|
+
else
|
50
|
+
"n/a"
|
51
|
+
end
|
36
52
|
end
|
37
53
|
end
|
38
|
-
|
39
|
-
end
|
40
54
|
end
|
data/lib/helpers/main_helper.rb
CHANGED
data/lib/mongo3.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Mongo3
|
2
2
|
|
3
3
|
# :stopdoc:
|
4
|
-
VERSION = '0.0.
|
4
|
+
VERSION = '0.0.9' unless defined? Mongo3::VERSION
|
5
5
|
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR unless defined? Mongo3::LIBPATH
|
6
6
|
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR unless defined? Mongo3::LIBPATH
|
7
7
|
# :startdoc:
|
@@ -137,7 +137,6 @@
|
|
137
137
|
onBeforePlotLine: function(adj) {
|
138
138
|
var nodeTo = adj.nodeTo;
|
139
139
|
var nodeFrom = adj.nodeFrom;
|
140
|
-
#console.log( "Node from " + nodeFrom.name + " " + nodeFrom.data.master + " -- " + nodeTo.data.)
|
141
140
|
if( (nodeFrom.data.slave && nodeTo.data.master) || (nodeFrom.data.master && nodeTo.data.slave) )
|
142
141
|
{
|
143
142
|
adj.data.$lineWidth = 3;
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongo3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernand Galiana
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-01-
|
12
|
+
date: 2010-01-06 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -72,6 +72,16 @@ dependencies:
|
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: 4.2.0
|
74
74
|
version:
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: bones
|
77
|
+
type: :development
|
78
|
+
version_requirement:
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: 2.5.1
|
84
|
+
version:
|
75
85
|
description: " Mongo3 allows you to manage your mongoDB clusters using a web based admin console.\n The console provides for getting an overview of your mongo landscape and drilldown to\n see various information about your databases. You will be able to manage your clusters\n by performing common database admin tasks directly from the web console.\n \n The initial release of Mongo3 will be a read only shallow mode. Further development\n still needs to take place to build up the functionality from the existing code base."
|
76
86
|
email: fernand.galiana@gmail.com
|
77
87
|
executables:
|
@@ -256,7 +266,7 @@ requirements: []
|
|
256
266
|
rubyforge_project: !binary |
|
257
267
|
AA==
|
258
268
|
|
259
|
-
rubygems_version: 1.3.
|
269
|
+
rubygems_version: 1.3.4
|
260
270
|
signing_key:
|
261
271
|
specification_version: 3
|
262
272
|
summary: Mongo3 allows you to manage your mongoDB clusters using a web based admin console
|