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

Adding ability to pass configs in and fixing misc bugs #7414

Merged
merged 3 commits into from
Apr 5, 2019

Conversation

vogievetsky
Copy link
Contributor

Adding a rudimentary mechanism for Druid to pass configs to the console (by overriding the web-console/console-config.js file) for future extensibility.

Also making misc fixes:

  • Add missing addOnBlur for tag input
  • Remove extra margin in column selector
  • Fix column name capitalization in lookup view
  • Lookup view will now confirm deleting a lookup (like all the other views do)
  • Lookup view will not show option to Initialize lookups on errors other than 404 and will correctly display a legitimate error
  • Avoid using display: none to hide elements

Lookup delete confirmation:

image

* limitations under the License.
*/

window.consoleConfig = { /* future configs may go here */ };
Copy link
Member

Choose a reason for hiding this comment

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

I think you should add hideLegacy and baseURL here maybe with their default values and an comment explanations of what they do since they seem more like 'now' configs than 'future' configs?

Copy link
Member

Choose a reason for hiding this comment

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

Since this gets built into the Druid package, it's not really configurable unless you build your own package. Would it make sense as a follow up to improve the Druid side that serves this path to optionally wire up to a Druid config option that points to an alternate file to use for console-config.js so that an operator might supply their own js file with config values to override the defaults?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am imagining that this would be a default and there would be a Druid property that has a JSON object it in that Druid will stringily and prepend with window.consoleConfig = and send instead of this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not see a need to add default configs here as this IMO is just a stepping stone PR towards what I said above. I will add a sweet interface for it though.

ReactDOM.render(
React.createElement(
ConsoleApplication,
{
version: '0.0.1'
version: '0.15.0',
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, it would be very nice to find a more elegant way to sync versions from Druid's pom.xml to the web console, but I don't really know what that is right now (and not really necessary to address in this PR i think)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah... to be honest this is dead code. The version here is never used, the console makes a GET /status query to get the version. Removing.

Copy link
Member

@clintropolis clintropolis left a comment

Choose a reason for hiding this comment

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

🤘

@clintropolis clintropolis merged commit 0fa122e into apache:master Apr 5, 2019
@clintropolis clintropolis deleted the console-config branch April 5, 2019 19:41
@clintropolis clintropolis added this to the 0.15.0 milestone Apr 5, 2019
gianm pushed a commit to implydata/druid-public that referenced this pull request Apr 10, 2019
* Adding ability to pass configs in and fixing misc bugs

* update lock file

* remove dead version param
clintropolis added a commit to clintropolis/druid that referenced this pull request Apr 11, 2019
clintropolis added a commit to implydata/druid-public that referenced this pull request Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants