This is an automated email from the ASF dual-hosted git repository.

jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 6c9e407b06 allow mvn build with development webpack; fix instances 
default value (#9179)
6c9e407b06 is described below

commit 6c9e407b06a267487133357c316b183aa6c9aab0
Author: Johan Adami <[email protected]>
AuthorDate: Mon Aug 8 20:25:36 2022 -0400

    allow mvn build with development webpack; fix instances default value 
(#9179)
---
 pinot-controller/pom.xml                                             | 5 +++--
 .../src/main/resources/app/components/Homepage/InstanceTable.tsx     | 4 ++--
 .../src/main/resources/app/components/Homepage/InstancesTables.tsx   | 2 +-
 pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts    | 2 +-
 pinot-controller/src/main/resources/package.json                     | 1 +
 5 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/pinot-controller/pom.xml b/pinot-controller/pom.xml
index c5f3a6836b..fa7734470a 100644
--- a/pinot-controller/pom.xml
+++ b/pinot-controller/pom.xml
@@ -33,6 +33,7 @@
   <url>https://pinot.apache.org/</url>
   <properties>
     <pinot.root>${basedir}/..</pinot.root>
+    <npm.script>build</npm.script>
   </properties>
   <dependencies>
     <dependency>
@@ -244,7 +245,7 @@
             </configuration>
           </execution>
           <execution>
-            <id>npm run-script build</id>
+            <id>npm run-script ${npm.script}</id>
             <goals>
               <goal>npm</goal>
             </goals>
@@ -253,7 +254,7 @@
             <configuration>
               <!-- optional: if not specified, it will run gulp's default task
                   (and you can remove this whole <configuration> section.) -->
-              <arguments>run-script build</arguments>
+              <arguments>run-script ${npm.script}</arguments>
               <!--arguments>build</arguments-->
             </configuration>
           </execution>
diff --git 
a/pinot-controller/src/main/resources/app/components/Homepage/InstanceTable.tsx 
b/pinot-controller/src/main/resources/app/components/Homepage/InstanceTable.tsx
index e077f3153e..7df9518843 100644
--- 
a/pinot-controller/src/main/resources/app/components/Homepage/InstanceTable.tsx
+++ 
b/pinot-controller/src/main/resources/app/components/Homepage/InstanceTable.tsx
@@ -29,7 +29,7 @@ type Props = {
   clusterName: string
 };
 
-const InstaceTable = ({ name, instances, clusterName }: Props) => {
+const InstanceTable = ({ name, instances, clusterName }: Props) => {
 
   const [fetching, setFetching] = useState(true);
   const [tableData, setTableData] = useState<TableData>({
@@ -70,4 +70,4 @@ const InstaceTable = ({ name, instances, clusterName }: 
Props) => {
   );
 };
 
-export default InstaceTable;
\ No newline at end of file
+export default InstanceTable;
\ No newline at end of file
diff --git 
a/pinot-controller/src/main/resources/app/components/Homepage/InstancesTables.tsx
 
b/pinot-controller/src/main/resources/app/components/Homepage/InstancesTables.tsx
index 19513f193e..a0e32720d1 100644
--- 
a/pinot-controller/src/main/resources/app/components/Homepage/InstancesTables.tsx
+++ 
b/pinot-controller/src/main/resources/app/components/Homepage/InstancesTables.tsx
@@ -28,7 +28,7 @@ const Instances = ({instances, clusterName}) => {
     <>
       {
         map(order, (key) => {
-          const value = get(instances, key, '');
+          const value = get(instances, key, []);
           return <InstanceTable key={key} name={`${key}s`} instances={value} 
clusterName={clusterName} />;
         })
       }
diff --git a/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts 
b/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
index fa87b73b7c..5797be44c0 100644
--- a/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
+++ b/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
@@ -152,7 +152,7 @@ const getAllInstances = () => {
 };
 
 // This method is used to display instance data on cluster manager home page
-// API: /instances/:instaneName
+// API: /instances/:instanceName
 // Expected Output: {columns: [], records: []}
 const getInstanceData = (instances, liveInstanceArr) => {
   const promiseArr = [...instances.map((inst) => getInstance(inst))];
diff --git a/pinot-controller/src/main/resources/package.json 
b/pinot-controller/src/main/resources/package.json
index 50892337ad..fa90501207 100644
--- a/pinot-controller/src/main/resources/package.json
+++ b/pinot-controller/src/main/resources/package.json
@@ -6,6 +6,7 @@
     "dev": "webpack-dev-server --config ./webpack.config.js --mode 
development",
     "start": "npm-run-all --parallel lint dev",
     "build": "webpack --mode production",
+    "build-dev": "webpack --mode development",
     "build-analyze": "webpack --mode production --analyze",
     "lint": "eslint 'app/**/*.{js,ts,tsx,jsx}' --quiet --fix",
     "test": "echo \"Error: no test specified\" && exit 1"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to