~ubuntu-branches/ubuntu/vivid/slurm-llnl/vivid

« back to all changes in this revision

Viewing changes to src/sview/node_info.c

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2009-09-24 23:28:15 UTC
  • mfrom: (1.1.11 upstream) (3.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090924232815-enh65jn32q1ebg07
Tags: 2.0.5-1
* New upstream release 
* Changed dependecy from lib-mysqlclient15 to lib-mysqlclient 
* Added Default-Start for runlevel 2 and 4 and $remote_fs requirement in
  init.d scripts (Closes: #541252)
* Postinst checks for wrong runlevels 2 and 4 links
* Upgraded to standard version 3.8.3
* Add lintian overrides for missing slurm-llnl-configurator.html in doc
  base registration
* modified postrm scripts to ignore pkill return value in order to avoid
  postrm failure when no slurm process is running
* Checking for slurmctld.pid before cancelling running and pending
  jobs during package removal 

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
7
7
 *  Written by Danny Auble <da@llnl.gov>
8
8
 *
9
 
 *  LLNL-CODE-402394.
 
9
 *  CODE-OCEC-09-009. All rights reserved.
10
10
 *  
11
11
 *  This file is part of SLURM, a resource management program.
12
 
 *  For details, see <http://www.llnl.gov/linux/slurm/>.
 
12
 *  For details, see <https://computing.llnl.gov/linux/slurm/>.
 
13
 *  Please also read the included file: DISCLAIMER.
13
14
 *  
14
15
 *  SLURM is free software; you can redistribute it and/or modify it under
15
16
 *  the terms of the GNU General Public License as published by the Free
106
107
        {G_TYPE_STRING, BLOCK_PAGE, "Blocks", TRUE, NODE_PAGE},
107
108
#endif
108
109
        {G_TYPE_STRING, PART_PAGE, "Partition", TRUE, NODE_PAGE},
 
110
        {G_TYPE_STRING, RESV_PAGE, "Reservation", TRUE, NODE_PAGE},
109
111
        {G_TYPE_STRING, SUBMIT_PAGE, "Job Submit", FALSE, NODE_PAGE},
110
112
        {G_TYPE_NONE, -1, NULL, FALSE, EDIT_NONE}
111
113
};
467
469
        static bool changed = 0;
468
470
 
469
471
        if(!force && ((now - last) < global_sleep_time)) {
 
472
                if(*info_ptr != node_info_ptr)
 
473
                        error_code = SLURM_SUCCESS;
470
474
                *info_ptr = node_info_ptr;
471
475
                if(changed) 
472
476
                        return SLURM_SUCCESS;
493
497
                changed = 1;
494
498
        }
495
499
        node_info_ptr = new_node_ptr;
 
500
 
 
501
        if(*info_ptr != node_info_ptr) 
 
502
                error_code = SLURM_SUCCESS;
 
503
        
496
504
        *info_ptr = new_node_ptr;
497
505
        return error_code;
498
506
}
828
836
        /* set up the grid */
829
837
        itr = list_iterator_create(info_list);
830
838
        while ((sview_node_info_ptr = list_next(itr))) {
831
 
                change_grid_color(grid_button_list, i, i, i);
 
839
                change_grid_color(grid_button_list, i, i, i, true);
832
840
                i++;
833
841
        }
834
842
        list_iterator_destroy(itr);
907
915
                                          label,
908
916
                                          0, 1, 0, 1); 
909
917
                gtk_widget_show(label); 
910
 
                spec_info->display_widget = gtk_widget_ref(GTK_WIDGET(label));
 
918
                spec_info->display_widget = gtk_widget_ref(label);
911
919
                return;
912
920
        }
913
921
display_it:     
946
954
                goto end_it;
947
955
        }
948
956
 
949
 
        if(popup_win->grid_button_list) {
950
 
                list_destroy(popup_win->grid_button_list);
951
 
        }              
952
 
#ifdef HAVE_3D
953
 
        popup_win->grid_button_list = copy_main_button_list();
954
 
#else
955
 
        popup_win->grid_button_list = list_create(destroy_grid_button);
956
 
#endif  
 
957
        setup_popup_grid_list(popup_win);
957
958
        
958
959
        /* just linking to another list, don't free the inside, just
959
960
           the list */
996
997
                                break;
997
998
                        else if(no_resp_flag1 && no_resp_flag2)
998
999
                                break;
999
 
                        
 
1000
 
1000
1001
                        if(node_ptr->node_state != search_info->int_data)
1001
1002
                                continue;
1002
1003
                        break;
1021
1022
                
1022
1023
                if(!found)
1023
1024
                        continue;
1024
 
                
1025
1025
                list_push(send_info_list, sview_node_info_ptr);
1026
 
#ifdef HAVE_3D
1027
1026
                change_grid_color(popup_win->grid_button_list,
1028
 
                                  i, i, 0);
1029
 
#else
1030
 
                get_button_list_from_main(&popup_win->grid_button_list,
1031
 
                                          i, i, 0);             
1032
 
#endif
 
1027
                                  i, i, 0, true);
1033
1028
        }
1034
1029
        list_iterator_destroy(itr);
1035
1030
 
1038
1033
                hostlist_destroy(hostlist);
1039
1034
        }
1040
1035
 
1041
 
 
1042
 
        put_buttons_in_table(popup_win->grid_table,
1043
 
                             popup_win->grid_button_list);
1044
 
 
1045
1036
        _update_info_node(send_info_list, 
1046
1037
                          GTK_TREE_VIEW(spec_info->display_widget));
1047
1038
        list_destroy(send_info_list);
1060
1051
        popup_info_t *popup_win = (popup_info_t *)arg;
1061
1052
        switch(type) {
1062
1053
        case TAB_CLICKED:
1063
 
                make_fields_menu(menu, display_data_node, SORTID_CNT);
 
1054
                make_fields_menu(NULL, menu, display_data_node, SORTID_CNT);
1064
1055
                break;
1065
1056
        case ROW_CLICKED:
1066
1057
                make_options_menu(tree_view, path, menu, options_data_node);
1067
1058
                break;
1068
1059
        case POPUP_CLICKED:
1069
 
                make_popup_fields_menu(popup_win, menu);
 
1060
                make_fields_menu(popup_win, menu,
 
1061
                                 popup_win->display_data, SORTID_CNT);
1070
1062
                break;
1071
1063
        default:
1072
1064
                g_error("UNKNOWN type %d given to set_fields\n", type);
1094
1086
        case PART_PAGE:
1095
1087
                snprintf(title, 100, "Partition(s) with %s %s", node, name);
1096
1088
                break;
 
1089
        case RESV_PAGE:
 
1090
                snprintf(title, 100, "Reservation(s) with %s %s", node, name);
 
1091
                break;
1097
1092
        case BLOCK_PAGE: 
1098
1093
                snprintf(title, 100, "Blocks(s) with %s %s", node, name);
1099
1094
                break;