Skip to content

Commit

Permalink
pure reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas van Staden committed Dec 22, 2016
1 parent 597f6ac commit cd3426b
Show file tree
Hide file tree
Showing 28 changed files with 707 additions and 633 deletions.
Original file line number Diff line number Diff line change
@@ -1,46 +1,47 @@
<?php
/**
* This file is part of ProxiBlue NewRelic Module available via GitHub https://github.com/ProxiBlue/NewRelic
*
* ProxiBlue NewRelic Module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ProxiBlue NewRelic Module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProxiBlue NewRelic Module.
* If not, see <http://www.gnu.org/licenses/>.
**/
<?php
/**
* This file is part of ProxiBlue NewRelic Module available via GitHub https://github.com/ProxiBlue/NewRelic
*
* ProxiBlue NewRelic Module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ProxiBlue NewRelic Module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProxiBlue NewRelic Module.
* If not, see <http://www.gnu.org/licenses/>.
**/
?>
<?php


/**
* Admin DashBoard Graphs
*
*
* @category ProxiBlue
* @package ProxiBlue_NewRelic
* @author Lucas van Staden (support@proxiblue.com.au)
**/


class ProxiBlue_NewRelic_Block_Adminhtml_Dashboard_Diagrams extends Mage_Adminhtml_Block_Dashboard_Diagrams
{
protected function _prepareLayout()
{
parent::_prepareLayout();
if (Mage::getStoreConfig('newrelic/embeded/enabled')) {
$this->addTab('newrelic', array(
'label' => $this->__('NewRelic'),
'content' => $this->getLayout()->createBlock('proxiblue_newrelic/adminhtml_dashboard_tab_newrelic')->toHtml(),
));
$this->addTab(
'newrelic', array(
'label' => $this->__('NewRelic'),
'content' => $this->getLayout()->createBlock('proxiblue_newrelic/adminhtml_dashboard_tab_newrelic')
->toHtml(),
)
);
}
return $this;

}
}
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
<?php
/**
* This file is part of ProxiBlue NewRelic Module available via GitHub https://github.com/ProxiBlue/NewRelic
*
* ProxiBlue NewRelic Module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ProxiBlue NewRelic Module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProxiBlue NewRelic Module.
* If not, see <http://www.gnu.org/licenses/>.
**/
<?php
/**
* This file is part of ProxiBlue NewRelic Module available via GitHub https://github.com/ProxiBlue/NewRelic
*
* ProxiBlue NewRelic Module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ProxiBlue NewRelic Module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProxiBlue NewRelic Module.
* If not, see <http://www.gnu.org/licenses/>.
**/
?>
<?php

/**
* Admin DashBoard Graphs
*
*
* @category ProxiBlue
* @package ProxiBlue_NewRelic
* @author Lucas van Staden (support@proxiblue.com.au)
**/

