diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-01-14 14:52:25 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-01-14 14:52:25 +0100 |
commit | 046c6519475f26ef6bf9b6f177c644a491311424 (patch) | |
tree | 0447e0f0a007ef57562a1285b0c09db42dfcb381 | |
parent | 44d04254b6b8ff07a0d9e6f871a8f6ff3f98461e (diff) | |
download | sonarqube-046c6519475f26ef6bf9b6f177c644a491311424.tar.gz sonarqube-046c6519475f26ef6bf9b6f177c644a491311424.zip |
SONAR-4610 Highlight product name in red when license details do not match product
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_type_LICENSE.html.erb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_type_LICENSE.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_type_LICENSE.html.erb index 346c555d249..b28e4cd0efc 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_type_LICENSE.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_type_LICENSE.html.erb @@ -3,6 +3,10 @@ <% else license = controller.java_facade.parseLicense(value) + product = license.getProduct() || '-' + # super-hack here + # should be avoided in the future + does_product_match = property.key == "sonar.#{product}.license.secured" %> <div class="width100"> <textarea rows="6" name="<%= name -%>" id="<%= id -%>" style="float: left;width: 390px"><%= h value -%></textarea> @@ -10,8 +14,8 @@ <div style="margin-left: 400px"> <table> <tr> - <td class="form-key-cell">Product:</td> - <td class="form-val-cell"><%= license.getProduct() || '-' -%></td> + <td class="form-key-cell <% if !does_product_match -%>bg-danger<% end -%>">Product:</td> + <td class="form-val-cell <% if !does_product_match -%>bg-danger<% end -%>"><%= product -%></td> </tr> <tr> <td class="form-key-cell">Organization:</td> @@ -43,7 +47,7 @@ <span class='error'><%= license.getServer() -%></span> <% else %> <%= license.getServer() || '-' -%> - <% end %> + <% end %> </td> </tr> <% license.additionalProperties().each do |k,v| -%> @@ -55,4 +59,4 @@ </table> </div> </div> -<% end %>
\ No newline at end of file +<% end %> |