<commit_before>{% extends "base.html" %}

{% load cloud_extras %}
						
{% block title %}Amazon EC2 Virtual Machine {{vm_name|upper}}{% endblock %}

{% block page_content %}


<div class="col-md-10 col-sm-11 main ">

	<ol class="breadcrumb">
	  	<li><a href="/">Virtual Machines</a></li>
	  	<li class="active">Amazon EC2 {{vm_name|upper}}</li>
	</ol>


	<div class="row">
		<div class="col-xs-12">
			<div class="panel panel-default">
					<div class="panel-heading">
						<h2><i class="fa fa-truck"></i>xxx name</h2>
						<div class="panel-actions">
							<a href="#" class="btn-setting"><i class="fa fa-wrench"></i></a>
							<a href="#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
							<a href="#" class="btn-close"><i class="fa fa-times"></i></a>
						</div>
					</div>
					<div class="panel-body">
						
						<div class="panel-body">

						  <ul class="list-group">
						
								<li class="list-group-item">name {{vm_cache|dict_get:"instance"|dict_get:"id"}}</li>
								<br/>
								<li class="list-group-item">instance_type {{vm_cache|dict_get:"instance"|dict_get:"instance_type"}}</li>
								<li class="list-group-item">state {{vm_cache|dict_get:"instance"|dict_get:"state"}}</li>
								<br/>
								<li class="list-group-item">tags {{vm_cache|dict_get:"instance"|dict_get:"key_name"}}</li>
								<li class="list-group-item">groups {{vm_cache|dict_get:"instance"|dict_get:"groups"}}</li>
								<br/>
								<li class="list-group-item">image_id {{vm_cache|dict_get:"instance"|dict_get:"image_id"}}</li>
								<br/>
								<li class="list-group-item">ip_address {{vm_cache|dict_get:"instance"|dict_get:"ip_address"}}</li>
								<li class="list-group-item">private_ip_address {{vm_cache|dict_get:"instance"|dict_get:"private_ip_address"}}</li>
								<li class="list-group-item">dns_name {{vm_cache|dict_get:"instance"|dict_get:"dns_name"}}</li>
								<li class="list-group-item">vpc_id {{vm_cache|dict_get:"instance"|dict_get:"vpc_id"}}</li>
								<li class="list-group-item">placement {{vm_cache|dict_get:"instance"|dict_get:"placement"}}</li>
								<li class="list-group-item">region {{vm_cache|dict_get:"instance"|dict_get:"region"}}</li>
								<br/>
								<li class="list-group-item">root_device_type {{vm_cache|dict_get:"instance"|dict_get:"root_device_type"}}</li>
								<li class="list-group-item">root_device_name {{vm_cache|dict_get:"instance"|dict_get:"root_device_name"}}</li>
								<li class="list-group-item">block_device_mapping {{vm_cache|dict_get:"instance"|dict_get:""}}</li>
								<li class="list-group-item">ramdisk {{vm_cache|dict_get:"instance"|dict_get:"ramdisk"}}</li>
								<li class="list-group-item">key_name {{vm_cache|dict_get:"instance"|dict_get:""}}</li>
								<br/>
								<li class="list-group-item">architecture {{vm_cache|dict_get:"instance"|dict_get:"architecture"}}</li>
								<li class="list-group-item">virtualization_type {{vm_cache|dict_get:"instance"|dict_get:"virtualization_type"}}</li>
								<li class="list-group-item">hypervisor {{vm_cache|dict_get:"instance"|dict_get:"hypervisor"}}</li>
								<br/>
								<li class="list-group-item">launch_time {{vm_cache|dict_get:"instance"|dict_get:"launch_time"}}</li>
							<li class="list-group-item">persistent {{vm_cache|dict_get:"instance"|dict_get:"persistent"}}</li>

						</ul>

                    </div><!--/col-->
                </div><!--/row-->	
        </div>
        <!-- end: Content -->
	</div><!--/row-->



{% comment %}
	<div class="row">
		<div class="col-xs-12">
			<div class="panel panel-default">
					<div class="panel-heading">
						<h2><i class="fa fa-truck"></i>{{vm_name}}</h2>
						<div class="panel-actions">
							<a href="#" class="btn-setting"><i class="fa fa-wrench"></i></a>
							<a href="#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
							<a href="#" class="btn-close"><i class="fa fa-times"></i></a>
						</div>
					</div>
					<div class="panel-body">

<pre>
{% for vm in vm_cache|dict_get:"instance" %}
<strong>{{vm}}</strong> {{vm_cache|dict_get:"instance"|dict_get:vm}}{% endfor %}
</pre>	


                                </div><!--/col-->
                </div><!--/row-->	
        </div>
        <!-- end: Content -->
