Skip to content

Commit

Permalink
Merge pull request PrestaShop#2913 from jeromenadaud/feat-statuspage
Browse files Browse the repository at this point in the history
[+] BO : Add status page indicator
  • Loading branch information
Jérôme Nadaud committed Apr 22, 2015
2 parents d401828 + e244f6b commit 1fd2306
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 13 deletions.
2 changes: 1 addition & 1 deletion admin-dev/themes/default/css/admin-theme.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion admin-dev/themes/default/css/admin-theme_rtl.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion admin-dev/themes/default/css/schemes/admin-theme-blue.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion admin-dev/themes/default/css/schemes/admin-theme-flex.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion admin-dev/themes/default/css/schemes/admin-theme-fruit.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion admin-dev/themes/default/css/schemes/admin-theme-prune.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions admin-dev/themes/default/sass/partials/_footer.sass
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,13 @@ a.link-social
&:hover
color: #E6644E
background-color: white

.status-page-dot
&.none
color: #2ecc71 !important
&.minor
color: #f1c40f !important
&.major
color: #e67e22 !important
&.critical
color: #e74c3c !important
5 changes: 5 additions & 0 deletions admin-dev/themes/default/template/footer.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@
<i class="icon-book"></i>
{l s='Training'}
</a>
/&nbsp;
<a href="http://status.prestashop.com/" class="footer_link _blank">
<i class="icon-circle status-page-dot"></i>
<span class="status-page-description"></span>
</a>
{if $iso_is_fr && !host_mode}
<p>Questions • Renseignements • Formations :
<strong>+33 (0)1.40.18.30.04</strong>
Expand Down
4 changes: 3 additions & 1 deletion classes/controller/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2545,7 +2545,9 @@ public function setMedia()
$this->addJS(__PS_BASE_URI__.$this->admin_webpath.'/themes/'.$this->bo_theme.'/js/help.js');

if (!Tools::getValue('submitFormAjax'))
$this->addJs(_PS_JS_DIR_.'admin/notifications.js');
$this->addJS(_PS_JS_DIR_.'admin/notifications.js');

$this->addJS('https://cdn.statuspage.io/se-v2.js');

// Execute Hook AdminController SetMedia
Hook::exec('actionAdminControllerSetMedia');
Expand Down
11 changes: 11 additions & 0 deletions js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,15 @@ $(document).ready(function()

$('button:submit').click(bindSwapSave);
}

// http://status.prestashop.com/
var sp = new StatusPage.page({page : 'rmfc0cm3rk9y'});
sp.status({
success : function(data) {
$('.status-page-description').text(data.status.description);
$('.status-page-dot').addClass(data.status.indicator);
}
});
});

function bindSwapSave()
Expand Down Expand Up @@ -1552,3 +1561,5 @@ function confirm_link(head_text, display_text, confirm_text, cancel_text, confir
document.location = cancel_link;
});
}


0 comments on commit 1fd2306

Please sign in to comment.