hunk.code_window: ---
   name: Feature request
   about: Suggest a feature/enhancement that should be added in Portainer
   ---
   <!--
  
hunk.labels: keep keep add keep keep keep keep
hunk.after_edit: title: ''
   labels: ''
   assignees: ''
  
hunk.file_path: .github/ISSUE_TEMPLATE/Feature_request.md
hunk.type: add
file: import _ from 'lodash-es';
  
  angular
    .module('portainer.kubernetes')
    .filter('kubernetesNodeStatusColor', function () {
      'use strict';
      return function (text) {
        var status = _.toLower(text);
        switch (status) {
          case 'ready':
            return 'success';
          case 'warning':
            return 'warning';
          default:
            return 'danger';
        }
      };
    })
    .filter('kubernetesNodeConditionsMessage', function () {
      'use strict';
      return function (conditions) {
        if (conditions.MemoryPressure) {
          return 'Node memory is running low';
        }
        if (conditions.PIDPressure) {
          return 'Too many processes running on the node';
        }
        if (conditions.DiskPressure) {
          return 'Node disk capacity is running low';
        }
        if (conditions.NetworkUnavailable) {
          return 'Incorrect node network configuration';
        }
      };
    });
  