Beispiel #1
0
    def _create_widgets(self):

        #Username
        self.username_label = HIGLabel(_("Username"))
        self.username_entry = HIGTextEntry()
        self.username_entry.set_activates_default(True)

        #Password
        self.password_label = HIGLabel(_("Password"))
        self.password_entry = HIGPasswordEntry()
        self.password_entry.set_activates_default(True)

        #Logo
        self.logo_openmonitor = gtk.gdk.pixbuf_new_from_file\
                                    (os.path.join(IMAGES_DIR, 'logoOM.png'))
        self.logo_image = gtk.Image()
        self.logo_image.set_from_pixbuf(self.logo_openmonitor)
        #self.login_text = gtk.Label(_("Log into your ICM agent."))

        #Register
        #self.register_button = HIGStockButton(gtk.STOCK_DIALOG_INFO,_("Register"))
        self.register_label = \
            gtk.Label(_("<span foreground='blue'>" \
                        "Register id</span>"))
        self.register_label.set_use_markup(True)
        self.register_button = gtk.Button()
        self.register_button.add(self.register_label)
        self.register_button.set_relief(gtk.RELIEF_NONE)

        #Forget Password
        self.forgot_password_label = \
            gtk.Label(_("<span foreground='blue'>" \
                        "Forgot password?</span>"))
        self.forgot_password_label.set_use_markup(True)
        self.forgot_password = gtk.Button()
        self.forgot_password.add(self.forgot_password_label)
        self.forgot_password.set_relief(gtk.RELIEF_NONE)

        #Auto Login
        self.auto_login_checkbtn = gtk.CheckButton(_("Auto login"))

        #Settings
        self.settings_button = HIGStockButton(gtk.STOCK_DIALOG_INFO,
                                              _("settings"))

        #Container
        self.hbox = HIGHBox(False, 2)
        self.table = HIGTable(8, 4, False)
        self.table.set_row_spacings(5)
        self.table.set_col_spacings(10)
        self.action_area.set_homogeneous(False)

        #tab orders
        self.orders = [
            self.username_entry, self.password_entry, self.register_button,
            self.forgot_password
        ]
