smartbear_alertsite - Version 2.0.0

Version Notes

This is the second release of AlertSite for Magento.

This release adds the following new features:

-Scatter Plot Report graphing response time for your URL

-Benchmark Report comparing performance of URL against top industry benchmark sites

-Capability to edit extension configuration information

Download this release

Release Info

Developer SmartBear Software
Extension smartbear_alertsite
Version 2.0.0
Comparing to
See all releases


Code changes from version 1.0.0 to 2.0.0

Files changed (33) hide show
  1. app/code/community/Smartbear/Alertsite/.DS_Store +0 -0
  2. app/code/community/Smartbear/Alertsite/Block/.DS_Store +0 -0
  3. app/code/community/Smartbear/Alertsite/Block/Adminhtml/.DS_Store +0 -0
  4. app/code/community/Smartbear/Alertsite/Block/Adminhtml/Advance.php +69 -0
  5. app/code/community/Smartbear/Alertsite/Block/Adminhtml/Create.php +10 -0
  6. app/code/community/Smartbear/Alertsite/Block/Adminhtml/Report.php +48 -0
  7. app/code/community/Smartbear/Alertsite/Block/Adminhtml/System/.DS_Store +0 -0
  8. app/code/community/Smartbear/Alertsite/Block/Adminhtml/System/Form/.DS_Store +0 -0
  9. app/code/community/Smartbear/Alertsite/Block/Adminhtml/System/Form/Renderer/AdvanceLink.php +29 -0
  10. app/code/community/Smartbear/Alertsite/Block/Adminhtml/System/Form/Renderer/Subheader.php +28 -0
  11. app/code/community/Smartbear/Alertsite/Helper/Data.php +13 -0
  12. app/code/community/Smartbear/Alertsite/Model/.DS_Store +0 -0
  13. app/code/community/Smartbear/Alertsite/Model/Alertsiteapi.php +174 -13
  14. app/code/community/Smartbear/Alertsite/Model/Observer.php +1 -0
  15. app/code/community/Smartbear/Alertsite/Model/System/.DS_Store +0 -0
  16. app/code/community/Smartbear/Alertsite/Model/System/Config/.DS_Store +0 -0
  17. app/code/community/Smartbear/Alertsite/Model/System/Config/Backend/Editaccount.php +15 -0
  18. app/code/community/Smartbear/Alertsite/controllers/.DS_Store +0 -0
  19. app/code/community/Smartbear/Alertsite/controllers/Adminhtml/AlertsiteController.php +121 -33
  20. app/code/community/Smartbear/Alertsite/etc/adminhtml.xml +29 -25
  21. app/code/community/Smartbear/Alertsite/etc/system.xml +62 -19
  22. app/design/adminhtml/default/default/layout/alertsite.xml +47 -2
  23. app/design/adminhtml/default/default/template/alertsite/advance.phtml +77 -0
  24. app/design/adminhtml/default/default/template/alertsite/benchmark.phtml +31 -0
  25. app/design/adminhtml/default/default/template/alertsite/create.phtml +6 -4
  26. app/design/adminhtml/default/default/template/alertsite/dashboard.phtml +22 -6
  27. app/design/adminhtml/default/default/template/alertsite/linkbutton.phtml +4 -2
  28. app/design/adminhtml/default/default/template/alertsite/notifications.phtml +1 -1
  29. app/design/adminhtml/default/default/template/alertsite/scatterplot.phtml +31 -0
  30. app/design/adminhtml/default/default/template/alertsite/subheader.phtml +4 -0
  31. package.xml +14 -6
  32. skin/adminhtml/default/default/smartbear/alertsite/css/alertsite.css +28 -0
  33. skin/adminhtml/default/default/smartbear/alertsite/images/alertsite_15_icon.png +0 -0
app/code/community/Smartbear/Alertsite/.DS_Store ADDED
Binary file
app/code/community/Smartbear/Alertsite/Block/.DS_Store ADDED
Binary file
app/code/community/Smartbear/Alertsite/Block/Adminhtml/.DS_Store ADDED
Binary file
app/code/community/Smartbear/Alertsite/Block/Adminhtml/Advance.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Smartbear_Alertsite_Block_Adminhtml_Notifications
4
+ * Notifications block. Displays a note at the top of adminhtml pages.
5
+ *
6
+ * @category
7
+ * @package Smartbear_Alertsite
8
+ */
9
+ class Smartbear_Alertsite_Block_Adminhtml_Advance extends Mage_Adminhtml_Block_Template
10
+ {
11
+ /**
12
+ * Sets the form action urls for the page.
13
+ */
14
+ public function _construct()
15
+ {
16
+ parent::_construct();
17
+
18
+ $this->setFormAction(Mage::helper('adminhtml')->getUrl('*/alertsite/advancedEdit'));
19
+
20
+ //if(!$formValues->getBasicSiteId() || !$formValues->getDejaUrlId() || !$formValues->getLoginEmail() || !$formValues->getPassword())
21
+ if(Mage::getSingleton('core/session')->getFormData())
22
+ {
23
+ $this->addData(Mage::getSingleton('core/session')->getFormData()->getData());
24
+ }
25
+ $this->formData = Mage::getSingleton('core/session')->unsFormData();
26
+ }
27
+
28
+ /**
29
+ * Retrieve Session Form Key
30
+ *
31
+ * @return string
32
+ */
33
+ public function getFormKey()
34
+ {
35
+ return Mage::getSingleton('core/session')->getFormKey();
36
+ }
37
+
38
+ public function getUsername()
39
+ {
40
+ return $this->getLoginEmail() ? $this->getLoginEmail() : $this->getApi()->getUsername();
41
+ }
42
+
43
+ public function getSiteDeviceId()
44
+ {
45
+ return $this->getBasicSiteId() ? $this->getBasicSiteId() : $this->getApi()->getDeviceId();
46
+ }
47
+
48
+ public function getDejaclickDeviceId()
49
+ {
50
+ return $this->getDejaUrlId() ? $this->getDejaUrlId() : $this->getApi()->getDejaclickDeviceId();
51
+ }
52
+
53
+ public function getPassword()
54
+ {
55
+ return $this->getApi()->getPassword();
56
+ }
57
+
58
+
59
+ /**
60
+ * Get the API for retrieving values
61
+ *
62
+ * @return Smartbear_Alertsite_Model_Alertsiteapi
63
+ */
64
+ public function getApi()
65
+ {
66
+ return Mage::getSingleton('alertsite/alertsiteapi');
67
+ }
68
+
69
+ }
app/code/community/Smartbear/Alertsite/Block/Adminhtml/Create.php CHANGED
@@ -73,4 +73,14 @@ class Smartbear_Alertsite_Block_Adminhtml_Create extends Mage_Adminhtml_Block_Te
73
  return '';
74
  }
75
 
 
 
 
 
 
 
 
 
 
 
76
  }
73
  return '';
74
  }
75
 
76
+ /**
77
+ * Get the API for retrieving values
78
+ *
79
+ * @return Smartbear_Alertsite_Model_Alertsiteapi
80
+ */
81
+ public function getApi()
82
+ {
83
+ return Mage::getSingleton('alertsite/alertsiteapi');
84
+ }
85
+
86
  }
app/code/community/Smartbear/Alertsite/Block/Adminhtml/Report.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Smartbear_Alertsite_Block_Adminhtml_Notifications
4
+ * Notifications block. Displays a note at the top of adminhtml pages.
5
+ *
6
+ * @category
7
+ * @package Smartbear_Alertsite
8
+ */
9
+ class Smartbear_Alertsite_Block_Adminhtml_Report extends Mage_Adminhtml_Block_Template
10
+ {
11
+
12
+ public function getConfigJson()
13
+ {
14
+ $options = new stdClass();
15
+
16
+ /** @var $api Smartbear_Alertsite_Model_Alertsiteapi */
17
+ $api = Mage::getSingleton('alertsite/alertsiteapi');
18
+ $api->setRequestIp(Mage::helper('core/http')->getRemoteAddr());
19
+ $api->login();
20
+
21
+ $options->customer = intval(str_replace('C', '', $api->getCustomerId())) - 10000;
22
+ $options->session = $api->getSessionId();
23
+
24
+ //Get the time zone and offset
25
+ $time_zone = Mage::app()->getStore()->getConfig('general/locale/timezone');
26
+ $timeoffset = Mage::getModel('core/date')->calculateOffset($time_zone)/60/60;
27
+
28
+ $options->timezone = $timeoffset;
29
+ $options->user = $api->getUsername();
30
+
31
+ return json_encode($options);
32
+ }
33
+
34
+ public function getDejaclickDeviceId()
35
+ {
36
+ /** @var $api Smartbear_Alertsite_Model_Alertsiteapi */
37
+ $api = Mage::getSingleton('alertsite/alertsiteapi');
38
+ return $api->getDejaclickDeviceId();
39
+ }
40
+
41
+ public function getSiteDeviceId()
42
+ {
43
+ /** @var $api Smartbear_Alertsite_Model_Alertsiteapi */
44
+ $api = Mage::getSingleton('alertsite/alertsiteapi');
45
+ return $api->getDeviceId();
46
+ }
47
+
48
+ }
app/code/community/Smartbear/Alertsite/Block/Adminhtml/System/.DS_Store ADDED
Binary file
app/code/community/Smartbear/Alertsite/Block/Adminhtml/System/Form/.DS_Store ADDED
Binary file
app/code/community/Smartbear/Alertsite/Block/Adminhtml/System/Form/Renderer/AdvanceLink.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category Signaturelink
4
+ * @package SL_Signaturelink
5
+ */
6
+
7
+ /**
8
+ * Renderer for sub-heading in fieldset
9
+ *
10
+ * @author Magento Core Team <core@magentocommerce.com>
11
+ */
12
+ class Smartbear_Alertsite_Block_Adminhtml_System_Form_Renderer_AdvanceLink
13
+ extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
14
+ {
15
+ /**
16
+ * Render element html
17
+ *
18
+ * @param Varien_Data_Form_Element_Abstract $element
19
+ * @return string
20
+ */
21
+ public function render(Varien_Data_Form_Element_Abstract $element)
22
+ {
23
+ return sprintf('<tr class="system-fieldset-sub-head"><td colspan="5">'
24
+ . '<a href="%s">(click here to edit more advanced configuration options on your account)</a>'
25
+ . '</td></tr>',
26
+ Mage::getModel('adminhtml/url')->getUrl('*/alertsite/advance')
27
+ );
28
+ }
29
+ }
app/code/community/Smartbear/Alertsite/Block/Adminhtml/System/Form/Renderer/Subheader.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category Signaturelink
4
+ * @package SL_Signaturelink
5
+ */
6
+
7
+ /**
8
+ * Renderer for sub-heading in fieldset
9
+ *
10
+ * @author Magento Core Team <core@magentocommerce.com>
11
+ */
12
+ class Smartbear_Alertsite_Block_Adminhtml_System_Form_Renderer_Subheader
13
+ extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
14
+ {
15
+ /**
16
+ * Render element html
17
+ *
18
+ * @param Varien_Data_Form_Element_Abstract $element
19
+ * @return string
20
+ */
21
+ public function render(Varien_Data_Form_Element_Abstract $element)
22
+ {
23
+ return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5">'
24
+ . '<div id="system-fieldset-sub-head-comment">%s</div></td></tr>',
25
+ $element->getHtmlId(), $element->getComment()
26
+ );
27
+ }
28
+ }
app/code/community/Smartbear/Alertsite/Helper/Data.php CHANGED
@@ -14,5 +14,18 @@ class Smartbear_Alertsite_Helper_Data extends Mage_Core_Helper_Abstract
14
  }