class ProxiBlue_NewRelic_Block_Adminhtml_Dashboard_Tab_Newrelic extends Mage_Adminhtml_Block_Dashboard_Abstract
{
{
/**
* Initialize object
*
Expand All @@ -41,7 +40,8 @@ public function __construct()
$this->setTemplate('dashboard/proxiblue_newrelic.phtml');
}

public function getEmbededGraphs(){
public function getEmbededGraphs()
{
$embeddedGraphs = unserialize(Mage::getStoreConfig('proxiblue_newrelic/embeded/graph'));
if (!is_array($embeddedGraphs)) {
$embeddedGraphs = array();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,55 +1,59 @@
<?php
/**
* This file is part of ProxiBlue NewRelic Module available via GitHub https://github.com/ProxiBlue/NewRelic
*
* ProxiBlue NewRelic Module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ProxiBlue NewRelic Module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProxiBlue NewRelic Module.
* If not, see <http://www.gnu.org/licenses/>.
**/
<?php
/**
* This file is part of ProxiBlue NewRelic Module available via GitHub https://github.com/ProxiBlue/NewRelic
*
* ProxiBlue NewRelic Module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ProxiBlue NewRelic Module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProxiBlue NewRelic Module.
* If not, see <http://www.gnu.org/licenses/>.
**/
?>
<?php
<?php

/**
* Button for account details screen
*
*
* @category ProxiBlue
* @package ProxiBlue_NewRelic
* @author Lucas van Staden (support@proxiblue.com.au)
**/

class ProxiBlue_NewRelic_Block_Adminhtml_System_Config_Form_Field_Button_AccountDetails extends Mage_Adminhtml_Block_System_Config_Form_Field
class ProxiBlue_NewRelic_Block_Adminhtml_System_Config_Form_Field_Button_AccountDetails
extends Mage_Adminhtml_Block_System_Config_Form_Field
{

protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
{
$this->setElement($element);
$url = Mage::helper("adminhtml")->getUrl("proxiblue_newrelic/api/accountDetails/",array('id'=>Mage::getStoreConfig('newrelic/api/api_key')));
$url = Mage::helper("adminhtml")->getUrl(
"proxiblue_newrelic/api/accountDetails/", array('id' => Mage::getStoreConfig('newrelic/api/api_key'))
);

$html = $this->getLayout()->createBlock('adminhtml/widget_button')
->setType('button')
->setClass('scalable')
->setLabel('Fetch Account Details')
->setOnClick("fetchAccountDetails('{$url}')")
->toHtml();
->setType('button')
->setClass('scalable')
->setLabel('Fetch Account Details')
->setOnClick("fetchAccountDetails('{$url}')")
->toHtml();

$html .= $this->addActionJs();
return $html;
}

private function addActionJs(){

private function addActionJs()
{
$script = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'newrelic.js';
$js = '<script type="text/javascript" src="'.$script.'"></script>';
$js = '<script type="text/javascript" src="' . $script . '"></script>';
return $js;
}
}

?>
Original file line number Diff line number Diff line change
@@ -1,56 +1,60 @@
<?php
/**
* This file is part of ProxiBlue NewRelic Module available via GitHub https://github.com/ProxiBlue/NewRelic
*
* ProxiBlue NewRelic Module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ProxiBlue NewRelic Module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProxiBlue NewRelic Module.
* If not, see <http://www.gnu.org/licenses/>.
**/
<?php
/**
* This file is part of ProxiBlue NewRelic Module available via GitHub https://github.com/ProxiBlue/NewRelic
*
* ProxiBlue NewRelic Module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ProxiBlue NewRelic Module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProxiBlue NewRelic Module.
* If not, see <http://www.gnu.org/licenses/>.
**/
?>
<?php
<?php

/**
* Button for Appnames
*
*
* @category ProxiBlue
* @package ProxiBlue_NewRelic
* @author Lucas van Staden (support@proxiblue.com.au)
**/

class ProxiBlue_NewRelic_Block_Adminhtml_System_Config_Form_Field_Button_Appnames extends Mage_Adminhtml_Block_System_Config_Form_Field
class ProxiBlue_NewRelic_Block_Adminhtml_System_Config_Form_Field_Button_Appnames
extends Mage_Adminhtml_Block_System_Config_Form_Field
{

protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
{
$this->setElement($element);
$url = Mage::helper("adminhtml")->getUrl("proxiblue_newrelic/api/names/",array('id'=>Mage::getStoreConfig('newrelic/api/api_key')));
$url = Mage::helper("adminhtml")->getUrl(
"proxiblue_newrelic/api/names/", array('id' => Mage::getStoreConfig('newrelic/api/api_key'))
);


$html = $this->getLayout()->createBlock('adminhtml/widget_button')
->setType('button')
->setClass('scalable')
->setLabel('Fetch Application Names')
->setOnClick("fetchApplicationNames('{$url}')")
->toHtml();
->setType('button')
->setClass('scalable')
->setLabel('Fetch Application Names')
->setOnClick("fetchApplicationNames('{$url}')")
->toHtml();

$html .= $this->addActionJs();
return $html;
}

private function addActionJs(){

private function addActionJs()
{
$script = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'newrelic.js';
$js = '<script type="text/javascript" src="'.$script.'"></script>';
$js = '<script type="text/javascript" src="' . $script . '"></script>';
return $js;
}
}

?>
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
<?php
/**
* This file is part of ProxiBlue NewRelic Module available via GitHub https://github.com/ProxiBlue/NewRelic
*
* ProxiBlue NewRelic Module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ProxiBlue NewRelic Module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProxiBlue NewRelic Module.
* If not, see <http://www.gnu.org/licenses/>.
**/
<?php
/**
* This file is part of ProxiBlue NewRelic Module available via GitHub https://github.com/ProxiBlue/NewRelic
*
* ProxiBlue NewRelic Module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ProxiBlue NewRelic Module is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProxiBlue NewRelic Module.
* If not, see <http://www.gnu.org/licenses/>.
**/
?>
<?php

/**
* Form Field Graph Url
*
*
* @category ProxiBlue
* @package ProxiBlue_NewRelic
* @author Lucas van Staden (support@proxiblue.com.au)
**/

class ProxiBlue_NewRelic_Block_Adminhtml_System_Config_Form_Field_Graphurl
extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
{
public function __construct()
{
$this->addColumn('string', array(
$this->addColumn(
'string', array(
'label' => Mage::helper('proxiblue_newrelic')->__('String'),
'style' => 'width:300px',
));
)
);
$this->_addAfter = false;
$this->_addButtonLabel = Mage::helper('proxiblue_newrelic')->__('Add New Graph');
parent::__construct();
Expand Down
Loading

0 comments on commit cd3426b

Please sign in to comment.