diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-11 17:47:58 +0200 |
---|---|---|
committer | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-12 10:23:25 +0200 |
commit | 97b33c59ada3e65c74b2acb3922f8563a2e53eac (patch) | |
tree | e731731dce055cb9ae4837517677df27abc08dc7 /server/sonar-web/src/main/js | |
parent | effa3c890ad607467c8a88f6ae5f34d231b512ba (diff) | |
download | sonarqube-97b33c59ada3e65c74b2acb3922f8563a2e53eac.tar.gz sonarqube-97b33c59ada3e65c74b2acb3922f8563a2e53eac.zip |
SONAR-8972 Limit the input length when creating custom metrics
Diffstat (limited to 'server/sonar-web/src/main/js')
3 files changed, 9 insertions, 9 deletions
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-form.hbs b/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-form.hbs index 884cad7e08d..48f42005b6d 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-form.hbs +++ b/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-form.hbs @@ -32,7 +32,7 @@ </div> <div class="modal-foot"> <button id="create-custom-measure-submit" {{#unless canCreateMetric}}disabled{{/unless}}> - {{#if id}}{{t 'update_verb'}}{{else}}{{t 'create_verb'}}{{/if}} + {{#if id}}{{t 'update_verb'}}{{else}}{{t 'create'}}{{/if}} </button> <a href="#" class="js-modal-close" id="create-custom-measure-cancel">{{t 'cancel'}}</a> </div> diff --git a/server/sonar-web/src/main/js/apps/metrics/templates/metrics-form.hbs b/server/sonar-web/src/main/js/apps/metrics/templates/metrics-form.hbs index 55c9c9d4936..638c96f654d 100644 --- a/server/sonar-web/src/main/js/apps/metrics/templates/metrics-form.hbs +++ b/server/sonar-web/src/main/js/apps/metrics/templates/metrics-form.hbs @@ -6,15 +6,15 @@ <div class="js-modal-messages"></div> <div class="modal-field"> <label for="create-metric-key">{{t 'key'}}<em class="mandatory">*</em></label> - <input id="create-metric-key" name="key" type="text" maxlength="200" required value="{{key}}"> + <input id="create-metric-key" name="key" type="text" maxlength="64" required value="{{key}}"> </div> <div class="modal-field"> <label for="create-metric-name">{{t 'name'}}<em class="mandatory">*</em></label> - <input id="create-metric-name" name="name" type="text" maxlength="200" required value="{{name}}"> + <input id="create-metric-name" name="name" type="text" maxlength="64" required value="{{name}}"> </div> <div class="modal-field"> <label for="create-metric-description">{{t 'description'}}</label> - <textarea id="create-metric-description" name="description">{{description}}</textarea> + <textarea id="create-metric-description" maxlength="255" name="description">{{description}}</textarea> </div> <div class="modal-field"> <label for="create-metric-domain">{{t 'custom_metrics.domain'}}</label> diff --git a/server/sonar-web/src/main/js/apps/metrics/templates/metrics-list-item.hbs b/server/sonar-web/src/main/js/apps/metrics/templates/metrics-list-item.hbs index cb25af27f94..4f696e1d491 100644 --- a/server/sonar-web/src/main/js/apps/metrics/templates/metrics-list-item.hbs +++ b/server/sonar-web/src/main/js/apps/metrics/templates/metrics-list-item.hbs @@ -5,19 +5,19 @@ <div class="display-inline-block text-top width-30"> <div> - <strong class="js-metric-name">{{name}}</strong> - <span class="js-metric-key note little-spacer-left">{{key}}</span> + <strong class="js-metric-name text-limited">{{name}}</strong> + <span class="js-metric-key note little-spacer-left text-limited">{{key}}</span> </div> </div> -<div class="display-inline-block text-top width-20"> +<div class="display-inline-block text-top width-20 text-ellipsis"> <span class="js-metric-domain">{{this.domain}}</span> </div> -<div class="display-inline-block text-top width-20"> +<div class="display-inline-block text-top width-20 text-ellipsis"> <span class="js-metric-type">{{t 'metric.type' type}}</span> </div> -<div class="display-inline-block text-top width-20"> +<div class="display-inline-block text-top width-20 text-ellipsis" title="{{description}}"> <span class="js-metric-description">{{description}}</span> </div> |