15
  }
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  }
14
  }
15
  }
16
 
17
+ public function isSetup(){
18
+ return !(strlen(trim($this->getConfig('alertsite_config', 'alertsite_user'))) == 0 || strlen(trim($this->getConfig('alertsite_config', 'alertsite_pass'))) == 0);
19
+ }
20
+
21
+ public function getBenchmarkUrl()
22
+ {
23
+ return Mage::helper('adminhtml')->getUrl('*/alertsite/benchmark');
24
+ }
25
+
26
+ public function getScatterPlotUrl()
27
+ {
28
+ return Mage::helper('adminhtml')->getUrl('*/alertsite/scatterplot');
29
+ }
30
 
31
  }
app/code/community/Smartbear/Alertsite/Model/.DS_Store ADDED
Binary file
app/code/community/Smartbear/Alertsite/Model/Alertsiteapi.php CHANGED
@@ -15,17 +15,19 @@
15
  * @method int getLastApiStatus()
16
  * @method setLastApiMessage(string $message)
17
  * @method string getLastApiMessage()
 
18
  *
19
  */
20
  class Smartbear_Alertsite_Model_Alertsiteapi extends Mage_Core_Model_Abstract
21
  {
22
 
23
  //Endpoint URLs
24
- const ALERTSITE_REST_API_URL = 'https://www.alertsite.com/cgi-bin/alertsite-restapi/index.cgi/'; // http://help.alertsite.com/AlertSite/RestAPI
25
- const ALERTSITE_REPORT_API_URL = 'https://www.alertsite.com/report-api/'; // http://help.alertsite.com/ReportAPI
26
- const ALERTSITE_PROVISION_API_URL = 'https://www.alertsite.com/cgi-bin/orderform';
27
 
28
- //Config paths that are needed for configuration of AlertSite API
 
 
 
 
29
  const CONFIG_ACTIVATION_URL = 'alertsite/alertsite_config/alertsite_activation_email';
30
  const CONFIG_DEVICE_ID = 'alertsite/alertsite_config/device_id';
31
  const CONFIG_DEJACLICK_DEVICE_ID = 'alertsite/alertsite_config/dejaclick_device_id';
@@ -37,7 +39,9 @@ class Smartbear_Alertsite_Model_Alertsiteapi extends Mage_Core_Model_Abstract
37
  const CONFIG_ALERTSITE_ENABLED = 'alertsite/alertsite_config/enabled';
38
  const CONFIG_ALERTSITE_PROVISIONED = 'alertsite/alertsite_config/provisioned';
39
  const CONFIG_ALERTSITE_PHONE = 'alertsite/alertsite_config/alertsite_phone';
40
-
 
 
41
 
42
  protected $_statusApiResult = null;
43
  protected $_detailApiResult = null;
@@ -102,13 +106,32 @@ class Smartbear_Alertsite_Model_Alertsiteapi extends Mage_Core_Model_Abstract
102
  */
103
  public function getUsername()
104
  {
105
- return Mage::helper('alertsite')->getConfig('alertsite_config', 'alertsite_user');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  }
107
 
108
  /**
109
  * Get the configured password returned from provisioning
110
  *
111
- * todo make sure that we change the password config type to obscured
112
  * @return string
113
  */
114
  public function getPassword()
@@ -263,10 +286,22 @@ class Smartbear_Alertsite_Model_Alertsiteapi extends Mage_Core_Model_Abstract
263
 
264
  if ($root == 'Login') // special case login xml
265
  {
 
 
 
 
 
 
 
 
 
 
 
266
  $requestXml->KeepAlive = '1';
267
  $requestXml->Login = $this->getUsername();
268
  $requestXml->Password = $this->getPassword();
269
 
 
270
  } else
271
  {
272
  $requestXml->APIVersion = '1.1';
@@ -328,12 +363,16 @@ class Smartbear_Alertsite_Model_Alertsiteapi extends Mage_Core_Model_Abstract
328
 
329
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
330
  $output = curl_exec($ch);
 
331
  // Mage::Log('Response - '.$output->asXML(), null, 'alertsite.log', true);
332
  curl_close($ch);
333
 
334
  // todo everything went swell check
335
  $output = $this->getObjectFromXml($output);
336
 
 
 
 
337
  return $output;
338
  }
339
 
@@ -386,10 +425,17 @@ class Smartbear_Alertsite_Model_Alertsiteapi extends Mage_Core_Model_Abstract
386
  *
387
  * @return bool
388
  */
389
- public function login()
390
  {
391
  $request = $this->getRequest('Login');
392
 
 
 
 
 
 
 
 
393
  // curl set up
394
  $url = $this->getUrl('user/login');
395
 
@@ -406,7 +452,7 @@ class Smartbear_Alertsite_Model_Alertsiteapi extends Mage_Core_Model_Abstract
406
  if($response && property_exists($response, 'Status') && $response->Status == '47')
407
  {
408
  $activationUrl = Mage::helper('alertsite')->getConfig('alertsite_config', 'alertsite_activation_email');
409
- Mage::getSingleton('adminhtml/session')->addError('Your SmartBear AlertSite account has not yet been activated. Click <a target="_blank" onclick="setTimeout(\'window.location=window.location;\', 2000);" href="'.$activationUrl.'">here</a> to enable your account.');
410
  return false;
411
  }
412
  }
@@ -444,6 +490,56 @@ class Smartbear_Alertsite_Model_Alertsiteapi extends Mage_Core_Model_Abstract
444
  return $response;
445
  }
446
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
447
  /**
448
  * Get the device status for this account!
449
  *
@@ -542,16 +638,28 @@ class Smartbear_Alertsite_Model_Alertsiteapi extends Mage_Core_Model_Abstract
542
  if ($info->getLogin())
543
  {
544
  $request->Request->User->SelectedLogin = $this->getUsername();
545
- $request->Request->User->Login = $info->getLogin();
546
  }
547
 
548
  if ($info->getContactPhone())
549
  {
550
- $request->Request->User->SelectedLogin = $this->getUsername();
551
  $request->Request->User->ContactPhone1 = $info->getContactPhone();
552
  // $request->Request->User->ContactPhone2 = '';
553
  }
554
 
 
 
 
 
 
 
 
 
 
 
 
 
555
  // $request->Request->Company = '';
556
  // $request->Request->TimeZone = '';
557
  // $request->Request->DST = '';
@@ -790,16 +898,19 @@ class Smartbear_Alertsite_Model_Alertsiteapi extends Mage_Core_Model_Abstract
790
  $apiFriendlyParams['api_version'] = urlencode('1.0');
791
  $apiFriendlyParams['order_type'] = urlencode('magento');
792
  $apiFriendlyParams['response_type'] = urlencode('xml');
793
- $apiFriendlyParams['login_email'] = urlencode($parameters->getLoginEmail());
794
  $apiFriendlyParams['monitor_url'] = urlencode($parameters->getMonitorUrl());
795
 
796
  $this->setPhone($parameters->getPhone());
 
 
 
797
 
798
  $response = $this->getCurlResponse($url, $apiFriendlyParams, 'POST', false);
799
 
800
  if(!$response)
801
  {
802
- throw new Exception("There was a problem provisioning your new account. Please try again or contact SmartBear support.");
803
  return false;
804
  }
805
 
@@ -872,6 +983,10 @@ class Smartbear_Alertsite_Model_Alertsiteapi extends Mage_Core_Model_Abstract
872
  Mage::getConfig()->saveConfig(self::CONFIG_ACTIVATION_URL, (string)$account['activation_url']);
873
  Mage::getConfig()->saveConfig(self::CONFIG_ALERTSITE_USER, (string)$account['login']);
874
  Mage::getConfig()->saveConfig(self::CONFIG_ALERTSITE_PASS, (string)$account['password']);
 
 
 
 
875
 
876
  Mage::getConfig()->saveConfig(self::CONFIG_CLIENT_ID, (string)$account['custid']);
877
  Mage::getConfig()->saveConfig(self::CONFIG_ALERTSITE_PROVISIONED, 1);
@@ -901,4 +1016,50 @@ class Smartbear_Alertsite_Model_Alertsiteapi extends Mage_Core_Model_Abstract
901
  Mage::getConfig()->reinit();
902
  Mage::app()->reinitStores();
903
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
904
  }
15
  * @method int getLastApiStatus()
16
  * @method setLastApiMessage(string $message)
17
  * @method string getLastApiMessage()
18
+ * @method int getSessionId()
19
  *
20
  */
21
  class Smartbear_Alertsite_Model_Alertsiteapi extends Mage_Core_Model_Abstract
