Server fix. Update still not working
This commit is contained in:
parent
802993c620
commit
52e488697f
@ -4,9 +4,9 @@ import hep.dataforge.context.Context
|
||||
import hep.dataforge.exceptions.StorageException
|
||||
import hep.dataforge.meta.Meta
|
||||
import hep.dataforge.server.ServerManager
|
||||
import hep.dataforge.server.storage.StorageServeUtils
|
||||
import hep.dataforge.storage.commons.StorageFactory
|
||||
import inr.numass.client.ClientUtils
|
||||
import inr.numass.server.NumassStorageServerObject
|
||||
import javafx.beans.property.SimpleObjectProperty
|
||||
import javafx.event.EventHandler
|
||||
import javafx.scene.control.Hyperlink
|
||||
@ -40,7 +40,7 @@ class ServerView() : View("Numass server controller") {
|
||||
}
|
||||
}
|
||||
}
|
||||
label = hyperlink{
|
||||
label = hyperlink {
|
||||
action {
|
||||
hostServices.showDocument(serverManager.link);
|
||||
}
|
||||
@ -78,7 +78,7 @@ class ServerView() : View("Numass server controller") {
|
||||
}
|
||||
|
||||
}
|
||||
StorageServeUtils.addStorage(serverManager,storage,"numass-storage")
|
||||
serverManager.bind(NumassStorageServerObject(serverManager, storage, "numass-storage"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -75,7 +75,9 @@ public class NumassStorageHandler extends StorageRatpackHandler {
|
||||
@Override
|
||||
protected MetaBuilder pointLoaderPlotOptions(PointLoader loader) {
|
||||
MetaBuilder builder = super.pointLoaderPlotOptions(loader);
|
||||
if (loader.getName().startsWith("msp") || loader.getName().startsWith("vac") || loader.getName().startsWith("cryotemp")) {
|
||||
if (loader.getName().startsWith("msp")
|
||||
|| loader.getName().startsWith("vac")
|
||||
|| loader.getName().startsWith("cryotemp")) {
|
||||
builder.putValue("legend.position", "bottom");
|
||||
builder.putValue("title", "\"" + loader.getName() + "\"");
|
||||
builder.putNode(new MetaBuilder("vAxis")
|
||||
|
@ -0,0 +1,30 @@
|
||||
package inr.numass.server;
|
||||
|
||||
import hep.dataforge.server.ServerManager;
|
||||
import hep.dataforge.server.ServerObject;
|
||||
import hep.dataforge.server.storage.StorageServerObject;
|
||||
import hep.dataforge.storage.api.Storage;
|
||||
import ratpack.handling.Handler;
|
||||
|
||||
/**
|
||||
* Created by darksnake on 22-May-17.
|
||||
*/
|
||||
public class NumassStorageServerObject extends StorageServerObject {
|
||||
public NumassStorageServerObject(ServerManager manager, Storage storage, String path) {
|
||||
super(manager, storage, path);
|
||||
}
|
||||
|
||||
public NumassStorageServerObject(ServerObject parent, Storage storage) {
|
||||
super(parent, storage);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Handler buildHandler(Storage storage) {
|
||||
return new NumassStorageHandler(getManager(), storage);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected StorageServerObject buildChildStorageObject(Storage shelf) {
|
||||
return new NumassStorageServerObject(this, shelf);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user