Skip to content

Commit

Permalink
Adding table_info component (elastic#11778)
Browse files Browse the repository at this point in the history
* Adding loading-results component

* Adding example usage on testbed

* Fixing module name

* Adding kuiControlledTable container

* Replacing kuiNoItems and kuiLoadingResults with kuiTableInfo

* Making directive compositional

* Fixing imports

* Re-generating fixed CSS
  • Loading branch information
ycombinator authored and snide committed May 30, 2017
1 parent 5bfd957 commit 1b4a4dc
Show file tree
Hide file tree
Showing 19 changed files with 54 additions and 45 deletions.
2 changes: 1 addition & 1 deletion src/core_plugins/kibana/public/context/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
].includes(contextApp.state.loadingStatus.anchor)"
class="kuiPanel kuiPanel--centered kuiVerticalRhythm"
>
<div class="kuiLoadingItems">
<div class="kuiTableInfo">
Loading&hellip;
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@
</div>
</div>

<!-- NoItems -->
<!-- TableInfo -->
<div
class="kuiPanel kuiPanel--centered kuiPanel--withHeader"
ng-if="!listingController.items.length && listingController.filter"
>
<div class="kuiNoItems">
<div class="kuiTableInfo">
No dashboards matched your search.
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/kibana/public/doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<!-- loading -->
<div class="kuiViewContentItem" ng-if="status === undefined">
<div class="kuiPanel kuiPanel--centered">
<div class="kuiLoadingItems">
<div class="kuiTableInfo">
Loading&hellip;
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ <h1 class="kuiTitle">
class="kuiPanel kuiPanel--centered kuiPanel--withHeader"
ng-if="!service.data.length"
>
<div class="kuiNoItems">
<div class="kuiTableInfo">
No {{service.title}} matched your search.
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@
</div>
</div>

<!-- NoItems -->
<!-- TableInfo -->
<div
class="kuiPanel kuiPanel--centered kuiPanel--withHeader"
ng-if="!listingController.items.length && listingController.filter"
>
<div class="kuiNoItems">
<div class="kuiTableInfo">
No visualizations matched your search.
</div>
</div>
Expand Down
6 changes: 6 additions & 0 deletions src/core_plugins/testbed/public/testbed.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
you need to demonstate your functionality. Nothing need be preserved. -->
<!-- CONTENT START -->

<div class="kuiControlledTable">
<table-info>
Loading all the things&hellip;
</table-info>
</div>

<!-- CONTENT END -->

</div>
Expand Down
2 changes: 2 additions & 0 deletions src/core_plugins/testbed/public/testbed.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import uiRoutes from 'ui/routes';
import template from './testbed.html';
import './testbed.less';

import 'ui/table_info';