22
  {
23
 
24
  //Endpoint URLs
 
 
 
25
 
26
+ const ALERTSITE_REST_API_URL = 'https://www.alertsite.com/cgi-bin/alertsite-restapi/index.cgi/'; //'http://www.infield.alertsite.com/cgi-bin/alertsite-restapi/index.cgi/';
27
+ const ALERTSITE_REPORT_API_URL = 'https://www.alertsite.com/report-api/'; //'http://www.infield.alertsite.com/report-api/';
28
+ const ALERTSITE_PROVISION_API_URL = 'https://www.alertsite.com/cgi-bin/orderform'; // 'http://www.infield.alertsite.com/cgi-bin/orderform';
29
+
30
+ //Config paths that are needed for configuration of AlertSite API
31
  const CONFIG_ACTIVATION_URL = 'alertsite/alertsite_config/alertsite_activation_email';
32
  const CONFIG_DEVICE_ID = 'alertsite/alertsite_config/device_id';
33
  const CONFIG_DEJACLICK_DEVICE_ID = 'alertsite/alertsite_config/dejaclick_device_id';
39
  const CONFIG_ALERTSITE_ENABLED = 'alertsite/alertsite_config/enabled';
40
  const CONFIG_ALERTSITE_PROVISIONED = 'alertsite/alertsite_config/provisioned';
41
  const CONFIG_ALERTSITE_PHONE = 'alertsite/alertsite_config/alertsite_phone';
42
+ const CONFIG_ALERTSITE_FIRST_NAME = 'alertsite/alertsite_config/alertsite_first_name';
43
+ const CONFIG_ALERTSITE_LAST_NAME = 'alertsite/alertsite_config/alertsite_last_name';
44
+ const CONFIG_ALERTSITE_COMPANY = 'alertsite/alertsite_config/alertsite_company';
45
 
46
  protected $_statusApiResult = null;
47
  protected $_detailApiResult = null;
106
  */
107
  public function getUsername()
108
  {
109
+ return strtolower(Mage::helper('alertsite')->getConfig('alertsite_config', 'alertsite_user'));
110
+ }
111
+
112
+ /**
113
+ * Get the configured first name
114
+ *
115
+ * @return string
116
+ */
117
+ public function getFirstName()
118
+ {
119
+ return Mage::helper('alertsite')->getConfig('alertsite_config', 'alertsite_first_name');
120
+ }
121
+
122
+ /**
123
+ * Get the configured last name
124
+ *
125
+ * @return string
126
+ */
127
+ public function getLastName()
128
+ {
129
+ return Mage::helper('alertsite')->getConfig('alertsite_config', 'alertsite_last_name');
130
  }
131
 
132
  /**
133
  * Get the configured password returned from provisioning
134
  *
 
135
  * @return string
136
  */
137
  public function getPassword()
286
 
287
  if ($root == 'Login') // special case login xml
288
  {
289
+
290
+ //todo: we don't really need this except for testing locally
291
+ $ip = $this->getRequestIp();
292
+ if($ip == "127.0.0.1")
293
+ $ip = '76.14.75.242';
294
+
295
+ if($ip)
296
+ $requestXml->SessionIP = $ip;
297
+ // else
298
+ // $requestXml->SessionIP = $_SERVER['SERVER_ADDR'];
299
+
300
  $requestXml->KeepAlive = '1';
301
  $requestXml->Login = $this->getUsername();
302
  $requestXml->Password = $this->getPassword();
303
 
304
+
305
  } else
306
  {
307
  $requestXml->APIVersion = '1.1';
363
 
364
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
365
  $output = curl_exec($ch);
366
+
367
  // Mage::Log('Response - '.$output->asXML(), null, 'alertsite.log', true);
368
  curl_close($ch);
369
 
370
  // todo everything went swell check
371
  $output = $this->getObjectFromXml($output);
372
 
373
+ //We will set the return data on the API object so it's accessible later if we need raw access
374
+ $this->setApiReturnData($output);
375
+
376
  return $output;
377
  }
378
 
425
  *
426
  * @return bool
427
  */
428
+ public function login($login = false, $pass = false)
429
  {
430
  $request = $this->getRequest('Login');
431
 
432
+ //If a user or pass is passed in then we'll use those instaed
433
+ if($login !== false && $pass !== false)
434
+ {
435
+ $request->Login = strtolower($login);
436
+ $request->Password = $pass;
437
+ }
438
+
439
  // curl set up
440
  $url = $this->getUrl('user/login');
441
 
452
  if($response && property_exists($response, 'Status') && $response->Status == '47')
453
  {
454
  $activationUrl = Mage::helper('alertsite')->getConfig('alertsite_config', 'alertsite_activation_email');
455
+ Mage::getSingleton('adminhtml/session')->addError('Your AlertSite account has not yet been activated. Click <a target="_blank" onclick="setTimeout(\'window.location=window.location;\', 2000);" href="'.$activationUrl.'">here</a> to enable your account.');
456
  return false;
457
  }
458
  }
490
  return $response;
491
  }
492
 
493
+ protected function verifyDevice($deviceId, $login, $deviceTypes)
494
+ {
495
+ $valid = true;
496
+
497
+ $request = $this->getRequest('Download');
498
+ $request->Request->ObjDevice = $deviceId;
499
+
500
+ $request->Authenticate->Login = strtolower($login);
501
+
502
+ $url = $this->getUrl('devices/download');
503
+
504
+ $response = $this->getCurlResponse($url, $request);
505
+
506
+ $device =$response->Request->Device;
507
+ $deviceType = (string)$device->DeviceType;
508
+ $monitorEnabled = (string)$device->Monitor;
509
+
510
+ if((string)$response->Request->Status != '0')
511
+ {
512
+ $valid = false;
513
+ $this->setErrorMessage('Device ID '.$deviceId.' seems to be invalid');
514
+ }
515
+ else if(!in_array($deviceType, $deviceTypes))
516
+ {
517
+ //Check to make sure the type matches the type it should be
518
+ $valid = false;
519
+ $this->setErrorMessage('Device type mismatch - please be sure device ID '.$deviceId.' entered matches the type listed');
520
+ }
521
+ else if($monitorEnabled != 'y')
522
+ {
523
+ //todo: are we sure this isn't valid?
524
+ $valid = false;
525
+ $this->setErrorMessage('Device ID ' . $deviceId . ' does not currently have monitoring enabled');
526
+ }
527
+
528
+ return $valid;
529
+
530
+ }
531
+
532
+ public function verifyDejaDevice($deviceId, $login)
533
+ {
534
+ return $this->verifyDevice($deviceId, $login, array('m'));;
535
+ }
536
+
537
+ public function verifySiteDevice($deviceId, $login)
538
+ {
539
+ return $this->verifyDevice($deviceId, $login, array('w', 's'));
540
+ }
541
+
542
+
543
  /**
544
  * Get the device status for this account!
545
  *
638
  if ($info->getLogin())
639
  {
640
  $request->Request->User->SelectedLogin = $this->getUsername();
641
+ $request->Request->User->Login = strtolower($info->getLogin());
642
  }
643
 
644
  if ($info->getContactPhone())
645
  {
646
+ $request->Request->User->SelectedLogin = strtolower($this->getUsername());
647
  $request->Request->User->ContactPhone1 = $info->getContactPhone();
648
  // $request->Request->User->ContactPhone2 = '';
649
  }
650
 
651
+ if ($info->getFirstName())
652
+ {
653
+ $request->Request->User->SelectedLogin = strtolower($this->getUsername());
654
+ $request->Request->User->FirstName = $info->getFirstName();
655
+ }
656
+
657
+ if ($info->getLastName())
658
+ {
659
+ $request->Request->User->SelectedLogin = strtolower($this->getUsername());
660
+ $request->Request->User->LastName = $info->getLastName();
661
+ }
662
+
663
  // $request->Request->Company = '';
664
  // $request->Request->TimeZone = '';
665
  // $request->Request->DST = '';
898
  $apiFriendlyParams['api_version'] = urlencode('1.0');
899
  $apiFriendlyParams['order_type'] = urlencode('magento');
900
  $apiFriendlyParams['response_type'] = urlencode('xml');
901
+ $apiFriendlyParams['login_email'] = urlencode(strtolower($parameters->getLoginEmail()));
902
  $apiFriendlyParams['monitor_url'] = urlencode($parameters->getMonitorUrl());
903
 
904
  $this->setPhone($parameters->getPhone());
905
+ $this->setCompany($apiFriendlyParams['company']);
906
+ $this->setFName($apiFriendlyParams['fname']);
907
+ $this->setLName($apiFriendlyParams['lname']);
908
 
909
  $response = $this->getCurlResponse($url, $apiFriendlyParams, 'POST', false);
910
 
911
  if(!$response)
912
  {
913
+ throw new Exception("There was a problem provisioning your new account. Please try again or contact AlertSite support.");
914
  return false;
915
  }
916
 
983
  Mage::getConfig()->saveConfig(self::CONFIG_ACTIVATION_URL, (string)$account['activation_url']);
984
  Mage::getConfig()->saveConfig(self::CONFIG_ALERTSITE_USER, (string)$account['login']);
985
  Mage::getConfig()->saveConfig(self::CONFIG_ALERTSITE_PASS, (string)$account['password']);
986
+ Mage::getConfig()->saveConfig(self::CONFIG_ALERTSITE_COMPANY, (string)$this->getCompany());
987
+ Mage::getConfig()->saveConfig(self::CONFIG_ALERTSITE_FIRST_NAME, (string)$this->getFName());
988
+ Mage::getConfig()->saveConfig(self::CONFIG_ALERTSITE_LAST_NAME, (string)$this->getLName());
989
+
990
 
991
  Mage::getConfig()->saveConfig(self::CONFIG_CLIENT_ID, (string)$account['custid']);
992
  Mage::getConfig()->saveConfig(self::CONFIG_ALERTSITE_PROVISIONED, 1);
1016
  Mage::getConfig()->reinit();
1017
  Mage::app()->reinitStores();
1018
  }
1019
+
1020
+
1021
+ /**
1022
+ * This is used when doing an "advance" save
1023
+ *
1024
+ * @return Mage_Core_Model_Abstract|void
1025
+ */
1026
+ public function save()
1027
+ {
1028
+
1029
+ Mage::getConfig()->saveConfig(self::CONFIG_ALERTSITE_ENABLED, true);
1030
+
1031
+ if($this->getLogin())
1032
+ Mage::getConfig()->saveConfig(self::CONFIG_ALERTSITE_USER, $this->getLogin());
1033
+
1034
+ if($this->getPass())
1035
+ Mage::getConfig()->saveConfig(self::CONFIG_ALERTSITE_PASS, $this->getPass());
1036
+
1037
+ if($this->getCustId())
1038
+ Mage::getConfig()->saveConfig(self::CONFIG_CLIENT_ID, $this->getCustId());
1039
+
1040
+ if($this->getCompany())
1041
+ Mage::getConfig()->saveConfig(self::CONFIG_ALERTSITE_COMPANY, $this->getCompany());
1042
+
1043
+
1044
+ Mage::getConfig()->saveConfig(self::CONFIG_ALERTSITE_PROVISIONED, 1);
1045
+
1046
+ if($this->getSiteUrl())
1047
+ Mage::getConfig()->saveConfig(self::CONFIG_ALERTSITE_DEVICE_URL, $this->getSiteUrl());
1048
+
1049
+ if($this->getSiteUrl())
1050
+ Mage::getConfig()->saveConfig(self::CONFIG_ALERTSITE_DEVICE_DESCRIPTION, $this->getSiteUrl());
1051
+
1052
+ if($this->getSiteId())
1053
+ Mage::getConfig()->saveConfig(self::CONFIG_DEVICE_ID, $this->getSiteId());
1054
+
1055
+ if($this->getDejaId())
1056
+ Mage::getConfig()->saveConfig(self::CONFIG_DEJACLICK_DEVICE_ID, $this->getDejaId());
1057
+
1058
+ Mage::getConfig()->reinit();
1059
+ Mage::app()->reinitStores();
1060
+
1061
+ return true;
1062
+
1063
+ }
1064
+
1065
  }
app/code/community/Smartbear/Alertsite/Model/Observer.php CHANGED
@@ -48,6 +48,7 @@ class Smartbear_Alertsite_Model_Observer
48
 
49
  /** @var $dashboardBox Smartbear_Alertsite_Block_Adminhtml_Dashboard */
50
  $dashboardBox = $observer->getBlock()->getLayout()->createBlock('alertsite/adminhtml_dashboard');
 
51
 
52
  $html .= $dashboardBox->toHtml();
53
 
48
 
49
  /** @var $dashboardBox Smartbear_Alertsite_Block_Adminhtml_Dashboard */
50
  $dashboardBox = $observer->getBlock()->getLayout()->createBlock('alertsite/adminhtml_dashboard');
51
+ $dashboardBox->insert($observer->getBlock()->getLayout()->createBlock('core/template', 'alertsite.subheader')->setTemplate('alertsite/subheader.phtml'));
52
 
53
  $html .= $dashboardBox->toHtml();
54
 
