-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lucas van Staden
committed
Dec 22, 2016
1 parent
597f6ac
commit cd3426b
Showing
28 changed files
with
707 additions
and
633 deletions.
There are no files selected for viewing
53 changes: 27 additions & 26 deletions
53
app/code/community/ProxiBlue/NewRelic/Block/Adminhtml/Dashboard/Diagrams.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 35 additions & 31 deletions
66
...ity/ProxiBlue/NewRelic/Block/Adminhtml/System/Config/Form/Field/Button/Accountdetails.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
|
||
?> |
66 changes: 35 additions & 31 deletions
66
...community/ProxiBlue/NewRelic/Block/Adminhtml/System/Config/Form/Field/Button/Appnames.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
|
||
?> |
45 changes: 23 additions & 22 deletions
45
app/code/community/ProxiBlue/NewRelic/Block/Adminhtml/System/Config/Form/Field/Graphurl.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.