Skip to content

Commit

Permalink
Removed the query error
Browse files Browse the repository at this point in the history
  • Loading branch information
NoorMuhammad1 committed Jun 23, 2024
1 parent 375e149 commit b9a499a
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@

node_modules/

app/bundle.js
app/bundle.js

.env

package-lock.json
26 changes: 26 additions & 0 deletions app/js/backbone-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -3300,6 +3300,31 @@ var FileSaveView = Backbone.View.extend({
}
});


/*
Active Tab elements push success
*/
var ActiveTabPushSuccessView=Backbone.View.extend({
initialize: function () {
var self= this;
self.template = _.template($('#active-tab-push-success-template').html());
},
render:function(){
var self= this;
self.template = _.template($('#active-tab-push-success-template').html());


$(self.el).html(self.template);
$(self.el).modal('show');

$(document).off("click", "#active-tab-push-success-confirm").on("click", "#active-tab-push-success-confirm", function (evt) {
$(self.el).modal('toggle');
});

return this;
},
});

/*
User Preferences View (Style, Map Properties, Layout etc)
*/
Expand Down Expand Up @@ -5837,6 +5862,7 @@ module.exports = {
MapTabRearrangementPanel: MapTabRearrangementPanel,
experimentTabPanel: experimentTabPanel,
//GeneralPropertiesView: GeneralPropertiesView,
ActiveTabPushSuccessView: ActiveTabPushSuccessView,
NeighborhoodQueryView: NeighborhoodQueryView,
NeighborhoodQueryViewLocalDB: NeighborhoodQueryViewLocalDB,
PathsBetweenQueryView: PathsBetweenQueryView,
Expand Down
9 changes: 7 additions & 2 deletions app/js/database-utilities.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var nodeMatchUtilities = require("./node-match-utilities");
var graphALgos = require("./graph-algos");
var appUtilities = require("./app-utilities");
const { ActiveTabPushSuccessView } = require("./backbone-views");

var databaseUtilities = {
enableDatabase: true,
Expand Down Expand Up @@ -422,7 +423,7 @@ var databaseUtilities = {
}
}
}

console.log('data',data);
if (edges) {
for (let i = 0; i < edges.length; i++) {
databaseUtilities.edgesInDB[
Expand All @@ -434,7 +435,11 @@ var databaseUtilities = {
] = edges[i].identity.low;
}
}

console.log("hiii");
new ActiveTabPushSuccessView({
el:'#prompt-confirmation-table',
}).render();
console.log("hiii2");
},
error: function (req, status, err) {
console.error("Error running query", status, err);
Expand Down
6 changes: 3 additions & 3 deletions app/js/node-match-utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ var nodeMatchUtilities = {
return `${name}.class = ${nodeData}.class`;
},
matchProcessNodesSource: function (name, nodeData) {
return `( ${name}.source_0 = ${nodeData}.source_0) and (NOT EXISTS(${name}.source_1 ) or ${name}.source_1 = ${nodeData}.source_1)`;
return `( ${name}.source_0 = ${nodeData}.source_0) and ((${name}.source_1 ) IS NULL or ${name}.source_1 = ${nodeData}.source_1)`;
},
matchProcessNodesTarget: function (name, nodeData) {
return `( ${name}.target_0 = ${nodeData}.target_0) and (NOT EXISTS(${name}.target_1 ) or ${name}.target_1 = ${nodeData}.target_1)`;
return `( ${name}.target_0 = ${nodeData}.target_0) and ((${name}.target_1 ) IS NULL or ${name}.target_1 = ${nodeData}.target_1)`;
},
matchProcessNodesModifier: function (name, nodeData) {
return `( ${name}.modifier_0 = ${nodeData}.modifier_0) and (NOT EXISTS(${name}.modifier_1 ) or ${name}.modifier_1 = ${nodeData}.modifier_1)`;
return `( ${name}.modifier_0 = ${nodeData}.modifier_0) and ((${name}.modifier_1 ) IS NULL or ${name}.modifier_1 = ${nodeData}.modifier_1)`;
},
matchEdgesSource: function (name, nodeData) {
return `${name}.source = ${nodeData}.source`;
Expand Down
36 changes: 36 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,10 @@
<!-- load dialog will be shown here-->
</div>

<div id="active-tab-push-success-table" tabindex="-1" class="modal fade" role="dialog">
<!-- confirmation dialog will be shown here-->
</div>

<div id="prompt-confirmation-table" tabindex="-1" class="modal fade" role="dialog">
<!-- confirmation dialog will be shown here-->
</div>
Expand Down Expand Up @@ -2477,6 +2481,38 @@ <h4 class="modal-title">Error</h4>
</div>
</script>

<!-- Push Active Tab Success result -->
<script type="text/template" id="active-tab-push-success-template">
<div class="modal-dialog sbgn-modal-dialog" style="width: 300px;">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Info</h4>
</div>
<div class="modal-body">
<table class="table-condensed layout-table dialog-table" style="margin: auto;">
<tbody>
<tr>
<th style="padding-left: 0px;" align="left">
<span class="add-on layout-text">Pushed successfully.</span>
</th>
</tr>

<tr id="active-tab-push-success-buttons" style="padding-bottom: 0px; margin-bottom: 0px;">
<td>
</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer" style="text-align: center">
<button id="active-tab-push-success-confirm" class="btn btn-default">OK</button>
</div>
</div>
</div>
</script>


<!-- Empty query result -->
<script type="text/template" id="prompt-emptyQueryResult-template">
<div class="modal-dialog sbgn-modal-dialog" style="width: 300px;">
Expand Down

0 comments on commit b9a499a

Please sign in to comment.