Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-server
Commits
489827b2
Verified
Commit
489827b2
authored
4 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
WIP: cleanup
parent
4e32b1c8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/org/caosdb/server/database/proto/VersionHistoryItem.java
+9
-2
9 additions, 2 deletions
.../org/caosdb/server/database/proto/VersionHistoryItem.java
src/main/java/org/caosdb/server/utils/Info.java
+9
-11
9 additions, 11 deletions
src/main/java/org/caosdb/server/utils/Info.java
with
18 additions
and
13 deletions
src/main/java/org/caosdb/server/database/proto/VersionHistoryItem.java
+
9
−
2
View file @
489827b2
package
org.caosdb.server.database.proto
;
import
java.io.Serializable
;
import
java.util.
Linked
List
;
import
java.util.List
;
/**
* This class is a flat, data-only representation of a single item of version information. This
* class is an intermediate representation which abstracts away the data base results and comes in a
* form which is easily cacheable.
*
* @author Timm Fitschen (t.fitschen@indiscale.com)
*/
public
class
VersionHistoryItem
implements
Serializable
{
private
static
final
long
serialVersionUID
=
428030617967255942L
;
public
String
id
=
null
;
public
Linked
List
<
String
>
parents
=
null
;
public
List
<
String
>
parents
=
null
;
public
Long
seconds
=
null
;
public
Integer
nanos
=
null
;
public
String
username
=
null
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/caosdb/server/utils/Info.java
+
9
−
11
View file @
489827b2
...
...
@@ -202,10 +202,6 @@ public class Info extends AbstractObservable implements Observer, TransactionInt
}
dropOffBox
=
new
File
(
FileSystem
.
getDropOffBox
());
final
Element
info
=
new
Element
(
"Stats"
);
if
(
CaosDBServer
.
isDebugMode
())
{
info
.
setAttribute
(
"debug"
,
"true"
);
}
final
Element
counts
=
new
Element
(
"counts"
);
counts
.
setAttribute
(
"records"
,
Integer
.
toString
(
recordsCount
));
counts
.
setAttribute
(
"properties"
,
Integer
.
toString
(
propertiesCount
));
...
...
@@ -213,16 +209,18 @@ public class Info extends AbstractObservable implements Observer, TransactionInt
counts
.
setAttribute
(
"files"
,
Integer
.
toString
(
filesCount
));
counts
.
setAttribute
(
"fssize"
,
fssize
);
counts
.
setAttribute
(
"tmpfiles"
,
Integer
.
toString
(
tmpFilesCount
));
final
Element
dropOffBoxElem
=
new
Element
(
"dropOffBox"
);
if
(
CaosDBServer
.
isDebugMode
())
{
counts
.
setAttribute
(
"debug"
,
"true"
);
}
final
Element
e
=
new
Element
(
"dropOffBox"
);
if
(
dropOffBox
.
isDirectory
())
{
if
(
dropOffBox
.
canRead
())
{
if
(
tree
)
{
dropOffBoxElem
.
setAttribute
(
"path"
,
dropOffBox
.
getAbsolutePath
());
dropOffBoxElem
.
addContent
(
getTree
(
dropOffBox
.
listFiles
()));
e
.
setAttribute
(
"path"
,
dropOffBox
.
getAbsolutePath
());
e
.
addContent
(
getTree
(
dropOffBox
.
listFiles
()));
}
else
{
dropOffBoxElem
.
setAttribute
(
"path"
,
dropOffBox
.
getAbsolutePath
());
dropOffBoxElem
.
addContent
(
getFlatList
(
dropOffBox
.
listFiles
()));
e
.
setAttribute
(
"path"
,
dropOffBox
.
getAbsolutePath
());
e
.
addContent
(
getFlatList
(
dropOffBox
.
listFiles
()));
}
}
else
{
// TODO: return a message that the DropOffBox is not readable.
...
...
@@ -232,7 +230,7 @@ public class Info extends AbstractObservable implements Observer, TransactionInt
// present.
}
info
.
addContent
(
counts
);
info
.
addContent
(
dropOffBoxElem
);
info
.
addContent
(
e
);
return
info
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment