mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of github.com:triAGENS/ArangoDB into devel
This commit is contained in:
commit
9e251487c1
|
@ -8422,6 +8422,10 @@ bool ExtractDocumentHandle (v8::Handle<v8::Value> val,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! obj->Has(v8g->_RevKey)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
rid = TRI_ObjectToUInt64(obj->Get(v8g->_RevKey), true);
|
rid = TRI_ObjectToUInt64(obj->Get(v8g->_RevKey), true);
|
||||||
|
|
||||||
if (rid == 0) {
|
if (rid == 0) {
|
||||||
|
|
|
@ -79,11 +79,3 @@
|
||||||
margin: 11px 10px 0 0 !important;
|
margin: 11px 10px 0 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#resources > li:nth-child(even) {
|
|
||||||
background-color: #FFFFFF !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#resources > li:nth-child(odd) {
|
|
||||||
background-color: #F1F0EE !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -9,13 +9,21 @@
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
color: #8AA050;
|
color: #8AA050;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.deleteButton {
|
.deleteButton {
|
||||||
color: #B30000;
|
/*color: #B30000;*/
|
||||||
|
color: #DA4F49;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
padding-right: 3px;
|
padding-right: 3px;
|
||||||
top: 3px;
|
top: 3px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deleteButton:hover {
|
||||||
|
color: #BE342E;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.headerButtonList {
|
ul.headerButtonList {
|
||||||
|
|
|
@ -51,14 +51,6 @@
|
||||||
padding:12px 18px;
|
padding:12px 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#databaseTable tr:nth-child(odd) {
|
|
||||||
background-color: #F1F0EE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#databaseTable tr:nth-child(even) {
|
|
||||||
background-color: #FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
#createDatabaseModal table {
|
#createDatabaseModal table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,14 +6,6 @@
|
||||||
padding:12px 18px !important;
|
padding:12px 18px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#logContent .odd {
|
|
||||||
background-color: #F1F0EE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#logContent .even {
|
|
||||||
background-color: #FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
table.dataTable thead th {
|
table.dataTable thead th {
|
||||||
border-bottom:none;
|
border-bottom:none;
|
||||||
|
@ -31,8 +23,6 @@ table.arangoDataTable.dataTable td {
|
||||||
}
|
}
|
||||||
|
|
||||||
.arangoDataTable {
|
.arangoDataTable {
|
||||||
padding-left: 5px !important;
|
|
||||||
padding-right: 5px !important;
|
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
position: relative;
|
position: relative;
|
||||||
table-layout:fixed !important;
|
table-layout:fixed !important;
|
||||||
|
@ -43,14 +33,25 @@ table.arangoDataTable.dataTable td {
|
||||||
border-bottom: 1px solid #C2C2C2;
|
border-bottom: 1px solid #C2C2C2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.arangoDataTable .odd:hover,
|
table.arangoDataTable tr {
|
||||||
.arangoDataTable .even:hover,
|
|
||||||
#logContent .odd:hover,
|
|
||||||
#logContent .even:hover {
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.arangoDataTable.noPointer tr {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
.arangoDataTable .key {
|
.arangoDataTable .key {
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Odd / Even coloring */
|
||||||
|
.api-container ul#resources > li.resource:nth-child(even),
|
||||||
|
table.arangoDataTable tr.even {
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api-container ul#resources > li.resource:nth-child(odd),
|
||||||
|
table.arangoDataTable tr.odd {
|
||||||
|
background-color: #F1F0EE;
|
||||||
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
#sourceFooter {
|
#sourceFooter {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
background: none;
|
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
padding-top: 30px;
|
padding-top: 30px;
|
||||||
|
|
|
@ -148,7 +148,6 @@ table.dataTable thead th {
|
||||||
}
|
}
|
||||||
|
|
||||||
#documentTableID.dataTable thead tr {
|
#documentTableID.dataTable thead tr {
|
||||||
/* background-color: #F1F0EE;*/
|
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,23 +158,6 @@ table.dataTable thead th {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#documentTableID .odd,
|
|
||||||
table.dataTable.arangoDataTable tr.odd {
|
|
||||||
background:#F1F0EE;
|
|
||||||
}
|
|
||||||
#documentTableID .even,
|
|
||||||
table.dataTable.arangoDataTable tr.even {
|
|
||||||
background:#FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
#documentTableID tr.odd td.sorting_1 {
|
|
||||||
background:#F1F0EE;/* #fdf6df*/
|
|
||||||
}
|
|
||||||
|
|
||||||
#documentTableID tr.even td.sorting_1 {
|
|
||||||
background:#FFFFFF; /*#fdfaec*/
|
|
||||||
}
|
|
||||||
|
|
||||||
.arangoTab > li > a,
|
.arangoTab > li > a,
|
||||||
.arangoTab > li:hover > a {
|
.arangoTab > li:hover > a {
|
||||||
border-radius: 0 !important;
|
border-radius: 0 !important;
|
||||||
|
|
|
@ -401,14 +401,6 @@
|
||||||
min-width: 100% !important;
|
min-width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#collectionEditIndexTable tr:nth-child(even) {
|
|
||||||
background-color: white !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#collectionEditIndexTable tr:nth-child(odd) {
|
|
||||||
background-color: #F1F0EE !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#collectionEditIndexTable th {
|
#collectionEditIndexTable th {
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
|
|
|
@ -131,8 +131,8 @@ body {
|
||||||
|
|
||||||
.form-actions {
|
.form-actions {
|
||||||
margin-top: -10px !important;
|
margin-top: -10px !important;
|
||||||
background-color: rgba(0,0,0,0.05);
|
|
||||||
border:none;
|
border:none;
|
||||||
|
background: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ICONS */
|
/* ICONS */
|
||||||
|
|
|
@ -25,20 +25,6 @@
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#logContent .sorting_1 {
|
|
||||||
background-color: #FBFBFB !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*.odd .sorting_1 {
|
|
||||||
background-color: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.even .sorting_1 {
|
|
||||||
background-color: #F1F0EE !important;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
#logToolbar {
|
#logToolbar {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
pre{
|
pre{
|
||||||
margin: 0 0 0 0;
|
margin: 0 0 0 0;
|
||||||
}
|
}
|
||||||
.form-actions {
|
|
||||||
}
|
|
||||||
.swagger-ui-wrap .container {
|
.swagger-ui-wrap .container {
|
||||||
width: auto;
|
width: auto;
|
||||||
margin: 20px;
|
margin: 20px;
|
||||||
|
|
|
@ -377,7 +377,7 @@ var modalDialogHelper = modalDialogHelper || {};
|
||||||
buttonDismiss.className = "close";
|
buttonDismiss.className = "close";
|
||||||
buttonDismiss.dataDismiss = "modal";
|
buttonDismiss.dataDismiss = "modal";
|
||||||
buttonDismiss.ariaHidden = "true";
|
buttonDismiss.ariaHidden = "true";
|
||||||
buttonDismiss.appendChild(document.createTextNode("x"));
|
buttonDismiss.appendChild(document.createTextNode("×"));
|
||||||
|
|
||||||
header.appendChild(document.createTextNode(title));
|
header.appendChild(document.createTextNode(title));
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
"application/documentation/:key" : "appDocumentation",
|
"application/documentation/:key" : "appDocumentation",
|
||||||
"graph" : "graph",
|
"graph" : "graph",
|
||||||
"graphManagement" : "graphManagement",
|
"graphManagement" : "graphManagement",
|
||||||
"graphManagement/add" : "graphAddNew"
|
"graphManagement/add" : "graphAddNew",
|
||||||
|
"graphManagement/delete/:name" : "graphDelete"
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
|
@ -281,6 +282,16 @@
|
||||||
this.naviView.selectMenuItem('graphviewer-menu');
|
this.naviView.selectMenuItem('graphviewer-menu');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
graphDelete: function(name) {
|
||||||
|
if (!this.deleteGraphView) {
|
||||||
|
this.deleteGraphView = new window.DeleteGraphView({
|
||||||
|
collection: this.graphs
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.deleteGraphView.render(name);
|
||||||
|
this.naviView.selectMenuItem('graphviewer-menu');
|
||||||
|
},
|
||||||
|
|
||||||
applications: function() {
|
applications: function() {
|
||||||
if (this.applicationsView === undefined) {
|
if (this.applicationsView === undefined) {
|
||||||
this.applicationsView = new window.ApplicationsView({
|
this.applicationsView = new window.ApplicationsView({
|
||||||
|
|
|
@ -13,12 +13,12 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th class="collectionTh">Vertices:</th>
|
<th class="collectionTh">Vertices:</th>
|
||||||
<th class="collectionTh"><input type="text" id="newGraphVertices" placeholder="Vertex Collection"></input></th>
|
<th class="collectionTh"><input type="text" id="newGraphVertices" placeholder="Vertex Collection"></input></th>
|
||||||
<th><a class="modalTooltips" title="The path name of the document collection that should be used as vertices. If this does not exists it will be created."><i class="icon-info-sign"></i></a></th>
|
<th><a class="modalTooltips" title="The path name of the document collection that should be used as vertices. If this does not exist it will be created."><i class="icon-info-sign"></i></a></th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="collectionTh">Edges:</th>
|
<th class="collectionTh">Edges:</th>
|
||||||
<th class="collectionTh"><input type="text" id="newGraphEdges" placeholder="Edge Collection"></input></th>
|
<th class="collectionTh"><input type="text" id="newGraphEdges" placeholder="Edge Collection"></input></th>
|
||||||
<th><a class="modalTooltips" title="The path name of the edge collection that should be used as edges. If this does not exists it will be created."><i class="icon-info-sign"></i></a></th>
|
<th><a class="modalTooltips" title="The path name of the edge collection that should be used as edges. If this does not exist it will be created."><i class="icon-info-sign"></i></a></th>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div id="databaseDiv" class="thumbnails">
|
<div id="databaseDiv" class="thumbnails">
|
||||||
<table id="databaseTable">
|
<table id="databaseTable" class="arangoDataTable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="dbThFirst">Name</td>
|
<td class="dbThFirst">Name</td>
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
<div id="delete-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>
|
||||||
|
<a class="arangoHeader">Delete Graph</a>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<span class="deleteConfirm">
|
||||||
|
Do you really want to to delete graph <%=name%>?
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button id="cancel" class="btn btn-warning">Cancel</button>
|
||||||
|
<button id="confirmDelete" class="btn btn-danger pull-right">Delete</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -13,7 +13,7 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="documentTableID" width="100%">
|
<table cellpadding="0" cellspacing="0" border="0" class="display arangoDataTable" id="documentTableID" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Attribute</th>
|
<th>Attribute</th>
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
<div class="contentIn" id="indexHeaderContent">
|
<div class="contentIn" id="indexHeaderContent">
|
||||||
<div id="indexEditView">
|
<div id="indexEditView">
|
||||||
<a>Indexes:</a>
|
<a>Indexes:</a>
|
||||||
<table id="collectionEditIndexTable">
|
<table id="collectionEditIndexTable" class="arangoDataTable">
|
||||||
<tr class="figuresHeader">
|
<tr class="figuresHeader">
|
||||||
<th class="collectionInfoTh">ID</th>
|
<th class="collectionInfoTh">ID</th>
|
||||||
<th class="collectionInfoTh">Type</th>
|
<th class="collectionInfoTh">Type</th>
|
||||||
|
|
|
@ -74,11 +74,11 @@ gs = _.sortBy(gs, sortF);
|
||||||
<%}); %>
|
<%}); %>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="controls gv_manageButtonContainer">
|
<div class="controls gv_manageButtonContainer">
|
||||||
<button type="submit" class="btn btn-primary" id="manageGraphs">Manage Graphs</button>
|
<button type="submit" class="btn btn-primary" id="manageGraphs">Manage Graphs</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane active" id="all">
|
<div class="tab-pane active" id="all">
|
||||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="logTableID">
|
<table cellpadding="0" cellspacing="0" border="0" class="display arangoDataTable" id="logTableID">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Loglevel</th>
|
<th>Loglevel</th>
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane" id="info">
|
<div class="tab-pane" id="info">
|
||||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="infoTableID" width="100%">
|
<table cellpadding="0" cellspacing="0" border="0" class="display arangoDataTable" id="infoTableID" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Loglevel</th>
|
<th>Loglevel</th>
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane" id="error">
|
<div class="tab-pane" id="error">
|
||||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="critTableID" width="100%">
|
<table cellpadding="0" cellspacing="0" border="0" class="display arangoDataTable" id="critTableID" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Loglevel</th>
|
<th>Loglevel</th>
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane" id="warning">
|
<div class="tab-pane" id="warning">
|
||||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="warnTableID" width="100%">
|
<table cellpadding="0" cellspacing="0" border="0" class="display arangoDataTable" id="warnTableID" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Loglevel</th>
|
<th>Loglevel</th>
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane" id="debug">
|
<div class="tab-pane" id="debug">
|
||||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="debugTableID" width="100%">
|
<table cellpadding="0" cellspacing="0" border="0" class="display arangoDataTable" id="debugTableID" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Loglevel</th>
|
<th>Loglevel</th>
|
||||||
|
|
|
@ -30,14 +30,16 @@
|
||||||
<div id="graphManagementDiv" class="thumbnails">
|
<div id="graphManagementDiv" class="thumbnails">
|
||||||
<div id="graphTable_wrapper" class="dataTables_wrapper" role="grid">
|
<div id="graphTable_wrapper" class="dataTables_wrapper" role="grid">
|
||||||
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0" class="display arangoDataTable dataTable" id="graphsTable">
|
<table cellpadding="0" cellspacing="0" border="0" class="display arangoDataTable dataTable noPointer" id="graphsTable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Vertices</th>
|
<th>Vertices</th>
|
||||||
<th>Edges</th>
|
<th>Edges</th>
|
||||||
<th>
|
<th>
|
||||||
<a id="addGraphButton" class="pull-right addButton"><span class="arangoicon icon_arangodb_roundplus" title="Add a graph"></span></a>
|
<a id="addGraphButton" class="pull-right addButton">
|
||||||
|
<span class="arangoicon icon_arangodb_roundplus" title="Add a graph"></span>
|
||||||
|
</a>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
/*jslint indent: 2, nomen: true, maxlen: 100, vars: true, white: true, plusplus: true*/
|
||||||
|
/*global Backbone, $, _, window, templateEngine, arangoHelper*/
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
window.DeleteGraphView = Backbone.View.extend({
|
||||||
|
|
||||||
|
el: '#modalPlaceholder',
|
||||||
|
|
||||||
|
template: templateEngine.createTemplate("deleteGraphView.ejs"),
|
||||||
|
|
||||||
|
events: {
|
||||||
|
"click #cancel": "hide",
|
||||||
|
"hidden": "hidden",
|
||||||
|
"click #confirmDelete": "deleteGraph"
|
||||||
|
},
|
||||||
|
|
||||||
|
deleteGraph: function() {
|
||||||
|
var self = this;
|
||||||
|
this.collection.get(this.name).destroy({
|
||||||
|
success: function() {
|
||||||
|
self.hide();
|
||||||
|
},
|
||||||
|
error: function(xhr, err) {
|
||||||
|
var response = JSON.parse(err.responseText),
|
||||||
|
msg = response.errorMessage;
|
||||||
|
arangoHelper.arangoError(msg);
|
||||||
|
self.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
hide: function() {
|
||||||
|
$('#delete-graph').modal('hide');
|
||||||
|
},
|
||||||
|
|
||||||
|
hidden: function () {
|
||||||
|
this.undelegateEvents();
|
||||||
|
window.App.navigate("graphManagement", {trigger: true});
|
||||||
|
},
|
||||||
|
|
||||||
|
render: function(name) {
|
||||||
|
if (!name) {
|
||||||
|
window.App.navigate("graphManagement", {trigger: true});
|
||||||
|
}
|
||||||
|
this.name = name;
|
||||||
|
$(this.el).html(this.template.render({
|
||||||
|
name: name
|
||||||
|
}));
|
||||||
|
this.delegateEvents();
|
||||||
|
$('#delete-graph').modal('show');
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}());
|
||||||
|
|
|
@ -221,7 +221,6 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.makeEditable();
|
this.makeEditable();
|
||||||
$(this.table).dataTable().fnSort([ [0, 'asc'] ]);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
addLine: function (event) {
|
addLine: function (event) {
|
||||||
|
@ -265,7 +264,7 @@
|
||||||
|
|
||||||
initTable: function () {
|
initTable: function () {
|
||||||
$(this.table).dataTable({
|
$(this.table).dataTable({
|
||||||
"aaSorting": [[ 1, "asc" ]],
|
"bSortClasses": false,
|
||||||
"bAutoWidth": false,
|
"bAutoWidth": false,
|
||||||
"bFilter": false,
|
"bFilter": false,
|
||||||
"bPaginate":false,
|
"bPaginate":false,
|
||||||
|
|
|
@ -477,7 +477,7 @@
|
||||||
|
|
||||||
initTable: function (colid, pageid) {
|
initTable: function (colid, pageid) {
|
||||||
$('#documentsTableID').dataTable({
|
$('#documentsTableID').dataTable({
|
||||||
"aaSorting": [[ 1, "asc" ]],
|
"bSortClasses": false,
|
||||||
"bFilter": false,
|
"bFilter": false,
|
||||||
"bPaginate":false,
|
"bPaginate":false,
|
||||||
"bRetrieve": true,
|
"bRetrieve": true,
|
||||||
|
|
|
@ -18,14 +18,8 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteGraph: function(e) {
|
deleteGraph: function(e) {
|
||||||
var key = $(e.target).closest("a").attr("id"),
|
var key = $(e.target).closest("a").attr("id");
|
||||||
self = this;
|
window.App.navigate("graphManagement/delete/" + key, {trigger: true});
|
||||||
// Ask user for permission
|
|
||||||
this.collection.get(key).destroy({
|
|
||||||
success: function() {
|
|
||||||
self.render();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
|
|
|
@ -114,6 +114,7 @@
|
||||||
"bFilter": false,
|
"bFilter": false,
|
||||||
"bPaginate": false,
|
"bPaginate": false,
|
||||||
"bSort" : false,
|
"bSort" : false,
|
||||||
|
"bSortClasses": false,
|
||||||
"bLengthChange": false,
|
"bLengthChange": false,
|
||||||
"bDeferRender": true,
|
"bDeferRender": true,
|
||||||
"bProcessing": true,
|
"bProcessing": true,
|
||||||
|
|
|
@ -167,6 +167,7 @@ module.exports = function(karma) {
|
||||||
'frontend/js/views/graphView.js',
|
'frontend/js/views/graphView.js',
|
||||||
'frontend/js/views/graphManagementView.js',
|
'frontend/js/views/graphManagementView.js',
|
||||||
'frontend/js/views/addNewGraphView.js',
|
'frontend/js/views/addNewGraphView.js',
|
||||||
|
'frontend/js/views/deleteGraphView.js',
|
||||||
'frontend/js/views/dbSelectionView.js',
|
'frontend/js/views/dbSelectionView.js',
|
||||||
'frontend/js/views/editListEntryView.js',
|
'frontend/js/views/editListEntryView.js',
|
||||||
'frontend/js/views/loginView.js',
|
'frontend/js/views/loginView.js',
|
||||||
|
|
|
@ -243,6 +243,7 @@
|
||||||
"shell",
|
"shell",
|
||||||
"graphManagement",
|
"graphManagement",
|
||||||
"graphManagement/add",
|
"graphManagement/add",
|
||||||
|
"graphManagement/delete/:name",
|
||||||
"applications",
|
"applications",
|
||||||
"applications/installed",
|
"applications/installed",
|
||||||
"applications/available"
|
"applications/available"
|
||||||
|
@ -373,6 +374,24 @@
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should offer the delete graph view", function() {
|
||||||
|
var name = "testGraph";
|
||||||
|
simpleNavigationCheck(
|
||||||
|
{
|
||||||
|
url: "graphManagement/delete/:name",
|
||||||
|
params: [name]
|
||||||
|
},
|
||||||
|
"DeleteGraphView",
|
||||||
|
"graphviewer-menu",
|
||||||
|
{
|
||||||
|
collection: graphsDummy
|
||||||
|
},
|
||||||
|
{
|
||||||
|
render: name
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it("should route to the applications tab", function() {
|
it("should route to the applications tab", function() {
|
||||||
simpleNavigationCheck(
|
simpleNavigationCheck(
|
||||||
"applications",
|
"applications",
|
||||||
|
|
|
@ -95,15 +95,16 @@
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should be able to delete", function() {
|
it("should navigate to graph delete view", function() {
|
||||||
|
spyOn(window.App, "navigate");
|
||||||
var lg = graphs.get("g3");
|
var lg = graphs.get("g3");
|
||||||
spyOn(lg, "destroy").andCallFake(function(opt) {
|
|
||||||
opt.success();
|
|
||||||
});
|
|
||||||
spyOn(view, "render");
|
|
||||||
$("#" + g3._key + " > span").click();
|
$("#" + g3._key + " > span").click();
|
||||||
expect(lg.destroy).toHaveBeenCalled();
|
expect(window.App.navigate).toHaveBeenCalledWith(
|
||||||
expect(view.render).toHaveBeenCalled();
|
"graphManagement/delete/" + g3._key,
|
||||||
|
{
|
||||||
|
trigger: true
|
||||||
|
}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue