This file is indexed.

/usr/share/pcsd/views/main.erb is in pcs 0.9.149-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
<!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() {
      $('#add_resource').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/list-view">
  <div style="width: 300px;" id="node_list" {{bind-attr class=element-class}}>
    <table cellpadding="0" cellspacing="0" class="list-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>{{table-title}}</th><th style="width:18px;"></th>
      </tr>
      {{#each element in elements}}
      <tr class="list-view-element" onmouseover="$(this).addClass('mouse_on_row');" onmouseout="$(this).removeClass('mouse_on_row');" onclick="list_view_select(get_list_view_element_id(this));" {{bind-attr id=element.name}}>
        <td class="node_list_check">{{view Ember.Checkbox checkedBinding="checked" class="node_list_check"}}</td>
        <td class="node_list_sprite">{{#if default-icon}}{{{default-icon}}}{{else}}{{#if element.status_icon}}{{{element.status_icon}}}{{else}}<div class="check sprites"></div>{{/if}}{{/if}}</td>
        <td class="node_name" nowrap {{bind-attr style=element.style}}>{{element.name}}</td>
        <td>
          <div style="display: none;" class="arrow sprites"></div>
        </td>
      </tr>
      {{/each}}
      </table>
    </div>
  </script>

  <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._id}}>
    <tr class="tree-element-name" onclick="tree_view_onclick(get_tree_view_element_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}}&nbsp;</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">
    {{#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>
      <div class="restart sprites" style="float: left"></div>
      <div id="stonith_cleanup_link" class="link" onclick="cleanup_stonith();">Cleanup</div>
    {{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>
      <div class="restart sprites" style="float: left"></div>
      <div id="resource_cleanup_link" class="link" onclick="cleanup_resource();">Cleanup</div>
      <div class="xdark sprites" style="float: left"></div>
      <div id="resource_delete_link" class="link" onclick="verify_remove_resources(curResource());">Remove</div>
    {{/if}}
      <!--
      <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>
        {{#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 old_pcsd}}
          {{#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">
                {{{resource.group_selector}}}
              </td>
            </tr>
          {{else}}
            {{#if resource.parent.is_group}}
            <tr>
              <td class="bold" nowrap>Group:</td>
              <td id="cur_res_loc" class="reg">
                {{{resource.group_selector}}}
              </td>
            </tr>
            {{/if}}
          {{/unless}}
          {{/unless}}
        {{/if}}
        {{/unless}}
        {{#unless old_pcsd}}
        {{#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>
          <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}}
        {{/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}}
        {{/unless}}
      </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}}
        {{meta_attributes-table resource=resource}}
        {{#if utilization_support}}
          {{#if resource.is_primitive}}
            {{utilization-table entity=resource utilization=resource.utilization type="resource"}}
          {{/if}}
        {{/if}}
        <br style="clear:left;">
      {{/unless}}
    </div>
    {{#if stonith}}
      <div style="clear:left; margin-top: 2em;" id="stonith_agent_form"></div>
    {{else}}
    {{#if resource.is_primitive}}
      <div style="clear:left; margin-top: 2em;" id="resource_agent_form"></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="remove_constraint($(this).parent().attr('constraint_id'));return false;" 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="remove_constraint($(this).parent().attr('constraint_id'));return false;" 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="remove_constraint($(this).parent().attr('constraint_id')); return false;" 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/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="remove_constraint($(this).parent().attr('constraint_id'));return false;" 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/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}} 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/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">
<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&nbsp;Clusters&nbsp;&nbsp;</a>
                        <% end %>
                        <% @clusters.each { |c| %>
                          <a href="<%=c.ui_address%>" class="menu-item"><%=c.name%>&nbsp;&nbsp;</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&nbsp;&nbsp;</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">&copy 2012</div>&nbsp;<a href="http://www.redhat.com">Red Hat, Inc.</a>  <a href="http://access.redhat.com/">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&copy 2012&nbsp;<a href="http://www.redhat.com">Red Hat, Inc.</a>&nbsp;&nbsp;<a href="http://access.redhat.com/">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>