</div><!--/row-->
{% endcomment %}


<div class="row">
    <div class="col-xs-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                    <h2><i class="fa fa-truck"></i>System metrics</h2>
                    <div class="panel-actions">
                            <a href="#" class="btn-setting"><i class="fa fa-wrench"></i></a>
                            <a href="#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
                            <a href="#" class="btn-close"><i class="fa fa-times"></i></a>
                    </div>
            </div>
            <div class="panel-body">
                
                <div id="CPU-Metrics"></div>
                <br />
                <div id="network-metrics"></div>
                <br />
                <div id="hdd-metrics"></div>


<strong>Debug:</strong> vm_cache<br/>

{% comment %}
{% for graph in vm_cache %}
{% if graph == "cpu_utilization_datapoints" %}
	<strong>{{graph}} data</strong>
	<br/>
	{% for value in vm_cache|dict_get:graph|make_json %}
		{{value|dict_get:"Timestamp"|format_datetime_special}}, value: {{value|dict_get:"Average"}}<br/>
	{% endfor %}
{% endif %}
{% endfor %}
<br/>
{% endcomment %}

<pre>
<strong>Available metrics</strong>
cpu_utilization_datapoints
networkout_datapoints
networkin_datapoints
disk_writeops_datapoints
disk_readops_datapoints
disk_writebytes_datapoints
disk_readbytes_datapoints
</pre>

            </div><!--/col-->

</div><!--/row-->	
						
<div class="row">
        <div class="col-xs-12">
                <div class="panel panel-default">
                                <div class="panel-heading">
                                        <h2><i class="fa fa-truck"></i>Alerts</h2>
                                        <div class="panel-actions">
                                                <a href="#" class="btn-setting"><i class="fa fa-wrench"></i></a>
                                                <a href="#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
                                                <a href="#" class="btn-close"><i class="fa fa-times"></i></a>
                                        </div>
                                </div>
                                <div class="panel-body" style="display: none;">
                                        TBD
                                </div><!--/col--><commit_msg>Updated wording in the devel on the cloud detil page.<commit_after>{% extends "base.html" %}

{% load cloud_extras %}
						
{% block title %}Amazon EC2 Virtual Machine {{vm_name|upper}}{% endblock %}

{% block page_content %}


<div class="col-md-10 col-sm-11 main ">

	<ol class="breadcrumb">
	  	<li><a href="/">Virtual Machines</a></li>
	  	<li class="active">Amazon EC2 {{vm_name|upper}}</li>
	</ol>


	<div class="row">
		<div class="col-xs-12">
			<div class="panel panel-default">
					<div class="panel-heading">
						<h2><i class="fa fa-truck"></i>xxx name</h2>
						<div class="panel-actions">
							<a href="#" class="btn-setting"><i class="fa fa-wrench"></i></a>
							<a href="#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
							<a href="#" class="btn-close"><i class="fa fa-times"></i></a>
						</div>
					</div>
					<div class="panel-body">
						
						<div class="panel-body">

						  <ul class="list-group">
						
								<li class="list-group-item">name {{vm_cache|dict_get:"instance"|dict_get:"id"}}</li>
								<br/>
								<li class="list-group-item">instance_type {{vm_cache|dict_get:"instance"|dict_get:"instance_type"}}</li>
								<li class="list-group-item">state {{vm_cache|dict_get:"instance"|dict_get:"state"}}</li>
								<br/>
								<li class="list-group-item">tags {{vm_cache|dict_get:"instance"|dict_get:"key_name"}}</li>
								<li class="list-group-item">groups {{vm_cache|dict_get:"instance"|dict_get:"groups"}}</li>
								<br/>
								<li class="list-group-item">image_id {{vm_cache|dict_get:"instance"|dict_get:"image_id"}}</li>
								<br/>
								<li class="list-group-item">ip_address {{vm_cache|dict_get:"instance"|dict_get:"ip_address"}}</li>
								<li class="list-group-item">private_ip_address {{vm_cache|dict_get:"instance"|dict_get:"private_ip_address"}}</li>
								<li class="list-group-item">dns_name {{vm_cache|dict_get:"instance"|dict_get:"dns_name"}}</li>
								<li class="list-group-item">vpc_id {{vm_cache|dict_get:"instance"|dict_get:"vpc_id"}}</li>
								<li class="list-group-item">placement {{vm_cache|dict_get:"instance"|dict_get:"placement"}}</li>
								<li class="list-group-item">region {{vm_cache|dict_get:"instance"|dict_get:"region"}}</li>
								<br/>
								<li class="list-group-item">root_device_type {{vm_cache|dict_get:"instance"|dict_get:"root_device_type"}}</li>
								<li class="list-group-item">root_device_name {{vm_cache|dict_get:"instance"|dict_get:"root_device_name"}}</li>
								<li class="list-group-item">block_device_mapping {{vm_cache|dict_get:"instance"|dict_get:""}}</li>
								<li class="list-group-item">ramdisk {{vm_cache|dict_get:"instance"|dict_get:"ramdisk"}}</li>
								<li class="list-group-item">key_name {{vm_cache|dict_get:"instance"|dict_get:""}}</li>
								<br/>
								<li class="list-group-item">architecture {{vm_cache|dict_get:"instance"|dict_get:"architecture"}}</li>
								<li class="list-group-item">virtualization_type {{vm_cache|dict_get:"instance"|dict_get:"virtualization_type"}}</li>
								<li class="list-group-item">hypervisor {{vm_cache|dict_get:"instance"|dict_get:"hypervisor"}}</li>
								<br/>
								<li class="list-group-item">launch_time {{vm_cache|dict_get:"instance"|dict_get:"launch_time"}}</li>
							<li class="list-group-item">persistent {{vm_cache|dict_get:"instance"|dict_get:"persistent"}}</li>

						</ul>

                    </div><!--/col-->
                </div><!--/row-->	
        </div>
        <!-- end: Content -->
	</div><!--/row-->



