<commit_before>- render_usage = false if !render_usage
- fill = render_usage ? resource.usage : resource.domains_quota
- data_type = resource.data_type

- if resource.capacity.nil?
  = resource_bar(fill: fill, maximum: { value: -1, label: "No total capacity maintained" }, threshold: { value: fill, label: "" }, data_type: resource.data_type)
- else
  -# capacity is also given as threshold to account for the case
  -# that fill > capacity for overcommittable resources
  - if resource.burst_usage > 0 && render_usage
    - threshold = resource.usage - resource.burst_usage
    - warning_level = 1.0
    - danger_level = 1.5
    - if resource.usage / resource.capacity >= 0.8
      - warning_level = 0.8
      - danger_level = 1.0
    = resource_bar(fill: { value: fill, label: "#{data_type.format(threshold)} + #{data_type.format(resource.burst_usage)}"}, maximum: resource.capacity, data_type: resource.data_type, threshold: { value: threshold, label:"burst usage: #{data_type.format(resource.burst_usage)}"}, warning_level: warning_level, danger_level: danger_level)<commit_msg>change danger level for cluster level<commit_after>- render_usage = false if !render_usage
- fill = render_usage ? resource.usage : resource.domains_quota
- data_type = resource.data_type

- if resource.capacity.nil?
  = resource_bar(fill: fill, maximum: { value: -1, label: "No total capacity maintained" }, threshold: { value: fill, label: "" }, data_type: resource.data_type)
- else
  -# capacity is also given as threshold to account for the case
  -# that fill > capacity for overcommittable resources
  - if resource.burst_usage > 0 && render_usage
    - threshold = resource.usage - resource.burst_usage
    - warning_level = 1.0
    - danger_level = 1.5
    - if resource.usage / resource.capacity >= 0.8
      - warning_level = 0.8
      - danger_level = 0.9
    = resource_bar(fill: { value: fill, label: "#{data_type.format(threshold)} + #{data_type.format(resource.burst_usage)}"}, maximum: resource.capacity, data_type: resource.data_type, threshold: { value: threshold, label:"burst usage: #{data_type.format(resource.burst_usage)}"}, warning_level: warning_level, danger_level: danger_level)
{'fraction_non_alphanumeric': 0.1206581352833638, 'fraction_numerical': 0.010968921389396709, 'mean_word_length': 4.262019230769231, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2374672', 'n_tokens_mistral': 674, 'n_tokens_neox': 646, 'n_words': 176}