app/code/community/Smartbear/Alertsite/Model/System/.DS_Store ADDED
Binary file
app/code/community/Smartbear/Alertsite/Model/System/Config/.DS_Store ADDED
Binary file
app/code/community/Smartbear/Alertsite/Model/System/Config/Backend/Editaccount.php CHANGED
@@ -32,6 +32,8 @@ class Smartbear_Alertsite_Model_System_Config_Backend_Editaccount extends Mage_C
32
  $update = false;
33
  $login = $this->getData('groups/alertsite_config/fields/alertsite_user/value');
34
  $phone = $this->getData('groups/alertsite_config/fields/alertsite_phone/value');
 
 
35
 
36
  $request = new Varien_Object();
37
 
@@ -48,6 +50,19 @@ class Smartbear_Alertsite_Model_System_Config_Backend_Editaccount extends Mage_C
48
  $update = true;
49
  }
50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  if ($update)
52
  {
53
  $updatedResponse = $api->updateAccount($request);
32
  $update = false;
33
  $login = $this->getData('groups/alertsite_config/fields/alertsite_user/value');
34
  $phone = $this->getData('groups/alertsite_config/fields/alertsite_phone/value');
35
+ $firstName = $this->getData('groups/alertsite_config/fields/alertsite_first_name/value');
36
+ $lastName = $this->getData('groups/alertsite_config/fields/alertsite_last_name/value');
37
 
38
  $request = new Varien_Object();
39
 
50
  $update = true;
51
  }
52
 
53
+ if ($firstName != $api->getFirstName())
54
+ {
55
+ $request->setFirstName($firstName);
56
+ $update = true;
57
+ }
58
+
59
+ if ($lastName != $api->getLastName())
60
+ {
61
+ $request->setLastName($lastName);
62
+ $update = true;
63
+ }
64
+
65
+
66
  if ($update)
67
  {
68
  $updatedResponse = $api->updateAccount($request);
app/code/community/Smartbear/Alertsite/controllers/.DS_Store ADDED
Binary file
app/code/community/Smartbear/Alertsite/controllers/Adminhtml/AlertsiteController.php CHANGED
@@ -11,52 +11,27 @@ class Smartbear_Alertsite_Adminhtml_AlertsiteController extends Mage_Adminhtml_C
11
  return $this;
12
  }
13
 
14
- public function indexAction() {
15
-
16
- }
17
-
18
- public function testAction()
19
  {
20
- $request = $this->getRequest();
21
- $ajax = $this->getRequest()->isAjax();
22
- $params = $request->getParams();
23
-
24
- if($ajax){
25
- $block = $this->getLayout()->createBlock('core/template');
26
- $this->getResponse()->setBody($block->toHtml());
27
- }
28
- else
29
- {
30
- $this->_title($this->__('Smart Bear Report'));
31
- $this->loadLayout();
32
- $this->renderLayout();
33
- }
34
-
35
  }
36
 
37
- public function lolAction()
38
  {
39
  /** @var $api Smartbear_Alertsite_Model_AlertsiteApi */
40
  $api = Mage::getModel('alertsite/alertsiteapi');
 
41
 
42
- $enabled = $api->enableMonitor(false);
43
-
44
- $devices = $api->getDevice();
45
-
46
- var_dump($devices);
47
- }
48
-
49
-
50
- public function createAction()
51
- {
52
- $this->_title($this->__('Create SmertBear AlertSite account'));
53
  $this->loadLayout();
54
  $this->renderLayout();
55
  }
56
 
57
  public function provisionAction()
58
  {
59
- $result = array();
60
  $formValues = new Varien_Object(Mage::app()->getRequest()->getParams());
61
 
62
  /** @var $api Smartbear_Alertsite_Model_AlertsiteApi */
@@ -83,6 +58,87 @@ class Smartbear_Alertsite_Adminhtml_AlertsiteController extends Mage_Adminhtml_C
83
 
84
  }
85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  /**
87
  * todo: delete this?
88
  *
@@ -124,5 +180,37 @@ class Smartbear_Alertsite_Adminhtml_AlertsiteController extends Mage_Adminhtml_C
124
  $this->getResponse()->setRedirect($configUrl);
125
  }
126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
 
128
  }
11
  return $this;
12
  }
13
 
14
+ public function createAction()
 
 
 
 
15
  {
16
+ $this->_title($this->__('Create AlertSite Account'));
17
+ $this->loadLayout();
18
+ $this->renderLayout();
 
 
 
 
 
 
 
 
 
 
 
 
19
  }
20
 
21
+ public function advanceAction()
22
  {
23
  /** @var $api Smartbear_Alertsite_Model_AlertsiteApi */
24
  $api = Mage::getModel('alertsite/alertsiteapi');
25
+ $api->login();
26
 
27
+ $this->_title($this->__('Recover AlertSite Account'));
 
 
 
 
 
 
 
 
 
 
28
  $this->loadLayout();
29
  $this->renderLayout();
30
  }
31
 
32
  public function provisionAction()
33
  {
34
+
35
  $formValues = new Varien_Object(Mage::app()->getRequest()->getParams());
36
 
37
  /** @var $api Smartbear_Alertsite_Model_AlertsiteApi */
58
 
59
  }
60
 
