mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into devel
This commit is contained in:
commit
360a24f65d
|
@ -103,13 +103,28 @@ endif()
|
|||
# TODO: Exclude non-supported?
|
||||
|
||||
## Compiler flags --------------------------------------------------------------
|
||||
|
||||
# Build types
|
||||
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TL)
|
||||
message (${CMAKE_BUILD_TYPE_TL})
|
||||
if(CMAKE_BUILD_TYPE_TL MATCHES debug)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g")
|
||||
elseif(CMAKE_BUILD_TYPE_TL MATCHES relwithdebinfo)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -g")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -g")
|
||||
elseif(CMAKE_BUILD_TYPE_TL MATCHES release)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
|
||||
endif()
|
||||
|
||||
# GCC
|
||||
if (CMAKE_COMPILER_IS_GNUCC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu89 -g -O2")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -g -O2")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu89")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
|
||||
endif ()
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g -O2")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
endif ()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
|
@ -122,7 +137,7 @@ endif()
|
|||
|
||||
# OSX
|
||||
if (APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -std=c++11")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
if (CMAKE_COMPILER_IS_CLANG)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
add_definitions("-Wno-deprecated-declarations")
|
||||
|
@ -198,13 +213,6 @@ if (USE_MAINTAINER_MODE)
|
|||
add_definitions("-DTRI_ENABLE_MAINTAINER_MODE=1")
|
||||
endif()
|
||||
|
||||
# Maintainer mode (Failure Tests) ----------------------------------------------
|
||||
option(USE_FAILURE_TESTS
|
||||
"whether we want to have failure tests compiled in" OFF)
|
||||
if (USE_FAILURE_TESTS)
|
||||
add_definitions("-DTRI_ENABLE_FAILURE_TESTS=1")
|
||||
endif()
|
||||
|
||||
# Enable relative paths to binaries --------------------------------------------
|
||||
option(USE_RELATIVE "Do you want to have all path are relative to the binary" OFF)
|
||||
|
||||
|
@ -766,3 +774,4 @@ endif ()
|
|||
|
||||
# Finally: user cpack
|
||||
include(CPack)
|
||||
|
||||
|
|
|
@ -406,15 +406,15 @@
|
|||
});
|
||||
|
||||
if (found) {
|
||||
this.deleteAardvarkJob(aardvark.id);
|
||||
}
|
||||
else {
|
||||
array.push({
|
||||
collection: aardvark.collection,
|
||||
id: aardvark.id,
|
||||
type: aardvark.type
|
||||
});
|
||||
}
|
||||
else {
|
||||
window.arangoHelper.deleteAardvarkJob(aardvark.id);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -2907,8 +2907,33 @@ div .tile, div .bigtile {
|
|||
position: relative;
|
||||
text-align: center;
|
||||
z-index: 1; }
|
||||
div .tile progress[value], div .bigtile progress[value] {
|
||||
color: #5bc0de; }
|
||||
div .tile progress::-webkit-progress-bar-value, div .bigtile progress::-webkit-progress-bar-value {
|
||||
background: #5bc0de; }
|
||||
div .tile progress::-webkit-progress-value, div .bigtile progress::-webkit-progress-value {
|
||||
background: #5bc0de; }
|
||||
div .tile progress::-moz-progress-bar, div .bigtile progress::-moz-progress-bar {
|
||||
background: #5bc0de; }
|
||||
div .tile progress, div .bigtile progress {
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0;
|
||||
height: 2px;
|
||||
margin-top: 16px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
z-index: 10; }
|
||||
div .tile:hover, div .bigtile:hover {
|
||||
cursor: pointer; }
|
||||
div .locked.tile, div .locked.bigtile {
|
||||
cursor: not-allowed;
|
||||
opacity: .5; }
|
||||
div .locked.tile .iconSet span:hover, div .locked.bigtile .iconSet span:hover {
|
||||
background-color: #fff !important;
|
||||
color: #000;
|
||||
cursor: not-allowed !important; }
|
||||
div .locked.tile .iconSet:hover, div .locked.bigtile .iconSet:hover {
|
||||
cursor: not-allowed !important; }
|
||||
div .tile .warning-icons, div .bigtile .warning-icons {
|
||||
background-color: #da4f49;
|
||||
border-radius: 3px;
|
||||
|
@ -2980,6 +3005,8 @@ div .tile, div .bigtile {
|
|||
padding: 4px 8px;
|
||||
text-overflow: ellipsis !important;
|
||||
white-space: nowrap !important; }
|
||||
div .tile h5.inProgress, div .bigtile h5.inProgress {
|
||||
color: #5bc0de; }
|
||||
div .tile .tileSelects, div .bigtile .tileSelects {
|
||||
margin-left: 40px;
|
||||
position: relative;
|
||||
|
@ -5498,7 +5525,7 @@ div.headerBar {
|
|||
z-index: 9999999; }
|
||||
|
||||
.modal-tabbar {
|
||||
border-bottom: 1px solid #000; }
|
||||
border-bottom: 1px solid #666; }
|
||||
|
||||
.modal-body {
|
||||
color: #736b68;
|
||||
|
@ -5923,8 +5950,33 @@ div .tile, div .bigtile {
|
|||
position: relative;
|
||||
text-align: center;
|
||||
z-index: 1; }
|
||||
div .tile progress[value], div .bigtile progress[value] {
|
||||
color: #5bc0de; }
|
||||
div .tile progress::-webkit-progress-bar-value, div .bigtile progress::-webkit-progress-bar-value {
|
||||
background: #5bc0de; }
|
||||
div .tile progress::-webkit-progress-value, div .bigtile progress::-webkit-progress-value {
|
||||
background: #5bc0de; }
|
||||
div .tile progress::-moz-progress-bar, div .bigtile progress::-moz-progress-bar {
|
||||
background: #5bc0de; }
|
||||
div .tile progress, div .bigtile progress {
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0;
|
||||
height: 2px;
|
||||
margin-top: 16px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
z-index: 10; }
|
||||
div .tile:hover, div .bigtile:hover {
|
||||
cursor: pointer; }
|
||||
div .locked.tile, div .locked.bigtile {
|
||||
cursor: not-allowed;
|
||||
opacity: .5; }
|
||||
div .locked.tile .iconSet span:hover, div .locked.bigtile .iconSet span:hover {
|
||||
background-color: #fff !important;
|
||||
color: #000;
|
||||
cursor: not-allowed !important; }
|
||||
div .locked.tile .iconSet:hover, div .locked.bigtile .iconSet:hover {
|
||||
cursor: not-allowed !important; }
|
||||
div .tile .warning-icons, div .bigtile .warning-icons {
|
||||
background-color: #da4f49;
|
||||
border-radius: 3px;
|
||||
|
@ -5996,6 +6048,8 @@ div .tile, div .bigtile {
|
|||
padding: 4px 8px;
|
||||
text-overflow: ellipsis !important;
|
||||
white-space: nowrap !important; }
|
||||
div .tile h5.inProgress, div .bigtile h5.inProgress {
|
||||
color: #5bc0de; }
|
||||
div .tile .tileSelects, div .bigtile .tileSelects {
|
||||
margin-left: 40px;
|
||||
position: relative;
|
||||
|
|
Binary file not shown.
|
@ -10756,15 +10756,15 @@ function GraphViewer(svg, width, height, adapterConfig, config) {
|
|||
});
|
||||
|
||||
if (found) {
|
||||
this.deleteAardvarkJob(aardvark.id);
|
||||
}
|
||||
else {
|
||||
array.push({
|
||||
collection: aardvark.collection,
|
||||
id: aardvark.id,
|
||||
type: aardvark.type
|
||||
});
|
||||
}
|
||||
else {
|
||||
window.arangoHelper.deleteAardvarkJob(aardvark.id);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -16435,7 +16435,8 @@ var __fs__=require("fs");var __rcf__=__fs__.join(__fs__.home(),".arangosh.rc");i
|
|||
status: "",
|
||||
type: "",
|
||||
isSystem: false,
|
||||
picture: ""
|
||||
picture: "",
|
||||
locked: false
|
||||
},
|
||||
|
||||
getProperties: function () {
|
||||
|
@ -16553,14 +16554,14 @@ var __fs__=require("fs");var __rcf__=__fs__.join(__fs__.home(),".arangosh.rc");i
|
|||
cache: false,
|
||||
type: 'DELETE',
|
||||
url: "/_api/index/"+ this.get("name") +"/"+encodeURIComponent(id),
|
||||
async: false,
|
||||
async: true,
|
||||
success: function () {
|
||||
callback(false);
|
||||
},
|
||||
error: function (data) {
|
||||
callback(true, data);
|
||||
}
|
||||
});
|
||||
});
|
||||
callback();
|
||||
},
|
||||
|
||||
|
@ -19530,19 +19531,29 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
},
|
||||
|
||||
render: function () {
|
||||
if (this.model.get("locked")) {
|
||||
$(this.el).addClass('locked');
|
||||
}
|
||||
$(this.el).html(this.template.render({
|
||||
model: this.model
|
||||
}));
|
||||
$(this.el).attr('id', 'collection_' + this.model.get('name'));
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
editProperties: function (event) {
|
||||
if (this.model.get("locked")) {
|
||||
return 0;
|
||||
}
|
||||
event.stopPropagation();
|
||||
this.createEditPropertiesModal();
|
||||
},
|
||||
|
||||
showProperties: function(event) {
|
||||
if (this.model.get("locked")) {
|
||||
return 0;
|
||||
}
|
||||
event.stopPropagation();
|
||||
this.createInfoModal();
|
||||
},
|
||||
|
@ -19553,6 +19564,9 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
if ($(event.target).hasClass("disabled")) {
|
||||
return 0;
|
||||
}
|
||||
if (this.model.get("locked")) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
window.App.navigate(
|
||||
"collection/" + encodeURIComponent(this.model.get("name")) + "/documents/1", {trigger: true}
|
||||
|
@ -19863,7 +19877,12 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
this.events, null,
|
||||
tabBar
|
||||
);
|
||||
this.getIndex();
|
||||
if (this.model.get("status") === 'loaded') {
|
||||
this.getIndex();
|
||||
}
|
||||
else {
|
||||
$($('#infoTab').children()[1]).remove();
|
||||
}
|
||||
this.bindIndexEvents();
|
||||
},
|
||||
|
||||
|
@ -19895,6 +19914,7 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
});
|
||||
|
||||
$('#infoTab a').bind('click', function(e) {
|
||||
$('#indexDeleteModal').remove();
|
||||
if ($(e.currentTarget).html() === 'Indices' && !$(e.currentTarget).parent().hasClass('active')) {
|
||||
|
||||
$('#newIndexView').hide();
|
||||
|
@ -20019,7 +20039,6 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
break;
|
||||
}
|
||||
var callback = function(error, msg){
|
||||
|
||||
if (error) {
|
||||
if (msg) {
|
||||
var message = JSON.parse(msg.responseText);
|
||||
|
@ -20032,10 +20051,15 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
};
|
||||
|
||||
window.modalView.hide();
|
||||
this.getIndex();
|
||||
this.createEditPropertiesModal();
|
||||
$($('#infoTab').children()[1]).find('a').click();
|
||||
//this.getIndex();
|
||||
//this.createEditPropertiesModal();
|
||||
//$($('#infoTab').children()[1]).find('a').click();
|
||||
self.model.createIndex(postParameter, callback);
|
||||
window.App.arangoCollectionsStore.fetch({
|
||||
success: function () {
|
||||
self.collectionsView.render();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
lastTarget: null,
|
||||
|
@ -20051,27 +20075,47 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
children().
|
||||
first().
|
||||
text();
|
||||
window.modalView.hide();
|
||||
//window.modalView.hide();
|
||||
|
||||
//delete modal
|
||||
$("#indexDeleteModal").modal('show');
|
||||
$('#confirmDeleteIndexBtn').unbind('click');
|
||||
$('#confirmDeleteIndexBtn').bind('click', function() {
|
||||
$("#modal-dialog .modal-footer").after(
|
||||
'<div id="indexDeleteModal" style="display:block;" class="alert alert-error modal-delete-confirmation">' +
|
||||
'<strong>Really delete?</strong>' +
|
||||
'<button id="indexConfirmDelete" class="button-danger pull-right modal-confirm-delete">Yes</button>' +
|
||||
'<button id="indexAbortDelete" class="button-neutral pull-right">No</button>' +
|
||||
'</div>');
|
||||
$('#indexConfirmDelete').unbind('click');
|
||||
$('#indexConfirmDelete').bind('click', function() {
|
||||
$('#indexDeleteModal').remove();
|
||||
self.deleteIndex();
|
||||
});
|
||||
|
||||
$('#indexAbortDelete').unbind('click');
|
||||
$('#indexAbortDelete').bind('click', function() {
|
||||
$('#indexDeleteModal').remove();
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
|
||||
deleteIndex: function () {
|
||||
var callback = function(error) {
|
||||
if (error) {
|
||||
arangoHelper.arangoError("Could not delete index");
|
||||
$("tr th:contains('"+ this.lastId+"')").parent().children().last().html(
|
||||
'<span class="deleteIndex icon_arangodb_roundminus"' +
|
||||
' data-original-title="Delete index" title="Delete index"></span>'
|
||||
);
|
||||
}
|
||||
};
|
||||
else {
|
||||
$("tr th:contains('"+ this.lastId+"')").parent().remove();
|
||||
}
|
||||
}.bind(this);
|
||||
|
||||
$("#indexDeleteModal").modal('hide');
|
||||
this.model.deleteIndex(this.lastId, callback);
|
||||
this.createEditPropertiesModal();
|
||||
$($('#infoTab').children()[1]).find('a').click();
|
||||
$("tr th:contains('"+ this.lastId+"')").parent().children().last().html(
|
||||
'<i class="fa fa-circle-o-notch fa-spin"></i>'
|
||||
);
|
||||
},
|
||||
|
||||
selectIndexType: function () {
|
||||
|
@ -20138,7 +20182,6 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
|
||||
}
|
||||
else {
|
||||
console.log("toggle else");
|
||||
$('#indexEditView').show();
|
||||
$('#newIndexView').hide();
|
||||
$('#addIndex').detach().appendTo('#modal-dialog .modal-footer');
|
||||
|
@ -20179,13 +20222,51 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
el2: '#collectionsThumbnailsIn',
|
||||
|
||||
searchTimeout: null,
|
||||
refreshRate: 2000,
|
||||
|
||||
template: templateEngine.createTemplate("collectionsView.ejs"),
|
||||
|
||||
checkLockedCollections: function() {
|
||||
|
||||
var self = this,
|
||||
lockedCollections = window.arangoHelper.syncAndReturnUninishedAardvarkJobs('index');
|
||||
|
||||
this.collection.each(function(model) {
|
||||
model.set('locked', false);
|
||||
});
|
||||
|
||||
_.each(lockedCollections, function(locked) {
|
||||
var model = self.collection.findWhere({
|
||||
id: locked.collection
|
||||
});
|
||||
model.set('locked', true);
|
||||
model.set('lockType', locked.type);
|
||||
});
|
||||
|
||||
this.collection.each(function(model) {
|
||||
if (model.get("locked")) {
|
||||
$('#collection_' + model.get("name")).addClass('locked');
|
||||
}
|
||||
else {
|
||||
$('#collection_' + model.get("name")).removeClass('locked');
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
initialize: function() {
|
||||
var self = this;
|
||||
|
||||
window.setInterval(function() {
|
||||
self.checkLockedCollections();
|
||||
}, self.refreshRate);
|
||||
|
||||
},
|
||||
|
||||
render: function () {
|
||||
|
||||
var dropdownVisible = false,
|
||||
lockedCollections = window.arangoHelper.syncAndReturnUninishedAardvarkJobs('index');
|
||||
this.checkLockedCollections();
|
||||
var dropdownVisible = false;
|
||||
|
||||
if ($('#collectionsDropdown').is(':visible')) {
|
||||
dropdownVisible = true;
|
||||
|
@ -20231,6 +20312,7 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
|
||||
arangoHelper.fixTooltips(".icon_arangodb, .arangoicon", "left");
|
||||
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -20457,7 +20539,7 @@ window.ArangoUsers = Backbone.Collection.extend({
|
|||
var returnobj = this.collection.newCollection(
|
||||
collName, wfs, isSystem, collSize, collType, shards, shardBy
|
||||
);
|
||||
if (returnobj.status !== true) {console.log(returnobj);
|
||||
if (returnobj.status !== true) {
|
||||
arangoHelper.arangoError("Collection error", returnobj.errorMessage);
|
||||
}
|
||||
this.updateCollectionsView();
|
||||
|
|
Binary file not shown.
|
@ -264,7 +264,13 @@
|
|||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<h5 class="collectionName"><%= model.get('name') %></h5></script><script id="collectionsView.ejs" type="text/template"><div class="headerBar">
|
||||
|
||||
<% if(model.get('lockType') === "index") { %>
|
||||
<!-- <progress max="100" value="80"></progress>-->
|
||||
<h5 class="collectionName"><%= model.get('name') %></h5>
|
||||
<% } else { %>
|
||||
<h5 class="collectionName"><%= model.get('name') %></h5>
|
||||
<% } %></script><script id="collectionsView.ejs" type="text/template"><div class="headerBar">
|
||||
<div class="search-field">
|
||||
<input type="text" id="searchInput" class="search-input" placeholder="Search..."/>
|
||||
<!-- <img id="searchSubmit" class="search-submit-icon"/> -->
|
||||
|
@ -378,21 +384,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Delete Index Modal -->
|
||||
<div id="indexDeleteModal" style="display:none" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<a class="arangoHeader">Delete Index?</a>
|
||||
</div>
|
||||
<div class="modal-body" id="deleteIndex">
|
||||
<p>There is no way back…</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="button-close" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
<button id="confirmDeleteIndexBtn" class="button-danger" style="float:right">Delete</button>
|
||||
</div>
|
||||
</div></script><script id="dashboardView.ejs" type="text/template"><% var subBar = function(title) { %>
|
||||
<div class="dashboard-sub-bar">
|
||||
<div class="dashboard-sub-bar-title"><%= title %></div>
|
||||
|
|
Binary file not shown.
|
@ -300,7 +300,13 @@
|
|||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<h5 class="collectionName"><%= model.get('name') %></h5>
|
||||
|
||||
<% if(model.get('lockType') === "index") { %>
|
||||
<!-- <progress max="100" value="80"></progress>-->
|
||||
<h5 class="collectionName"><%= model.get('name') %></h5>
|
||||
<% } else { %>
|
||||
<h5 class="collectionName"><%= model.get('name') %></h5>
|
||||
<% } %>
|
||||
</script>
|
||||
|
||||
<script id="collectionsView.ejs" type="text/template">
|
||||
|
@ -420,21 +426,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Delete Index Modal -->
|
||||
<div id="indexDeleteModal" style="display:none" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<a class="arangoHeader">Delete Index?</a>
|
||||
</div>
|
||||
<div class="modal-body" id="deleteIndex">
|
||||
<p>There is no way back…</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="button-close" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
<button id="confirmDeleteIndexBtn" class="button-danger" style="float:right">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</script>
|
||||
|
||||
<script id="dashboardView.ejs" type="text/template">
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -2897,8 +2897,33 @@ div .tile, div .bigtile {
|
|||
position: relative;
|
||||
text-align: center;
|
||||
z-index: 1; }
|
||||
div .tile progress[value], div .bigtile progress[value] {
|
||||
color: #5bc0de; }
|
||||
div .tile progress::-webkit-progress-bar-value, div .bigtile progress::-webkit-progress-bar-value {
|
||||
background: #5bc0de; }
|
||||
div .tile progress::-webkit-progress-value, div .bigtile progress::-webkit-progress-value {
|
||||
background: #5bc0de; }
|
||||
div .tile progress::-moz-progress-bar, div .bigtile progress::-moz-progress-bar {
|
||||
background: #5bc0de; }
|
||||
div .tile progress, div .bigtile progress {
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0;
|
||||
height: 2px;
|
||||
margin-top: 16px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
z-index: 10; }
|
||||
div .tile:hover, div .bigtile:hover {
|
||||
cursor: pointer; }
|
||||
div .locked.tile, div .locked.bigtile {
|
||||
cursor: not-allowed;
|
||||
opacity: .5; }
|
||||
div .locked.tile .iconSet span:hover, div .locked.bigtile .iconSet span:hover {
|
||||
background-color: #fff !important;
|
||||
color: #000;
|
||||
cursor: not-allowed !important; }
|
||||
div .locked.tile .iconSet:hover, div .locked.bigtile .iconSet:hover {
|
||||
cursor: not-allowed !important; }
|
||||
div .tile .warning-icons, div .bigtile .warning-icons {
|
||||
background-color: #da4f49;
|
||||
border-radius: 3px;
|
||||
|
@ -2970,6 +2995,8 @@ div .tile, div .bigtile {
|
|||
padding: 4px 8px;
|
||||
text-overflow: ellipsis !important;
|
||||
white-space: nowrap !important; }
|
||||
div .tile h5.inProgress, div .bigtile h5.inProgress {
|
||||
color: #5bc0de; }
|
||||
div .tile .tileSelects, div .bigtile .tileSelects {
|
||||
margin-left: 40px;
|
||||
position: relative;
|
||||
|
@ -5488,7 +5515,7 @@ div.headerBar {
|
|||
z-index: 9999999; }
|
||||
|
||||
.modal-tabbar {
|
||||
border-bottom: 1px solid #000; }
|
||||
border-bottom: 1px solid #666; }
|
||||
|
||||
.modal-body {
|
||||
color: #736b68;
|
||||
|
@ -7292,6 +7319,10 @@ input.gv-radio-button {
|
|||
#graphTab li,
|
||||
#collectionTab li {
|
||||
float: right; }
|
||||
#infoTab li.disabled a,
|
||||
#graphTab li.disabled a,
|
||||
#collectionTab li.disabled a {
|
||||
cursor: not-allowed; }
|
||||
|
||||
#infoTab a,
|
||||
#graphTab a,
|
||||
|
@ -8034,8 +8065,7 @@ table .sorting {
|
|||
margin-top: 20px; }
|
||||
|
||||
.new-index-view input[type='checkbox'] {
|
||||
float: left;
|
||||
margin-top: -9px; }
|
||||
float: left; }
|
||||
|
||||
.new-index-view table tr {
|
||||
width: 600px !important; }
|
||||
|
@ -8071,7 +8101,14 @@ table .sorting {
|
|||
border-bottom: 1px solid #e5e5e5; }
|
||||
|
||||
.newIndexClass table {
|
||||
border-top: 1px solid #f7f3f2;
|
||||
margin-bottom: 60px; }
|
||||
.newIndexClass table select {
|
||||
margin-right: 7px; }
|
||||
.newIndexClass table .arangoicon {
|
||||
float: right;
|
||||
margin-right: -12px;
|
||||
margin-top: 5px; }
|
||||
|
||||
.index-button-bar {
|
||||
bottom: 0;
|
||||
|
|
Binary file not shown.
|
@ -406,15 +406,15 @@
|
|||
});
|
||||
|
||||
if (found) {
|
||||
this.deleteAardvarkJob(aardvark.id);
|
||||
}
|
||||
else {
|
||||
array.push({
|
||||
collection: aardvark.collection,
|
||||
id: aardvark.id,
|
||||
type: aardvark.type
|
||||
});
|
||||
}
|
||||
else {
|
||||
window.arangoHelper.deleteAardvarkJob(aardvark.id);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
status: "",
|
||||
type: "",
|
||||
isSystem: false,
|
||||
picture: ""
|
||||
picture: "",
|
||||
locked: false
|
||||
},
|
||||
|
||||
getProperties: function () {
|
||||
|
@ -132,14 +133,14 @@
|
|||
cache: false,
|
||||
type: 'DELETE',
|
||||
url: "/_api/index/"+ this.get("name") +"/"+encodeURIComponent(id),
|
||||
async: false,
|
||||
async: true,
|
||||
success: function () {
|
||||
callback(false);
|
||||
},
|
||||
error: function (data) {
|
||||
callback(true, data);
|
||||
}
|
||||
});
|
||||
});
|
||||
callback();
|
||||
},
|
||||
|
||||
|
|
|
@ -18,5 +18,11 @@
|
|||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<h5 class="collectionName"><%= model.get('name') %></h5>
|
||||
|
||||
<% if(model.get('lockType') === "index") { %>
|
||||
<!-- <progress max="100" value="80"></progress>-->
|
||||
<h5 class="collectionName"><%= model.get('name') %></h5>
|
||||
<% } else { %>
|
||||
<h5 class="collectionName"><%= model.get('name') %></h5>
|
||||
<% } %>
|
||||
</script>
|
||||
|
|
|
@ -115,19 +115,4 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Delete Index Modal -->
|
||||
<div id="indexDeleteModal" style="display:none" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<a class="arangoHeader">Delete Index?</a>
|
||||
</div>
|
||||
<div class="modal-body" id="deleteIndex">
|
||||
<p>There is no way back…</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="button-close" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
<button id="confirmDeleteIndexBtn" class="button-danger" style="float:right">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</script>
|
||||
|
|
|
@ -24,19 +24,29 @@
|
|||
},
|
||||
|
||||
render: function () {
|
||||
if (this.model.get("locked")) {
|
||||
$(this.el).addClass('locked');
|
||||
}
|
||||
$(this.el).html(this.template.render({
|
||||
model: this.model
|
||||
}));
|
||||
$(this.el).attr('id', 'collection_' + this.model.get('name'));
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
editProperties: function (event) {
|
||||
if (this.model.get("locked")) {
|
||||
return 0;
|
||||
}
|
||||
event.stopPropagation();
|
||||
this.createEditPropertiesModal();
|
||||
},
|
||||
|
||||
showProperties: function(event) {
|
||||
if (this.model.get("locked")) {
|
||||
return 0;
|
||||
}
|
||||
event.stopPropagation();
|
||||
this.createInfoModal();
|
||||
},
|
||||
|
@ -47,6 +57,9 @@
|
|||
if ($(event.target).hasClass("disabled")) {
|
||||
return 0;
|
||||
}
|
||||
if (this.model.get("locked")) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
window.App.navigate(
|
||||
"collection/" + encodeURIComponent(this.model.get("name")) + "/documents/1", {trigger: true}
|
||||
|
@ -357,7 +370,12 @@
|
|||
this.events, null,
|
||||
tabBar
|
||||
);
|
||||
this.getIndex();
|
||||
if (this.model.get("status") === 'loaded') {
|
||||
this.getIndex();
|
||||
}
|
||||
else {
|
||||
$($('#infoTab').children()[1]).remove();
|
||||
}
|
||||
this.bindIndexEvents();
|
||||
},
|
||||
|
||||
|
@ -389,6 +407,7 @@
|
|||
});
|
||||
|
||||
$('#infoTab a').bind('click', function(e) {
|
||||
$('#indexDeleteModal').remove();
|
||||
if ($(e.currentTarget).html() === 'Indices' && !$(e.currentTarget).parent().hasClass('active')) {
|
||||
|
||||
$('#newIndexView').hide();
|
||||
|
@ -513,7 +532,6 @@
|
|||
break;
|
||||
}
|
||||
var callback = function(error, msg){
|
||||
|
||||
if (error) {
|
||||
if (msg) {
|
||||
var message = JSON.parse(msg.responseText);
|
||||
|
@ -526,10 +544,15 @@
|
|||
};
|
||||
|
||||
window.modalView.hide();
|
||||
this.getIndex();
|
||||
this.createEditPropertiesModal();
|
||||
$($('#infoTab').children()[1]).find('a').click();
|
||||
//this.getIndex();
|
||||
//this.createEditPropertiesModal();
|
||||
//$($('#infoTab').children()[1]).find('a').click();
|
||||
self.model.createIndex(postParameter, callback);
|
||||
window.App.arangoCollectionsStore.fetch({
|
||||
success: function () {
|
||||
self.collectionsView.render();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
lastTarget: null,
|
||||
|
@ -545,27 +568,47 @@
|
|||
children().
|
||||
first().
|
||||
text();
|
||||
window.modalView.hide();
|
||||
//window.modalView.hide();
|
||||
|
||||
//delete modal
|
||||
$("#indexDeleteModal").modal('show');
|
||||
$('#confirmDeleteIndexBtn').unbind('click');
|
||||
$('#confirmDeleteIndexBtn').bind('click', function() {
|
||||
$("#modal-dialog .modal-footer").after(
|
||||
'<div id="indexDeleteModal" style="display:block;" class="alert alert-error modal-delete-confirmation">' +
|
||||
'<strong>Really delete?</strong>' +
|
||||
'<button id="indexConfirmDelete" class="button-danger pull-right modal-confirm-delete">Yes</button>' +
|
||||
'<button id="indexAbortDelete" class="button-neutral pull-right">No</button>' +
|
||||
'</div>');
|
||||
$('#indexConfirmDelete').unbind('click');
|
||||
$('#indexConfirmDelete').bind('click', function() {
|
||||
$('#indexDeleteModal').remove();
|
||||
self.deleteIndex();
|
||||
});
|
||||
|
||||
$('#indexAbortDelete').unbind('click');
|
||||
$('#indexAbortDelete').bind('click', function() {
|
||||
$('#indexDeleteModal').remove();
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
|
||||
deleteIndex: function () {
|
||||
var callback = function(error) {
|
||||
if (error) {
|
||||
arangoHelper.arangoError("Could not delete index");
|
||||
$("tr th:contains('"+ this.lastId+"')").parent().children().last().html(
|
||||
'<span class="deleteIndex icon_arangodb_roundminus"' +
|
||||
' data-original-title="Delete index" title="Delete index"></span>'
|
||||
);
|
||||
}
|
||||
};
|
||||
else {
|
||||
$("tr th:contains('"+ this.lastId+"')").parent().remove();
|
||||
}
|
||||
}.bind(this);
|
||||
|
||||
$("#indexDeleteModal").modal('hide');
|
||||
this.model.deleteIndex(this.lastId, callback);
|
||||
this.createEditPropertiesModal();
|
||||
$($('#infoTab').children()[1]).find('a').click();
|
||||
$("tr th:contains('"+ this.lastId+"')").parent().children().last().html(
|
||||
'<i class="fa fa-circle-o-notch fa-spin"></i>'
|
||||
);
|
||||
},
|
||||
|
||||
selectIndexType: function () {
|
||||
|
@ -632,7 +675,6 @@
|
|||
|
||||
}
|
||||
else {
|
||||
console.log("toggle else");
|
||||
$('#indexEditView').show();
|
||||
$('#newIndexView').hide();
|
||||
$('#addIndex').detach().appendTo('#modal-dialog .modal-footer');
|
||||
|
|
|
@ -9,13 +9,51 @@
|
|||
el2: '#collectionsThumbnailsIn',
|
||||
|
||||
searchTimeout: null,
|
||||
refreshRate: 2000,
|
||||
|
||||
template: templateEngine.createTemplate("collectionsView.ejs"),
|
||||
|
||||
checkLockedCollections: function() {
|
||||
|
||||
var self = this,
|
||||
lockedCollections = window.arangoHelper.syncAndReturnUninishedAardvarkJobs('index');
|
||||
|
||||
this.collection.each(function(model) {
|
||||
model.set('locked', false);
|
||||
});
|
||||
|
||||
_.each(lockedCollections, function(locked) {
|
||||
var model = self.collection.findWhere({
|
||||
id: locked.collection
|
||||
});
|
||||
model.set('locked', true);
|
||||
model.set('lockType', locked.type);
|
||||
});
|
||||
|
||||
this.collection.each(function(model) {
|
||||
if (model.get("locked")) {
|
||||
$('#collection_' + model.get("name")).addClass('locked');
|
||||
}
|
||||
else {
|
||||
$('#collection_' + model.get("name")).removeClass('locked');
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
initialize: function() {
|
||||
var self = this;
|
||||
|
||||
window.setInterval(function() {
|
||||
self.checkLockedCollections();
|
||||
}, self.refreshRate);
|
||||
|
||||
},
|
||||
|
||||
render: function () {
|
||||
|
||||
var dropdownVisible = false,
|
||||
lockedCollections = window.arangoHelper.syncAndReturnUninishedAardvarkJobs('index');
|
||||
this.checkLockedCollections();
|
||||
var dropdownVisible = false;
|
||||
|
||||
if ($('#collectionsDropdown').is(':visible')) {
|
||||
dropdownVisible = true;
|
||||
|
@ -61,6 +99,7 @@
|
|||
|
||||
arangoHelper.fixTooltips(".icon_arangodb, .arangoicon", "left");
|
||||
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -287,7 +326,7 @@
|
|||
var returnobj = this.collection.newCollection(
|
||||
collName, wfs, isSystem, collSize, collType, shards, shardBy
|
||||
);
|
||||
if (returnobj.status !== true) {console.log(returnobj);
|
||||
if (returnobj.status !== true) {
|
||||
arangoHelper.arangoError("Collection error", returnobj.errorMessage);
|
||||
}
|
||||
this.updateCollectionsView();
|
||||
|
|
|
@ -117,12 +117,19 @@
|
|||
margin-bottom: 1px;
|
||||
padding-bottom: 0;
|
||||
padding-right: 10px;
|
||||
|
||||
}
|
||||
|
||||
#infoTab li,
|
||||
#graphTab li,
|
||||
#collectionTab li {
|
||||
float: right;
|
||||
|
||||
&.disabled {
|
||||
a {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#infoTab a,
|
||||
|
|
|
@ -148,6 +148,7 @@ $c-sh-string: #ce2f30;
|
|||
$c-sh-object: #00f;
|
||||
$c-sh-array: #00f;
|
||||
|
||||
$c-progress-bar: #5bc0de;
|
||||
$c-progress-shadow: #353c39;
|
||||
$c-progress-shadow-2: #8cdb8b;
|
||||
$c-progress-bg: #363c39;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
.new-index-view {
|
||||
input[type='checkbox'] {
|
||||
float: left;
|
||||
margin-top: -9px;
|
||||
}
|
||||
|
||||
table {
|
||||
|
@ -67,7 +66,18 @@
|
|||
|
||||
.newIndexClass {
|
||||
table {
|
||||
border-top: 1px solid $c-modal-table-border-bottom;
|
||||
margin-bottom: 60px;
|
||||
|
||||
select {
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
.arangoicon {
|
||||
float: right;
|
||||
margin-right: -12px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
}
|
||||
|
||||
.modal-tabbar {
|
||||
border-bottom: 1px solid $c-black;
|
||||
border-bottom: 1px solid $c-darker-grey;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
|
|
|
@ -39,10 +39,53 @@ $iconsize: 50px;
|
|||
|
||||
z-index: 1;
|
||||
|
||||
progress[value] {
|
||||
color: $c-progress-bar;
|
||||
}
|
||||
|
||||
progress::-webkit-progress-bar-value {
|
||||
background: $c-progress-bar;
|
||||
}
|
||||
|
||||
progress::-webkit-progress-value {
|
||||
background: $c-progress-bar;
|
||||
}
|
||||
|
||||
progress::-moz-progress-bar {
|
||||
background: $c-progress-bar;
|
||||
}
|
||||
|
||||
progress {
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0;
|
||||
height: 2px;
|
||||
margin-top: 16px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&.locked {
|
||||
cursor: not-allowed;
|
||||
opacity: .5;
|
||||
|
||||
.iconSet {
|
||||
span:hover {
|
||||
background-color: $c-white !important;
|
||||
color: $c-black;
|
||||
cursor: not-allowed !important;
|
||||
}
|
||||
}
|
||||
|
||||
.iconSet:hover {
|
||||
cursor: not-allowed !important;
|
||||
}
|
||||
}
|
||||
|
||||
.warning-icons {
|
||||
background-color: $c-negative;
|
||||
border-radius: 3px;
|
||||
|
@ -153,6 +196,10 @@ $iconsize: 50px;
|
|||
padding: 4px 8px;
|
||||
text-overflow: ellipsis !important;
|
||||
white-space: nowrap !important;
|
||||
|
||||
&.inProgress {
|
||||
color: $c-progress-bar;
|
||||
}
|
||||
}
|
||||
|
||||
.tileSelects {
|
||||
|
|
Loading…
Reference in New Issue