mirror of https://gitee.com/bigwinds/arangodb
Some css fixes
This commit is contained in:
commit
9dda1559bb
|
@ -104,3 +104,4 @@ js/apps/*
|
|||
!js/apps/system
|
||||
!js/apps/system/*
|
||||
|
||||
.sass-cache/
|
||||
|
|
|
@ -176,19 +176,26 @@ advantage that you can use auto-completion.
|
|||
|
||||
------------------------------------- Help -------------------------------------
|
||||
Predefined objects:
|
||||
arango: ArangoConnection
|
||||
db: ArangoDatabase
|
||||
arango: ArangoConnection
|
||||
db: ArangoDatabase
|
||||
fm: FoxxManager
|
||||
Example:
|
||||
> db._collections(); list all collections
|
||||
> db._create(<coll_name>); create a new collection
|
||||
> db._drop(<coll_name>); drop a collection
|
||||
> db.<coll_name>.all(); list all documents
|
||||
> id = db.<coll_name>.save({ ... }); save a document
|
||||
> db.<coll_name>.remove(<_id>); delete a document
|
||||
> db.<coll_name>.document(<_id>); get a document
|
||||
> help show help pages
|
||||
> helpQueries query help
|
||||
> exit
|
||||
> db._collections(); list all collections
|
||||
> db._create(<name>) create a new collection
|
||||
> db._drop(<name>) drop a collection
|
||||
> db.<name>.toArray() list all documents
|
||||
> id = db.<name>.save({ ... }) save a document
|
||||
> db.<name>.remove(<_id>) delete a document
|
||||
> db.<name>.document(<_id>) retrieve a document
|
||||
> db.<name>.replace(<_id>, {...}) overwrite a document
|
||||
> db.<name>.update(<_id>, {...}) partially update a document
|
||||
> db.<name>.exists(<_id>) check if document exists
|
||||
> db._query(<query>).toArray() execute an AQL query
|
||||
> db._useDatabase(<name>) switch database
|
||||
> db._createDatabase(<name>) create a new database
|
||||
> db._listDatabases() list existing databases
|
||||
> help show help pages
|
||||
> exit
|
||||
arangosh>
|
||||
|
||||
This gives you a prompt, where you can issue JavaScript commands.
|
||||
|
@ -273,10 +280,7 @@ Querying For Documents {#FirstStepsArangoDBQuerying}
|
|||
----------------------------------------------------
|
||||
|
||||
All documents are stored in collections. All collections are stored in a
|
||||
database. The database object is accessible there the variable `db` from
|
||||
the module
|
||||
|
||||
arangosh> var db = require("org/arangodb").db;
|
||||
database. The database object is accessible via the variable `db`.
|
||||
|
||||
Creating a collection is simple. You can use the `_create` method
|
||||
of the `db` variable.
|
||||
|
|
|
@ -55,6 +55,11 @@ using namespace std;
|
|||
BOOST_CHECK_EQUAL(expected, e->FEATURE_NAME(feature)()); \
|
||||
DELETE_ENDPOINT(e);
|
||||
|
||||
#define CHECK_ENDPOINT_SERVER_FEATURE(type, specification, feature, expected) \
|
||||
e = Endpoint::serverFactory(specification, 1, true); \
|
||||
BOOST_CHECK_EQUAL(expected, e->FEATURE_NAME(feature)()); \
|
||||
DELETE_ENDPOINT(e);
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -121,8 +126,9 @@ BOOST_AUTO_TEST_CASE (EndpointSpecification) {
|
|||
CHECK_ENDPOINT_FEATURE(client, "tcp://localhost", Specification, "tcp://localhost");
|
||||
CHECK_ENDPOINT_FEATURE(client, "SSL://127.0.0.5", Specification, "SSL://127.0.0.5");
|
||||
CHECK_ENDPOINT_FEATURE(client, "httP@ssl://localhost:4635", Specification, "httP@ssl://localhost:4635");
|
||||
CHECK_ENDPOINT_FEATURE(server, "unix:///path/to/socket", Specification, "unix:///path/to/socket");
|
||||
CHECK_ENDPOINT_FEATURE(server, "htTp@UNIx:///a/b/c/d/e/f.s", Specification, "htTp@UNIx:///a/b/c/d/e/f.s");
|
||||
|
||||
CHECK_ENDPOINT_SERVER_FEATURE(server, "unix:///path/to/socket", Specification, "unix:///path/to/socket");
|
||||
CHECK_ENDPOINT_SERVER_FEATURE(server, "htTp@UNIx:///a/b/c/d/e/f.s", Specification, "htTp@UNIx:///a/b/c/d/e/f.s");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -138,11 +144,11 @@ BOOST_AUTO_TEST_CASE (EndpointTypes) {
|
|||
CHECK_ENDPOINT_FEATURE(client, "ssl://localhost", Type, Endpoint::ENDPOINT_CLIENT);
|
||||
CHECK_ENDPOINT_FEATURE(client, "unix:///path/to/socket", Type, Endpoint::ENDPOINT_CLIENT);
|
||||
|
||||
CHECK_ENDPOINT_FEATURE(server, "tcp://127.0.0.1", Type, Endpoint::ENDPOINT_SERVER);
|
||||
CHECK_ENDPOINT_FEATURE(server, "tcp://localhost", Type, Endpoint::ENDPOINT_SERVER);
|
||||
CHECK_ENDPOINT_FEATURE(server, "ssl://127.0.0.1", Type, Endpoint::ENDPOINT_SERVER);
|
||||
CHECK_ENDPOINT_FEATURE(server, "ssl://localhost", Type, Endpoint::ENDPOINT_SERVER);
|
||||
CHECK_ENDPOINT_FEATURE(server, "unix:///path/to/socket", Type, Endpoint::ENDPOINT_SERVER);
|
||||
CHECK_ENDPOINT_SERVER_FEATURE(server, "tcp://127.0.0.1", Type, Endpoint::ENDPOINT_SERVER);
|
||||
CHECK_ENDPOINT_SERVER_FEATURE(server, "tcp://localhost", Type, Endpoint::ENDPOINT_SERVER);
|
||||
CHECK_ENDPOINT_SERVER_FEATURE(server, "ssl://127.0.0.1", Type, Endpoint::ENDPOINT_SERVER);
|
||||
CHECK_ENDPOINT_SERVER_FEATURE(server, "ssl://localhost", Type, Endpoint::ENDPOINT_SERVER);
|
||||
CHECK_ENDPOINT_SERVER_FEATURE(server, "unix:///path/to/socket", Type, Endpoint::ENDPOINT_SERVER);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -460,7 +466,7 @@ BOOST_AUTO_TEST_CASE (EndpointHostString) {
|
|||
BOOST_AUTO_TEST_CASE (EndpointIsConnectedServer1) {
|
||||
Endpoint* e;
|
||||
|
||||
e = Endpoint::serverFactory("tcp://127.0.0.1");
|
||||
e = Endpoint::serverFactory("tcp://127.0.0.1", 1, true);
|
||||
BOOST_CHECK_EQUAL(false, e->isConnected());
|
||||
DELETE_ENDPOINT(e);
|
||||
}
|
||||
|
@ -472,7 +478,7 @@ BOOST_AUTO_TEST_CASE (EndpointIsConnectedServer1) {
|
|||
BOOST_AUTO_TEST_CASE (EndpointIsConnectedServer2) {
|
||||
Endpoint* e;
|
||||
|
||||
e = Endpoint::serverFactory("ssl://127.0.0.1");
|
||||
e = Endpoint::serverFactory("ssl://127.0.0.1", 1, true);
|
||||
BOOST_CHECK_EQUAL(false, e->isConnected());
|
||||
DELETE_ENDPOINT(e);
|
||||
}
|
||||
|
@ -484,7 +490,7 @@ BOOST_AUTO_TEST_CASE (EndpointIsConnectedServer2) {
|
|||
BOOST_AUTO_TEST_CASE (EndpointIsConnectedServer3) {
|
||||
Endpoint* e;
|
||||
|
||||
e = Endpoint::serverFactory("unix:///tmp/socket");
|
||||
e = Endpoint::serverFactory("unix:///tmp/socket", 1, true);
|
||||
BOOST_CHECK_EQUAL(false, e->isConnected());
|
||||
DELETE_ENDPOINT(e);
|
||||
}
|
||||
|
@ -532,7 +538,7 @@ BOOST_AUTO_TEST_CASE (EndpointIsConnectedClient3) {
|
|||
BOOST_AUTO_TEST_CASE (EndpointServerTcpIpv4WithPort) {
|
||||
Endpoint* e;
|
||||
|
||||
e = Endpoint::serverFactory("tcp://127.0.0.1:667");
|
||||
e = Endpoint::serverFactory("tcp://127.0.0.1:667", 1, true);
|
||||
BOOST_CHECK_EQUAL("tcp://127.0.0.1:667", e->getSpecification());
|
||||
BOOST_CHECK_EQUAL(Endpoint::ENDPOINT_SERVER, e->getType());
|
||||
BOOST_CHECK_EQUAL(Endpoint::DOMAIN_IPV4, e->getDomainType());
|
||||
|
@ -552,7 +558,7 @@ BOOST_AUTO_TEST_CASE (EndpointServerTcpIpv4WithPort) {
|
|||
BOOST_AUTO_TEST_CASE (EndpointServerUnix) {
|
||||
Endpoint* e;
|
||||
|
||||
e = Endpoint::serverFactory("unix:///path/to/arango.sock");
|
||||
e = Endpoint::serverFactory("unix:///path/to/arango.sock", 1, true);
|
||||
BOOST_CHECK_EQUAL("unix:///path/to/arango.sock", e->getSpecification());
|
||||
BOOST_CHECK_EQUAL(Endpoint::ENDPOINT_SERVER, e->getType());
|
||||
BOOST_CHECK_EQUAL(Endpoint::DOMAIN_UNIX, e->getDomainType());
|
||||
|
|
|
@ -134,7 +134,7 @@ bool V8PeriodicJob::beginShutdown () {
|
|||
/// {@inheritDoc}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void V8PeriodicJob::handleError (basics::TriagensError const& ex) {
|
||||
void V8PeriodicJob::handleError (triagens::basics::TriagensError const& ex) {
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -1043,14 +1043,8 @@ static v8::Handle<v8::Value> JS_ClusterTest (v8::Arguments const& argv) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static v8::Handle<v8::Value> JS_DefinePeriodic (v8::Arguments const& argv) {
|
||||
v8::Isolate* isolate;
|
||||
|
||||
TRI_v8_global_t* v8g;
|
||||
v8::HandleScope scope;
|
||||
|
||||
isolate = v8::Isolate::GetCurrent();
|
||||
v8g = (TRI_v8_global_t*) isolate->GetData();
|
||||
|
||||
if (argv.Length() != 5) {
|
||||
TRI_V8_EXCEPTION_USAGE(scope, "definePeriodic(<offset>, <period>, <module>, <funcname>, <string-parameter>)");
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
disable-authentication = true
|
||||
endpoint = tcp://localhost:8529
|
||||
threads = 5
|
||||
reuse-address = true
|
||||
|
||||
[scheduler]
|
||||
threads = 3
|
||||
|
|
|
@ -108,6 +108,7 @@
|
|||
var Communication = require("org/arangodb/cluster/agency-communication"),
|
||||
comm = new Communication.Communication(),
|
||||
beats = comm.sync.Heartbeats(),
|
||||
diff = comm.diff.current,
|
||||
servers = comm.current.DBServers(),
|
||||
dbs = comm.current.Databases(),
|
||||
coords = comm.current.Coordinators();
|
||||
|
@ -123,6 +124,7 @@
|
|||
*
|
||||
*/
|
||||
controller.get("/ClusterType", function(req, res) {
|
||||
// Not yet implemented
|
||||
res.json({
|
||||
type: "symmetricSetup"
|
||||
});
|
||||
|
@ -136,9 +138,12 @@
|
|||
controller.get("/DBServers", function(req, res) {
|
||||
var resList = [],
|
||||
list = servers.getList(),
|
||||
diffList = diff.DBServers(),
|
||||
noBeat = beats.noBeat(),
|
||||
serving = beats.getServing();
|
||||
|
||||
require("console").log(JSON.stringify(diffList));
|
||||
|
||||
_.each(list, function(v, k) {
|
||||
v.name = k;
|
||||
resList.push(v);
|
||||
|
@ -184,11 +189,22 @@
|
|||
controller.get("/:dbname/Collections", function(req, res) {
|
||||
var dbname = req.params("dbname"),
|
||||
selected = dbs.select(dbname);
|
||||
res.json(_.map(selected.getCollections(),
|
||||
function(c) {
|
||||
return {name: c};
|
||||
})
|
||||
);
|
||||
try {
|
||||
res.json(_.map(selected.getCollections(),
|
||||
function(c) {
|
||||
return {name: c};
|
||||
})
|
||||
);
|
||||
} catch(e) {
|
||||
res.json([]);
|
||||
}
|
||||
});
|
||||
|
||||
controller.get("/:dbname/:colname/Shards", function(req, res) {
|
||||
var dbname = req.params("dbname"),
|
||||
colname = req.params("colname"),
|
||||
selected = dbs.select(dbname).collection(colname);
|
||||
res.json(selected.getShardsByServers());
|
||||
});
|
||||
|
||||
controller.get("/:dbname/:colname/Shards/:servername", function(req, res) {
|
||||
|
|
|
@ -807,7 +807,7 @@ ol ul {
|
|||
}
|
||||
|
||||
li {
|
||||
line-height: 20px;
|
||||
line-height: 19px;
|
||||
}
|
||||
|
||||
ul.unstyled,
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
#tableView {
|
||||
cursor: pointer;
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
|
||||
#sourceFooter {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-right: 0;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
#sourceEditor {
|
||||
height: 400px;
|
||||
width: auto;
|
||||
overflow:hidden;
|
||||
margin-right: 0px;
|
||||
padding-bottom: 20px;
|
||||
border-top: 1px solid #888;
|
||||
border-left: 1px solid #C0C0C0;
|
||||
}
|
||||
|
||||
#sourceEditor .ui-resizable-handle {
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
#sourceDiv {
|
||||
margin-top: 0px;
|
||||
padding-bottom: 5px;
|
||||
min-height: 400px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.sourceBox {
|
||||
}
|
|
@ -1,39 +1,3 @@
|
|||
.writeable .jediTextarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#documentTableID tr td:first-child textarea {
|
||||
resize: none !important;
|
||||
height: 20px !important;
|
||||
}
|
||||
|
||||
#documentTableID tr .jediTextarea .btn-success {
|
||||
margin-right: -13px !important;
|
||||
}
|
||||
|
||||
.writeable .jediTextarea textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#documentTableID .rightCell textarea {
|
||||
resize: vertical !important;
|
||||
}
|
||||
|
||||
.sorting_1 textarea {
|
||||
display: inline !important;
|
||||
max-width: 120px !important;
|
||||
max-height: 20px !important;
|
||||
resize: none !important;
|
||||
}
|
||||
|
||||
.textInline {
|
||||
display:inline !important;
|
||||
}
|
||||
|
||||
.validateError {
|
||||
border: 2px solid red !important;
|
||||
}
|
||||
|
||||
.disabledBtn {
|
||||
opacity: 0.4 !important;
|
||||
cursor: default !important;
|
||||
|
@ -87,68 +51,6 @@
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
#addRow {
|
||||
color: #8AA050;
|
||||
}
|
||||
|
||||
.deleteAttribute {
|
||||
color: #B30000;
|
||||
margin-right: -4px;
|
||||
}
|
||||
|
||||
.deleteAttribute:hover {
|
||||
color: #B30000;
|
||||
}
|
||||
|
||||
.editSecondAttribute, .editFirstAttribute, .docPreview {
|
||||
text-align: right;
|
||||
float: right;
|
||||
}
|
||||
.editSecondAttribute, .editFirstAttribute {
|
||||
color: #444444;
|
||||
font-size: 16px;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
.editSecondAttribute:hover, .editFirstAttribute:hover {
|
||||
cursor: pointer;
|
||||
color: #444444;
|
||||
}
|
||||
|
||||
.editFirstAttribute, .docPreview{
|
||||
margin-right: -17px !important;
|
||||
}
|
||||
|
||||
.editSecondAttribute {
|
||||
margin-right: -30px !important;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
.addAttribute, .deleteAttribute {
|
||||
font-size: 22px;
|
||||
float:right;
|
||||
padding-top: 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.addAttribute:hover {
|
||||
color: #5E7B36;
|
||||
}
|
||||
|
||||
#documentTableID .icon_arangodb_edit {
|
||||
font-size: 27px;
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
#documentTableID {
|
||||
font-weight: 300;
|
||||
font-size: 15px !important;
|
||||
border-collapse:separate;
|
||||
border-spacing:0 0px;
|
||||
border-top: 1px solid #888;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
table.dataTable thead th {
|
||||
font-weight: 400 !important;
|
||||
}
|
||||
|
@ -159,37 +61,6 @@ table.dataTable thead th {
|
|||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
#documentTableID td {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#documentTableID .writeable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.read_only {
|
||||
cursor: default !important;
|
||||
}
|
||||
|
||||
#documentTableID .icon-edit {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#documentTableID .icon-edit:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#documentTableID.dataTable thead tr {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
#documentTableID .odd,
|
||||
#documentTableID .even {
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.arangoTab > li > a,
|
||||
.arangoTab > li:hover > a {
|
||||
border-radius: 0 !important;
|
||||
|
@ -224,17 +95,6 @@ table.dataTable thead th {
|
|||
height: 21px;
|
||||
}
|
||||
|
||||
.rightCell{
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.rightCell form {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.arangoTab {
|
||||
padding-bottom: 0 !important;
|
||||
margin-bottom: -1px !important;
|
||||
|
@ -254,11 +114,48 @@ table.dataTable thead th {
|
|||
/*padding: 7px 18px 5px 15px;*/
|
||||
}
|
||||
|
||||
.tdRoundButton {
|
||||
padding-top: 7px !important;
|
||||
float: right;
|
||||
}
|
||||
|
||||
#documentTableID.dataTable thead tr th {
|
||||
border-bottom: 1px solid #C2C2C2;
|
||||
}
|
||||
|
||||
#documentEditor {
|
||||
width:100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
.jsoneditor {
|
||||
background-color: white !important;
|
||||
border: 1px solid rgba(0,0,0,0.2) !important;
|
||||
}
|
||||
|
||||
.jsoneditor .menu {
|
||||
background-color: #686766 !important;
|
||||
border-bottom: 1px solid rgba(0,0,0,0.2) !important;
|
||||
}
|
||||
|
||||
.jsoneditor .search .frame {
|
||||
border: 0 !important;
|
||||
margin: 3px !important;
|
||||
}
|
||||
|
||||
.jsoneditor .search .results {
|
||||
color: white !important;
|
||||
margin-top: 3px !important;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button {
|
||||
background-color: white !important;
|
||||
border: 1px solid black !important;
|
||||
}
|
||||
|
||||
#saveDocumentButton {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#showSaveState {
|
||||
display:none;
|
||||
color: green;
|
||||
float:right;
|
||||
margin-top: 10px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,625 @@
|
|||
|
||||
.jsoneditor .field,
|
||||
.jsoneditor .value,
|
||||
.jsoneditor .readonly {
|
||||
border: 1px solid transparent;
|
||||
min-height: 16px;
|
||||
min-width: 32px;
|
||||
padding: 2px;
|
||||
margin: 1px;
|
||||
word-wrap: break-word;
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* adjust margin of p elements inside editable divs, needed for Opera, IE */
|
||||
.jsoneditor .field p,
|
||||
.jsoneditor .value p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.jsoneditor .value {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.jsoneditor .readonly {
|
||||
min-width: 16px;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.jsoneditor .empty {
|
||||
border-color: lightgray;
|
||||
border-style: dashed;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.jsoneditor .field.empty {
|
||||
background-image: url('../img/jsoneditor-icons.png');
|
||||
background-position: 0 -144px;
|
||||
}
|
||||
|
||||
.jsoneditor .value.empty {
|
||||
background-image: url('../img/jsoneditor-icons.png');
|
||||
background-position: -48px -144px;
|
||||
}
|
||||
|
||||
.jsoneditor .value.url {
|
||||
color: green;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.jsoneditor a.value.url:hover,
|
||||
.jsoneditor a.value.url:focus {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.jsoneditor .separator {
|
||||
padding: 3px 0;
|
||||
vertical-align: top;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.jsoneditor .field[contenteditable=true]:focus,
|
||||
.jsoneditor .field[contenteditable=true]:hover,
|
||||
.jsoneditor .value[contenteditable=true]:focus,
|
||||
.jsoneditor .value[contenteditable=true]:hover,
|
||||
.jsoneditor .field.highlight,
|
||||
.jsoneditor .value.highlight {
|
||||
background-color: #FFFFAB;
|
||||
border: 1px solid yellow;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.jsoneditor .field.highlight-active,
|
||||
.jsoneditor .field.highlight-active:focus,
|
||||
.jsoneditor .field.highlight-active:hover,
|
||||
.jsoneditor .value.highlight-active,
|
||||
.jsoneditor .value.highlight-active:focus,
|
||||
.jsoneditor .value.highlight-active:hover {
|
||||
background-color: #ffee00;
|
||||
border: 1px solid #ffc700;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
background: transparent url('../img/jsoneditor-icons.png');
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button.collapsed {
|
||||
background-position: 0 -48px;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button.expanded {
|
||||
background-position: 0 -72px;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button.contextmenu {
|
||||
background-position: -48px -72px;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button.contextmenu:hover,
|
||||
.jsoneditor div.tree button.contextmenu:focus,
|
||||
.jsoneditor div.tree button.contextmenu.selected {
|
||||
background-position: -48px -48px;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree *:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button:focus {
|
||||
/* TODO: nice outline for buttons with focus
|
||||
outline: #97B0F8 solid 2px;
|
||||
box-shadow: 0 0 8px #97B0F8;
|
||||
*/
|
||||
background-color: #f5f5f5;
|
||||
outline: #e5e5e5 solid 1px;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button.invisible {
|
||||
visibility: hidden;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.jsoneditor {
|
||||
color: #1A1A1A;
|
||||
border: 1px solid #97B0F8;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
padding: 0;
|
||||
line-height: 100%;
|
||||
}
|
||||
|
||||
|
||||
.jsoneditor div.tree table.tree {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.jsoneditor div.outer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: -35px 0 0 0;
|
||||
padding: 35px 0 0 0;
|
||||
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.jsoneditor textarea.text {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
||||
border: none;
|
||||
background-color: white;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.jsoneditor tr.highlight {
|
||||
background-color: #FFFFAB;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button.dragarea {
|
||||
visibility: hidden;
|
||||
background: url('../img/jsoneditor-icons.png') -72px -72px;
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button.dragarea:hover,
|
||||
.jsoneditor div.tree button.dragarea:focus {
|
||||
background-position: -72px -48px;
|
||||
}
|
||||
|
||||
.jsoneditor tr,
|
||||
.jsoneditor th,
|
||||
.jsoneditor td {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.jsoneditor td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.jsoneditor td.tree {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.jsoneditor .field,
|
||||
.jsoneditor .value,
|
||||
.jsoneditor td,
|
||||
.jsoneditor th,
|
||||
.jsoneditor textarea {
|
||||
font-family: droid sans mono, monospace, courier new, courier, sans-serif;
|
||||
font-size: 10pt;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
|
||||
/* ContextMenu - main menu */
|
||||
|
||||
.jsoneditor-contextmenu {
|
||||
position: absolute;
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul {
|
||||
position: relative;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 124px;
|
||||
|
||||
background: white;
|
||||
border: 1px solid #d3d3d3;
|
||||
box-shadow: 2px 2px 12px rgba(128, 128, 128, 0.3);
|
||||
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li button {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 124px;
|
||||
height: 24px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: #4d4d4d;
|
||||
background: transparent;
|
||||
|
||||
line-height: 26px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* Fix button padding in firefox */
|
||||
.jsoneditor-contextmenu ul li button::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li button:hover,
|
||||
.jsoneditor-contextmenu ul li button:focus {
|
||||
color: #1a1a1a;
|
||||
background-color: #f5f5f5;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li button.default {
|
||||
width: 92px;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li button.expand {
|
||||
float: right;
|
||||
width: 32px;
|
||||
height: 24px;
|
||||
border-left: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu div.icon {
|
||||
float: left;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background-image: url('../img/jsoneditor-icons.png');
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li button div.expand {
|
||||
float: right;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
margin: 0 4px 0 0;
|
||||
background: url('../img/jsoneditor-icons.png') 0 -72px;
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li button:hover div.expand,
|
||||
.jsoneditor-contextmenu ul li button:focus div.expand,
|
||||
.jsoneditor-contextmenu ul li.selected div.expand,
|
||||
.jsoneditor-contextmenu ul li button.expand:hover div.expand,
|
||||
.jsoneditor-contextmenu ul li button.expand:focus div.expand {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu .separator {
|
||||
height: 0;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
padding-top: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.remove > .icon {
|
||||
background-position: -24px -24px;
|
||||
}
|
||||
.jsoneditor-contextmenu button.remove:hover > .icon,
|
||||
.jsoneditor-contextmenu button.remove:focus > .icon {
|
||||
background-position: -24px 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.append > .icon {
|
||||
background-position: 0 -24px;
|
||||
}
|
||||
.jsoneditor-contextmenu button.append:hover > .icon,
|
||||
.jsoneditor-contextmenu button.append:focus > .icon {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.insert > .icon {
|
||||
background-position: 0 -24px;
|
||||
}
|
||||
.jsoneditor-contextmenu button.insert:hover > .icon,
|
||||
.jsoneditor-contextmenu button.insert:focus > .icon {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.duplicate > .icon {
|
||||
background-position: -48px -24px;
|
||||
}
|
||||
.jsoneditor-contextmenu button.duplicate:hover > .icon,
|
||||
.jsoneditor-contextmenu button.duplicate:focus > .icon {
|
||||
background-position: -48px 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.sort-asc > .icon {
|
||||
background-position: -168px -24px;
|
||||
}
|
||||
.jsoneditor-contextmenu button.sort-asc:hover > .icon,
|
||||
.jsoneditor-contextmenu button.sort-asc:focus > .icon {
|
||||
background-position: -168px 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.sort-desc > .icon {
|
||||
background-position: -192px -24px;
|
||||
}
|
||||
.jsoneditor-contextmenu button.sort-desc:hover > .icon,
|
||||
.jsoneditor-contextmenu button.sort-desc:focus > .icon {
|
||||
background-position: -192px 0;
|
||||
}
|
||||
|
||||
/* ContextMenu - sub menu */
|
||||
|
||||
.jsoneditor-contextmenu ul li .selected {
|
||||
background-color: #D4D6D8;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li ul {
|
||||
display: none;
|
||||
position: relative;
|
||||
left: -10px;
|
||||
top: 0;
|
||||
|
||||
border: none;
|
||||
box-shadow: inset 0 0 10px rgba(128, 128, 128, 0.5);
|
||||
padding: 0 10px;
|
||||
|
||||
/* TODO: transition is not supported on IE8-9 */
|
||||
-webkit-transition: all 0.3s ease-out;
|
||||
-moz-transition: all 0.3s ease-out;
|
||||
-o-transition: all 0.3s ease-out;
|
||||
transition: all 0.3s ease-out;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li.selected ul {
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li ul li button {
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li ul li button:hover,
|
||||
.jsoneditor-contextmenu ul li ul li button:focus {
|
||||
background-color: #f5f5f5;
|
||||
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.type-string > .icon {
|
||||
background-position: -144px -24px;
|
||||
}
|
||||
.jsoneditor-contextmenu button.type-string:hover > .icon,
|
||||
.jsoneditor-contextmenu button.type-string:focus > .icon,
|
||||
.jsoneditor-contextmenu button.type-string.selected > .icon{
|
||||
background-position: -144px 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.type-auto > .icon {
|
||||
background-position: -120px -24px;
|
||||
}
|
||||
.jsoneditor-contextmenu button.type-auto:hover > .icon,
|
||||
.jsoneditor-contextmenu button.type-auto:focus > .icon,
|
||||
.jsoneditor-contextmenu button.type-auto.selected > .icon {
|
||||
background-position: -120px 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.type-object > .icon {
|
||||
background-position: -72px -24px;
|
||||
}
|
||||
.jsoneditor-contextmenu button.type-object:hover > .icon,
|
||||
.jsoneditor-contextmenu button.type-object:focus > .icon,
|
||||
.jsoneditor-contextmenu button.type-object.selected > .icon{
|
||||
background-position: -72px 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.type-array > .icon {
|
||||
background-position: -96px -24px;
|
||||
}
|
||||
.jsoneditor-contextmenu button.type-array:hover > .icon,
|
||||
.jsoneditor-contextmenu button.type-array:focus > .icon,
|
||||
.jsoneditor-contextmenu button.type-array.selected > .icon{
|
||||
background-position: -96px 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.type-modes > .icon {
|
||||
background-image: none;
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
|
||||
.jsoneditor .menu {
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
padding: 2px;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
||||
color: #1A1A1A;
|
||||
background-color: #D5DDF6;
|
||||
border-bottom: 1px solid #97B0F8;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
margin: 2px;
|
||||
padding: 0;
|
||||
border-radius: 2px;
|
||||
border: 1px solid black;
|
||||
background: white url('../img/jsoneditor-icons.png');
|
||||
color: #4D4D4D;
|
||||
opacity: 0.8;
|
||||
|
||||
font-family: arial, sans-serif;
|
||||
font-size: 10pt;
|
||||
|
||||
float: left;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button:hover {
|
||||
background-color: #f0f2f5;
|
||||
}
|
||||
.jsoneditor .menu button:active {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.jsoneditor .menu button:disabled {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button.collapse-all {
|
||||
background-position: 0 -96px;
|
||||
}
|
||||
.jsoneditor .menu button.expand-all {
|
||||
background-position: 0 -120px;
|
||||
}
|
||||
.jsoneditor .menu button.undo {
|
||||
background-position: -24px -96px;
|
||||
}
|
||||
.jsoneditor .menu button.undo:disabled {
|
||||
background-position: -24px -120px;
|
||||
}
|
||||
.jsoneditor .menu button.redo {
|
||||
background-position: -48px -96px;
|
||||
}
|
||||
.jsoneditor .menu button.redo:disabled {
|
||||
background-position: -48px -120px;
|
||||
}
|
||||
.jsoneditor .menu button.compact {
|
||||
background-position: -72px -96px;
|
||||
}
|
||||
.jsoneditor .menu button.format {
|
||||
background-position: -72px -120px;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button.modes {
|
||||
background-image: none;
|
||||
width: auto;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button.separator {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.jsoneditor .menu a {
|
||||
font-family: arial, sans-serif;
|
||||
font-size: 10pt;
|
||||
color: #97B0F8;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.jsoneditor .menu a:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.jsoneditor .menu a.poweredBy {
|
||||
visibility: hidden;
|
||||
font-size: 8pt;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/* TODO: css for button:disabled is not supported by IE8 */
|
||||
|
||||
|
||||
.jsoneditor .search input,
|
||||
.jsoneditor .search .results {
|
||||
font-family: arial, sans-serif;
|
||||
font-size: 10pt;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.jsoneditor .search {
|
||||
position: absolute;
|
||||
right: 2px;
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
.jsoneditor .search .frame {
|
||||
border: 1px solid #97B0F8;
|
||||
background-color: white;
|
||||
padding: 0 2px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.jsoneditor .search .frame table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.jsoneditor .search input {
|
||||
width: 120px;
|
||||
border: none;
|
||||
outline: none;
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
.jsoneditor .search .results {
|
||||
color: #4d4d4d;
|
||||
padding-right: 5px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.jsoneditor .search button {
|
||||
width: 16px;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
background: url('../img/jsoneditor-icons.png');
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.jsoneditor .search button:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.jsoneditor .search button.refresh {
|
||||
width: 18px;
|
||||
background-position: -99px -73px;
|
||||
}
|
||||
|
||||
.jsoneditor .search button.next {
|
||||
cursor: pointer;
|
||||
background-position: -124px -73px;
|
||||
}
|
||||
.jsoneditor .search button.next:hover {
|
||||
background-position: -124px -49px;
|
||||
}
|
||||
|
||||
.jsoneditor .search button.previous {
|
||||
cursor: pointer;
|
||||
background-position: -148px -73px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
.jsoneditor .search button.previous:hover {
|
||||
background-position: -148px -49px;
|
||||
}
|
||||
|
|
@ -9,6 +9,8 @@
|
|||
</div>
|
||||
<div class="usermenu" id="userBar" style="float:right;">
|
||||
</div>
|
||||
<div class="notificationmenu" id="notificationBar" style="float:right;">
|
||||
</div>
|
||||
<div class="navmenu" id="navigationBar">
|
||||
</div>
|
||||
</div>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 4.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
|
@ -1,5 +1,5 @@
|
|||
/*jslint indent: 2, nomen: true, maxlen: 100, vars: true, white: true, plusplus: true*/
|
||||
/*global EJS, window*/
|
||||
/*global EJS, window, _, $*/
|
||||
(function() {
|
||||
"use strict";
|
||||
var TemplateEngine = function() {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -15,7 +15,6 @@
|
|||
"login" : "login",
|
||||
"collection/:colid/documents/:pageid" : "documents",
|
||||
"collection/:colid/:docid" : "document",
|
||||
"collection/:colid/:docid/source" : "source",
|
||||
"shell" : "shell",
|
||||
"query" : "query",
|
||||
"logs" : "logs",
|
||||
|
@ -65,8 +64,9 @@
|
|||
});
|
||||
window.arangoCollectionsStore.fetch();
|
||||
window.documentsView = new window.DocumentsView();
|
||||
window.documentView = new window.DocumentView();
|
||||
window.documentSourceView = new window.DocumentSourceView();
|
||||
window.documentView = new window.DocumentView({
|
||||
collection: window.arangoDocumentStore
|
||||
});
|
||||
window.arangoLogsStore = new window.ArangoLogs();
|
||||
window.arangoLogsStore.fetch({
|
||||
success: function () {
|
||||
|
@ -80,7 +80,8 @@
|
|||
|
||||
this.footerView = new window.FooterView();
|
||||
this.naviView = new window.NavigationView({
|
||||
notificationCollection: this.notificationList
|
||||
notificationCollection: this.notificationList,
|
||||
userCollection: window.userCollection
|
||||
});
|
||||
this.footerView.render();
|
||||
this.naviView.render();
|
||||
|
@ -269,9 +270,6 @@
|
|||
},
|
||||
|
||||
document: function(colid, docid) {
|
||||
if (!window.documentView) {
|
||||
window.documentView.initTable();
|
||||
}
|
||||
window.documentView.colid = colid;
|
||||
window.documentView.docid = docid;
|
||||
window.documentView.render();
|
||||
|
@ -280,15 +278,6 @@
|
|||
window.documentView.typeCheck(type);
|
||||
},
|
||||
|
||||
source: function(colid, docid) {
|
||||
window.documentSourceView.render();
|
||||
window.documentSourceView.colid = colid;
|
||||
window.documentSourceView.docid = docid;
|
||||
var type = arangoHelper.collectionApiType(colid);
|
||||
window.documentSourceView.type = type;
|
||||
window.documentSourceView.typeCheck(type);
|
||||
},
|
||||
|
||||
shell: function() {
|
||||
if (!this.shellView) {
|
||||
this.shellView = new window.shellView();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<script id="addGraphView.ejs" type="text/template">
|
||||
<script id="addNewGraphView.ejs" type="text/template">
|
||||
<div id="add-graph" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display:none">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
|
|
@ -23,24 +23,24 @@
|
|||
|
||||
<ul>
|
||||
<li class="nav-header">Type</li>
|
||||
<li><a href="#">
|
||||
<li><a>
|
||||
<label class="checkbox checkboxLabel">
|
||||
<input class="css-checkbox" type="checkbox" id="checkSystem">
|
||||
<label class="css-label"></label>System
|
||||
<label class="css-label" id="checkSystem"></label>System
|
||||
</label>
|
||||
</a></li>
|
||||
|
||||
<li><a href="#">
|
||||
<li><a>
|
||||
<label class="checkbox checkboxLabel">
|
||||
<input class="css-checkbox" type="checkbox" id="checkDocument">
|
||||
<label class="css-label"></label>Document
|
||||
<label class="css-label" id="checkDocument"></label>Document
|
||||
</label>
|
||||
</a></li>
|
||||
|
||||
<li><a href="#">
|
||||
<li><a>
|
||||
<label class="checkbox checkboxLabel">
|
||||
<input class="css-checkbox" type="checkbox" id="checkEdge">
|
||||
<label class="css-label"></label>Edge
|
||||
<label class="css-label" id="checkEdge"></label>Edge
|
||||
</label>
|
||||
</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
<script id="documentSourceView.ejs" type="text/template">
|
||||
<div class="thumbnails2 sourceBox">
|
||||
<div id="transparentHeader" class="headerBar">
|
||||
|
||||
</div>
|
||||
|
||||
<div id="sourceDiv">
|
||||
<ul class="nav nav-tabs arangoTab">
|
||||
<li class="active pull-right"><a>Source</a></li>
|
||||
<li class="pull-right">
|
||||
<a id="tableView">List</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="sourceEditor">
|
||||
|
||||
</div>
|
||||
<div class="form-actions" id="sourceFooter">
|
||||
<button id="saveSourceDoc" class="btn btn-success" style="float:right">Save</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</script>
|
|
@ -6,29 +6,9 @@
|
|||
|
||||
|
||||
<div id="tableDiv">
|
||||
|
||||
<ul class="nav nav-tabs arangoTab">
|
||||
<li class="pull-right" ><a id="sourceView">Source</a></li>
|
||||
<li class="active pull-right">
|
||||
<a>List</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="display arangoDataTable" id="documentTableID" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th> </th>
|
||||
<th>Value</th>
|
||||
<th>type</th>
|
||||
<th> </th>
|
||||
<th>
|
||||
<a id="addNewRowEntry" class="addAttribute"><span class="icon_arangodb_roundplus" title="Add attribute"></span></a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<div id="documentEditor"></div>
|
||||
<button id="saveDocumentButton" class="btn btn-success pull-right">Save</button>
|
||||
<div id="showSaveState">Saved...</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
<li id="dbSelect" class="dropdown databases-menu"></li>
|
||||
<li class="collections-menu"><a id="collections" class="tab" href="#collections">Collections</a></li>
|
||||
<li class="graphviewer-menu"><a id="graph" class="tab" href="#graph">Graphs</a></li>
|
||||
<li class="applications-menu navbar-spacer"><a id="applications" class="tab" href="#applications">Applications</a></li>
|
||||
<li class="applications-menu navbar-spacer-big"><a id="applications" class="tab" href="#applications">Applications</a></li>
|
||||
<li class="query-menu"><a id="query" class="tab" href="#query">AQL Editor</a></li>
|
||||
<!-- <li class="api-menu"><a id="api" class="tab" href="#api">API</a></li> -->
|
||||
<li class="dropdown tools-menu" id="toolsDropdown">
|
||||
<li class="dropdown tools-menu navbar-spacer-med" id="toolsDropdown">
|
||||
<a href="#" class="tab" id="tools">Tools <b class="caret"></b></a>
|
||||
<ul class="link-dropdown-menu" id="tools_dropdown">
|
||||
<li class="dropdown-header">Tools</li>
|
||||
|
@ -23,6 +23,9 @@
|
|||
<li class="dropdown-item">
|
||||
<a id="api" class="internalLink" href="#api">API</a>
|
||||
</li>
|
||||
<li class="dropdown-item">
|
||||
<a id="userManagement" class="internalLink" href="#api">User Management</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" id="linkDropdown">
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<script id="notificationView.ejs" type="text/template">
|
||||
<ul class="navlist" id="notificationViewUl">
|
||||
|
||||
<div class="navlogo">
|
||||
<div id="stat_hd" class="notificationButton"><a id="stat_hd_counter">0</a></div>
|
||||
</div>
|
||||
|
||||
<li class="dropdown">
|
||||
<ul class="user-dropdown-menu fixedDropdown" id="notification_menu">
|
||||
<li class="dropdown-header"><a>Notifications</a></li>
|
||||
<ul class="innerDropdownInnerUL"></ul>
|
||||
<button id="removeAllNotifications" class="btn btn-danger">Clear</button>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</script>
|
|
@ -1,54 +1,26 @@
|
|||
<script id="userBarView.ejs" type="text/template">
|
||||
<ul class="navlist" id="userBarUl">
|
||||
|
||||
<div class="navlogo">
|
||||
<div id="stat_hd" class="notificationButton"><a id="stat_hd_counter">0</a></div>
|
||||
</div>
|
||||
|
||||
<li class="dropdown user-menu">
|
||||
<a href="#" class="tab" id="user" >
|
||||
<li class="dropdown user-menu userImg">
|
||||
<a href="#" class="tab userImg" id="user" >
|
||||
<img class="userMenuImg" src="<%=img%>" id="userimage" /> <b class="caret"></b>
|
||||
</a>
|
||||
<ul class="user-dropdown-menu" id="user_dropdown">
|
||||
<li class="dropdown-header" style="text-transform: none">
|
||||
<%
|
||||
if(username === null) {
|
||||
%>User Management<%
|
||||
} else {
|
||||
if (name) {%>
|
||||
if (name) {%>
|
||||
<%=name%> (<%=username%>)
|
||||
<% } else {%>
|
||||
<%=username%>
|
||||
<%}
|
||||
|
||||
}
|
||||
%>
|
||||
<% if(username !== null) { %>
|
||||
<% } %>
|
||||
<li class="dropdown-item">
|
||||
<a id="userProfile" class="tab" href="#user">User profile</a>
|
||||
</li>
|
||||
<% } %>
|
||||
<li class="dropdown-item">
|
||||
<a id="userManagement" class="internalLink" href="#userManagement">User management</a>
|
||||
</li>
|
||||
<% if(username !== null) { %>
|
||||
<li class="dropdown-item">
|
||||
<a id="userLogout" class="tab" href="#user">Logout</a>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<ul class="user-dropdown-menu fixedDropdown" id="notification_menu">
|
||||
<li class="dropdown-header"><a>Notifications</a></li>
|
||||
<ul class="innerDropdownInnerUL"></ul>
|
||||
<button id="removeAllNotifications" class="btn btn-danger">Clear</button>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</script>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th>Gravatar-Link:</th>
|
||||
<th><input type="text" id="editImg" name="img" value="" placeholder="Gravatar"/></th>
|
||||
<th><input type="text" id="editUserProfileImg" name="img" value="" placeholder="Gravatar"/></th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -75,13 +75,20 @@
|
|||
"click #sortName" : "sortName",
|
||||
"click #sortType" : "sortType",
|
||||
"click #sortOrder" : "sortOrder",
|
||||
"click #collectionsToggle" : "toggleView"
|
||||
"click #collectionsToggle" : "toggleView",
|
||||
"click .css-label" : "checkBoxes"
|
||||
},
|
||||
|
||||
toggleView: function() {
|
||||
$('#collectionsDropdown2').slideToggle(200);
|
||||
},
|
||||
|
||||
checkBoxes: function (e) {
|
||||
//chrome bugfix
|
||||
var clicked = e.currentTarget.id;
|
||||
$('#'+clicked).click();
|
||||
},
|
||||
|
||||
checkSystem: function () {
|
||||
var searchOptions = this.collection.searchOptions;
|
||||
var oldValue = searchOptions.includeSystem;
|
||||
|
|
|
@ -1,119 +0,0 @@
|
|||
/*jslint indent: 2, nomen: true, maxlen: 100, vars: true, white: true, plusplus: true */
|
||||
/*global require, exports, Backbone, EJS, $, window*/
|
||||
/*global arangoHelper, ace, arangoDocumentStore, templateEngine, _ */
|
||||
|
||||
(function() {
|
||||
"use strict";
|
||||
window.DocumentSourceView = Backbone.View.extend({
|
||||
el: '#content',
|
||||
init: function () {
|
||||
},
|
||||
events: {
|
||||
"click #tableView" : "tableView",
|
||||
"click #saveSourceDoc" : "saveSourceDoc",
|
||||
"keypress #sourceEditor" : "sourceShortcut"
|
||||
},
|
||||
|
||||
template: templateEngine.createTemplate("documentSourceView.ejs"),
|
||||
|
||||
render: function() {
|
||||
$(this.el).html(this.template.render({}));
|
||||
this.breadcrumb();
|
||||
this.editor();
|
||||
|
||||
$('#sourceEditor').resizable({
|
||||
handles: "s",
|
||||
ghost: true,
|
||||
stop: function () {
|
||||
window.setTimeout(function () {
|
||||
var editor = ace.edit("sourceEditor");
|
||||
editor.resize();
|
||||
},200);
|
||||
}
|
||||
});
|
||||
return this;
|
||||
},
|
||||
|
||||
sourceShortcut: function (e) {
|
||||
if (e.ctrlKey && e.keyCode === 13) {
|
||||
this.saveSourceDoc();
|
||||
}
|
||||
else if (e.metaKey && !e.ctrlKey && e.keyCode === 13) {
|
||||
this.saveSourceDoc();
|
||||
}
|
||||
},
|
||||
|
||||
typeCheck: function (type) {
|
||||
this.type = type;
|
||||
if (type === 'edge') {
|
||||
window.arangoDocumentStore.getEdge(this.colid, this.docid);
|
||||
window.documentSourceView.fillSourceBox();
|
||||
}
|
||||
else if (type === 'document') {
|
||||
window.arangoDocumentStore.getDocument(this.colid, this.docid);
|
||||
window.documentSourceView.fillSourceBox();
|
||||
}
|
||||
else {
|
||||
arangoHelper.arangoError('Unknown document type: ' + type);
|
||||
}
|
||||
},
|
||||
editor: function () {
|
||||
var editor = ace.edit("sourceEditor");
|
||||
editor.getSession().setMode("ace/mode/javascript");
|
||||
},
|
||||
breadcrumb: function () {
|
||||
var name = window.location.hash.split("/");
|
||||
$('#transparentHeader').append(
|
||||
'<div class="breadcrumb">'+
|
||||
'<a href="#collections" class="activeBread">Collections</a>'+
|
||||
' > '+
|
||||
'<a class="activeBread" href="#collection/'+name[1]+'/documents/1">'+name[1]+'</a>'+
|
||||
' > '+
|
||||
'<a class="disabledBread">'+name[2]+'</a>'+
|
||||
'</div>'
|
||||
);
|
||||
},
|
||||
saveSourceDoc: function() {
|
||||
var editor, model, parsed, result;
|
||||
if (this.type === 'document') {
|
||||
editor = ace.edit("sourceEditor");
|
||||
model = editor.getValue();
|
||||
|
||||
try {
|
||||
parsed = JSON.parse(model);
|
||||
}
|
||||
catch (err) {
|
||||
arangoHelper.arangoError('Invalid document');
|
||||
return;
|
||||
}
|
||||
|
||||
if (arangoDocumentStore.models[0].internalAttributeChanged(parsed)) {
|
||||
arangoHelper.arangoError('Cannot change internal attributes of a document');
|
||||
return;
|
||||
}
|
||||
|
||||
result = window.arangoDocumentStore.saveDocument(this.colid, this.docid, model);
|
||||
if (result === false) {
|
||||
arangoHelper.arangoError('Document error');
|
||||
}
|
||||
}
|
||||
else if (this.type === 'edge') {
|
||||
editor = ace.edit("sourceEditor");
|
||||
model = editor.getValue();
|
||||
result = window.arangoDocumentStore.saveEdge(this.colid, this.docid, model);
|
||||
if (result === false) {
|
||||
arangoHelper.arangoError('Edge error');
|
||||
}
|
||||
}
|
||||
},
|
||||
tableView: function () {
|
||||
var hash = window.location.hash.split("/");
|
||||
window.location.hash = hash[0] + "/" + hash[1] + "/" + hash[2];
|
||||
},
|
||||
fillSourceBox: function () {
|
||||
var editor = ace.edit("sourceEditor");
|
||||
editor.setValue(arangoHelper.FormatJSON(arangoDocumentStore.models[0].getSorted()));
|
||||
editor.clearSelection();
|
||||
}
|
||||
});
|
||||
}());
|
|
@ -1,5 +1,5 @@
|
|||
/*jslint indent: 2, nomen: true, maxlen: 100, vars: true, white: true, plusplus: true, forin: true */
|
||||
/*global require, exports, Backbone, EJS, $, window, arangoHelper, value2html, templateEngine */
|
||||
/*global require, exports, Backbone, EJS, $, window, arangoHelper, jsoneditor, templateEngine */
|
||||
/*global document */
|
||||
|
||||
(function() {
|
||||
|
@ -9,222 +9,81 @@
|
|||
table: '#documentTableID',
|
||||
colid: 0,
|
||||
docid: 0,
|
||||
currentKey: 0,
|
||||
currentKeyState: "",
|
||||
oldDocumentState: "",
|
||||
documentCache: { },
|
||||
|
||||
init: function () {
|
||||
this.initTable();
|
||||
|
||||
},
|
||||
|
||||
events: {
|
||||
"click #saveDocument" : "saveDocument",
|
||||
"click #addDocumentLine" : "addLine",
|
||||
"click .addAttribute" : "addLine",
|
||||
"click #documentTableID .deleteAttribute" : "deleteLine",
|
||||
"click #sourceView" : "sourceView",
|
||||
"click .editFirstAttribute" : "editFirst",
|
||||
"click #documentTableID tr" : "clicked",
|
||||
"click .editSecondAttribute" : "editSecond",
|
||||
"keydown #documentviewMain" : "listenGlobalKey",
|
||||
"blur #documentviewMain textarea" : "checkFocus",
|
||||
"keydown #documentTableID tr td:first-child textarea" : "keyPressedTextareaLeft",
|
||||
"keydown #documentTableID tr .rightCell textarea" : "keyPressedTextareaRight"
|
||||
},
|
||||
|
||||
keyPressedTextareaLeft: function(e) {
|
||||
//attributes inline-textarea-tab edit-mode
|
||||
//check if action is required (empty field)
|
||||
|
||||
if (e.keyCode === 9) {
|
||||
if (!this.validateKey()) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
var altTarget = $(e.currentTarget).parent().parent().next().next();
|
||||
e.preventDefault();
|
||||
$('.btn-success').click();
|
||||
$(altTarget).click();
|
||||
}
|
||||
else if (e.keyCode === 13) {
|
||||
if (!this.validateKey()) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
$('.btn-success').click();
|
||||
}
|
||||
},
|
||||
|
||||
validateKey: function () {
|
||||
var self = this;
|
||||
var returnval = true;
|
||||
var data = $('#documentTableID').dataTable().fnGetData();
|
||||
var focused = $('textarea').val();
|
||||
|
||||
if (!focused.trim()) {
|
||||
//Heiko Form-Validator empty field
|
||||
returnval = false;
|
||||
}
|
||||
|
||||
var checkWhiteSpaces = focused.replace(/ /g,'');
|
||||
if (checkWhiteSpaces !== focused) {
|
||||
//Heiko Form-Validator whitespaces
|
||||
returnval = false;
|
||||
}
|
||||
|
||||
$.each(data, function(key, val) {
|
||||
if (val[0] === focused) {
|
||||
if (val[0] === self.currentKeyState) {
|
||||
returnval = true;
|
||||
}
|
||||
else {
|
||||
//Heiko Form-Validator duplicate key exists
|
||||
returnval = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
return returnval;
|
||||
},
|
||||
|
||||
keyPressedTextareaRight: function(e) {
|
||||
//values inline-textarea-tab edit-mode
|
||||
if (e.keyCode === 9) {
|
||||
e.preventDefault();
|
||||
var temp = $(e.currentTarget).parent().parent().parent().next().children();
|
||||
$('.btn-success').click();
|
||||
var altTarget = temp[0];
|
||||
while ($(altTarget).text() === '_id' ||
|
||||
$(altTarget).text() === '_rev' ||
|
||||
$(altTarget).text() === '_key') {
|
||||
var temp2 = $(altTarget).parent().next().children();
|
||||
altTarget = temp2[0];
|
||||
}
|
||||
$(altTarget).click();
|
||||
}
|
||||
else if (e.ctrlKey && e.keyCode === 13) {
|
||||
$('.btn-success').click();
|
||||
}
|
||||
},
|
||||
|
||||
checkFocus: function(e) {
|
||||
//check if new row has to be saved
|
||||
var self = this;
|
||||
var data = $(this.table).dataTable().fnGetData();
|
||||
$.each(data, function(key, val) {
|
||||
|
||||
var rowContent = $('.jediTextarea textarea').val();
|
||||
if (val[0] === self.currentKey && rowContent === '') {
|
||||
$(self.table).dataTable().fnDeleteRow( key );
|
||||
$('#addRow').removeClass('disabledBtn');
|
||||
}
|
||||
});
|
||||
$('td').removeClass('validateError');
|
||||
return true;
|
||||
},
|
||||
|
||||
listenGlobalKey: function(e) {
|
||||
if (e.keyCode === 27) {
|
||||
this.checkFocus();
|
||||
}
|
||||
},
|
||||
|
||||
template: templateEngine.createTemplate("documentView.ejs"),
|
||||
|
||||
events: {
|
||||
"click #saveDocumentButton" : "saveDocument"
|
||||
},
|
||||
|
||||
editor: 0,
|
||||
|
||||
typeCheck: function (type) {
|
||||
var result;
|
||||
if (type === 'edge') {
|
||||
result = window.arangoDocumentStore.getEdge(this.colid, this.docid);
|
||||
if (result === true) {
|
||||
this.initTable();
|
||||
this.drawTable();
|
||||
}
|
||||
}
|
||||
else if (type === 'document') {
|
||||
result = window.arangoDocumentStore.getDocument(this.colid, this.docid);
|
||||
if (result === true) {
|
||||
this.initTable();
|
||||
this.drawTable();
|
||||
}
|
||||
}
|
||||
if (result === true) {
|
||||
this.fillEditor();
|
||||
}
|
||||
},
|
||||
|
||||
arangoHelper.fixTooltips(".icon_arangodb", "left");
|
||||
arangoHelper.fixTooltips(".docLink", "top");
|
||||
},
|
||||
clicked: function (a) {
|
||||
var self = a.currentTarget;
|
||||
var checkData = $(this.table).dataTable().fnGetData(self);
|
||||
try {
|
||||
if (checkData[0] === '<div class="notwriteable"></div>') {
|
||||
this.addLine();
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
return;
|
||||
}
|
||||
fillEditor: function() {
|
||||
var insert = this.collection.first().attributes;
|
||||
insert = this.removeReadonlyKeys(insert);
|
||||
this.editor.set(this.collection.first().attributes);
|
||||
},
|
||||
|
||||
render: function() {
|
||||
$(this.el).html(this.template.render({}));
|
||||
this.breadcrumb();
|
||||
|
||||
var container = document.getElementById('documentEditor');
|
||||
var options = {
|
||||
search: true,
|
||||
mode: 'tree',
|
||||
modes: ['tree', 'code']
|
||||
};
|
||||
this.editor = new jsoneditor.JSONEditor(container, options);
|
||||
|
||||
return this;
|
||||
},
|
||||
editFirst: function (e) {
|
||||
var element = e.currentTarget;
|
||||
var prevElement = $(element).parent().prev();
|
||||
$(prevElement).click();
|
||||
},
|
||||
editSecond: function (e) {
|
||||
var element = e.currentTarget;
|
||||
var prevElement = $(element).parent().prev();
|
||||
$(prevElement).click();
|
||||
},
|
||||
sourceView: function () {
|
||||
window.location.hash = window.location.hash + "/source";
|
||||
|
||||
removeReadonlyKeys: function (object) {
|
||||
delete object._key;
|
||||
delete object._rev;
|
||||
delete object._id;
|
||||
return object;
|
||||
},
|
||||
|
||||
saveDocument: function () {
|
||||
var self = this;
|
||||
var model, result;
|
||||
model = window.arangoDocumentStore.models[0].attributes;
|
||||
model = JSON.stringify(model);
|
||||
model = this.editor.get();
|
||||
|
||||
//check if there are any changes, if not quit
|
||||
if (model === this.oldDocumentState) {
|
||||
$('.addAttribute').removeClass('disabledBtn');
|
||||
return;
|
||||
}
|
||||
model = JSON.stringify(model);
|
||||
|
||||
if (this.type === 'document') {
|
||||
result = window.arangoDocumentStore.saveDocument(this.colid, this.docid, model);
|
||||
if (result === true) {
|
||||
$('.addAttribute').removeClass('disabledBtn');
|
||||
$('td').removeClass('validateError');
|
||||
self.scrollToFocused();
|
||||
}
|
||||
else if (result === false) {
|
||||
arangoHelper.arangoAlert('Document error');
|
||||
if (result === false) {
|
||||
arangoHelper.arangoError('Document error:','Could not save');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (this.type === 'edge') {
|
||||
result = window.arangoDocumentStore.saveEdge(this.colid, this.docid, model);
|
||||
if (result === true) {
|
||||
$('.addAttribute').removeClass('disabledBtn');
|
||||
$('td').removeClass('validateError');
|
||||
self.scrollToFocused();
|
||||
}
|
||||
else if (result === false) {
|
||||
arangoHelper.arangoError('Edge error');
|
||||
if (result === false) {
|
||||
arangoHelper.arangoError('Edge error:', 'Could not save');
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
scrollToFocused: function () {
|
||||
//function to center focused element
|
||||
window.setTimeout(function() {
|
||||
var heightPosition = $(window).scrollTop();
|
||||
$(window).scrollTop(heightPosition-55);
|
||||
}, 150);
|
||||
if (result === true) {
|
||||
$('#showSaveState').fadeIn(1000).fadeOut(1000);
|
||||
}
|
||||
},
|
||||
|
||||
breadcrumb: function () {
|
||||
|
@ -262,324 +121,10 @@
|
|||
return self.documentCache[handle];
|
||||
},
|
||||
|
||||
drawTable: function () {
|
||||
var self = this;
|
||||
$.each(window.arangoDocumentStore.models[0].attributes, function(key, value) {
|
||||
if (arangoHelper.isSystemAttribute(key)) {
|
||||
var preview = "";
|
||||
var html;
|
||||
|
||||
if (key === "_from" || key === "_to") {
|
||||
var linkedDoc = self.getLinkedDoc(value);
|
||||
|
||||
if (linkedDoc !== null && linkedDoc !== undefined) {
|
||||
preview = '<span class="docPreview arangoicon icon_arangodb_info" title="' +
|
||||
self.escaped(JSON.stringify(linkedDoc)) + '"></span>';
|
||||
html = '<a href="#collection/' + value +
|
||||
'" class="docLink" title="Go to document">' + self.escaped(value) +
|
||||
'</a>';
|
||||
}
|
||||
else {
|
||||
html = self.escaped(value);
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
html = self.value2html(value, true);
|
||||
}
|
||||
|
||||
$(self.table).dataTable().fnAddData([
|
||||
key,
|
||||
preview,
|
||||
html,
|
||||
JSON.stringify(value, null, 4),
|
||||
"",
|
||||
""
|
||||
]);
|
||||
}
|
||||
else {
|
||||
$(self.table).dataTable().fnAddData([
|
||||
key,
|
||||
'<a class="editFirstAttribute"><span class="icon_arangodb_edit"></span></a>',
|
||||
self.value2html(value),
|
||||
JSON.stringify(value, null, 4),
|
||||
'<a class="editSecondAttribute"><span class="icon_arangodb_edit"></span></a>',
|
||||
'<a class="deleteAttribute"><span class="icon_arangodb_roundminus" ' +
|
||||
'title="Delete attribute"></span></a>'
|
||||
]);
|
||||
}
|
||||
});
|
||||
this.makeEditable();
|
||||
|
||||
$(document).bind('keydown', function(e) {
|
||||
if ((e.ctrlKey && e.keyCode === 65) || (e.ctrlKey && e.keyCode === 78)) {
|
||||
if ($('#addNewRowEntry')) {
|
||||
$('#addNewRowEntry').click();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
jumpToPageBottom: function () {
|
||||
$('html, body').scrollTop($(document).height() - $(window).height());
|
||||
},
|
||||
|
||||
addLine: function (event) {
|
||||
if ($('.addAttribute').hasClass('disabledBtn') === true) {
|
||||
return;
|
||||
}
|
||||
$('.addAttribute').addClass('disabledBtn');
|
||||
//event.stopPropagation();
|
||||
var randomKey = arangoHelper.getRandomToken();
|
||||
var self = this;
|
||||
self.currentKey = "zkey" + randomKey;
|
||||
$(this.table).dataTable().fnAddData(
|
||||
[
|
||||
self.currentKey,
|
||||
'<a class="editFirstAttribute"><span class="icon_arangodb_edit"></span></a>',
|
||||
this.value2html("editme"),
|
||||
JSON.stringify("editme"),
|
||||
'<a class="editSecondAttribute"><span class="icon_arangodb_edit"></span></a>',
|
||||
'<a class="deleteAttribute"><span class="icon_arangodb_roundminus" ' +
|
||||
'title="Delete attribute"></span></a>'
|
||||
]
|
||||
);
|
||||
this.makeEditable();
|
||||
var tableContent = $('table').find('td');
|
||||
$.each(tableContent, function(key, val) {
|
||||
if ($(val).text() === self.currentKey) {
|
||||
$(val).click();
|
||||
$('.jediTextarea textarea').val("");
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
self.jumpToPageBottom();
|
||||
arangoHelper.fixTooltips(".icon_arangodb", "left");
|
||||
},
|
||||
|
||||
deleteLine: function (a) {
|
||||
var row = $(a.currentTarget).closest("tr").get(0);
|
||||
$(this.table).dataTable().fnDeleteRow($(this.table).dataTable().fnGetPosition(row));
|
||||
this.updateLocalDocumentStorage();
|
||||
},
|
||||
|
||||
initTable: function () {
|
||||
$(this.table).dataTable({
|
||||
"bSortClasses": false,
|
||||
"bAutoWidth": false,
|
||||
"bFilter": false,
|
||||
"bPaginate":false,
|
||||
"bSortable": false,
|
||||
"bLengthChange": false,
|
||||
"bDeferRender": true,
|
||||
"iDisplayLength": -1,
|
||||
"aoColumns": [
|
||||
{"sClass":"writeable keyRow", "bSortable": false, "sWidth":"200px" },
|
||||
{"sClass":"read_only leftCell", "bSortable": false, "sWidth": "20px"},
|
||||
{"sClass":"writeable rightCell", "bSortable": false},
|
||||
{"bVisible": false },
|
||||
{"sClass":"read_only leftCell", "bSortable": false, "sWidth": "20px"},
|
||||
{"sClass":"read_only leftCell", "bSortable": false, "sWidth": "30px"}
|
||||
],
|
||||
"oLanguage": {"sEmptyTable": "No documents"}
|
||||
});
|
||||
},
|
||||
|
||||
value2html: function (value, isReadOnly) {
|
||||
var self = this;
|
||||
var typify = function (value) {
|
||||
var checked = typeof value;
|
||||
switch(checked) {
|
||||
case 'number':
|
||||
return ("<a class=\"sh_number\">" + value + "</a>");
|
||||
case 'string':
|
||||
return ("<a class=\"sh_string\">" + self.escaped(value) + "</a>");
|
||||
case 'boolean':
|
||||
return ("<a class=\"sh_keyword\">" + value + "</a>");
|
||||
case 'object':
|
||||
if (value instanceof Array) {
|
||||
return ("<a class=\"sh_array\">" + self.escaped(JSON.stringify(value)) + "</a>");
|
||||
}
|
||||
return ("<a class=\"sh_object\">"+ self.escaped(JSON.stringify(value)) + "</a>");
|
||||
}
|
||||
};
|
||||
return (isReadOnly ? '<i class="readOnlyClass">' : '') + typify(value) + '</i>';
|
||||
},
|
||||
|
||||
escaped: function (value) {
|
||||
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")
|
||||
.replace(/"/g, """).replace(/'/g, "'");
|
||||
},
|
||||
|
||||
updateLocalDocumentStorage: function () {
|
||||
var data = $(this.table).dataTable().fnGetData();
|
||||
var result = {};
|
||||
var row;
|
||||
|
||||
for (row in data) {
|
||||
var row_data = data[row];
|
||||
var key = row_data[0];
|
||||
var value = row_data[3];
|
||||
|
||||
result[key] = JSON.parse(value);
|
||||
}
|
||||
window.arangoDocumentStore.updateLocalDocument(result);
|
||||
//then sent to server
|
||||
this.saveDocument();
|
||||
},
|
||||
makeEditable: function () {
|
||||
var documentEditTable = $(this.table).dataTable();
|
||||
var self = this;
|
||||
var i = 0;
|
||||
$('.writeable', documentEditTable.fnGetNodes() ).each(function () {
|
||||
if (i === 1) {
|
||||
$(this).removeClass('writeable');
|
||||
i = 0;
|
||||
}
|
||||
if (arangoHelper.isSystemAttribute(this.innerHTML)) {
|
||||
$(this).removeClass('writeable');
|
||||
i = 1;
|
||||
}
|
||||
});
|
||||
$('.writeable', documentEditTable.fnGetNodes()).editable(function(value, settings) {
|
||||
var aPos = documentEditTable.fnGetPosition(this);
|
||||
if (aPos[1] === 0) {
|
||||
documentEditTable.fnUpdate(self.escaped(value), aPos[0], aPos[1]);
|
||||
self.updateLocalDocumentStorage();
|
||||
return value;
|
||||
}
|
||||
if (aPos[1] === 2) {
|
||||
var oldContent = JSON.parse(documentEditTable.fnGetData(aPos[0], aPos[1] + 1));
|
||||
var test = self.getTypedValue(value);
|
||||
if (String(value) === String(oldContent)) {
|
||||
// no change
|
||||
return self.value2html(oldContent);
|
||||
}
|
||||
// change update hidden row
|
||||
documentEditTable.fnUpdate(JSON.stringify(test), aPos[0], aPos[1] + 1);
|
||||
self.updateLocalDocumentStorage();
|
||||
// return visible row
|
||||
return self.value2html(test);
|
||||
}
|
||||
},{
|
||||
data: function() {
|
||||
$(".btn-success").click();
|
||||
var aPos = documentEditTable.fnGetPosition(this);
|
||||
var value = documentEditTable.fnGetData(aPos[0], aPos[1]);
|
||||
var model;
|
||||
if (aPos[1] === 0) {
|
||||
|
||||
//save current document state
|
||||
model = window.arangoDocumentStore.models[0].attributes;
|
||||
self.oldDocumentState = JSON.stringify(model);
|
||||
//save current key state
|
||||
self.currentKeyState = value;
|
||||
|
||||
//check if this row was newly created
|
||||
|
||||
if (value === self.currentKey) {
|
||||
return value;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
if (aPos[1] === 2) {
|
||||
var oldContent = documentEditTable.fnGetData(aPos[0], aPos[1] + 1);
|
||||
|
||||
//save current document state
|
||||
model = window.arangoDocumentStore.models[0].attributes;
|
||||
self.oldDocumentState = JSON.stringify(model);
|
||||
|
||||
if (typeof oldContent === 'object') {
|
||||
//grep hidden row and paste in visible row
|
||||
return value2html(oldContent);
|
||||
}
|
||||
return oldContent;
|
||||
}
|
||||
},
|
||||
width: "none", // if not set, each row will get bigger & bigger (Safari & Firefox)
|
||||
type: "autogrow",
|
||||
tooltip: 'click to edit',
|
||||
cssclass : 'jediTextarea',
|
||||
submitcssclass: 'btn btn-success pull-right',
|
||||
cancelcssclass: 'btn btn-danger pull-right',
|
||||
cancel: 'Cancel',
|
||||
submit: 'Save',
|
||||
onblur: 'cancel',
|
||||
onsubmit: self.validate,
|
||||
onreset: self.resetFunction
|
||||
});
|
||||
},
|
||||
resetFunction: function (settings, original) {
|
||||
try {
|
||||
var currentKey2 = window.documentView.currentKey;
|
||||
var data = $('#documentTableID').dataTable().fnGetData();
|
||||
$.each(data, function(key, val) {
|
||||
if (val[0] === currentKey2) {
|
||||
$('#documentTableID').dataTable().fnDeleteRow(key);
|
||||
$('.addAttribute').removeClass('disabledBtn');
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//broken
|
||||
validate: function (settings, td) {
|
||||
var returnval = true;
|
||||
return returnval;
|
||||
},
|
||||
getTypedValue: function (value) {
|
||||
value = value.replace(/(^\s+|\s+$)/g, '');
|
||||
if (value === 'true') {
|
||||
return true;
|
||||
}
|
||||
if (value === 'false') {
|
||||
return false;
|
||||
}
|
||||
if (value === 'null') {
|
||||
return null;
|
||||
}
|
||||
if (value.match(/^-?((\d+)?\.)?\d+$/)) {
|
||||
//support exp notation
|
||||
return parseFloat(value);
|
||||
}
|
||||
|
||||
try {
|
||||
// assume list or object
|
||||
var test = JSON.parse(value);
|
||||
if (test instanceof Array) {
|
||||
// value is an array
|
||||
return test;
|
||||
}
|
||||
if (typeof test === 'object') {
|
||||
// value is an object
|
||||
return test;
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
}
|
||||
|
||||
// fallback: value is a string
|
||||
value = String(value);
|
||||
|
||||
if (value !== '' && (value.substr(0, 1) !== '"' || value.substr(-1) !== '"')) {
|
||||
//Heiko: Form-Validator - invalid string value
|
||||
throw "error";
|
||||
}
|
||||
|
||||
try {
|
||||
value = JSON.parse(value);
|
||||
}
|
||||
catch (e) {
|
||||
//Heiko: Form-Validator - invalid string value
|
||||
throw e;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}());
|
||||
|
|
|
@ -14,14 +14,17 @@
|
|||
},
|
||||
|
||||
initialize: function () {
|
||||
this.userCollection = this.options.userCollection,
|
||||
this.dbSelectionView = new window.DBSelectionView({
|
||||
collection: window.arangoDatabase,
|
||||
current: window.currentDB
|
||||
});
|
||||
this.userBarView = new window.UserBarView({
|
||||
collection: this.options.notificationCollection,
|
||||
userCollection: window.userCollection
|
||||
});
|
||||
this.notificationView = new window.NotificationView({
|
||||
collection: this.options.notificationCollection,
|
||||
});
|
||||
this.statisticBarView = new window.StatisticBarView({});
|
||||
},
|
||||
|
||||
|
@ -29,7 +32,6 @@
|
|||
this.dbSelectionView.render($("#dbSelect"));
|
||||
},
|
||||
|
||||
|
||||
template: templateEngine.createTemplate("navigationView.ejs"),
|
||||
|
||||
render: function () {
|
||||
|
@ -37,7 +39,10 @@
|
|||
isSystem: window.currentDB.get("isSystem")
|
||||
}));
|
||||
this.dbSelectionView.render($("#dbSelect"));
|
||||
this.userBarView.render($("#userBar"));
|
||||
this.notificationView.render($("#notificationBar"));
|
||||
if (this.userCollection.whoAmI() !== null) {
|
||||
this.userBarView.render();
|
||||
}
|
||||
this.statisticBarView.render($("#statisticBar"));
|
||||
return this;
|
||||
},
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
/*jslint indent: 2, nomen: true, maxlen: 100, vars: true, white: true, plusplus: true */
|
||||
/*global Backbone, templateEngine, $, window*/
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
window.NotificationView = Backbone.View.extend({
|
||||
|
||||
events: {
|
||||
"click .navlogo #stat_hd" : "toggleNotification",
|
||||
"click .notificationItem .fa" : "removeNotification",
|
||||
"click #removeAllNotifications" : "removeAllNotifications"
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
this.collection.bind("add", this.renderNotifications.bind(this));
|
||||
this.collection.bind("remove", this.renderNotifications.bind(this));
|
||||
this.collection.bind("reset", this.renderNotifications.bind(this));
|
||||
},
|
||||
|
||||
notificationItem: templateEngine.createTemplate("notificationItem.ejs"),
|
||||
|
||||
el: '#notificationBar',
|
||||
|
||||
template: templateEngine.createTemplate("notificationView.ejs"),
|
||||
|
||||
toggleNotification: function (e) {
|
||||
var counter = this.collection.length;
|
||||
if (counter !== 0) {
|
||||
$('#notification_menu').toggle();
|
||||
}
|
||||
},
|
||||
|
||||
removeAllNotifications: function () {
|
||||
this.collection.reset();
|
||||
$('#notification_menu').hide();
|
||||
},
|
||||
|
||||
removeNotification: function(e) {
|
||||
var cid = e.target.id;
|
||||
this.collection.get(cid).destroy();
|
||||
},
|
||||
|
||||
renderNotifications: function() {
|
||||
$('#stat_hd_counter').text(this.collection.length);
|
||||
if (this.collection.length === 0) {
|
||||
$('#stat_hd').removeClass('fullNotification');
|
||||
$('#notification_menu').hide();
|
||||
}
|
||||
else {
|
||||
$('#stat_hd').addClass('fullNotification');
|
||||
}
|
||||
|
||||
$('.innerDropdownInnerUL').html(this.notificationItem.render({
|
||||
notifications : this.collection
|
||||
}));
|
||||
},
|
||||
|
||||
render: function () {
|
||||
$(this.el).html(this.template.render({
|
||||
notifications : this.collection
|
||||
}));
|
||||
|
||||
this.renderNotifications();
|
||||
this.delegateEvents();
|
||||
return this.el;
|
||||
}
|
||||
|
||||
});
|
||||
}());
|
|
@ -10,22 +10,15 @@
|
|||
"click .tab" : "navigateByTab",
|
||||
"mouseenter .dropdown" : "showDropdown",
|
||||
"mouseleave .dropdown" : "hideDropdown",
|
||||
"click .navlogo #stat_hd" : "toggleNotification",
|
||||
"click .notificationItem .fa" : "removeNotification",
|
||||
"click #removeAllNotifications" : "removeAllNotifications",
|
||||
"click #userLogout" : "userLogout"
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
this.collection.bind("add", this.renderNotifications.bind(this));
|
||||
this.collection.bind("remove", this.renderNotifications.bind(this));
|
||||
this.collection.bind("reset", this.renderNotifications.bind(this));
|
||||
this.userCollection = this.options.userCollection;
|
||||
this.userCollection.bind("change", this.render(this.$el));
|
||||
this.userCollection.fetch({async:false});
|
||||
this.userCollection.bind("change:extra", this.render.bind(this));
|
||||
},
|
||||
|
||||
notificationItem: templateEngine.createTemplate("notificationItem.ejs"),
|
||||
|
||||
template: templateEngine.createTemplate("userBarView.ejs"),
|
||||
|
||||
navigateBySelect: function () {
|
||||
|
@ -46,10 +39,6 @@
|
|||
e.preventDefault();
|
||||
},
|
||||
|
||||
toggleNotification: function (e) {
|
||||
$('#notification_menu').toggle();
|
||||
},
|
||||
|
||||
showDropdown: function (e) {
|
||||
var tab = e.target || e.srcElement;
|
||||
var navigateTo = tab.id;
|
||||
|
@ -63,30 +52,6 @@
|
|||
$("#user_dropdown").hide();
|
||||
},
|
||||
|
||||
removeAllNotifications: function () {
|
||||
this.collection.reset();
|
||||
},
|
||||
|
||||
removeNotification: function(e) {
|
||||
var cid = e.target.id;
|
||||
this.collection.get(cid).destroy();
|
||||
},
|
||||
|
||||
renderNotifications: function() {
|
||||
|
||||
$('#stat_hd_counter').text(this.collection.length);
|
||||
if (this.collection.length === 0) {
|
||||
$('#stat_hd').removeClass('fullNotification');
|
||||
}
|
||||
else {
|
||||
$('#stat_hd').addClass('fullNotification');
|
||||
}
|
||||
|
||||
$('.innerDropdownInnerUL').html(this.notificationItem.render({
|
||||
notifications : this.collection
|
||||
}));
|
||||
},
|
||||
|
||||
render: function (el) {
|
||||
var username = this.userCollection.whoAmI(),
|
||||
img = null,
|
||||
|
@ -94,7 +59,6 @@
|
|||
active = false,
|
||||
currentUser = null;
|
||||
if (username !== null) {
|
||||
this.userCollection.fetch({async:false});
|
||||
currentUser = this.userCollection.findWhere({user: username});
|
||||
currentUser.set({loggedIn : true});
|
||||
name = currentUser.get("extra").name;
|
||||
|
@ -104,25 +68,21 @@
|
|||
if (!img) {
|
||||
img = "img/arangodblogoAvatar.png";
|
||||
} else {
|
||||
img = "https://s.gravatar.com/avatar/" + img + "?s=28";
|
||||
img = "https://s.gravatar.com/avatar/" + img + "?s=24";
|
||||
}
|
||||
if (!name) {
|
||||
name = "";
|
||||
}
|
||||
|
||||
this.$el = el;
|
||||
this.$el = $("#userBar");
|
||||
this.$el.html(this.template.render({
|
||||
img : img,
|
||||
name : name,
|
||||
username : username,
|
||||
active : active,
|
||||
notifications : this.collection
|
||||
active : active
|
||||
}));
|
||||
|
||||
this.renderNotifications();
|
||||
|
||||
this.delegateEvents();
|
||||
this.renderNotifications();
|
||||
return this.$el;
|
||||
},
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
|
||||
renderTable: function () {
|
||||
this.collection.forEach(function(user) {
|
||||
var deleteButton =
|
||||
'<span class="arangoicon icon_arangodb_roundminus" data-original-title="Delete user"></span>';
|
||||
var deleteButton = '<span class="arangoicon icon_arangodb_roundminus"' +
|
||||
'data-original-title="Delete user"></span>';
|
||||
if(user.get("loggedIn")) {
|
||||
deleteButton = '';
|
||||
}
|
||||
|
@ -198,7 +198,9 @@
|
|||
return false;
|
||||
}
|
||||
if (!username.match(/^[a-zA-Z][a-zA-Z0-9_\-]*$/)) {
|
||||
arangoHelper.arangoError("Wrong Username", "Username may only contain numbers, letters, _ and -");
|
||||
arangoHelper.arangoError(
|
||||
"Wrong Username", "Username may only contain numbers, letters, _ and -"
|
||||
);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -213,7 +215,9 @@
|
|||
return true;
|
||||
}
|
||||
if (!name.match(/^[a-zA-Z][a-zA-Z0-9_\-\ ]*$/)) {
|
||||
arangoHelper.arangoError("Wrong Username", "Username may only contain numbers, letters, _ and -");
|
||||
arangoHelper.arangoError(
|
||||
"Wrong Username", "Username may only contain numbers, letters, _ and -"
|
||||
);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
initialize: function() {
|
||||
this.collection.fetch({async:false});
|
||||
this.user = this.collection.findWhere({loggedIn: true});
|
||||
|
||||
},
|
||||
|
||||
render: function(){
|
||||
|
@ -34,25 +33,23 @@
|
|||
this.collection.fetch();
|
||||
$('#editUsername').html(this.user.get("user"));
|
||||
$('#editName').val(this.user.get("extra").name);
|
||||
$('#editImg').val(this.user.get("extra").img);
|
||||
$('#editUserProfileImg').val(this.user.get("extra").img);
|
||||
|
||||
this.showModal();
|
||||
},
|
||||
|
||||
submitEditUserProfile : function() {
|
||||
var self = this;
|
||||
var userName = this.user.get("user");
|
||||
var name = $('#editName').val();
|
||||
var img = $('#editImg').val();
|
||||
var active = this.user.get("active");
|
||||
var img = $('#editUserProfileImg').val();
|
||||
|
||||
img = this.parseImgString(img);
|
||||
/* if (!this.validateName(name)) {
|
||||
$('#editName').closest("th").css("backgroundColor", "red");
|
||||
return;
|
||||
}*/
|
||||
this.user.set({"extra": {"name":name, "img":img}, "active":active});
|
||||
this.user.save();
|
||||
|
||||
this.user.save({"extra": {"name":name, "img":img}});
|
||||
this.hideModal();
|
||||
this.updateUserProfile();
|
||||
},
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
nav.navbar {
|
||||
@extend %fixedbar;
|
||||
top: 0px;
|
||||
height: 37px;
|
||||
height: 38px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
div.navlogo {
|
||||
@extend %pull-left;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-right: 1px;
|
||||
padding-top: 3px;
|
||||
}
|
||||
|
||||
div.navmenu {
|
||||
|
@ -34,11 +34,14 @@ ul.navlist {
|
|||
|
||||
a.tab {
|
||||
padding: {
|
||||
top: 8px;
|
||||
top: 9px;
|
||||
left: 10px;
|
||||
bottom: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
&.userImg {
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
color: $c_white;
|
||||
display: block;
|
||||
}
|
||||
|
@ -70,6 +73,10 @@ ul.user-dropdown-menu {
|
|||
content: "";
|
||||
}
|
||||
|
||||
.navbar-spacer {
|
||||
margin-right: 15px;
|
||||
}
|
||||
.navbar-spacer-big {
|
||||
margin-right: 18px;
|
||||
}
|
||||
|
||||
.navbar-spacer-med {
|
||||
margin-right: 10px;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
.fixedDropdown {
|
||||
margin: 34px 0 0 0 !important;
|
||||
margin: 37px 0 0 0 !important;
|
||||
border-radius: 0 !important;
|
||||
width: 210px;
|
||||
}
|
||||
|
@ -22,9 +22,12 @@
|
|||
}
|
||||
|
||||
.fixedDropdown .notificationItemContent {
|
||||
width: 160px;
|
||||
width: 155px;
|
||||
float: left;
|
||||
margin-left: 15px;
|
||||
max-width: 155px;
|
||||
white-space: normal;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.fixedDropdown button {
|
||||
|
@ -62,7 +65,7 @@
|
|||
float: left;
|
||||
font-size: 20px;
|
||||
position: relative;
|
||||
right: 8px;
|
||||
right: 4px;
|
||||
top: -9px;
|
||||
}
|
||||
|
||||
|
@ -72,9 +75,9 @@
|
|||
}
|
||||
|
||||
#stat_hd {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
margin-top: 5px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-top: 2px;
|
||||
background-color: #333232;
|
||||
border-radius: 3px;
|
||||
border: 2px solid #8AA051;
|
||||
|
@ -84,7 +87,7 @@
|
|||
font-weight: 300;
|
||||
}
|
||||
|
||||
#stat_hd:hover {
|
||||
.fullNotification:hover {
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
|
@ -95,6 +98,6 @@
|
|||
|
||||
#stat_hd #stat_hd_counter {
|
||||
color: white;
|
||||
margin-left: 7px;
|
||||
line-height: 23px;
|
||||
margin-left: 8px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
|
|
@ -17,14 +17,14 @@ div.resizecontainer {
|
|||
|
||||
@media (min-width: 799px) and (max-width: 1041px) {
|
||||
#arangoCollectionUl a {
|
||||
font-size: 11px;
|
||||
padding: 7px 5px 10px;
|
||||
font-size: 12px;
|
||||
padding: 10px 5px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1042px) and (max-width: 1284px) {
|
||||
#arangoCollectionUl a {
|
||||
font-size: 13px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,3 +14,5 @@
|
|||
@import "resizing";
|
||||
|
||||
@import "icons";
|
||||
// Buttons
|
||||
@import "buttons";
|
||||
|
|
|
@ -72,6 +72,13 @@ li.tile {
|
|||
font-weight: 300;
|
||||
color: $c_white;
|
||||
|
||||
button.btn {
|
||||
margin: {
|
||||
left: 0px;
|
||||
right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
line-height: 13px;
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
.tooltip-inner {
|
||||
max-width: 300px !important;
|
||||
word-wrap: break-word !important;
|
||||
white-space: normal !important;
|
||||
}
|
||||
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
.userMenuImg {
|
||||
height : "28";
|
||||
width : "28";
|
||||
margin-top: -3px;
|
||||
height : "26";
|
||||
width : "26";
|
||||
background-color: #333232;
|
||||
border-radius: 3px;
|
||||
border: 2px solid #8AA051;
|
||||
margin-top: -4px;
|
||||
}
|
|
@ -12,7 +12,7 @@ ul.tileList:after, div.resizecontainer:after {
|
|||
height: 0px;
|
||||
visibility: hidden; }
|
||||
|
||||
li.tile div.iconSet span, li.bigtile div.iconSet span, .contentDiv .icon, .scenarioImage {
|
||||
li.tile div.iconSet span, li.bigtile div.iconSet span, .contentDiv .icon, .addButton, .deleteButton, .scenarioImage {
|
||||
cursor: pointer; }
|
||||
|
||||
nav.navbar, footer.footer {
|
||||
|
@ -29,11 +29,21 @@ div.danger.coordinator, div.danger.dbserver {
|
|||
div.danger.coordinator:hover, div.danger.dbserver:hover {
|
||||
background-color: #be342e; }
|
||||
|
||||
.deleteButton {
|
||||
color: #da4f49; }
|
||||
.deleteButton:hover {
|
||||
color: #be342e; }
|
||||
|
||||
div.success.coordinator, div.success.dbserver {
|
||||
background-color: #8aa051; }
|
||||
div.success.coordinator:hover, div.success.dbserver:hover {
|
||||
background-color: #788f3d; }
|
||||
|
||||
.addButton {
|
||||
color: #8aa051; }
|
||||
.addButton:hover {
|
||||
color: #788f3d; }
|
||||
|
||||
div.warning.coordinator, div.warning.dbserver {
|
||||
background-color: #faa732; }
|
||||
div.warning.coordinator:hover, div.warning.dbserver:hover {
|
||||
|
@ -98,13 +108,13 @@ ul.link-dropdown-menu, ul.user-dropdown-menu {
|
|||
|
||||
nav.navbar {
|
||||
top: 0px;
|
||||
height: 37px;
|
||||
height: 38px;
|
||||
margin-bottom: 3px; }
|
||||
|
||||
div.navlogo {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-right: 1px; }
|
||||
margin-right: 1px;
|
||||
padding-top: 3px; }
|
||||
|
||||
ul.navlist {
|
||||
list-style: none; }
|
||||
|
@ -118,12 +128,14 @@ ul.navlist {
|
|||
margin-left: 0px; }
|
||||
|
||||
a.tab {
|
||||
padding-top: 8px;
|
||||
padding-top: 9px;
|
||||
padding-left: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-right: 10px;
|
||||
color: white;
|
||||
display: block; }
|
||||
a.tab.userImg {
|
||||
padding-bottom: 4px; }
|
||||
|
||||
#arangoCollectionSelect {
|
||||
display: none;
|
||||
|
@ -142,8 +154,11 @@ a.tab {
|
|||
border-left: 5px solid transparent;
|
||||
content: ""; }
|
||||
|
||||
.navbar-spacer {
|
||||
margin-right: 15px; }
|
||||
.navbar-spacer-big {
|
||||
margin-right: 18px; }
|
||||
|
||||
.navbar-spacer-med {
|
||||
margin-right: 10px; }
|
||||
|
||||
footer.footer {
|
||||
bottom: 0px;
|
||||
|
@ -205,6 +220,9 @@ li.tile, li.bigtile {
|
|||
font-size: 11px;
|
||||
font-weight: 300;
|
||||
color: white; }
|
||||
li.tile div.tileBadge button.btn, li.bigtile div.tileBadge button.btn {
|
||||
margin-left: 0px;
|
||||
margin-right: 5px; }
|
||||
li.tile div.tileBadge span, li.bigtile div.tileBadge span {
|
||||
display: inline-block;
|
||||
line-height: 13px; }
|
||||
|
@ -250,11 +268,11 @@ div.resizecontainer {
|
|||
display: inline-block; } }
|
||||
@media (min-width: 799px) and (max-width: 1041px) {
|
||||
#arangoCollectionUl a {
|
||||
font-size: 11px;
|
||||
padding: 7px 5px 10px; } }
|
||||
font-size: 12px;
|
||||
padding: 10px 5px 10px; } }
|
||||
@media (min-width: 1042px) and (max-width: 1284px) {
|
||||
#arangoCollectionUl a {
|
||||
font-size: 13px; } }
|
||||
font-size: 14px; } }
|
||||
@media (min-width: 6px) and (max-width: 247px) {
|
||||
div.resizecontainer {
|
||||
width: 0px; } }
|
||||
|
@ -329,6 +347,127 @@ div.centralContent {
|
|||
.clusterInfoIcon {
|
||||
font-size: 30px; }
|
||||
|
||||
.btn {
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: 0;
|
||||
-moz-box-shadow: 0;
|
||||
box-shadow: 0; }
|
||||
|
||||
.addButton {
|
||||
position: relative;
|
||||
margin-right: 7px;
|
||||
font-size: 22px;
|
||||
margin-top: 2px; }
|
||||
|
||||
.deleteButton {
|
||||
font-size: 22px;
|
||||
padding-right: 3px;
|
||||
top: 3px;
|
||||
position: relative;
|
||||
cursor: pointer; }
|
||||
|
||||
ul.headerButtonList {
|
||||
display: inline-block;
|
||||
*display: inline;
|
||||
margin-bottom: 0;
|
||||
margin-left: 0;
|
||||
padding-left: 0 !important; }
|
||||
ul.headerButtonList li {
|
||||
display: inline;
|
||||
margin-right: 2px; }
|
||||
|
||||
a.headerButton {
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
margin-top: 2px;
|
||||
margin-left: 5px;
|
||||
margin-right: 3px;
|
||||
min-height: 15px;
|
||||
border-radius: 3px;
|
||||
position: relative;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
background-color: #dddddd;
|
||||
color: #555555;
|
||||
height: 17px;
|
||||
width: 9px;
|
||||
padding: 4px 9px 2px 9px;
|
||||
border: 1px solid #222222; }
|
||||
|
||||
a.headerButton:hover {
|
||||
background-color: white;
|
||||
color: black; }
|
||||
|
||||
a.paginationButton, ul.arangoPagination a {
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px; }
|
||||
|
||||
/* better look of some icons */
|
||||
a.headerButton .icon_arangodb_filter {
|
||||
top: 3px !important; }
|
||||
a.headerButton .icon_arangodb_import {
|
||||
top: 1px !important; }
|
||||
a.headerButton .icon_arangodb_checklist {
|
||||
top: 3px !important;
|
||||
right: 5px; }
|
||||
a.headerButton .icon_arangodb_arrowleft,
|
||||
a.headerButton .icon_arangodb_arrowright {
|
||||
font-weight: bold; }
|
||||
|
||||
/* Graph Viewer */
|
||||
div.toolbox > div.gv_action_button:first-child {
|
||||
margin-top: 0px; }
|
||||
div.toolbox > div.gv_action_button:last-child {
|
||||
margin-bottom: 0px; }
|
||||
|
||||
div.gv_action_button {
|
||||
text-align: center;
|
||||
position: relative;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: #333232;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px; }
|
||||
|
||||
div.gv_action_button.active {
|
||||
background-color: #8aa051; }
|
||||
|
||||
h6.gv_icon_icon,
|
||||
h6.gv_button_title {
|
||||
position: absolute;
|
||||
margin: 0px;
|
||||
left: 0px;
|
||||
right: 0px; }
|
||||
|
||||
h6.gv_icon_icon {
|
||||
font-size: 22px;
|
||||
top: 6px; }
|
||||
|
||||
h6.gv_button_title {
|
||||
bottom: 1px; }
|
||||
|
||||
/*
|
||||
#documentsToolbar span {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 2px;
|
||||
font-size: 25px;
|
||||
margin-right: 3px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
#documentsToolbar li a {
|
||||
margin-top: 0px !important;
|
||||
padding: 5px 11px 2px 9px;
|
||||
}
|
||||
|
||||
*/
|
||||
.scenarioImage {
|
||||
height: 70%;
|
||||
width: auto; }
|
||||
|
|
|
@ -12,7 +12,7 @@ ul.tileList:after, div.resizecontainer:after {
|
|||
height: 0px;
|
||||
visibility: hidden; }
|
||||
|
||||
li.tile div.iconSet span, li.bigtile div.iconSet span, .contentDiv .icon, .contentTables tr.contentRowInactive a, div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox + label.css-label {
|
||||
li.tile div.iconSet span, li.bigtile div.iconSet span, .contentDiv .icon, .addButton, .deleteButton, .contentTables tr.contentRowInactive a, div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox + label.css-label {
|
||||
cursor: pointer; }
|
||||
|
||||
nav.navbar, footer.footer {
|
||||
|
@ -24,14 +24,14 @@ nav.navbar, footer.footer {
|
|||
color: white;
|
||||
z-index: 1000; }
|
||||
|
||||
.contentTables td span {
|
||||
.deleteButton, .contentTables td span {
|
||||
color: #da4f49; }
|
||||
.contentTables td span:hover {
|
||||
.deleteButton:hover, .contentTables td span:hover {
|
||||
color: #be342e; }
|
||||
|
||||
.contentTables td.dbThSecond span {
|
||||
.addButton, .contentTables td.dbThSecond span {
|
||||
color: #8aa051; }
|
||||
.contentTables td.dbThSecond span:hover {
|
||||
.addButton:hover, .contentTables td.dbThSecond span:hover {
|
||||
color: #788f3d; }
|
||||
|
||||
ul.link-dropdown-menu, ul.user-dropdown-menu {
|
||||
|
@ -93,13 +93,13 @@ ul.link-dropdown-menu, ul.user-dropdown-menu {
|
|||
|
||||
nav.navbar {
|
||||
top: 0px;
|
||||
height: 37px;
|
||||
height: 38px;
|
||||
margin-bottom: 3px; }
|
||||
|
||||
div.navlogo {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-right: 1px; }
|
||||
margin-right: 1px;
|
||||
padding-top: 3px; }
|
||||
|
||||
ul.navlist {
|
||||
list-style: none; }
|
||||
|
@ -113,12 +113,14 @@ ul.navlist {
|
|||
margin-left: 0px; }
|
||||
|
||||
a.tab {
|
||||
padding-top: 8px;
|
||||
padding-top: 9px;
|
||||
padding-left: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-right: 10px;
|
||||
color: white;
|
||||
display: block; }
|
||||
a.tab.userImg {
|
||||
padding-bottom: 4px; }
|
||||
|
||||
#arangoCollectionSelect {
|
||||
display: none;
|
||||
|
@ -137,8 +139,11 @@ a.tab {
|
|||
border-left: 5px solid transparent;
|
||||
content: ""; }
|
||||
|
||||
.navbar-spacer {
|
||||
margin-right: 15px; }
|
||||
.navbar-spacer-big {
|
||||
margin-right: 18px; }
|
||||
|
||||
.navbar-spacer-med {
|
||||
margin-right: 10px; }
|
||||
|
||||
footer.footer {
|
||||
bottom: 0px;
|
||||
|
@ -200,6 +205,9 @@ li.tile, li.bigtile {
|
|||
font-size: 11px;
|
||||
font-weight: 300;
|
||||
color: white; }
|
||||
li.tile div.tileBadge button.btn, li.bigtile div.tileBadge button.btn {
|
||||
margin-left: 0px;
|
||||
margin-right: 5px; }
|
||||
li.tile div.tileBadge span, li.bigtile div.tileBadge span {
|
||||
display: inline-block;
|
||||
line-height: 13px; }
|
||||
|
@ -245,11 +253,11 @@ div.resizecontainer {
|
|||
display: inline-block; } }
|
||||
@media (min-width: 799px) and (max-width: 1041px) {
|
||||
#arangoCollectionUl a {
|
||||
font-size: 11px;
|
||||
padding: 7px 5px 10px; } }
|
||||
font-size: 12px;
|
||||
padding: 10px 5px 10px; } }
|
||||
@media (min-width: 1042px) and (max-width: 1284px) {
|
||||
#arangoCollectionUl a {
|
||||
font-size: 13px; } }
|
||||
font-size: 14px; } }
|
||||
@media (min-width: 6px) and (max-width: 247px) {
|
||||
div.resizecontainer {
|
||||
width: 0px; } }
|
||||
|
@ -324,6 +332,127 @@ div.centralContent {
|
|||
.clusterInfoIcon {
|
||||
font-size: 30px; }
|
||||
|
||||
.btn {
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: 0;
|
||||
-moz-box-shadow: 0;
|
||||
box-shadow: 0; }
|
||||
|
||||
.addButton {
|
||||
position: relative;
|
||||
margin-right: 7px;
|
||||
font-size: 22px;
|
||||
margin-top: 2px; }
|
||||
|
||||
.deleteButton {
|
||||
font-size: 22px;
|
||||
padding-right: 3px;
|
||||
top: 3px;
|
||||
position: relative;
|
||||
cursor: pointer; }
|
||||
|
||||
ul.headerButtonList {
|
||||
display: inline-block;
|
||||
*display: inline;
|
||||
margin-bottom: 0;
|
||||
margin-left: 0;
|
||||
padding-left: 0 !important; }
|
||||
ul.headerButtonList li {
|
||||
display: inline;
|
||||
margin-right: 2px; }
|
||||
|
||||
a.headerButton {
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
margin-top: 2px;
|
||||
margin-left: 5px;
|
||||
margin-right: 3px;
|
||||
min-height: 15px;
|
||||
border-radius: 3px;
|
||||
position: relative;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
background-color: #dddddd;
|
||||
color: #555555;
|
||||
height: 17px;
|
||||
width: 9px;
|
||||
padding: 4px 9px 2px 9px;
|
||||
border: 1px solid #222222; }
|
||||
|
||||
a.headerButton:hover {
|
||||
background-color: white;
|
||||
color: black; }
|
||||
|
||||
a.paginationButton, ul.arangoPagination a {
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px; }
|
||||
|
||||
/* better look of some icons */
|
||||
a.headerButton .icon_arangodb_filter {
|
||||
top: 3px !important; }
|
||||
a.headerButton .icon_arangodb_import {
|
||||
top: 1px !important; }
|
||||
a.headerButton .icon_arangodb_checklist {
|
||||
top: 3px !important;
|
||||
right: 5px; }
|
||||
a.headerButton .icon_arangodb_arrowleft,
|
||||
a.headerButton .icon_arangodb_arrowright {
|
||||
font-weight: bold; }
|
||||
|
||||
/* Graph Viewer */
|
||||
div.toolbox > div.gv_action_button:first-child {
|
||||
margin-top: 0px; }
|
||||
div.toolbox > div.gv_action_button:last-child {
|
||||
margin-bottom: 0px; }
|
||||
|
||||
div.gv_action_button {
|
||||
text-align: center;
|
||||
position: relative;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: #333232;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px; }
|
||||
|
||||
div.gv_action_button.active {
|
||||
background-color: #8aa051; }
|
||||
|
||||
h6.gv_icon_icon,
|
||||
h6.gv_button_title {
|
||||
position: absolute;
|
||||
margin: 0px;
|
||||
left: 0px;
|
||||
right: 0px; }
|
||||
|
||||
h6.gv_icon_icon {
|
||||
font-size: 22px;
|
||||
top: 6px; }
|
||||
|
||||
h6.gv_button_title {
|
||||
bottom: 1px; }
|
||||
|
||||
/*
|
||||
#documentsToolbar span {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 2px;
|
||||
font-size: 25px;
|
||||
margin-right: 3px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
#documentsToolbar li a {
|
||||
margin-top: 0px !important;
|
||||
padding: 5px 11px 2px 9px;
|
||||
}
|
||||
|
||||
*/
|
||||
body, input, textarea, .page-title span, .pingback a.url {
|
||||
/*font-family: "Helvetica",sans-serif;*/
|
||||
font-family: 'Open Sans', sans-serif !important;
|
||||
|
@ -389,6 +518,9 @@ li.tile, li.bigtile {
|
|||
font-size: 11px;
|
||||
font-weight: 300;
|
||||
color: white; }
|
||||
li.tile div.tileBadge button.btn, li.bigtile div.tileBadge button.btn {
|
||||
margin-left: 0px;
|
||||
margin-right: 5px; }
|
||||
li.tile div.tileBadge span, li.bigtile div.tileBadge span {
|
||||
display: inline-block;
|
||||
line-height: 13px; }
|
||||
|
@ -421,7 +553,7 @@ li.bigtile {
|
|||
padding: 2px; }
|
||||
|
||||
.fixedDropdown {
|
||||
margin: 34px 0 0 0 !important;
|
||||
margin: 37px 0 0 0 !important;
|
||||
border-radius: 0 !important;
|
||||
width: 210px; }
|
||||
|
||||
|
@ -439,9 +571,12 @@ li.bigtile {
|
|||
padding-left: 5px !important; }
|
||||
|
||||
.fixedDropdown .notificationItemContent {
|
||||
width: 160px;
|
||||
width: 155px;
|
||||
float: left;
|
||||
margin-left: 15px; }
|
||||
margin-left: 15px;
|
||||
max-width: 155px;
|
||||
white-space: normal;
|
||||
word-wrap: break-word; }
|
||||
|
||||
.fixedDropdown button {
|
||||
float: right;
|
||||
|
@ -470,7 +605,7 @@ li.bigtile {
|
|||
float: left;
|
||||
font-size: 20px;
|
||||
position: relative;
|
||||
right: 8px;
|
||||
right: 4px;
|
||||
top: -9px; }
|
||||
|
||||
.notificationItem i:hover {
|
||||
|
@ -478,9 +613,9 @@ li.bigtile {
|
|||
cursor: pointer; }
|
||||
|
||||
#stat_hd {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
margin-top: 5px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-top: 2px;
|
||||
background-color: #333232;
|
||||
border-radius: 3px;
|
||||
border: 2px solid #8AA051; }
|
||||
|
@ -488,7 +623,7 @@ li.bigtile {
|
|||
.notificationItemContent {
|
||||
font-weight: 300; }
|
||||
|
||||
#stat_hd:hover {
|
||||
.fullNotification:hover {
|
||||
cursor: pointer; }
|
||||
|
||||
.fullNotification {
|
||||
|
@ -497,8 +632,8 @@ li.bigtile {
|
|||
|
||||
#stat_hd #stat_hd_counter {
|
||||
color: white;
|
||||
margin-left: 7px;
|
||||
line-height: 23px; }
|
||||
margin-left: 8px;
|
||||
line-height: 24px; }
|
||||
|
||||
.contentButtons {
|
||||
clear: both;
|
||||
|
@ -596,6 +731,14 @@ select.filterSelect {
|
|||
margin-left: 10px !important; }
|
||||
|
||||
.userMenuImg {
|
||||
height: "28";
|
||||
width: "28";
|
||||
margin-top: -3px; }
|
||||
height: "26";
|
||||
width: "26";
|
||||
background-color: #333232;
|
||||
border-radius: 3px;
|
||||
border: 2px solid #8AA051;
|
||||
margin-top: -4px; }
|
||||
|
||||
.tooltip-inner {
|
||||
max-width: 300px !important;
|
||||
word-wrap: break-word !important;
|
||||
white-space: normal !important; }
|
||||
|
|
|
@ -12,7 +12,7 @@ ul.tileList:after, div.resizecontainer:after {
|
|||
height: 0px;
|
||||
visibility: hidden; }
|
||||
|
||||
li.tile div.iconSet span, li.bigtile div.iconSet span, .contentDiv .icon, .scenarioImage {
|
||||
li.tile div.iconSet span, li.bigtile div.iconSet span, .contentDiv .icon, .addButton, .deleteButton, .scenarioImage {
|
||||
cursor: pointer; }
|
||||
|
||||
nav.navbar, footer.footer {
|
||||
|
@ -24,6 +24,16 @@ nav.navbar, footer.footer {
|
|||
color: white;
|
||||
z-index: 1000; }
|
||||
|
||||
.deleteButton {
|
||||
color: #da4f49; }
|
||||
.deleteButton:hover {
|
||||
color: #be342e; }
|
||||
|
||||
.addButton {
|
||||
color: #8aa051; }
|
||||
.addButton:hover {
|
||||
color: #788f3d; }
|
||||
|
||||
ul.link-dropdown-menu, ul.user-dropdown-menu {
|
||||
position: absolute;
|
||||
top: 80%;
|
||||
|
@ -83,13 +93,13 @@ ul.link-dropdown-menu, ul.user-dropdown-menu {
|
|||
|
||||
nav.navbar {
|
||||
top: 0px;
|
||||
height: 37px;
|
||||
height: 38px;
|
||||
margin-bottom: 3px; }
|
||||
|
||||
div.navlogo {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-right: 1px; }
|
||||
margin-right: 1px;
|
||||
padding-top: 3px; }
|
||||
|
||||
ul.navlist {
|
||||
list-style: none; }
|
||||
|
@ -103,12 +113,14 @@ ul.navlist {
|
|||
margin-left: 0px; }
|
||||
|
||||
a.tab {
|
||||
padding-top: 8px;
|
||||
padding-top: 9px;
|
||||
padding-left: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-right: 10px;
|
||||
color: white;
|
||||
display: block; }
|
||||
a.tab.userImg {
|
||||
padding-bottom: 4px; }
|
||||
|
||||
#arangoCollectionSelect {
|
||||
display: none;
|
||||
|
@ -127,8 +139,11 @@ a.tab {
|
|||
border-left: 5px solid transparent;
|
||||
content: ""; }
|
||||
|
||||
.navbar-spacer {
|
||||
margin-right: 15px; }
|
||||
.navbar-spacer-big {
|
||||
margin-right: 18px; }
|
||||
|
||||
.navbar-spacer-med {
|
||||
margin-right: 10px; }
|
||||
|
||||
footer.footer {
|
||||
bottom: 0px;
|
||||
|
@ -190,6 +205,9 @@ li.tile, li.bigtile {
|
|||
font-size: 11px;
|
||||
font-weight: 300;
|
||||
color: white; }
|
||||
li.tile div.tileBadge button.btn, li.bigtile div.tileBadge button.btn {
|
||||
margin-left: 0px;
|
||||
margin-right: 5px; }
|
||||
li.tile div.tileBadge span, li.bigtile div.tileBadge span {
|
||||
display: inline-block;
|
||||
line-height: 13px; }
|
||||
|
@ -235,11 +253,11 @@ div.resizecontainer {
|
|||
display: inline-block; } }
|
||||
@media (min-width: 799px) and (max-width: 1041px) {
|
||||
#arangoCollectionUl a {
|
||||
font-size: 11px;
|
||||
padding: 7px 5px 10px; } }
|
||||
font-size: 12px;
|
||||
padding: 10px 5px 10px; } }
|
||||
@media (min-width: 1042px) and (max-width: 1284px) {
|
||||
#arangoCollectionUl a {
|
||||
font-size: 13px; } }
|
||||
font-size: 14px; } }
|
||||
@media (min-width: 6px) and (max-width: 247px) {
|
||||
div.resizecontainer {
|
||||
width: 0px; } }
|
||||
|
@ -314,6 +332,127 @@ div.centralContent {
|
|||
.clusterInfoIcon {
|
||||
font-size: 30px; }
|
||||
|
||||
.btn {
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: 0;
|
||||
-moz-box-shadow: 0;
|
||||
box-shadow: 0; }
|
||||
|
||||
.addButton {
|
||||
position: relative;
|
||||
margin-right: 7px;
|
||||
font-size: 22px;
|
||||
margin-top: 2px; }
|
||||
|
||||
.deleteButton {
|
||||
font-size: 22px;
|
||||
padding-right: 3px;
|
||||
top: 3px;
|
||||
position: relative;
|
||||
cursor: pointer; }
|
||||
|
||||
ul.headerButtonList {
|
||||
display: inline-block;
|
||||
*display: inline;
|
||||
margin-bottom: 0;
|
||||
margin-left: 0;
|
||||
padding-left: 0 !important; }
|
||||
ul.headerButtonList li {
|
||||
display: inline;
|
||||
margin-right: 2px; }
|
||||
|
||||
a.headerButton {
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
margin-top: 2px;
|
||||
margin-left: 5px;
|
||||
margin-right: 3px;
|
||||
min-height: 15px;
|
||||
border-radius: 3px;
|
||||
position: relative;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
background-color: #dddddd;
|
||||
color: #555555;
|
||||
height: 17px;
|
||||
width: 9px;
|
||||
padding: 4px 9px 2px 9px;
|
||||
border: 1px solid #222222; }
|
||||
|
||||
a.headerButton:hover {
|
||||
background-color: white;
|
||||
color: black; }
|
||||
|
||||
a.paginationButton, ul.arangoPagination a {
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px; }
|
||||
|
||||
/* better look of some icons */
|
||||
a.headerButton .icon_arangodb_filter {
|
||||
top: 3px !important; }
|
||||
a.headerButton .icon_arangodb_import {
|
||||
top: 1px !important; }
|
||||
a.headerButton .icon_arangodb_checklist {
|
||||
top: 3px !important;
|
||||
right: 5px; }
|
||||
a.headerButton .icon_arangodb_arrowleft,
|
||||
a.headerButton .icon_arangodb_arrowright {
|
||||
font-weight: bold; }
|
||||
|
||||
/* Graph Viewer */
|
||||
div.toolbox > div.gv_action_button:first-child {
|
||||
margin-top: 0px; }
|
||||
div.toolbox > div.gv_action_button:last-child {
|
||||
margin-bottom: 0px; }
|
||||
|
||||
div.gv_action_button {
|
||||
text-align: center;
|
||||
position: relative;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: #333232;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px; }
|
||||
|
||||
div.gv_action_button.active {
|
||||
background-color: #8aa051; }
|
||||
|
||||
h6.gv_icon_icon,
|
||||
h6.gv_button_title {
|
||||
position: absolute;
|
||||
margin: 0px;
|
||||
left: 0px;
|
||||
right: 0px; }
|
||||
|
||||
h6.gv_icon_icon {
|
||||
font-size: 22px;
|
||||
top: 6px; }
|
||||
|
||||
h6.gv_button_title {
|
||||
bottom: 1px; }
|
||||
|
||||
/*
|
||||
#documentsToolbar span {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 2px;
|
||||
font-size: 25px;
|
||||
margin-right: 3px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
#documentsToolbar li a {
|
||||
margin-top: 0px !important;
|
||||
padding: 5px 11px 2px 9px;
|
||||
}
|
||||
|
||||
*/
|
||||
.scenarioImage {
|
||||
height: 70%;
|
||||
width: auto; }
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
@import "shared";
|
||||
// Fonts and font bindings
|
||||
@import "fonts";
|
||||
// Buttons
|
||||
// @import "buttons";
|
||||
// Navbar
|
||||
@import "statMenu";
|
||||
// Footer
|
||||
|
@ -18,3 +16,5 @@
|
|||
@import "dropdowns";
|
||||
// Dropdown menu
|
||||
@import "userMenu";
|
||||
// Tooltips
|
||||
@import "tooltips";
|
||||
|
|
|
@ -86,6 +86,9 @@
|
|||
"frontend/js/lib/jquery.wiggle.min.js",
|
||||
"frontend/js/lib/jquery.contextmenu.js",
|
||||
"frontend/js/lib/handlebars-1.0.rc.1.js",
|
||||
"frontend/js/lib/underscore.js",
|
||||
"frontend/js/lib/backbone.js",
|
||||
"frontend/js/lib/jsoneditor-min.js",
|
||||
"frontend/js/lib/d3.v3.min.js",
|
||||
"frontend/js/lib/strftime-min.js",
|
||||
"frontend/js/lib/dygraph-combined.js",
|
||||
|
@ -129,7 +132,6 @@
|
|||
"frontend/css/collectionView.css",
|
||||
"frontend/css/documentsView.css",
|
||||
"frontend/css/documentView.css",
|
||||
"frontend/css/documentSourceView.css",
|
||||
"frontend/css/swaggerView.css",
|
||||
"frontend/css/foxxView.css",
|
||||
"frontend/css/graphView.css",
|
||||
|
@ -147,6 +149,7 @@
|
|||
"frontend/css/dropdowns.css",
|
||||
"frontend/css/screenSizes.css",
|
||||
"frontend/css/clusterDashboardView.css",
|
||||
"frontend/css/jsoneditor.css",
|
||||
"frontend/ttf/arangofont/style.css"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</fieldset>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button class="btn btn-success" id="startPlan">Create Cluster</button>
|
||||
<button class="btn btn-success" id="startSymmetricPlan">Create Cluster</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</fieldset>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button class="btn btn-success" id="startPlan">Create Cluster</button>
|
||||
<button class="btn btn-success" id="startTestPlan">Create Cluster</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
entryTemplate: templateEngine.createTemplate("serverEntry.ejs"),
|
||||
|
||||
events: {
|
||||
"click #startPlan": "startPlan",
|
||||
"click #startSymmetricPlan": "startPlan",
|
||||
"click .add": "addEntry",
|
||||
"click .delete": "removeEntry"
|
||||
},
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
template: templateEngine.createTemplate("testPlan.ejs"),
|
||||
|
||||
events: {
|
||||
"click #startPlan": "startPlan"
|
||||
"click #startTestPlan": "startPlan"
|
||||
},
|
||||
|
||||
startPlan: function() {
|
||||
|
|
|
@ -165,7 +165,6 @@ module.exports = function(karma) {
|
|||
'frontend/js/views/collectionsItemView.js',
|
||||
'frontend/js/views/documentsView.js',
|
||||
'frontend/js/views/documentView.js',
|
||||
'frontend/js/views/documentSourceView.js',
|
||||
'frontend/js/views/logsView.js',
|
||||
'frontend/js/views/applicationsView.js',
|
||||
'frontend/js/views/foxxActiveView.js',
|
||||
|
|
|
@ -43,6 +43,8 @@ var internal = require("internal");
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
exports.historian = function (param) {
|
||||
"use strict";
|
||||
|
||||
try {
|
||||
var result = {};
|
||||
|
||||
|
|
|
@ -168,8 +168,12 @@ function startInstance (protocol, options, addArgs) {
|
|||
instanceInfo.kickstarter = new Kickstarter(p.getPlan());
|
||||
instanceInfo.kickstarter.launch();
|
||||
var runInfo = instanceInfo.kickstarter.runInfo;
|
||||
var roles = runInfo[runInfo.length-1].roles;
|
||||
var endpoints = runInfo[runInfo.length-1].endpoints;
|
||||
var j = runInfo.length-1;
|
||||
while (j > 0 && runInfo[j].isStartServers === undefined) {
|
||||
j--;
|
||||
}
|
||||
var roles = runInfo[j].roles;
|
||||
var endpoints = runInfo[j].endpoints;
|
||||
pos = roles.indexOf("Coordinator");
|
||||
endpoint = endpoints[pos];
|
||||
}
|
||||
|
@ -523,6 +527,12 @@ function rubyTests (options, ssl) {
|
|||
' c.add_setting :ARANGO_PASSWORD\n'+
|
||||
' c.ARANGO_PASSWORD = "' + options.password + '"\n'+
|
||||
'end\n');
|
||||
var logsdir = fs.join(findTopDir(),"logs");
|
||||
try {
|
||||
fs.makeDirectory(logsdir);
|
||||
}
|
||||
catch (err) {
|
||||
}
|
||||
var files = fs.list(fs.join("UnitTests","HttpInterface"));
|
||||
var result = {};
|
||||
var args;
|
||||
|
@ -549,6 +559,7 @@ function rubyTests (options, ssl) {
|
|||
}
|
||||
}
|
||||
}
|
||||
fs.removeDirectoryRecursive(logsdir, true);
|
||||
|
||||
print("Shutting down...");
|
||||
fs.remove(tmpname);
|
||||
|
|
|
@ -77,9 +77,6 @@ int TRI_readsocket(TRI_socket_t s, void* buffer, size_t numBytesToRead, int flag
|
|||
#ifdef _WIN32
|
||||
res = recv(s.fileHandle, (char*)(buffer), (int)(numBytesToRead), flags);
|
||||
#else
|
||||
// This looks like a bug which does not show up since this code
|
||||
// is only called under Windows. fileDescriptor should probably
|
||||
// be fileHandle here.
|
||||
res = read(s.fileDescriptor, buffer, numBytesToRead);
|
||||
#endif
|
||||
return res;
|
||||
|
|
|
@ -100,6 +100,7 @@ ApplicationEndpointServer::ApplicationEndpointServer (ApplicationServer* applica
|
|||
_endpointList(),
|
||||
_httpPort(),
|
||||
_endpoints(),
|
||||
_reuseAddress(true),
|
||||
_keepAliveTimeout(300.0),
|
||||
_defaultApiCompatibility(0),
|
||||
_allowMethodOverride(false),
|
||||
|
@ -213,6 +214,7 @@ void ApplicationEndpointServer::setupOptions (map<string, ProgramOptionsDescript
|
|||
// issue #175: add deprecated hidden option for downwards compatibility
|
||||
options[ApplicationServer::OPTIONS_HIDDEN]
|
||||
("server.http-port", &_httpPort, "http port for client requests (deprecated)")
|
||||
("server.reuse-address", "try to reuse address")
|
||||
;
|
||||
|
||||
options[ApplicationServer::OPTIONS_SERVER]
|
||||
|
@ -224,6 +226,7 @@ void ApplicationEndpointServer::setupOptions (map<string, ProgramOptionsDescript
|
|||
("server.backlog-size", &_backlogSize, "listen backlog size")
|
||||
("server.default-api-compatibility", &_defaultApiCompatibility, "default API compatibility version (e.g. 10300)")
|
||||
("server.keep-alive-timeout", &_keepAliveTimeout, "keep-alive timeout in seconds")
|
||||
("server.no-reuse-address", "do not try to reuse address")
|
||||
;
|
||||
|
||||
options[ApplicationServer::OPTIONS_SSL]
|
||||
|
@ -247,6 +250,15 @@ bool ApplicationEndpointServer::parsePhase2 (ProgramOptions& options) {
|
|||
if (! ok) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// check if want to reuse the address
|
||||
if (options.has("server.reuse-address")) {
|
||||
_reuseAddress = true;
|
||||
}
|
||||
|
||||
if (options.has("server.no-reuse-address")) {
|
||||
_reuseAddress = false;
|
||||
}
|
||||
|
||||
if (_backlogSize <= 0 || _backlogSize > SOMAXCONN) {
|
||||
LOG_FATAL_AND_EXIT("invalid value for --server.backlog-size. maximum allowed value is %d", (int) SOMAXCONN);
|
||||
|
@ -262,7 +274,7 @@ bool ApplicationEndpointServer::parsePhase2 (ProgramOptions& options) {
|
|||
|
||||
// add & validate endpoints
|
||||
for (vector<string>::const_iterator i = _endpoints.begin(); i != _endpoints.end(); ++i) {
|
||||
bool ok = _endpointList.add((*i), dbNames, _backlogSize);
|
||||
bool ok = _endpointList.add((*i), dbNames, _backlogSize, _reuseAddress);
|
||||
|
||||
if (! ok) {
|
||||
LOG_FATAL_AND_EXIT("invalid endpoint '%s'", (*i).c_str());
|
||||
|
@ -325,7 +337,7 @@ bool ApplicationEndpointServer::addEndpoint (std::string const& newEndpoint,
|
|||
WRITE_LOCKER(_endpointsLock);
|
||||
|
||||
Endpoint* endpoint;
|
||||
bool ok = _endpointList.add(newEndpoint, dbNames, _backlogSize, &endpoint);
|
||||
bool ok = _endpointList.add(newEndpoint, dbNames, _backlogSize, _reuseAddress, &endpoint);
|
||||
|
||||
if (! ok) {
|
||||
return false;
|
||||
|
@ -474,7 +486,7 @@ bool ApplicationEndpointServer::loadEndpoints () {
|
|||
std::map<std::string, std::vector<std::string> >::const_iterator it;
|
||||
for (it = endpoints.begin(); it != endpoints.end(); ++it) {
|
||||
|
||||
bool ok = _endpointList.add((*it).first, (*it).second, _backlogSize);
|
||||
bool ok = _endpointList.add((*it).first, (*it).second, _backlogSize, _reuseAddress);
|
||||
|
||||
if (! ok) {
|
||||
return false;
|
||||
|
|
|
@ -390,6 +390,12 @@ namespace triagens {
|
|||
|
||||
vector<string> _endpoints;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief try to reuse address
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool _reuseAddress;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief timeout for HTTP keep-alive
|
||||
///
|
||||
|
|
|
@ -181,15 +181,17 @@ std::string Endpoint::getUnifiedForm (const std::string& specification) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Endpoint* Endpoint::clientFactory (const std::string& specification) {
|
||||
return Endpoint::factory(ENDPOINT_CLIENT, specification, 0);
|
||||
return Endpoint::factory(ENDPOINT_CLIENT, specification, 0, false);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief create a server endpoint object from a string value
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Endpoint* Endpoint::serverFactory (const std::string& specification, int listenBacklog) {
|
||||
return Endpoint::factory(ENDPOINT_SERVER, specification, listenBacklog);
|
||||
Endpoint* Endpoint::serverFactory (const std::string& specification,
|
||||
int listenBacklog,
|
||||
bool reuseAddress) {
|
||||
return Endpoint::factory(ENDPOINT_SERVER, specification, listenBacklog, reuseAddress);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -198,7 +200,8 @@ Endpoint* Endpoint::serverFactory (const std::string& specification, int listenB
|
|||
|
||||
Endpoint* Endpoint::factory (const Endpoint::EndpointType type,
|
||||
const std::string& specification,
|
||||
int listenBacklog) {
|
||||
int listenBacklog,
|
||||
bool reuseAddress) {
|
||||
if (specification.size() < 7) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -208,6 +211,11 @@ Endpoint* Endpoint::factory (const Endpoint::EndpointType type,
|
|||
assert(false);
|
||||
}
|
||||
|
||||
if (listenBacklog == 0 && type == ENDPOINT_SERVER) {
|
||||
// use some default value
|
||||
listenBacklog = 10;
|
||||
}
|
||||
|
||||
string copy = specification;
|
||||
if (specification[specification.size() - 1] == '/') {
|
||||
// address ends with a slash => remove
|
||||
|
@ -264,14 +272,26 @@ Endpoint* Endpoint::factory (const Endpoint::EndpointType type,
|
|||
// hostname and port (e.g. [address]:port)
|
||||
uint16_t port = (uint16_t) StringUtils::uint32(copy.substr(found + 2));
|
||||
|
||||
return new EndpointIpV6(type, encryption, specification, listenBacklog, copy.substr(1, found - 1), port);
|
||||
return new EndpointIpV6(type,
|
||||
encryption,
|
||||
specification,
|
||||
listenBacklog,
|
||||
reuseAddress,
|
||||
copy.substr(1, found - 1),
|
||||
port);
|
||||
}
|
||||
|
||||
found = copy.find("]", 1);
|
||||
if (found != string::npos && found > 2 && found + 1 == copy.size()) {
|
||||
// hostname only (e.g. [address])
|
||||
|
||||
return new EndpointIpV6(type, encryption, specification, listenBacklog, copy.substr(1, found - 1), EndpointIp::_defaultPort);
|
||||
return new EndpointIpV6(type,
|
||||
encryption,
|
||||
specification,
|
||||
listenBacklog,
|
||||
reuseAddress,
|
||||
copy.substr(1, found - 1),
|
||||
EndpointIp::_defaultPort);
|
||||
}
|
||||
|
||||
// invalid address specification
|
||||
|
@ -285,11 +305,23 @@ Endpoint* Endpoint::factory (const Endpoint::EndpointType type,
|
|||
// hostname and port
|
||||
uint16_t port = (uint16_t) StringUtils::uint32(copy.substr(found + 1));
|
||||
|
||||
return new EndpointIpV4(type, encryption, specification, listenBacklog, copy.substr(0, found), port);
|
||||
return new EndpointIpV4(type,
|
||||
encryption,
|
||||
specification,
|
||||
listenBacklog,
|
||||
reuseAddress,
|
||||
copy.substr(0, found),
|
||||
port);
|
||||
}
|
||||
|
||||
// hostname only
|
||||
return new EndpointIpV4(type, encryption, specification, listenBacklog, copy, EndpointIp::_defaultPort);
|
||||
return new EndpointIpV4(type,
|
||||
encryption,
|
||||
specification,
|
||||
listenBacklog,
|
||||
reuseAddress,
|
||||
copy,
|
||||
EndpointIp::_defaultPort);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -163,7 +163,9 @@ namespace triagens {
|
|||
/// @brief creates a server endpoint from a string value
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static Endpoint* serverFactory (const std::string&, int = 10);
|
||||
static Endpoint* serverFactory (const std::string&,
|
||||
int,
|
||||
bool reuseAddress);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief creates a client endpoint from a string value
|
||||
|
@ -177,7 +179,8 @@ namespace triagens {
|
|||
|
||||
static Endpoint* factory (const EndpointType type,
|
||||
const std::string&,
|
||||
int);
|
||||
int,
|
||||
bool);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief compare two endpoints
|
||||
|
|
|
@ -70,9 +70,13 @@ EndpointIp::EndpointIp (const Endpoint::EndpointType type,
|
|||
const Endpoint::EncryptionType encryption,
|
||||
const std::string& specification,
|
||||
int listenBacklog,
|
||||
bool reuseAddress,
|
||||
const std::string& host,
|
||||
const uint16_t port) :
|
||||
Endpoint(type, domainType, encryption, specification, listenBacklog), _host(host), _port(port) {
|
||||
const uint16_t port)
|
||||
: Endpoint(type, domainType, encryption, specification, listenBacklog),
|
||||
_reuseAddress(reuseAddress),
|
||||
_host(host),
|
||||
_port(port) {
|
||||
|
||||
assert(domainType == DOMAIN_IPV4 || domainType == Endpoint::DOMAIN_IPV6);
|
||||
}
|
||||
|
@ -119,13 +123,15 @@ TRI_socket_t EndpointIp::connectSocket (const struct addrinfo* aip,
|
|||
|
||||
if (_type == ENDPOINT_SERVER) {
|
||||
// try to reuse address
|
||||
int opt = 1;
|
||||
if (TRI_setsockopt(listenSocket, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char*> (&opt), sizeof (opt)) == -1) {
|
||||
LOG_ERROR("setsockopt() failed with %d (%s)", errno, strerror(errno));
|
||||
if (_reuseAddress) {
|
||||
int opt = 1;
|
||||
if (TRI_setsockopt(listenSocket, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char*> (&opt), sizeof (opt)) == -1) {
|
||||
LOG_ERROR("setsockopt() failed with %d (%s)", errno, strerror(errno));
|
||||
|
||||
TRI_CLOSE_SOCKET(listenSocket);
|
||||
TRI_invalidatesocket(&listenSocket);
|
||||
return listenSocket;
|
||||
TRI_CLOSE_SOCKET(listenSocket);
|
||||
TRI_invalidatesocket(&listenSocket);
|
||||
return listenSocket;
|
||||
}
|
||||
}
|
||||
|
||||
// server needs to bind to socket
|
||||
|
|
|
@ -54,6 +54,7 @@ namespace triagens {
|
|||
const EncryptionType,
|
||||
const std::string&,
|
||||
int,
|
||||
bool,
|
||||
const std::string&,
|
||||
const uint16_t);
|
||||
|
||||
|
@ -140,6 +141,12 @@ namespace triagens {
|
|||
|
||||
private:
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief whether or not to reuse the address
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool _reuseAddress;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief host name / address (IPv4 or IPv6)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -48,9 +48,10 @@ EndpointIpV4::EndpointIpV4 (const Endpoint::EndpointType type,
|
|||
const Endpoint::EncryptionType encryption,
|
||||
const std::string& specification,
|
||||
int listenBacklog,
|
||||
bool reuseAddress,
|
||||
const std::string& host,
|
||||
const uint16_t port) :
|
||||
EndpointIp(type, DOMAIN_IPV4, encryption, specification, listenBacklog, host, port) {
|
||||
const uint16_t port)
|
||||
: EndpointIp(type, DOMAIN_IPV4, encryption, specification, listenBacklog, reuseAddress, host, port) {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -54,6 +54,7 @@ namespace triagens {
|
|||
const EncryptionType,
|
||||
const std::string&,
|
||||
int,
|
||||
bool,
|
||||
const std::string&,
|
||||
const uint16_t);
|
||||
|
||||
|
|
|
@ -53,9 +53,10 @@ EndpointIpV6::EndpointIpV6 (const Endpoint::EndpointType type,
|
|||
const Endpoint::EncryptionType encryption,
|
||||
const std::string& specification,
|
||||
int listenBacklog,
|
||||
bool reuseAddress,
|
||||
const std::string& host,
|
||||
const uint16_t port) :
|
||||
EndpointIp(type, DOMAIN_IPV6, encryption, specification, listenBacklog, host, port) {
|
||||
const uint16_t port)
|
||||
: EndpointIp(type, DOMAIN_IPV6, encryption, specification, listenBacklog, reuseAddress, host, port) {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -59,6 +59,7 @@ namespace triagens {
|
|||
const EncryptionType,
|
||||
const std::string&,
|
||||
int,
|
||||
bool,
|
||||
const std::string&,
|
||||
const uint16_t);
|
||||
|
||||
|
|
|
@ -90,6 +90,7 @@ EndpointList::~EndpointList () {
|
|||
bool EndpointList::add (const std::string& specification,
|
||||
const std::vector<std::string>& dbNames,
|
||||
int backLogSize,
|
||||
bool reuseAddress,
|
||||
Endpoint** dst) {
|
||||
const string key = Endpoint::getUnifiedForm(specification);
|
||||
|
||||
|
@ -108,7 +109,7 @@ bool EndpointList::add (const std::string& specification,
|
|||
return true;
|
||||
}
|
||||
|
||||
Endpoint* ep = Endpoint::serverFactory(key, backLogSize);
|
||||
Endpoint* ep = Endpoint::serverFactory(key, backLogSize, reuseAddress);
|
||||
|
||||
if (ep == 0) {
|
||||
return false;
|
||||
|
|
|
@ -96,6 +96,7 @@ namespace triagens {
|
|||
bool add (const std::string&,
|
||||
const std::vector<std::string>&,
|
||||
int,
|
||||
bool,
|
||||
Endpoint** = 0);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -122,18 +122,6 @@ TRI_socket_t EndpointUnixDomain::connect (double connectTimeout, double requestT
|
|||
return listenSocket;
|
||||
}
|
||||
|
||||
// reuse address
|
||||
int opt = 1;
|
||||
|
||||
if (TRI_setsockopt(listenSocket, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char*> (&opt), sizeof (opt)) == -1) {
|
||||
LOG_ERROR("setsockopt() failed with %d (%s)", errno, strerror(errno));
|
||||
|
||||
TRI_CLOSE_SOCKET(listenSocket);
|
||||
TRI_invalidatesocket(&listenSocket);
|
||||
return listenSocket;
|
||||
}
|
||||
LOG_TRACE("reuse address flag set");
|
||||
|
||||
struct sockaddr_un address;
|
||||
|
||||
memset(&address, 0, sizeof(address));
|
||||
|
|
|
@ -333,7 +333,6 @@ ApplicationScheduler::ApplicationScheduler (ApplicationServer* applicationServer
|
|||
_multiSchedulerAllowed(true),
|
||||
_nrSchedulerThreads(4),
|
||||
_backend(0),
|
||||
_reuseAddress(true),
|
||||
_descriptorMinimum(256) {
|
||||
}
|
||||
|
||||
|
@ -379,14 +378,6 @@ void ApplicationScheduler::installSignalHandler (SignalTask* task) {
|
|||
_scheduler->registerTask(task);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns true, if address reuse is allowed
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool ApplicationScheduler::addressReuseAllowed () {
|
||||
return _reuseAddress;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- ApplicationFeature methods
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -421,18 +412,11 @@ void ApplicationScheduler::setupOptions (map<string, ProgramOptionsDescription>&
|
|||
("scheduler.backend", &_backend, "1: select, 2: poll, 4: epoll")
|
||||
#endif
|
||||
("scheduler.report-interval", &_reportInterval, "scheduler report interval")
|
||||
("server.no-reuse-address", "do not try to reuse address")
|
||||
#ifdef TRI_HAVE_GETRLIMIT
|
||||
("server.descriptors-minimum", &_descriptorMinimum, "minimum number of file descriptors needed to start")
|
||||
#endif
|
||||
;
|
||||
|
||||
// deprecated option, only remaining for downwards-compatibility
|
||||
// reuse-address is always true
|
||||
options[ApplicationServer::OPTIONS_HIDDEN]
|
||||
("server.reuse-address", "try to reuse address")
|
||||
;
|
||||
|
||||
if (_multiSchedulerAllowed) {
|
||||
options["THREAD Options:help-admin"]
|
||||
("scheduler.threads", &_nrSchedulerThreads, "number of threads for I/O scheduler")
|
||||
|
@ -460,16 +444,6 @@ bool ApplicationScheduler::parsePhase1 (triagens::basics::ProgramOptions& option
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool ApplicationScheduler::parsePhase2 (triagens::basics::ProgramOptions& options) {
|
||||
|
||||
// check if want to reuse the address
|
||||
if (options.has("server.reuse-address")) {
|
||||
_reuseAddress = true;
|
||||
}
|
||||
|
||||
if (options.has("server.no-reuse-address")) {
|
||||
_reuseAddress = false;
|
||||
}
|
||||
|
||||
// adjust file descriptors
|
||||
adjustFileDescriptors();
|
||||
|
||||
|
|
|
@ -96,12 +96,6 @@ namespace triagens {
|
|||
|
||||
void installSignalHandler (SignalTask*);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns true, if address reuse is allowed
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool addressReuseAllowed ();
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- ApplicationFeature methods
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -240,12 +234,6 @@ namespace triagens {
|
|||
|
||||
uint32_t _backend;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief allow port to be reused
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool _reuseAddress;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief minimum number of file descriptors
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -265,8 +265,11 @@ bool ClientConnection::readClientConnection (StringBuffer& stringBuffer) {
|
|||
|
||||
if (lenRead == 0) {
|
||||
// nothing more to read
|
||||
// since we come from a call to select which indicated that there
|
||||
// is something to read and we are reading from a socket, this is
|
||||
// an error condition. Therefore we return false
|
||||
_isConnected = false;
|
||||
break;
|
||||
return false;
|
||||
}
|
||||
|
||||
stringBuffer.increaseLength(lenRead);
|
||||
|
|
|
@ -2735,7 +2735,7 @@ static v8::Handle<v8::Value> JS_TestPort (v8::Arguments const& argv) {
|
|||
}
|
||||
|
||||
string address = TRI_ObjectToString(argv[0]);
|
||||
Endpoint* endpoint = Endpoint::serverFactory(address);
|
||||
Endpoint* endpoint = Endpoint::serverFactory(address, 10, false);
|
||||
if (0 == endpoint) {
|
||||
TRI_V8_EXCEPTION_MESSAGE(scope, TRI_ERROR_BAD_PARAMETER,
|
||||
"address description invalid, cannot create endpoint");
|
||||
|
|
Loading…
Reference in New Issue