This is an automated email from the ASF dual-hosted git repository.
voidmatcha pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push:
new cf5a453d97 [ZEPPELIN-6593] Preserve false interpreter property values
cf5a453d97 is described below
commit cf5a453d973d306057ea0f172ebf0ec1c85b4ffe
Author: Wu Shuwen <[email protected]>
AuthorDate: Fri Oct 30 00:25:53 2026 +0800
[ZEPPELIN-6593] Preserve false interpreter property values
Fixes [ZEPPELIN-6593](https://issues.apache.org/jira/browse/ZEPPELIN-6593).
The New UI's view-mode property cell used a truthy fallback, so a boolean
`false` value rendered as blank. Route the cell through a nullish formatter
instead, preserving `false` and `true` while keeping nullish values empty.
Password masking and checkbox editing remain unchanged.
Verification:
- `npm run test:shell --
src/app/pages/workspace/interpreter/item/item.component.spec.ts` — 4 tests
passed. Vite emitted a missing Monaco source-map warning.
- Angular workspace lint completed with 0 errors (existing warnings remain).
- The combined `npm run lint` did not complete: the separate React remote
lint could not resolve its uninstalled `eslint-plugin-react` dependency. No
React files are changed.
Closes #5592 from
dajiaohuang/ZEPPELIN-6593-preserve-false-interpreter-values.
Signed-off-by: YONGJAE LEE <[email protected]>
---
.../workspace/interpreter/item/item.component.html | 2 +-
.../interpreter/item/item.component.spec.ts | 42 ++++++++++++++++++++++
.../workspace/interpreter/item/item.component.ts | 4 +++
3 files changed, 47 insertions(+), 1 deletion(-)
diff --git
a/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.html
b/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.html
index d54ae21ff5..cb07f5a4b5 100644
---
a/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.html
+++
b/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.html
@@ -361,7 +361,7 @@
</a>
}
@default {
- {{ control.get('value')?.value || '' }}
+ {{ displayPropertyValue(control.get('value')?.value) }}
}
}
}
diff --git
a/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.spec.ts
b/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.spec.ts
new file mode 100644
index 0000000000..2035997927
--- /dev/null
+++
b/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.spec.ts
@@ -0,0 +1,42 @@
+/*
+ * Licensed 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.
+ */
+
+import type { ChangeDetectorRef } from '@angular/core';
+import { describe, expect, it } from 'vitest';
+
+import type { SecurityService, TicketService, InterpreterService } from
'@zeppelin/services';
+
+import type { InterpreterComponent } from '../interpreter.component';
+import { InterpreterItemComponent } from './item.component';
+
+const createComponent = () =>
+ new InterpreterItemComponent(
+ {} as InterpreterComponent,
+ {} as TicketService,
+ {} as SecurityService,
+ {} as InterpreterService,
+ {} as ChangeDetectorRef
+ );
+
+describe('InterpreterItemComponent.displayPropertyValue', () => {
+ it.each([false, true])('preserves the boolean value %s', value => {
+ const component = createComponent();
+
+ expect(component.displayPropertyValue(value)).toBe(value);
+ });
+
+ it.each([null, undefined])('renders an absent value as empty', value => {
+ const component = createComponent();
+
+ expect(component.displayPropertyValue(value)).toBe('');
+ });
+});
diff --git
a/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.ts
b/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.ts
index 06634bff48..cc7fe2a026 100644
---
a/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.ts
+++
b/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.ts
@@ -97,6 +97,10 @@ export class InterpreterItemComponent extends
DestroyHookComponent implements On
interpreterRunningOption = 'Globally';
+ displayPropertyValue(value: PropertyValue | undefined): PropertyValue {
+ return value ?? '';
+ }
+
switchToEditMode(): void {
this.setupEditableForm();
this.formGroup.enable();