Пример #1
0
 public function testGeneratorVersionToStr()
 {
     $ver = CrashReport::generatorVersionToStr('1300');
     $this->assertTrue($ver == '1.3.0');
 }
Пример #2
0
	</div>	
</div>

<!-- Detail View -->
<?php 
// Prepare bug list
$bugList = '';
foreach ($model->bugs as $bugCrashReport) {
    if ($bugCrashReport->bug->status < Bug::STATUS_OPEN_MAX) {
        $bugList .= CHtml::link('#' . $bugCrashReport->bug_id, array('bug/view', 'id' => $bugCrashReport->bug_id)) . ' ';
    }
    if ($bugList == '') {
        $bugList = 'None';
    }
}
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('name' => 'received', 'type' => 'text', 'value' => date("d/m/y H:i", $model->received)), array('name' => 'date_created', 'type' => 'text', 'value' => date("d/m/y H:i", $model->date_created)), array('name' => 'status', 'type' => 'text', 'value' => Lookup::item('CrashReportStatus', $model->status)), array('name' => 'filesize', 'type' => 'raw', 'value' => CHtml::encode(MiscHelpers::fileSizeToStr($model->filesize))), array('name' => 'project_id', 'type' => 'text', 'value' => $model->project->name), array('name' => 'appversion_id', 'type' => 'text', 'value' => $model->appVersion->version), 'crashguid', array('name' => 'crashrptver', 'type' => 'text', 'value' => 'CrashRpt ' . CrashReport::generatorVersionToStr($model->crashrptver)), array('name' => 'srcfilename', 'type' => 'raw', 'value' => CHtml::link($model->srcfilename, array('crashReport/download', 'id' => $model->id))), array('name' => 'groupid', 'type' => 'raw', 'value' => CHtml::link(CHtml::encode($model->collection->title), array('crashGroup/view', 'id' => $model->groupid))), array('label' => 'Open Bug(s)', 'type' => 'raw', 'value' => $bugList))));
?>

<div class="span-27 last detail-group-caption">Sender Info:</div>

<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('name' => 'geo_location', 'type' => 'text', 'value' => CrashReport::geoIdToCountryName($model->geo_location)), 'ipaddress', 'emailfrom', 'description')));
?>

<div class="span-27 last detail-group-caption">Exception Info:</div>

<?php 
$text = $model->exception_thread_id != 0 ? '0x' . dechex($model->exception_thread_id) : null;
$exceptionThread = $model->getExceptionThread();
if ($exceptionThread) {
    $link = CHtml::link(CHtml::encode('View Stack Trace'), array('crashReport/view', 'id' => $model->id, 'tab' => 'Threads', 'thread' => $exceptionThread->id));