{% comment %}
	<div class="row">
		<div class="col-xs-12">
			<div class="panel panel-default">
					<div class="panel-heading">
						<h2><i class="fa fa-truck"></i>{{vm_name}}</h2>
						<div class="panel-actions">
							<a href="#" class="btn-setting"><i class="fa fa-wrench"></i></a>
							<a href="#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
							<a href="#" class="btn-close"><i class="fa fa-times"></i></a>
						</div>
					</div>
					<div class="panel-body">

<pre>
{% for vm in vm_cache|dict_get:"instance" %}
<strong>{{vm}}</strong> {{vm_cache|dict_get:"instance"|dict_get:vm}}{% endfor %}
</pre>	


                                </div><!--/col-->
                </div><!--/row-->	
        </div>
        <!-- end: Content -->
</div><!--/row-->
{% endcomment %}


<div class="row">
    <div class="col-xs-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                    <h2><i class="fa fa-truck"></i>System metrics</h2>
                    <div class="panel-actions">
                            <a href="#" class="btn-setting"><i class="fa fa-wrench"></i></a>
                            <a href="#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
                            <a href="#" class="btn-close"><i class="fa fa-times"></i></a>
                    </div>
            </div>
            <div class="panel-body">
                
                <div id="CPU-Metrics"></div>
                <br />
                <div id="network-metrics"></div>
                <br />
                <div id="hdd-metrics"></div>


<strong>Debug:</strong> vm_cache<br/>

{% comment %}
{% for graph in vm_cache %}
{% if graph == "cpu_utilization_datapoints" %}
	<strong>{{graph}} data</strong>
	<br/>
	{% for value in vm_cache|dict_get:graph|make_json %}
		{{value|dict_get:"Timestamp"|format_datetime_special}}, value: {{value|dict_get:"Average"}}<br/>
	{% endfor %}
{% endif %}
{% endfor %}
<br/>
{% endcomment %}

<pre>
<strong>(Only) Available metrics from the ec2.cloudwatch:</strong>
cpu_utilization_datapoints
networkout_datapoints
networkin_datapoints
disk_writeops_datapoints
disk_readops_datapoints
disk_writebytes_datapoints
disk_readbytes_datapoints
</pre>

            </div><!--/col-->

</div><!--/row-->	
						
<div class="row">
        <div class="col-xs-12">
                <div class="panel panel-default">
                                <div class="panel-heading">
                                        <h2><i class="fa fa-truck"></i>Alerts</h2>
                                        <div class="panel-actions">
                                                <a href="#" class="btn-setting"><i class="fa fa-wrench"></i></a>
                                                <a href="#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
                                                <a href="#" class="btn-close"><i class="fa fa-times"></i></a>
                                        </div>
                                </div>
                                <div class="panel-body" style="display: none;">
                                        TBD
                                </div><!--/col-->
{'fraction_non_alphanumeric': 0.20666864696272091, 'fraction_numerical': 0.0033417495915639387, 'mean_word_length': 2.470876288659794, 'pattern_counts': {'":': 0, '<': 413, '<?xml version=': 0, '>': 413, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2059919', 'n_tokens_mistral': 5254, 'n_tokens_neox': 4300, 'n_words': 640}