minor fixes
This commit is contained in:
parent
4e179d6814
commit
581dfbdd20
@ -5,15 +5,15 @@ if (!hasProperty('mainClass')) {
|
|||||||
}
|
}
|
||||||
mainClassName = mainClass
|
mainClassName = mainClass
|
||||||
|
|
||||||
version = "0.1.1";
|
version = "0.1.2";
|
||||||
|
|
||||||
//mainClassName = "inr.numass.readvac.Main"
|
//mainClassName = "inr.numass.readvac.Main"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// compile 'commons-cli:commons-cli:1.3'
|
// compile 'commons-cli:commons-cli:1.3'
|
||||||
// compile 'de.jensd:shichimifx:1.0.5'
|
// compile 'de.jensd:shichimifx:1.0.5'
|
||||||
|
compile project(':numass-storage:numass-client')
|
||||||
compile project(':dataforge-control')
|
compile project(':dataforge-control')
|
||||||
compile project(':dataforge-storage')
|
|
||||||
compile project(':dataforge-plots:plots-jfc')
|
compile project(':dataforge-plots:plots-jfc')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ import hep.dataforge.meta.MetaUtils;
|
|||||||
import hep.dataforge.storage.api.Storage;
|
import hep.dataforge.storage.api.Storage;
|
||||||
import hep.dataforge.storage.commons.StorageFactory;
|
import hep.dataforge.storage.commons.StorageFactory;
|
||||||
import hep.dataforge.storage.commons.StorageManager;
|
import hep.dataforge.storage.commons.StorageManager;
|
||||||
|
import inr.numass.client.ClientUtils;
|
||||||
import javafx.application.Application;
|
import javafx.application.Application;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.fxml.FXMLLoader;
|
import javafx.fxml.FXMLLoader;
|
||||||
@ -55,24 +56,6 @@ public class PKT8App extends Application {
|
|||||||
launch(args);
|
launch(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// public Meta startConfigDialog(Scene scene) throws IOException, ParseException, ControlException {
|
|
||||||
// FileChooser fileChooser = new FileChooser();
|
|
||||||
// fileChooser.setTitle("Open configuration file");
|
|
||||||
// fileChooser.setInitialFileName(DEFAULT_CONFIG_LOCATION);
|
|
||||||
//// fileChooser.setInitialDirectory(GlobalContext.instance().io().getRootDirectory());
|
|
||||||
// fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("xml", "*.xml", "*.XML"));
|
|
||||||
// fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("json", "*.json", "*.JSON"));
|
|
||||||
//// fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("all", "*.*"));
|
|
||||||
// File cfgFile = fileChooser.showOpenDialog(scene.getWindow());
|
|
||||||
//
|
|
||||||
// if (cfgFile != null) {
|
|
||||||
// return MetaFileReader.read(cfgFile);
|
|
||||||
// } else {
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage primaryStage) throws IOException, ControlException, ParseException {
|
public void start(Stage primaryStage) throws IOException, ControlException, ParseException {
|
||||||
// Locale.setDefault(Locale.US);// чтобы отделение десятичных знаков было точкой
|
// Locale.setDefault(Locale.US);// чтобы отделение десятичных знаков было точкой
|
||||||
@ -95,13 +78,14 @@ public class PKT8App extends Application {
|
|||||||
|
|
||||||
// setting up storage connections
|
// setting up storage connections
|
||||||
if (config.hasMeta("storage")) {
|
if (config.hasMeta("storage")) {
|
||||||
|
String numassRun = ClientUtils.getRunName(config);
|
||||||
config.getMetaList("storage").forEach(node -> {
|
config.getMetaList("storage").forEach(node -> {
|
||||||
Storage storage = StorageFactory.buildStorage(device.getContext(), node);
|
Storage storage = StorageFactory.buildStorage(device.getContext(), node);
|
||||||
if(config.hasValue("numass.run")){
|
if (!numassRun.isEmpty()) {
|
||||||
try {
|
try {
|
||||||
storage = storage.buildShelf(config.getString("numass.run"), Meta.empty());
|
storage = storage.buildShelf(numassRun, Meta.empty());
|
||||||
} catch (StorageException e) {
|
} catch (StorageException e) {
|
||||||
throw new RuntimeException(e);
|
LoggerFactory.getLogger(getClass()).error("Failed to build shelf");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
device.connect(new StorageConnection(storage), Roles.STORAGE_ROLE);
|
device.connect(new StorageConnection(storage), Roles.STORAGE_ROLE);
|
||||||
|
@ -60,6 +60,9 @@ public class PKT8Controller implements Initializable, DeviceListener, Measuremen
|
|||||||
@Override
|
@Override
|
||||||
public void initialize(URL location, ResourceBundle resources) {
|
public void initialize(URL location, ResourceBundle resources) {
|
||||||
this.consoleFragment = new ConsoleFragment();
|
this.consoleFragment = new ConsoleFragment();
|
||||||
|
consoleFragment.addLogHandler(device.getContext().getLogger());
|
||||||
|
//TODO to be removed later
|
||||||
|
consoleFragment.hookStd();
|
||||||
new FragmentWindow(consoleFragment).bindTo(consoleButton);
|
new FragmentWindow(consoleFragment).bindTo(consoleButton);
|
||||||
plotFragment = new PKT8PlotFragment(device);
|
plotFragment = new PKT8PlotFragment(device);
|
||||||
new FragmentWindow(plotFragment).bindTo(plotButton);
|
new FragmentWindow(plotFragment).bindTo(plotButton);
|
||||||
|
@ -118,11 +118,16 @@ public class PKT8PlotController implements Initializable, MeasurementListener<PK
|
|||||||
|
|
||||||
//Do not use view config here, it is applyed separately
|
//Do not use view config here, it is applyed separately
|
||||||
TimePlottable plottable = new TimePlottable(channel.getName());
|
TimePlottable plottable = new TimePlottable(channel.getName());
|
||||||
plottable.configure(deviceLineMeta);
|
if (deviceLineMeta.hasMeta("plot")) {
|
||||||
|
plottable.configure(deviceLineMeta.getMeta("plot"));
|
||||||
|
}
|
||||||
plottables.addPlottable(plottable);
|
plottables.addPlottable(plottable);
|
||||||
plotFrame.add(plottable);
|
plotFrame.add(plottable);
|
||||||
});
|
});
|
||||||
plottables.applyConfig(plotFrame.getConfig());
|
if(device.meta().hasMeta("plotConfig")){
|
||||||
|
plottables.applyConfig(device.meta().getMeta("plotConfig"));
|
||||||
|
}
|
||||||
|
// plottables.applyConfig(plotFrame.getConfig());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -141,5 +146,4 @@ public class PKT8PlotController implements Initializable, MeasurementListener<PK
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,4 +21,5 @@ dependencies {
|
|||||||
compile project(':numass-storage')
|
compile project(':numass-storage')
|
||||||
compile 'commons-cli:commons-cli:1.3.1'
|
compile 'commons-cli:commons-cli:1.3.1'
|
||||||
compile 'org.zeroturnaround:zt-zip:1.9'
|
compile 'org.zeroturnaround:zt-zip:1.9'
|
||||||
|
compile project(':dataforge-grind')
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user