Skip to content
Snippets Groups Projects
Commit fbeeb424 authored by Yas Naoi's avatar Yas Naoi
Browse files

Minor fix

parent 56319bce
No related branches found
No related tags found
No related merge requests found
......@@ -362,8 +362,8 @@ function _cloud_billing_syncronize_records() {
$filter_params = array();
$all_instances_list = array();
$get_all_instances = array();
$all_instances_list = array();
$get_all_instances = array();
$get_duplicate_instances = array();
$cloud_list = cloud_get_all_clouds();
......@@ -379,17 +379,17 @@ function _cloud_billing_syncronize_records() {
$query_args = array();
$all_instances[] = $instances['instance_id'];
$all_instances[] = $instances['instance_id' ];
$instance_cloud = $instances['cloud_context'];
$query_args[] = 'instance_nickname';
$query_args[] = $instances['name'];
$query_args[] = 'dns_name';
$query_args[] = 'instance_nickname' ;
$query_args[] = $instances['name' ];
$query_args[] = 'dns_name' ;
$query_args[] = $instances['hostname'];
$query_args[] = 'instance_state_name';
$query_args[] = $instances['state'];
$query_args[] = 'launch_time';
$query_args[] = $instances['runtime'];
$query_args[] = 'instance_state_name' ;
$query_args[] = $instances['state' ];
$query_args[] = 'launch_time' ;
$query_args[] = $instances['runtime' ];
if (strtolower($instances['state']) == 'running') {
_cloud_billing_update_running($instances['instance_id'], $instance_cloud);
......@@ -544,5 +544,8 @@ function _cloud_billing_instance_total_hours($start, $end, $runtime, $terminated
$end_date = $instance_terminated_date;
}
$total_hours = _cloud_billing_get_runtime($start_date, $end_date);
return $total_hours;
}
......@@ -125,7 +125,7 @@ function cloud_cluster_display_list($form, $form_submit) {
'#disabled' => TRUE,
);
$template_url = filter_xss( l( t('Design - Template'), 'design/server_templates' ) );
drupal_set_message(check_plain(t('There are no Templates >', array())) . $template_url );
drupal_set_message(check_plain(t('There are no Templates > ', array())) . $template_url );
}
}
......@@ -975,20 +975,22 @@ function cloud_cluster_display_templates_list($form, $page_submit = '', $cluster
foreach ($result as $clust) { // Cluster server object
$server_id = $clust->server_id;
$server_list[$server_id]['server_id' ] = $server_id;
$server_list[$server_id]['server_name' ] = $clust->server_nickname;
$server_list[$server_id]['server_id' ] = $server_id;
$server_list[$server_id]['server_name' ] = $clust->server_nickname;
$server_list[$server_id]['server_template_id'] = $clust->template_id;
$server_list[$server_id]['server_template' ] = $clust->template_nickname;
$server_list[$server_id]['cloud_context' ] = $clust->cloud_type;
$server_list[$server_id]['cloud_context_name'] = isset( $cloud_name_list[$clust->cloud_type] ) ? $cloud_name_list[$clust->cloud_type] : $clust->cloud_type;
$server_list[$server_id]['servers' ] = _cloud_cluster_get_servers_count_by_id($cluster_id, $server_id, $all_instances_list = array());
$server_list[$server_id]['running' ] = _cloud_cluster_get_running_instance_count($cluster_id, $server_id, $all_instances_list);
$server_list[$server_id]['server_template' ] = $clust->template_nickname;
$server_list[$server_id]['cloud_context' ] = $clust->cloud_type;
$server_list[$server_id]['cloud_context_name'] = isset( $cloud_name_list[$clust->cloud_type] )
? $cloud_name_list[$clust->cloud_type]
: $clust->cloud_type;
$server_list[$server_id]['servers' ] = _cloud_cluster_get_servers_count_by_id($cluster_id, $server_id, $all_instances_list = array());
$server_list[$server_id]['running' ] = _cloud_cluster_get_running_instance_count($cluster_id, $server_id, $all_instances_list);
}
foreach ( $server_list as $cluster_server ) {
$server_id = $cluster_server['server_id' ];
$cloud_context = $cluster_server['cloud_context' ];
$server_id = $cluster_server['server_id' ];
$cloud_context = $cluster_server['cloud_context'];
$form['server_name' ][$server_id] = array(
'#prefix' => '<span class=\'anchor\'>',
......@@ -1919,7 +1921,7 @@ function _cloud_cluster_add_server( $cloud_context, $cluster_id) {
if ( isset($tmpl_active_count[$cloud_context]) == FALSE || $tmpl_active_count[$cloud_context] < 1 ) {
$template_url = filter_xss( l( t('Design - Template'), 'design/server_templates/' . $cloud_context . '/list' ) );
drupal_set_message(check_plain(t('There are no Templates for @cloud_name >', array('@cloud_name' => $cloud_list[$cloud_context]))) . $template_url );
drupal_set_message(check_plain(t('There are no Templates for @cloud_name > ', array('@cloud_name' => $cloud_list[$cloud_context]))) . $template_url );
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment