Add client requests for toggle protection

Closes #333
This commit is contained in:
Ildar Kamalov
2018-10-11 10:57:36 +03:00
parent 413228e6ec
commit 3a74dfdfa4
5 changed files with 37 additions and 23 deletions

View File

@@ -26,8 +26,8 @@ class Header extends Component {
const { dashboard } = this.props;
const badgeClass = classnames({
'badge dns-status': true,
'badge-success': dashboard.isCoreRunning,
'badge-danger': !dashboard.isCoreRunning,
'badge-success': dashboard.protectionEnabled,
'badge-danger': !dashboard.protectionEnabled,
});
return (
@@ -44,7 +44,7 @@ class Header extends Component {
</Link>
{!dashboard.proccessing &&
<span className={badgeClass}>
{dashboard.isCoreRunning ? 'ON' : 'OFF'}
{dashboard.protectionEnabled ? 'ON' : 'OFF'}
</span>
}
</div>