/usr/share/pcsd/views/main.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 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 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 | <!DOCTYPE html>
<head>
<title>Pacemaker/Corosync Configuration</title>
<link rel="stylesheet" type="text/css" href="/css/style.css" />
<link rel="stylesheet" type="text/css" href="/css/overpass.css" />
<link rel="stylesheet" type="text/css" href="/css/liberation.css" />
<link rel="stylesheet" type="text/css" href="/css/jquery-ui-1.10.1.custom.css" />
<script type="text/javascript">
ENV = { "RAISE_ON_DEPRECATION": true, "VIEW_PRESERVES_CONTEXT": true,
"CP_DEFAULT_CACHEABLE": true};
</script>
<script src="/js/jquery-1.9.1.min.js"></script>
<script src="/js/jquery-ui-1.10.1.custom.min.js"></script>
<script src="/js/handlebars-v1.2.1.js"></script>
<script src="/js/ember-1.4.0.js"></script>
<script src="/js/pcsd.js"></script>
<script type="text/javascript">
$(function () { // use jquery html tooltips
$.widget("ui.tooltip", $.ui.tooltip, {
options: {
content: function () {
return $(this).prop('title');
},
track: true
}
});
$(document).tooltip();
});
var origMainTRHeight = 0;
function resizeDialog() {
$('#new_resource_agent').dialog('option','position','center');
}
function resizeTable(refresh) {
if (refresh == true) {
origMainTRHeight = $('#main > tbody > tr:nth-child(3)').height();
}
var wheight = $(window).height();
var header = $('#header').height();
var footer = $('#footer').height();
var tr1 = $('#main > tbody > tr:nth-child(1)').height();
var tr2 = $('#main > tbody > tr:nth-child(2)').height();
var tr3 = $('#main > tbody > tr:nth-child(4)').height();
var push = $('#push').height();
var newheight = wheight - header - footer - tr1 - tr2 - tr3 - 25;
if (origMainTRHeight <= newheight) {
$('#main > tbody > tr:nth-child(3)').height(newheight);
$('#content').height($('#main').height());
}
}
$(window).resize(function() {
resizeTable();
});
$(window).load(function() {
resizeTable(true);
$('#add_ra_type').trigger('change');
$('#add_stonith_type').trigger('change');
$('#new_resource_agent').ajaxStop(function() {
resizeDialog();
});
});
</script>
</head>
<html>
<body>
<script type="text/x-handlebars" data-template-name="components/resource-tree-view">
<div style="width: 450px;">
<table cellpadding="0" cellspacing="0" class="tree-view" style="width: 100%; border: none;">
<tr>
<th style="width:27px;"><input type="checkbox" onchange="checkBoxToggle(this,false)"></th><th style="width:47px;"></th><th>NAME</th><th style="width:220px;">TYPE</th><th style="width:18px;"></th>
</tr>
{{#each element in elements}}
<tr><td colspan="5" style="padding-top: 0px; padding-bottom: 0px;">
{{resource-tree-element node=element}}
</td></tr>
{{/each}}
</table>
</div>
</script>
<script type="text/x-handlebars" data-template-name="components/resource-tree-element">
<table class="tree-element" cellpadding="0" cellspacing="0" style="width: 100%; border: none;" {{bind-attr id=node.treeview_element_id}}>
<tr class="tree-element-name" onclick="tree_view_onclick(get_tree_view_resource_id(this));" onmouseover="$(this).addClass('mouse_on_row');" onmouseout="$(this).removeClass('mouse_on_row');" {{bind-attr nodeID=node.id}}>
<td style="width:20px;" class="node_list_check">
<input type="checkbox" onchange="tree_view_checkbox_onchange(this)">
</td>
<td style="width:18px;" class="node_list_sprite">{{{node.status_icon}}}</td>
<td class="resource_name" nowrap {{bind-attr node=node.style}}>
<span {{bind-attr class=node.span_class}}>{{node._id}}</span>
</td>
<td style="width:200px;" class="resource_type" {{bind-attr style=node.style}}>{{node.resource_type}}</td>
<td style="width:18px;">
<div style="display: none;" class="arrow sprites"></div>
</td>
</tr>
{{#if node.children.length}}
<tr class="children" style="display: none;">
<td colspan="5" style="padding-left: 10px; padding-top: 0px; padding-bottom: 0px;">
{{#each child in node.children}}
{{resource-tree-element node=child}}
{{/each}}
</td>
</tr>
{{/if}}
</table>
</script>
<script type="text/x-handlebars" data-template-name="components/issues-table">
{{#if issue_list.length}}
<div class="issue_table">
<span {{bind-attr style=table_name_style}}>{{table_name}}</span>
<table style="width: 100%" {{bind-attr class=issue_class}}>
{{#each issue in issue_list}}
<tr><td>
{{issue.message}}
</td></tr>
{{/each}}
</table>
</div>
{{/if}}
</script>
<script type="text/x-handlebars" data-template-name="components/resource-edit">
{{#if resource}}
<div id="node_info_header">
<div class="node_info_header_title" >Edit {{page_name}} </div>
<div id="node_info_header_title_name">{{resource._id}}</div>
</div>
<div id="node_sub_info">
<table>
<tr>
<td>
<input disabled style="margin-right: 50px;" type="text" {{bind-attr value=resource._id}} size="35" class="text_field">
</td>
<td>
{{{resource.status_icon}}}
</td>
<td nowrap>{{{resource.show_status}}}</td>
</tr>
</table>
</div>
<div id="node_options_buttons">
<div>
{{#if resource.stonith}}
<div class="xdark sprites" style="float: left"></div>
<div id="stonith_delete_link" class="link" onclick="verify_remove_fence_devices(curStonith());">Remove</div>
{{#if Pcs.is_supported_resource_refresh_one_resource}}
<div class="restart sprites" style="float: left"></div>
<div id="stonith_cleanup_link" class="link" onclick="cleanup_stonith();">Cleanup</div>
<div class="restart sprites" style="float: left"></div>
<div id="stonith_refresh_link" class="link" onclick="refresh_stonith(true);">Refresh</div>
{{else}}
<div class="restart sprites" style="float: left"></div>
<div id="stonith_refresh_link" class="link" onclick="refresh_stonith(false);">Refresh</div>
{{/if}}
{{else}}
<div class="checkdark sprites" style="float: left"></div>
<div id="resource_start_link" class="link" onclick="enable_resource();">Enable</div>
<div class="cancel sprites" style="float: left"></div>
<div id="resource_stop_link" class="link" onclick="disable_resource();">Disable</div>
{{#if Pcs.is_supported_resource_refresh_one_resource}}
<div class="restart sprites" style="float: left"></div>
<div id="resource_cleanup_link" class="link" onclick="cleanup_resource();">Cleanup</div>
<div class="restart sprites" style="float: left"></div>
<div id="resource_refresh_link" class="link" onclick="refresh_resource(true);">Refresh</div>
{{else}}
<div class="restart sprites" style="float: left"></div>
<div id="resource_refresh_link" class="link" onclick="refresh_resource(false);">Refresh</div>
{{/if}}
<div class="xdark sprites" style="float: left"></div>
<div id="resource_delete_link" class="link" onclick="verify_remove_resources(curResource());">Remove</div>
</div>
<div>
{{#if Pcs.is_supported_unmanaged_resource}}
<div>
<div class="checkdark sprites" style="float: left"></div>
<div
id="resource_manage_link"
class="link"
onclick="manage_resource(curResource());"
>
Manage
</div>
</div>
<div>
<div class="cancel sprites" style="float: left"></div>
<div
id="resource_unmanage_link"
class="link"
onclick="unmanage_resource(curResource());"
>
Unmanage
</div>
</div>
{{/if}}
{{/if}}
</div>
<!--
<div class="move sprites" style="float: left"></div>
<div id="resource_move_link" class="link">Move</div>
<div class="history sprites" style="float: left"></div>
<div id="resource_history_link" class="link">History</div>
-->
</div>
<br>
<div id="resource_issues">
{{issues-table table_name="Errors" table_name_style="color:red;" issue_list=resource.error_list issue_class="error_table"}}
{{issues-table table_name="Warnings" table_name_style="color:orange;" issue_list=resource.warning_list issue_class="warning_table"}}
</div>
<div id="node_details">
<table style="margin-bottom:25px;">
<tr>
<td class="bold" nowrap>Type:</td>
<td class="reg" nowrap>{{resource.res_type}}</td>
</tr>
{{#if resource.is_primitive}}
{{#if resource.resource_agent.shortdesc}}
<tr>
<td>
<div class="bold">Description:</div>
</td>
<td>
<span class="reg" style="float:left;">
{{resource.resource_agent.shortdesc}}
</span>
<span {{bind-attr title=resource.resource_agent.longdesc_html}} onclick="$(this).closest('table').find('.long_desc_div').toggle();" class="infoicon sprites" style="margin-top:2px;"></span>
</td>
</tr>
<tr>
<td></td>
<td>
<div class="long_desc_div reg" style="display:none; font-size:12px; max-width:350px;">{{{resource.resource_agent.longdesc_html}}}</div>
</td>
</tr>
{{/if}}
{{/if}}
{{#unless resource.stonith}}
{{#if resource.is_primitive}}
<tr>
<td class="bold" nowrap>Current Location:</td>
<td id="cur_res_loc" class="reg">{{resource.nodes_running_on_string}}</td>
</tr>
{{#unless resource.parent}}
<tr>
<td class="bold" nowrap>Clone:</td>
<td id="cur_res_loc" class="reg" title="Makes the resource run multiple times on the cluster. By default the resource will run once on each of the nodes.">
<input type="button" onclick="resource_clone(curResource());" value="Create clone">
</td>
</tr>
<tr>
<td class="bold" nowrap>Master/Slave:</td>
<td id="cur_res_loc" class="reg" title="Makes the resource run multiple times on the cluster and distinguish between Master and Slave operating mode for each instance.By default the resource will run on one node in Master mode and on all other nodes in Slave mode.">
<input type="button" onclick="resource_master(curResource());" value="Create master/slave">
</td>
</tr>
<tr>
<td class="bold" nowrap>Group:</td>
<td id="cur_res_loc" class="reg">
{{group-selector resource_id=resource._id}}
</td>
</tr>
{{else}}
{{#if resource.parent.is_group}}
{{#if resource.show_group_selector}}
<tr>
<td class="bold" nowrap>Group:</td>
<td id="cur_res_loc" class="reg">
{{group-selector resource_id=resource._id}}
</td>
</tr>
{{/if}}
{{/if}}
{{/unless}}
{{/if}}
{{/unless}}
{{#if resource.is_group}}
{{#unless resource.parent}}
<tr>
<td class="bold" nowrap>Clone:</td>
<td id="cur_res_loc" class="reg" title="Makes the resource run multiple times on the cluster. By default the resource will run once on each of the nodes.">
<input type="button" onclick="resource_clone(curResource());" value="Create clone">
</td>
</tr>
<tr>
<td class="bold" nowrap>Master/Slave:</td>
<td id="cur_res_loc" class="reg" title="Makes the resource run multiple times on the cluster and distinguish between Master and Slave operating mode for each instance.By default the resource will run on one node in Master mode and on all other nodes in Slave mode.">
<input type="button" onclick="resource_master(curResource());" value="Create master/slave">
</td>
</tr>
{{#unless old_pcsd}}
<tr>
<td class="bold" nowrap>Group:</td>
<td id="cur_res_loc" class="reg">
<input type="button" onclick="resource_ungroup(curResource());" value="Ungroup">
</td>
</tr>
{{/unless}}
{{/unless}}
{{/if}}
{{#if resource.is_multi_instance}}
<tr>
<td class="bold" nowrap>Clone:</td>
<td id="cur_res_loc" class="reg">
<input type="button" onclick="resource_unclone(curResource());" value="Unclone">
</td>
</tr>
{{/if}}
</table>
{{#unless resource.stonith}}
{{location_constraints-table constraints=resource.location_constraints}}
{{ordering_constraints-table constraints=resource.ordering_constraints resource_id=resource._id}}
{{ordering_set_constraints-table constraints=resource.ordering_set_constraints}}
{{colocation_constraints-table constraints=resource.colocation_constraints}}
{{#if Pcs.is_supported_constraint_colocation_set}}
{{colocation_set_constraints-table constraints=resource.colocation_set_constraints}}
{{/if}}
{{#if Pcs.is_ticket_constraints_supported}}
{{ticket_constraints-table constraints=resource.ticket_constraints resource_id=resource._id}}
{{ticket_set_constraints-table constraints=resource.ticket_set_constraints}}
{{/if}}
{{meta_attributes-table resource=resource}}
{{#if utilization_support}}
{{#if resource.is_primitive}}
{{utilization-table
entity=resource
utilization=resource.utilization
type="resource"
table_id="resource_utilization_attributes"
}}
{{/if}}
{{/if}}
<br style="clear:left;">
{{/unless}}
</div>
{{#if stonith}}
<div style="clear:left; margin-top: 2em;" id="stonith_agent_form">
{{fence-form
resource=resource
agent=resource.resource_agent
table_id_suffix="_existing"
}}
</div>
{{else}}
{{#if resource.is_primitive}}
<div style="clear:left; margin-top: 2em;" id="resource_agent_form">
{{resource-form
resource=resource
agent=resource.resource_agent
table_id_suffix="_existing"
}}
</div>
{{/if}}
{{/if}}
{{else}}
{{#if stonith}}
NO FENCE DEVICE IN CLUSTER
{{else}}
NO RESOURCES IN CLUSTER
{{/if}}
{{/if}}
</script>
<script type="text/x-handlebars" data-template-name="components/location_constraints-table">
<table style="clear:left;float:left">
<tr><td style="display: block;" onclick="show_hide_constraints(this)" class="datatable_header hover-pointer" id="location_constraints"><span style="" class="downarrow sprites"></span><span style="display: none;" class="rightarrow sprites"></span>Resource Location Preferences ({{#if constraints}}{{constraints.length}}{{else}}0{{/if}})</td></tr>
<tr><td>
<div id="locationdep">
<table class="datatable">
<tr><th>Node/Rule</th><th>Score</th><th>Remove</th></tr>
{{#each cons in constraints}}
<tr>
{{#if cons.rule_string}}
<td style="white-space: normal;">{{cons.rule_string}}</td>
<td>{{#if cons.score-attribute}}{{cons.score-attribute}}{{else}}{{cons.score}}{{/if}}</td>
<td {{bind-attr rule_id=cons.id}} style="text-align:center">
{{#unless cons.temp}}
<a onclick="remove_constraint_rule($(this).parent().attr('rule_id'));return false;" href="#" class="remove">X</a>
{{/unless}}
</td>
{{else}}
<td>{{cons.node}}</td>
<td>{{cons.score}}</td>
<td {{bind-attr constraint_id=cons.id}} style="text-align:center">
{{#unless cons.temp}}
<a onclick="return remove_constraint_action(this);" href="#" class="remove">X</a>
{{/unless}}
</td>
{{/if}}
</tr>
{{else}}
<tr><td style="color: gray;">NONE</td><td></td><td></td></tr>
{{/each}}
<tr id="new_res_loc">
<td><input type="text" name="node_id"></td>
<td><input type="text" name="score" size="5"></td>
<td><button type="button" onclick="add_constraint('#new_res_loc','loc', false);" name="add">Add</button></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</script>
<script type="text/x-handlebars" data-template-name="components/ordering_constraints-table">
<table style="clear:left;float:left;">
<tr><td style="display: block;" onclick="show_hide_constraints(this)" class="datatable_header hover-pointer" id="ordering_constraints"><span style="" class="downarrow sprites"></span><span style="display: none;" class="rightarrow sprites"></span>Resource Ordering Preferences ({{#if constraints.length}}{{constraints.length}}{{else}}0{{/if}})</td></tr>
<tr><td>
<div id="locationdep">
<table class="datatable">
<tr><th>Resource</th><th>Action</th><th>Before/After</th><th>Action</th><th>Score</th><th>Remove</th></tr>
{{#each cons in constraints}}
<tr><td>{{cons.other_rsc}}</td>
{{#if cons.before}}
<td>{{#if cons.first-action}}{{cons.first-action}}s{{else}}starts{{/if}}</td>
<td>before {{then}}</td>
<td>{{#if cons.then-action}}{{cons.then-action}}s{{else}}starts{{/if}}</td>
{{else}}
<td>{{#if cons.then-action}}{{cons.then-action}}s{{else}}starts{{/if}}</td>
<td>after {{cons.first}}</td>
<td>{{#if cons.first-action}}{{cons.first-action}}s{{else}}starts{{/if}}</td>
{{/if}}
<td>{{cons.score}}</td>
<td {{bind-attr constraint_id=cons.id}} style="text-align:center">
<a onclick="return remove_constraint_action(this);" href="#" class="remove">X</a>
</td>
</tr>
{{else}}
<tr><td style="color: gray;">NONE</td><td></td><td></td><td></td><td></td><td></td></tr>
{{/each}}
<tr id="new_res_orc">
<td><input type="text" name="target_res_id"></td>
<td>
<select name="target_action">
<option value="start">starts</option>
<option value="promote">promotes</option>
<option value="demote">demotes</option>
<option value="stop">stops</option>
</select>
</td>
<td>
<select name="order">
<option value="after">after</option>
<option value="before">before</option>
</select>
{{resource_id}}
</td>
<td>
<select name="res_action">
<option value="start">starts</option>
<option value="promote">promotes</option>
<option value="demote">demotes</option>
<option value="stop">stops</option>
</select>
</td>
<td><input type="text" name="score" size="5"></td>
<td><button type="button" onclick="add_constraint('#new_res_orc','ord', false);" name="add">Add</button></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</script>
<script type="text/x-handlebars" data-template-name="components/ordering_set_constraints-table">
<table style="clear:left;float:left;">
<tr><td style="display: block;" onclick="show_hide_constraints(this)" class="datatable_header hover-pointer" id="ordering_set_constraints"><span style="" class="downarrow sprites"></span><span style="display: none;" class="rightarrow sprites"></span>Resource Ordering Set Preferences ({{#if constraints.length}}{{constraints.length}}{{else}}0{{/if}})</td></tr>
<tr><td>
<div id="locationdep">
<table class="datatable">
<tr>
<th>Preference Name/Set of Resources</th>
<th style="text-align: center;">Remove</th>
</tr>
{{#each cons in constraints}}
<tr>
<td>{{cons.id}}</td>
<td {{bind-attr constraint_id="cons.id"}} style="text-align:center;">
<a onclick="return remove_constraint_action(this);" href="#" class="remove">X</a>
</td>
</tr>
{{#each set in cons.sets}}
<tr>
<td style="padding-left:2em;">Set:{{#each rsc in set.resources}} {{rsc}}{{/each}}</td>
<td></td>
</tr>
{{/each}}
{{else}}
<tr><td style="color: gray;">NONE</td><td></td></tr>
{{/each}}
<tr id="new_res_orc_set" title="Enter the resources you want to be in one set into the 'Set' field separated by space.
Use the 'New Set' button to create more sets.
Use the 'Add' button to submit the form.">
<td>Set: <input type="text" name="resource_ids[]"></td>
<td style="vertical-align: bottom;">
<button type="button" onclick="new_constraint_set_row('#new_res_orc_set');" name="new-row">New Set</button>
<button type="button" onclick="add_constraint_set('#new_res_orc_set', 'ord', false);" name="add">Add</button>
</td>
</tr>
</table>
</div>
</td></tr>
</table>
</script>
<script
type="text/x-handlebars"
data-template-name="components/ticket_constraints-table"
>
<table style="clear:left;float:left;">
<tr>
<td
style="display: block;"
onclick="show_hide_constraints(this)"
class="datatable_header hover-pointer"
id="ticket_constraints"
>
<span style="" class="downarrow sprites"></span>
<span style="display: none;" class="rightarrow sprites"></span>
Resource Ticket Preferences
({{#if constraints.length}}{{constraints.length}}{{else}}0{{/if}})
</td>
</tr>
<tr>
<td>
<div id="locationdep">
<table class="datatable">
<tr>
<th>Ticket</th>
<th>Resource Role</th>
<th>Loss Policy</th>
<th>Remove</th>
</tr>
{{#each cons in constraints}}
<tr>
<td>{{cons.ticket}}</td>
<td>{{cons.rsc-role}}</td>
<td>{{cons.loss-policy}}</td>
<td
{{bind-attr constraint_id=cons.id}}
style="text-align:center"
>
<a
onclick="return remove_constraint_action(this);"
href="#"
class="remove"
>X</a>
</td>
</tr>
{{else}}
<tr>
<td colspan="4" style="color: gray;">NONE</td>
</tr>
{{/each}}
<tr id="new_ticket_constraint">
<td class="constraint-ticket-add-attribute">
<input type="text" name="ticket"/>
</td>
<td class="constraint-ticket-add-attribute">
<select name="role"/>
<option value=""></option>
<option value="Stopped">Stopped</option>
<option value="Started">Started</option>
<option value="Master">Master</option>
<option value="Slave">Slave</option>
</selct>
</td>
<td class="constraint-ticket-add-attribute">
<select name="loss-policy"/>
<option value=""></option>
<option value="fence">fence</option>
<option value="stop">stop</option>
<option value="freeze">freeze</option>
<option value="demote">demote</option>
</selct>
</td>
<td>
<button type="button" name="add"
onclick="add_constraint(
'#new_ticket_constraint',
'ticket',
false
);"
>Add</button>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</script>
<script
type="text/x-handlebars"
data-template-name="components/ticket_set_constraints-table"
>
<table style="clear:left;float:left;">
<tr>
<td
id="ticket_set_constraints"
class="datatable_header hover-pointer"
style="display: block;"
onclick="show_hide_constraints(this)"
>
<span style="" class="downarrow sprites"></span>
<span style="display: none;" class="rightarrow sprites"></span>
Resource Ticket Set Preferences
({{#if constraints.length}}{{constraints.length}}{{else}}0{{/if}})
</td>
</tr>
<tr>
<td>
<div id="locationdep">
<table class="datatable">
<tr>
<th>Preference Name/Set of Resources</th>
<th>Ticket</th>
<th>Loss Policy</th>
<th style="text-align: center;">Remove</th>
</tr>
{{#each cons in constraints}}
<tr>
<td>{{cons.id}}</td>
<td>{{cons.ticket}}</td>
<td>{{cons.loss-policy}}</td>
<td
{{bind-attr constraint_id="cons.id"}}
style="text-align:center;"
>
<a
onclick="return remove_constraint_action(this);"
href="#"
class="remove"
>X</a>
</td>
</tr>
{{#each set in cons.sets}}
<tr>
<td style="padding-left:2em;" colspan="4">
Set:{{#each rsc in set.resources}} {{rsc}}{{/each}}
</td>
</tr>
{{/each}}
{{else}}
<tr><td style="color: gray;" colspan="4">NONE</td></tr>
{{/each}}
<tr id="new_ticket_constraint_resource_set" title="
Enter the resources you want to be in one set into the 'Set'
field separated by space.
Use the 'New Set' button to create more sets.
Use the 'Add' button to submit the form.
">
<td>Set: <input type="text" name="resource_ids[]"></td>
<td class="constraint-ticket-add-attribute">
<input type="text" name="ticket"/>
</td>
<td class="constraint-ticket-add-attribute">
<select name="loss-policy"/>
<option value=""></option>
<option value="fence">fence</option>
<option value="stop">stop</option>
<option value="freeze">freeze</option>
<option value="demote">demote</option>
</selct>
</td>
<td style="vertical-align: bottom;">
<button type="button" name="new-row"
onclick="new_constraint_set_row(
'#new_ticket_constraint_resource_set'
);"
>New Set</button>
<button type="button" name="add"
onclick="add_constraint_set(
'#new_ticket_constraint_resource_set',
'ticket',
false
);"
>Add</button>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</script>
<script type="text/x-handlebars" data-template-name="components/colocation_constraints-table">
<table style="clear:left;float:left">
<tr><td onclick="show_hide_constraints(this)" class="datatable_header hover-pointer" id="colocation_constraints"><span style="" class="downarrow sprites"></span><span style="display: none;" class="rightarrow sprites"></span>Resource Colocation Preferences ({{#if constraints.length}}{{constraints.length}}{{else}}0{{/if}})</td></tr>
<tr><td>
<div id="locationdep">
<table class="datatable">
<tr><th>Resource</th><th>Together/Apart</th><th>Score</th><th>Remove</th></tr>
{{#each cons in constraints}}
<tr><td>{{cons.other_rsc}}</td>
<td>{{cons.together}}</td>
<td>{{cons.score}}</td>
<td {{bind-attr constraint_id=cons.id}} style="text-align:center">
<a onclick="return remove_constraint_action(this);" href="#" class="remove">X</a>
</td>
</tr>
{{else}}
<tr><td style="color: gray;">NONE</td><td></td><td></td><td></td></tr>
{{/each}}
<tr id="new_res_col">
<td><input type="text" name="target_res_id"></td>
<td><select name="colocate"><option value="together">Together<option value="apart">Apart</select></td>
<td><input type="text" name="score" size="5"></td>
<td><button type="button" onclick="add_constraint('#new_res_col','col', false);" name="add">Add</button></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</script>
<script type="text/x-handlebars" data-template-name="components/colocation_set_constraints-table">
<table style="clear:left;float:left;">
<tr><td style="display: block;" onclick="show_hide_constraints(this)" class="datatable_header hover-pointer" id="colocation_set_constraints"><span style="" class="downarrow sprites"></span><span style="display: none;" class="rightarrow sprites"></span>Resource Colocation Set Preferences ({{#if constraints.length}}{{constraints.length}}{{else}}0{{/if}})</td></tr>
<tr><td>
<div id="locationdep">
<table class="datatable">
<tr>
<th>Preference Name/Set of Resources</th>
<th style="text-align: center;">Remove</th>
</tr>
{{#each cons in constraints}}
<tr>
<td>{{cons.id}}</td>
<td {{bind-attr constraint_id="cons.id"}} style="text-align:center;">
<a onclick="return remove_constraint_action(this);" href="#" class="remove">X</a>
</td>
</tr>
{{#each set in cons.sets}}
<tr>
<td style="padding-left:2em;">Set:{{#each rsc in set.resources}} {{rsc}}{{/each}}</td>
<td></td>
</tr>
{{/each}}
{{else}}
<tr><td style="color: gray;">NONE</td><td></td></tr>
{{/each}}
<tr id="new_res_col_set" title="Enter the resources you want to be in one set into the 'Set' field separated by space.
Use the 'New Set' button to create more sets.
Use the 'Add' button to submit the form.">
<td>Set: <input type="text" name="resource_ids[]"></td>
<td style="vertical-align: bottom;">
<button type="button" onclick="new_constraint_set_row('#new_res_col_set');" name="new-row">New Set</button>
<button type="button" onclick="add_constraint_set('#new_res_col_set', 'col', false);" name="add">Add</button>
</td>
</tr>
</table>
</div>
</td></tr>
</table>
</script>
<script type="text/x-handlebars" data-template-name="components/meta_attributes-table">
<table style="clear:left;float:left">
<tr><td onclick="show_hide_constraints(this)" class="datatable_header hover-pointer" id="meta_attributes"><span style="" class="downarrow sprites"></span><span style="display: none;" class="rightarrow sprites"></span>Resource Meta Attributes ({{#if resource.meta_attr.length}}{{resource.meta_attr.length}}{{else}}0{{/if}})</td></tr>
<tr><td>
<div id="locationdep">
<table class="datatable">
<tr><th>Meta Attribute</th><th>Value</th><th>Remove</th></tr>
{{#each meta in resource.meta_attr}}
<tr><td>{{meta.name}}</td>
<td>{{meta.value}}</td>
<td {{bind-attr meta_attr_key=meta.name}} {{bind-attr meta_attr_res=resource.id}} style="text-align:center">
<a onclick="remove_meta_attr($(this).parent());return false;" href="#" class="remove">X</a>
</td>
</tr>
{{else}}
<tr><td style="color: gray;">NONE</td><td></td><td></td></tr>
{{/each}}
<tr id="new_meta_col">
<td><input type="text" name="new_meta_key" size="20"></td>
<td><input type="text" name="new_meta_value" size="20"></td>
<td><button type="button" onclick="add_meta_attr('#new_meta_col');" name="add">Add</button></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</script>
<script type="text/x-handlebars" data-template-name="components/utilization-table">
<table style="clear:left; float:left;">
<tr>
<td
{{action toggleBody}}
{{bind-attr id=table_id}}
class="datatable_header hover-pointer"
>
{{#if show_content}}
<span class="downarrow sprites"></span>
{{else}}
<span class="rightarrow sprites"></span>
{{/if}}
<span style="text-transform: capitalize;">{{type}} Utilization Attributes ({{util_count}})</span>
</td>
</tr>
{{#if show_content}}
<tr>
<td>
<div class="utilization_table">
<table class="datatable">
<tr>
<th>Utilization Attribute</th><th>Value</th><th>Remove</th>
</tr>
{{#each util in utilization}}
<tr>
<td>{{util.name}}</td>
<td>{{util.value}}</td>
<td style="text-align: center;">
<a {{action remove util.name}} class="remove" href="#">X</a>
</td>
</tr>
{{else}}
<tr>
<td style="color: gray;">NONE</td><td></td><td></td>
</tr>
{{/each}}
<tr {{bind-attr id=form_id}}>
<td>
<input type="text" name="new_utilization_name" size="20">
</td>
<td>
<input type="text" name="new_utilization_value" size="20">
</td>
<td>
<button {{action add form_id}} type="button" name="add">Add</button>
</td>
</tr>
</table>
</div>
</td>
</tr>
{{/if}}
</table>
</script>
<script type="text/x-handlebars" data-template-name="components/parameters-table-element">
<td class="reg">
<span style="float: left;">
{{param.name}}
</span>
{{#if param.description}}
<span style="margin-left: 0.5em" class="infoicon sprites" {{bind-attr title=param.description}}></span>
{{/if}}
</td>
<td>
{{input
size="30"
type="text"
name=param.form_name
value=param.cur_val
placeholder=param.default
}}
{{#if param.pcs_deprecated_warning}}
<br />
<span class="status-warning">{{param.pcs_deprecated_warning}}</span>
{{/if}}
</td>
</script>
<script type="text/x-handlebars" data-template-name="components/parameters-table">
{{#if parameters}}
<table style="clear:left; margin-top: 1em;" class="args-table">
{{#if show_title}}
<tr>
<td
{{action toggleBody}}
{{bind-attr id=table_id_full}}
colspan="2"
nowrap
>
{{#if show_content}}
<span class="downarrow sprites"></span>
{{else}}
<span class="rightarrow sprites"></span>
{{/if}}
<span class="bold">{{table_name}}</span>
</td>
</tr>
{{/if}}
<tbody {{bind-attr style=content_style}}>
{{#each parameter in parameters}}
{{parameters-table-element param=parameter}}
{{/each}}
</tbody>
</table>
{{/if}}
</script>
<script type="text/x-handlebars" data-template-name="components/resource-form">
<div style="clear:left; margin-top: 1em;">
<form method="post" action="/update_resource">
{{#if resource}}
<input type="hidden" name="resource_id" {{bind-attr value=resource.id}} />
{{/if}}
<input type="hidden" name="resource_type" {{bind-attr value=agent.name}} />
{{#unless resource}}
<div id="resource_group">
<table class="args-table">
<tbody>
<tr>
<td>
<div class="bold">Description:</div>
</td>
<td>
<span class="reg" style="float:left;">
{{agent.shortdesc}}
</span>
<span {{bind-attr title=agent.longdesc_html}} onclick="$(this).closest('table').find('.long_desc_div').toggle();" class="infoicon sprites" style="margin-top:2px;"></span>
</td>
</tr>
<tr>
<td></td>
<td>
<div class="long_desc_div reg" style="display:none; font-size:12px; max-width:350px;">{{{agent.longdesc_html}}}</div>
</td>
</tr>
<tr title="Select a group to add the resource to.">
<td nowrap>
<div class="bold">
Resource Group:
</div>
</td>
<td>
{{group-selector
group_list=Pcs.resourcesContainer.group_list
group_input_name="resource_group"
}}
</td>
</tr>
<tr title='Makes the resource run multiple times on the cluster. By default the resource will run once on each of the nodes.'>
<td nowrap>
<div class="bold">
Clone:
</div>
</td>
<td>
<input type="hidden" name="_orig_resource_clone" value="">
<input type=checkbox name="resource_clone">
</td>
</tr>
<tr title='Makes the resource run multiple times on the cluster and distinguish between Master and Slave operating mode for each instance. By default the resource will run on one node in Master mode and on all other nodes in Slave mode.'>
<td nowrap>
<div class="bold">
Master/Slave:
</div>
</td>
<td>
<input type="hidden" name="_orig_resource_ms" value="">
<input type=checkbox name="resource_ms" >
</td>
</tr>
<tr title="Do not start the resource automatically after creating.">
<td nowrap>
<div class="bold"
>Disabled:
</div>
</td>
<td>
<input type=checkbox name="disabled">
</td>
</tr>
<tr>
<td class="reg">
Resource ID
</td>
<td>
<input style="margin-right: 50px;" type="text" name="name" size="30" class="text_field">
</td>
</tr>
</tbody>
</table>
</div>
{{/unless}}
{{parameters-table
table_id="required_args"
table_id_suffix=table_id_suffix
table_name="Required Arguments"
parameters=agent.required_parameters
show_content=true
}}
{{parameters-table
table_id="optional_args"
table_id_suffix=table_id_suffix
table_name="Optional Arguments"
parameters=agent.optional_parameters
}}
{{parameters-table
table_id="advanced_args"
table_id_suffix=table_id_suffix
table_name="Advanced Arguments"
parameters=agent.advanced_parameters
}}
{{#if resource}}
<input class="apply_changes" type="button" onclick="$(this).hide();create_resource($(this)
.parents('form'),true); return false;" value="Apply Changes" style="margin-top: 1em;" />
<input type="button" onclick="tree_view_onclick(curResource()); return false;" value="Refresh" />
{{else}}
<center>
<input class="apply_changes" type="button" onclick="$(this).hide();create_resource($(this)
.parents('form'),false); return false;" value="Create Resource" style="margin-top: 1em;" />
</center>
{{/if}}
</form>
</div>
</script>
<script type="text/x-handlebars" data-template-name="components/fence-form">
<div style="clear:left; margin-top: 2em;">
<form method="post" action="/update_fence_device">
{{#if resource}}
<input type="hidden" name="resource_id" {{bind-attr value=resource.id}} />
{{/if}}
<input type="hidden" name="resource_type" {{bind-attr value=agent.name}} />
{{#unless resource}}
<table class="args-table">
<tbody>
{{#if agent.shortdesc}}
<tr>
<td>
<div class="bold">Description:</div>
</td>
<td>
<span class="reg" style="float:left;">
{{agent.shortdesc}}
</span>
<span {{bind-attr title=agent.longdesc_html}} onclick="$(this).closest('table').find('.long_desc_div').toggle();" class="infoicon sprites" style="margin-top:2px;"></span>
</td>
</tr>
<tr>
<td></td>
<td>
<div class="long_desc_div reg" style="display:none; font-size:12px; max-width:350px;">{{{agent.longdesc_html}}}</div>
</td>
</tr>
{{/if}}
<tr>
<td class="reg">
Fence Instance Name
</td>
<td>
<input style="margin-right: 50px;" type="text" name="name" size="30" class="text_field">
</td>
</tr>
</tbody>
</table>
{{/unless}}
{{parameters-table
table_id="required_fenceargs"
table_id_suffix=table_id_suffix
table_name="Required Arguments"
parameters=agent.required_parameters
show_content=true
}}
{{parameters-table
table_id="optional_fenceargs"
table_id_suffix=table_id_suffix
table_name="Optional Arguments"
parameters=agent.optional_parameters
}}
{{parameters-table
table_id="advanced_fenceargs"
table_id_suffix=table_id_suffix
table_name="Advanced Arguments"
parameters=agent.advanced_parameters
}}
{{#if resource}}
<input class="apply_changes" type="button" onclick="$(this).hide();create_resource($(this).parents('form'), true, true); return false;" value="Apply Changes" style="margin-top: 1em;" />
<input type="button" onclick="tree_view_onclick(curStonith()); return false;" value="Refresh" />
{{else}}
<center>
<input class="apply_changes" type="button" type="submit" onclick="$(this).hide();create_resource($(this).parents('form'), false, true); return false;" value="Create Fence Instance" style="margin-top: 1em;" />
</center>
{{/if}}
</form>
</div>
</script>
<script type="text/x-handlebars" data-template-name="components/value-selector">
{{selector-helper content value prompt}}
</script>
<script type="text/x-handlebars" data-template-name="components/cluster-property">
<td>
<span style="float: left;">
{{prop.readable_name}}
</span>
<span style="margin-left: 0.5em" class="infoicon sprites" {{bind-attr title=prop.description}}></span>
</td>
<td>
{{#if prop.is_boolean}}
{{value-selector
prompt="(Default)"
content=boolean_options
value=prop.cur_val
name=prop.form_name
}}
{{else}}{{#if prop.is_enum}}
{{value-selector
prompt="(Default)"
content=prop.enum_show
value=prop.cur_val
name=prop.form_name
}}
{{else}}
{{input
type="text"
name=prop.form_name
value=prop.cur_val
placeholder=prop.default
}}
{{/if}}{{/if}}
</td>
</script>
<script type="text/x-handlebars" data-template-name="components/group-selector">
{{value-selector
name=group_input_name
content=group_select_content
value=group_select_value
prompt="None"
}}
{{#if Pcs.is_supported_moving_resource_in_group}}
{{#if group_select_value}}
{{#if resource_select_content}}
{{value-selector
name="in_group_position"
content=position_select_content
value=position_select_value
prompt=""
}}
{{value-selector
name="in_group_reference_resource_id"
content=resource_select_content
value=resource_select_value
prompt=""
}}
{{/if}}
{{/if}}
{{/if}}
{{#if resource_id}}
<br/>
<button
onclick="
resource_change_group(curResource(), $(this).parent().find('select'));
return false;
"
>
Update group
</button>
<button {{action refresh}}>Refresh</button>
{{/if}}
</script>
<script type="text/x-handlebars">
<div id="wrapper">
<div id="header"><div id="topmenu">
<table id="menu_controls">
<tr>
<td width="170" style="vertical-align: top;">
<div id="logo">
<img width="170" height="40" src="/images/HAM-logo.png" onclick="if (Pcs) { Pcs.update(); }">
</div>
</td>
<td>
<div id="menu_list">
<table width="700">
<tr>
<td style="padding-bottom:8px;">
<% if @clusters != nil %>
<div style="float:left;">
<div class="menuheader">
<div id="dropdownr" class="label" style="white-space:nowrap" onclick="window.location='/manage'">
<table style="background: #000000">
<tr>
<td>
<%=@manage ? "Select Cluster" : "Cluster: " + @cluster_name%>
</td>
<td>
<div style="float:right;" class="downarrow sprites"></div>
</td>
</tr>
</table>
</div>
<div style="width:100%;" class="menu">
<% if not @manage %>
<a href="/manage" class="menu-item">Manage Clusters </a>
<% end %>
<% @clusters.each { |c| %>
<a href="<%=c.ui_address%>" class="menu-item"><%=c.name%> </a>
<% } %>
</div>
</div>
</div>
<% end %>
</td>
<td style="padding-bottom:8px;">
<% if session[:username] %>
<div style="float:right">
<div class="menuheader">
<div id="dropdownr" class="label"><%=session[:username]%><div style="float:right;" class="downarrow sprites"></div></div>
<div style="width:100%" class="menu">
<a href="/logout" class="menu-item">Logout </a>
</div>
</div>
<!-- <div id="dropdownr">
<%=session[:username]%><div style="float:right;" class="downarrow sprites"></div>
</div> -->
</div>
<% end %>
</td>
</tr>
</table>
<table>
<% if !@manage %>
<tr>
<td class="menuitem first">{{#link-to "Nodes" }}NODES{{/link-to}}</td>
<td class="menuitem">{{#link-to "Resources" }}RESOURCES{{/link-to}}</td>
<td class="menuitem">{{#link-to "Fence Devices" }}FENCE DEVICES{{/link-to}}</td>
<td class="menuitem">{{#link-to "ACLs" }}ACLS{{/link-to}}</td>
<td class="menuitem">{{#link-to "Configuration" }}CLUSTER PROPERTIES{{/link-to}}</td>
<td class="menuitem"><a href="/manage">MANAGE CLUSTERS</a></td>
<!--<td class="menuitem">{{#link-to "Wizards" }}WIZARDS{{/link-to}}</td>-->
</tr>
<% else %>
<tr>
<td class="menuitem first"><a href="/manage">MANAGE CLUSTERS</a></td>
<td class="menuitem"><a href="/permissions">PERMISSIONS</a></td>
</tr>
<% end %>
</table>
</div>
</td>
<td> </td>
</tr>
</table>
</div></div>
<div id="content">
<%= yield %>
</div>
<div id="push">
</div>
</div>
</script>
<!-- <div id="footer">
<div id="copyright">© 2012</div> <a href="http://www.redhat.com">Red Hat, Inc.</a> <a href="http://access.redhat.com/"> Red Hat Customer Portal</a>
<div id="help"><a href="#">Help</a></div>
</div> -->
<div id="loading_screen" style="display:hidden;">
<div id="loading_screen_progress_bar"></div>
</div>
<table id="footer" style="display: none;">
<tr>
<td>© 2012 <a href="http://www.redhat.com">Red Hat, Inc.</a> <a href="http://access.redhat.com/"> Red Hat Customer Portal</td>
<td align=right><a href="#">Help</a></td>
</tr>
</table>
</div>
</body>
<script src="/js/nodes-ember.js"></script>
<script type="text/javascript">
$(function() {
disable_checkbox_clicks();
setup_resource_class_provider_selection();
});
</script>
<% if @error %>
<script type="text/javascript">
$(function() {
$("#manage_error").dialog({
title: "Warning",
buttons: {
Ok: function() {
$(this).dialog("close");
}
},
autoOpen:true
});
});
</script>
<% end %>
</html>
|