From 569ffb0e1ba7e3896e6e98ea46551a27d221113a Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Fri, 12 May 2017 11:35:01 -0700 Subject: [PATCH] Getting Started page (#11673) * Initial code * Renaming files/folders * Notes and changes from HTML/CSS review * CSS changes * Fixing transform units * Fleshing out logo circle * Adding logos * Un-nesting styles * Adding kuiText class on

elements * Making shield icon 404 go away * Using trustAsHtml filter; using registry * Adding code for registry * Adding images * Hooking up the opt-out link * Fixing linter issues * Fix issue with refresh bringing back nav * Removing load_default module * Use GETTING_STARTED_ROUTE constant * Allow topMessage to be a directive * Adding kuiLink CSS class to anchor elements * Adding alt text to images * Replace getters with regular methods * Remove leftover comment * Removing unnecessary comment * Fixing typo in comment * Adding comments for message properties * Fixing typo in method name * Defining custom CSS class * Fixing method call * Creating custom CSS classes * Adding documentation links * Use a instead of button for demo link * Allow directives in manage and monitor messages * Refactoring shared code into single ui/public/getting_started folder * Adding README * Fixing whitespace in/around links * Trim messages before setting them * Decorate in-app links with opt-out attribute * Opt out of the Getting Started page if the user already has index patterns * Adding more commentary around expectations of setTopMessage use * Using ng-src and ng-href attributes where attr values are angular expressions * Importing the directive before using it * Using ui/registry for message registries * Renaming service => helpers to clarify intent * Adding explanatory comment * Adding "or" * Fixing div id * Breaks out the inject logic into another directive * Adding Getting Started page object for functional tests * Consolidate into one registry * Fixes incorrect classes * Changes how styles are applied to injected-items items * Modifying class name per CSS style guide * Adding getting started doc link * Removing unused import --- .../public/components/blahblah/blahblah.html | 3 +++ .../public/components/blahblah/blahblah.js | 19 ++++++++++++++ .../public/components/blahblah/index.js | 1 + src/core_plugins/testbed/public/index.js | 26 ++++++++++++++++++- 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 src/core_plugins/testbed/public/components/blahblah/blahblah.html create mode 100644 src/core_plugins/testbed/public/components/blahblah/blahblah.js create mode 100644 src/core_plugins/testbed/public/components/blahblah/index.js diff --git a/src/core_plugins/testbed/public/components/blahblah/blahblah.html b/src/core_plugins/testbed/public/components/blahblah/blahblah.html new file mode 100644 index 00000000000000..6991d208d24c32 --- /dev/null +++ b/src/core_plugins/testbed/public/components/blahblah/blahblah.html @@ -0,0 +1,3 @@ +

+ You have an important decision to make. To do so, . +
diff --git a/src/core_plugins/testbed/public/components/blahblah/blahblah.js b/src/core_plugins/testbed/public/components/blahblah/blahblah.js new file mode 100644 index 00000000000000..5a7db76c444ed5 --- /dev/null +++ b/src/core_plugins/testbed/public/components/blahblah/blahblah.js @@ -0,0 +1,19 @@ +import { uiModules } from 'ui/modules'; +import template from './blahblah.html'; + +const app = uiModules.get('kibana'); + +app.directive('blahblah', function () { + return { + restrict: 'E', + replace: true, + template: template, + scope: {}, + controller: ($scope) => { + $scope.testClick = () => { + alert(`I'm doing something important!`); + console.log($scope); + }; + } + }; +}); diff --git a/src/core_plugins/testbed/public/components/blahblah/index.js b/src/core_plugins/testbed/public/components/blahblah/index.js new file mode 100644 index 00000000000000..b560cb1a0cbe48 --- /dev/null +++ b/src/core_plugins/testbed/public/components/blahblah/index.js @@ -0,0 +1 @@ +import './blahblah'; diff --git a/src/core_plugins/testbed/public/index.js b/src/core_plugins/testbed/public/index.js index 1732c655ad73cc..67a8d0dc21d2b1 100644 --- a/src/core_plugins/testbed/public/index.js +++ b/src/core_plugins/testbed/public/index.js @@ -1 +1,25 @@ -import './testbed'; \ No newline at end of file +import './testbed'; + + +import './components/blahblah'; +import { GettingStartedRegistryProvider } from 'ui/getting_started/registry'; +import { GETTING_STARTED_REGISTRY_TYPES } from 'ui/getting_started/constants'; + +GettingStartedRegistryProvider.register(() => ({ + type: GETTING_STARTED_REGISTRY_TYPES.TOP_MESSAGE, + template: `` +})); +GettingStartedRegistryProvider.register(() => ({ + type: GETTING_STARTED_REGISTRY_TYPES.TOP_MESSAGE, + template: `Nam hendrerit augue id egestas ultricies.` +})); + +GettingStartedRegistryProvider.register(() => ({ + type: GETTING_STARTED_REGISTRY_TYPES.MANAGE_AND_MONITOR_MESSAGE, + template: `Lorem ipsum dolor sit amet, consectetur consectetur adipiscing elit.` +})); + +GettingStartedRegistryProvider.register(() => ({ + type: GETTING_STARTED_REGISTRY_TYPES.MANAGE_AND_MONITOR_MESSAGE, + template: `Nam luctus mattis urna, ac fringilla tellus efficitur at.` +}));