Added usage graph (ADSL), improved logging for usage collection (ADSL)
This commit is contained in:
@@ -228,6 +228,8 @@ class Service extends Model
|
||||
],
|
||||
];
|
||||
|
||||
/* RELATIONS */
|
||||
|
||||
/**
|
||||
* Account the service belongs to
|
||||
*
|
||||
@@ -335,7 +337,7 @@ class Service extends Model
|
||||
return $this->morphTo(null,'model','id','service_id');
|
||||
}
|
||||
|
||||
/** SCOPES **/
|
||||
/* SCOPES */
|
||||
|
||||
/**
|
||||
* Only query active categories
|
||||
@@ -384,7 +386,7 @@ class Service extends Model
|
||||
return $query->where('id','like','%'.$term.'%');
|
||||
}
|
||||
|
||||
/** ATTRIBUTES **/
|
||||
/* ATTRIBUTES */
|
||||
|
||||
/**
|
||||
* Name of the account for this service
|
||||
@@ -846,7 +848,7 @@ class Service extends Model
|
||||
return sprintf('<a href="/u/service/%s">%s</a>',$this->id,$this->service_id);
|
||||
}
|
||||
|
||||
/** SETTERS **/
|
||||
/* SETTERS */
|
||||
|
||||
public function setDateOrigAttribute($value)
|
||||
{
|
||||
@@ -858,7 +860,7 @@ class Service extends Model
|
||||
$this->attributes['date_last'] = $value->timestamp;
|
||||
}
|
||||
|
||||
/** FUNCTIONS **/
|
||||
/* FUNCTIONS */
|
||||
|
||||
// The action methods will return: NULL for no progress|FALSE for a failed status|next stage name.
|
||||
|
||||
@@ -1140,6 +1142,16 @@ class Service extends Model
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Does this service have traffic data to be graphed
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasUsage(): bool
|
||||
{
|
||||
return $this->product->hasUsage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a service is active. It is active, if active=1, or the order_status is not in inactive_status[]
|
||||
*
|
||||
|
Reference in New Issue
Block a user