mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +00:00
always show tag notification
This commit is contained in:
parent
076ee69394
commit
dfce250309
@ -1,7 +1,20 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2014-2016 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.timeline.events;
|
||||
|
||||
|
@ -36,6 +36,5 @@ abstract public class TagsUpdatedEvent {
|
||||
|
||||
public TagsUpdatedEvent(Set<Long> updatedEventIDs) {
|
||||
this.updatedEventIDs = updatedEventIDs;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ import javafx.beans.InvalidationListener;
|
||||
import javafx.beans.Observable;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.control.Button;
|
||||
@ -81,8 +80,8 @@ import org.sleuthkit.autopsy.timeline.actions.ZoomIn;
|
||||
import org.sleuthkit.autopsy.timeline.actions.ZoomOut;
|
||||
import org.sleuthkit.autopsy.timeline.actions.ZoomToEvents;
|
||||
import org.sleuthkit.autopsy.timeline.datamodel.FilteredEventsModel;
|
||||
import org.sleuthkit.autopsy.timeline.events.RefreshRequestedEvent;
|
||||
import org.sleuthkit.autopsy.timeline.events.TagsUpdatedEvent;
|
||||
import org.sleuthkit.autopsy.timeline.filters.TagsFilter;
|
||||
import org.sleuthkit.autopsy.timeline.ui.countsview.CountsViewPane;
|
||||
import org.sleuthkit.autopsy.timeline.ui.detailview.DetailViewPane;
|
||||
import org.sleuthkit.autopsy.timeline.ui.detailview.tree.EventsTree;
|
||||
@ -216,12 +215,12 @@ final public class VisualizationPanel extends BorderPane {
|
||||
}
|
||||
|
||||
/**
|
||||
* convert the given epoch millis to a LocalDateTime USING THE CURERNT
|
||||
* Convert the given epoch millis to a LocalDateTime USING THE CURERNT
|
||||
* TIMEZONE FROM TIMELINECONTROLLER
|
||||
*
|
||||
* @param millis
|
||||
* @param millis The milliseconds to convert.
|
||||
*
|
||||
* @return the given epoch millis as a LocalDateTime
|
||||
* @return The given epoch millis as a LocalDateTime
|
||||
*/
|
||||
private static LocalDateTime epochMillisToLocalDateTime(long millis) {
|
||||
return LocalDateTime.ofInstant(Instant.ofEpochMilli(millis), TimeLineController.getTimeZoneID());
|
||||
@ -235,7 +234,7 @@ final public class VisualizationPanel extends BorderPane {
|
||||
}
|
||||
|
||||
@FXML // This method is called by the FXMLLoader when initialization is complete
|
||||
@NbBundle.Messages({"VisualizationPanel.refresh=refresh",
|
||||
@NbBundle.Messages({
|
||||
"VisualizationPanel.visualizationModeLabel.text=Visualization Mode:",
|
||||
"VisualizationPanel.startLabel.text=Start:",
|
||||
"VisualizationPanel.endLabel.text=End:",
|
||||
@ -252,15 +251,6 @@ final public class VisualizationPanel extends BorderPane {
|
||||
|
||||
//configure notification pane
|
||||
notificationPane.getStyleClass().add(NotificationPane.STYLE_CLASS_DARK);
|
||||
notificationPane.getActions().setAll(new Action(Bundle.VisualizationPanel_refresh()) {
|
||||
{
|
||||
setGraphic(new ImageView(REFRESH));
|
||||
setEventHandler((ActionEvent t) -> {
|
||||
filteredEvents.refresh();
|
||||
notificationPane.hide();
|
||||
});
|
||||
}
|
||||
});
|
||||
setCenter(notificationPane);
|
||||
|
||||
//configure visualization mode toggle
|
||||
@ -411,12 +401,16 @@ final public class VisualizationPanel extends BorderPane {
|
||||
@Subscribe
|
||||
@NbBundle.Messages("VisualizationPanel.tagsAddedOrDeleted=Tags have been created and/or deleted. The visualization may not be up to date.")
|
||||
public void handleTimeLineTagEvent(TagsUpdatedEvent event) {
|
||||
TagsFilter tagsFilter = filteredEvents.getFilter().getTagsFilter();
|
||||
if (tagsFilter.isSelected() && tagsFilter.isDisabled() == false) {
|
||||
Platform.runLater(() -> {
|
||||
notificationPane.setCloseButtonVisible(false);
|
||||
notificationPane.getActions().setAll(new Refresh());
|
||||
notificationPane.show(Bundle.VisualizationPanel_tagsAddedOrDeleted(), new ImageView(INFORMATION));
|
||||
});
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void handleRefreshRequestedEvent(RefreshRequestedEvent event) {
|
||||
Platform.runLater(notificationPane::hide);
|
||||
}
|
||||
|
||||
synchronized private void refreshHistorgram() {
|
||||
@ -666,4 +660,15 @@ final public class VisualizationPanel extends BorderPane {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class Refresh extends Action {
|
||||
|
||||
@NbBundle.Messages({"VisualizationPanel.refresh=refresh"})
|
||||
Refresh() {
|
||||
super(Bundle.VisualizationPanel_refresh());
|
||||
|
||||
setGraphic(new ImageView(REFRESH));
|
||||
setEventHandler(actionEvent -> filteredEvents.refresh());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user