-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/move append nav controls #6645
Merged
Merged
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
f7112d4
[Chrome] Append nav controls changes
panda01 10c5223
[kbnLoading] Made the directive so we dont have to repeat, with some
panda01 ffe9ed4
[Chrome] Made some stlye changes and html to ensure shield looks and …
panda01 2aa7665
[Tests] Wrote some simple tests around the loading indicator and time…
panda01 536f211
Resolves ngMock dependency
ab1f953
[Shield] Some integration for shield, and code cleanup
panda01 db2074e
[Tests] Fixing tests
panda01 2202f7f
[Logo] Putting back the old logo
panda01 e9dbcdc
Make the loader an element instead
e60aca3
Tests updates
6b47ced
Merge pull request #1 from rashidkpc/pr/6645
panda01 cabec73
[Chrome] some cleanup
panda01 1e395bf
[Timepicker] fixing the auto refresh so it works properly, moved the …
panda01 1634340
Merge remote-tracking branch 'upstream/master' into fix/moveAppendNav…
panda01 e948df3
Merge remote-tracking branch 'upstream/master' into fix/moveAppendNav…
panda01 ebf4ae5
[Tests] removing old test
panda01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,41 @@ | ||
import ngMock from 'ng_mock'; | ||
import expect from 'expect.js'; | ||
import uiModules from 'ui/modules'; | ||
import $ from 'jquery'; | ||
|
||
import '../directives/kbn_loading_indicator'; | ||
|
||
|
||
describe('kbnLoadingIndicator', function () { | ||
let compile; | ||
|
||
beforeEach(() => { | ||
ngMock.module('kibana'); | ||
ngMock.inject(function ($compile, $rootScope) { | ||
compile = function (hasActiveConnections) { | ||
$rootScope.chrome = { | ||
httpActive: (hasActiveConnections ? [1] : []) | ||
}; | ||
const $el = $('<kbn-loading-indicator></kbn-loading-indicator>'); | ||
$rootScope.$apply(); | ||
$compile($el)($rootScope); | ||
return $el; | ||
}; | ||
}); | ||
|
||
}); | ||
|
||
it('injects a loading .spinner into the element', function () { | ||
const $el = compile(); | ||
expect($el.find('.spinner')).to.have.length(1); | ||
}); | ||
// Doesn't work... | ||
xit('applies the ng-hide class when there are no connections', function () { | ||
const $el = compile(false); | ||
expect($el.find('.spinner.ng-hide')).to.have.length(1); | ||
}); | ||
it('applies removes ng-hide class when there are connections', function () { | ||
const $el = compile(true); | ||
expect($el.find('.spinner.ng-hide')).to.have.length(0); | ||
}); | ||
}); |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
import UiModules from 'ui/modules'; | ||
import angular from 'angular'; | ||
|
||
const spinnerTemplate = '<div class="spinner" ng-show="chrome.httpActive.length"></div>'; | ||
|
||
UiModules | ||
.get('ui/kibana') | ||
.directive('kbnLoadingIndicator', function ($compile) { | ||
return { | ||
restrict: 'E', | ||
template: spinnerTemplate, | ||
}; | ||
}); |
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,23 @@ | ||
import expect from 'expect.js'; | ||
import ngMock from 'ng_mock'; | ||
import uiModules from 'ui/modules'; | ||
import $ from 'jquery'; | ||
|
||
describe('kbnGlobalTimepicker', function () { | ||
let compile; | ||
beforeEach(() => { | ||
ngMock.module('kibana'); | ||
ngMock.inject(($compile, $rootScope) => { | ||
compile = () => { | ||
const $el = $('<kbn-global-timepicker></kbn-global-timepicker>'); | ||
$rootScope.$apply(); | ||
$compile($el)($rootScope); | ||
return $el; | ||
}; | ||
}); | ||
}); | ||
it('injects the timepicker into the DOM', () => { | ||
const $el = compile(); | ||
expect($el.find('button[ng-click]')).to.have.length(3); | ||
}); | ||
}); |
File renamed without changes.
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,29 @@ | ||
import UiModules from 'ui/modules'; | ||
import chromeNavControlsRegistry from 'ui/registry/chrome_nav_controls'; | ||
import { once, clone } from 'lodash'; | ||
|
||
import toggleHtml from './kbn_global_timepicker.html'; | ||
|
||
UiModules | ||
.get('kibana') | ||
.directive('kbnGlobalTimepicker', (timefilter, globalState, $rootScope) => { | ||
const listenForUpdates = once($scope => { | ||
$scope.$listen(timefilter, 'update', (newVal, oldVal) => { | ||
globalState.time = clone(timefilter.time); | ||
globalState.refreshInterval = clone(timefilter.refreshInterval); | ||
globalState.save(); | ||
}); | ||
}); | ||
|
||
return { | ||
template: toggleHtml, | ||
link: ($scope, $el, attrs) => { | ||
listenForUpdates($rootScope); | ||
|
||
$rootScope.timefilter = timefilter; | ||
$rootScope.toggleRefresh = () => { | ||
timefilter.refreshInterval.pause = !timefilter.refreshInterval.pause; | ||
}; | ||
}, | ||
}; | ||
}); |
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 was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xit
? Is this some kind of alias forit.skip
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops this slipped past me i'll remove this.