Beispiel #2
0
    def __create_widgets(self):
        """"""
        self.peerinfo_hbox = HIGHBox()
        self.cloudagg_hbox = HIGHBox()
        self.superpeers_hbox = HIGHBox()
        self.pref_location_hbox = HIGHBox()

        self.peerinfo_section = HIGSectionLabel(_("Peer Info"))
        self.peerinfo_table = HIGTable()

        self.pref_location_section = HIGSectionLabel(_("Preferred Locations"))
        self.pref_location_table = HIGTable()

        self.cloudagg_section = HIGSectionLabel(_("Cloud Aggregator"))
        self.cloudagg_table = HIGTable()
        self.cloudagg_subhbox = HIGHBox()
        self.superpeers_section = HIGSectionLabel(_("Super Peers"))
        self.superpeers_table = HIGTable()

        self.peerid_label = HIGEntryLabel(_("Peer ID:"))
        self.email_label = HIGEntryLabel(_("Email Address:"))
        self.test_version_label = HIGEntryLabel(_("Test Sets Version:"))
        self.peerid_label2 = HIGEntryLabel()
        self.email_entry = gtk.Entry()
        self.test_version_label2 = HIGEntryLabel()

        self.longitude_label = HIGLabel(_("longitude:"))
        self.longitude_entry = gtk.Entry()
        self.latitude_label = HIGLabel(_("latitude:"))
        self.latitude_entry = gtk.Entry()

        self.cloudagg_entry = gtk.Entry()
        self.cloudagg_button = HIGButton(_("Reset"))
        self.cloudagg_button.connect('clicked',
                                     lambda w: self.reset_aggregator_url())

        self.cloudagg_button.set_size_request(80, 28)

        self.superpeers_ip_label = HIGLabel(_("IP:"))
        self.superpeers_ip_entry = gtk.Entry()
        self.superpeers_ip_entry.set_size_request(160, 26)
        self.superpeers_port_label = HIGLabel(_("Port:"))
        self.superpeers_port_entry = gtk.Entry()
        self.superpeers_port_entry.set_size_request(80, 26)

        self.superpeers_subhbox = HIGHBox()
        self.btn_box = gtk.HButtonBox()
        self.superpeers_button1 = HIGButton(_("Add"))
        self.superpeers_button1.connect('clicked',
                                        lambda w: self.add_superpeer())

        self.superpeers_button2 = HIGButton(_("Show all"))
        self.superpeers_button2.connect(
            'clicked', lambda w: self.show_super_peer_list_window())
    def __create_widgets(self):
        """
        """
        # create body elements
        self.__services_page = ServicesPage(self.__node)
        self.__system_page = SystemPage(self.__node)
        self.__trace_page = TraceroutePage(self.__node)

        # packing notebook elements
        self.append_page(self.__system_page, HIGLabel('General'))
        self.append_page(self.__services_page, HIGLabel('Services'))
        self.append_page(self.__trace_page, HIGLabel('Traceroute'))
    def __create_widgets(self):

        #box
        self.all_box = HIGVBox()
        self.input_box = HIGHBox()
        self.buttom_box = HIGHBox()
        self.check_btn_box = gtk.HButtonBox()

        #Add input
        self.title_text = HIGLabel(_("Locations"))
        self.longitude_text = HIGLabel(_("longitude:"))
        self.longitude_entry = HIGTextEntry()
        self.latitude_text = HIGLabel(_("latitude:"))
        self.latitude_entry = HIGTextEntry()

        #Add buttons
        self.get_event_btn = gtk.Button(_("Get Events"))
        self.refresh_btn = gtk.Button(_("Refresh"))

        #status bar
        self.statusbar = gtk.Statusbar()
        self.statusbar.push(0, 'Events in Database')

        self.listmodel = gtk.ListStore(str, str, str, str, str)

        # create the TreeView
        self.treeview = gtk.TreeView()

        # create the TreeViewColumns to display the data
        self.tvcolumn = [None] * len(self.column_names)
        cellpb = gtk.CellRendererText()

        self.tvcolumn[0] = gtk.TreeViewColumn(self.column_names[0], cellpb)
        self.tvcolumn[0].add_attribute(cellpb, 'text', 0)
        #cell = gtk.CellRendererText()
        #self.tvcolumn[0].set_cell_data_func(cell, self.test_type)
        self.treeview.append_column(self.tvcolumn[0])

        for n in range(1, len(self.column_names)):
            cell = gtk.CellRendererText()
            self.tvcolumn[n] = gtk.TreeViewColumn(self.column_names[n], cell)
            self.tvcolumn[n].add_attribute(cell, 'text', n)
            if n == 1:
                cell.set_property('xalign', 1.0)
            #self.tvcolumn[n].set_cell_data_func(cell, cell_data_funcs[n])
            self.treeview.append_column(self.tvcolumn[n])

        #self.treeview.connect('row-activated', self.open_file)
        self.scrolledwindow = gtk.ScrolledWindow()
        self.scrolledwindow.add(self.treeview)
        self.treeview.set_model(self.listmodel)
Beispiel #5
0
    def __init__(self):
        """
        """
        super(SaveDialog,
              self).__init__(title=_("Save Topology"),
                             action=gtk.FILE_CHOOSER_ACTION_SAVE,
                             buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
                                      gtk.STOCK_SAVE, gtk.RESPONSE_OK))

        self.__combo = gtk.combo_box_new_text()

        types_list = TYPES.keys()
        types_list.sort()

        for i in types_list:
            self.__combo.append_text(i)

        self.__combo.set_active(1)
        self.__label = HIGLabel(_("Select the output type:"))

        self.__hbox = HIGHBox()
        self.__hbox._pack_noexpand_nofill(self.__label)
        self.__hbox._pack_expand_fill(self.__combo)

        self.set_extra_widget(self.__hbox)
        self.set_do_overwrite_confirmation(True)

        self.__hbox.show_all()
    def _create_widgets(self):
        self.username_label = HIGLabel(_("Username"))
        self.username_entry = gtk.Entry()

        self.password_label = HIGLabel(_("Password"))
        self.password_entry = HIGPasswordEntry()

        self.retype_password_label = HIGLabel(_("Retype password"))
        self.retype_password_entry = HIGPasswordEntry()

        self.registration_icon = gtk.Image()
        self.registration_text = gtk.Label(
            _("If you don't have an ICM account,"
              "please register a new account."))

        self.hbox = HIGHBox()
        self.table = HIGTable()
    def __create_widgets(self):
        """
        """
        if self.__node.get_info('trace') is None:

            self.__trace_label = gtk.Label(NO_TRACE_TEXT)
            self.pack_start(self.__trace_label, True, True)

        else:

            # add hops
            hops = self.__node.get_info('trace')['hops']
            ttls = [int(i['ttl']) for i in hops]

            self.__cell = gtk.CellRendererText()

            self.__trace_scroll = HIGScrolledWindow()
            self.__trace_scroll.set_border_width(0)

            self.__trace_store = gtk.ListStore(gobject.TYPE_INT,
                                               gobject.TYPE_STRING,
                                               gobject.TYPE_STRING,
                                               gobject.TYPE_STRING,
                                               gobject.TYPE_STRING,
                                               gobject.TYPE_BOOLEAN)

            self.__trace_treeview = gtk.TreeView(self.__trace_store)

            count = 0

            for i in range(1, max(ttls) + 1):

                if i in ttls:

                    hop = hops[count]
                    count += 1

                    self.__trace_store.append([hop['ttl'],
                                               hop.get('rtt',''),
                                               hop.get('ipaddr',''),
                                               hop.get('host',''),
                                               HOP_COLOR['known'],
                                               True])

                else:
                    self.__trace_store.append([i,
                                               '',
                                               '<unknown>',
                                               '',
                                               HOP_COLOR['unknown'],
                                               True])


            self.__trace_column = list()

            for i in range(len(TRACE_HEADER)):

                column = gtk.TreeViewColumn(TRACE_HEADER[i],
                                            self.__cell,
                                            text = i)

                self.__trace_column.append(column)

                self.__trace_column[i].set_reorderable(True)
                self.__trace_column[i].set_resizable(True)
                self.__trace_column[i].set_attributes(self.__cell,
                                                      text = i,
                                                      background = 4,
                                                      editable = 5)

                self.__trace_treeview.append_column(self.__trace_column[i])

            self.__trace_column[0].set_sort_column_id(0)

            self.__trace_scroll.add_with_viewport(self.__trace_treeview)

            self.__trace_info = (self.__node.get_info('trace')['port'],
                                 self.__node.get_info('trace')['protocol'],
                                 len(self.__node.get_info('trace')['hops']))

            self.__trace_label = HIGLabel(TRACE_TEXT % self.__trace_info)
            self.__trace_label.set_use_markup(True)

            self._pack_expand_fill(self.__trace_scroll)
            self._pack_noexpand_nofill(self.__trace_label)
    def __create_widgets(self):
        """
        """
        self.__vbox = HIGVBox()
        self.__vbox.set_border_width(6)

        self.__cell = gtk.CellRendererText()

        self.__general_frame = HIGExpanderRNet('General information')
        self.__sequences_frame = HIGExpanderRNet('Sequences')
        self.__os_frame = HIGExpanderRNet('Operating System')

        self.__sequences_frame._add(gtk.Label('No sequence information.'))
        self.__os_frame._add(gtk.Label('No OS information.'))

        # general information widgets
        self.__general = HIGTableRNet(3, 2)

        self.__address_label = HIGSectionLabel('Address:')
        self.__address_list = gtk.combo_box_entry_new_text()
        self.__address_list.child.set_editable(False)

        for address in self.__node.get_info('addresses'):

            params = address['addrtype'], address['addr']
            address_text = SYSTEM_ADDRESS_TEXT % params

            if address.get('vendor', None):
                address_text += " (%s)" % address['vendor']

            self.__address_list.append_text(address_text)

        self.__address_list.set_active(0)

        self.__general._attach_next(self.__address_label,
                                    yoptions=gtk.FILL,
                                    xoptions=gtk.FILL)
        self.__general._attach_next(self.__address_list, yoptions=gtk.FILL)

        if self.__node.get_info('hostnames') is not None:

            self.__hostname_label = HIGSectionLabel('Hostname:')
            self.__hostname_list = gtk.combo_box_entry_new_text()
            self.__hostname_list.child.set_editable(False)

            for hostname in self.__node.get_info('hostnames'):

                params = hostname['type'], hostname['name']
                self.__hostname_list.append_text(SYSTEM_ADDRESS_TEXT % params)

            self.__hostname_list.set_active(0)

            self.__general._attach_next(self.__hostname_label,
                                        yoptions=gtk.FILL,
                                        xoptions=gtk.FILL)
            self.__general._attach_next(self.__hostname_list,
                                        yoptions=gtk.FILL)

        if self.__node.get_info('uptime') is not None:

            self.__uptime_label = HIGSectionLabel('Last boot:')

            seconds = self.__node.get_info('uptime')['seconds']
            lastboot = self.__node.get_info('uptime')['lastboot']

            text = '%s (%s seconds).' % (lastboot, seconds)

            self.__uptime_value = HIGLabel(text)
            self.__uptime_value.set_selectable(True)
            self.__uptime_value.set_line_wrap(False)

            self.__general._attach_next(self.__uptime_label,
                                        yoptions=gtk.FILL,
                                        xoptions=gtk.FILL)
            self.__general._attach_next(self.__uptime_value,
                                        yoptions=gtk.FILL)

        self.__general_frame._add(self.__general)
        self.__general_frame.set_expanded(True)

        # sequences information widgets
        self.__sequences = HIGTableRNet(5, 3)

        sequences = self.__node.get_info('sequences')

        if len(sequences) > 0:

            self.__sequences.attach(HIGSectionLabel('Class'), 1, 2, 0, 1)
            self.__sequences.attach(HIGSectionLabel('Values'), 2, 3, 0, 1)

            self.__sequences.attach(HIGSectionLabel('TCP *'), 0, 1, 1, 2)
            self.__sequences.attach(HIGSectionLabel('IP ID'), 0, 1, 2, 3)
            self.__sequences.attach(HIGSectionLabel('TCP Timestamp'),
                                    0,
                                    1,
                                    3,
                                    4)

            # tcp sequence values
            tcp = sequences['tcp']

            tcp_class = HIGLabel(tcp.get('class', ''))
            tcp_class.set_selectable(True)

            self.__sequences.attach(tcp_class, 1, 2, 1, 2)

            tcp_values = gtk.combo_box_entry_new_text()

            for value in tcp['values']:
                tcp_values.append_text(value)

            tcp_values.set_active(0)

            self.__sequences.attach(tcp_values, 2, 3, 1, 2)

            tcp_note = HIGLabel()
            tcp_note.set_selectable(True)
            tcp_note.set_line_wrap(False)
            tcp_note.set_alignment(1.0, 0.5)
            if tcp['index']:
                tcp_note.set_markup(
                        TCP_SEQ_NOTE % (tcp['index'], tcp['difficulty']))

            self.__sequences.attach(tcp_note, 0, 3, 4, 5)

            # ip id sequence values
            ip_id = sequences['ip_id']

            ip_id_class = HIGLabel(ip_id['class'])
            ip_id_class.set_selectable(True)

            self.__sequences.attach(ip_id_class, 1, 2, 2, 3)

            ip_id_values = gtk.combo_box_entry_new_text()

            for value in ip_id['values']:
                ip_id_values.append_text(value)

            ip_id_values.set_active(0)

            self.__sequences.attach(ip_id_values, 2, 3, 2, 3)

            # tcp sequence values
            tcp_ts = sequences['tcp_ts']

            tcp_ts_class = HIGLabel(tcp_ts['class'])
            tcp_ts_class.set_selectable(True)

            self.__sequences.attach(tcp_ts_class, 1, 2, 3, 4)

            if tcp_ts.get('values', None) is not None:

                tcp_ts_values = gtk.combo_box_entry_new_text()

                for value in tcp_ts['values']:
                    tcp_ts_values.append_text(value)

                tcp_ts_values.set_active(0)

                self.__sequences.attach(tcp_ts_values, 2, 3, 3, 4)

            self.__sequences_frame._add(self.__sequences)

        # operating system information widgets
        self.__os = gtk.Notebook()
        # XXX Setting this custom positioning causes a hard gtk bug (verified
        # on Windows 7 at least, likely to happen under Vista too. Used
        # gtk 2.14.7 and gtk 2.12.9 both with pygtk 2.12.1).
        #self.__os.set_tab_pos(gtk.POS_LEFT)

        os = self.__node.get_info('os')

        if os is not None:

            if os.has_key('matches'):

                self.__match_scroll = HIGScrolledWindow()

                self.__match_store = gtk.ListStore(gobject.TYPE_INT,
                                                   gobject.TYPE_STRING,
                                                   gobject.TYPE_INT,
                                                   gobject.TYPE_BOOLEAN)

                self.__match_treeview = gtk.TreeView(self.__match_store)

                for os_match in os['matches']:
                    if 'accuracy' not in os_match:
                        # this may happen with older .usr
                        continue
                    self.__match_store.append([os_match['accuracy'],
                                               os_match['name'],
                                               os_match['db_line'],
                                               True])

                self.__match_column = list()

                for i in range(len(OSMATCH_HEADER)):

                    column = gtk.TreeViewColumn(OSMATCH_HEADER[i],
                                                self.__cell,
                                                text = i)

                    self.__match_column.append(column)

                    self.__match_column[i].set_reorderable(True)
                    self.__match_column[i].set_resizable(True)
                    self.__match_column[i].set_attributes(self.__cell,
                                                          text = i,
                                                          editable = 3)

                    self.__match_column[i].set_sort_column_id(i)
                    self.__match_treeview.append_column(self.__match_column[i])

                self.__match_scroll.add_with_viewport(self.__match_treeview)

                self.__os.append_page(self.__match_scroll, HIGLabel('Match'))

            if os.has_key('classes'):

                self.__class_scroll = HIGScrolledWindow()

                self.__class_store = gtk.ListStore(gobject.TYPE_INT,
                                                   gobject.TYPE_STRING,
                                                   gobject.TYPE_STRING,
                                                   gobject.TYPE_STRING,
                                                   gobject.TYPE_STRING,
                                                   gobject.TYPE_BOOLEAN)

                self.__class_treeview = gtk.TreeView(self.__class_store)

                for os_class in os['classes']:

                    os_gen = ''

                    if os_class.has_key('os_gen'):
                        os_gen = os_class['os_gen']

                    self.__class_store.append([os_class['accuracy'],
                                               os_class['vendor'],
                                               os_class['type'],
                                               os_class['os_family'],
                                               os_gen,
                                               True])

                self.__class_column = list()

                for i in range(len(OSCLASS_HEADER)):

                    column = gtk.TreeViewColumn(OSCLASS_HEADER[i],
                                                self.__cell,
                                                text = i)

                    self.__class_column.append(column)

                    self.__class_column[i].set_reorderable(True)
                    self.__class_column[i].set_resizable(True)
                    self.__class_column[i].set_attributes(self.__cell,
                                                          text = i,
                                                          editable = 5)

                    self.__class_column[i].set_sort_column_id(i)
                    self.__class_treeview.append_column(self.__class_column[i])

                self.__class_scroll.add_with_viewport(self.__class_treeview)

                self.__os.append_page(self.__class_scroll, HIGLabel('Class'))

            self.__fp_viewer = HIGTextEditor()
            self.__fp_viewer._modify_font(self.__font)
            self.__fp_viewer._set_editable(False)
            self.__fp_viewer._set_text(os['fingerprint'])

            self.__fp_ports = HIGHBox()
            self.__fp_label = HIGSectionLabel('Used ports:')

            self.__fp_ports_list = gtk.combo_box_entry_new_text()
            self.__fp_ports_list.child.set_editable(False)

            self.__fp_vbox = HIGVBox()

            if os.has_key('used_ports'):

                used_ports = os['used_ports']

                for port in used_ports:

                    params = port['id'], port['protocol'], port['state']
                    self.__fp_ports_list.append_text(USED_PORTS_TEXT % params)

                self.__fp_ports_list.set_active(0)

                self.__fp_ports._pack_noexpand_nofill(self.__fp_label)
                self.__fp_ports._pack_expand_fill(self.__fp_ports_list)

                self.__fp_vbox._pack_noexpand_nofill(self.__fp_ports)

            self.__os.append_page(self.__fp_viewer, HIGLabel('Fingerprint'))
            self.__fp_vbox._pack_expand_fill(self.__os)

            self.__os_frame._add(self.__fp_vbox)
            self.__os_frame.set_expanded(True)

        self.__vbox._pack_noexpand_nofill(self.__general_frame)
        self.__vbox._pack_expand_fill(self.__os_frame)
        self.__vbox._pack_noexpand_nofill(self.__sequences_frame)

        self.add_with_viewport(self.__vbox)
    def __create_widgets(self):
        """
        """
        self.__cell = gtk.CellRendererText()

        # texteditor widgets
        self.__texteditor = HIGTextEditor()
        self.__texteditor._modify_font(self.__font)
        self.__texteditor._set_editable(False)
        self.__texteditor.set_border_width(0)

        self.__select_combobox = gtk.combo_box_new_text()
        self.__select_combobox.connect('changed', self.__change_text_value)

        self.__viewer = HIGVBox(spacing=6)
        self.__viewer.set_border_width(6)

        self.__viewer._pack_noexpand_nofill(self.__select_combobox)
        self.__viewer._pack_expand_fill(self.__texteditor)

        self.__text = list()

        # ports information
        number_of_ports = len(self.__node.get_info('ports'))
        self.__ports_label = HIGLabel('Ports (%s)' % number_of_ports)

        self.__ports_scroll = HIGScrolledWindow()

        self.__ports_store = gtk.TreeStore(gobject.TYPE_INT,
                                           gobject.TYPE_STRING,
                                           gobject.TYPE_STRING,
                                           gobject.TYPE_STRING,
                                           gobject.TYPE_STRING,
                                           gobject.TYPE_STRING,
                                           gobject.TYPE_BOOLEAN)

        self.__ports_treeview = gtk.TreeView(self.__ports_store)

        for port in self.__node.get_info('ports'):
            pstate = port['state']['state']
            if pstate:
                color = SERVICE_COLORS[port['state']['state']]
            else:
                # XXX port state is not always available
                color = '#fff'

            if port['service'].has_key('name'):
                service_name = port['service']['name']

            else:
                service_name = '<unknown>'

            if port['service'].has_key('method'):
                service_method = port['service']['method']

            else:
                service_method = '<none>'

            reference = self.__ports_store.append(None,
                                                  [port['id'],
                                                   port['protocol'],
                                                   port['state']['state'],
                                                   service_name,
                                                   service_method,
                                                   color,
                                                   True])

            for key in port['state']:
                self.__ports_store.append(reference,
                                          [port['id'],
                                           'state',
                                           key,
                                           port['state'][key],
                                           '',
                                           'white',
                                           True])

            for key in port['service']:

                if key in ['servicefp', 'extrainfo']:

                    text = '[%d] service: %s' % (port['id'], key)

                    self.__select_combobox.append_text(text)
                    self.__text.append(port['service'][key])

                    value = '<special field>'

                else:
                    value = port['service'][key]

                self.__ports_store.append(reference,
                                          [port['id'],
                                           'service',
                                           key,
                                           value,
                                           '',
                                           'white',
                                           True])

            for script in port['scripts']:

                text = '[%d] script: %s' % (port['id'], script['id'])

                self.__select_combobox.append_text(text)
                self.__text.append(script['output'])

                self.__ports_store.append(reference,
                                          [port['id'],
                                           'script',
                                           'id',
                                           script['id'],
                                           '<special field>',
                                           'white',
                                           True])

        self.__ports_column = list()

        for i in range(len(PORTS_HEADER)):

            column = gtk.TreeViewColumn(PORTS_HEADER[i],
                                        self.__cell,
                                        text = i)

            self.__ports_column.append(column)

            self.__ports_column[i].set_reorderable(True)
            self.__ports_column[i].set_resizable(True)
            self.__ports_column[i].set_sort_column_id(i)
            self.__ports_column[i].set_attributes(self.__cell,
                                                  text = i,
                                                  background = 5,
                                                  editable = 6)

            self.__ports_treeview.append_column(self.__ports_column[i])

        self.__ports_scroll.add_with_viewport(self.__ports_treeview)

        # extraports information
        number_of_xports = 0

        self.__xports_scroll = HIGScrolledWindow()

        self.__xports_store = gtk.TreeStore(gobject.TYPE_INT,
                                            gobject.TYPE_STRING,
                                            gobject.TYPE_STRING,
                                            gobject.TYPE_STRING,
                                            gobject.TYPE_BOOLEAN)

        self.__xports_treeview = gtk.TreeView(self.__xports_store)

        for xports in self.__node.get_info('extraports'):

            color = SERVICE_COLORS[xports['state']]
            number_of_xports += xports['count']

            reference = self.__xports_store.append(None,
                                                   [xports['count'],
                                                    xports['state'],
                                                    ", ".join(xports['reason']),
                                                    color,
                                                    True])

            for xreason in xports['all_reason']:
                self.__xports_store.append(reference,
                                           [xreason['count'],
                                            xports['state'],
                                            xreason['reason'],
                                            'white',
                                            True])

        self.__xports_column = list()

        for i in range(len(EXTRAPORTS_HEADER)):

            column = gtk.TreeViewColumn(EXTRAPORTS_HEADER[i],
                                        self.__cell,
                                        text = i)

            self.__xports_column.append(column)

            self.__xports_column[i].set_reorderable(True)
            self.__xports_column[i].set_resizable(True)
            self.__xports_column[i].set_sort_column_id(i)
            self.__xports_column[i].set_attributes(self.__cell,
                                                   text = i,
                                                   background = 3,
                                                   editable = 4)

            self.__xports_treeview.append_column(self.__xports_column[i])

        xports_label_text = 'Extraports (%s)' % number_of_xports
        self.__xports_label = HIGLabel(xports_label_text)

        self.__xports_scroll.add_with_viewport(self.__xports_treeview)

        self.append_page(self.__ports_scroll, self.__ports_label)
        self.append_page(self.__xports_scroll, self.__xports_label)
        self.append_page(self.__viewer, HIGLabel('Special fields'))

        if len(self.__text) > 0:
            self.__select_combobox.set_active(0)