diff --git a/numass-control/miranda/build.gradle b/numass-control/miranda/build.gradle
new file mode 100644
index 00000000..c860b9aa
--- /dev/null
+++ b/numass-control/miranda/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'application'
+
+description = "Joint measurement for vacuum, msp and temperature measurements"
+
+dependencies{
+ compile project(':numass-control:cryotemp')
+ compile project(':numass-control:msp')
+ compile project(':numass-control:vac')
+ compile project(':numass-storage:numass-server')
+}
diff --git a/numass-control/miranda/src/main/java/inr/numass/control/miranda/MirandaApp.java b/numass-control/miranda/src/main/java/inr/numass/control/miranda/MirandaApp.java
new file mode 100644
index 00000000..2b85c6e1
--- /dev/null
+++ b/numass-control/miranda/src/main/java/inr/numass/control/miranda/MirandaApp.java
@@ -0,0 +1,18 @@
+package inr.numass.control.miranda;/**
+ * Created by darksnake on 13-Oct-16.
+ */
+
+import javafx.application.Application;
+import javafx.stage.Stage;
+
+public class MirandaApp extends Application {
+
+ public static void main(String[] args) {
+ launch(args);
+ }
+
+ @Override
+ public void start(Stage primaryStage) {
+
+ }
+}
diff --git a/numass-storage/numass-client/build.gradle b/numass-storage/numass-client/build.gradle
index 3b0197de..b0307601 100644
--- a/numass-storage/numass-client/build.gradle
+++ b/numass-storage/numass-client/build.gradle
@@ -18,7 +18,7 @@ task runClient(type: JavaExec) {
}
dependencies {
- compile(project(':numass-storage'))
+ compile project(':numass-storage')
compile 'commons-cli:commons-cli:1.3.1'
compile 'org.zeroturnaround:zt-zip:1.9'
}
\ No newline at end of file
diff --git a/numass-storage/numass-client/src/main/java/inr/numass/client/Cli.java b/numass-storage/numass-client/src/main/java/inr/numass/client/Cli.java
index 88954429..c2bd6dfc 100644
--- a/numass-storage/numass-client/src/main/java/inr/numass/client/Cli.java
+++ b/numass-storage/numass-client/src/main/java/inr/numass/client/Cli.java
@@ -17,6 +17,7 @@ import java.io.InputStreamReader;
import java.util.Map;
/**
+ * CLI interface for numass client
* @author Alexander Nozik
*/
public class Cli {
diff --git a/numass-storage/numass-client/src/main/java/inr/numass/client/RemoteNumassStorage.java b/numass-storage/numass-client/src/main/java/inr/numass/client/RemoteNumassStorage.java
index 96765fb0..1b5eb93e 100644
--- a/numass-storage/numass-client/src/main/java/inr/numass/client/RemoteNumassStorage.java
+++ b/numass-storage/numass-client/src/main/java/inr/numass/client/RemoteNumassStorage.java
@@ -40,7 +40,7 @@ public class RemoteNumassStorage extends AbstractStorage {
@Override
public Loader buildLoader(Meta loaderConfiguration) throws StorageException {
- return null;
+ throw new UnsupportedOperationException();
}
@Override
diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRootHandler.java b/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRootHandler.java
index bc095691..53c01057 100644
--- a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRootHandler.java
+++ b/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRootHandler.java
@@ -6,7 +6,6 @@
package inr.numass.server;
import freemarker.template.Template;
-import hep.dataforge.exceptions.StorageException;
import hep.dataforge.storage.api.Loader;
import hep.dataforge.storage.api.StateLoader;
import hep.dataforge.storage.api.Storage;
@@ -17,14 +16,13 @@ import ratpack.handling.Context;
import ratpack.handling.Handler;
import java.io.StringWriter;
-import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
+import static hep.dataforge.storage.servlet.StorageRenderer.renderStorage;
import static inr.numass.server.HandlerUtils.renderStates;
/**
- *
* @author Alexander Nozik
*/
@SuppressWarnings("unchecked")
@@ -66,7 +64,9 @@ public class NumassRootHandler implements Handler {
try {
StringBuilder b = new StringBuilder();
- renderStorage(ctx, b, server.getRun().getStorage());
+ Storage rootStorage = server.getRun().getStorage();
+ rootStorage.refresh();
+ renderStorage(b, rootStorage);
data.put("storageContent", b.toString());
} catch (Exception ex) {
data.put("storageContent", ex.toString());
@@ -86,24 +86,24 @@ public class NumassRootHandler implements Handler {
}
}
- private void renderStorage(Context ctx, StringBuilder b, Storage storage){
- try {
- b.append("
\n");
- storage.shelves().values().stream().sorted(Comparator.comparing(it -> it.getName())).forEach(shelf -> {
- b.append(String.format("
+ %s
%n", shelf.getName()));
- renderStorage(ctx, b, shelf);
- });
-
- b.append("
\n");
-
- storage.loaders().values().stream().sorted(Comparator.comparing(it->it.getName())).forEach(loader -> renderLoader(ctx, b, loader));
-
- b.append("
\n");
- b.append("
\n");
- }catch (StorageException ex){
- throw new RuntimeException(ex);
- }
- }
+// private void renderStorage(Context ctx, StringBuilder b, Storage storage){
+// try {
+// b.append("\n");
+// storage.shelves().values().stream().sorted(Comparator.comparing(it -> it.getName())).forEach(shelf -> {
+// b.append(String.format("
+ %s
%n", shelf.getName()));
+// renderStorage(ctx, b, shelf);
+// });
+//
+// b.append("
\n");
+//
+// storage.loaders().values().stream().sorted(Comparator.comparing(it->it.getName())).forEach(loader -> renderLoader(ctx, b, loader));
+//
+// b.append("
\n");
+// b.append("
\n");
+// }catch (StorageException ex){
+// throw new RuntimeException(ex);
+// }
+// }
private void renderLoader(Context ctx, StringBuilder b, Loader loader) {
String href = "/storage?path=" + loader.getPath();
diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRun.java b/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRun.java
index ae30d868..89685df2 100644
--- a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRun.java
+++ b/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRun.java
@@ -71,7 +71,7 @@ public class NumassRun implements Annotated, Responder {
public NumassRun(String path, NumassStorage workStorage, MessageFactory factory) throws StorageException {
this.storage = workStorage;
this.states = LoaderFactory.buildStateLoder(storage, RUN_STATE, null);
- this.noteLoader = LoaderFactory.buildObjectLoder(storage, RUN_NOTES, null);
+ this.noteLoader = (ObjectLoader) LoaderFactory.buildObjectLoder(storage, RUN_NOTES, null);
this.factory = factory;
this.runPath = path;
logger = LoggerFactory.getLogger("CURRENT_RUN");
diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassServer.java b/numass-storage/numass-server/src/main/java/inr/numass/server/NumassServer.java
index 07aada1a..b45b2031 100644
--- a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassServer.java
+++ b/numass-storage/numass-server/src/main/java/inr/numass/server/NumassServer.java
@@ -32,7 +32,6 @@ import ratpack.server.RatpackServer;
import ratpack.server.RatpackServerSpec;
import ratpack.server.ServerConfigBuilder;
-import java.io.File;
import java.io.IOException;
import java.net.InetAddress;
@@ -55,11 +54,11 @@ public class NumassServer extends AbstractNetworkListener {
init(storage);
}
- public NumassServer(String rootPath, Meta rootConfig, Meta listnerConfig) throws StorageException {
- super(listnerConfig);
- logger.info("Initializing file storage in {}", rootPath);
- init(FileStorage.in(new File(rootPath), rootConfig));
- }
+// public NumassServer(String rootPath, Meta rootConfig, Meta listnerConfig) throws StorageException {
+// super(listnerConfig);
+// logger.info("Initializing file storage in {}", rootPath);
+// init(FileStorage.in(new File(rootPath), rootConfig));
+// }
/**
* Init the root storage and state loader
diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassServerDaemon.java b/numass-storage/numass-server/src/main/java/inr/numass/server/NumassServerDaemon.java
index 10b8fbb7..abd8f6ae 100644
--- a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassServerDaemon.java
+++ b/numass-storage/numass-server/src/main/java/inr/numass/server/NumassServerDaemon.java
@@ -85,6 +85,7 @@ public class NumassServerDaemon implements Daemon, Annotated {
}
logger.info("Initializing file storage in {}", repoPath);
root = FileStorage.in(new File(repoPath), repoConfig);
+// root.toggleMonitor(true);
}
@Override
diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassStorageHandler.java b/numass-storage/numass-server/src/main/java/inr/numass/server/NumassStorageHandler.java
index 55abae23..569d301b 100644
--- a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassStorageHandler.java
+++ b/numass-storage/numass-server/src/main/java/inr/numass/server/NumassStorageHandler.java
@@ -77,6 +77,12 @@ public class NumassStorageHandler extends StorageRatpackHandler {
.putValue("logScale", true)
.putValue("format", "scientific")
);
+ builder.putNode(new MetaBuilder("hAxis")
+ .putValue("title", "timestamp")
+// .putValue("gridlines.count", -1)
+// .putValues("gridlines.units.days.format", "MMM dd")
+// .putValues("gridlines.units.hours.format", "HH:mm", "ha")
+ );
}
return builder;
}