summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorPranav Ganorkar <pranavg189@gmail.com>2016-07-24 22:14:54 +0530
committerJonathan Kang <jonathan121537@gmail.com>2016-10-20 10:58:39 +0800
commitec6b654fea3466707efa421a0894ffc9834e3b19 (patch)
treeda0404b5401885f386043d9bc995686382f1c281 /data
parent3f028d5430e06253fd66c4294a9652d02eb31a21 (diff)
downloadgnome-logs-ec6b654fea3466707efa421a0894ffc9834e3b19.tar.gz
Add journal timestamp range filters
The journal timestamp range filters in search popover can be used to set the timestamp range of journal model.The default journal timestamp range is the currently selected boot from the boot selection menu in toolbar. The query object was modified to include two new parameters for storing the start and end timestamps of the journal. The gl_journal_set_matches() function was modified to remove setting the boot match if no boot match is specified. The search popover range button label is made consistent when user selects boot through the toolbar boot selection menu. https://bugzilla.gnome.org/show_bug.cgi?id=767996
Diffstat (limited to 'data')
-rw-r--r--data/gl-searchpopover.ui183
1 files changed, 182 insertions, 1 deletions
diff --git a/data/gl-searchpopover.ui b/data/gl-searchpopover.ui
index 7721383..0d4a9a8 100644
--- a/data/gl-searchpopover.ui
+++ b/data/gl-searchpopover.ui
@@ -142,6 +142,140 @@
</packing>
</child>
<child>
+ <object class="GtkStack" id="range_label_stack">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="when_dim_label">
+ <property name="visible">True</property>
+ <!-- Translators: When [log entries to be shown for a given timestamp range] -->
+ <property name="label" translatable="yes">When</property>
+ <property name="xalign">0</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="name">when-label</property>
+ <property name="title">page0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="show_logs_from_dim_label">
+ <property name="visible">True</property>
+ <property name="margin_top">10</property>
+ <property name="label" translatable="yes">Show Logs from…</property>
+ <property name="xalign">0</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="name">show-log-from-label</property>
+ <property name="title">page1</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkStack" id="range_stack">
+ <property name="visible">True</property>
+ <property name="vhomogeneous">False</property>
+ <property name="transition_type">crossfade</property>
+ <child>
+ <object class="GtkButton" id="select_range_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Select Timestamp Range of the Log Entries to be shown</property>
+ <property name="hexpand">True</property>
+ <signal name="clicked" handler="select_range_button_clicked"/>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="range_button_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Current Boot</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="range_button_drop_down_image">
+ <property name="visible">True</property>
+ <property name="icon_name">pan-down-symbolic</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="name">range-button</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="range_scrolled_window">
+ <property name="height_request">150</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTreeView" id="range_treeview">
+ <property name="visible">True</property>
+ <property name="model">range_liststore</property>
+ <property name="headers-visible">False</property>
+ <property name="activate-on-single-click">True</property>
+ <signal name="row-activated" handler="on_range_treeview_row_activated"/>
+ <child>
+ <object class="GtkTreeViewColumn" id="range-column">
+ <property name="title">Parameters</property>
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkCellRendererText" id="range-text-renderer"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="range-selection">
+ <property name="mode">GTK_SELECTION_BROWSE</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="name">range-list</property>
+ <property name="title">page0</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkRevealer" id="search_type_revealer">
<child>
<object class="GtkBox">
@@ -219,7 +353,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">4</property>
<property name="width">2</property>
</packing>
</child>
@@ -289,4 +423,51 @@
</row>
</data>
</object>
+ <object class="GtkListStore" id="range_liststore">
+ <columns>
+ <column type="gchararray"/>
+ <column type="gboolean"/>
+ <column type="GlSearchPopoverJournalTimestampRange"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Current Boot</col>
+ <col id="1">False</col>
+ <col id="2">GL_SEARCH_POPOVER_JOURNAL_TIMESTAMP_RANGE_CURRENT_BOOT</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Previous Boot</col>
+ <col id="1">False</col>
+ <col id="2">GL_SEARCH_POPOVER_JOURNAL_TIMESTAMP_RANGE_PREVIOUS_BOOT</col>
+ </row>
+ <row>
+ <col id="0">Separator</col>
+ <col id="1">True</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Today</col>
+ <col id="1">False</col>
+ <col id="2">GL_SEARCH_POPOVER_JOURNAL_TIMESTAMP_RANGE_TODAY</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Yesterday</col>
+ <col id="1">False</col>
+ <col id="2">GL_SEARCH_POPOVER_JOURNAL_TIMESTAMP_RANGE_YESTERDAY</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Last 3 days</col>
+ <col id="1">False</col>
+ <col id="2">GL_SEARCH_POPOVER_JOURNAL_TIMESTAMP_RANGE_LAST_3_DAYS</col>
+ </row>
+ <row>
+ <col id="0">Separator</col>
+ <col id="1">True</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Entire Journal</col>
+ <col id="1">False</col>
+ <col id="2">GL_SEARCH_POPOVER_JOURNAL_TIMESTAMP_RANGE_ENTIRE_JOURNAL</col>
+ </row>
+ </data>
+ </object>
</interface>