Skip to content

Commit

Permalink
Merge branch 'failys/master' into correct-sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanjenx committed May 30, 2017
2 parents 4d31da2 + f3e33d0 commit b2a801d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cairis/misc/DataFlowDiagram.py
Expand Up @@ -81,7 +81,7 @@ def graph(self):

if ((fromName,toName) not in edgeSet):
objtUrl = 'dataflow#' + dfName + '#' + self.theEnvironmentName
df = pydot.Edge(fromName,toName,dir='forward',label=dfName,arrowhead='vee',weight='1',fontname=self.fontName,fontsize=self.fontSize,URL=objtUrl)
df = pydot.Edge(fromName,toName,dir='forward',label=dfName,arrowhead='vee',fontname=self.fontName,fontsize=self.fontSize,URL=objtUrl)
self.theGraph.add_edge(df)
return self.layout()
except DatabaseProxyException, errTxt:
Expand Down
15 changes: 10 additions & 5 deletions cairis/sql/procs.sql
Expand Up @@ -23382,32 +23382,37 @@ begin
select id into dfId from dataflow where name = oldDfName and environment_id = oldEnvId limit 1;

update dataflow set environment_id = envId, name = newDfName where id = dfId;
delete from dataflow_process_process where dataflow_id = dfId;
delete from dataflow_entity_process where dataflow_id = dfId;
delete from dataflow_process_entity where dataflow_id = dfId;
delete from dataflow_datastore_process where dataflow_id = dfId;
delete from dataflow_process_datastore where dataflow_id = dfId;

if fromType = 'process' and toType = 'process'
then
select id into fromId from usecase where name = fromName limit 1;
select id into toId from usecase where name = toName limit 1;
update dataflow_process_process set from_id = fromId, to_id = toId where dataflow_id = dfId;
insert into dataflow_process_process(dataflow_id,from_id,to_id) values(dfId,fromId,toId);
elseif fromType = 'entity' and toType = 'process'
then
select id into fromId from asset where name = fromName limit 1;
select id into toId from usecase where name = toName limit 1;
update dataflow_entity_process set from_id = fromId, to_id = toId where dataflow_id = dfId;
insert into dataflow_entity_process(dataflow_id,from_id,to_id) values(dfId,fromId,toId);
elseif fromType = 'process' and toType = 'entity'
then
select id into fromId from usecase where name = fromName limit 1;
select id into toId from asset where name = toName limit 1;
update dataflow_process_entity set from_id = fromId, to_id = toId where dataflow_id = dfId;
insert into dataflow_process_entity(dataflow_id,from_id,to_id) values(dfId,fromId,toId);
elseif fromType = 'datastore' and toType = 'process'
then
select id into fromId from asset where name = fromName limit 1;
select id into toId from usecase where name = toName limit 1;
update dataflow_datastore_process set from_id = fromId, to_id = toId where dataflow_id = dfId;
insert into dataflow_datastore_process(dataflow_id,from_id,to_id) values(dfId,fromId,toId);
elseif fromType = 'process' and toType = 'datastore'
then
select id into fromId from usecase where name = fromName limit 1;
select id into toId from asset where name = toName limit 1;
update dataflow_process_datastore set from_id = fromId, to_id = toId where dataflow_id = dfId;
insert into dataflow_process_datastore(dataflow_id,from_id,to_id) values(dfId,fromId,toId);
end if;

end
Expand Down
2 changes: 1 addition & 1 deletion cairis/web/dist/js/cairis/fileExport.js
Expand Up @@ -20,7 +20,7 @@
'use strict';

$("#exportClick").click(function () {
var exportUrl = serverIP + "/api/export/file?filename=model.xml";
var exportUrl = serverIP + "/api/export/file";
showLoading();
$.ajax({
type: "GET",
Expand Down
4 changes: 2 additions & 2 deletions cairis/web/dist/js/objects/jsonDefaultObjects.js
Expand Up @@ -627,8 +627,8 @@ var dataflowDefault = {
"theName" : "",
"theEnvironmentName" : "",
"theFromName" : "",
"theFromType" : "",
"theFromType" : "entity",
"theToName" : "",
"theToType" : "",
"theToType" : "process",
"theAssets" : []
};

0 comments on commit b2a801d

Please sign in to comment.