1
0
Fork 0

Bug fix/ui moving documents (#2981)

* ui - added bind parameters to slow query history view

* also added bind params to running query view

* ui: fixed a bug when moving multiple documents was not possible
This commit is contained in:
Heiko 2017-08-08 16:08:29 +02:00 committed by Frank Celler
parent ec5dde49ec
commit 32836b04b7
7 changed files with 37 additions and 8 deletions

View File

@ -1,6 +1,10 @@
devel
-----
* ui: fixed a bug when moving multiple documents was not possible
* ui: added bind parameters to slow query history view
* fixed docs for issue #2968
* AQL CHAR_LENGTH(null) returns now 0. Since AQL TO_STRING(null) is '' (string of length 0)

View File

@ -37,7 +37,6 @@
if (this.activeUser === false || this.activeUser === null) {
this.activeUser = 'root';
}
console.log(response);
if (response.user === self.activeUser) {
try {

View File

@ -6,6 +6,7 @@
defaults: {
id: '',
query: '',
bindVars: '',
started: '',
runTime: ''
}

View File

@ -1,5 +1,6 @@
<script id="arangoTable.ejs" type="text/template">
<div class="tableWrapper">
<% var type = type; %>
<table class="arango-table" id="<%=content.id%>">
<thead>
<tr>
@ -13,7 +14,15 @@
<% _.each(content.rows, function(k) { var counter=0;%>
<tr>
<% _.each(k, function(x) { %>
<% if (type && type[counter] === 'pre') { %>
<td class="arango-table-td table-cell<%=counter%>">
<pre class="tablePre">
<%=(content.unescaped && content.unescaped[counter] ? x : _.escape(x))%>
</pre>
</td>
<% } else { %>
<td class="arango-table-td table-cell<%=counter%>"><%=(content.unescaped && content.unescaped[counter] ? x : _.escape(x))%></td>
<% } %>
<% counter++;});%>
</tr>
<%});%>

View File

@ -722,7 +722,7 @@
confirmMoveSelectedDocs: function () {
var toMove = this.getSelectedDocs();
var self = this;
var toCollection = $('.modal-body').last().find('#move-documents-to').val();
var toCollection = $('#move-documents-to').val();
var callback = function () {
this.collection.getDocuments(this.getDocsCallback.bind(this));

View File

@ -46,7 +46,7 @@
tableDescription: {
id: 'arangoQueryManagementTable',
titles: ['ID', 'Query String', 'Runtime', 'Started', ''],
titles: ['ID', 'Query String', 'Bind parameter', 'Runtime', 'Started', ''],
rows: [],
unescaped: [false, false, false, false, true]
},
@ -156,7 +156,13 @@
renderActive: function () {
this.$el.html(this.templateActive.render({}));
$(this.id).append(this.table.render({content: this.tableDescription}));
$(this.id).append(this.table.render({
content: this.tableDescription,
type: {
1: 'pre',
2: 'pre'
}
}));
$('#activequeries').addClass('arango-active-tab');
this.addEvents();
},
@ -164,7 +170,11 @@
renderSlow: function () {
this.$el.html(this.templateSlow.render({}));
$(this.id).append(this.table.render({
content: this.tableDescription
content: this.tableDescription,
type: {
1: 'pre',
2: 'pre'
}
}));
$('#slowqueries').addClass('arango-active-tab');
this.addEvents();
@ -190,6 +200,7 @@
rowsArray.push([
model.get('id'),
model.get('query'),
JSON.stringify(model.get('bindVars'), null, 2),
model.get('runTime').toFixed(2) + ' s',
model.get('started'),
button

View File

@ -7,9 +7,9 @@
th {
border-bottom: 1px solid $c-c2grey;
font-weight: 500;
text-align: left;
padding-left: 18px;
height: 43px;
padding-left: 18px;
text-align: left;
}
}
@ -25,6 +25,11 @@
td {
padding: 10px 18px;
pre {
background: none;
border: 0;
}
}
}
}