You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing a new component, create a sibling SASS file of the same name and import directly into the **top** of the JS/TS component file. Doing so ensures the styles are never separated or lost on import and allows for better modularization (smaller individual plugin asset footprint).
595
+
596
+
All SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) & Kibana invisibles (SASS variables, mixins, functions) from the [`globals_[theme].scss` file](src/legacy/ui/public/styles/_globals_v7light.scss).
597
+
598
+
While the styles for this component will only be loaded if the component exists on the page,
599
+
the styles **will** be global and so it is recommended to use a three letter prefix on your
600
+
classes to ensure proper scope.
601
+
602
+
**Example:**
603
+
604
+
```tsx
605
+
// component.tsx
606
+
607
+
import'./component.scss';
608
+
// All other imports below the SASS import
609
+
610
+
exportconstComponent= () => {
611
+
return (
612
+
<div className="plgComponent"/>
613
+
);
614
+
}
615
+
```
616
+
617
+
```scss
618
+
// component.scss
619
+
620
+
.plgComponent { ... }
621
+
```
622
+
623
+
Do not use the underscore `_` SASS file naming pattern when importing directly into a javascript file.
624
+
585
625
## React
586
626
587
627
The following style guide rules are specific for working with the React framework.
In dev mode, {kib} by default runs behind a proxy which adds a random path component to its URL.
5
+
6
+
You can set this explicitly using `server.basePath` in <<settings>>.
7
+
8
+
Use the server.rewriteBasePath setting to tell {kib} if it should remove the basePath from requests it receives, and to prevent a deprecation warning at startup. This setting cannot end in a slash (/).
9
+
10
+
If you want to turn off the basepath when in development mode, start {kib} with the `--no-basepath` flag
Copy file name to clipboardExpand all lines: docs/developer/advanced/development-es-snapshots.asciidoc
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,21 @@
1
1
[[development-es-snapshots]]
2
2
=== Daily Elasticsearch Snapshots
3
3
4
-
For local development and CI, Kibana, by default, uses Elasticsearch snapshots that are built daily when running tasks that require Elasticsearch (e.g. functional tests).
4
+
For local development and CI, {kib}, by default, uses Elasticsearch snapshots that are built daily when running tasks that require Elasticsearch (e.g. functional tests).
5
5
6
6
A snapshot is just a group of tarballs, one for each supported distribution/architecture/os of Elasticsearch, and a JSON-based manifest file containing metadata about the distributions.
7
7
8
8
https://ci.kibana.dev/es-snapshots[A dashboard] is available that shows the current status and compatibility of the latest Elasticsearch snapshots.
9
9
10
10
==== Process Overview
11
11
12
-
1. Elasticsearch snapshots are built for each current tracked branch of Kibana.
12
+
1. Elasticsearch snapshots are built for each current tracked branch of {kib}.
13
13
2. Each snapshot is uploaded to a public Google Cloud Storage bucket, `kibana-ci-es-snapshots-daily`.
14
14
** At this point, the snapshot is not automatically used in CI or local development. It needs to be tested/verified first.
15
-
3. Each snapshot is tested with the latest commit of the corresponding Kibana branch, using the full CI suite.
15
+
3. Each snapshot is tested with the latest commit of the corresponding {kib} branch, using the full CI suite.
16
16
4. After CI
17
17
** If the snapshot passes, it is promoted and automatically used in CI and local development.
18
-
** If the snapshot fails, the issue must be investigated and resolved. A new incompatibility may exist between Elasticsearch and Kibana.
18
+
** If the snapshot fails, the issue must be investigated and resolved. A new incompatibility may exist between Elasticsearch and {kib}.
Currently, there is not a way to run your pull request with the latest unverified snapshot without a code change. You can, however, do it with a small code change.
41
41
42
-
1. Edit `Jenkinsfile` in the root of the Kibana repo
42
+
1. Edit `Jenkinsfile` in the root of the {kib} repo
43
43
2. Add `env.KBN_ES_SNAPSHOT_USE_UNVERIFIED = 'true'` at the top of the file.
44
44
3. Commit the change
45
45
@@ -75,13 +75,13 @@ The file structure for this bucket looks like this:
75
75
76
76
==== How snapshots are built, tested, and promoted
77
77
78
-
Each day, a https://kibana-ci.elastic.co/job/elasticsearch+snapshots+trigger/[Jenkins job] runs that triggers Elasticsearch builds for each currently tracked branch/version. This job is automatically updated with the correct branches whenever we release new versions of Kibana.
78
+
Each day, a https://kibana-ci.elastic.co/job/elasticsearch+snapshots+trigger/[Jenkins job] runs that triggers Elasticsearch builds for each currently tracked branch/version. This job is automatically updated with the correct branches whenever we release new versions of {kib}.
79
79
80
80
===== Build
81
81
82
82
https://kibana-ci.elastic.co/job/elasticsearch+snapshots+build/[This Jenkins job] builds the Elasticsearch snapshots and uploads them to GCS.
83
83
84
-
The Jenkins job pipeline definition is https://github.com/elastic/kibana/blob/master/.ci/es-snapshots/Jenkinsfile_build_es[in the kibana repo].
84
+
The Jenkins job pipeline definition is https://github.com/elastic/kibana/blob/master/.ci/es-snapshots/Jenkinsfile_build_es[in the {kib} repo].
85
85
86
86
1. Checkout Elasticsearch repo for the given branch/version.
87
87
2. Run `./gradlew -p distribution/archives assemble --parallel` to create all of the Elasticsearch distributions.
@@ -91,15 +91,15 @@ The Jenkins job pipeline definition is https://github.com/elastic/kibana/blob/ma
91
91
** e.g. `<version>/archives/<unique id>`
92
92
6. Replace `<version>/manifest-latest.json` in GCS with this newest manifest.
93
93
** This allows the `KBN_ES_SNAPSHOT_USE_UNVERIFIED` flag to work.
94
-
7. Trigger the verification job, to run the full Kibana CI test suite with this snapshot.
94
+
7. Trigger the verification job, to run the full {kib} CI test suite with this snapshot.
95
95
96
96
===== Verification and Promotion
97
97
98
-
https://kibana-ci.elastic.co/job/elasticsearch+snapshots+verify/[This Jenkins job] tests the latest Elasticsearch snapshot with the full Kibana CI pipeline, and promotes if it there are no test failures.
98
+
https://kibana-ci.elastic.co/job/elasticsearch+snapshots+verify/[This Jenkins job] tests the latest Elasticsearch snapshot with the full {kib} CI pipeline, and promotes if it there are no test failures.
99
99
100
-
The Jenkins job pipeline definition is https://github.com/elastic/kibana/blob/master/.ci/es-snapshots/Jenkinsfile_verify_es[in the kibana repo].
100
+
The Jenkins job pipeline definition is https://github.com/elastic/kibana/blob/master/.ci/es-snapshots/Jenkinsfile_verify_es[in the {kib} repo].
101
101
102
-
1. Checkout Kibana and set up CI environment as normal.
102
+
1. Checkout {kib} and set up CI environment as normal.
103
103
2. Set the `ES_SNAPSHOT_MANIFEST` env var to point to the latest snapshot manifest.
104
104
3. Run CI (functional tests, integration tests, etc).
0 commit comments