<commit_before>%# " We should limit the number of impacts to show here. Too much is just useless "
%max_impacts = 200

%print 'Elt value?', elt
%import time

%# If got no Elt, bailout
%if not elt:
%rebase layout title='Invalid name'

Invalid element name


%else:

%helper = app.helper
%datamgr = app.datamgr

%elt_type = elt.__class__.my_type

%top_right_banner_state = datamgr.get_overall_state()


%rebase layout title=elt_type.capitalize() + ' detail about ' + elt.get_full_name(),  js=['eltdetail/js/TabPane.js', 'eltdetail/js/gesture.js'],  css=['eltdetail/css/eltdetail2.css', 'eltdetail/css/gesture.css'], top_right_banner_state=top_right_banner_state , user=user, app=app


%#  "This is the background canvas for all gesture detection things " 
<canvas id="canvas"></canvas>
%# " We will save our element name so gesture functions will be able to call for the good elements."
<script type="text/javascript">var elt_name = '{{elt.get_full_name()}}';</script>

%#  "Left Container Start"
<div id="left_container" class="grid_3">
  

</div>
%#  "Left Container End"

%#  "Content Container Start"
<div class="grid_13">
	<h1 class="grid_16 state_{{elt.state.lower()}} icon_down">{{elt.state}}: {{elt.get_full_name()}}</h1>
	<div id="overview_container" class="grid_16">
		<dl class="grid_5">
		%#Alias, Parents and Hostgroups are for host only
      	%if elt_type=='host':
			<dt>Alias:</dt>
			<dd>{{elt.alias}}</dd>
					
			<dt>Parents:</dt>
			%if len(elt.parents) > 0:
			<dd>{{','.join([h.get_name() for h in elt.parents])}}</dd>
			%else:
			<dd>No Parents</dd>
			%end
				
			<dt>Members of:</dt>
			%if len(elt.hostgroups) > 0:	
			<dd>{{','.join([hg.get_name() for hg in elt.hostgroups])}}</dd>
			%else:
			<dd>No Hostgroups</dd>
			%end
			
			%# End of the host only case, so now service
    		%else:
	 		<dt>Host:</dt>
         	<dd> {{elt.host.host_name}}</dd>
         
         	<dt>Members of:</dt>
         	%if len(elt.servicegroups) > 0:
         	<dd> {{','.join([sg.get_name() for sg in elt.servicegroups])}}</dd>
         	%else:
         	<dd> No groups </dd>
         	%end
    	%end 
		</dl>
		<dl class="grid_5">
			<dt>Notes:</dt>
			%if elt.notes != '':
      		<dd>{{elt.notes}}</dd>
      		%else:
      		<dd>(none)</dd>
      		%end
					
			<dt>Importence:</dt>
			<dd>{{!helper.get_business_impact_text(elt)}}</dd>
		</dl>
		<div class="grid_6">
			<p class="error">This element has got an important impact on your business, please fix it or acknowledge it.</p>
		</div>				
	</div>
		<div id="detail_container">

		<script type="text/javascript">
			document.addEvent('domready', function() {
			var tabPane = new TabPane('demo');
					
			   $('demo').addEvent('click:relay(.remove)', function(e) {
			     new Event(e).stop();
			     var parent = this.getParent('.tab');
			     var index = $('demo').getElements('.tab').indexOf(parent);
			     tabPane.closeTab(index);
			   });
					<commit_msg>Fix: 'SOLVE THIS' highlight box @ mockup<commit_after>%# " We should limit the number of impacts to show here. Too much is just useless "
%max_impacts = 200

%print 'Elt value?', elt
%import time

%# If got no Elt, bailout
%if not elt:
%rebase layout title='Invalid name'

Invalid element name


%else:

%helper = app.helper
%datamgr = app.datamgr

%elt_type = elt.__class__.my_type

%top_right_banner_state = datamgr.get_overall_state()


%rebase layout title=elt_type.capitalize() + ' detail about ' + elt.get_full_name(),  js=['eltdetail/js/TabPane.js', 'eltdetail/js/gesture.js'],  css=['eltdetail/css/eltdetail2.css', 'eltdetail/css/gesture.css'], top_right_banner_state=top_right_banner_state , user=user, app=app


%#  "This is the background canvas for all gesture detection things " 
<canvas id="canvas"></canvas>
%# " We will save our element name so gesture functions will be able to call for the good elements."
<script type="text/javascript">var elt_name = '{{elt.get_full_name()}}';</script>

%#  "Left Container Start"
<div id="left_container" class="grid_3">
  

</div>
%#  "Left Container End"

%#  "Content Container Start"
<div class="grid_13">
	<h1 class="grid_16 state_{{elt.state.lower()}} icon_down">{{elt.state}}: {{elt.get_full_name()}}</h1>
	<div id="overview_container" class="grid_16">
		<dl class="grid_5">
		%#Alias, Parents and Hostgroups are for host only
      	%if elt_type=='host':
			<dt>Alias:</dt>
			<dd>{{elt.alias}}</dd>
					
			<dt>Parents:</dt>
			%if len(elt.parents) > 0:
			<dd>{{','.join([h.get_name() for h in elt.parents])}}</dd>
			%else:
			<dd>No Parents</dd>
			%end
				
			<dt>Members of:</dt>
			%if len(elt.hostgroups) > 0:	
			<dd>{{','.join([hg.get_name() for hg in elt.hostgroups])}}</dd>
			%else:
			<dd>No Hostgroups</dd>
			%end
			
			%# End of the host only case, so now service
    		%else:
	 		<dt>Host:</dt>
         	<dd> {{elt.host.host_name}}</dd>
         
         	<dt>Members of:</dt>
         	%if len(elt.servicegroups) > 0:
         	<dd> {{','.join([sg.get_name() for sg in elt.servicegroups])}}</dd>
         	%else:
         	<dd> No groups </dd>
         	%end
    	%end 
		</dl>
		<dl class="grid_5">
			<dt>Notes:</dt>
			%if elt.notes != '':
      		<dd>{{elt.notes}}</dd>
      		%else:
      		<dd>(none)</dd>
      		%end
					
			<dt>Importence:</dt>
			<dd>{{!helper.get_business_impact_text(elt)}}</dd>
		</dl>
		<div class="grid_6">
		    %#   " If the elements is a root problem with a huge impact and not ack, ask to ack it!"
		    %if elt.is_problem and elt.business_impact > 2 and not elt.problem_has_been_acknowledged:
			<p class="error">This element has got an important impact on your business, please fix it or acknowledge it.</p>
		    %# "end of the 'SOLVE THIS' highlight box"
		    %end
		</div>				
	</div>
		<div id="detail_container">

		<script type="text/javascript">
			document.addEvent('domready', function() {
			var tabPane = new TabPane('demo');
					
			   $('demo').addEvent('click:relay(.remove)', function(e) {
			     new Event(e).stop();
			     var parent = this.getParent('.tab');
			     var index = $('demo').getElements('.tab').indexOf(parent);
			     tabPane.closeTab(index);
			   });
					
{'fraction_non_alphanumeric': 0.17596496918585794, 'fraction_numerical': 0.006325008108984755, 'mean_word_length': 3.235576923076923, 'pattern_counts': {'":': 0, '<': 117, '<?xml version=': 0, '>': 124, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5826274', 'n_tokens_mistral': 2512, 'n_tokens_neox': 2215, 'n_words': 529}