Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
4ffb358
backend service endpoint for computing unit metrics
PurelyBlank Jan 22, 2025
47481d6
Merge branch 'workflow-pod' of https://github.com/Texera/texera into …
PurelyBlank Jan 25, 2025
318360d
updated coded for resource metrics with request handling
PurelyBlank Jan 27, 2025
742081f
updated pod metrics service
PurelyBlank Jan 27, 2025
e75c0cc
update resource metrics implementation and ui
PurelyBlank Feb 4, 2025
41b77fa
Merge branch 'workflow-pod' of https://github.com/Texera/texera into …
PurelyBlank Feb 7, 2025
e4cffd8
computing unit selection and metrics ui fix
PurelyBlank Feb 9, 2025
f489c30
center aligned computing unit selection
PurelyBlank Feb 11, 2025
435b325
pod resource metrics and ui changes
PurelyBlank Feb 16, 2025
c019fe5
added helper file for workflowComputingUnitManagingResource
PurelyBlank Feb 18, 2025
1af80be
after compute unit selection title normal weight
PurelyBlank Feb 22, 2025
21fe62d
changes to yaml configuration and image creation
PurelyBlank Feb 23, 2025
1b24db0
texera helm chart modifications
PurelyBlank Feb 24, 2025
54ed658
refactored computing unit limits
PurelyBlank Feb 25, 2025
26f7ecd
workflow computing unit refactoring
PurelyBlank Feb 26, 2025
4eb7094
computing unit modifications
PurelyBlank Mar 2, 2025
88af367
refactored computing unit ui
PurelyBlank Mar 3, 2025
e4049ae
disabled unit selection if currently creating
PurelyBlank Mar 3, 2025
7080b92
width fix for google signin button
PurelyBlank Mar 11, 2025
b19d982
format fix
PurelyBlank Mar 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions core/amber/computing-unit.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ RUN apt-get update && apt-get install -y \
netcat \
unzip \
python3-pip \
libpq-dev \
python3-dev \
&& apt-get clean

# Install Python dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import edu.uci.ics.amber.core.virtualidentity.WorkflowIdentity
import edu.uci.ics.texera.web.auth.SessionUser
import edu.uci.ics.texera.web.model.websocket.request.ResultExportRequest
import edu.uci.ics.texera.web.model.websocket.response.ResultExportResponse
import edu.uci.ics.texera.web.service.{ResultExportService, WorkflowService}
import edu.uci.ics.texera.web.service.ResultExportService
import io.dropwizard.auth.Auth

