forked from ManageIQ/manageiq-ui-classic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
x_vm_cloud_center.rb
142 lines (142 loc) · 4.69 KB
/
x_vm_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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
class ApplicationHelper::Toolbar::XVmCloudCenter < ApplicationHelper::Toolbar::Basic
button_group('instance_vmdb', [
select(
:instance_vmdb_choice,
'fa fa-cog fa-lg',
t = N_('Configuration'),
t,
:items => [
button(
:instance_refresh,
'fa fa-refresh fa-lg',
N_('Refresh relationships and power states for all items related to this Instance'),
N_('Refresh Relationships and Power States'),
:confirm => N_("Refresh relationships and power states for all items related to this Instance?")),
button(
:instance_scan,
'fa fa-search fa-lg',
N_('Perform SmartState Analysis on this Instance'),
N_('Perform SmartState Analysis'),
:confirm => N_("Perform SmartState Analysis on this Instance?"),
:klass => ApplicationHelper::Button::VmInstanceTemplateScan),
separator,
button(
:instance_edit,
'pficon pficon-edit fa-lg',
t = N_('Edit this Instance'),
t),
button(
:instance_ownership,
'pficon pficon-user fa-lg',
N_('Set Ownership for this Instance'),
N_('Set Ownership'),
:klass => ApplicationHelper::Button::SetOwnership
),
separator,
button(
:instance_delete,
'pficon pficon-delete fa-lg',
N_('Remove this Instance'),
N_('Remove Instance'),
:url_parms => "&refresh=y",
:confirm => N_("Warning: This Instance and ALL of its components will be permanently removed!")),
button(
:instance_evm_relationship,
'pficon pficon-edit fa-lg',
t = N_('Edit Management Engine Relationship'),
t),
]
),
])
button_group('instance_policy', [
select(
:instance_policy_choice,
'fa fa-shield fa-lg',
t = N_('Policy'),
t,
:items => [
button(
:instance_protect,
'pficon pficon-edit fa-lg',
N_('Manage Policies for this Instance'),
N_('Manage Policies')),
button(
:instance_policy_sim,
'fa fa-play-circle-o fa-lg',
N_('View Policy Simulation for this Instance'),
N_('Policy Simulation')),
button(
:instance_tag,
'pficon pficon-edit fa-lg',
N_('Edit Tags for this Instance'),
N_('Edit Tags')),
button(
:instance_check_compliance,
'fa fa-search fa-lg',
N_('Check Compliance of the last known configuration for this Instance'),
N_('Check Compliance of Last Known Configuration'),
:confirm => N_("Initiate Check Compliance of the last known configuration for this Instance?"),
:klass => ApplicationHelper::Button::InstanceCheckCompare),
]
),
])
button_group('instance_lifecycle', [
select(
:instance_lifecycle_choice,
'fa fa-recycle fa-lg',
t = N_('Lifecycle'),
t,
:items => [
button(
:instance_retire,
'fa fa-clock-o fa-lg',
N_('Set Retirement Dates for this Instance'),
N_('Set Retirement Date')),
button(
:instance_retire_now,
'fa fa-clock-o fa-lg',
t = N_('Retire this Instance'),
t,
:confirm => N_("Retire this Instance?"),
:klass => ApplicationHelper::Button::InstanceRetire),
]
),
])
button_group('instance_monitoring', [
select(
:instance_monitoring_choice,
'product product-monitoring fa-lg',
t = N_('Monitoring'),
t,
:items => [
button(
:instance_perf,
'product product-monitoring fa-lg',
N_('Show Capacity & Utilization data for this Instance'),
N_('Utilization'),
:url_parms => "?display=performance",
:klass => ApplicationHelper::Button::VmPerf),
button(
:instance_timeline,
'product product-timeline fa-lg',
N_('Show Timelines for this Instance'),
N_('Timelines'),
:klass => ApplicationHelper::Button::GenericFeatureButton,
:options => {:feature => :timeline},
:url_parms => "?display=timeline"),
]
),
])
include ApplicationHelper::Toolbar::Cloud::InstanceOperationsButtonGroupMixin
button_group('vm_access', [
button(
:cockpit_console,
'pficon pficon-screen fa-lg',
N_('Open a new browser window with Cockpit for this VM. This requires that Cockpit is pre-configured on the VM.'),
N_('Web Console'),
# :image => "cockpit",
:url => "launch_cockpit",
:klass => ApplicationHelper::Button::CockpitConsole
)
])
end