* Extend browser support back to Chrome 68.
This change is extending our browser support to go back to Chrome 68 in order to support outdated browser versions commonly found e.g. on smart TVs. The cut is made at Chrome 68 in order to support at least the [last three version of webOS](https://webostv.developer.lge.com/develop/specifications/web-api-and-web-engine).
Fixes#14677.
* Adding changelog snippet.
* Using `esbuild`/`esbuild-loader` for transpilation.
* Turning function into actual class.
* Simplifying config.
* Adjusting target.
* Fixing up imports with side-effects.
* Using identical targets for minifying.
* Migrating components to TS, adding types.
* Cleaning up component a bit.
* Styling login page differently.
* Cleaning up.
* Using brand color for button.
* Moving chrome to `LoginChrome` component, reusing it.
* Improving typing.
* Fix color of hovered sign-in button.
* Use labels instead of placeholders.
* Fixing up test for `LoginBox`.
* Adding license header.
* Fixing up prop improvement.
* Sticking notifications to top of container.
* Fixing width of container.
* Added changelog snippet.
* Smaller styling improvements
* Removing .jpeg to .jpg to avoid dev server restart.
* Fixing linter hint
Co-authored-by: Linus Pahl <linus@graylog.com>
* Writing swagger definition from maven run.
* Adding parameters to API generator.
* Generate API files.
* Write overview as well.
* Using classgraph.
* Adding first attempt to generate TS signatures from swagger defs.
* Starting to generate function stubs.
* Starting from api summary to generate defs.
* Cleanup, writing to files, using correct default path.
* Adding accept header information to `request` call.
* Adding import statement.
* Adding `request` stub.
* Moving swagger spec generation out of web profile.
* Generate single-quote string literals.
* Creating proper template string for routes.
* Rename conflicting overloaded function names.
* Map banned function names.
* Generate enum types as union types.
* Ordering function parameters by optionality.
* Supporting enum operation parameters.
* Using single quotes for string literals as paths.
* Support type aliases for named array types.
* Fixing up `Optional`s.
* Avoid generating banned models.
* Cleaning parameter names before usage.
* Generating `any` for `Response`, mapping `any` to `unknown`.
* Mapping more types, handling optional types better.
* Adding indexer signature if additional properties are present.
* Using variable name from `PathParam` annotation for parameter name if present.
* Properly handle inline object types.
* Map inline object models.
* Fixing some type issues.
* Removing type.
* Generate api package index.
* Quoting prop names if needed, making more props readonly.
* Wrap additional properties if they contain type literal.
* Fix boolean default values, ban more types, quote prop names starting with @.
* Handling optionals better.
* Adding task to generate api typedefs.
* Merge default value into allowed values for enum.
* Better merging of default values into enum, handling `long` types.
* Turning `request` into `__request__` to avoid clashes.
* Removing `Type` from banned models.
* Making script work with `ts-node`.
* Dissected frontend typing generator script into parser |> emitter.
* Adding tests.
* Fixing enum parsing.
* Adding/updating tests.
* Generating api specs through yarn task.
* Adding `@graylog/server-api` alias.
* Moving generator test to better place.
* Cleaning up `Generator`.
* Adding license headers.
* Assigning correct phases to frontend goals.
* Removing shebang from generator script.
* Extract types from `response` parameter of `ApiOperation` annotation.
* Suppressing `no-console` errors for scripts.
* Fixing linter hints.
* Using idempotent target directory specification.
* Handling arrays without any type definition.
* Using correct phases for types generation.
* Removing target directory before.
* Using unknown type as const.
* Fixing `request` helper.
* Fix including web assets in production jar.
* Improving maven phases, ordering execution through order in pom.
* Writing swagger definition from maven run.
* Adding parameters to API generator.
* Generate API files.
* Write overview as well.
* Using classgraph.
* Adding first attempt to generate TS signatures from swagger defs.
* Starting to generate function stubs.
* Starting from api summary to generate defs.
* Cleanup, writing to files, using correct default path.
* Adding accept header information to `request` call.
* Adding import statement.
* Adding `request` stub.
* Moving swagger spec generation out of web profile.
* Generate single-quote string literals.
* Creating proper template string for routes.
* Rename conflicting overloaded function names.
* Map banned function names.
* Generate enum types as union types.
* Ordering function parameters by optionality.
* Supporting enum operation parameters.
* Using single quotes for string literals as paths.
* Support type aliases for named array types.
* Fixing up `Optional`s.
* Avoid generating banned models.
* Cleaning parameter names before usage.
* Generating `any` for `Response`, mapping `any` to `unknown`.
* Mapping more types, handling optional types better.
* Adding indexer signature if additional properties are present.
* Using variable name from `PathParam` annotation for parameter name if present.
* Properly handle inline object types.
* Map inline object models.
* Fixing some type issues.
* Removing type.
* Generate api package index.
* Quoting prop names if needed, making more props readonly.
* Wrap additional properties if they contain type literal.
* Fix boolean default values, ban more types, quote prop names starting with @.
* Handling optionals better.
* Adding task to generate api typedefs.
* Merge default value into allowed values for enum.
* Better merging of default values into enum, handling `long` types.
* Turning `request` into `__request__` to avoid clashes.
* Removing `Type` from banned models.
* Making script work with `ts-node`.
* Dissected frontend typing generator script into parser |> emitter.
* Adding tests.
* Fixing enum parsing.
* Adding/updating tests.
* Generating api specs through yarn task.
* Adding `@graylog/server-api` alias.
* Moving generator test to better place.
* Cleaning up `Generator`.
* Adding license headers.
* Assigning correct phases to frontend goals.
* Removing shebang from generator script.
* Extract types from `response` parameter of `ApiOperation` annotation.
* Suppressing `no-console` errors for scripts.
* Fixing linter hints.
* Using idempotent target directory specification.
* Handling arrays without any type definition.
* Using correct phases for types generation.
* Removing target directory before.
* Using unknown type as const.
* Fixing `request` helper.
The GRAYLOG_API_URL environment variable was used for two development
features:
- Configuring the proxy backend for the development web server
(devServer.js)
- Configuring the backend URL for the user interface (AppConfig.ts)
The latter will break cookie authentication when GRAYLOG_API_URL is set
because the URL might point to a different host than the web interface.
That prevents the cookie to be used for requests to the backend due to
the same-origin policy.
This commit removes the handling of the environment variable in the UI.
The development web server proxy backend can still be configured using
the variable.
* Replacing `@babel/polyfill` with core-js.
* Including `core-js` in separate `polyfill` chunk.
* Adding license header.
Co-authored-by: Dennis Oelkers <dennis@graylog.com>
* Make webpack /api proxy host and port configurable
* Use a single "--api-url" parameter instead of two
That allows the usage of TLS enabled server backends.
* Use GRAYLOG_HTTP_PUBLISH_URI as apiUrl if set
* Rename env to GRAYLOG_API_URL
Keep backwards compat for old name and use case.
* Fix linter warning
* Fix linter warning
* Expose `isCloud` to frontend
Still needs cleaning up and will probably fail if the cloud plugin is
not loaded.
* Don't use environment variable to transport value for isCloud
* new approach: don't use template but webpack define plugin instead
* Fix ESLint warnings
* Add "CLOUD" to dev badge also for narrow screens
* Add missing parentheses
* Remove extra space from badge
Co-authored-by: Gaya Kessler <gaya@theclevernode.com>
* Simplify expression
Co-authored-by: Gaya Kessler <gaya@theclevernode.com>
* Remove parentheses
Co-authored-by: Gaya Kessler <gaya@theclevernode.com>
Co-authored-by: Gaya Kessler <gaya@theclevernode.com>
(cherry picked from commit 608f1f7194)
* Disable esModule option for font related file-loader
* Reimplement opensans-npm-webfont
* Remove open sans font files and font-face definition
* Import only needed fonts from opensans-npm-webfont to optimize font-loading for older browsers
* Make bootstrap styling easier to overwrite by moving it's style tag at the top of the html head
* Remove not needed important in WidgetQueryControls
* Remove css specificity workaround for Button component
* Remove css important properties, which are no longer needed, due to new bootstrap style specificity
* Remove redundant buttonStyles file
This change is adding a simple way to enable frontend features for
development which are disabled per default. The change is two-fold:
* Evaluating a `FEATURES` environment variable which contains a
comma-delimited string of feature names to enable
* Adding a `AppConfig.isFeatureEnabled` function, which returns a
boolean indicating if the given feature is enabled or not. This can be
used in the code to conditionally render parts of the UI.
Notes:
The content of the `FEATURES` can contain multiple features separated by
commas. Additionally, individual feature flags are compared
case-insensitively, so `FEATURES=Time_Travel` will enable the
`time_travel` feature as well.
Example:
If a feature `time_travel` is developed but should not be enabled by
default, developers can do a `FEATURES=time_travel yarn run start` to
enable it for their development environment. In the code, something like
this can be done:
```
<div>
{AppConfig.isFeatureEnabled('time_travel') && <TimeTravel />}
...
{AppConfig.isFeatureEnabled('time_travel') || <OldBoringStuff />}
</div>
```
The "build" and "cache" directories are currently located in the project
root of plugins. This change moves them to the "target/web" directory.
That way we don't need any custom configuration to remove these
directories on "mvn clean" and they should also not be indexed by
IntelliJ and consume resources. (most developers exclude the "build" and
"cache" directories in IntelliJ for performance reasons)
Due to a bug in uglify-js 3.4.9, compressing conditionals during asset
minimization is broken, leading to #5450.
This commit disables conditionals compression until we can test it is fixed
in a future uglify-js release.
There are several reports in the upstream project, one of them is:
https://github.com/mishoo/UglifyJS2/issues/3269Fixes#5450