61
+ public function advancedEditAction()
62
+ {
63
+ $valid = true;
64
+
65
+ $formValues = new Varien_Object(Mage::app()->getRequest()->getParams());
66
+
67
+ /** @var $api Smartbear_Alertsite_Model_AlertsiteApi */
68
+ $api = Mage::getModel('alertsite/alertsiteapi');
69
+
70
+ //Let's first check to be sure that the data isn't all the same
71
+ if($formValues->getBasicSiteId() == $api->getDeviceId() &&
72
+ $formValues->getDejaUrlId() == $api->getDejaclickDeviceId() &&
73
+ strtolower($formValues->getLoginEmail()) == strtolower($api->getUsername()) &&
74
+ $formValues->getPassword() == $api->getPassword())
75
+ {
76
+ Mage::getSingleton('adminhtml/session')->addSuccess("All settings identical");
77
+ $this->getResponse()->setRedirect(Mage::getModel('adminhtml/url')->getUrl('*/alertsite/advance'));
78
+ }
79
+
80
+ //Check to make sure all form fields are set before continueing
81
+ if(!$formValues->getBasicSiteId() || !$formValues->getDejaUrlId() || !$formValues->getLoginEmail() || !$formValues->getPassword())
82
+ {
83
+ Mage::getSingleton('adminhtml/session')->addError('All fields are required to recover/update your account');
84
+ $valid = false;
85
+ }
86
+
87
+ //We have all required fields, now let's check them all
88
+ if($valid)
89
+ {
90
+ //First we'll chek to be sure we can login with the username/password provided
91
+ $valid = $api->login($formValues->getLoginEmail(), $formValues->getPassword());
92
+
93
+ if(!$valid)
94
+ {
95
+ Mage::getSingleton('adminhtml/session')->addError('Unable to login with provided Login Email and Account Password values - please check');
96
+ }
97
+ }
98
+
99
+ //Then we'll check each DejaClick and Device ID to be sure they exist and are enabled
100
+ if($valid)
101
+ {
102
+ $valid = $api->verifyDejaDevice($formValues->getDejaUrlId(), $formValues->getLoginEmail());
103
+ if(!$valid)
104
+ {
105
+ Mage::getSingleton('adminhtml/session')->addError("Problem with DejaClick Device ID - " . $api->getErrorMessage());
106
+ }
107
+ }
108
+
109
+ if($valid)
110
+ {
111
+ $valid = $api->verifySiteDevice($formValues->getBasicSiteId(), $formValues->getLoginEmail());
112
+ if(!$valid)
113
+ {
114
+ Mage::getSingleton('adminhtml/session')->addError("Problem with Site Device ID - " . $api->getErrorMessage());
115
+ }
116
+ }
117
+
118
+ if(!$valid)
119
+ {
120
+ Mage::getSingleton('core/session')->setFormData($formValues);
121
+ $this->getResponse()->setRedirect(Mage::getModel('adminhtml/url')->getUrl('*/alertsite/advance'));
122
+ }
123
+ else
124
+ {
125
+ //We've validated their account details, now we need to actually save the information to the config
126
+ //$api->getApiReturnData()->
127
+ $api->setCustId((string)$api->getApiReturnData()->Request->Custid);
128
+ $api->setLogin(strtolower($formValues->getLoginEmail()));
129
+ $api->setPass($formValues->getPassword());
130
+ $api->setSiteUrl((string)$api->getApiReturnData()->Request->Device->Descrip);
131
+ $api->setSiteId($formValues->getBasicSiteId());
132
+ $api->setDejaId($formValues->getDejaUrlId());
133
+
134
+ $api->save();
135
+
136
+ Mage::getSingleton('adminhtml/session')->addSuccess("AlertSite configuration saved");
137
+ $this->getResponse()->setRedirect(Mage::getModel('adminhtml/url')->getUrl('*/alertsite/advance'));
138
+ }
139
+
140
+ }
141
+
142
  /**
143
  * todo: delete this?
144
  *
180
  $this->getResponse()->setRedirect($configUrl);
181
  }
182
 
183
+ public function scatterplotAction()
184
+ {
185
+ if(!Mage::helper('alertsite')->isSetup())
186
+ {
187
+ $message = $this->__('You have not yet created your account.');
188
+ Mage::getSingleton('adminhtml/session')->addError($message);
189
+ $url = Mage::getUrl('adminhtml/system_config/edit', array('section' => 'alertsite'));
190
+ $this->getResponse()->setRedirect($url);
191
+ return;
192
+ }
193
+
194
+ $this->_title($this->__('Scatter Plot - AlertSite'));
195
+ $this->loadLayout();
196
+ $this->renderLayout();
197
+ }
198
+
199
+ public function benchmarkAction()
200
+ {
201
+ if(!Mage::helper('alertsite')->isSetup())
202
+ {
203
+ $message = $this->__('You have not yet created your account.');
204
+ Mage::getSingleton('adminhtml/session')->addError($message);
205
+ $url = Mage::getUrl('adminhtml/system_config/edit', array('section' => 'alertsite'));
206
+ $this->getResponse()->setRedirect($url);
207
+ return;
208
+ }
209
+
210
+ $this->_title($this->__('Benchmarks - AlertSite'));
211
+ $this->loadLayout();
212
+ $this->renderLayout();
213
+ }
214
+
215
 
216
  }
app/code/community/Smartbear/Alertsite/etc/adminhtml.xml CHANGED
@@ -1,21 +1,25 @@
1
  <?xml version="1.0"?>
2
  <config>
3
- <!--<menu>-->
4
- <!--<report>-->
5
- <!--<children>-->
6
- <!--<alertsite translate="title" module="alertsite">-->
7
- <!--<title>SmartBear</title>-->
8
- <!--<children>-->
9
- <!--<alertsite translate="title" module="review">-->
10
- <!--<title>AlertSite Report</title>-->
11
- <!--<action>adminhtml/alertsite/index/</action>-->
12
- <!--</alertsite>-->
13
- <!--</children>-->
14
- <!--<sort_order>50</sort_order>-->
15
- <!--</alertsite>-->
16
- <!--</children>-->
17
- <!--</report>-->
18
- <!--</menu>-->
 
 
 
 
19
 
20
  <layout>
21
  <updates>
@@ -32,20 +36,20 @@
32
  </all>
33
  <admin>
34
  <children>
35
- <!--<system>-->
36
- <!--<children>-->
37
- <!--<alertsite module="alertsite">-->
38
- <!--<title>SmartBear AlertSite Report</title>-->
39
- <!--<sort_order>10</sort_order>-->
40
- <!--</alertsite>-->
41
- <!--</children>-->
42
- <!--</system>-->
43
  <system>
44
  <children>
45
  <config>
46
  <children>
47
  <alertsite module="alertsite">
48
- <title>SmartBear AlertSite Configuration</title>
49
  </alertsite>
50
  </children>
51
  </config>
1
  <?xml version="1.0"?>
2
  <config>
3
+ <menu>
4
+ <report>
5
+ <children>
6
+ <alertsite translate="title" module="alertsite">
7
+ <title>AlertSite</title>
8
+ <children>
9
+ <benchmark translate="title" module="review">
10
+ <title>Benchmark Report</title>
11
+ <action>adminhtml/alertsite/benchmark/</action>
12
+ </benchmark>
13
+ <scatterplot translate="title" module="review">
14
+ <title>Scatter Plot Report</title>
15
+ <action>adminhtml/alertsite/scatterplot/</action>
16
+ </scatterplot>
17
+ </children>
18
+ <sort_order>50</sort_order>
19
+ </alertsite>
20
+ </children>
21
+ </report>
22
+ </menu>
23
 
24
  <layout>
25
  <updates>
36
  </all>
37
  <admin>
38
  <children>
39
+ <system>
40
+ <children>
41
+ <alertsite module="alertsite">
42
+ <title>AlertSite Report</title>
43
+ <sort_order>10</sort_order>
44
+ </alertsite>
45
+ </children>
46
+ </system>
47
  <system>
48
  <children>
49
  <config>
50
  <children>
51
  <alertsite module="alertsite">
52
+ <title>AlertSite Configuration</title>
53
  </alertsite>
54
  </children>
55
  </config>
app/code/community/Smartbear/Alertsite/etc/system.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <sections>
4
  <alertsite translate="label">
5
- <label>SmartBear AlertSite</label>
6
  <tab>service</tab>
7
  <frontend_type>text</frontend_type>
8
  <sort_order>400</sort_order>
@@ -11,17 +11,26 @@
11
  <show_in_store>1</show_in_store>
12
  <groups>
13
  <alertsite_config translate="label">
14
- <label>SmartBear AlertSite Configuration</label>
15
  <sort_order>5</sort_order>
16
  <show_in_default>1</show_in_default>
17
  <show_in_website>1</show_in_website>
18
  <show_in_store>1</show_in_store>
19
  <expanded>1</expanded>
20
  <fields>
 
 
 
 
 
 
 
 
 
21
  <smartbear_account_header translate="label">
22
  <label>Register</label>
23
  <frontend_model>alertsite/adminhtml_system_form_renderer_configMessage</frontend_model>
24
- <comment>AlertSite will help you make sure your webstore is available and performing well. Just click the button below to register for your free account.</comment>
25
  <sort_order>2</sort_order>
26
  <show_in_default>1</show_in_default>
27
  <show_in_website>0</show_in_website>
@@ -45,7 +54,7 @@
45
  </depends>
46
  </smartbear_account_button>
47
  <enabled translate="label">
48
- <label><![CDATA[Enable SmartBear AlertSite]]></label>
49
  <frontend_type>select</frontend_type>
50
  <source_model>adminhtml/system_config_source_yesno</source_model>
51
  <backend_model>alertsite/system_config_backend_enable</backend_model>
@@ -60,7 +69,6 @@
60
  <alertsite_user translate="label">
61
  <label><![CDATA[AlertSite Account Login]]></label>
62
  <frontend_type>text</frontend_type>
63
- <frontend_model>alertsite/adminhtml_system_form_renderer_label</frontend_model>
64
  <sort_order>10</sort_order>
65
  <show_in_default>1</show_in_default>
66
  <show_in_website>0</show_in_website>
@@ -69,11 +77,46 @@
69
  <provisioned>1</provisioned>
70
  </depends>
71
  </alertsite_user>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  <alertsite_phone>
73
  <label><![CDATA[AlertSite Account Phone]]></label>
74
  <frontend_type>text</frontend_type>
75
- <sort_order>15</sort_order>
76
- <show_in_default>0</show_in_default>
 
77
  <show_in_website>0</show_in_website>
78
  <show_in_store>0</show_in_store>
79
  <depends>
@@ -88,6 +131,18 @@
88
  <show_in_website>0</show_in_website>
89
  <show_in_store>0</show_in_store>
90
  </alertsite_pass>
 
 
 
 
 
 
 
 
 
 
 
 
91
  <alertsite_activation_email translate="label">
92
  <label><![CDATA[Activation Email]]></label>
93
  <frontend_type>text</frontend_type>
@@ -120,18 +175,6 @@
120
  <show_in_website>0</show_in_website>
121
  <show_in_store>0</show_in_store>
122
  </dejaclick_device_id>
123
- <device_description>
124
- <label><![CDATA[Website Description]]></label>
125
- <frontend_model>alertsite/adminhtml_system_form_renderer_deviceDescription</frontend_model>
126
- <comment></comment>
127
- <sort_order>45</sort_order>
128
- <show_in_default>1</show_in_default>
129
- <show_in_website>0</show_in_website>
130
- <show_in_store>0</show_in_store>
131
- <depends>
132
- <provisioned>1</provisioned>
133
- </depends>
134
- </device_description>
135
  <device_url>
136
  <label><![CDATA[Website URL]]></label>
137
  <frontend_type>text</frontend_type>
2
  <config>
3
  <sections>
4
  <alertsite translate="label">
5
+ <label>AlertSite</label>
6
  <tab>service</tab>
7
  <frontend_type>text</frontend_type>
8
  <sort_order>400</sort_order>
11
  <show_in_store>1</show_in_store>
12
  <groups>
13
  <alertsite_config translate="label">
14
+ <label>AlertSite Configuration</label>
15
  <sort_order>5</sort_order>
16
  <show_in_default>1</show_in_default>
17
  <show_in_website>1</show_in_website>
18
  <show_in_store>1</show_in_store>
19
  <expanded>1</expanded>
20
  <fields>
21
+ <smartbear_account_subheader translate="label">
22
+ <label>Register</label>
23
+ <frontend_model>alertsite/adminhtml_system_form_renderer_subheader</frontend_model>
24
+ <comment><![CDATA[<a href="http://help.alertsite.com/AlertSite/MagentoHelp" target="_blank">Get help</a>]]></comment>
25
+ <sort_order>1</sort_order>
26
+ <show_in_default>1</show_in_default>
27
+ <show_in_website>0</show_in_website>
28
+ <show_in_store>0</show_in_store>
29
+ </smartbear_account_subheader>
30
  <smartbear_account_header translate="label">
31
  <label>Register</label>
32
  <frontend_model>alertsite/adminhtml_system_form_renderer_configMessage</frontend_model>
33
+ <comment><![CDATA[<br /><p>Optimizing store performance and availability is critical to your revenue. Complete registration by clicking the button below and get your free AlertSite web monitoring services.</p><p>We'll monitor site availability and performance and show how you stack up against other leading sites.</p>]]></comment>
34
  <sort_order>2</sort_order>
35
  <show_in_default>1</show_in_default>
36
  <show_in_website>0</show_in_website>
54
  </depends>
55
  </smartbear_account_button>
56
  <enabled translate="label">
57
+ <label><![CDATA[Enable AlertSite]]></label>
58
  <frontend_type>select</frontend_type>
59
  <source_model>adminhtml/system_config_source_yesno</source_model>
60
  <backend_model>alertsite/system_config_backend_enable</backend_model>
69
  <alertsite_user translate="label">
70
  <label><![CDATA[AlertSite Account Login]]></label>
71
  <frontend_type>text</frontend_type>
 
72
  <sort_order>10</sort_order>
73
  <show_in_default>1</show_in_default>
74
  <show_in_website>0</show_in_website>
77
  <provisioned>1</provisioned>
78
  </depends>
79
  </alertsite_user>
80
+ <alertsite_company translate="label">
81
+ <label><![CDATA[Company]]></label>
82
+ <frontend_type>text</frontend_type>
83
+ <frontend_model>alertsite/adminhtml_system_form_renderer_label</frontend_model>
84
+ <sort_order>12</sort_order>
85
+ <show_in_default>1</show_in_default>
86
+ <show_in_website>0</show_in_website>
87
+ <show_in_store>0</show_in_store>
88
+ <depends>
89
+ <provisioned>1</provisioned>
90
+ </depends>
91
+ </alertsite_company>
92
+ <alertsite_first_name translate="label">
93
+ <label><![CDATA[First Name]]></label>
94
+ <frontend_type>text</frontend_type>
95
+ <sort_order>14</sort_order>
96
+ <show_in_default>1</show_in_default>
97
+ <show_in_website>0</show_in_website>
98
+ <show_in_store>0</show_in_store>
99
+ <depends>
100
+ <provisioned>1</provisioned>
101
+ </depends>
102
+ </alertsite_first_name>
103
+ <alertsite_last_name translate="label">
104
+ <label><![CDATA[Last Name]]></label>
105
+ <frontend_type>text</frontend_type>
106
+ <sort_order>16</sort_order>
107
+ <show_in_default>1</show_in_default>
108
+ <show_in_website>0</show_in_website>
109
+ <show_in_store>0</show_in_store>
110
+ <depends>
111
+ <provisioned>1</provisioned>
112
+ </depends>
113
+ </alertsite_last_name>
114
  <alertsite_phone>
115
  <label><![CDATA[AlertSite Account Phone]]></label>
116
  <frontend_type>text</frontend_type>
117
+ <backend_model>alertsite/system_config_backend_editaccount</backend_model>
118
+ <sort_order>18</sort_order>
119
+ <show_in_default>1</show_in_default>
120
  <show_in_website>0</show_in_website>
121
  <show_in_store>0</show_in_store>
122
  <depends>
131
  <show_in_website>0</show_in_website>
132
  <show_in_store>0</show_in_store>
133
  </alertsite_pass>
134
+ <smartbear_account_advance_link>
135
+ <label/>
136
+ <frontend_model>alertsite/adminhtml_system_form_renderer_advanceLink</frontend_model>
137
+ <comment></comment>
138
+ <sort_order>100</sort_order>
139
+ <show_in_default>1</show_in_default>
140
+ <show_in_website>0</show_in_website>
141
+ <show_in_store>0</show_in_store>
142
+ <depends>
143
+ <provisioned>1</provisioned>
144
+ </depends>
145
+ </smartbear_account_advance_link>
146
  <alertsite_activation_email translate="label">
147
  <label><![CDATA[Activation Email]]></label>
148
  <frontend_type>text</frontend_type>
175
  <show_in_website>0</show_in_website>
176
  <show_in_store>0</show_in_store>
177
  </dejaclick_device_id>
 
 
 
 
 
 
 
 
 
 
 
 
178
  <device_url>
179
  <label><![CDATA[Website URL]]></label>
180
  <frontend_type>text</frontend_type>
app/design/adminhtml/default/default/layout/alertsite.xml CHANGED
@@ -1,4 +1,5 @@
1
  <?xml version="1.0"?>
 
2
  <layout>
3
  <default>
4
  <reference name="notifications">
@@ -8,7 +9,9 @@
8
 
9
  <smartbear_adminhtml_index>
10
  <reference name="content">
11
- <block type="alertsite/adminhtml_smartbear" name="smartbear" />
 
 
12
  </reference>
13
  </smartbear_adminhtml_index>
14
 
@@ -19,20 +22,62 @@
19
  <action method="addJs"><name>smartbear/alertsite/alertsite.js</name></action>
20
  </reference>
21
  <reference name="content">
22
- <block type="alertsite/adminhtml_create" name="smartbear.create" template="alertsite/create.phtml" />
 
 
23
  </reference>
24
  <reference name="left">
25
  <block type="adminhtml/system_config_switcher" name="adminhtml.system.config.switcher" before="-"/>
26
  </reference>
27
  </adminhtml_alertsite_create>
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  <adminhtml_dashboard_index>
30
  <reference name="head">
31
  <action method="addCss"><name>smartbear/alertsite/css/alertsite.css</name></action>
32
  </reference>
33
  </adminhtml_dashboard_index>
34
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  </layout>
1
  <?xml version="1.0"?>
2
+
3
  <layout>
4
  <default>
5
  <reference name="notifications">
9
 
10
  <smartbear_adminhtml_index>
11
  <reference name="content">
12
+ <block type="alertsite/adminhtml_smartbear" name="smartbear">
13
+ <block type="core/template" template="alertsite/subheader.phtml" name="alertsite.subheader"></block>
14
+ </block>
15
  </reference>
16
  </smartbear_adminhtml_index>
17
 
22
  <action method="addJs"><name>smartbear/alertsite/alertsite.js</name></action>
23
  </reference>
24
  <reference name="content">
25
+ <block type="alertsite/adminhtml_create" name="smartbear.create" template="alertsite/create.phtml">
26
+ <block type="core/template" template="alertsite/subheader.phtml" name="alertsite.subheader"></block>
27
+ </block>
28
  </reference>
29
  <reference name="left">
30
  <block type="adminhtml/system_config_switcher" name="adminhtml.system.config.switcher" before="-"/>
31
  </reference>
32
  </adminhtml_alertsite_create>
33
 
34
+ <adminhtml_alertsite_advance>
35
+ <reference name="head">
36
+ <action method="addCss"><name>smartbear/alertsite/css/alertsite.css</name></action>
37
+ <action method="addJs"><name>smartbear/alertsite/jquery.min.js</name></action>
38
+ <action method="addJs"><name>smartbear/alertsite/alertsite.js</name></action>
39
+ </reference>
40
+ <reference name="content">
41
+ <block type="alertsite/adminhtml_advance" name="smartbear.advance" template="alertsite/advance.phtml">
42
+ <block type="core/template" template="alertsite/subheader.phtml" name="alertsite.subheader"></block>
43
+ </block>
44
+ </reference>
45
+ <reference name="left">
46
+ <block type="adminhtml/system_config_switcher" name="adminhtml.system.config.switcher" before="-"/>
47
+ </reference>
48
+ </adminhtml_alertsite_advance>
49
+
50
  <adminhtml_dashboard_index>
51
  <reference name="head">
52
  <action method="addCss"><name>smartbear/alertsite/css/alertsite.css</name></action>
53
  </reference>
54
  </adminhtml_dashboard_index>
55
 
56
+ <adminhtml_alertsite_scatterplot>
57
+ <reference name="head">
58
+ <action method="addCss"><name>smartbear/alertsite/css/alertsite.css</name></action>
59
+ <action method="addJs"><name>smartbear/alertsite/alertsite.js</name></action>
60
+ </reference>
61
+ <reference name="content">
62
+ <block type="alertsite/adminhtml_report" name="smartbear.create" template="alertsite/scatterplot.phtml">
63
+ <block type="core/template" template="alertsite/subheader.phtml" name="alertsite.subheader"></block>
64
+ <action method="setReportType"><param1>scatterplot</param1></action>
65
+ </block>
66
+ </reference>
67
+ </adminhtml_alertsite_scatterplot>
68
 
69
 
70
+ <adminhtml_alertsite_benchmark>
71
+ <reference name="head">
72
+ <action method="addCss"><name>smartbear/alertsite/css/alertsite.css</name></action>
73
+ <action method="addJs"><name>smartbear/alertsite/alertsite.js</name></action>
74
+ </reference>
75
+ <reference name="content">
76
+ <block type="alertsite/adminhtml_report" name="smartbear.create" template="alertsite/benchmark.phtml">
77
+ <block type="core/template" template="alertsite/subheader.phtml" name="alertsite.subheader"></block>
78
+ <action method="setReportType"><param1>benchmark</param1></action>
79
+ </block>
80
+ </reference>
81
+ </adminhtml_alertsite_benchmark>
82
 
83
  </layout>
app/design/adminhtml/default/default/template/alertsite/advance.phtml ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /** @var $this Smartbear_Alertsite_Block_Adminhtml_Create */ ?>
2
+ <div class="main-col-inner">
3
+ <div id="messages">
4
+
5
+ </div>
6
+
7
+ <div class="content-header">
8
+ <table cellspacing="0">
9
+ <tbody>
10
+ <tr>
11
+ <td>
12
+ <h3>AlertSite - Account Recovery/Edit</h3>
13
+ </td>
14
+ </tr>
15
+ </tbody>
16
+ </table>
17
+ </div>
18
+
19
+
20
+ <div class="entry-edit">
21
+ <div class="entry-edit-head">
22
+ <h4 class="icon-head head-edit-form fieldset-legend">New AlertSite Account Information</h4>
23
+ </div>
24
+ <div class="fieldset">
25
+ <?php echo $this->getChildHtml('alertsite.subheader'); ?>
26
+ <form action="<?php echo $this->getFormAction(); ?>" method="post" id="alertsite-provision" >
27
+ <table class="form-list">
28
+ <input name="form_key" type="hidden" value="<?php echo $this->getFormKey(); ?>">
29
+ <tr>
30
+ <td class="label">
31
+ <label for="login_email" style="">Login Email <span class="required">*</span><br /><em>(Email is Case Sensitive)</em></label>
32
+ </td>
33
+ <td class="value">
34
+ <input id="login_email" autocomplete="off" class="validate-email input-text" name="login_email" value="<?php echo $this->getUsername(); ?>" type="text">
35
+ </td>
36
+ </tr>
37
+ <tr>
38
+ <td class="label">
39
+ <label for="password" style="">Account Password <span class="required">*</span> <br /><em>(Password is case sensitive)</em></label>
40
+ </td>
41
+ <td class="value">
42
+ <input id="password" autocomplete="off" name="password" class="input-text" type="password" value="<?php echo $this->getPassword(); ?>">
43
+ </td>
44
+ </tr>
45
+ <tr>
46
+ <td class="label">
47
+ <label for="basic_site_id" style="">Basic Site ID <span class="required">*</span></label>
48
+ </td>
49
+ <td class="value">
50
+ <input id="basic_site_id" autocomplete="off" name="basic_site_id" class="input-text" value="<?php echo $this->getSiteDeviceId(); ?>" type="text">
51
+ </td>
52
+ </tr>
53
+ <tr>
54
+ <td class="label">
55
+ <label for="deja_url_id" style="">Deja URL ID <span class="required">*</span></label>
56
+ </td>
57
+ <td class="value">
58
+ <input id="deja_url_id" autocomplete="off" name="deja_url_id" class="input-text" type="text" value="<?php echo $this->getDejaclickDeviceId(); ?>">
59
+ </td>
60
+ </tr>
61
+
62
+
63
+ <tr>
64
+ <td colspan="2"><br /></td>
65
+ </tr>
66
+
67
+ <tr>
68
+ <td>
69
+ <br />
70
+ <button type="submit" class="button"><span>Save AlertSite Account</span>&nbsp;<img style="position:relative; top:3px;" class="smartbear-icon" src="<?php echo $this->getSkinUrl($this->__('smartbear/alertsite/images/alertsite_15_icon.png')); ?>" alt="AlertSite" /></button>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </form>
75
+ </div>
76
+ </div>
77
+ </div>
app/design/adminhtml/default/default/template/alertsite/benchmark.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /** @var $this Smartbear_Alertsite_Block_Adminhtml_Report */ ?>
2
+
3
+ <div class="main-col-inner">
4
+
5
+ <div class="content-header">
6
+ <table cellspacing="0">
7
+ <tbody>
8
+ <tr>
9
+ <td>
10
+ <h3>Benchmarks</h3>
11
+ </td>
12
+ </tr>
13
+ </tbody>
14
+ </table>
15
+ </div>
16
+ <?php echo $this->getChildHtml('alertsite.subheader'); ?>
17
+
18
+
19
+ <div id="alertsite-report" style="width:600px;height:150px;">
20
+
21
+ </div>
22
+
23
+ <script type="text/javascript" src="http://www.alertsite.com/js/bundles/external_charts-app-min.js"></script>
24
+ <script type="text/javascript">
25
+ var alertsiteOptions = <?php echo $this->getConfigJson(); ?>;
26
+ alertsiteOptions.container = '#alertsite-report';
27
+ alertsiteOptions.device = '<?php echo $this->getDejaclickDeviceId(); ?>';
28
+ var benchmark_plot = new sb_external_Benchmark(alertsiteOptions);
29
+ </script>
30
+
31
+ </div>
app/design/adminhtml/default/default/template/alertsite/create.phtml CHANGED
@@ -9,18 +9,20 @@
9
  <tbody>
