/usr/share/pcsd/views/_resource.erb is in pcs 0.9.164-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <% @pageName = @myView == "resource" ? "Resource" : "Fence Device" %>
<tr id="<%=@myView%>_title_row" {{bind-attr style="Pcs.<%=@myView%>_page"}}><td id="page_header" colspan=3>
<%= @myView == "resource" ? "RESOURCES" : "FENCE DEVICES" %>
</td>
</tr>
<tr id="<%=@myView%>_header_row" {{bind-attr style="Pcs.<%=@myView%>_page"}}>
<td id="remove_add" class="borderbottom">
<div class="x sprites"></div><div class=link">
<% if @myView == "resource" %>
<a href="#" onclick='verify_remove_resources(); return false;'>
<% else %>
<a href="#" onclick='verify_remove_fence_devices(); return false;'>
<% end %>
Remove</a> </div>
<div class="plus sprites"></div><div class="link">
<% if @myView == "resource" %>
<a href="#" onclick="show_add_resource_dialog();return false;">
<% else %>
<a href="#" onclick="$('#new_stonith_agent').dialog({title: 'Add Fence Device', modal:true, width: 'auto'});return false;">
<% end %>
Add</a> </div>
<% if @myView == "resource" %>
<div class="plus sprites"></div><div class="link"> <a href="#" onclick="create_group();return false;">Create Group</a></div>
<% else %>
<div class="configurelight sprites"></div>
<div class="link">
{{#if Pcs.is_sbd_supported}}
<a href="#" onclick="sbd_status_dialog();return false;">SBD</a>
{{else}}
<a href="#" onclick="alert('This cluster is running an old version of PCSD which does not support SBD.'); return false;">SBD</a>
{{/if}}
</div>
<% end %>
</td>
<td class="borderbottom"> </td>
<td id="tab_name" width="125">
<div style="float: left"> Edit <%= @pageName%> </div><div class="check sprites"></div>
</td>
</tr>
<tr id="<%=@myView%>_list_row" {{bind-attr style="Pcs.<%=@myView%>_page"}}>
<td id="<%=@myView%>_list" class="node_list">
<%= erb :_resource_list %>
</td>
<td id="node_info" colspan=2>
<div id="<%=@myView%>_info_div">
<% if @myView == "resource" %>
{{resource-edit resource=Pcs.resourcesContainer.cur_resource page_name="Resource" old_pcsd=Pcs.resourcesContainer.is_version_1 utilization_support=Pcs.nodesController.utilization_support}}
<% else %>
{{resource-edit resource=Pcs.resourcesContainer.cur_fence page_name="Fence device" stonith=1 old_pcsd=Pcs.resourcesContainer.is_version_1}}
<% end %>
</div>
</td>
</tr>
<% if @myView == "resource" %>
</div>
</table>
<div id="new_resource_agent" style="display: none;">
<table id="resource_selector" style="clear:left;float:left;margin-top:25px;">
<tr>
<td class="bold">Class/Provider</td>
<td>
<select id="resource_class_provider_selector">
<% @resource_agent_structures.map{|a| a[:class_provider]}.uniq.sort.each{|cp| %>
<option
<%= "selected" if cp == "ocf:heartbeat" %>
value="<%=cp%>"
><%=cp%></option>
<% } %>
</select>
</td>
</tr>
<tr>
<td class="bold">Type</td>
<td>
<select id="all_ra_types" style="display:none;">
<% @resource_agent_structures.sort_by{|a| a[:full_name].downcase}.each{|a| %>
<option value="<%=a[:full_name]%>"><%=a[:type]%></option>
<% } %>
</select>
<select id="add_ra_type" onchange="load_resource_form(this.value);">
<% @resource_agent_structures.each{|a| %>
<option width=250px value="<%=a[:full_name]%>"><%=a[:type]%></option>
<% } %>
</select>
</td>
</tr>
</table>
{{resource-form
agent=Pcs.resourcesContainer.new_resource_agent_metadata
groups=Pcs.resourcesContainer.groups_enum
table_id_suffix="_new"
}}
</div>
<div id="new_stonith_agent" style="display: none;">
<table id="stonith_selector" style="clear:left;float:left;margin-top:25px;">
<tr>
<td class="bold">Type</td>
<td>
<select id="add_stonith_type" onchange="load_resource_form(this.value,true);">
<% @stonith_agents.keys.sort_by{|a|a.downcase}.each { |name| %>
<option width=250px <%= @stonith_agents[name]["type"] == "fence_apc" ? "selected" : "" %> value="stonith:<%=@stonith_agents[name]["type"]%>"><%=@stonith_agents[name]["type"]%></option>
<% } %>
</select>
</td>
</tr>
</table>
{{fence-form
agent=Pcs.resourcesContainer.new_fence_agent_metadata
table_id_suffix="_new"
}}
</div>
<% end %>
|