uiRoutes.when('/testbed', {
template: template,
controllerAs: 'testbed',
Expand Down
1 change: 1 addition & 0 deletions src/ui/public/table_info/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './table_info';
6 changes: 6 additions & 0 deletions src/ui/public/table_info/table_info.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div class="kuiPanel kuiPanel--centered kuiPanel--withHeader">
<div
class="kuiTableInfo"
ng-transclude
></div>
</div>
17 changes: 17 additions & 0 deletions src/ui/public/table_info/table_info.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { uiModules } from 'ui/modules';
import template from './table_info.html';

const app = uiModules.get('kibana');

app.directive('tableInfo', function () {
return {
restrict: 'E',
replace: true,
template: template,
transclude: true,
controllerAs: 'tableInfo',
bindToController: true,
controller: class TableInfoController {
}
};
});
3 changes: 1 addition & 2 deletions ui_framework/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,17 @@
@import "icon/index";
@import "info_panel/index";
@import "link/index";
@import "loading_items/index";
@import "local_nav/index";
@import "menu/index";
@import "menu_button/index";
@import "micro_button/index";
@import "modal/index";
@import "no_items/index";
@import "notice/index";
@import "panel/index";
@import "prompt_for_items/index";
@import "status_text/index";
@import "table/index";
@import "table_info/index";
@import "tabs/index";
@import "toggle_button/index";
@import "tool_bar/index";
Expand Down
1 change: 0 additions & 1 deletion ui_framework/components/loading_items/_index.scss

This file was deleted.

6 changes: 0 additions & 6 deletions ui_framework/components/loading_items/_loading_items.scss

This file was deleted.

1 change: 0 additions & 1 deletion ui_framework/components/no_items/_index.scss

This file was deleted.

1 change: 1 addition & 0 deletions ui_framework/components/table_info/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "table_info";
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.kuiNoItems {
.kuiTableInfo {
padding: 30px;
font-size: $globalTitleFontSize;
color: $globalSubduedTextColor;
Expand Down
31 changes: 8 additions & 23 deletions ui_framework/dist/ui_framework.css
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,6 @@ body {
/* 2 */
font-size: 10px !important;
/* 2 */
-webkit-transition: background-color 0.1s linear;
transition: background-color 0.1s linear; }
.kuiCheckBox:before {
position: relative;
Expand All @@ -791,7 +790,6 @@ body {
font-size: 1em;
opacity: 0;
color: #FFF;
-webkit-transition: opacity 0.1s linear;
transition: opacity 0.1s linear; }
.kuiCheckBox:checked {
border-color: #0096CC;
Expand Down Expand Up @@ -865,7 +863,6 @@ body {
background-color: #ffffff;
border: 1px solid #DEDEDE;
border-radius: 4px;
-webkit-transition: border-color 0.1s linear;
transition: border-color 0.1s linear;
/**
* 1. Angular will add an ng-untouched class to an input if it hasn't been touched yet.
Expand Down Expand Up @@ -907,7 +904,6 @@ body {
background-color: #ffffff;
border: 1px solid #DEDEDE;
border-radius: 4px;
-webkit-transition: border-color 0.1s linear;
transition: border-color 0.1s linear;
/**
* 1. Angular will add an ng-untouched class to an input if it hasn't been touched yet.
Expand Down Expand Up @@ -981,7 +977,6 @@ body {
background-color: #ffffff;
border: 1px solid #DEDEDE;
border-radius: 4px;
-webkit-transition: border-color 0.1s linear;
transition: border-color 0.1s linear;
/**
* 1. Angular will add an ng-untouched class to an input if it hasn't been touched yet.
Expand Down Expand Up @@ -1022,7 +1017,6 @@ body {
background-color: #ffffff;
border: 1px solid #DEDEDE;
border-radius: 4px;
-webkit-transition: border-color 0.1s linear;
transition: border-color 0.1s linear;
/**
* 1. Angular will add an ng-untouched class to an input if it hasn't been touched yet.
Expand Down Expand Up @@ -1228,12 +1222,12 @@ body {
.kuiInfoButton {
font-size: 16px;
background-color: transparent;
color: #3CAED2;
color: #0096CC;
cursor: pointer;
border: none;
padding: 0; }
.kuiInfoButton:hover, .kuiInfoButton:active {
color: #105A73; }
color: #007199; }

/**
* 1. Copied from FontAwesome's .fa class. We use a custom class to make it easier to migrate away
Expand Down Expand Up @@ -1352,12 +1346,6 @@ body {
.theme-dark .kuiLink:hover {
color: #b7e2ea; }

.kuiLoadingItems {
padding: 30px;
font-size: 18px;
color: #666;
line-height: 1.5; }

/**
* 1. Breadcrumbs are placed in the top-left corner and need to be bumped over
* a bit.
Expand Down Expand Up @@ -1844,7 +1832,6 @@ body {
background-color: #ffffff;
border: 1px solid #DEDEDE;
border-radius: 4px;
-webkit-transition: border-color 0.1s linear;
transition: border-color 0.1s linear;
/**
* 1. Angular will add an ng-untouched class to an input if it hasn't been touched yet.
Expand Down Expand Up @@ -1926,7 +1913,6 @@ body {
background-color: #ffffff;
border: 1px solid #DEDEDE;
border-radius: 4px;
-webkit-transition: border-color 0.1s linear;
transition: border-color 0.1s linear;
/**
* 1. Angular will add an ng-untouched class to an input if it hasn't been touched yet.
Expand Down Expand Up @@ -2292,12 +2278,6 @@ body {
.kuiModalFooter > * + * {
margin-left: 5px; }

.kuiNoItems {
padding: 30px;
font-size: 18px;
color: #666;
line-height: 1.5; }

.kuiNotice {
padding: 40px 60px 48px;
margin: 20px;
Expand Down Expand Up @@ -2636,6 +2616,12 @@ body {
overflow: visible;
/* 3 */ }

.kuiTableInfo {
padding: 30px;
font-size: 18px;
color: #666;
line-height: 1.5; }

.kuiTabs {
display: -webkit-box;
display: -webkit-flex;
Expand Down Expand Up @@ -2980,7 +2966,6 @@ body {
border: 1px solid #D9D9D9;
line-height: normal;
/* 1 */
-webkit-transition: border-color 0.1s linear;
transition: border-color 0.1s linear; }
.kuiToolBarSearchBox__input:focus {
outline: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
</div>
</div>

<!-- LoadingResults -->
<!-- TableInfo -->
<div class="kuiPanel kuiPanel--centered kuiPanel--withHeader">
<div class="kuiLoadingItems">
<div class="kuiTableInfo">
Loading&hellip;
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
</div>
</div>

<!-- NoItems -->
<!-- TableInfo -->
<div class="kuiPanel kuiPanel--centered kuiPanel--withHeader">
<div class="kuiNoItems">
<div class="kuiTableInfo">
No Items matched your search.
</div>
</div>
Expand Down

0 comments on commit 1b4a4dc

Please sign in to comment.