10
  <tr>
11
  <td>
12
- <h3>SmartBear AlertSite Account Creation</h3>
13
  </td>
14
  </tr>
15
  </tbody>
16
  </table>
17
  </div>
18
 
 
19
  <div class="entry-edit">
20
  <div class="entry-edit-head">
21
- <h4 class="icon-head head-edit-form fieldset-legend">New SmartBear AlertSite Account Information</h4>
22
  </div>
23
  <div class="fieldset">
 
24
  <form action="<?php echo $this->getFormAction(); ?>" method="post" id="alertsite-provision" >
25
  <table class="form-list">
26
  <input name="form_key" type="hidden" value="<?php echo $this->getFormKey(); ?>">
@@ -74,13 +76,13 @@
74
  </tr>
75
 
76
  <tr>
77
- <td colspan="2"><br /><strong>Creating a free AlertSite by SmartBear account indicates you accept <a href="http://www.alertsite.com/magento_extension_terms.shtml" target="_blank" >our user terms</a></strong><br /></td>
78
  </tr>
79
 
80
  <tr>
81
  <td>
82
  <br />
83
- <button type="submit" class="button"><span>Create AlertSite Account</span></button>
84
  </td>
85
  </tr>
86
  </table>
9
  <tbody>
10
  <tr>
11
  <td>
12
+ <h3>AlertSite Account Creation</h3>
13
  </td>
14
  </tr>
15
  </tbody>
16
  </table>
