From 65ce19d98281df82290794d2d9ef86abdb4bda21 Mon Sep 17 00:00:00 2001 From: Danny Auble <da@llnl.gov> Date: Mon, 14 Dec 2009 21:20:20 +0000 Subject: [PATCH] display total grid when looking at a single node --- src/sview/block_info.c | 3 +-- src/sview/job_info.c | 5 +---- src/sview/node_info.c | 27 ++++----------------------- src/sview/part_info.c | 3 +-- src/sview/resv_info.c | 3 +-- 5 files changed, 8 insertions(+), 33 deletions(-) diff --git a/src/sview/block_info.c b/src/sview/block_info.c index 950189003c4..e272b3e4991 100644 --- a/src/sview/block_info.c +++ b/src/sview/block_info.c @@ -588,7 +588,7 @@ void _display_info_block(List block_list, { specific_info_t *spec_info = popup_win->spec_info; char *name = (char *)spec_info->search_info->gchar_data; - int i = -1, j = 0, found = 0; + int j = 0, found = 0; sview_block_info_t *block_ptr = NULL; char *info = NULL; int update = 0; @@ -613,7 +613,6 @@ need_refresh: itr = list_iterator_create(block_list); while ((block_ptr = (sview_block_info_t*) list_next(itr))) { - i++; if(!strcmp(block_ptr->bg_block_name, name) || !strcmp(block_ptr->nodes, name)) { /* we want to over ride any subgrp in error diff --git a/src/sview/job_info.c b/src/sview/job_info.c index 5716466720f..950aac5e010 100644 --- a/src/sview/job_info.c +++ b/src/sview/job_info.c @@ -2390,7 +2390,7 @@ void _display_info_job(List info_list, popup_info_t *popup_win) int found = 0; GtkTreeView *treeview = NULL; int update = 0; - int i = -1, j = 0; + int j = 0; if(spec_info->search_info->int_data == NO_VAL) { /* info = xstrdup("No pointer given!"); */ @@ -2410,7 +2410,6 @@ need_refresh: itr = list_iterator_create(info_list); while((sview_job_info = (sview_job_info_t*) list_next(itr))) { - i++; if(sview_job_info->job_ptr->job_id == spec_info->search_info->int_data) break; @@ -2434,9 +2433,7 @@ need_refresh: found = 1; } else { itr = list_iterator_create(sview_job_info->step_list); - i=-1; while ((step_ptr = list_next(itr))) { - i++; if(step_ptr->step_id == spec_info->search_info->int_data2) { j=0; diff --git a/src/sview/node_info.c b/src/sview/node_info.c index 05b79f04b46..4c69293bad6 100644 --- a/src/sview/node_info.c +++ b/src/sview/node_info.c @@ -434,22 +434,8 @@ need_refresh: node_ptr = sview_node_info->node_ptr; i++; if(!strcmp(node_ptr->name, name)) { -/* #ifdef HAVE_BG */ -/* /\* get other blocks that are on this bp *\/ */ -/* add_extra_bluegene_buttons( */ -/* &popup_win->grid_button_list, */ -/* i, &i); */ -/* i--; */ -/* #else */ - /* this may need to go away in the future - after add_extra_cr_buttons is functional */ - get_button_list_from_main(&popup_win->grid_button_list, - i, i, i); - /* drill into node putting buttons for each - core and what not */ - add_extra_cr_buttons(&popup_win->grid_button_list, - node_ptr); -/* #endif */ + change_grid_color(popup_win->grid_button_list, + i, i, i, true, 0); _layout_node_record(treeview, node_ptr, update); found = 1; break; @@ -481,8 +467,6 @@ need_refresh: goto need_refresh; } - put_buttons_in_table(popup_win->grid_table, - popup_win->grid_button_list); } gtk_widget_show(spec_info->display_widget); @@ -1114,13 +1098,10 @@ display_it: SORTID_CNT, SORTID_NAME, SORTID_COLOR); } + setup_popup_grid_list(popup_win); + spec_info->view = INFO_VIEW; if(spec_info->type == INFO_PAGE) { - if(popup_win->grid_button_list) { - list_destroy(popup_win->grid_button_list); - } - popup_win->grid_button_list = list_create(destroy_grid_button); - _display_info_node(info_list, popup_win); goto end_it; } diff --git a/src/sview/part_info.c b/src/sview/part_info.c index c5c0dd443a8..1bf48b5f1c1 100644 --- a/src/sview/part_info.c +++ b/src/sview/part_info.c @@ -1427,7 +1427,7 @@ void _display_info_part(List info_list, popup_info_t *popup_win) ListIterator itr = NULL; sview_part_info_t *sview_part_info = NULL; int update = 0; - int i = -1, j = 0; + int j = 0; int first_time = 0; if(!spec_info->search_info->gchar_data) { @@ -1451,7 +1451,6 @@ need_refresh: itr = list_iterator_create(info_list); while ((sview_part_info = (sview_part_info_t*) list_next(itr))) { part_ptr = sview_part_info->part_ptr; - i++; if(!strcmp(part_ptr->name, name)) { j=0; while(part_ptr->node_inx[j] >= 0) { diff --git a/src/sview/resv_info.c b/src/sview/resv_info.c index a54f07ff59e..fb2e2ec2241 100644 --- a/src/sview/resv_info.c +++ b/src/sview/resv_info.c @@ -684,7 +684,7 @@ void _display_info_resv(List info_list, popup_info_t *popup_win) ListIterator itr = NULL; sview_resv_info_t *sview_resv_info = NULL; int update = 0; - int i = -1, j = 0; + int j = 0; if(!spec_info->search_info->gchar_data) { //info = xstrdup("No pointer given!"); @@ -705,7 +705,6 @@ need_refresh: itr = list_iterator_create(info_list); while ((sview_resv_info = (sview_resv_info_t*) list_next(itr))) { resv_ptr = sview_resv_info->resv_ptr; - i++; if(!strcmp(resv_ptr->name, name)) { j=0; while(resv_ptr->node_inx[j] >= 0) { -- GitLab