template registration error with connection ports
function buildTemplateFlowData() {
self.loadingFlowData = true;
var assignedPortIds = [];
+
_.each(self.model.reusableTemplateConnections, function (conn) {
var inputPort = conn.inputPortDisplayName;
var port = self.connectionMap[inputPort];
if (assignedPortIds.length > 0) {
selectedPortIds = assignedPortIds.join(",");
}
-
+ //only attempt to query if we have connections set
+ var hasPortConnections = (self.model.reusableTemplateConnections == null || self.model.reusableTemplateConnections.length ==0 )|| (self.model.reusableTemplateConnections != null && self.model.reusableTemplateConnections.length >0 && assignedPortIds.length ==self.model.reusableTemplateConnections.length);
+ if(hasPortConnections) {
RegisterTemplateService.getNiFiTemplateFlowInformation(self.model.nifiTemplateId, self.model.reusableTemplateConnections).then(function (response) {
var map = {};
}
});
-
}
self.loadingFlowData = false;
});
+ }
+ else {
+ self.loadingFlowData = false;
+ }
};
