mengw15 commented on code in PR #7536:
URL: https://github.com/apache/texera/pull/7536#discussion_r3780766592
##########
frontend/src/app/dashboard/type/workflow-executions-entry.ts:
##########
@@ -22,6 +22,7 @@ export interface WorkflowExecutionsEntry {
eId: number;
vId: number;
cuId: number;
+ whId: number;
Review Comment:
Right โ `whId` is `Integer` on the wire and is null for shared-storage runs
and after `ON DELETE SET NULL`. Typed as `number | null` in 44e65a4e9; the cast
in the picker spec is gone.
##########
frontend/src/app/workspace/component/power-button/computing-unit-selection.component.ts:
##########
@@ -226,6 +239,29 @@ export class ComputingUnitSelectionComponent implements
OnInit {
this.allComputingUnits = units;
});
+ // Warehouse picker state (#6933). The pick itself lives in
WarehouseService,
+ // where ExecuteWorkflowService reads it at execution time.
+ this.warehouseService
+ .getStatus()
+ .pipe(untilDestroyed(this))
+ .subscribe({
+ next: status => {
+ this.warehouseEnabled = status.enabled;
+ this.warehouses = [...status.warehouses];
+ this.applyWarehousePreselect();
+ },
+ error: (err: unknown) => {
+ console.error("Failed to fetch warehouse status", err);
+ },
Review Comment:
Good catch, this was a real leak: the pick lives in the root-scoped
`WarehouseService`, so hiding the picker left a previous workflow's id in place
and the next execution would have carried it. Fixed in 44e65a4e9 โ the
status-failure path and the nothing-selectable path both clear the selection
now, pinned by two spec cases (verified red without the fix).
##########
frontend/src/app/dashboard/component/user/user-warehouse/user-warehouse.component.html:
##########
@@ -0,0 +1,116 @@
+<!--
+ 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.
+-->
+
+<div class="section-container subsection-grid-container">
+ <nz-card class="section-title">
+ <h2 class="page-title">Warehouses</h2>
+ <div class="button-group">
+ <button
+ nz-button
+ class="create-btn"
+ (click)="showCreateModal()"
+ [disabled]="!warehouseEnabled"
+ title="Create Warehouse">
+ <i
+ nz-icon
+ nzType="file-add"
+ nzTheme="outline"></i>
+ <span>Create Warehouse</span>
+ </button>
+ </div>
+ </nz-card>
+
+ <nz-card
+ class="section-list-container"
+ [nzBodyStyle]="{ height: '100%' }">
+ <div class="warehouse-page">
+ <div
+ *ngIf="!warehouseEnabled"
+ class="warehouse-page-empty">
+ Per-user warehouses are disabled in this deployment.
+ </div>
+
+ <div
+ *ngIf="warehouseEnabled && warehouses.length === 0"
+ class="warehouse-page-empty">
+ No warehouses yet. Click <strong>Create Warehouse</strong> to create
one.
+ </div>
+
+ <ul
+ *ngIf="warehouseEnabled && warehouses.length > 0"
+ class="warehouse-page-list">
+ <li
+ *ngFor="let warehouse of warehouses; trackBy: trackByWhid"
+ class="warehouse-page-item">
+ <span
+ class="warehouse-name"
+ nz-tooltip
+ [nzTooltipTitle]="warehouse.warehouseName">
+ {{ warehouse.name }}
+ </span>
+ <span class="warehouse-meta"> {{ warehouse.flavor }} ยท created {{
warehouse.createdAtMillis | date }} </span>
+ <i
+ nz-icon
+ nzType="delete"
+ class="warehouse-delete-icon"
+ nz-tooltip
+ nzTooltipTitle="Delete warehouse and all data stored in it"
+ (click)="confirmDelete(warehouse)"
+ role="button"
+ aria-label="Delete warehouse">
+ </i>
Review Comment:
This follows the established pattern for row actions in this codebase โ the
computing-unit list's delete/rename/share icons are all `<i nz-icon (click)>`
with `role="button"`. Making just this one a real button would be inconsistent;
fixing them together is a separate accessibility pass worth its own issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]