Skip to content

Commit

Permalink
data connectors are imported. readme
Browse files Browse the repository at this point in the history
  • Loading branch information
countnazgul committed Sep 27, 2016
1 parent 54aedfc commit 710e348
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
Binary file modified QS-backup-and-restore-app.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion backup-and-restore.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
Backup file:
<input id="json" type="file">
<button id="go">Restore</button><input id="dataconnrestore" type="checkbox" >Restore dataconnectors?</input>
<button id="serialize">Backup</button>&nbsp; Be careful with restoring data connectors! Data connectors are never deleted through this app.
<button id="serialize">Backup</button>&nbsp; <b>Be careful restoring data connectors in server environment!!!</b> Data connectors are never deleted through this app.
<br/>
<span id="errorsCount"></span>
<br/>
Expand Down
22 changes: 10 additions & 12 deletions backup-and-restore.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ require(['jquery', 'qsocks', 'serializeApp', 'dataTables'], function ($, qsocks,
})
}
break;
case "dataconnections1":
case "dataconnections":
if ($('#dataconnrestore').prop('checked') == true) {
for (var i = 0; i < backupContent[name].length; i++) {
backupInfos.push({
Expand Down Expand Up @@ -202,11 +202,6 @@ require(['jquery', 'qsocks', 'serializeApp', 'dataTables'], function ($, qsocks,
return main.app.createDimension(d.data).then(function (msg) {
return importData.push(['dimension', d.data.qMetaDef.title, d.info.qId, 'create']);
})
} else if (d.info.qType === 'variable') {
//console.log(JSON.stringify(d.data));
return main.app.createVariableEx(d.data).then(function (msg) {
return importData.push(['variable', d.data.qName, d.info.qId, 'create']);
})
} else if (d.info.qType === 'snapshot' || d.info.qType === 'bookmark') {
return main.app.createBookmark(d.data).then(function (msg) {
var snapTitle;
Expand Down Expand Up @@ -237,17 +232,20 @@ require(['jquery', 'qsocks', 'serializeApp', 'dataTables'], function ($, qsocks,
})
}
else if (d.data.qProperty) {
console.log('t')
return main.app.createObject(d.data.qProperty).then(function (handle) {
return handle.setFullPropertyTree(d.data).then(function () {
return importData.push([d.info.qType, '', d.info.qId, 'create']);
});
})
} else if (d.info.qType === 'variable') {
//console.log(JSON.stringify(d.data));
return main.app.createVariableEx(d.data).then(function (msg) {
return importData.push(['variable', d.data.qName, d.info.qId, 'create']);
})
}
})).catch(function (error) {
importErrors++;
//importData.push([d.info.qType, d.data.qConnection.qName, d.info.qId, 'Error: ' + error.message]);
console.log(error)
//console.log(error)
})
}

Expand Down Expand Up @@ -423,7 +421,7 @@ require(['jquery', 'qsocks', 'serializeApp', 'dataTables'], function ($, qsocks,
$('#errorsCount').text('');
$('#openDoc').text('No active document');
$('#json').prop('disabled', true);
$('#json').val(null);
$('#json').val(null);
$('#prestatus').html('');
var table = $('#resultTable').DataTable();
table
Expand Down Expand Up @@ -563,7 +561,7 @@ require(['jquery', 'qsocks', 'serializeApp', 'dataTables'], function ($, qsocks,
setAppProperties()
])
.then(function (results) {
//main.app.doSave().then(function (results) {
main.app.doSave().then(function (results) {
GenerateTable();
//$('#json').replaceWith($("#json").clone());
$('#go').prop('disabled', true);
Expand All @@ -574,7 +572,7 @@ require(['jquery', 'qsocks', 'serializeApp', 'dataTables'], function ($, qsocks,
main.global.connection.ws.close();
main = {};
$('#json').val(null);
//});
});
});
})

Expand Down
2 changes: 1 addition & 1 deletion backup-and-restore.qext
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "mashup",
"name": "Backup and Restore",
"version": "0.9.9",
"version": "0.10.0",
"description": "Bachup and restore QS app",
"preview": "images/preview.png",
"homepage": "https://github.com/countnazgul/QS-backup-and-restore-app",
Expand Down

0 comments on commit 710e348

Please sign in to comment.