Showing
6 changed files
with
15 additions
and
15 deletions
@@ -9,7 +9,7 @@ public class DockerProjectModel { | @@ -9,7 +9,7 @@ public class DockerProjectModel { | ||
9 | private String projectName; | 9 | private String projectName; |
10 | 10 | ||
11 | //项目类型 | 11 | //项目类型 |
12 | - private String projectType; | 12 | + private String projectJobType; |
13 | 13 | ||
14 | private String dockerProjectName; | 14 | private String dockerProjectName; |
15 | 15 |
@@ -14,7 +14,7 @@ public class DockerJenkinsReq { | @@ -14,7 +14,7 @@ public class DockerJenkinsReq { | ||
14 | private String userName; | 14 | private String userName; |
15 | private String userMail; | 15 | private String userMail; |
16 | private String releaseWorkId; | 16 | private String releaseWorkId; |
17 | - private String projectType; | 17 | + private String projectJobType; |
18 | 18 | ||
19 | 19 | ||
20 | //docker qlcoud | 20 | //docker qlcoud |
@@ -8,7 +8,7 @@ import java.util.Set; | @@ -8,7 +8,7 @@ import java.util.Set; | ||
8 | public class ProjectEnvironment { | 8 | public class ProjectEnvironment { |
9 | 9 | ||
10 | private static String[] dockerEnvironments = {"ONLINE-QCLOUD","GRAY-QCLOUD"}; | 10 | private static String[] dockerEnvironments = {"ONLINE-QCLOUD","GRAY-QCLOUD"}; |
11 | - private static String[] dockerProjectTypes = {"NODE","JAVA"}; | 11 | + private static String[] dockerProjectJobTypes = {"Docker-Deploy-Node","Docker-Deploy-Java"}; |
12 | private static Map<String,String> map = new HashMap<>(); | 12 | private static Map<String,String> map = new HashMap<>(); |
13 | 13 | ||
14 | static{ | 14 | static{ |
@@ -35,8 +35,8 @@ public class ProjectEnvironment { | @@ -35,8 +35,8 @@ public class ProjectEnvironment { | ||
35 | return dockerEnvironments; | 35 | return dockerEnvironments; |
36 | } | 36 | } |
37 | 37 | ||
38 | - public static String[] getDockerProjectTypes(){ | ||
39 | - return dockerProjectTypes; | 38 | + public static String[] getDockerProjectJobTypes(){ |
39 | + return dockerProjectJobTypes; | ||
40 | } | 40 | } |
41 | 41 | ||
42 | } | 42 | } |
@@ -38,7 +38,7 @@ public class DockerBuildCtrl { | @@ -38,7 +38,7 @@ public class DockerBuildCtrl { | ||
38 | 38 | ||
39 | } | 39 | } |
40 | model.addAttribute("environments", ProjectEnvironment.getDockerEnvironments()); | 40 | model.addAttribute("environments", ProjectEnvironment.getDockerEnvironments()); |
41 | - model.addAttribute("projectTypes", ProjectEnvironment.getDockerProjectTypes()); | 41 | + model.addAttribute("projectJobTypes", ProjectEnvironment.getDockerProjectJobTypes()); |
42 | return new ModelAndView("project/docker_project"); | 42 | return new ModelAndView("project/docker_project"); |
43 | } | 43 | } |
44 | 44 | ||
@@ -49,11 +49,11 @@ public class DockerBuildCtrl { | @@ -49,11 +49,11 @@ public class DockerBuildCtrl { | ||
49 | */ | 49 | */ |
50 | @RequestMapping(value = "/getProjects") | 50 | @RequestMapping(value = "/getProjects") |
51 | @ResponseBody | 51 | @ResponseBody |
52 | - public String getProjects(String projectType) { | 52 | + public String getProjects(String projectJobType) { |
53 | try { | 53 | try { |
54 | Map map = new HashMap<>(); | 54 | Map map = new HashMap<>(); |
55 | - map.put("projectType",projectType); | ||
56 | - BaseResponse response=httpRestClient.defaultGet("/dockerProject/getDockerProjectByType", BaseResponse.class, map); | 55 | + map.put("projectJobType",projectJobType); |
56 | + BaseResponse response=httpRestClient.defaultGet("/dockerProject/getDockerProjectByJobType", BaseResponse.class, map); | ||
57 | return JSONArray.toJSON(response.getData()).toString(); | 57 | return JSONArray.toJSON(response.getData()).toString(); |
58 | } catch (Exception ex) { | 58 | } catch (Exception ex) { |
59 | return "failed"; | 59 | return "failed"; |
@@ -250,7 +250,7 @@ | @@ -250,7 +250,7 @@ | ||
250 | type: 'POST', | 250 | type: 'POST', |
251 | dataType: 'json', | 251 | dataType: 'json', |
252 | data:{ | 252 | data:{ |
253 | - projectType:dockerProject.projectType, | 253 | + projectJobType:dockerProject.projectJobType, |
254 | appNames:dockerProject.projectName, | 254 | appNames:dockerProject.projectName, |
255 | nodeEnv:$("#environment_name").val(), | 255 | nodeEnv:$("#environment_name").val(), |
256 | branch:$("#branch_name").val(), | 256 | branch:$("#branch_name").val(), |
@@ -81,13 +81,13 @@ | @@ -81,13 +81,13 @@ | ||
81 | <label class="col-sm-1 control-label">项目类别</label> | 81 | <label class="col-sm-1 control-label">项目类别</label> |
82 | 82 | ||
83 | <div class="col-sm-8"> | 83 | <div class="col-sm-8"> |
84 | - <c:forEach items="${projectTypes }" var="projType" varStatus="projTypeStatus"> | 84 | + <c:forEach items="${projectJobTypes }" var="projJobType" varStatus="projJobTypeStatus"> |
85 | <div class="rdio rdio-default"> | 85 | <div class="rdio rdio-default"> |
86 | - <input type="radio" name="projectTypes" id="${projType }" value="${projType }" | 86 | + <input type="radio" name="projectJobTypes" id="${projJobType }" value="${projJobType }" |
87 | onclick="getProjects()" | 87 | onclick="getProjects()" |
88 | - <c:if test="${projTypeStatus.index==0}">checked="checked"</c:if> | 88 | + <c:if test="${projJobTypeStatus.index==0}">checked="checked"</c:if> |
89 | /> | 89 | /> |
90 | - <label for="${projType }">${projType }</label> | 90 | + <label for="${projJobType }">${projJobType }</label> |
91 | </div> | 91 | </div> |
92 | </c:forEach> | 92 | </c:forEach> |
93 | </div> | 93 | </div> |
@@ -227,7 +227,7 @@ | @@ -227,7 +227,7 @@ | ||
227 | type: 'post', | 227 | type: 'post', |
228 | url: contextPath + "dockerBuild/getProjects", | 228 | url: contextPath + "dockerBuild/getProjects", |
229 | data: { | 229 | data: { |
230 | - projectType:$("input[name='projectTypes']:checked").val() | 230 | + projectJobType:$("input[name='projectJobTypes']:checked").val() |
231 | }, | 231 | }, |
232 | dataType: 'json', | 232 | dataType: 'json', |
233 | success: function (data) { | 233 | success: function (data) { |
-
Please register or login to post a comment