-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1253 from wazuh/fixes-3.9
Switches design and other improvements
- Loading branch information
Showing
10 changed files
with
159 additions
and
65 deletions.
There are no files selected for viewing
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div class="euiSwitch"><input class="euiSwitch__input" ng-model="switchModel" ng-change="switchChange()" type="checkbox"><span class="euiSwitch__body"><span | ||
class="euiSwitch__thumb"></span><span class="euiSwitch__track"><svg class="euiIcon euiIcon--medium euiSwitch__icon" | ||
focusable="false" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" | ||
height="16" viewBox="0 0 16 16"> | ||
<defs> | ||
<path id="cross-a" d="M7.293 8l-4.147 4.146a.5.5 0 0 0 .708.708L8 8.707l4.146 4.147a.5.5 0 0 0 .708-.708L8.707 8l4.147-4.146a.5.5 0 0 0-.708-.708L8 7.293 3.854 3.146a.5.5 0 1 0-.708.708L7.293 8z"></path> | ||
</defs> | ||
<use fill-rule="nonzero" xlink:href="#cross-a"></use> | ||
</svg><svg class="euiIcon euiIcon--medium euiSwitch__icon euiSwitch__icon--checked" focusable="false" xmlns="http://www.w3.org/2000/svg" | ||
width="16" height="16" viewBox="0 0 16 16"> | ||
<path d="M6.5 12a.502.502 0 0 1-.354-.146l-4-4a.502.502 0 0 1 .708-.708L6.5 10.793l6.646-6.647a.502.502 0 0 1 .708.708l-7 7A.502.502 0 0 1 6.5 12"></path> | ||
</svg></span></span> | ||
<label class="euiSwitch__label">{{switchText}}</label></div> |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Wazuh app - Top nav bar directive | ||
* Copyright (C) 2015-2019 Wazuh, Inc. | ||
* | ||
* This program 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 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Find more information about this on the LICENSE file. | ||
*/ | ||
|
||
import template from './wz-kbn-switch.html'; | ||
import { uiModules } from 'ui/modules'; | ||
|
||
const app = uiModules.get('app/wazuh', []); | ||
|
||
class WzKbnSwitch { | ||
/** | ||
* Class constructor | ||
*/ | ||
constructor() { | ||
this.restrict = 'E'; | ||
this.scope = { | ||
switchModel: '=switchModel', | ||
switchChange: '&', | ||
switchText: '@switchText' | ||
}; | ||
this.template = template; | ||
} | ||
|
||
controller() { } | ||
} | ||
|
||
app.directive('wzKbnSwitch', () => new WzKbnSwitch()); |
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
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
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.