aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties2
-rw-r--r--sonar-server/src/main/java/org/sonar/server/qualitygate/ws/QgateAppHandler.java2
-rw-r--r--sonar-server/src/main/webapp/js/templates/quality-gates.js60
-rw-r--r--sonar-server/src/main/webapp/templates/quality-gates/quality-gate-edit.hbs6
4 files changed, 15 insertions, 55 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
index 2ab11ccf802..6ba967a3998 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
@@ -1559,7 +1559,7 @@ quality_profiles.copy_new_name=New name
#------------------------------------------------------------------------------
quality_gates.noQualityGates=No Quality Gates
-quality_gates.add=Create Quality Gate
+quality_gates.create=Create Quality Gate
quality_gates.rename=Rename Quality Gate:
quality_gates.copy=Copy Quality Gate:
quality_gates.conditions=Conditions
diff --git a/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/QgateAppHandler.java b/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/QgateAppHandler.java
index 47f39e88dbd..5faf20aa64c 100644
--- a/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/QgateAppHandler.java
+++ b/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/QgateAppHandler.java
@@ -48,10 +48,10 @@ public class QgateAppHandler implements RequestHandler {
"delete",
"more",
"name",
- "quality_gates.add",
"quality_gates.add_condition",
"quality_gates.conditions",
"quality_gates.copy",
+ "quality_gates.create",
"quality_gates.health_icons",
"quality_gates.introduction",
"quality_gates.no_conditions",
diff --git a/sonar-server/src/main/webapp/js/templates/quality-gates.js b/sonar-server/src/main/webapp/js/templates/quality-gates.js
index bfb6744a218..2ba729006af 100644
--- a/sonar-server/src/main/webapp/js/templates/quality-gates.js
+++ b/sonar-server/src/main/webapp/js/templates/quality-gates.js
@@ -410,41 +410,6 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
function program1(depth0,data) {
- var buffer = "", stack1, helper, options;
- buffer += "<h2>"
- + escapeExpression((helper = helpers.t || (depth0 && depth0.t),options={hash:{},data:data},helper ? helper.call(depth0, "quality_gates.rename", options) : helperMissing.call(depth0, "t", "quality_gates.rename", options)))
- + " ";
- if (helper = helpers.name) { stack1 = helper.call(depth0, {hash:{},data:data}); }
- else { helper = (depth0 && depth0.name); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
- buffer += escapeExpression(stack1)
- + "</h2>";
- return buffer;
- }
-
-function program3(depth0,data) {
-
- var buffer = "", stack1, helper, options;
- buffer += "<h2>"
- + escapeExpression((helper = helpers.t || (depth0 && depth0.t),options={hash:{},data:data},helper ? helper.call(depth0, "quality_gates.copy", options) : helperMissing.call(depth0, "t", "quality_gates.copy", options)))
- + " ";
- if (helper = helpers.name) { stack1 = helper.call(depth0, {hash:{},data:data}); }
- else { helper = (depth0 && depth0.name); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
- buffer += escapeExpression(stack1)
- + "</h2>";
- return buffer;
- }
-
-function program5(depth0,data) {
-
- var buffer = "", helper, options;
- buffer += "<h2>"
- + escapeExpression((helper = helpers.t || (depth0 && depth0.t),options={hash:{},data:data},helper ? helper.call(depth0, "quality_gates.add", options) : helperMissing.call(depth0, "t", "quality_gates.add", options)))
- + "</h2>";
- return buffer;
- }
-
-function program7(depth0,data) {
-
var buffer = "", helper, options;
buffer += "<button>"
+ escapeExpression((helper = helpers.t || (depth0 && depth0.t),options={hash:{},data:data},helper ? helper.call(depth0, "save", options) : helperMissing.call(depth0, "t", "save", options)))
@@ -452,7 +417,7 @@ function program7(depth0,data) {
return buffer;
}
-function program9(depth0,data) {
+function program3(depth0,data) {
var buffer = "", helper, options;
buffer += "<button>"
@@ -461,7 +426,7 @@ function program9(depth0,data) {
return buffer;
}
-function program11(depth0,data) {
+function program5(depth0,data) {
var buffer = "", helper, options;
buffer += "<button>"
@@ -470,7 +435,15 @@ function program11(depth0,data) {
return buffer;
}
- buffer += "<form>\n <div class=\"modal-head\">\n ";
+ buffer += "<form>\n <div class=\"modal-head\">\n <h2>"
+ + escapeExpression((helper = helpers.t || (depth0 && depth0.t),options={hash:{},data:data},helper ? helper.call(depth0, "quality_gates", (depth0 && depth0.method), options) : helperMissing.call(depth0, "t", "quality_gates", (depth0 && depth0.method), options)))
+ + "</h2>\n </div>\n\n <div class=\"modal-body\">\n <div class=\"modal-error\"></div>\n <div class=\"modal-field\">\n <label for=\"quality-gate-edit-name\">"
+ + escapeExpression((helper = helpers.t || (depth0 && depth0.t),options={hash:{},data:data},helper ? helper.call(depth0, "name", options) : helperMissing.call(depth0, "t", "name", options)))
+ + " <em class=\"mandatory\">*</em></label>\n <input id=\"quality-gate-edit-name\" type=\"text\" size=\"50\" maxlength=\"100\" value=\"";
+ if (helper = helpers.name) { stack1 = helper.call(depth0, {hash:{},data:data}); }
+ else { helper = (depth0 && depth0.name); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
+ buffer += escapeExpression(stack1)
+ + "\">\n </div>\n </div>\n\n <div class=\"modal-foot\">\n ";
stack1 = (helper = helpers.eq || (depth0 && depth0.eq),options={hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data},helper ? helper.call(depth0, (depth0 && depth0.method), "rename", options) : helperMissing.call(depth0, "eq", (depth0 && depth0.method), "rename", options));
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n ";
@@ -479,17 +452,6 @@ function program11(depth0,data) {
buffer += "\n ";
stack1 = (helper = helpers.eq || (depth0 && depth0.eq),options={hash:{},inverse:self.noop,fn:self.program(5, program5, data),data:data},helper ? helper.call(depth0, (depth0 && depth0.method), "create", options) : helperMissing.call(depth0, "eq", (depth0 && depth0.method), "create", options));
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n </div>\n\n <div class=\"modal-body\">\n <div class=\"modal-error\"></div>\n <div class=\"modal-field\">\n <label for=\"quality-gate-edit-name\">"
- + escapeExpression((helper = helpers.t || (depth0 && depth0.t),options={hash:{},data:data},helper ? helper.call(depth0, "name", options) : helperMissing.call(depth0, "t", "name", options)))
- + " <em class=\"mandatory\">*</em></label>\n <input id=\"quality-gate-edit-name\" type=\"text\" size=\"50\" maxlength=\"100\">\n </div>\n </div>\n\n <div class=\"modal-foot\">\n ";
- stack1 = (helper = helpers.eq || (depth0 && depth0.eq),options={hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data},helper ? helper.call(depth0, (depth0 && depth0.method), "rename", options) : helperMissing.call(depth0, "eq", (depth0 && depth0.method), "rename", options));
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n ";
- stack1 = (helper = helpers.eq || (depth0 && depth0.eq),options={hash:{},inverse:self.noop,fn:self.program(9, program9, data),data:data},helper ? helper.call(depth0, (depth0 && depth0.method), "copy", options) : helperMissing.call(depth0, "eq", (depth0 && depth0.method), "copy", options));
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n ";
- stack1 = (helper = helpers.eq || (depth0 && depth0.eq),options={hash:{},inverse:self.noop,fn:self.program(11, program11, data),data:data},helper ? helper.call(depth0, (depth0 && depth0.method), "create", options) : helperMissing.call(depth0, "eq", (depth0 && depth0.method), "create", options));
- if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n <a id=\"quality-gate-cancel-create\" class=\"action\">"
+ escapeExpression((helper = helpers.t || (depth0 && depth0.t),options={hash:{},data:data},helper ? helper.call(depth0, "cancel", options) : helperMissing.call(depth0, "t", "cancel", options)))
+ "</a>\n </div>\n</form>";
diff --git a/sonar-server/src/main/webapp/templates/quality-gates/quality-gate-edit.hbs b/sonar-server/src/main/webapp/templates/quality-gates/quality-gate-edit.hbs
index 658b9326cbf..6c190b6d242 100644
--- a/sonar-server/src/main/webapp/templates/quality-gates/quality-gate-edit.hbs
+++ b/sonar-server/src/main/webapp/templates/quality-gates/quality-gate-edit.hbs
@@ -1,15 +1,13 @@
<form>
<div class="modal-head">
- {{#eq method "rename"}}<h2>{{t 'quality_gates.rename'}} {{name}}</h2>{{/eq}}
- {{#eq method "copy"}}<h2>{{t 'quality_gates.copy'}} {{name}}</h2>{{/eq}}
- {{#eq method "create"}}<h2>{{t 'quality_gates.add'}}</h2>{{/eq}}
+ <h2>{{t 'quality_gates' method }}</h2>
</div>
<div class="modal-body">
<div class="modal-error"></div>
<div class="modal-field">
<label for="quality-gate-edit-name">{{t 'name'}} <em class="mandatory">*</em></label>
- <input id="quality-gate-edit-name" type="text" size="50" maxlength="100">
+ <input id="quality-gate-edit-name" type="text" size="50" maxlength="100" value="{{name}}">
</div>
</div>