import javax.ws.rs._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import akka.actor.Cancellable
import com.fasterxml.jackson.annotation.{JsonTypeInfo, JsonTypeName}
import com.fasterxml.jackson.databind.node.ObjectNode
import com.typesafe.scalalogging.LazyLogging
import edu.uci.ics.amber.core.storage.DocumentFactory.{ICEBERG, MONGODB}
import edu.uci.ics.amber.core.storage.DocumentFactory.ICEBERG
import edu.uci.ics.amber.core.storage.VFSResourceType.MATERIALIZED_RESULT
import edu.uci.ics.amber.core.storage.model.VirtualDocument
import edu.uci.ics.amber.core.storage.{DocumentFactory, StorageConfig, VFSURIFactory}
Expand Down
2 changes: 1 addition & 1 deletion core/amber/webserver.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ COPY core/ .
RUN rm -rf amber/user-resources/*

RUN apt-get update
RUN apt-get install -y netcat unzip python3-pip
RUN apt-get install -y netcat unzip python3-pip libpq-dev python3-dev
RUN pip3 install python-lsp-server python-lsp-server[websockets]
RUN pip3 install -r amber/requirements.txt

Expand Down
1 change: 0 additions & 1 deletion core/gui/proxy.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"secure": false,
"changeOrigin": true
},

"/api": {
"target": "http://texera.example.com:30080",
"secure": false,
Expand Down
2 changes: 2 additions & 0 deletions core/gui/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ import { SocialLoginModule, SocialAuthServiceConfig, GoogleSigninButtonModule }
import { GoogleLoginProvider } from "@abacritt/angularx-social-login";
import { lastValueFrom } from "rxjs";
import { HubSearchResultComponent } from "./hub/component/hub-search-result/hub-search-result.component";
import { NzProgressModule } from "ng-zorro-antd/progress";

registerLocaleData(en);

Expand Down Expand Up @@ -295,6 +296,7 @@ registerLocaleData(en);
NzDividerModule,
SocialLoginModule,
GoogleSigninButtonModule,
NzProgressModule,
],
providers: [
provideNzI18n(en_US),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
*ngIf="!isLogin && googleLogin"
type="standard"
size="large"
width="200"></asl-google-signin-button>
[width]="200"></asl-google-signin-button>
</div>

<nz-content>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,52 +1,181 @@
<nz-select
nzSize="large"
nzShowSearch
nzAllowClear
[nzDropdownRender]="renderTemplate"
nzPlaceHolder="Select a computing unit"
[(ngModel)]="selectedComputingUnit"
(ngModelChange)="onComputingUnitChange($event)">
<nz-option
*ngFor="let unit of computingUnits"
nzCustomContent
[nzLabel]="unit.uri"
[nzValue]="unit">
<div class="computing-unit-option">
<!-- Badge with state -->
<nz-badge
[nzColor]="getBadgeColor(unit.status)"
[nzText]="''">
<span
nz-icon
nzType="desktop"></span>
</nz-badge>
<div
class="computing-units-selection"
[ngClass]="{ 'metrics-visible': isComputingUnitRunning() }">
<div
*ngIf="isComputingUnitRunning()"
nz-button
nz-popover
[nzPopoverContent]="selectedComputingUnit ? metricsTemplate : undefined"
nzPopoverTrigger="hover"
nzPopoverPlacement="bottom"
id="metrics-container-id"
class="metrics-container">
<div class="metric-item">
<span class="metric-label">CPU</span>
<nz-progress
id="cpu-progress-bar"
[nzPercent]="(getCpuPercentage() | number:'1.0-0')"
[nzStrokeColor]="'#52c41a'"
[nzStatus]="getCpuStatus()"
nzType="line"
[nzStrokeWidth]="8"
[nzShowInfo]="false"></nz-progress>
</div>

<!-- Name and tooltip -->
<span class="unit-details">
<span
nz-tooltip
[nzTooltipTitle]="unit.uri"
>{{ unit.computingUnit.name }}</span
>
<div class="metric-item">
<span class="metric-label">Memory</span>
<nz-progress
id="memory-progress-bar"
[nzPercent]="(getMemoryPercentage() | number:'1.0-0')"
[nzStrokeColor]="'#1890ff'"
[nzStatus]="getMemoryStatus()"
nzType="line"
[nzStrokeWidth]="8"
[nzShowInfo]="false"></nz-progress>
</div>
</div>

<button
nz-button
nz-dropdown
nzTrigger="click"
[nzDropdownMenu]="menu"
[nzPlacement]="'bottomRight'"
class="computing-units-dropdown-button">
<nz-badge
[nzStatus]="computeStatus()"
[nzText]="''"></nz-badge>
<span
*ngIf="selectedComputingUnit"
nz-tooltip
[nzTooltipTitle]="getComputingUnitName(selectedComputingUnit.uri)">
Connected
</span>
<span *ngIf="!selectedComputingUnit">Connect</span>
<i
nz-icon
nzType="down"></i>
</button>

<nz-dropdown-menu #menu="nzDropdownMenu">
<ul
nz-menu
class="computing-units-dropdown">
<li
nz-menu-item
*ngFor="let unit of computingUnits"
id="computing-unit-option"
[nzDisabled]="cannotSelectUnit(unit)"
[ngClass]="{ 'unit-selected': isSelectedUnit(unit) }"
(click)="selectedComputingUnit = unit; onComputingUnitChange(unit)">
<div class="computing-unit-name">
<nz-badge
[nzColor]="getBadgeColor(unit.status)"
[nzText]="''"></nz-badge>
<span
nz-tooltip
[nzTooltipTitle]="unit.computingUnit.name">
{{ getComputingUnitName(unit.uri) }}
</span>
</div>
<div
class="terminate-box"
class="terminate-icon"
nz-icon
nzType="delete"
nz-tooltip
[nzTooltipTitle]="'Terminate'"
(click)="terminateComputingUnit(unit.computingUnit.cuid)"></div>
</span>
</div>
</nz-option>
</nz-select>
[nzTooltipTitle]="'Terminate ' + getComputingUnitName(unit.uri)"
(click)="terminateComputingUnit(unit.computingUnit.cuid); $event.stopPropagation()"></div>
</li>
<li nz-menu-divider></li>
<li
nz-menu-item
(click)="showAddComputeUnitModalVisible()">
<div class="create-computing-unit">
<i
nz-icon
nzType="plus"></i>
<span>Computing Unit</span>
</div>
</li>
</ul>
</nz-dropdown-menu>
</div>

<ng-template #renderTemplate>
<nz-divider></nz-divider>
<div class="dropdown-footer">
<nz-modal
[(nzVisible)]="addComputeUnitModalVisible"
[nzTitle]="addComputeUnitModalTitle"
[nzContent]="addComputeUnitModalContent"
[nzFooter]="addComputeUnitModalFooter"
(nzOnCancel)="handleAddComputeUnitModalCancel()">
<ng-template #addComputeUnitModalTitle>Create Computing Unit</ng-template>
<ng-template #addComputeUnitModalContent>
<div class="create-compute-unit-container">
<div class="select-unit">
<span>Select Memory</span>
<nz-select
class="memory-selection"
[(ngModel)]="selectedMemory">
<nz-option
nzValue="1Gi"
nzLabel="Lowest Memory (1Gi)"></nz-option>
<nz-option
nzValue="2Gi"
nzLabel="Standard Memory (2Gi)"></nz-option>
<nz-option
nzValue="4Gi"
nzLabel="High Memory (4Gi)"></nz-option>
</nz-select>
</div>

<div class="select-unit">
<span>Select CPU</span>
<nz-select
class="cpu-selection"
[(ngModel)]="selectedCpu">
<nz-option
nzValue="1"
nzLabel="Lowest CPU (1 Core)"></nz-option>
<nz-option
nzValue="2"
nzLabel="Standard CPU (2 Core)"></nz-option>
<nz-option
nzValue="4"
nzLabel="High CPU (4 Core)"></nz-option>
</nz-select>
</div>
</div>
</ng-template>
<ng-template #addComputeUnitModalFooter>
<button
nz-button
nzType="default"
(click)="handleAddComputeUnitModalCancel()">
Cancel
</button>
<button
nz-button
nzType="primary"
nzBlock
(click)="startComputingUnit()">
Start
(click)="handleAddComputeUnitModalOk()">
Create
</button>
</ng-template>
</nz-modal>

<ng-template #metricsTemplate>
<div class="resource-metrics">
<div class="cpu-metric general-metric">
<p class="metric-name">CPU</p>
<p class="metric-value">
{{getCpuValue() | number:'1.2-2' || '0.00'}}
<span class="metric-unit">/ {{getCpuLimit()}} {{getCpuLimitUnit()}}</span>
</p>
</div>
<div class="memory-metric general-metric">
<p class="metric-name">Memory</p>
<p class="metric-value">
{{getMemoryValue() | number:'1.2-2' || '0.00'}}
<span class="metric-unit">/ {{getMemoryLimit()}} {{getMemoryLimitUnit()}}</span>
</p>
</div>
</div>
</ng-template>
Loading
Loading