forked from ManageIQ/manageiq-ui-classic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ems_cloud_center.rb
122 lines (122 loc) · 4.07 KB
/
ems_cloud_center.rb
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
class ApplicationHelper::Toolbar::EmsCloudCenter < ApplicationHelper::Toolbar::Basic
button_group('ems_cloud_vmdb', [
button(
:refresh_server_summary,
'fa fa-refresh fa-lg',
N_('Refresh this page'),
nil),
select(
:ems_cloud_vmdb_choice,
'fa fa-cog fa-lg',
t = N_('Configuration'),
t,
:items => [
button(
:ems_cloud_refresh,
'fa fa-refresh fa-lg',
N_('Refresh relationships and power states for all items related to this Cloud Provider'),
N_('Refresh Relationships and Power States'),
:confirm => N_("Refresh relationships and power states for all items related to this Cloud Provider?"),
:klass => ApplicationHelper::Button::EmsRefresh),
separator,
button(
:ems_cloud_user_sync,
'pficon pficon-edit fa-lg',
t = N_('Sync Users from Cloud Provider'),
t,
:url => "/sync_users",
:klass => ApplicationHelper::Button::ProviderUserSync),
button(
:ems_cloud_edit,
'pficon pficon-edit fa-lg',
t = N_('Edit this Cloud Provider'),
t,
:full_path => "<%= edit_ems_cloud_path(@ems) %>"),
button(
:ems_cloud_resume,
'pficon pficon-trend-up fa-lg',
t = N_('Resume this Cloud Provider'),
t,
:confirm => N_("Resume this Cloud Provider?"),
:enabled => proc { !@record.enabled? },
:url_parms => "main_div"),
button(
:ems_cloud_pause,
'pficon pficon-trend-down fa-lg',
t = N_('Pause this Cloud Provider'),
t,
:confirm => N_("Warning: While this provider is paused no data will be collected from it. " \
"This may cause gaps in inventory, metrics and events!"),
:enabled => proc { @record.enabled? },
:url_parms => "main_div"),
button(
:ems_cloud_delete,
'pficon pficon-delete fa-lg',
t = N_('Remove this Cloud Provider from Inventory'),
t,
:url_parms => "&refresh=y",
:confirm => N_("Warning: This Cloud Provider and ALL of its components will be permanently removed!")),
]
),
])
button_group('ems_cloud_policy', [
select(
:ems_cloud_policy_choice,
'fa fa-shield fa-lg',
t = N_('Policy'),
t,
:items => [
button(
:ems_cloud_protect,
'pficon pficon-edit fa-lg',
N_('Manage Policies for this Cloud Provider'),
N_('Manage Policies')),
button(
:ems_cloud_tag,
'pficon pficon-edit fa-lg',
N_('Edit Tags for this Cloud Provider'),
N_('Edit Tags')),
button(
:ems_cloud_check_compliance,
'fa fa-search fa-lg',
N_('Check Compliance of the last known configuration for this Cloud Manager'),
N_('Check Compliance of Last Known Configuration'),
:confirm => N_("Initiate Check Compliance of the last known configuration for this item?")),
]
),
])
button_group('ems_cloud_monitoring', [
select(
:ems_cloud_monitoring_choice,
'ff ff-monitoring fa-lg',
t = N_('Monitoring'),
t,
:items => [
button(
:ems_cloud_timeline,
'ff ff-timeline fa-lg',
N_('Show Timelines for this Cloud Provider'),
N_('Timelines'),
:klass => ApplicationHelper::Button::EmsTimeline,
:url_parms => "?display=timeline"),
]
),
])
button_group('ems_cloud_authentication', [
select(
:ems_cloud_authentication_choice,
'fa fa-lock fa-lg',
t = N_('Authentication'),
t,
:items => [
button(
:ems_cloud_recheck_auth_status,
'fa fa-search fa-lg',
N_('Re-check Authentication Status for this Cloud Provider'),
N_('Re-check Authentication Status'),
:klass => ApplicationHelper::Button::GenericFeatureButton,
:options => {:feature => :authentication_status}),
]
),
])
end