示例#1
0
	function fetchElement($name, $value, &$node, $control_name)
	{
		global $gantry;
		
		gantry_import('core.gantrydiagnostic');
		$diagnose = new GantryDiagnostic();
		$errors = $diagnose->checks();
		
		$output = "";
		
		if (count($errors) > 0) {
			$klass = "errors";
			$output = implode("", $errors);
		} else {
			$klass = "success";
			$output = "Diagnostic checks successfully passed.";
		}
        $output .= '<br/><a href="'.JURI::base(true).'?option=com_admin&tmpl=gantry-ajax-admin&model=diagnostics&template='.$gantry->templateName.'">Download Diagnostic Info</a>';
		
		return "
		<div id='diagnostic' class='".$klass."'>
			<div id='diagnostic-bar' class='g-title'>".JText::_('DIAGNOSTICS')." - ". ucfirst($klass) ." <span class='arrow'></span></div>
			<div id='diagnostic-desc' class='g-inner'>
			".$output."
			</div>
		</div>";
		
	}
示例#2
0
 function fetchElement($name, $value, &$node, $control_name)
 {
     global $gantry;
     gantry_import('core.gantrydiagnostic');
     $diagnose = new GantryDiagnostic();
     $errors = $diagnose->checks();
     $output = "";
     if (count($errors) > 0) {
         $klass = "errors";
         $output = implode("", $errors);
     } else {
         $klass = "success";
         $output = "Diagnostic checks successfully passed.";
     }
     return "\n\t\t<div id='diagnostic' class='" . $klass . "'>\n\t\t\t<div id='diagnostic-bar' class='g-title'>" . JText::_('DIAGNOSTICS') . " - " . ucfirst($klass) . " <span class='arrow'></span></div>\n\t\t\t<div id='diagnostic-desc' class='g-inner'>\n\t\t\t" . $output . "\n\t\t\t</div>\n\t\t</div>";
 }
示例#3
0
 public function getInput()
 {
     global $gantry;
     gantry_import('core.gantrydiagnostic');
     $diagnose = new GantryDiagnostic();
     $errors = $diagnose->runChecks();
     $output = "";
     if (count($errors) > 0) {
         $klass = "errors";
         $title = "Something Wrong :(";
         $output = implode("", $errors);
     } else {
         $klass = "success";
         $title = "Good!";
         $output = "Congratulations! All the diagnostic test have passed successfully.  There are no show-stopper issues.  You can however still download the ";
     }
     //$output .= '<a href="'.$gantry->baseUrl.'?option=com_admin&amp;tmpl=gantry-ajax-admin&amp;model=diagnostics&amp;template='.$gantry->templateName.'">Diagnostic Status Information archive</a>.';
     return "\n\t\t<div id='diagnostic' class='" . $klass . "'>\n\t\t\t<div id='diagnostic-bar' class='h2bar'>Diagnostics: <span>" . $title . "</span></div>\n\t\t\t<div id='diagnostic-desc' class='g-inner'>\n\t\t\t" . $output . "\n\t\t\t</div>\n\t\t</div>";
 }