forked from ManageIQ/manageiq-ui-classic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openstack_vm_cloud_center.rb
180 lines (180 loc) · 6.19 KB
/
openstack_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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
class ApplicationHelper::Toolbar::OpenstackVmCloudCenter < 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')),
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),
separator,
button(
:instance_attach,
'pficon pficon-volume fa-lg',
t = N_('Attach a Cloud Volume to this Instance'),
t,
:klass => ApplicationHelper::Button::InstanceAttach),
button(
:instance_detach,
'pficon pficon-volume fa-lg',
t = N_('Detach a Cloud Volume from this Instance'),
t,
:klass => ApplicationHelper::Button::InstanceDetach),
button(
:instance_associate_floating_ip,
'fa fa-map-marker fa-lg',
t = N_('Associate a Floating IP with this Instance'),
t,
:klass => ApplicationHelper::Button::InstanceAssociateFloatingIp),
button(
:instance_disassociate_floating_ip,
'fa fa-map-marker fa-lg',
t = N_('Disassociate a Floating IP from this Instance'),
t,
:klass => ApplicationHelper::Button::InstanceDisassociateFloatingIp),
button(
:instance_resize,
'pficon pficon-edit fa-lg',
t = N_('Reconfigure this Instance'),
t,
:klass => ApplicationHelper::Button::GenericFeatureButtonWithDisable,
:options => {:feature => :resize}),
button(
:vm_right_size,
'product product-custom-6 fa-lg',
N_('CPU/Memory Recommendations of this VM'),
N_('Right-Size Recommendations')),
]
),
])
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(
:instance_live_migrate,
'product product-migrate fa-lg',
t = N_('Migrate Instance'),
t,
:klass => ApplicationHelper::Button::GenericFeatureButtonWithDisable,
:options => {:feature => :live_migrate},
:url_parms => 'main_div'),
button(
:instance_evacuate,
'product product-migrate fa-lg',
t = N_('Evacuate Instance'),
t,
:klass => ApplicationHelper::Button::GenericFeatureButtonWithDisable,
:options => {:feature => :evacuate},
:url_parms => 'main_div')
]
),
])
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"),
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
end