1
0
Fork 0

Fix database selector

This commit is contained in:
Andreas Streichardt 2016-05-17 17:20:24 +02:00
parent 6e26758d15
commit 007041e4d3
13 changed files with 70 additions and 20 deletions

View File

@ -16651,11 +16651,16 @@ window.ArangoUsers = Backbone.Collection.extend({
else {
var collName = $('#new-collection-name').val(),
collSize = $('#new-collection-size').val(),
replicationFactor = $('#new-replication-factor').val(),
collType = $('#new-collection-type').val(),
collSync = $('#new-collection-sync').val(),
shards = 1,
shardBy = [];
if (replicationFactor === '') {
replicationFactor = 1;
}
if (isCoordinator) {
shards = $('#new-collection-shards').val();
@ -16717,6 +16722,7 @@ window.ArangoUsers = Backbone.Collection.extend({
wfs: wfs,
isSystem: isSystem,
collSize: collSize,
replicationFactor: replicationFactor,
collType: collType,
shards: shards,
shardBy: shardBy
@ -16820,6 +16826,24 @@ window.ArangoUsers = Backbone.Collection.extend({
]
)
);
if (window.App.isCluster) {
advancedTableContent.push(
window.modalView.createTextEntry(
"new-replication-factor",
"Replication factor",
"",
"Numeric value. Default is '1'. Description: TODO",
"",
false,
[
{
rule: Joi.string().allow('').optional().regex(/^[0-9]*$/),
msg: "Must be a number."
}
]
)
);
}
advancedTableContent.push(
window.modalView.createSelectEntry(
"new-collection-sync",
@ -21866,7 +21890,7 @@ window.ArangoUsers = Backbone.Collection.extend({
};
var path = window.location.protocol + "//" + window.location.host
+ "/_db/" + database + "/_admin/aardvark/index.html";
+ frontendConfig.basePath + "/_db/" + database + "/_admin/aardvark/index.html";
window.location.href = path;
@ -26317,6 +26341,17 @@ window.ArangoUsers = Backbone.Collection.extend({
self.setEditorAutoHeight(outputEditor);
self.deselect(outputEditor);
//when finished send a delete req to api (free db space)
if (data.id) {
$.ajax({
url: '/_api/cursor/' + encodeURIComponent(data.id),
type: 'DELETE',
error: function(error) {
console.log(error);
}
});
}
};
//check if async query is finished
@ -27493,7 +27528,7 @@ window.ArangoUsers = Backbone.Collection.extend({
"distinct|graph|outbound|inbound|any|all|none|aggregate|like|count",
aqlBuiltinFunctions:
"to_bool|to_number|to_string|to_list|is_null|is_bool|is_number|is_string|is_list|is_document|" +
"to_bool|to_number|to_string|to_list|is_null|is_bool|is_number|is_string|is_list|is_document|typename|" +
"concat|concat_separator|char_length|lower|upper|substring|left|right|trim|reverse|contains|" +
"like|floor|ceil|round|abs|rand|sqrt|pow|length|min|max|average|sum|median|variance_population|" +
"variance_sample|first|last|unique|matches|merge|merge_recursive|has|attributes|values|unset|unset_recursive|keep|" +
@ -27508,7 +27543,7 @@ window.ArangoUsers = Backbone.Collection.extend({
"date_add|date_subtract|date_diff|date_compare|date_format|fail|passthru|sleep|not_null|" +
"first_list|first_document|parse_identifier|current_user|current_database|" +
"collections|document|union|union_distinct|intersection|flatten|" +
"ltrim|rtrim|find_first|find_last|split|substitute|md5|sha1|random_token|AQL_LAST_ENTRY",
"ltrim|rtrim|find_first|find_last|split|substitute|md5|sha1|hash|random_token|AQL_LAST_ENTRY",
listenKey: function(e) {
if (e.keyCode === 27) {
@ -27692,6 +27727,7 @@ window.ArangoUsers = Backbone.Collection.extend({
hide: function() {
$(this.el).hide();
this.typeahead = $('#spotlight .typeahead').typeahead('destroy');
}
});
@ -30359,7 +30395,7 @@ window.ArangoUsers = Backbone.Collection.extend({
success: function(data) {
var currentVersion =
window.versionHelper.fromString(data.version);
$('.navbar #currentVersion').text(data.version.substr(0,3));
$('.navbar #currentVersion').text(" " + data.version.substr(0,3));
window.parseVersions = function (json) {
if (_.isEmpty(json)) {

File diff suppressed because one or more lines are too long

View File

@ -2777,7 +2777,8 @@ if (list.length > 0) {
</a>
</li>
<li id="dbStatus" class="infoEntry subMenuEntry pull-right">
<a class="info">DB: <%= currentDB.name %> </a>
<a class="info">DB:</a>
<a class="info"><%= currentDB.name %> </a>
</li>
<li id="userBar" class="infoEntry subMenuEntry pull-right" style="margin-right: 10px;">
<!--

View File

@ -3020,7 +3020,8 @@ if (list.length > 0) {
</a>
</li>
<li id="dbStatus" class="infoEntry subMenuEntry pull-right">
<a class="info">DB: <%= currentDB.name %> </a>
<a class="info">DB:</a>
<a class="info"><%= currentDB.name %> </a>
</li>
<li id="userBar" class="infoEntry subMenuEntry pull-right" style="margin-right: 10px;">
<!--

View File

@ -1,2 +1,2 @@
<script src="libs.js?version=1463497718624">wuwuwuw</script>
<script src="app.js?version=1463497718624"></script>
<script src="libs.js?version=1463498412422">wuwuwuw</script>
<script src="app.js?version=1463498412422"></script>

File diff suppressed because one or more lines are too long

View File

@ -2736,6 +2736,9 @@ div.footer-right {
outline: none; }
.button-neutral i, .button-primary i, .button-notification i, .button-success i, .button-info i, .button-danger i, .button-warning i, .button-inactive i, .button-close i, .ajax-file-upload-red i, .ajax-file-upload i {
margin-left: -5px; }
.button-neutral .fa, .button-primary .fa, .button-notification .fa, .button-success .fa, .button-info .fa, .button-danger .fa, .button-warning .fa, .button-inactive .fa, .button-close .fa, .ajax-file-upload-red .fa, .ajax-file-upload .fa {
position: relative;
top: 1px; }
.button-header {
margin-top: 5px; }
@ -6389,7 +6392,7 @@ div.headerBar {
background: #5bc0de;
border-radius: 3px;
color: #fff;
margin-left: 5px; }
margin-left: 8px; }
.arangoToolbar .styled-select {
width: auto; }
@ -6639,6 +6642,7 @@ div.headerBar {
stroke-width: .5px; }
.dashboard-legend .dashboard-legend-inner {
margin-right: 25px;
padding: 10px 5px 5px 0;
text-align: right; }
.dashboard-legend .dashboard-legend-inner br {
@ -8866,6 +8870,8 @@ main {
transition: all .2s ease-in; }
.subnavmenu .infoEntry {
line-height: 45px; }
.subnavmenu .infoEntry a {
margin-right: 5px; }
.subnavmenu .infoEntry:hover {
cursor: default; }
.subnavmenu .infoEntry:hover .info {
@ -8880,8 +8886,14 @@ main {
.subnavmenu .icon,
.subnavmenu .state {
color: rgba(255, 255, 255, 0.95);
display: block;
float: left;
font-weight: 300;
text-transform: uppercase; }
max-width: 150px;
overflow: hidden;
text-overflow: ellipsis;
text-transform: uppercase;
white-space: nowrap; }
.subnavmenu .info span,
.subnavmenu .icon span,
.subnavmenu .state span {
@ -8897,7 +8909,7 @@ main {
background: #fff;
border: 1px solid rgba(64, 74, 83, 0.2);
display: none;
margin-top: 10px !important;
margin-top: 55px !important;
min-width: 200px;
position: absolute;
z-index: 9999; }

View File

@ -116,7 +116,7 @@
};
var path = window.location.protocol + "//" + window.location.host
+ "/_db/" + database + "/_admin/aardvark/index.html";
+ frontendConfig.basePath + "/_db/" + database + "/_admin/aardvark/index.html";
window.location.href = path;