<commit_before>// ==========================================================================
// Project:   EurekaJView.TriggeredAlertModel
// Copyright: ©2010 My Company, Inc.
// ==========================================================================
/*globals EurekaJView */

/** @class

  (Document your Model here)

  @extends SC.Record
  @version 0.1
*/
EurekaJView.TriggeredAlertModel = SC.Record.extend(
/** @scope EurekaJView.TriggeredAlertModel.prototype */ {

    primaryKey: 'generatedID',
    generatedID: SC.Record.attr(Number),
    alertName: SC.Record.attr(String),
    triggeredDate: SC.Record.attr(Number),
    errorValue: SC.Record.attr(Number),
    warningValue: SC.Record.attr(Number),
    triggeredValue: SC.Record.attr(Number),

    summaryContent: function() {
        var datetime = SC.DateTime.create(this.get('triggeredDate'));
        var alertType = 'NORMAL';
        if (this.get('triggeredValue') >= this.get('errorValue')) {
            alertType = 'CRITICAL';
        } else if (this.get('triggeredValue') >= this.get('warningValue')) {
            alertType = 'WARNING';
        }
        return  this.get('alertName') + ' ' + alertType + " " + datetime.toFormattedString("%d/%m/%Y %H:%M") + " " + this.get('errorValue') + " " + this.get('warningValue') + " " + this.get('triggeredValue');
    }.property()
}) ;<commit_msg>Added Seconds to ListView for TriggeredAlerts<commit_after>// ==========================================================================
// Project:   EurekaJView.TriggeredAlertModel
// Copyright: ©2010 My Company, Inc.
// ==========================================================================
/*globals EurekaJView */

/** @class

  (Document your Model here)

  @extends SC.Record
  @version 0.1
*/
EurekaJView.TriggeredAlertModel = SC.Record.extend(
/** @scope EurekaJView.TriggeredAlertModel.prototype */ {

    primaryKey: 'generatedID',
    generatedID: SC.Record.attr(Number),
    alertName: SC.Record.attr(String),
    triggeredDate: SC.Record.attr(Number),
    errorValue: SC.Record.attr(Number),
    warningValue: SC.Record.attr(Number),
    triggeredValue: SC.Record.attr(Number),

    summaryContent: function() {
        var datetime = SC.DateTime.create(this.get('triggeredDate'));
        var alertType = 'NORMAL';
        if (this.get('triggeredValue') >= this.get('errorValue')) {
            alertType = 'CRITICAL';
        } else if (this.get('triggeredValue') >= this.get('warningValue')) {
            alertType = 'WARNING';
        }
        return  this.get('alertName') + ' ' + alertType + " " + datetime.toFormattedString("%d/%m/%Y %H:%M:%S") + " " + this.get('errorValue') + " " + this.get('warningValue') + " " + this.get('triggeredValue');
    }.property()
}) ;
{'fraction_non_alphanumeric': 0.2588149763722283, 'fraction_numerical': 0.004362050163576881, 'mean_word_length': 3.8450704225352115, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '135219', 'n_tokens_mistral': 822, 'n_tokens_neox': 795, 'n_words': 135}