17
  </div>
18
 
19
+
20
  <div class="entry-edit">
21
  <div class="entry-edit-head">
22
+ <h4 class="icon-head head-edit-form fieldset-legend">New AlertSite Account Information</h4>
23
  </div>
24
  <div class="fieldset">
25
+ <?php echo $this->getChildHtml('alertsite.subheader'); ?>
26
  <form action="<?php echo $this->getFormAction(); ?>" method="post" id="alertsite-provision" >
27
  <table class="form-list">
28
  <input name="form_key" type="hidden" value="<?php echo $this->getFormKey(); ?>">
76
  </tr>
77
 
78
  <tr>
79
+ <td colspan="2"><br /><strong>Creating a free AlertSite account indicates you accept <a href="http://www.alertsite.com/magento_extension_terms.shtml" target="_blank" >our user terms</a></strong><br /></td>
80
  </tr>
81
 
82
  <tr>
83
  <td>
84
  <br />
85
+ <button type="submit" class="button"><span>Create AlertSite Account</span>&nbsp;<img style="position:relative; top:3px;" class="smartbear-icon" src="<?php echo $this->getSkinUrl($this->__('smartbear/alertsite/images/alertsite_15_icon.png')); ?>" alt="AlertSite" /></button>
86
  </td>
87
  </tr>
88
  </table>
app/design/adminhtml/default/default/template/alertsite/dashboard.phtml CHANGED
@@ -1,17 +1,22 @@
1
- <?php /** @var $this Smartbear_Alertsite_Block_Adminhtml_Dashboard */ ?>
 
 
 
2
  </fieldset></div>
3
 
4
  <div class="entry-edit">
5
- <div class="entry-edit-head"><h4><img style="position:relative; top:3px;" class="smartbear-icon" src="<?php echo $this->getSkinUrl($this->__('smartbear/alertsite/images/smartbear_15_icon.png')); ?>" alt="SmartBear" />&nbsp;SmartBear AlertSite Status</h4></div>
6
  <fieldset class="np">
 
7
  <div class="alertsite-dashboard-box">
8
 
 
9
  <?php if($this->getStatusCode() === "0"){ ?>
10
- <img style="position:relative; top:3px;" class="smartbear-status-icon" src="<?php echo $this->getSkinUrl($this->__('smartbear/alertsite/images/smartbear_great.png')); ?>" alt="SmartBear" />
11
  <?php }else if($this->getStatusCode() === "1" || $this->getStatusCode() === "2" || $this->getStatusCode() === "3" ||$this->getStatusCode() === "6"){ ?>
12
- <img style="position:relative; top:3px;" class="smartbear-status-icon" src="<?php echo $this->getSkinUrl($this->__('smartbear/alertsite/images/smartbear_warning.png')); ?>" alt="SmartBear" />
13
  <?php }else{ ?>
14
- <img style="position:relative; top:3px;" class="smartbear-status-icon" src="<?php echo $this->getSkinUrl($this->__('smartbear/alertsite/images/smartbear_notice.png')); ?>" alt="SmartBear" />
15
  <?php } ?>
16
 
17
  <div class="alertsite-friendly-status">
@@ -31,6 +36,17 @@
31
  <br />
32
  </div>
33
  <div class="clear"></div>
 
 
 
 
 
 
 
 
 
 
 
34
  </div>
35
  </fieldset>
36
- </div>
1
+ <?php /** @var $this Smartbear_Alertsite_Block_Adminhtml_Dashboard */
2
+ /** @var $_helper Smartbear_Alertsite_Helper_Data */
3
+ $_helper = Mage::helper('alertsite');
4
+ ?>
5
  </fieldset></div>
6
 
7
  <div class="entry-edit">
8
+ <div class="entry-edit-head"><h4><img style="position:relative; top:3px;" class="smartbear-icon" src="<?php echo $this->getSkinUrl($this->__('smartbear/alertsite/images/alertsite_15_icon.png')); ?>" alt="AlertSite" />&nbsp;AlertSite Status</h4></div>
9
  <fieldset class="np">
10
+ <?php echo $this->getChildHtml('alertsite.subheader'); ?>
11
  <div class="alertsite-dashboard-box">
12
 
13
+
14
  <?php if($this->getStatusCode() === "0"){ ?>
15
+ <img style="position:relative; top:3px;" class="smartbear-status-icon" src="<?php echo $this->getSkinUrl($this->__('smartbear/alertsite/images/smartbear_great.png')); ?>" alt="AlertSite" />
16
  <?php }else if($this->getStatusCode() === "1" || $this->getStatusCode() === "2" || $this->getStatusCode() === "3" ||$this->getStatusCode() === "6"){ ?>
17
+ <img style="position:relative; top:3px;" class="smartbear-status-icon" src="<?php echo $this->getSkinUrl($this->__('smartbear/alertsite/images/smartbear_warning.png')); ?>" alt="AlertSite" />
18
  <?php }else{ ?>
19
+ <img style="position:relative; top:3px;" class="smartbear-status-icon" src="<?php echo $this->getSkinUrl($this->__('smartbear/alertsite/images/smartbear_notice.png')); ?>" alt="AlertSite" />
20
  <?php } ?>
21
 
22
  <div class="alertsite-friendly-status">
36
  <br />
37
  </div>
38
  <div class="clear"></div>
39
+ <div class="smartbear-status-links">
40
+ <span>View reports:&nbsp;</span>
41
+ <ul class="">
42
+ <li>
43
+ <a href="<?php echo $_helper->getBenchmarkUrl(); ?>">Benchmark</a>
44
+ </li>
45
+ <li>
46
+ <a href="<?php echo $_helper->getScatterPlotUrl(); ?>">Scatter Plot</a>
47
+ </li>
48
+ </ul>
49
+ </div>
50
  </div>
51
  </fieldset>
52
+ </div>
app/design/adminhtml/default/default/template/alertsite/linkbutton.phtml CHANGED
@@ -4,7 +4,9 @@
4
  */
5
  /** @var $this Smartbear_Alertsite_Block_Adminhtml_System_Form_Renderer_LinkButton */
6
  ?>
7
- <button style="" onclick="window.location='<?php echo Mage::getModel('adminhtml/url')->getUrl('*/alertsite/create'); ?>'; return false;" class="scalable add" type="button" id="<?php echo $this->getHtmlId() ?>">
8
  <span><?php echo $this->escapeHtml($this->getButtonLabel()); ?></span>
 
9
  </button>
10
- </form>
 
4
  */
5
  /** @var $this Smartbear_Alertsite_Block_Adminhtml_System_Form_Renderer_LinkButton */
6
  ?>
7
+ <button style="margin:0 0 4px 1px;" onclick="window.location='<?php echo Mage::getModel('adminhtml/url')->getUrl('*/alertsite/create'); ?>'; return false;" class="scalable add" type="button" id="<?php echo $this->getHtmlId() ?>">
8
  <span><?php echo $this->escapeHtml($this->getButtonLabel()); ?></span>
9
+ <img style="position:relative; top:3px;" class="smartbear-icon" src="<?php echo $this->getSkinUrl($this->__('smartbear/alertsite/images/alertsite_15_icon.png')); ?>" alt="AlertSite" />
10
  </button>
11
+ <br />
12
+ <a style="margin-top:4px;" href="<?php echo Mage::getModel('adminhtml/url')->getUrl('*/alertsite/advance'); ?>">(I already have an AlertSite account)</a>
app/design/adminhtml/default/default/template/alertsite/notifications.phtml CHANGED
@@ -6,6 +6,6 @@
6
  ?>
7
  <?php if($this->isRequiredSettingsNotification()):?>
8
  <div class="notification-global" id="notification">
9
- <strong><?php echo $this->__('Thank you for installing the AlertSite Extension – Create your free AlertSite account <a href="%s">here</a>.', $this->getManageUrl());?></strong>
10
  </div>
11
  <?php endif;?>
6
  ?>
7
  <?php if($this->isRequiredSettingsNotification()):?>
8
  <div class="notification-global" id="notification">
9
+ <strong><?php echo $this->__('Thank you for installing the AlertSite Extension – Create your free account <a href="%s">here</a>.', $this->getManageUrl());?></strong>
10
  </div>
11
  <?php endif;?>
app/design/adminhtml/default/default/template/alertsite/scatterplot.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /** @var $this Smartbear_Alertsite_Block_Adminhtml_Report */ ?>
2
+
3
+ <div class="main-col-inner">
4
+
5
+ <div class="content-header">
6
+ <table cellspacing="0">
7
+ <tbody>
8
+ <tr>
9
+ <td>
10
+ <h3>Scatter Plot</h3>
11
+ </td>
12
+ </tr>
13
+ </tbody>
14
+ </table>
15
+ </div>
16
+ <?php echo $this->getChildHtml('alertsite.subheader'); ?>
17
+
18
+ <div id="alertsite-report" style="width:600px;height:150px;">
19
+
20
+ </div>
21
+
22
+ <script type="text/javascript" src="http://www.alertsite.com/js/bundles/external_charts-app-min.js"></script>
23
+ <script type="text/javascript">
24
+ var alertsiteOptions = <?php echo $this->getConfigJson(); ?>;
25
+ alertsiteOptions.container = '#alertsite-report';
26
+ alertsiteOptions.device = '<?php echo $this->getSiteDeviceId(); ?>';
27
+ var scatter_plot = new sb_external_Scatter(alertsiteOptions);
28
+
29
+ </script>
30
+
31
+ </div>
app/design/adminhtml/default/default/template/alertsite/subheader.phtml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <ul class="alertsite-subheader">
2
+ <li><a href="http://help.alertsite.com/AlertSite/MagentoHelp" target="_blank">Get help</a></li>
3
+ </ul>
4
+ <div class='clear'></div>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>smartbear_alertsite</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.alertsite.com/order_terms_agreement.shtml">Free</license>
7
  <channel>community</channel>
@@ -9,11 +9,19 @@
9
  <summary>The AlertSite for Magento extension provides a free service to monitor store availability and performance from the end-user perspective.</summary>
10
  <description>Delivering fast, feel-good customer experiences from your online store is critical to your success. The data overwhelmingly shows that if your site is unavailable or the functionality is slow or inconsistent, your users may go elsewhere. To ensure your website performs optimally, you need to see what your customers see.&#xD;
11
  The AlertSite for Magento extension offers Magento users a Free service to measure store availability and performance that's completely integrated into the Magento user interface.</description>
12
- <notes>This is the initial release of AlertSite for Magento.</notes>
 
 
 
 
 
 
 
 
13
  <authors><author><name>SmartBear Software</name><user>Kgodskind</user><email>magento-extension@SmartBear.com</email></author></authors>
