Skip to content
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

Gating this feature with a good, old-fashioned config-flag #35029

Merged
merged 8 commits into from
Apr 17, 2019
Merged

Gating this feature with a good, old-fashioned config-flag #35029

merged 8 commits into from
Apr 17, 2019

Conversation

joelgriffith
Copy link
Contributor

Took a while to dig all this up, but this seems to be the pattern for exposing config flags to the client.

Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick typo fix

@@ -125,6 +127,7 @@ export const reporting = (kibana) => {
}).default()
}).default(),
csv: Joi.object({
enablePanelActionDownlad: Joi.boolean().default(false),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enablePanelActionDownload -- missing the o

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, thanks!

@@ -18,6 +18,7 @@ import { registerLegacy } from './legacy';
export function registerRoutes(server: KbnServer) {
const config = server.config();
const DOWNLOAD_BASE_URL = config.get('server.basePath') + `${API_BASE_URL}/jobs/download`;
const hasPanelActionCSVEnabled = config.get('xpack.reporting.csv.enablePanelActionDownlad');
const { errors: esErrors } = server.plugins.elasticsearch.getCluster('admin');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 20-22 are bothering me because the variables are not defined near the code they are used. Would you mind doing a quick touch-up so they're initialized right above where they're needed?

Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Reviewed code changes only

@elasticmachine
Copy link
Contributor

💔 Build Failed

@joelgriffith
Copy link
Contributor Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@tsullivan
Copy link
Member

Looks like our integration tests failed, because the new setting must be added to x-pack functional test config.

See https://github.com/elastic/kibana/pull/35038/files#diff-6efcd30a7a7fdd7bdab17829239782bcR190 for an example

@elasticmachine
Copy link
Contributor

💔 Build Failed

@joelgriffith
Copy link
Contributor Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

…/reporting/csv-export-panel-action-config-flag
@elasticmachine
Copy link
Contributor

💔 Build Failed

…/reporting/csv-export-panel-action-config-flag
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@joelgriffith joelgriffith merged commit ec6c7e7 into elastic:feature/reporting/csv-export-panel-action Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants