spiderfw 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -0
- data/VERSION +1 -1
- data/apps/core/auth/lib/rbac.rb +15 -0
- data/apps/core/auth/models/mixins/rbac_provider.rb +28 -10
- data/apps/core/auth/po/it/spider_auth.po +3 -2
- data/apps/core/auth/po/spider_auth.pot +3 -2
- data/apps/core/auth/views/login.shtml +1 -1
- data/apps/core/components/po/it/spider_components.po +11 -12
- data/apps/core/components/po/spider_components.pot +11 -10
- data/apps/core/components/public/css/crud.css +4 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.11/css/Aristo/jquery-ui.custom.css +1 -0
- data/apps/core/components/public/js/jquery/plugins/bsmselect/README.md +1 -0
- data/apps/core/components/public/js/jquery/plugins/bsmselect/js/jquery.bsmselect.js +11 -11
- data/apps/core/components/public/js/jquery/plugins/jquery.form.js +325 -154
- data/apps/core/components/public/js/spider.js +6 -0
- data/apps/core/components/widgets/admin/admin.rb +44 -1
- data/apps/core/components/widgets/crud/crud.rb +48 -27
- data/apps/core/components/widgets/crud/crud.shtml +5 -3
- data/apps/core/components/widgets/table/table.rb +3 -3
- data/apps/core/forms/po/it/spider_forms.po +4 -4
- data/apps/core/forms/po/spider_forms.pot +4 -3
- data/apps/core/forms/public/ckeditor/CHANGES.html +1295 -0
- data/apps/core/forms/public/ckeditor/INSTALL.html +92 -0
- data/apps/core/forms/public/ckeditor/LICENSE.html +1334 -0
- data/apps/core/forms/public/ckeditor/adapters/jquery.js +2 -2
- data/apps/core/forms/public/ckeditor/ckeditor.js +141 -133
- data/apps/core/forms/public/ckeditor/ckeditor_basic.js +8 -0
- data/apps/core/forms/public/ckeditor/ckeditor_basic_source.js +20 -0
- data/apps/core/forms/public/ckeditor/ckeditor_source.js +25 -0
- data/apps/core/forms/public/ckeditor/config.js +11 -0
- data/apps/core/forms/public/ckeditor/contents.css +23 -0
- data/apps/core/forms/public/ckeditor/lang/_languages.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/_translationstatus.txt +58 -57
- data/apps/core/forms/public/ckeditor/lang/af.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/ar.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/bg.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/bn.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/bs.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/ca.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/cs.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/cy.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/da.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/de.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/el.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/en-au.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/en-ca.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/en-gb.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/en.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/eo.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/es.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/et.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/eu.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/fa.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/fi.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/fo.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/fr-ca.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/fr.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/gl.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/gu.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/he.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/hi.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/hr.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/hu.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/is.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/it.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/ja.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/ka.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/km.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/ko.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/lt.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/lv.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/mn.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/ms.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/nb.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/nl.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/no.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/pl.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/pt-br.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/pt.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/ro.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/ru.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/sk.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/sl.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/sr-latn.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/sr.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/sv.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/th.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/tr.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/uk.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/vi.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/zh-cn.js +2 -2
- data/apps/core/forms/public/ckeditor/lang/zh.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/a11yhelp/lang/en.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/a11yhelp/lang/he.js +1 -1
- data/apps/core/forms/public/ckeditor/plugins/about/dialogs/about.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/adobeair/plugin.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/ajax/plugin.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/autogrow/plugin.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/bbcode/plugin.js +9 -0
- data/apps/core/forms/public/ckeditor/plugins/clipboard/dialogs/paste.js +3 -3
- data/apps/core/forms/public/ckeditor/plugins/colordialog/dialogs/colordialog.js +3 -3
- data/apps/core/forms/public/ckeditor/plugins/devtools/lang/en.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/devtools/plugin.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
- data/apps/core/forms/public/ckeditor/plugins/div/dialogs/div.js +1 -1
- data/apps/core/forms/public/ckeditor/plugins/docprops/dialogs/docprops.js +10 -0
- data/apps/core/forms/public/ckeditor/plugins/docprops/plugin.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/find/dialogs/find.js +4 -4
- data/apps/core/forms/public/ckeditor/plugins/flash/dialogs/flash.js +4 -4
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/button.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/checkbox.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/form.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/hiddenfield.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/radio.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/select.js +4 -4
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/textarea.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/textfield.js +2 -3
- data/apps/core/forms/public/ckeditor/plugins/iframe/dialogs/iframe.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/iframe/images/placeholder.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/iframedialog/plugin.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/image/dialogs/image.js +8 -8
- data/apps/core/forms/public/ckeditor/plugins/link/dialogs/anchor.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/link/dialogs/link.js +7 -7
- data/apps/core/forms/public/ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -1
- data/apps/core/forms/public/ckeditor/plugins/pastefromword/filter/default.js +7 -6
- data/apps/core/forms/public/ckeditor/plugins/pastetext/dialogs/pastetext.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/placeholder/dialogs/placeholder.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/placeholder/lang/en.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/placeholder/lang/he.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/placeholder/placeholder.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/placeholder/plugin.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/scayt/dialogs/options.js +4 -4
- data/apps/core/forms/public/ckeditor/plugins/scayt/dialogs/toolbar.css +1 -1
- data/apps/core/forms/public/ckeditor/plugins/smiley/dialogs/smiley.js +3 -3
- data/apps/core/forms/public/ckeditor/plugins/specialchar/dialogs/specialchar.js +3 -3
- data/apps/core/forms/public/ckeditor/plugins/specialchar/lang/en.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/styles/styles/default.js +1 -1
- data/apps/core/forms/public/ckeditor/plugins/stylesheetparser/plugin.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/table/dialogs/table.js +3 -3
- data/apps/core/forms/public/ckeditor/plugins/tableresize/plugin.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/tabletools/dialogs/tableCell.js +4 -4
- data/apps/core/forms/public/ckeditor/plugins/templates/dialogs/templates.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/templates/templates/default.js +1 -1
- data/apps/core/forms/public/ckeditor/plugins/uicolor/dialogs/uicolor.js +1 -1
- data/apps/core/forms/public/ckeditor/plugins/uicolor/lang/en.js +1 -1
- data/apps/core/forms/public/ckeditor/plugins/uicolor/lang/he.js +1 -1
- data/apps/core/forms/public/ckeditor/plugins/uicolor/plugin.js +1 -1
- data/apps/core/forms/public/ckeditor/plugins/uicolor/yui/assets/yui.css +1 -1
- data/apps/core/forms/public/ckeditor/plugins/uicolor/yui/yui.js +1 -1
- data/apps/core/forms/public/ckeditor/plugins/wsc/dialogs/ciframe.html +1 -1
- data/apps/core/forms/public/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +1 -1
- data/apps/core/forms/public/ckeditor/plugins/wsc/dialogs/wsc.css +1 -1
- data/apps/core/forms/public/ckeditor/plugins/wsc/dialogs/wsc.js +3 -3
- data/apps/core/forms/public/ckeditor/plugins/xml/plugin.js +6 -0
- data/apps/core/forms/public/ckeditor/skins/kama/dialog.css +5 -5
- data/apps/core/forms/public/ckeditor/skins/kama/editor.css +9 -8
- data/apps/core/forms/public/ckeditor/skins/kama/icons.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/icons_rtl.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/skin.js +3 -3
- data/apps/core/forms/public/ckeditor/skins/kama/templates.css +1 -1
- data/apps/core/forms/public/ckeditor/themes/default/theme.js +4 -4
- data/apps/core/forms/public/css/form.css +1 -0
- data/apps/core/forms/public/css/html_area.css +3 -0
- data/apps/core/forms/public/html_area.js +4 -4
- data/apps/core/forms/public/search_select.js +2 -2
- data/apps/core/forms/public/select.js +5 -5
- data/apps/core/forms/tags/element_label.erb +5 -2
- data/apps/core/forms/tags/element_row.erb +7 -6
- data/apps/core/forms/tags/row.erb +6 -4
- data/apps/core/forms/widgets/form/form.rb +5 -4
- data/apps/core/forms/widgets/inputs/html_area/html_area.rb +10 -4
- data/apps/core/forms/widgets/inputs/html_area/html_area.shtml +1 -0
- data/apps/core/forms/widgets/inputs/select/select.rb +18 -5
- data/apps/core/forms/widgets/inputs/select/select.shtml +3 -0
- data/apps/master/po/master.pot +408 -0
- data/apps/messenger/po/it/spider_messenger.po +6 -10
- data/apps/messenger/po/spider_messenger.pot +2 -1
- data/blueprints/home/{Gemfile → Gemfile.disabled} +0 -0
- data/lib/spiderfw/config/configuration.rb +5 -0
- data/lib/spiderfw/config/options/spider.rb +2 -2
- data/lib/spiderfw/controller/controller.rb +4 -1
- data/lib/spiderfw/controller/mixins/http_mixin.rb +2 -0
- data/lib/spiderfw/create.rb +9 -5
- data/lib/spiderfw/model/base_model.rb +32 -9
- data/lib/spiderfw/model/condition.rb +7 -0
- data/lib/spiderfw/model/datatypes/text.rb +3 -1
- data/lib/spiderfw/model/mappers/db_mapper.rb +19 -5
- data/lib/spiderfw/model/mappers/mapper.rb +1 -1
- data/lib/spiderfw/model/mixins/tree.rb +2 -1
- data/lib/spiderfw/model/query_set.rb +14 -13
- data/lib/spiderfw/model/storage/db/adapters/mysql.rb +7 -2
- data/lib/spiderfw/model/storage/db/db_schema.rb +4 -2
- data/lib/spiderfw/model/storage/db/db_storage.rb +4 -4
- data/lib/spiderfw/model/unit_of_work.rb +3 -1
- data/lib/spiderfw/templates/blocks/html.rb +2 -2
- data/lib/spiderfw/templates/blocks/lambda.rb +25 -0
- data/lib/spiderfw/templates/blocks/recurse.rb +41 -0
- data/lib/spiderfw/templates/blocks/widget.rb +2 -3
- data/lib/spiderfw/templates/layout.rb +20 -3
- data/lib/spiderfw/templates/template.rb +35 -29
- data/lib/spiderfw/templates/template_blocks.rb +6 -0
- data/lib/spiderfw/widget/widget.rb +2 -1
- metadata +35 -5
@@ -6,6 +6,7 @@ module Spider; module Forms
|
|
6
6
|
is_attr_accessor :multiple
|
7
7
|
is_attr_accessor :blank_option, :type => TrueClass, :default => nil
|
8
8
|
is_attr_accessor :condition
|
9
|
+
attribute :tree_element, :default => nil
|
9
10
|
attr_accessor :data
|
10
11
|
|
11
12
|
def widget_init(action='')
|
@@ -37,20 +38,32 @@ module Spider; module Forms
|
|
37
38
|
end
|
38
39
|
|
39
40
|
def run
|
40
|
-
|
41
41
|
@scene.data = @data || @model.all
|
42
|
-
if
|
42
|
+
if @condition
|
43
43
|
@scene.data.condition = @condition
|
44
44
|
end
|
45
45
|
conn_cond = connection_condition
|
46
|
-
if
|
46
|
+
if conn_cond == false
|
47
47
|
@scene.data = Spider::Model::QuerySet.static(@model)
|
48
|
-
elsif
|
48
|
+
elsif conn_cond && !conn_cond.empty?
|
49
49
|
@scene.data.condition.and(conn_cond)
|
50
50
|
end
|
51
51
|
@scene.values = {}
|
52
52
|
@scene.selected = {}
|
53
|
-
if (@
|
53
|
+
if @model || (@scene.data.is_a?(QuerySet) && @scene.data.autoload?)
|
54
|
+
tree_el = nil
|
55
|
+
if attributes[:tree_element]
|
56
|
+
tree_el = @model.elements[attributes[:tree_element]]
|
57
|
+
else
|
58
|
+
tree_el = @model.elements_array.select{ |el| el.association == :tree }.first
|
59
|
+
end
|
60
|
+
if tree_el
|
61
|
+
@scene.data = @scene.data.model.send("#{tree_el.name}_all", @scene.data.condition)
|
62
|
+
@scene.data.reject!{ |obj| obj == @form.obj } if @form && @form.obj
|
63
|
+
@scene.tree_depth = tree_el.attributes[:tree_depth]
|
64
|
+
end
|
65
|
+
end
|
66
|
+
if @value
|
54
67
|
val = @multiple ? @value : [@value]
|
55
68
|
val.each do |v|
|
56
69
|
@scene.selected[@model.primary_keys.map{|k| v.get(k) }.join(',')] = true
|
@@ -5,6 +5,9 @@
|
|
5
5
|
<tpl:asset type="css" app="core/components" src="js/jquery/plugins/bsmselect/css/jquery.bsmselect.css" if="@multiple" />
|
6
6
|
<option sp:if="@blank_option"> </option>
|
7
7
|
<option sp:each_index="@data |i|" value="{ @values[i] }" sp:attr-if="@selected[values[i]],selected">
|
8
|
+
<tpl:pass sp:if="@tree_depth">
|
9
|
+
{ "-"*(@data[i].get(@tree_depth)||0) }
|
10
|
+
</tpl:pass>
|
8
11
|
{ @data[i].to_s }
|
9
12
|
</option>
|
10
13
|
</select>
|
@@ -0,0 +1,408 @@
|
|
1
|
+
# SOME DESCRIPTIVE TITLE.
|
2
|
+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
3
|
+
# This file is distributed under the same license as the PACKAGE package.
|
4
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
5
|
+
#
|
6
|
+
#, fuzzy
|
7
|
+
msgid ""
|
8
|
+
msgstr ""
|
9
|
+
"Project-Id-Version: Spider::Master 0.1\n"
|
10
|
+
"POT-Creation-Date: 2011-05-09 17:37+0200\n"
|
11
|
+
"PO-Revision-Date: 2011-05-09 17:31+0200\n"
|
12
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13
|
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14
|
+
"Language: \n"
|
15
|
+
"MIME-Version: 1.0\n"
|
16
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
17
|
+
"Content-Transfer-Encoding: 8bit\n"
|
18
|
+
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
19
|
+
|
20
|
+
#: controllers/master_controller.rb:50 views/customers.shtml:3
|
21
|
+
#: views/index.shtml:2 views/master.layout.shtml:20
|
22
|
+
msgid "Customers"
|
23
|
+
msgstr ""
|
24
|
+
|
25
|
+
#: controllers/master_controller.rb:81
|
26
|
+
msgid "No customer"
|
27
|
+
msgstr ""
|
28
|
+
|
29
|
+
#: controllers/master_controller.rb:83
|
30
|
+
msgid "User can't access this customer"
|
31
|
+
msgstr ""
|
32
|
+
|
33
|
+
#: controllers/master_controller.rb:102
|
34
|
+
msgid "User can't list customers"
|
35
|
+
msgstr ""
|
36
|
+
|
37
|
+
#: models/scout_plugin_instance.rb:21
|
38
|
+
msgid "Ok"
|
39
|
+
msgstr ""
|
40
|
+
|
41
|
+
#: models/scout_plugin_instance.rb:22
|
42
|
+
msgid "Error"
|
43
|
+
msgstr ""
|
44
|
+
|
45
|
+
#: models/scout_plugin_instance.rb:23
|
46
|
+
msgid "Alert"
|
47
|
+
msgstr ""
|
48
|
+
|
49
|
+
#: models/scout_plugin_trigger.rb:8
|
50
|
+
msgid "Peak trigger"
|
51
|
+
msgstr ""
|
52
|
+
|
53
|
+
#: models/scout_plugin_trigger.rb:9
|
54
|
+
msgid "Plateau trigger"
|
55
|
+
msgstr ""
|
56
|
+
|
57
|
+
#: models/scout_plugin_trigger.rb:10
|
58
|
+
msgid "Trend trigger"
|
59
|
+
msgstr ""
|
60
|
+
|
61
|
+
#: models/scout_plugin_trigger.rb:15
|
62
|
+
msgid "Up"
|
63
|
+
msgstr ""
|
64
|
+
|
65
|
+
#: models/scout_plugin_trigger.rb:16
|
66
|
+
msgid "Down"
|
67
|
+
msgstr ""
|
68
|
+
|
69
|
+
#: models/scout_plugin_trigger.rb:17
|
70
|
+
msgid "Either"
|
71
|
+
msgstr ""
|
72
|
+
|
73
|
+
#: models/scout_plugin_trigger.rb:22 views/trigger_edit.shtml:76
|
74
|
+
msgid "yesterday's average"
|
75
|
+
msgstr ""
|
76
|
+
|
77
|
+
#: models/scout_plugin_trigger.rb:23 views/trigger_edit.shtml:79
|
78
|
+
msgid "previous 7-day average"
|
79
|
+
msgstr ""
|
80
|
+
|
81
|
+
#: models/scout_plugin_trigger.rb:24 views/trigger_edit.shtml:82
|
82
|
+
msgid "preceding window"
|
83
|
+
msgstr ""
|
84
|
+
|
85
|
+
#: models/scout_plugin_trigger.rb:27
|
86
|
+
msgid "normal"
|
87
|
+
msgstr ""
|
88
|
+
|
89
|
+
#: models/scout_plugin_trigger.rb:28
|
90
|
+
msgid "fired"
|
91
|
+
msgstr ""
|
92
|
+
|
93
|
+
#: models/scout_plugin_trigger.rb:93 models/scout_plugin_trigger.rb:101
|
94
|
+
#: models/scout_plugin_trigger.rb:230
|
95
|
+
msgid "%d minutes"
|
96
|
+
msgstr ""
|
97
|
+
|
98
|
+
#: models/scout_plugin_trigger.rb:111
|
99
|
+
msgid "Alert me when %s exceeds %s"
|
100
|
+
msgstr ""
|
101
|
+
|
102
|
+
#: models/scout_plugin_trigger.rb:113
|
103
|
+
msgid ""
|
104
|
+
"Alert me when %s goes %s more than %s over the preceding %s (relative to "
|
105
|
+
"%s), \n"
|
106
|
+
" as long as the value is at least %s"
|
107
|
+
msgstr ""
|
108
|
+
|
109
|
+
#: models/scout_plugin_trigger.rb:119
|
110
|
+
msgid "Alert me when %s stays above %s for %s or more"
|
111
|
+
msgstr ""
|
112
|
+
|
113
|
+
#: models/scout_plugin_trigger.rb:224
|
114
|
+
msgid "%s exceeded %s, increasing to %s at %s"
|
115
|
+
msgstr ""
|
116
|
+
|
117
|
+
#: models/scout_plugin_trigger.rb:232
|
118
|
+
msgid ""
|
119
|
+
"%s went %s more than %s over the preceding %s minutes with respect to %s, "
|
120
|
+
"and is now %s"
|
121
|
+
msgstr ""
|
122
|
+
|
123
|
+
#: models/scout_plugin_trigger.rb:241
|
124
|
+
msgid ""
|
125
|
+
"%s exceeded %s, increasing to %s at %s, and is still continuing at %s as of "
|
126
|
+
"%s"
|
127
|
+
msgstr ""
|
128
|
+
|
129
|
+
#: views/admin.layout.shtml:5
|
130
|
+
msgid "\"Administration\""
|
131
|
+
msgstr ""
|
132
|
+
|
133
|
+
#: views/customer.shtml:6
|
134
|
+
msgid "New customer"
|
135
|
+
msgstr ""
|
136
|
+
|
137
|
+
#: views/customer.shtml:8 views/servant.shtml:6
|
138
|
+
msgid "Edit"
|
139
|
+
msgstr ""
|
140
|
+
|
141
|
+
#: views/customer.shtml:21 views/index.shtml:3 views/master.layout.shtml:21
|
142
|
+
msgid "Servants"
|
143
|
+
msgstr ""
|
144
|
+
|
145
|
+
#: views/customer.shtml:21 views/customer.shtml:32 views/customers.shtml:3
|
146
|
+
#: views/plugin_instance.shtml:33
|
147
|
+
msgid "Add"
|
148
|
+
msgstr ""
|
149
|
+
|
150
|
+
#: views/customer.shtml:32
|
151
|
+
msgid "Installations"
|
152
|
+
msgstr ""
|
153
|
+
|
154
|
+
#: views/installation.shtml:3
|
155
|
+
msgid "Back to customer"
|
156
|
+
msgstr ""
|
157
|
+
|
158
|
+
#: views/installation.shtml:6
|
159
|
+
msgid "New installation for %s"
|
160
|
+
msgstr ""
|
161
|
+
|
162
|
+
#: views/installation.shtml:9 views/plugin_edit.shtml:10
|
163
|
+
msgid "Name"
|
164
|
+
msgstr ""
|
165
|
+
|
166
|
+
#: views/installation.shtml:16
|
167
|
+
msgid "Installation \"%s\" for %s"
|
168
|
+
msgstr ""
|
169
|
+
|
170
|
+
#: views/installation.shtml:18
|
171
|
+
msgid "Edit installation"
|
172
|
+
msgstr ""
|
173
|
+
|
174
|
+
#: views/installation.shtml:20
|
175
|
+
msgid "Apps"
|
176
|
+
msgstr ""
|
177
|
+
|
178
|
+
#: views/installation.shtml:28
|
179
|
+
msgid "Save"
|
180
|
+
msgstr ""
|
181
|
+
|
182
|
+
#: views/installation.shtml:32
|
183
|
+
msgid "Targets"
|
184
|
+
msgstr ""
|
185
|
+
|
186
|
+
#: views/master.layout.shtml:19
|
187
|
+
msgid "Home"
|
188
|
+
msgstr ""
|
189
|
+
|
190
|
+
#: views/plugin_data.shtml:13
|
191
|
+
msgid "Compare"
|
192
|
+
msgstr ""
|
193
|
+
|
194
|
+
#: views/plugin_data.shtml:22
|
195
|
+
msgid "Show in same scale"
|
196
|
+
msgstr ""
|
197
|
+
|
198
|
+
#: views/plugin_edit.shtml:3
|
199
|
+
msgid "Edit plugin \"%s\""
|
200
|
+
msgstr ""
|
201
|
+
|
202
|
+
#: views/plugin_edit.shtml:4
|
203
|
+
msgid "Back to plugin details"
|
204
|
+
msgstr ""
|
205
|
+
|
206
|
+
#: views/plugin_edit.shtml:15
|
207
|
+
msgid "Settings"
|
208
|
+
msgstr ""
|
209
|
+
|
210
|
+
#: views/plugin_edit.shtml:28
|
211
|
+
msgid "Advanced options"
|
212
|
+
msgstr ""
|
213
|
+
|
214
|
+
#: views/plugin_edit.shtml:30
|
215
|
+
msgid "Interval"
|
216
|
+
msgstr ""
|
217
|
+
|
218
|
+
#: views/plugin_edit.shtml:34
|
219
|
+
msgid "Timeout"
|
220
|
+
msgstr ""
|
221
|
+
|
222
|
+
#: views/plugin_edit.shtml:38
|
223
|
+
msgid "Update"
|
224
|
+
msgstr ""
|
225
|
+
|
226
|
+
#: views/plugin_instance.shtml:5
|
227
|
+
msgid "Edit settings"
|
228
|
+
msgstr ""
|
229
|
+
|
230
|
+
#: views/plugin_instance.shtml:8
|
231
|
+
msgid "Last report"
|
232
|
+
msgstr ""
|
233
|
+
|
234
|
+
#: views/plugin_instance.shtml:19
|
235
|
+
msgid "Field"
|
236
|
+
msgstr ""
|
237
|
+
|
238
|
+
#: views/plugin_instance.shtml:20
|
239
|
+
msgid "Value"
|
240
|
+
msgstr ""
|
241
|
+
|
242
|
+
#: views/plugin_instance.shtml:24
|
243
|
+
msgid "@labels[key]"
|
244
|
+
msgstr ""
|
245
|
+
|
246
|
+
#: views/plugin_instance.shtml:33
|
247
|
+
msgid "Triggers"
|
248
|
+
msgstr ""
|
249
|
+
|
250
|
+
#: views/plugin_instance.shtml:38
|
251
|
+
msgid "edit"
|
252
|
+
msgstr ""
|
253
|
+
|
254
|
+
#: views/servant.shtml:14 views/trigger_edit.shtml:8
|
255
|
+
msgid "Customer"
|
256
|
+
msgstr ""
|
257
|
+
|
258
|
+
#: views/servant.shtml:23 views/servants.shtml:4
|
259
|
+
msgid "New servant"
|
260
|
+
msgstr ""
|
261
|
+
|
262
|
+
#: views/servant.shtml:23
|
263
|
+
msgid "for customer %s"
|
264
|
+
msgstr ""
|
265
|
+
|
266
|
+
#: views/servant.shtml:31
|
267
|
+
msgid "Sites"
|
268
|
+
msgstr ""
|
269
|
+
|
270
|
+
#: views/servant.shtml:32
|
271
|
+
msgid "New site"
|
272
|
+
msgstr ""
|
273
|
+
|
274
|
+
#: views/servant.shtml:33
|
275
|
+
msgid "Add existing site"
|
276
|
+
msgstr ""
|
277
|
+
|
278
|
+
#: views/servant.shtml:39 views/servant.shtml:62
|
279
|
+
msgid "Remove"
|
280
|
+
msgstr ""
|
281
|
+
|
282
|
+
#: views/servant.shtml:44
|
283
|
+
msgid "Plugins"
|
284
|
+
msgstr ""
|
285
|
+
|
286
|
+
#: views/servant.shtml:47
|
287
|
+
msgid "Add plugin"
|
288
|
+
msgstr ""
|
289
|
+
|
290
|
+
#: views/servant.shtml:70
|
291
|
+
msgid "Servant %s"
|
292
|
+
msgstr ""
|
293
|
+
|
294
|
+
#: views/servant.shtml:73
|
295
|
+
msgid "Last check"
|
296
|
+
msgstr ""
|
297
|
+
|
298
|
+
#: views/servant.shtml:78
|
299
|
+
msgid "Manage resources"
|
300
|
+
msgstr ""
|
301
|
+
|
302
|
+
#: views/servant.shtml:81
|
303
|
+
msgid "Resources"
|
304
|
+
msgstr ""
|
305
|
+
|
306
|
+
#: views/servant.shtml:94
|
307
|
+
msgid "System details"
|
308
|
+
msgstr ""
|
309
|
+
|
310
|
+
#: views/site_edit.shtml:3
|
311
|
+
msgid "Edit Site %s"
|
312
|
+
msgstr ""
|
313
|
+
|
314
|
+
#: views/site_edit.shtml:4
|
315
|
+
msgid "Create new Site for %s"
|
316
|
+
msgstr ""
|
317
|
+
|
318
|
+
#: views/site_edit.shtml:7
|
319
|
+
msgid "Choose site type"
|
320
|
+
msgstr ""
|
321
|
+
|
322
|
+
#: views/trigger_edit.shtml:3
|
323
|
+
msgid "Edit Trigger %s"
|
324
|
+
msgstr ""
|
325
|
+
|
326
|
+
#: views/trigger_edit.shtml:4
|
327
|
+
msgid "New Trigger for plugin %s"
|
328
|
+
msgstr ""
|
329
|
+
|
330
|
+
#: views/trigger_edit.shtml:12
|
331
|
+
msgid "Servant"
|
332
|
+
msgstr ""
|
333
|
+
|
334
|
+
#: views/trigger_edit.shtml:16
|
335
|
+
msgid "Plugin"
|
336
|
+
msgstr ""
|
337
|
+
|
338
|
+
#: views/trigger_edit.shtml:20 views/trigger_edit.shtml:24
|
339
|
+
msgid "Data series"
|
340
|
+
msgstr ""
|
341
|
+
|
342
|
+
#: views/trigger_edit.shtml:30
|
343
|
+
msgid "Trigger type"
|
344
|
+
msgstr ""
|
345
|
+
|
346
|
+
#: views/trigger_edit.shtml:32
|
347
|
+
msgid "peak"
|
348
|
+
msgstr ""
|
349
|
+
|
350
|
+
#: views/trigger_edit.shtml:33
|
351
|
+
msgid "plateau"
|
352
|
+
msgstr ""
|
353
|
+
|
354
|
+
#: views/trigger_edit.shtml:34
|
355
|
+
msgid "trend"
|
356
|
+
msgstr ""
|
357
|
+
|
358
|
+
#: views/trigger_edit.shtml:42 views/trigger_edit.shtml:52
|
359
|
+
msgid "Max Value"
|
360
|
+
msgstr ""
|
361
|
+
|
362
|
+
#: views/trigger_edit.shtml:48
|
363
|
+
msgid "Duration"
|
364
|
+
msgstr ""
|
365
|
+
|
366
|
+
#: views/trigger_edit.shtml:49
|
367
|
+
msgid "minutes"
|
368
|
+
msgstr ""
|
369
|
+
|
370
|
+
#: views/trigger_edit.shtml:58
|
371
|
+
msgid "Trigger"
|
372
|
+
msgstr ""
|
373
|
+
|
374
|
+
#: views/trigger_edit.shtml:61
|
375
|
+
msgid "Alert me to changes going"
|
376
|
+
msgstr ""
|
377
|
+
|
378
|
+
#: views/trigger_edit.shtml:63
|
379
|
+
msgid "up"
|
380
|
+
msgstr ""
|
381
|
+
|
382
|
+
#: views/trigger_edit.shtml:64
|
383
|
+
msgid "down"
|
384
|
+
msgstr ""
|
385
|
+
|
386
|
+
#: views/trigger_edit.shtml:65
|
387
|
+
msgid "up or down"
|
388
|
+
msgstr ""
|
389
|
+
|
390
|
+
#: views/trigger_edit.shtml:69
|
391
|
+
msgid "during the span of"
|
392
|
+
msgstr ""
|
393
|
+
|
394
|
+
#: views/trigger_edit.shtml:73
|
395
|
+
msgid "relative to"
|
396
|
+
msgstr ""
|
397
|
+
|
398
|
+
#: views/trigger_edit.shtml:89
|
399
|
+
msgid "when change is at least"
|
400
|
+
msgstr ""
|
401
|
+
|
402
|
+
#: views/trigger_edit.shtml:93
|
403
|
+
msgid "Minimum Value"
|
404
|
+
msgstr ""
|
405
|
+
|
406
|
+
#: views/trigger_edit.shtml:98
|
407
|
+
msgid "Submit"
|
408
|
+
msgstr ""
|
@@ -6,10 +6,11 @@
|
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
8
|
"Project-Id-Version: Spider::Messenger 0.1\n"
|
9
|
-
"POT-Creation-Date:
|
9
|
+
"POT-Creation-Date: 2011-05-09 17:37+0200\n"
|
10
10
|
"PO-Revision-Date: 2010-11-29 12:53+0100\n"
|
11
11
|
"Last-Translator: Ivan Pirlik <ivan.pirlik@soluzionipa.it>\n"
|
12
12
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
13
|
+
"Language: \n"
|
13
14
|
"MIME-Version: 1.0\n"
|
14
15
|
"Content-Type: text/plain; charset=UTF-8\n"
|
15
16
|
"Content-Transfer-Encoding: 8bit\n"
|
@@ -19,8 +20,7 @@ msgstr ""
|
|
19
20
|
msgid "From"
|
20
21
|
msgstr "Mittente"
|
21
22
|
|
22
|
-
#: models/email.rb:8
|
23
|
-
#: models/sms.rb:7
|
23
|
+
#: models/email.rb:8 models/sms.rb:7
|
24
24
|
msgid "To"
|
25
25
|
msgstr "Destinatario"
|
26
26
|
|
@@ -100,18 +100,14 @@ msgstr "Testo"
|
|
100
100
|
msgid "Queues"
|
101
101
|
msgstr "Code"
|
102
102
|
|
103
|
-
#: views/index.shtml:7
|
104
|
-
#: views/queue.shtml:2
|
103
|
+
#: views/index.shtml:7 views/queue.shtml:2
|
105
104
|
msgid "Sent messages"
|
106
105
|
msgstr "Messaggi inviati"
|
107
106
|
|
108
|
-
#: views/index.shtml:8
|
109
|
-
#: views/queue.shtml:4
|
107
|
+
#: views/index.shtml:8 views/queue.shtml:4
|
110
108
|
msgid "Queued messages"
|
111
109
|
msgstr "Messaggi in coda"
|
112
110
|
|
113
|
-
#: views/index.shtml:9
|
114
|
-
#: views/queue.shtml:6
|
111
|
+
#: views/index.shtml:9 views/queue.shtml:6
|
115
112
|
msgid "Failed messages"
|
116
113
|
msgstr "Messaggi falliti"
|
117
|
-
|
@@ -7,10 +7,11 @@
|
|
7
7
|
msgid ""
|
8
8
|
msgstr ""
|
9
9
|
"Project-Id-Version: Spider::Messenger 0.1\n"
|
10
|
-
"POT-Creation-Date:
|
10
|
+
"POT-Creation-Date: 2011-05-09 17:37+0200\n"
|
11
11
|
"PO-Revision-Date: 2009-06-30 16:44+0200\n"
|
12
12
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13
13
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14
|
+
"Language: \n"
|
14
15
|
"MIME-Version: 1.0\n"
|
15
16
|
"Content-Type: text/plain; charset=UTF-8\n"
|
16
17
|
"Content-Transfer-Encoding: 8bit\n"
|
File without changes
|
@@ -93,6 +93,11 @@ module Spider
|
|
93
93
|
if (@options[key][:params] && @options[key][:params][:type] == :conf)
|
94
94
|
@values[key] ||= Configuration.new(@prefix+".#{key}") # FIXME: needed?
|
95
95
|
val.each do |h_key, h_val|
|
96
|
+
unless h_val.is_a?(Hash)
|
97
|
+
# Reference to another subconf item
|
98
|
+
self[key][h_key] = self[key][h_val]
|
99
|
+
next
|
100
|
+
end
|
96
101
|
self[key][h_key] = Configuration.new(@prefix+".#{key}.x")
|
97
102
|
self[key][h_key].hash_key = h_key
|
98
103
|
h_val.each { |k, v| self[key][h_key].set(k, v) }
|
@@ -28,7 +28,7 @@ module Spider
|
|
28
28
|
:default => Proc.new{ Spider.config.get('runmode') == 'devel' ? true : false }
|
29
29
|
config_option 'webserver.port', _("Port to use for the http server"), :type => Fixnum, :default => 8080
|
30
30
|
config_option 'webserver.force_threads', _("Force threading on non-threaded adapters"), :type => Spider::DataTypes::Bool,
|
31
|
-
:default => Proc.new{ RUBY_VERSION_PARTS[1] == '8' ? true : false }
|
31
|
+
:default => Proc.new{ RUBY_VERSION_PARTS[1] == '8' && !Object.const_defined?(:PhusionPassenger) ? true : false }
|
32
32
|
config_option 'webserver.timeout', _("Time allowed for each request (in seconds)"), :type=> Fixnum, :default => nil
|
33
33
|
config_option 'webserver.respawn_on_change', _("Restart the webserver when application code changes"), :type => Spider::Bool,
|
34
34
|
:default => Proc.new{ Spider.config.get('runmode') == 'devel' ? true : false }
|
@@ -54,7 +54,7 @@ module Spider
|
|
54
54
|
|
55
55
|
# Model
|
56
56
|
|
57
|
-
config_option 'storage.pool.size', _("How many connections to open to a
|
57
|
+
config_option 'storage.pool.size', _("How many connections to open to a storage"), :type => Fixnum, :default => 5
|
58
58
|
config_option 'storage.pool.timeout', _("Timout in seconds to obtain a connection"), :type => Fixnum, :default => 5
|
59
59
|
config_option 'storage.pool.retry', _("How many times to retry acquiring a connection"), :type => Fixnum, :default => 5
|
60
60
|
config_option 'storage.shared_connection', _("Use one connection for all threads; use this only when testing!"),
|
@@ -278,8 +278,11 @@ module Spider
|
|
278
278
|
end
|
279
279
|
|
280
280
|
def prepare_scene(scene)
|
281
|
+
req_path = @request.path
|
282
|
+
req_path += 'index' if !req_path.blank? && req_path[-1].chr == '/'
|
281
283
|
scene.request = {
|
282
|
-
:path => @request.path
|
284
|
+
:path => @request.path,
|
285
|
+
:page_path => req_path
|
283
286
|
}
|
284
287
|
scene.controller = {
|
285
288
|
:request_path => request_path,
|
@@ -40,6 +40,7 @@ module Spider; module ControllerMixins
|
|
40
40
|
|
41
41
|
# Returns the request_path prefixed with http:// and the current host.
|
42
42
|
def request_url
|
43
|
+
return request_path unless @request.env['HTTP_HOST']
|
43
44
|
'http://'+@request.env['HTTP_HOST']+request_path
|
44
45
|
end
|
45
46
|
|
@@ -94,6 +95,7 @@ module Spider; module ControllerMixins
|
|
94
95
|
def prepare_scene(scene)
|
95
96
|
scene = super
|
96
97
|
scene.base_url = base_url
|
98
|
+
scene.controller[:request_url] = request_url
|
97
99
|
return scene
|
98
100
|
end
|
99
101
|
|
data/lib/spiderfw/create.rb
CHANGED
@@ -38,10 +38,14 @@ module Spider
|
|
38
38
|
|
39
39
|
cwd = Dir.getwd
|
40
40
|
Dir.chdir(dest_path)
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
41
|
+
begin
|
42
|
+
repo = Grit::Repo.init(dest_path)
|
43
|
+
repo.add('apps', 'config', 'init.rb', 'public')
|
44
|
+
repo.add('.gitignore')
|
45
|
+
repo.commit_index(_("Created repository"))
|
46
|
+
rescue => exc
|
47
|
+
puts "Unable to init Git repo, please init manually"
|
48
|
+
end
|
45
49
|
Dir.chdir(cwd)
|
46
50
|
rescue LoadError
|
47
51
|
puts "Grit not installed, cannot init repo"
|
@@ -87,4 +91,4 @@ module Spider
|
|
87
91
|
|
88
92
|
end
|
89
93
|
|
90
|
-
end
|
94
|
+
end
|