mirror of https://gitee.com/bigwinds/arangodb
ui - added satellite collection creation (#2584)
This commit is contained in:
parent
a3ae2b7191
commit
4d7720b471
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
@ -2781,4 +2781,4 @@ var cutByResolution = function (str) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="workMonitorContent" class="innerContent">
|
<div id="workMonitorContent" class="innerContent">
|
||||||
</div></script></head><body><nav class="navbar" style="display: none"><div class="primary"><div class="navlogo"><a class="logo big" href="#"><img id="ArangoDBLogo" class="arangodbLogo" src="img/arangodb-edition-optimized.svg"></a><a class="logo small" href="#"><img class="arangodbLogo" src="img/arangodb_logo_small.png"></a><a class="version"><span id="currentVersion"></span></a></div><div class="statmenu" id="statisticBar"></div><div class="navmenu" id="navigationBar"></div></div></nav><div id="modalPlaceholder"></div><div class="bodyWrapper" style="display: none"><div class="centralRow"><div id="navbar2" class="navbarWrapper secondary"><div class="subnavmenu" id="subNavigationBar"></div></div><div class="resizecontainer contentWrapper"><div id="loadingScreen" class="loadingScreen" style="display: none"><i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw margin-bottom"></i> <span class="sr-only">Loading...</span></div><div id="content" class="centralContent"></div><footer class="footer"><div id="footerBar"></div></footer></div></div></div><div id="progressPlaceholder" style="display:none"></div><div id="spotlightPlaceholder" style="display:none"></div><div id="graphSettingsContent" style="display: none"></div><div id="filterSelectDiv" style="display:none"></div><div id="offlinePlaceholder" style="display:none"><div class="offline-div"><div class="pure-u"><div class="pure-u-1-4"></div><div class="pure-u-1-2 offline-window"><div class="offline-header"><h3>You have been disconnected from the server</h3></div><div class="offline-body"><p>The connection to the server has been lost. The server may be under heavy load.</p><p>Trying to reconnect in <span id="offlineSeconds">10</span> seconds.</p><p class="animation_state"><span><button class="button-success">Reconnect now</button></span></p></div></div><div class="pure-u-1-4"></div></div></div></div><div class="arangoFrame" style=""><div class="outerDiv"><div class="innerDiv"></div></div></div><script src="libs.js?version=1497180582772"></script><script src="app.js?version=1497180582772"></script></body></html>
|
</div></script></head><body><nav class="navbar" style="display: none"><div class="primary"><div class="navlogo"><a class="logo big" href="#"><img id="ArangoDBLogo" class="arangodbLogo" src="img/arangodb-edition-optimized.svg"></a><a class="logo small" href="#"><img class="arangodbLogo" src="img/arangodb_logo_small.png"></a><a class="version"><span id="currentVersion"></span></a></div><div class="statmenu" id="statisticBar"></div><div class="navmenu" id="navigationBar"></div></div></nav><div id="modalPlaceholder"></div><div class="bodyWrapper" style="display: none"><div class="centralRow"><div id="navbar2" class="navbarWrapper secondary"><div class="subnavmenu" id="subNavigationBar"></div></div><div class="resizecontainer contentWrapper"><div id="loadingScreen" class="loadingScreen" style="display: none"><i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw margin-bottom"></i> <span class="sr-only">Loading...</span></div><div id="content" class="centralContent"></div><footer class="footer"><div id="footerBar"></div></footer></div></div></div><div id="progressPlaceholder" style="display:none"></div><div id="spotlightPlaceholder" style="display:none"></div><div id="graphSettingsContent" style="display: none"></div><div id="filterSelectDiv" style="display:none"></div><div id="offlinePlaceholder" style="display:none"><div class="offline-div"><div class="pure-u"><div class="pure-u-1-4"></div><div class="pure-u-1-2 offline-window"><div class="offline-header"><h3>You have been disconnected from the server</h3></div><div class="offline-body"><p>The connection to the server has been lost. The server may be under heavy load.</p><p>Trying to reconnect in <span id="offlineSeconds">10</span> seconds.</p><p class="animation_state"><span><button class="button-success">Reconnect now</button></span></p></div></div><div class="pure-u-1-4"></div></div></div></div><div class="arangoFrame" style=""><div class="outerDiv"><div class="innerDiv"></div></div></div><script src="libs.js?version=1497867200111"></script><script src="app.js?version=1497867200111"></script></body></html>
|
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
@ -166,8 +166,14 @@
|
||||||
data.numberOfShards = object.shards;
|
data.numberOfShards = object.shards;
|
||||||
data.shardKeys = object.shardBy;
|
data.shardKeys = object.shardBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (object.replicationFactor) {
|
if (object.replicationFactor) {
|
||||||
data.replicationFactor = JSON.parse(object.replicationFactor);
|
data.replicationFactor = object.replicationFactor;
|
||||||
|
var pattern = new RegExp(/^[0-9]+$/);
|
||||||
|
if (pattern.test(object.replicationFactor)) {
|
||||||
|
// looks like a number
|
||||||
|
data.replicationFactor = JSON.parse(object.replicationFactor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* jshint browser: true */
|
/* jshint browser: true */
|
||||||
/* jshint unused: false */
|
/* jshint unused: false */
|
||||||
/* global _, Backbone, templateEngine, window, setTimeout, clearTimeout, arangoHelper, Joi, $ */
|
/* global frontendConfig, _, Backbone, templateEngine, window, setTimeout, clearTimeout, arangoHelper, Joi, $ */
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -348,6 +348,9 @@
|
||||||
if (replicationFactor === '') {
|
if (replicationFactor === '') {
|
||||||
replicationFactor = 1;
|
replicationFactor = 1;
|
||||||
}
|
}
|
||||||
|
if ($('#is-satellite-collection').val() === 'true') {
|
||||||
|
replicationFactor = 'satellite';
|
||||||
|
}
|
||||||
|
|
||||||
if (isCoordinator) {
|
if (isCoordinator) {
|
||||||
shards = $('#new-collection-shards').val();
|
shards = $('#new-collection-shards').val();
|
||||||
|
@ -494,13 +497,22 @@
|
||||||
this.submitCreateCollection.bind(this)
|
this.submitCreateCollection.bind(this)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if (self.engine.name !== 'rocksdb') {
|
if (window.App.isCluster && frontendConfig.isEnterprise) {
|
||||||
|
advancedTableContent.push(
|
||||||
|
window.modalView.createSelectEntry(
|
||||||
|
'is-satellite-collection',
|
||||||
|
'Satellite collection',
|
||||||
|
'',
|
||||||
|
'Create satellite collection? This will disable replication factor.',
|
||||||
|
[{value: false, label: 'No'}, {value: true, label: 'Yes'}]
|
||||||
|
)
|
||||||
|
);
|
||||||
advancedTableContent.push(
|
advancedTableContent.push(
|
||||||
window.modalView.createTextEntry(
|
window.modalView.createTextEntry(
|
||||||
'new-collection-size',
|
'new-replication-factor',
|
||||||
'Journal size',
|
'Replication factor',
|
||||||
'',
|
'',
|
||||||
'The maximal size of a journal or datafile (in MB). Must be at least 1.',
|
'Numeric value. Must be at least 1. Total number of copies of the data in the cluster',
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
[
|
[
|
||||||
|
@ -512,13 +524,13 @@
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (window.App.isCluster) {
|
if (self.engine.name !== 'rocksdb') {
|
||||||
advancedTableContent.push(
|
advancedTableContent.push(
|
||||||
window.modalView.createTextEntry(
|
window.modalView.createTextEntry(
|
||||||
'new-replication-factor',
|
'new-collection-size',
|
||||||
'Replication factor',
|
'Journal size',
|
||||||
'',
|
'',
|
||||||
'Numeric value. Must be at least 1. Total number of copies of the data in the cluster',
|
'The maximal size of a journal or datafile (in MB). Must be at least 1.',
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
[
|
[
|
||||||
|
@ -559,6 +571,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (window.App.isCluster && frontendConfig.isEnterprise) {
|
||||||
|
$('#is-satellite-collection').on('change', function (element) {
|
||||||
|
if ($('#is-satellite-collection').val() === 'true') {
|
||||||
|
$('#new-replication-factor').prop('disabled', true);
|
||||||
|
} else {
|
||||||
|
$('#new-replication-factor').prop('disabled', false);
|
||||||
|
}
|
||||||
|
$('#new-replication-factor').val('').focus().focusout();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,10 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tippy-popper {
|
||||||
|
z-index: 99999999;
|
||||||
|
}
|
||||||
|
|
||||||
.select2-drop-active {
|
.select2-drop-active {
|
||||||
border: 2px solid $c-info;
|
border: 2px solid $c-info;
|
||||||
border-top: 0;
|
border-top: 0;
|
||||||
|
@ -65,6 +69,11 @@
|
||||||
input {
|
input {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
width: 436px;
|
width: 436px;
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
background-color: rgba(0, 0, 0, .05) !important;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue