Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
Merge pull request #635 from mcvidanagama/master
Browse files Browse the repository at this point in the history
fixing APPFAC-3446
  • Loading branch information
mcvidanagama committed Sep 22, 2015
2 parents 7d8e927 + e6dde69 commit aed91ec
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,10 @@ var log=new Log();
var applicationDescription = replaceSpecialCharacters(request.getParameter("applicationDescription"));
var applicationType = request.getParameter("appType");
var repositoryType = request.getParameter("repositoryType");
log.info(repositoryType)
var repoAccessibility = request.getParameter("repoAccessibility");
var repoAccessibility = request.getParameter("repoAccessibility");
var userName = request.getParameter("userName");
var applicationURL = request.getParameter("applicationURL");
var appTypeDisplayName1 = request.getParameter("appTypeDisplayName");
log.info("applicationType + " + applicationType);
var response = {};
if (jagg.module("permission").isUserAccessGrantedForPlatform(PERMISSION_APPLICATION_CREATE)) {
try {
Expand All @@ -64,15 +62,12 @@ var log=new Log();
// is created.
if(!isApplicationDuplicateWithSession(applicationKey,applicationName, repositoryType,
applicationDescription, applicationType, userName,appTypeDisplayName)){
log.info("inside if 1")
for (var provider in repositoryProviders) {
if (repositoryType == repositoryProviders[provider]) {
log.info("repositoryType if 2")
result = mod.createApplicationBPEL(applicationName, applicationKey,
applicationDescription, applicationType,
repoAccessibility, repositoryType, userName,
applicationURL, 'trunk', LIFE_CYCLE_NAME);
log.info(result)
message = "Application was created under Repository type ".concat(repositoryType);
response.message = message;
response.result = 1;
Expand All @@ -85,7 +80,8 @@ var log=new Log();
response.message = message;
response.result = 0;
}

// this session parameter is to , show the application creation started message only once
session.put("appCreationStartedFlag_" + applicationKey, true);
print(response);

} catch (e) {
Expand Down Expand Up @@ -126,6 +122,8 @@ var log=new Log();
log.error(e);
status = generateValidationResponse(false, msg);
}
// this session parameter is to , show the application creation started message only once
session.put("appCreationStartedFlag_" + applicationKey, true);
print(status);
} else if (action == "uploadExistingApplication") {
var registryMod = jagg.module("registry");
Expand Down Expand Up @@ -190,6 +188,8 @@ var log=new Log();
response.message = "You don't have permission to create application";
response.result = 0;
}
// this session parameter is to , show the application creation started message only once
session.put("appCreationStartedFlag_" + applicationKey, true);
print(response);

} catch (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var popoverAdded = false;
// page initialization
$(document).ready(function() {
// show the application creation status as a notification
if("created" == userAction) {
if(appCreationStartedFlag) {
showTopMessage("Application creation started.");
}
// set current version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
var servicePath = appFacURL + getProperty(WEB_CONTEXT_ROOT);
var iconUrl = appFacURL + getProperty(WEB_CONTEXT_ROOT) + "/site/blocks/application/get/ajax/list.jag?action=getAppIcon&applicationKey=" + applicationKey;
var applicationInfo = outputs.applicationInfo;

var appCreationStartedFlag = session.get("appCreationStartedFlag_" + applicationKey);
session.remove("appCreationStartedFlag_" + applicationKey);
var appName = "";
if(applicationInfo){
if (applicationInfo.name) {
Expand Down Expand Up @@ -57,6 +58,8 @@
var fgdmAllowedStage = JSON.parse('<%=stringify(outputs.fineGrainedDomainMappingAllowedStage)%>');
var previousVersion = "<%=previousVersion%>";
var lifeCycleName = "<%=LIFE_CYCLE_NAME%>";
var appCreationStartedFlag = "<%=appCreationStartedFlag%>";
appCreationStartedFlag = JSON.parse(appCreationStartedFlag);
</script>

<!-- end of setting global javascript variable -->
Expand Down

0 comments on commit aed91ec

Please sign in to comment.