-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Gating this feature with a good, old-fashioned config-flag #35029
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quick typo fix
x-pack/plugins/reporting/index.js
Outdated
@@ -125,6 +127,7 @@ export const reporting = (kibana) => { | |||
}).default() | |||
}).default(), | |||
csv: Joi.object({ | |||
enablePanelActionDownlad: Joi.boolean().default(false), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enablePanelActionDownload
-- missing the o
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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?
There was a problem hiding this 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
💔 Build Failed |
retest |
💔 Build Failed |
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 |
…/reporting/csv-export-panel-action-config-flag
💔 Build Failed |
retest |
💔 Build Failed |
…/reporting/csv-export-panel-action-config-flag
💔 Build Failed |
…/reporting/csv-export-panel-action-config-flag
💔 Build Failed |
💚 Build Succeeded |
ec6c7e7
into
elastic:feature/reporting/csv-export-panel-action
Took a while to dig all this up, but this seems to be the pattern for exposing config flags to the client.