14
- <date>2013-02-01</date>
15
- <time>21:57:18</time>
16
- <contents><target name="magecommunity"><dir name="Smartbear"><dir name="Alertsite"><dir name="Block"><dir name="Adminhtml"><file name="Create.php" hash="b3436c12db0dcc9138a37ca0479ea622"/><file name="Dashboard.php" hash="1c95a6dabc323b54c0f41fe802818756"/><file name="Notifications.php" hash="e6ee80fb6a4d2d671774548ba31e557e"/><file name="Smartbear.php" hash="4f294b360278d140b23c82050b1d964e"/><dir name="System"><dir name="Form"><dir name="Renderer"><file name="ConfigMessage.php" hash="df00daab83b9178424c704b9c6e5ce2f"/><file name="DeviceDescription.php" hash="906fcdda396b0a761aeb169498ef66c3"/><file name="Label.php" hash="184619f752eb3bf52d6da7af2e61dc02"/><file name="LinkButton.php" hash="9fd9bc004a0a5bb98f93ba3a96d296c9"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="89e3e48e7f2c5bbb974766eb9e7f9817"/></dir><dir name="Model"><file name="Alertsiteapi.php" hash="e859710006d5f0f0b19d10231d997fb7"/><file name="Observer.php" hash="1c0ec96e16ff718fd69a241abc8dcb20"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Editaccount.php" hash="33143529817d03942040bf4c67cd041a"/><file name="Editdevice.php" hash="df58feb985765b2c655573e07bd72e5f"/><file name="Enable.php" hash="3e7a720cf8700839fc9be8cbcac9e140"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AlertsiteController.php" hash="3bf0dd18200efb3df56a67debf9932e4"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="98cc9c3b6d0ed0822ad2f5e7355152aa"/><file name="config.xml" hash="394d1ce0f6cde2742217a461efd825d4"/><file name="system.xml" hash="646d3eed844caad3c297579b45cd0ee6"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="alertsite.xml" hash="3380f9beea504676bd368d1db513142d"/></dir><dir name="template"><dir name="alertsite"><file name="create.phtml" hash="6dda7689159922a06bd186effd6ee4c7"/><file name="dashboard.phtml" hash="4c9f11365a14c17c028c3f8e04426a9f"/><file name="linkbutton.phtml" hash="dfab7081f8110fd760914f5b44e80f85"/><file name="notifications.phtml" hash="3de0d42fac7f00f3cf3f6545da6271d7"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Smartbear_Alertsite.xml" hash="64a3cc66ca83c2f77239814fee24b53f"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="smartbear"><dir name="alertsite"><dir name="css"><file name="alertsite.css" hash="965c443f3d52c41c28a57cde992b92f8"/></dir><dir name="images"><file name="smartbear_15_icon.png" hash="9aa725351c49766f194f5727c924e62a"/><file name="smartbear_20_icon.gif" hash="221347ce1d17b26af00b8f73c6f853b1"/><file name="smartbear_error.png" hash="fb6f697ff3c3bec25b2ac8696a7dcbfd"/><file name="smartbear_great.png" hash="1e4330c182c17b937dcdd244b2c8043b"/><file name="smartbear_info.png" hash="a267bcdeb04b0e4d9e1b9cb621060f07"/><file name="smartbear_notice.png" hash="deec6c7c7c72442526f25e50b7996732"/><file name="smartbear_warning.png" hash="d59c3691206e009d4fbb49aee38a29da"/></dir></dir></dir></dir></dir></dir></target></contents>
17
  <compatible/>
18
- <dependencies><required><php><min>5.3.6</min><max>5.4.11</max></php><extension><name>curl</name><min>7.21.3</min><max></max></extension><extension><name>SimpleXML</name><min></min><max></max></extension></required></dependencies>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>smartbear_alertsite</name>
4
+ <version>2.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.alertsite.com/order_terms_agreement.shtml">Free</license>
7
  <channel>community</channel>
9
  <summary>The AlertSite for Magento extension provides a free service to monitor store availability and performance from the end-user perspective.</summary>
10
  <description>Delivering fast, feel-good customer experiences from your online store is critical to your success. The data overwhelmingly shows that if your site is unavailable or the functionality is slow or inconsistent, your users may go elsewhere. To ensure your website performs optimally, you need to see what your customers see.&#xD;
11
  The AlertSite for Magento extension offers Magento users a Free service to measure store availability and performance that's completely integrated into the Magento user interface.</description>
12
+ <notes>This is the second release of AlertSite for Magento.&#xD;
13
+ &#xD;
14
+ This release adds the following new features:&#xD;
15
+ &#xD;
16
+ -Scatter Plot Report graphing response time for your URL&#xD;
17
+ &#xD;
18
+ -Benchmark Report comparing performance of URL against top industry benchmark sites&#xD;
19
+ &#xD;
20
+ -Capability to edit extension configuration information</notes>
21
  <authors><author><name>SmartBear Software</name><user>Kgodskind</user><email>magento-extension@SmartBear.com</email></author></authors>
22
+ <date>2013-03-28</date>
23
+ <time>22:47:15</time>
24
+ <contents><target name="magecommunity"><dir name="Smartbear"><dir name="Alertsite"><dir name="Block"><dir name="Adminhtml"><file name="Advance.php" hash="f34e1293e55db7c4fb76540a54f8ff9a"/><file name="Create.php" hash="89d84302201df05c91b2a63cce0bc558"/><file name="Dashboard.php" hash="1c95a6dabc323b54c0f41fe802818756"/><file name="Notifications.php" hash="e6ee80fb6a4d2d671774548ba31e557e"/><file name="Report.php" hash="0dedd19beee5e4123fe65f8ef29c1ba4"/><file name="Smartbear.php" hash="4f294b360278d140b23c82050b1d964e"/><dir name="System"><dir name="Form"><dir name="Renderer"><file name="AdvanceLink.php" hash="ad47e8d59dad1683a56705d08b9e37cc"/><file name="ConfigMessage.php" hash="df00daab83b9178424c704b9c6e5ce2f"/><file name="DeviceDescription.php" hash="906fcdda396b0a761aeb169498ef66c3"/><file name="Label.php" hash="184619f752eb3bf52d6da7af2e61dc02"/><file name="LinkButton.php" hash="9fd9bc004a0a5bb98f93ba3a96d296c9"/><file name="Subheader.php" hash="2453c7bad971a7311bbe9e42f60e4bc8"/></dir><file name=".DS_Store" hash="766834cb509351057b269d576cdbf5ac"/></dir><file name=".DS_Store" hash="12352d4bf027b0f895185d80df00d8aa"/></dir><file name=".DS_Store" hash="13c47c0f5dc265d0c60feb18896f270c"/></dir><file name=".DS_Store" hash="0047fe0bc161a58c6088a4e959de43a4"/></dir><dir name="Helper"><file name="Data.php" hash="3f64a0955ba49f086cd902e01c388d46"/></dir><dir name="Model"><file name="Alertsiteapi.php" hash="d03b613c865fb719feabf58d720c629f"/><file name="Observer.php" hash="a2e7587671e6a131e17a6d422284f470"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Editaccount.php" hash="c4342b2f51743f09e6a5dae6a34b5602"/><file name="Editdevice.php" hash="df58feb985765b2c655573e07bd72e5f"/><file name="Enable.php" hash="3e7a720cf8700839fc9be8cbcac9e140"/></dir><file name=".DS_Store" hash="0a9398a6a23c073c1f64eef341f87cc3"/></dir><file name=".DS_Store" hash="60d450ab59b771a3c283579b2d35d28e"/></dir><file name=".DS_Store" hash="13c47c0f5dc265d0c60feb18896f270c"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AlertsiteController.php" hash="c6f963ac6edbdca1c69dc1205e514e97"/></dir><file name=".DS_Store" hash="0047fe0bc161a58c6088a4e959de43a4"/></dir><dir name="etc"><file name="adminhtml.xml" hash="96c59e70d9f8a8b8ea24610ed17b41df"/><file name="config.xml" hash="394d1ce0f6cde2742217a461efd825d4"/><file name="system.xml" hash="19f9b75c24a9d1a0366d4cd18d7c7008"/></dir><file name=".DS_Store" hash="eb03774a462f5cc9f379a3cc14db34f0"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="alertsite.xml" hash="1d8e529bf2b6f4f4513117083383823a"/></dir><dir name="template"><dir name="alertsite"><file name="advance.phtml" hash="1016dc96d79b17242e51e64d6e5f4d91"/><file name="benchmark.phtml" hash="dca7d55713af01cb658100b515e87c7a"/><file name="create.phtml" hash="ca2583149d389d811690a0eff850e2e3"/><file name="dashboard.phtml" hash="eb94013fd119353363ee4759affbc9c4"/><file name="linkbutton.phtml" hash="d9d3cdd1345c82d5a20058a091a8e226"/><file name="notifications.phtml" hash="eeed995f647c048756bdbadec71dfcd8"/><file name="scatterplot.phtml" hash="c7b7f2a956f878a7763215ac392c6748"/><file name="subheader.phtml" hash="7cf89385b395bfaeac098960dd4fb84b"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Smartbear_Alertsite.xml" hash="64a3cc66ca83c2f77239814fee24b53f"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="smartbear"><dir name="alertsite"><dir name="css"><file name="alertsite.css" hash="f556e329ca2a07691c74b959e2b4abfd"/></dir><dir name="images"><file name="alertsite_15_icon.png" hash="4c69502d7bb49ded2697cc8e826ca9bb"/><file name="smartbear_15_icon.png" hash="9aa725351c49766f194f5727c924e62a"/><file name="smartbear_20_icon.gif" hash="221347ce1d17b26af00b8f73c6f853b1"/><file name="smartbear_error.png" hash="fb6f697ff3c3bec25b2ac8696a7dcbfd"/><file name="smartbear_great.png" hash="1e4330c182c17b937dcdd244b2c8043b"/><file name="smartbear_info.png" hash="a267bcdeb04b0e4d9e1b9cb621060f07"/><file name="smartbear_notice.png" hash="deec6c7c7c72442526f25e50b7996732"/><file name="smartbear_warning.png" hash="d59c3691206e009d4fbb49aee38a29da"/></dir></dir></dir></dir></dir></dir></target></contents>
25
  <compatible/>
26
+ <dependencies><required><php><min>5.3.6</min><max>5.4.11</max></php><extension><name>curl</name><min>7.21.3</min><max/></extension><extension><name>SimpleXML</name><min/><max/></extension></required></dependencies>
27
  </package>
skin/adminhtml/default/default/smartbear/alertsite/css/alertsite.css CHANGED
@@ -22,4 +22,32 @@
22
  width:60%;
23
  float:left;
24
  margin-left:20px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
22
  width:60%;
23
  float:left;
24
  margin-left:20px;
25
+ }
26
+
27
+ .alertsite-subheader{
28
+ list-style:none;
29
+ }
30
+
31
+ /** special cases **/
32
+ .entry-edit .alertsite-subheader{
33
+ margin-left:10px;
34
+ }
35
+
36
+ .alertsite-subheader li{
37
+ display:block;
38
+ float:left;
39
+ margin-right:15px !important;
40
+ }
41
+
42
+ .alertsite-subheader li a{
43
+ color:#3366BB;
44
+ }
45
+
46
+ .smartbear-status-links{
47
+ padding: 0 0 0 80px;
48
+ }
49
+
50
+ .smartbear-status-links span, fieldset .smartbear-status-links li{
51
+ margin:6px 10px 0 0;
52
+ float:left;
53
  }
skin/adminhtml/default/default/smartbear/alertsite/images/alertsite_15_icon.png ADDED
Binary file