From 0fa122ecf21211921162be0c0c3b67a210f6c0f2 Mon Sep 17 00:00:00 2001 From: Vadim Ogievetsky Date: Fri, 5 Apr 2019 12:40:43 -0700 Subject: [PATCH] Adding ability to pass configs in and fixing misc bugs (#7414) * Adding ability to pass configs in and fixing misc bugs * update lock file * remove dead version param --- web-console/console-config.js | 19 ++++ web-console/package-lock.json | 2 +- web-console/script/cp-to | 1 + web-console/src/components/auto-form.tsx | 1 + web-console/src/components/header-bar.tsx | 39 +++++--- .../components/table-column-selection.scss | 6 +- web-console/src/console-application.tsx | 11 ++- web-console/src/entry.ts | 9 +- web-console/src/views/lookups-view.tsx | 96 ++++++++++++------- web-console/unified-console.html | 3 +- 10 files changed, 128 insertions(+), 59 deletions(-) create mode 100644 web-console/console-config.js diff --git a/web-console/console-config.js b/web-console/console-config.js new file mode 100644 index 00000000000..127d3a00e9b --- /dev/null +++ b/web-console/console-config.js @@ -0,0 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +window.consoleConfig = { /* future configs may go here */ }; diff --git a/web-console/package-lock.json b/web-console/package-lock.json index 61dba3cbb0c..22ea74e09c9 100644 --- a/web-console/package-lock.json +++ b/web-console/package-lock.json @@ -1,6 +1,6 @@ { "name": "web-console", - "version": "0.14.0", + "version": "0.15.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/web-console/script/cp-to b/web-console/script/cp-to index 81240ff6108..b8ad2ebeb4d 100755 --- a/web-console/script/cp-to +++ b/web-console/script/cp-to @@ -20,6 +20,7 @@ echo "Copying web-console files to $1..." mkdir -p "$1" cp *.html "$1" cp *.png "$1" +cp console-config.js "$1" cp -r coordinator-console "$1" cp -r old-console "$1" cp -r pages "$1" diff --git a/web-console/src/components/auto-form.tsx b/web-console/src/components/auto-form.tsx index aad21e01454..c1ade7a06a2 100644 --- a/web-console/src/components/auto-form.tsx +++ b/web-console/src/components/auto-form.tsx @@ -134,6 +134,7 @@ export class AutoForm extends React.Component, AutoFormState onChange={(v: any) => { onChange(Object.assign({}, model, { [field.name]: v })); }} + addOnBlur fill />; } diff --git a/web-console/src/components/header-bar.tsx b/web-console/src/components/header-bar.tsx index f0f5853d27e..ac1cd67b53f 100644 --- a/web-console/src/components/header-bar.tsx +++ b/web-console/src/components/header-bar.tsx @@ -38,6 +38,7 @@ export type HeaderActiveTab = null | 'datasources' | 'segments' | 'tasks' | 'ser export interface HeaderBarProps extends React.Props { active: HeaderActiveTab; + hideLegacy: boolean; } export interface HeaderBarState { @@ -106,7 +107,7 @@ export class HeaderBar extends React.Component { } render() { - const { active } = this.props; + const { active, hideLegacy } = this.props; const { aboutDialogOpen, coordinatorDynamicConfigDialogOpen, overlordDynamicConfigDialogOpen } = this.state; const legacyMenu = @@ -144,22 +145,34 @@ export class HeaderBar extends React.Component { - -