Esempio n. 1
0
    def __init__(self, availableFilters, availableFiltersFilter):
        self.available_filters = availableFilters
        self.available_filters_filter = availableFiltersFilter

        self.filters_dict = dict()
        self.removed_filters_dict = dict()

        config = Config()
        available_filter = config.get_config("available_filters_filter")
        if (available_filter):
            self.available_filters_filter.insert(available_filter)

        existing_filters = config.get_config('existing_filters')

        for existing_filters_key, existing_filters_value in existing_filters.items(
        ):
            self.filters_dict[existing_filters_value[
                'text']] = existing_filters_value['statusTip']

        self.filter_available_filters()

        ava_filters_style_str = config.array_config_str(
            'available_filters_style')
        if ava_filters_style_str:
            self.available_filters.setStyleSheet(ava_filters_style_str)

        ava_filters_filter_style_str = config.array_config_str(
            'available_filters_filter_style')
        if ava_filters_filter_style_str:
            self.available_filters_filter.setStyleSheet(
                ava_filters_filter_style_str)
Esempio n. 2
0
    def __init__(self, availablelogsfilter, availablelogs):
        self.available_logs_filter = availablelogsfilter
        self.available_logs = availablelogs

        # setup class variables
        self.path_file_dict = dict()
        self.removed_logs_dict = dict()

        config = Config()
        available_filter = config.get_config("available_logs_filter")
        if(available_filter):
            self.available_logs_filter.insert(available_filter)

        selected_logs = config.get_config('selected_logs')

        for selected_log_item_key, selected_log_item_value in selected_logs.items():
            self.removed_logs_dict[selected_log_item_value['text']] = selected_log_item_value['statusTip']

        existing_log_locations = config.get_config("existing_log_locations")
        self.add_log_files(existing_log_locations)

        ava_log_style_str = config.array_config_str('available_logs_style')
        if ava_log_style_str:
            self.available_logs.setStyleSheet(ava_log_style_str)

        ava_log_filter_style_str = config.array_config_str('available_log_filter_style')
        if ava_log_filter_style_str:
            self.available_logs_filter.setStyleSheet(ava_log_filter_style_str)
Esempio n. 3
0
    def __init__(self, *args):
        QFrame.__init__(self, *args)

        self.setFrameStyle(QFrame.StyledPanel | QFrame.Sunken)

        self.edit = QTextBrowser()
        self.edit.setFrameStyle(QFrame.NoFrame)

        self.number_bar = self.NumberBar()
        self.number_bar.setTextEdit(self.edit)

        hbox = QHBoxLayout(self)
        hbox.setSpacing(0)
        margins = QMargins(0, 0, 0, 0)
        hbox.setContentsMargins(margins)
        hbox.addWidget(self.number_bar)
        hbox.addWidget(self.edit)

        self.edit.installEventFilter(self)
        self.edit.viewport().installEventFilter(self)

        config = Config()
        style_str = config.array_config_str('log_line_number_style')

        self.setStyleSheet(style_str)
Esempio n. 4
0
    def __init__(self, logFileLocation, logTextDisplay, parent=None):
        super(DisplayLogProcessingOps, self).__init__(parent)

        self.log_file_location = logFileLocation
        self.log_text_display = logTextDisplay

        self.search_history = []
        self.goto_line_history = []
        self.log_filters = dict()

        # cache the log lines internally with a pandas Dataframe
        self.log_df = pd.DataFrame(columns=['line_number', 'log_line'])

        self.init_read_logfile()

        config = Config()
        style_str = config.array_config_str('log_display_style')
        if style_str:
            self.log_text_display.getTextEdit().setStyleSheet(style_str)

        log_processing_config = config.get_config(self.log_file_location)
        if log_processing_config:
            self.search_history = log_processing_config['search_history']
            self.goto_line_history = log_processing_config['goto_line_history']
            self.log_filters = log_processing_config['log_filters']

        # init the text highlighting class
        self.highlighter = Highlighter(
            self.log_text_display.getTextEdit().document())

        self.lock = threading.Lock()
Esempio n. 5
0
    def __init__(self, globalInformation):
        self.global_information = globalInformation

        config = Config()
        style_str = config.array_config_str('global_information_style')
        if style_str:
            self.global_information.setStyleSheet(style_str);
Esempio n. 6
0
    def __init__(self, selectedFilters):
        self.selected_filters = selectedFilters

        config = Config()
        selected_filters_style_str = config.array_config_str(
            'selected_filters_style')
        if selected_filters_style_str:
            self.selected_filters.setStyleSheet(selected_filters_style_str)
Esempio n. 7
0
    def __init__(self, openLogsSearch, globalInformationOps):
        QtWidgets.QLineEdit.__init__(self, openLogsSearch)

        self.global_information_ops = globalInformationOps
        self.local_state = State.SEARCH
        self.int_validator = QIntValidator()

        config = Config()
        open_logs_search_style = config.array_config_str(
            'open_logs_search_style')
        if open_logs_search_style:
            self.setStyleSheet(open_logs_search_style)
Esempio n. 8
0
    def __init__(self, selectedLogsList):
        QListWidget.__init__(self, selectedLogsList)

        self.selected_logs = dict()

        config = Config()
        self.selected_logs = config.get_config('selected_logs')

        for selected_log_item_key, selected_log_item_value in self.selected_logs.items(
        ):
            list_item = self.create_list_widget_item(
                selected_log_item_value['text'],
                selected_log_item_value['statusTip'])
            self.add_new_log(list_item, False)

        selected_logs_style = config.array_config_str('selected_logs_style')
        if selected_logs_style:
            self.setStyleSheet(selected_logs_style)