forked from ManageIQ/manageiq-ui-classic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_report_info.html.haml
134 lines (134 loc) · 4.65 KB
/
_report_info.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
= render :partial => "layouts/flash_msg"
- if @sb[:active_tab] == "report_info"
- if @sb[:miq_report_id] && @miq_report
.form-horizontal.static
.form-group
%label.control-label.col-md-2= _('Title')
.col-md-10
%p.form-control-static= @miq_report.title
- if @miq_report.conditions
.form-group
%label.control-label.col-md-2= _('Primary (Record) Filter')
.col-md-10
%p.form-control-static= @miq_report.conditions.to_human
- if @miq_report.display_filter
.form-group
%label.control-label.col-md-2= _('Secondary (Display) Filter')
.col-md-10
%p.form-control-static= @miq_report.display_filter.to_human
- if @miq_report.sortby
- sortby = []
- @miq_report.sortby.each do |s|
- sortby.push(Dictionary.gettext(s, :type => :column, :notfound => :titleize))
.form-group
%label.control-label.col-md-2= _('Sort By')
.col-md-10
%p.form-control-static= sortby.join(", ")
- if @miq_report.graph
.form-group
%label.control-label.col-md-2= _('Chart')
.col-md-10
%p.form-control-static= @miq_report.graph[:type]
.form-group
%label.control-label.col-md-2= _('Based On')
.col-md-10
%p.form-control-static= Dictionary.gettext(@miq_report.db, :type => :model, :notfound => :titleize)
.form-group
%label.control-label.col-md-2= _('User')
.col-md-10
%p.form-control-static= @miq_report.user ? @miq_report.user.userid : ""
.form-group
%label.control-label.col-md-2= Dictionary.gettext("MiqGroup", :type => :model, :notfound => :titleize)
.col-md-10
%p.form-control-static= @miq_report.miq_group ? @miq_report.miq_group.description : ""
.form-group
%label.control-label.col-md-2= _('Updated On')
.col-md-10
%p.form-control-static= format_timezone(@miq_report.updated_on, Time.zone, "gtl")
%hr
%h3
= _('Schedules')
- if @schedules.blank?
= render :partial => 'layouts/info_msg', :locals => {:message => _("Report is not Scheduled.")}
- else
%table.table.table-striped.table-bordered.table-hover
%thead
%th.table-view-pf-select
%th
= _('Name')
%th
= _('Description')
%th
= _('Active')
%th
= _('Interval')
%th
= _('Last Run Time')
%th
= _('Next Run Time')
- if super_admin_user?
%th
= _('Username')
%th
= _('Zone')
%tbody
- @schedules.each do |s|
- tz = s.run_at && s.run_at[:tz] ? s.run_at[:tz] : session[:user_tz]
- if role_allows?(:feature => "miq_report_schedules")
- params = {:title => _("View this Schedule"), :onclick => remote_function(:url => "/report/x_show/msc-#{to_cid(s.id)}?accord=schedules")}
- else
- params = {}
%tr{params}
%td.table-view-pf-select
%i.fa.fa-clock-o
%td
= s.name
%td
= s.description
%td
= s.enabled
%td
= s.run_at[:interval][:unit]
%td
- unless s.last_run_on.blank?
%center
= h(format_timezone(s.last_run_on, tz, "gtl"))
%td
- unless s.next_run_on.blank?
%center
= h(format_timezone(s.next_run_on, tz, "gtl"))
- if super_admin_user?
%td
= s.userid
%td
= s.v_zone_name
%h3
= _('Widgets')
- if @widget_nodes.blank?
= render :partial => 'layouts/info_msg', :locals => {:message => _("Report doesn't belong to Widgets.")}
- else
%table.table.table-striped.table-bordered.table-hover
%thead
%th.table-view-pf-select
%th
= _('Title')
%th
= _('Description')
%th
= _('Enabled')
%tbody
- @widget_nodes.each do |w|
- if role_allows?(:feature => "miq_report_widget_editor")
- params = {:title => _("Click to view selected widget"),
:onclick => remote_function(:url => "/report/x_show/xx-#{ReportController::Widgets::WIDGET_CONTENT_TYPE.invert[w.content_type]}_-#{to_cid(w.id)}?accord=widgets")}
- else
- params = {}
%tr{params}
%td.table-view-pf-select
%i.fa.fa-file-text-o
%td
= h(w.title)
%td
= h(w.description)
%td
= h(w.enabled)