rules_engine 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rules_engine/rule_outcome.rb +5 -0
- data/rails_generators/templates/app/rules/complex_rule.rb +5 -10
- data/rails_generators/templates/app/rules/simple_rule.rb +5 -2
- data/rails_generators/templates/app/views/re_jobs/_empty.html.erb +3 -3
- data/rails_generators/templates/app/views/re_jobs/_show.html.erb +4 -4
- data/rails_generators/templates/app/views/re_jobs/index.html.erb +2 -1
- data/rails_generators/templates/app/views/re_pipeline_rules/_change.html.erb +2 -2
- data/rails_generators/templates/app/views/re_pipeline_rules/_edit.html.erb +1 -1
- data/rails_generators/templates/app/views/re_pipeline_rules/_empty.html.erb +3 -3
- data/rails_generators/templates/app/views/re_pipeline_rules/_error.html.erb +1 -5
- data/rails_generators/templates/app/views/re_pipeline_rules/_help.html.erb +1 -1
- data/rails_generators/templates/app/views/re_pipeline_rules/_index.html.erb +2 -2
- data/rails_generators/templates/app/views/re_pipeline_rules/_new.html.erb +1 -1
- data/rails_generators/templates/app/views/re_pipeline_rules/_show.html.erb +2 -2
- data/rails_generators/templates/app/views/re_pipelines/_change.html.erb +2 -2
- data/rails_generators/templates/app/views/re_pipelines/_change_actions.html.erb +15 -15
- data/rails_generators/templates/app/views/re_pipelines/_confirm.html.erb +4 -4
- data/rails_generators/templates/app/views/re_pipelines/_edit.html.erb +1 -1
- data/rails_generators/templates/app/views/re_pipelines/_empty.html.erb +3 -3
- data/rails_generators/templates/app/views/re_pipelines/_index.html.erb +4 -4
- data/rails_generators/templates/app/views/re_pipelines/_new.html.erb +1 -1
- data/rails_generators/templates/app/views/re_pipelines/_show.html.erb +3 -3
- data/rails_generators/templates/app/views/re_pipelines/index.html.erb +6 -15
- data/rails_generators/templates/app/views/re_pipelines/show.html.erb +3 -3
- data/rails_generators/templates/app/views/re_pipelines/template.html.erb +1 -1
- data/rails_generators/templates/lib/tasks/rules_engine.rake +4 -3
- data/rails_generators/templates/public/stylesheets/re_view.css +13 -29
- data/rails_generators/templates/public/stylesheets/rules_engine.css +90 -94
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.8
|
@@ -106,24 +106,19 @@ class <%=rule_class%>Rule < RulesEngine::Rule
|
|
106
106
|
|
107
107
|
words.each do |word|
|
108
108
|
if /#{word}/i =~ sentence
|
109
|
-
job.audit("
|
109
|
+
job.audit("#{title} Found #{word}", ReJobAudit::AUDIT_INFO)
|
110
110
|
data[:match] = word
|
111
111
|
|
112
|
-
rule_outcome = RulesEngine::RuleOutcome.new
|
113
|
-
|
114
112
|
case pipeline_action
|
115
113
|
when 'stop_success'
|
116
|
-
|
114
|
+
return RulesEngine::RuleOutcome.new(RulesEngine::RuleOutcome::OUTCOME_STOP_SUCCESS)
|
117
115
|
when 'stop_failure'
|
118
|
-
|
116
|
+
return RulesEngine::RuleOutcome.new(RulesEngine::RuleOutcome::OUTCOME_STOP_FAILURE)
|
119
117
|
when 'start_pipeline'
|
120
|
-
|
121
|
-
rule_outcome.pipeline_code = pipeline
|
118
|
+
return RulesEngine::RuleOutcome.new(RulesEngine::RuleOutcome::OUTCOME_START_PIPELINE, pipeline)
|
122
119
|
else #'next'
|
123
|
-
|
120
|
+
return RulesEngine::RuleOutcome.new(RulesEngine::RuleOutcome::OUTCOME_NEXT)
|
124
121
|
end
|
125
|
-
|
126
|
-
return rule_outcome
|
127
122
|
end
|
128
123
|
end
|
129
124
|
|
@@ -71,7 +71,10 @@ class <%=rule_class%>Rule < RulesEngine::Rule
|
|
71
71
|
# execute the rule
|
72
72
|
# this rule does nothing
|
73
73
|
def process(job, data)
|
74
|
-
|
75
|
-
|
74
|
+
job.audit("Inside Rule #{title}", ReJobAudit::AUDIT_INFO)
|
75
|
+
# RulesEngine::RuleOutcome.new(RulesEngine::RuleOutcome::OUTCOME_STOP_SUCCESS)
|
76
|
+
# RulesEngine::RuleOutcome.new(RulesEngine::RuleOutcome::OUTCOME_STOP_FAILURE)
|
77
|
+
# RulesEngine::RuleOutcome.new(RulesEngine::RuleOutcome::OUTCOME_START_PIPELINE, 'next_pipeline')
|
78
|
+
RulesEngine::RuleOutcome.new(RulesEngine::RuleOutcome::OUTCOME_NEXT)
|
76
79
|
end
|
77
80
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<% local_hide = local_assigns[:hide] && hide %>
|
2
2
|
|
3
3
|
<div id="re_job_list_empty" style="<%= local_hide ? 'display:none' : '' %>">
|
4
|
-
<!-- <div class="re-redbox-header"><
|
4
|
+
<!-- <div class="re-redbox-header"><h5 class="white">No jobs have been run</h5></div> -->
|
5
5
|
<div class="re-redbox">
|
6
|
-
<
|
6
|
+
<h5 class="left-5 red">
|
7
7
|
No Jobs have been run.
|
8
|
-
</
|
8
|
+
</h5>
|
9
9
|
|
10
10
|
</div>
|
11
11
|
<div class="clear"></div>
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<div class="re-job-show span-18">
|
2
2
|
|
3
3
|
<div class="float-left">
|
4
|
-
<
|
4
|
+
<h5>
|
5
5
|
<span class="blue">Job Id :</span> <%= @re_job.id %>
|
6
|
-
</
|
6
|
+
</h5>
|
7
7
|
</div>
|
8
8
|
<div class="float-right">
|
9
|
-
<
|
9
|
+
<h5>
|
10
10
|
<span class="blue">Created :</span> <%= @re_job.created_at.strftime('%d %b %Y - %H:%M:%S') %>
|
11
|
-
</
|
11
|
+
</h5>
|
12
12
|
</div>
|
13
13
|
<div class="clear"></div>
|
14
14
|
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="data" id="re_job_audit_table">
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<% set_re_javascript_include ['re_job_index'] %>
|
2
|
-
<% set_re_breadcrumbs link_to("All Pipelines", re_pipelines_path, :class => "re-pipeline-list"),
|
2
|
+
<% set_re_breadcrumbs link_to("All Pipelines", re_pipelines_path, :class => "re-pipeline-list"),
|
3
|
+
'<span class="re-job-list">Pipeline Job Audit</span>' %>
|
3
4
|
|
4
5
|
<div class="prepend-1 span-22 append-1">
|
5
6
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<div class="span-15 last re-rule-change" id="re_rule_change_<%= re_rule.id %>">
|
6
6
|
<div class="<%= rule_error.blank? ? 're-bluebox' : 're-redbox' %> re-rule-status-<%= rule_error.blank? ? 'valid' : 'verify' %>">
|
7
|
-
<
|
7
|
+
<h4 class="float-left"><%=h re_rule.title %></h4>
|
8
8
|
<div class="float-right">
|
9
9
|
<%= link_to("<span>Edit</span>", "##{@re_pipeline.id}|#{re_rule.id}", :class => "re-rule-edit") %>
|
10
10
|
<%= link_to("<span>Delete</span>", "##{@re_pipeline.id}|#{re_rule.id}", :class => "re-rule-delete") %>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<div class="<%= rule_error.blank? ? 're-bluebox' : 're-redbox' %> no-top">
|
17
17
|
<div class="span-9">
|
18
18
|
<p class="top-5 left-10">
|
19
|
-
<%= re_rule.summary %>
|
19
|
+
<%=h re_rule.summary %>
|
20
20
|
</p>
|
21
21
|
</div>
|
22
22
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="clear prepend-1 span-18">
|
2
|
-
<
|
2
|
+
<h3 class="re-rule-edit"> Edit <%= @re_rule.rule.options[:display_name] %></h3>
|
3
3
|
<div class="clear top-10"></div>
|
4
4
|
|
5
5
|
<% re_form_for(@re_rule, :url => re_pipeline_re_rule_path(@re_pipeline, @re_rule), :method => :post, :span => "3x13", :html => {:id => "re_rule_edit_form"}) do |f| %>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<div id="re_rules_empty" style="<%= re_pipeline.re_rules.empty? ? '' : 'display:none' %>">
|
2
|
-
<div class="re-redbox-header"><
|
2
|
+
<div class="re-redbox-header"><h4 class="white">No Pipeline Rules</h4></div>
|
3
3
|
<div class="re-redbox no-top">
|
4
|
-
<div class="clear top-5
|
5
|
-
<
|
4
|
+
<div class="clear top-5">
|
5
|
+
<h5>Add rules to the pipeline.</h5>
|
6
6
|
<p class="left-10">Rules are the unique decisions made within a pipeline.</p>
|
7
7
|
</div>
|
8
8
|
</div>
|
@@ -1,5 +1 @@
|
|
1
|
-
Rule Not Found -
|
2
|
-
|
3
|
-
TODO
|
4
|
-
<br/>
|
5
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
1
|
+
<h2>Rule Not Found - <span class="red"><%= params[:rule_class_name].blank? ? 'param :rule_class_name missing' : params[:rule_class_name] %></span></h2>
|
@@ -8,9 +8,9 @@
|
|
8
8
|
<% end %>
|
9
9
|
|
10
10
|
<div class="span-6 <%= local_new_row ? 'left-20' : 'left-10' %> re-rule-show">
|
11
|
-
<div class="<%= re_rule_error.blank? ? 're-bluebox' : 're-redbox' %> re-rule-status-<%= re_rule_error.blank? ? 'valid' : 'verify' %>"><%= re_rule.title %></div>
|
11
|
+
<div class="<%= re_rule_error.blank? ? 're-bluebox' : 're-redbox' %> re-rule-status-<%= re_rule_error.blank? ? 'valid' : 'verify' %>"><%=h re_rule.title %></div>
|
12
12
|
<div class="<%= re_rule_error.blank? ? 're-bluebox' : 're-redbox' %> no-top">
|
13
|
-
<p class="top-5"><%= re_rule.summary %></p>
|
13
|
+
<p class="top-5"><%=h re_rule.summary %></p>
|
14
14
|
<div class="top-10 float-right">
|
15
15
|
<% if re_rule.re_rule_expected_outcomes.empty? %>
|
16
16
|
<div class="re-rule-continue">Continue</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="clear span-18">
|
2
|
-
<
|
2
|
+
<h3 class="re-rule-class-new"> New : <%= @re_rule.rule.options[:display_name] %></h3>
|
3
3
|
<div class="clear top-10"></div>
|
4
4
|
|
5
5
|
<% re_form_for(@re_rule, :url => re_pipeline_re_rules_path(@re_pipeline), :method => :post, :span => "3x15", :html => {:id => "re_rule_new_form"}) do |f| %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<div class="span-15 last re-rule-change" id="re_rule_change_<%= re_rule.id %>">
|
6
6
|
<div class="<%= re_rule_error.blank? ? 're-bluebox' : 're-redbox' %> re-rule-status-<%= re_rule_error.blank? ? 'valid' : 'verify' %>">
|
7
|
-
<
|
7
|
+
<h4 class="float-left"><%=h re_rule.title %></h4>
|
8
8
|
<div class="float-right">
|
9
9
|
<!-- NO ACTIONS ON THE RULE -->
|
10
10
|
<p class="red smalltext"><%= re_rule_error %></p>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<div class="<%= re_rule_error.blank? ? 're-bluebox' : 're-redbox' %> no-top">
|
15
15
|
<div class="span-9">
|
16
16
|
<p class="top-5 left-10">
|
17
|
-
<%= re_rule.summary %>
|
17
|
+
<%=h re_rule.summary %>
|
18
18
|
</p>
|
19
19
|
</div>
|
20
20
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="span-16">
|
5
5
|
<div class="re-infobox">
|
6
6
|
<div class="span-9" id="re_pipeline_code">
|
7
|
-
<
|
7
|
+
<h4 class="re-pipeline-status-<%= @pipeline_error.blank? ? re_pipeline_status : 'verify' %>"><%=h @re_pipeline.code%></h4>
|
8
8
|
</div>
|
9
9
|
<div class="span-6 last">
|
10
10
|
<% if pipeline_error.blank? %>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<div class="clear"></div>
|
18
18
|
|
19
19
|
<div class="span-14 prepend-1 last">
|
20
|
-
<
|
20
|
+
<h6 id="re_pipeline_title"> <%=h @re_pipeline.title%></h6>
|
21
21
|
</div>
|
22
22
|
<div class="clear"></div>
|
23
23
|
|
@@ -1,34 +1,34 @@
|
|
1
1
|
<% changed_status = @re_pipeline.changed_status %>
|
2
2
|
|
3
|
-
<
|
4
|
-
<%= link_to("Edit
|
5
|
-
</
|
3
|
+
<h4 class="re-pipeline-edit clear">
|
4
|
+
<%= link_to("Edit Details", "##{@re_pipeline.id}", :id => "re_pipeline_edit") %>
|
5
|
+
</h4>
|
6
6
|
|
7
7
|
<% if changed_status == RePipelineBase::CHANGED_STATUS_DRAFT && !@re_pipeline.pipeline_error %>
|
8
|
-
<
|
8
|
+
<h4 class="re-pipeline-activate float-left clear">
|
9
9
|
<%= link_to("Activate Pipeline", "##{@re_pipeline.id}", :id => "re_pipeline_activate") %>
|
10
|
-
</
|
10
|
+
</h4>
|
11
11
|
<% end %>
|
12
12
|
<% if changed_status == RePipelineBase::CHANGED_STATUS_CHANGED && !@re_pipeline.pipeline_error %>
|
13
|
-
<
|
14
|
-
<%= link_to("Activate
|
15
|
-
</
|
13
|
+
<h4 class="re-pipeline-activate float-left clear">
|
14
|
+
<%= link_to("Activate Changes", "##{@re_pipeline.id}", :id => "re_pipeline_activate") %>
|
15
|
+
</h4>
|
16
16
|
<% end %>
|
17
17
|
|
18
18
|
<% if changed_status != RePipelineBase::CHANGED_STATUS_DRAFT && changed_status != RePipelineBase::CHANGED_STATUS_CHANGED %>
|
19
|
-
<
|
19
|
+
<h4 class="re-pipeline-deactivate float-left clear">
|
20
20
|
<%= link_to("Deactivate Pipeline", "##{@re_pipeline.id}", :id => "re_pipeline_deactivate") %>
|
21
|
-
</
|
21
|
+
</h4>
|
22
22
|
<% end %>
|
23
23
|
|
24
24
|
<% if changed_status == RePipelineBase::CHANGED_STATUS_CHANGED %>
|
25
|
-
<
|
26
|
-
<%= link_to("Discard
|
27
|
-
</
|
25
|
+
<h4 class="re-pipeline-revert float-left clear">
|
26
|
+
<%= link_to("Discard Changes", "##{@re_pipeline.id}", :id => "re_pipeline_revert") %>
|
27
|
+
</h4>
|
28
28
|
<% end %>
|
29
29
|
|
30
30
|
<% if changed_status == RePipelineBase::CHANGED_STATUS_DRAFT %>
|
31
|
-
<
|
31
|
+
<h4 class="re-pipeline-delete float-left clear">
|
32
32
|
<%= link_to("Delete Pipeline", "##{@re_pipeline.id}", :id => "re_pipeline_delete") %>
|
33
|
-
</
|
33
|
+
</h4>
|
34
34
|
<% end %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div id="re_pipeline_action_confirm">
|
3
3
|
<div class="span-14 last">
|
4
4
|
<% re_whitebox do %>
|
5
|
-
<
|
5
|
+
<h3 class="re-pipeline-alert red" id="re_pipeline_action_title"></h3>
|
6
6
|
<div class="clear top-5"></div>
|
7
7
|
<hr/>
|
8
8
|
<div class="clear top-5"></div>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<div class="clear"></div>
|
13
13
|
|
14
14
|
<div class="span-12 prepend-1 last">
|
15
|
-
<
|
15
|
+
<h6 id="re_pipeline_action_content_title"></h6>
|
16
16
|
</div>
|
17
17
|
<div class="clear"></div>
|
18
18
|
<%= re_button_link_green('Action', "#", :id => "re_pipeline_action_ok") %>
|
@@ -24,10 +24,10 @@
|
|
24
24
|
<div id="re_rule_delete_confirm">
|
25
25
|
<div class="span-11 last">
|
26
26
|
<% re_whitebox do %>
|
27
|
-
<
|
27
|
+
<h3 class="re-pipeline-delete red">Confirm Delete</h3>
|
28
28
|
<div class="clear top-5"></div>
|
29
29
|
<hr/>
|
30
|
-
<
|
30
|
+
<h6 class="float-left"><strong>This cannot be undone !!!</strong></h6>
|
31
31
|
<%= re_button_link_green('Delete', "#", :id => "re_rule_delete_ok") %>
|
32
32
|
<%= re_button_link_orange('Cancel', "#", :id => "re_rule_delete_cancel") %>
|
33
33
|
<div class="clear"></div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="clear prepend-1 span-18">
|
2
|
-
<
|
2
|
+
<h3 class="re-pipeline-edit">Edit Pipeline Details</h3>
|
3
3
|
<div class="clear top-10"></div>
|
4
4
|
|
5
5
|
<% re_form_for(@re_pipeline, :url => re_pipeline_path(@re_pipeline), :method => :post, :span => "3x13", :html => {:id => "re_pipeline_edit_form"}) do |f| %>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<% local_hide = local_assigns[:hide] && hide %>
|
2
2
|
|
3
3
|
<div class="span-16" id="re_pipelines_empty" style="<%= local_hide ? 'display:none' : '' %>">
|
4
|
-
<div class="re-redbox-header"><
|
4
|
+
<div class="re-redbox-header"><h4 class="white">No Pipelines Defined</h4></div>
|
5
5
|
<div class="re-redbox no-top">
|
6
|
-
<div class="clear top-5
|
7
|
-
<
|
6
|
+
<div class="clear top-5">
|
7
|
+
<h5>Create a new pipeline and define the rules.</h5>
|
8
8
|
<p class="left-10">Pipelines are groups of rules that are executed in succession.</p>
|
9
9
|
</div>
|
10
10
|
</div>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
<div class="span-16" id="re_pipeline_index_<%= re_pipeline.id %>" style="<%= local_hide ? 'display:none' : '' %>">
|
6
6
|
<div class="re-infobox">
|
7
7
|
<div class="span-10">
|
8
|
-
<
|
8
|
+
<h4 class="re-pipeline-status-<%= re_pipeline_error.blank? ? re_pipeline_status : 'verify' %>"><%=h re_pipeline.code %></h4>
|
9
9
|
</div>
|
10
10
|
<div class="span-5 last">
|
11
11
|
<div>
|
12
12
|
<% if rules_engine_editor? %>
|
13
|
-
<
|
13
|
+
<h4 class="re-pipeline-change float-right"><%= link_to("Edit", change_re_pipeline_path(re_pipeline)) %></h4>
|
14
14
|
<% end %>
|
15
|
-
<
|
15
|
+
<h4 class="re-pipeline-show float-right"><%= link_to("View", re_pipeline_path(re_pipeline)) %></h4>
|
16
16
|
</div>
|
17
17
|
</div>
|
18
18
|
<div class="clear"></div>
|
@@ -28,7 +28,7 @@
|
|
28
28
|
</a>
|
29
29
|
</div>
|
30
30
|
<div class="span-9">
|
31
|
-
<
|
31
|
+
<h6 class="left-20"> <%=h re_pipeline.title%></h6>
|
32
32
|
</div>
|
33
33
|
<div class="span-5 last">
|
34
34
|
<% if re_pipeline_error.blank? %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="clear prepend-1 span-18">
|
2
|
-
<
|
2
|
+
<h3 class="re-pipeline-new"> New Pipeline</h3>
|
3
3
|
<div class="clear top-10"></div>
|
4
4
|
|
5
5
|
<% re_form_for(@re_pipeline, :url => re_pipelines_path, :method => :post, :span => "3x13", :html => {:id => "re_pipeline_new_form"}) do |f| %>
|
@@ -4,16 +4,16 @@
|
|
4
4
|
<div class="span-16">
|
5
5
|
<div class="re-infobox">
|
6
6
|
<div class="span-10">
|
7
|
-
<
|
7
|
+
<h4 class="re-pipeline-status-<%= re_pipeline_error.blank? ? re_pipeline_status : 'verify' %>"><%=h @re_pipeline.code %></h4>
|
8
8
|
</div>
|
9
9
|
<div class="span-5 last">
|
10
10
|
<% if rules_engine_editor? %>
|
11
|
-
<
|
11
|
+
<h4 class="re-pipeline-change float-right"><%= link_to("Edit", change_re_pipeline_path(@re_pipeline)) %></h4>
|
12
12
|
<% end %>
|
13
13
|
</div>
|
14
14
|
<div class="clear"></div>
|
15
15
|
<div class="span-9 prepend-1">
|
16
|
-
<
|
16
|
+
<h6> <%=h @re_pipeline.title%></h6>
|
17
17
|
</div>
|
18
18
|
<div class="span-5 last">
|
19
19
|
<% if re_pipeline_error.blank? %>
|
@@ -17,20 +17,20 @@
|
|
17
17
|
</div>
|
18
18
|
<div class="span-7 last">
|
19
19
|
<% if rules_engine_editor? && !@re_pipelines.empty? %>
|
20
|
-
<
|
20
|
+
<h4 class="re-pipeline-activate-all float-left clear">
|
21
21
|
<%= link_to("Activate All Pipelines", "#", :id => "re_pipeline_activate_all") %>
|
22
|
-
</
|
22
|
+
</h4>
|
23
23
|
<div class="clear top-50"></div>
|
24
24
|
<% end %>
|
25
25
|
|
26
|
-
<
|
26
|
+
<h4 class="re-job-list">
|
27
27
|
<%= link_to("Pipeline Job Audit", re_jobs_path) %>
|
28
|
-
</
|
28
|
+
</h4>
|
29
29
|
|
30
30
|
<%= render '/re_jobs/empty', :hide => true %>
|
31
31
|
|
32
32
|
<div id="re_job_list_pending" class="re-infobox">
|
33
|
-
<
|
33
|
+
<h4 class="left-20">Updating Job List</h4>
|
34
34
|
</div>
|
35
35
|
|
36
36
|
<div id="re_job_list">
|
@@ -45,19 +45,10 @@
|
|
45
45
|
<div id="re_pipeline_activate_all_confirm">
|
46
46
|
<div class="span-14 last">
|
47
47
|
<% re_whitebox do %>
|
48
|
-
<
|
48
|
+
<h3 class="re-pipeline-activate-all red" id="re_pipeline_action_title">Confirm : Activate All Pipelines</h3>
|
49
49
|
<div class="clear top-5"></div>
|
50
50
|
<hr/>
|
51
51
|
<div class="clear top-5"></div>
|
52
|
-
|
53
|
-
<div class="span-13 last" id="re_pipeline_action_content_code">
|
54
|
-
</div>
|
55
|
-
<div class="clear"></div>
|
56
|
-
|
57
|
-
<div class="span-12 prepend-1 last">
|
58
|
-
<h5 id="re_pipeline_action_content_title"></h5>
|
59
|
-
</div>
|
60
|
-
<div class="clear"></div>
|
61
52
|
<%= re_button_link_green('Activate All Pipelines', "#", :id => "re_pipeline_activate_all_ok") %>
|
62
53
|
<%= re_button_link_orange('Cancel', "#", :id => "re_pipeline_activate_all_cancel") %>
|
63
54
|
<% end %>
|
@@ -18,14 +18,14 @@
|
|
18
18
|
<div class="span-7 last">
|
19
19
|
<div class="top-5"></div>
|
20
20
|
|
21
|
-
<
|
21
|
+
<h4 class="re-job-list">
|
22
22
|
<%= link_to("Pipeline Job Audit", re_pipeline_re_jobs_path(@re_pipeline)) %>
|
23
|
-
</
|
23
|
+
</h4>
|
24
24
|
|
25
25
|
<%= render '/re_jobs/empty', :hide => true %>
|
26
26
|
|
27
27
|
<div id="re_job_list_pending" class="re-infobox">
|
28
|
-
<
|
28
|
+
<h4 class="left-20">Updating Job List</h4>
|
29
29
|
<a id="re_job_list_pipeline" href="#<%= @re_pipeline.id %>"></a>
|
30
30
|
</div>
|
31
31
|
|
@@ -100,7 +100,7 @@
|
|
100
100
|
<%= re_password_field("PASSWORD FIELD", "text_field_1", "text_field_1")%>
|
101
101
|
<%= re_check_box "CHECKBOX FIELD", 'accept'%>
|
102
102
|
<%= re_check_box "CHECKBOX FIELD", 'accept', "1", "1", :required => true %>
|
103
|
-
<%= re_select "SELECT FIELD", "people", "<option>David</option>" %>
|
103
|
+
<%= re_select "SELECT FIELD", "people", "<option>David</option><option>John</option><option>Mary</option>" %>
|
104
104
|
<%= re_text_area "TEXT AREA FIELD", "text_area", "", :size => "30x10" %>
|
105
105
|
|
106
106
|
|
@@ -10,7 +10,8 @@ task :rules_engine => :environment do
|
|
10
10
|
job = RulesEngine::Job.create
|
11
11
|
# job = RulesEngine::Job.open(job.re_job.id)
|
12
12
|
|
13
|
-
|
13
|
+
success = job.run(data[:pipeline_code], data)
|
14
14
|
|
15
|
-
puts "rule
|
16
|
-
end
|
15
|
+
puts "rule #{success ? 'succeeded' : 'failed'} : data = #{data.inspect}"
|
16
|
+
end
|
17
|
+
|
@@ -3,7 +3,6 @@ html, body {
|
|
3
3
|
margin: 0px;
|
4
4
|
padding: 0px;
|
5
5
|
font-size: 14px;
|
6
|
-
/* color: #000;*/
|
7
6
|
color: #222;
|
8
7
|
background: #2F323C;
|
9
8
|
font-family: "Lucida Grande","Lucida Sans Unicode",verdana,arial,helvetica,sans-serif;
|
@@ -16,52 +15,37 @@ html, body {
|
|
16
15
|
|
17
16
|
h1, h2, h3, h4, h5, h6 {
|
18
17
|
font-weight:normal;
|
19
|
-
/* color:#111;*/
|
20
18
|
color: #222;
|
21
19
|
}
|
22
20
|
h1 {
|
23
21
|
font-size:36px;
|
24
22
|
line-height:42px;
|
25
|
-
padding-top:6px;
|
26
|
-
padding-bottom:3px;
|
27
23
|
margin: 0px 6px;
|
28
24
|
}
|
29
25
|
h2 {
|
30
|
-
font-size:
|
31
|
-
line-height:
|
32
|
-
padding-top:6px;
|
33
|
-
padding-bottom:3px;
|
26
|
+
font-size:30px;
|
27
|
+
line-height:36px;
|
34
28
|
margin: 0px 6px;
|
35
29
|
}
|
36
30
|
h3 {
|
37
|
-
font-size:
|
38
|
-
line-height:
|
39
|
-
padding-top:6px;
|
40
|
-
padding-bottom:3px;
|
31
|
+
font-size:24px;
|
32
|
+
line-height:30px;
|
41
33
|
margin: 0px 6px;
|
42
34
|
}
|
43
35
|
h4 {
|
44
|
-
font-size:
|
45
|
-
line-height:
|
46
|
-
|
47
|
-
padding-top:4px;
|
48
|
-
padding-bottom:3px;
|
49
|
-
margin: 0px 3px;
|
36
|
+
font-size:20px;
|
37
|
+
line-height:24px;
|
38
|
+
margin: 0px 6px;
|
50
39
|
}
|
51
40
|
h5 {
|
52
|
-
font-size:
|
53
|
-
line-height:
|
54
|
-
|
55
|
-
padding-bottom:3px;
|
56
|
-
margin: 0px 3px;
|
41
|
+
font-size:18px;
|
42
|
+
line-height:22px;
|
43
|
+
margin: 0px 6px;
|
57
44
|
}
|
58
45
|
h6 {
|
59
|
-
font-size:
|
60
|
-
line-height:
|
61
|
-
|
62
|
-
padding-top:4px;
|
63
|
-
padding-bottom:3px;
|
64
|
-
margin: 0px 3px;
|
46
|
+
font-size:16px;
|
47
|
+
line-height:20px;
|
48
|
+
margin: 0px 6px;
|
65
49
|
}
|
66
50
|
p {
|
67
51
|
font-size:14px;
|
@@ -21,63 +21,59 @@
|
|
21
21
|
}
|
22
22
|
|
23
23
|
/* sub headers*/
|
24
|
-
|
25
|
-
background: transparent url('./rules_engine/re_pipeline/alert-25.png') no-repeat left
|
26
|
-
padding:
|
24
|
+
h3.re-pipeline-alert {
|
25
|
+
background: transparent url('./rules_engine/re_pipeline/alert-25.png') no-repeat left 2px;
|
26
|
+
padding: 0 0 0 28px;
|
27
27
|
}
|
28
|
-
|
29
|
-
background: transparent url('./rules_engine/re_pipeline/
|
30
|
-
padding:
|
28
|
+
h3.re-pipeline-new {
|
29
|
+
background: transparent url('./rules_engine/re_pipeline/new-25.png') no-repeat left 2px;
|
30
|
+
padding: 0 0 0 28px;
|
31
31
|
}
|
32
|
-
|
33
|
-
background: transparent url('./rules_engine/re_pipeline/
|
34
|
-
padding:
|
32
|
+
h3.re-pipeline-edit {
|
33
|
+
background: transparent url('./rules_engine/re_pipeline/edit-25.png') no-repeat left 2px;
|
34
|
+
padding: 0 0 0 28px;
|
35
35
|
}
|
36
|
-
|
37
|
-
background: transparent url('./rules_engine/re_pipeline/
|
38
|
-
padding:
|
36
|
+
h3.re-pipeline-change {
|
37
|
+
background: transparent url('./rules_engine/re_pipeline/change-25.png') no-repeat left 2px;
|
38
|
+
padding: 0 0 0 28px;
|
39
39
|
}
|
40
|
-
|
41
|
-
background: transparent url('./rules_engine/re_pipeline/
|
42
|
-
padding:
|
40
|
+
h3.re-pipeline-activate-all {
|
41
|
+
background: transparent url('./rules_engine/re_pipeline/activate-25.png') no-repeat left 2px;
|
42
|
+
padding: 0 0 0 28px;
|
43
43
|
}
|
44
|
-
|
45
|
-
background: transparent url('./rules_engine/re_pipeline/activate-25.png') no-repeat left
|
46
|
-
padding:
|
44
|
+
h3.re-pipeline-activate {
|
45
|
+
background: transparent url('./rules_engine/re_pipeline/activate-25.png') no-repeat left 2px;
|
46
|
+
padding: 0 0 0 28px;
|
47
47
|
}
|
48
|
-
|
49
|
-
background: transparent url('./rules_engine/re_pipeline/
|
50
|
-
padding:
|
51
|
-
}
|
52
|
-
h2.re-pipeline-deactivate {
|
53
|
-
background: transparent url('./rules_engine/re_pipeline/deactivate-25.png') no-repeat left top;
|
54
|
-
padding: 0px 0 0 28px;
|
48
|
+
h3.re-pipeline-deactivate {
|
49
|
+
background: transparent url('./rules_engine/re_pipeline/deactivate-25.png') no-repeat left 2px;
|
50
|
+
padding: 0 0 0 28px;
|
55
51
|
}
|
56
|
-
|
57
|
-
background: transparent url('./rules_engine/re_pipeline/revert-25.png') no-repeat left
|
58
|
-
padding:
|
52
|
+
h3.re-pipeline-revert {
|
53
|
+
background: transparent url('./rules_engine/re_pipeline/revert-25.png') no-repeat left 2px;
|
54
|
+
padding: 0 0 0 28px;
|
59
55
|
}
|
60
|
-
|
61
|
-
background: transparent url('./rules_engine/re_pipeline/destroy-25.png') no-repeat left
|
62
|
-
padding:
|
56
|
+
h3.re-pipeline-delete {
|
57
|
+
background: transparent url('./rules_engine/re_pipeline/destroy-25.png') no-repeat left 2px;
|
58
|
+
padding: 0 0 0 28px;
|
63
59
|
}
|
64
60
|
|
65
61
|
/* pipeline-status*/
|
66
|
-
|
62
|
+
h4.re-pipeline-status-draft {
|
67
63
|
background: transparent url('./rules_engine/re_pipeline/draft-25.png') no-repeat left top;
|
68
|
-
padding:
|
64
|
+
padding: 0 0 0 28px;
|
69
65
|
}
|
70
|
-
|
66
|
+
h4.re-pipeline-status-changed {
|
71
67
|
background: transparent url('./rules_engine/re_pipeline/changed-25.png') no-repeat left top;
|
72
|
-
padding:
|
68
|
+
padding: 0 0 0 28px;
|
73
69
|
}
|
74
|
-
|
70
|
+
h4.re-pipeline-status-current {
|
75
71
|
background: transparent url('./rules_engine/re_pipeline/current-25.png') no-repeat left top;
|
76
|
-
padding:
|
72
|
+
padding: 0 0 0 28px;
|
77
73
|
}
|
78
|
-
|
74
|
+
h4.re-pipeline-status-verify {
|
79
75
|
background: transparent url('./rules_engine/re_pipeline/verify-25.png') no-repeat left top;
|
80
|
-
padding:
|
76
|
+
padding: 0 0 0 28px;
|
81
77
|
}
|
82
78
|
/* pipeline status text */
|
83
79
|
em.re-pipeline-status-draft {
|
@@ -94,126 +90,126 @@ em.re-pipeline-status-verify {
|
|
94
90
|
}
|
95
91
|
|
96
92
|
/* pipeline actions */
|
97
|
-
|
93
|
+
h4.re-pipeline-new {
|
98
94
|
padding: 0 0 4px 0;
|
99
95
|
}
|
100
|
-
|
96
|
+
h4.re-pipeline-new a {
|
101
97
|
background: transparent url('./rules_engine/re_pipeline/new-25.png') no-repeat left -1px;
|
102
|
-
padding:
|
98
|
+
padding: 0 0 0 28px;
|
103
99
|
color: #218868;
|
104
100
|
text-decoration: none;
|
105
101
|
}
|
106
|
-
|
102
|
+
h4.re-pipeline-new a:hover {
|
107
103
|
text-decoration: underline;
|
108
104
|
}
|
109
|
-
|
105
|
+
h4.re-job-list {
|
110
106
|
padding: 0 0 4px 0;
|
111
107
|
}
|
112
|
-
|
108
|
+
h4.re-job-list a {
|
113
109
|
background: transparent url('./rules_engine/re_job/list-25.png') no-repeat left -1px;
|
114
|
-
padding:
|
110
|
+
padding: 0 0 0 28px;
|
115
111
|
color: #244A9F;
|
116
112
|
text-decoration: none;
|
117
113
|
}
|
118
|
-
|
114
|
+
h4.re-job-list a:hover {
|
119
115
|
text-decoration: underline;
|
120
116
|
}
|
121
|
-
|
117
|
+
h4.re-pipeline-show {
|
122
118
|
/* padding: 0 0 4px 0;*/
|
123
119
|
padding: 0;
|
124
120
|
}
|
125
|
-
|
121
|
+
h4.re-pipeline-show a {
|
126
122
|
background: transparent url('./rules_engine/re_pipeline/show-25.png') no-repeat left -1px;
|
127
|
-
padding:
|
123
|
+
padding: 0 0 0 28px;
|
128
124
|
color: #92b83c;
|
129
125
|
text-decoration: none;
|
130
126
|
}
|
131
|
-
|
127
|
+
h4.re-pipeline-show a:hover {
|
132
128
|
text-decoration: underline;
|
133
129
|
}
|
134
|
-
|
130
|
+
h4.re-pipeline-change {
|
135
131
|
/* padding: 0 0 4px 0;*/
|
136
132
|
padding: 0;
|
137
133
|
}
|
138
|
-
|
134
|
+
h4.re-pipeline-change a {
|
139
135
|
background: transparent url('./rules_engine/re_pipeline/change-25.png') no-repeat left -1px;
|
140
|
-
padding:
|
136
|
+
padding: 0 0 0 28px;
|
141
137
|
color: #218868;
|
142
138
|
text-decoration: none;
|
143
139
|
}
|
144
|
-
|
140
|
+
h4.re-pipeline-change a:hover {
|
145
141
|
text-decoration: underline;
|
146
142
|
}
|
147
|
-
|
143
|
+
h4.re-pipeline-edit {
|
148
144
|
padding: 0 0 4px 0;
|
149
145
|
}
|
150
|
-
|
146
|
+
h4.re-pipeline-edit a {
|
151
147
|
background: transparent url('./rules_engine/re_pipeline/edit-25.png') no-repeat left -1px;
|
152
|
-
padding:
|
148
|
+
padding: 0 0 0 28px;
|
153
149
|
color: #218868;
|
154
150
|
text-decoration: none;
|
155
151
|
}
|
156
|
-
|
152
|
+
h4.re-pipeline-edit a:hover {
|
157
153
|
text-decoration: underline;
|
158
154
|
}
|
159
|
-
|
155
|
+
h4.re-pipeline-activate-all {
|
160
156
|
padding: 0 0 4px 0;
|
161
157
|
}
|
162
|
-
|
158
|
+
h4.re-pipeline-activate-all a {
|
163
159
|
background: transparent url('./rules_engine/re_pipeline/activate-25.png') no-repeat left -1px;
|
164
|
-
padding:
|
160
|
+
padding: 0 0 0 28px;
|
165
161
|
color: #218868;
|
166
162
|
text-decoration: none;
|
167
163
|
}
|
168
|
-
|
164
|
+
h4.re-pipeline-activate-all a:hover {
|
169
165
|
text-decoration: underline;
|
170
166
|
}
|
171
|
-
|
167
|
+
h4.re-pipeline-activate {
|
172
168
|
padding: 0 0 4px 0;
|
173
169
|
}
|
174
|
-
|
170
|
+
h4.re-pipeline-activate a {
|
175
171
|
background: transparent url('./rules_engine/re_pipeline/activate-25.png') no-repeat left -1px;
|
176
|
-
padding:
|
172
|
+
padding: 0 0 0 28px;
|
177
173
|
color: #92b83c;
|
178
174
|
text-decoration: none;
|
179
175
|
}
|
180
|
-
|
176
|
+
h4.re-pipeline-activate a:hover {
|
181
177
|
text-decoration: underline;
|
182
178
|
}
|
183
|
-
|
179
|
+
h4.re-pipeline-deactivate {
|
184
180
|
padding: 0 0 4px 0;
|
185
181
|
}
|
186
|
-
|
182
|
+
h4.re-pipeline-deactivate a {
|
187
183
|
background: transparent url('./rules_engine/re_pipeline/deactivate-25.png') no-repeat left -1px;
|
188
|
-
padding:
|
184
|
+
padding: 0 0 0 28px;
|
189
185
|
color: #b43838;
|
190
186
|
text-decoration: none;
|
191
187
|
}
|
192
|
-
|
188
|
+
h4.re-pipeline-deactivate a:hover {
|
193
189
|
text-decoration: underline;
|
194
190
|
}
|
195
|
-
|
191
|
+
h4.re-pipeline-revert {
|
196
192
|
padding: 0 0 4px 0;
|
197
193
|
}
|
198
|
-
|
194
|
+
h4.re-pipeline-revert a {
|
199
195
|
background: transparent url('./rules_engine/re_pipeline/revert-25.png') no-repeat left -1px;
|
200
|
-
padding:
|
196
|
+
padding: 0 0 0 28px;
|
201
197
|
color: #b43838;
|
202
198
|
text-decoration: none;
|
203
199
|
}
|
204
|
-
|
200
|
+
h4.re-pipeline-revert a:hover {
|
205
201
|
text-decoration: underline;
|
206
202
|
}
|
207
|
-
|
203
|
+
h4.re-pipeline-delete {
|
208
204
|
padding: 0 0 4px 0;
|
209
205
|
}
|
210
|
-
|
206
|
+
h4.re-pipeline-delete a {
|
211
207
|
background: transparent url('./rules_engine/re_pipeline/destroy-25.png') no-repeat left -1px;
|
212
|
-
padding:
|
208
|
+
padding: 0 0 0 28px;
|
213
209
|
color: #b43838;
|
214
210
|
text-decoration: none;
|
215
211
|
}
|
216
|
-
|
212
|
+
h4.re-pipeline-delete a:hover {
|
217
213
|
text-decoration: underline;
|
218
214
|
}
|
219
215
|
|
@@ -233,17 +229,17 @@ div.re-pipeline-rule-list-down {
|
|
233
229
|
}
|
234
230
|
|
235
231
|
/* rules */
|
236
|
-
|
237
|
-
background: transparent url('./rules_engine/re_rule_class/new-25.png') no-repeat left
|
238
|
-
padding:
|
232
|
+
h3.re-rule-class-new {
|
233
|
+
background: transparent url('./rules_engine/re_rule_class/new-25.png') no-repeat left 2px;
|
234
|
+
padding: 0 0 0 28px;
|
239
235
|
}
|
240
|
-
|
241
|
-
background: transparent url('./rules_engine/re_rule_class/help-25.png') no-repeat left
|
242
|
-
padding:
|
236
|
+
h3.re-rule-class-help {
|
237
|
+
background: transparent url('./rules_engine/re_rule_class/help-25.png') no-repeat left 2px;
|
238
|
+
padding: 0 0 0 28px;
|
243
239
|
}
|
244
|
-
|
245
|
-
background: transparent url('./rules_engine/re_rule/edit-25.png') no-repeat left
|
246
|
-
padding:
|
240
|
+
h3.re-rule-edit {
|
241
|
+
background: transparent url('./rules_engine/re_rule/edit-25.png') no-repeat left 2px;
|
242
|
+
padding: 0 0 0 28px;
|
247
243
|
}
|
248
244
|
|
249
245
|
.re-rule-show p{
|
@@ -268,7 +264,7 @@ h2.re-rule-edit {
|
|
268
264
|
}
|
269
265
|
.re-rule-change div.re-rule-status-valid {
|
270
266
|
background: transparent url('./rules_engine/re_rule/valid-25.png') no-repeat 2px 2px;
|
271
|
-
padding: 2px 0 4px
|
267
|
+
padding: 2px 0 4px 24px;
|
272
268
|
}
|
273
269
|
.re-rule-change div.re-rule-status-verify {
|
274
270
|
background: #FBE3E4 url('./rules_engine/re_rule/verify-25.png') no-repeat 2px 2px;
|
@@ -424,17 +420,17 @@ a.re-rule-class-help span {
|
|
424
420
|
}
|
425
421
|
|
426
422
|
/* jobs */
|
427
|
-
#re_job_list
|
423
|
+
#re_job_list h4 {
|
428
424
|
color: #244A9F;
|
429
425
|
background: transparent url('./rules_engine/re_job/list-25.png') no-repeat 0px 4px;
|
430
426
|
padding: 5px 0 5px 32px;
|
431
427
|
}
|
432
|
-
.re-job-show
|
428
|
+
.re-job-show h4 {
|
433
429
|
background: transparent url('./rules_engine/re_job/list-25.png') no-repeat 0px 0px;
|
434
430
|
padding: 0px 0 5px 32px;
|
435
431
|
}
|
436
432
|
|
437
|
-
#re_job_list_empty
|
433
|
+
#re_job_list_empty h4 {
|
438
434
|
font-size:16px;
|
439
435
|
line-height:18px;
|
440
436
|
font-weight:normal;
|
@@ -443,7 +439,7 @@ a.re-rule-class-help span {
|
|
443
439
|
margin: 0px 3px;
|
444
440
|
}
|
445
441
|
|
446
|
-
#re_job_list_empty
|
442
|
+
#re_job_list_empty h5 {
|
447
443
|
font-size:16px;
|
448
444
|
line-height:18px;
|
449
445
|
font-weight:normal;
|
@@ -456,7 +452,7 @@ a.re-rule-class-help span {
|
|
456
452
|
background: transparent url('./rules_engine/re_job/loadingAnimation.gif') no-repeat 20px 10px;
|
457
453
|
padding : 20px 0px 5px 15px;
|
458
454
|
}
|
459
|
-
#re_job_list_pending
|
455
|
+
#re_job_list_pending h4 {
|
460
456
|
background: transparent url('./rules_engine/re_job/list-25.png') no-repeat 0px 4px;
|
461
457
|
padding: 5px 0 5px 32px;
|
462
458
|
color: #bbb;
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rules_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 8
|
10
|
+
version: 0.0.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Chris Douglas
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-06-
|
18
|
+
date: 2010-06-25 00:00:00 +10:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|