How to use the opennms.Model.FeedbackTypes function in opennms

To help you get started, we’ve selected a few opennms examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OpenNMS / opennms-helm / src / panels / alarm-table / alarm_details.js View on Github external
resetCounters() {
    // reset the counters
    this.$scope.feedbackCorrectCount = this.$scope.situationFeedback.length;
    this.$scope.feedbackIncorrectCount = 0;
    for(let fb of this.$scope.situationFeedback) {
      if (fb.feedbackType.id === Model.FeedbackTypes.FALSE_POSITIVE.id) {
        this.$scope.feedbackCorrectCount--;
        this.$scope.feedbackIncorrectCount++;
      }
    }
  }
github OpenNMS / opennms-helm / src / panels / alarm-table / alarm_details.js View on Github external
markIncorrect(reductionKey) {
    for (let feedback of this.$scope.situationFeedback) {
      if (feedback.alarmKey === reductionKey) {
        if (feedback.feedbackType.id == Model.FeedbackTypes.CORRECT.id) {
          feedback.feedbackType = Model.FeedbackTypes.FALSE_POSITIVE;
          this.$scope.feedbackCorrectCount--;
          this.$scope.feedbackIncorrectCount++;
          break;
        }
      }
    }
  }