mirror of
https://github.com/clearml/clearml-web
synced 2025-06-26 18:27:02 +00:00
io mapping of artifacts
This commit is contained in:
parent
cfe2169ee6
commit
c4a20594b0
@ -46,6 +46,7 @@ import {
|
|||||||
PipelinesUpdateResponse,
|
PipelinesUpdateResponse,
|
||||||
PipelinesCompileRequest,
|
PipelinesCompileRequest,
|
||||||
PipelinesRunRequest,
|
PipelinesRunRequest,
|
||||||
|
PipelinesUpdateStepsRequest,
|
||||||
} from "../model/pipelines/models";
|
} from "../model/pipelines/models";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@ -290,6 +291,60 @@ export class ApiPipelinesService {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Update pipeline step
|
||||||
|
* @param request request body
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
* @param reportProgress flag to report request and response progress.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public pipelinesUpdateStep(
|
||||||
|
request: PipelinesUpdateStepsRequest,
|
||||||
|
options?: any,
|
||||||
|
observe: any = "body",
|
||||||
|
reportProgress: boolean = false
|
||||||
|
): Observable<any> {
|
||||||
|
if (request === null || request === undefined) {
|
||||||
|
throw new Error(
|
||||||
|
"Required parameter request was null or undefined when calling pipelinesUpdateStep."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
let headers = this.defaultHeaders;
|
||||||
|
if (options && options.async_enable) {
|
||||||
|
headers = headers.set(this.configuration.asyncHeader, "1");
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
const httpHeaderAccepts: string[] = ["application/json"];
|
||||||
|
const httpHeaderAcceptSelected: string | undefined =
|
||||||
|
this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
|
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [];
|
||||||
|
const httpContentTypeSelected: string | undefined =
|
||||||
|
this.configuration.selectHeaderContentType(consumes);
|
||||||
|
if (httpContentTypeSelected != undefined) {
|
||||||
|
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.apiRequest.post<any>(
|
||||||
|
`${this.basePath}/pipelines.update_node`,
|
||||||
|
request,
|
||||||
|
{
|
||||||
|
withCredentials: this.configuration.withCredentials,
|
||||||
|
headers: headers,
|
||||||
|
observe: observe,
|
||||||
|
reportProgress: reportProgress,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Create a new pipeline step
|
* Create a new pipeline step
|
||||||
|
@ -11,5 +11,7 @@ export * from '././pipelinesUpdateRequest';
|
|||||||
export * from '././pipelinesUpdateResponse';
|
export * from '././pipelinesUpdateResponse';
|
||||||
export * from '././pipelinesCompileRequest';
|
export * from '././pipelinesCompileRequest';
|
||||||
export * from '././pipelinesRunRequest';
|
export * from '././pipelinesRunRequest';
|
||||||
|
export * from '././pipelinesStepInputOutputMappingOptions';
|
||||||
|
export * from '././pipelinesUpdateStepsRequest';
|
||||||
|
|
||||||
export * from "././pipeline";
|
export * from "././pipeline";
|
@ -0,0 +1,5 @@
|
|||||||
|
import { Artifact } from "../tasks/artifact";
|
||||||
|
|
||||||
|
export interface PipelinesStepInputOutputMappingOptions extends Artifact {
|
||||||
|
stepName: string;
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
import { PipelinesParameter } from "./pipelinesParameter";
|
||||||
|
|
||||||
|
export interface PipelinesUpdateStepsRequest {
|
||||||
|
/**
|
||||||
|
* Pipeline step name. Unique within the company.
|
||||||
|
*/
|
||||||
|
step?: string;
|
||||||
|
|
||||||
|
parameters?: Array<PipelinesParameter>,
|
||||||
|
}
|
@ -3,7 +3,7 @@
|
|||||||
[pipelineData]="selectedPipeline">
|
[pipelineData]="selectedPipeline">
|
||||||
</sm-edit-pipeline-header>
|
</sm-edit-pipeline-header>
|
||||||
<div class="edit-pipeline-body">
|
<div class="edit-pipeline-body">
|
||||||
<sm-pipeline-step-info [step]="selectedStep" *ngIf="selectedStep" (stepParamsChanged)="selectedStepParamsChanged($event)"/>
|
<sm-pipeline-step-info [step]="selectedStep" *ngIf="selectedStep" [ioOptions]="selectedStepInputOutputOptions" (stepParamsChanged)="selectedStepParamsChanged($event)"/>
|
||||||
<!-- <div class="details"><i class="icon no-output-icon i-no-code-dark"></i> DETAILS</div> -->
|
<!-- <div class="details"><i class="icon no-output-icon i-no-code-dark"></i> DETAILS</div> -->
|
||||||
<sm-flow-editor *ngIf="selectedPipeline?.flow_display?.nodes?.length" [pipelineData]="selectedPipeline"
|
<sm-flow-editor *ngIf="selectedPipeline?.flow_display?.nodes?.length" [pipelineData]="selectedPipeline"
|
||||||
(nodesChangedInReactFlow)="nodesChangedInReactFlow($event)"
|
(nodesChangedInReactFlow)="nodesChangedInReactFlow($event)"
|
||||||
|
@ -4,13 +4,18 @@ import { PipelineAddStepDialogComponent } from '../pipeline-add-step-dialog/pipe
|
|||||||
import { PipelineSettingDialogComponent } from '../pipeline-setting/pipeline-setting.dialog.component';
|
import { PipelineSettingDialogComponent } from '../pipeline-setting/pipeline-setting.dialog.component';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { createPipelineStep, pipelineSettings, getPipelineById, resetPipelines, resetPipelinesSearchQuery, updatePipeline, compilePipeline, runPipeline, setSelectedPipeline } from '../pipelines.actions';
|
import { createPipelineStep, pipelineSettings, getPipelineById, resetPipelines, resetPipelinesSearchQuery, updatePipeline, compilePipeline, runPipeline, setSelectedPipeline, updatePipelineStep } from '../pipelines.actions';
|
||||||
import { selectRouterParams } from '@common/core/reducers/router-reducer';
|
import { selectRouterParams } from '@common/core/reducers/router-reducer';
|
||||||
import { Observable, Subscription, map } from 'rxjs';
|
import { Observable, Subscription, map } from 'rxjs';
|
||||||
import { Params } from '@angular/router';
|
import { Params } from '@angular/router';
|
||||||
import { selectSelectedPipeline } from '../pipelines.reducer';
|
import { selectSelectedPipeline } from '../pipelines.reducer';
|
||||||
import { Pipeline, PipelinesCompileRequest } from '~/business-logic/model/pipelines/models';
|
import { Pipeline, PipelinesCompileRequest, PipelinesStepInputOutputMappingOptions } from '~/business-logic/model/pipelines/models';
|
||||||
import { cloneDeep } from 'lodash-es';
|
import { cloneDeep } from 'lodash-es';
|
||||||
|
import { ArtifactModeEnum } from '~/business-logic/model/tasks/models';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'sm-edit-pipeline-page',
|
selector: 'sm-edit-pipeline-page',
|
||||||
@ -23,21 +28,52 @@ export class EditPipelinePageComponent implements OnInit, OnDestroy {
|
|||||||
public subs = new Subscription();
|
public subs = new Subscription();
|
||||||
public selectedPipelineId$: Observable<string>;
|
public selectedPipelineId$: Observable<string>;
|
||||||
private selectedPipeline$: Observable<Pipeline>;
|
private selectedPipeline$: Observable<Pipeline>;
|
||||||
public selectedPipeline: Pipeline;
|
public selectedPipeline: Pipeline; // do not update this variable, maintain it readonly.
|
||||||
public selectedStep;
|
private _selectedStep;
|
||||||
|
public selectedStepInputOutputOptions: Array<PipelinesStepInputOutputMappingOptions>;
|
||||||
pipelineId: string;
|
pipelineId: string;
|
||||||
private reactFlowState = {nodes: [], edges: []};
|
|
||||||
|
//// nodes and edges state should be managed here for local use
|
||||||
|
// changes will be propagated to store only after clicking on save.
|
||||||
|
private reactFlowState = {nodes: [], edges: []};
|
||||||
|
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
||||||
this.selectedPipelineId$ = this.store.select(selectRouterParams).pipe(map((params: Params) => {
|
this.selectedPipelineId$ = this.store.select(selectRouterParams).pipe(map((params: Params) => {
|
||||||
// eslint-disable-next-line @ngrx/avoid-mapping-selectors
|
|
||||||
//console.log(params);
|
|
||||||
return params?.id
|
return params?.id
|
||||||
}));
|
}));
|
||||||
this.selectedPipeline$ = this.store.select(selectSelectedPipeline)
|
this.selectedPipeline$ = this.store.select(selectSelectedPipeline)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private recomputeSelectedStepInputOutputOptions() {
|
||||||
|
const incommingNodes = this.getIncomingNodesForNode(this._selectedStep, this.reactFlowState .nodes, this.reactFlowState .edges);
|
||||||
|
const options:Array<PipelinesStepInputOutputMappingOptions> = [];
|
||||||
|
incommingNodes.forEach((node) => {
|
||||||
|
if(node.data?.experimentDetails?.execution?.artifacts?.length) {
|
||||||
|
// for now we are using only artifacts of i/o mapping.
|
||||||
|
node.data.experimentDetails.execution.artifacts.forEach((artifact) => {
|
||||||
|
if(artifact.mode === ArtifactModeEnum.Output) {
|
||||||
|
options.push({
|
||||||
|
...artifact,
|
||||||
|
stepName: node.data.name,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.selectedStepInputOutputOptions = options;
|
||||||
|
console.log(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
set selectedStep(data) {
|
||||||
|
this._selectedStep = data;
|
||||||
|
this.recomputeSelectedStepInputOutputOptions();
|
||||||
|
|
||||||
|
}
|
||||||
|
get selectedStep() {
|
||||||
|
return this._selectedStep;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.subs.add(this.selectedPipelineId$.pipe(
|
this.subs.add(this.selectedPipelineId$.pipe(
|
||||||
).subscribe((pipelineId) => {
|
).subscribe((pipelineId) => {
|
||||||
@ -134,35 +170,62 @@ export class EditPipelinePageComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
public nodesChangedInReactFlow(data) {
|
public nodesChangedInReactFlow(data) {
|
||||||
this.reactFlowState.nodes = data;
|
this.reactFlowState.nodes = cloneDeep(data);
|
||||||
//console.log("nodes changed", data);
|
this.recomputeSelectedStepInputOutputOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
public edgesChangedInReactFlow(data) {
|
public edgesChangedInReactFlow(data) {
|
||||||
this.reactFlowState.edges = data;
|
this.reactFlowState.edges = cloneDeep(data);
|
||||||
// eslint-disable-next-line no-console
|
this.recomputeSelectedStepInputOutputOptions();
|
||||||
console.log("edges changed", data);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public nodeSelected(data) {
|
public nodeSelected(data) {
|
||||||
// eslint-disable-next-line no-console
|
this.selectedStep = cloneDeep(data);
|
||||||
console.log(this.selectedStep);
|
|
||||||
this.selectedStep = {...data};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public selectedStepParamsChanged(changedParams) {
|
public selectedStepParamsChanged(changedParams) {
|
||||||
const pipelineState = cloneDeep(this.selectedPipeline);
|
this.reactFlowState.nodes.map((node, index) => {
|
||||||
pipelineState.flow_display?.nodes.map((node) => {
|
|
||||||
if(node.id === this.selectedStep.id) {
|
if(node.id === this.selectedStep.id) {
|
||||||
node.data.parameters = cloneDeep(changedParams)
|
this.reactFlowState.nodes[index].data.parameters = cloneDeep(changedParams)
|
||||||
}
|
}
|
||||||
return node;
|
return node;
|
||||||
});
|
});
|
||||||
console.log(pipelineState);
|
|
||||||
this.store.dispatch(setSelectedPipeline({data: cloneDeep(pipelineState)}))
|
//update node API call here. Update silently.
|
||||||
|
this.store.dispatch(updatePipelineStep({changes: {
|
||||||
|
step: this.selectedStep.id,
|
||||||
|
parameters: cloneDeep(changedParams)
|
||||||
|
}}))
|
||||||
|
|
||||||
|
//console.log(pipelineState);
|
||||||
|
// pipelineState.flow_display?.nodes.map((node) => {
|
||||||
|
// if(node.id === this.selectedStep.id) {
|
||||||
|
// node.data.parameters = cloneDeep(changedParams)
|
||||||
|
// }
|
||||||
|
// return node;
|
||||||
|
// });
|
||||||
|
// console.log(pipelineState);
|
||||||
|
//this.store.dispatch(setSelectedPipeline({data: cloneDeep(pipelineState)}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @function getIncomingNodeIds
|
||||||
|
* @description It is used to get the incoming node ids.
|
||||||
|
* @param {object} node - Object of the node.
|
||||||
|
* @param {array} edges - list of all edges.
|
||||||
|
* @returns {array} list of incoming node ids.
|
||||||
|
*/
|
||||||
|
private getIncomingNodesForNode (node, nodes, edges) {
|
||||||
|
const incomingNodes = [];
|
||||||
|
edges.forEach((edge) => {
|
||||||
|
if (node?.id === edge.target) {
|
||||||
|
incomingNodes.push(nodes.find((node) => node.id == edge?.source));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return incomingNodes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -29,12 +29,12 @@
|
|||||||
matInput required #optsInput="ngModel" />
|
matInput required #optsInput="ngModel" />
|
||||||
<mat-autocomplete #auto="matAutocomplete" class="light-theme" [displayWith]="displayFn"
|
<mat-autocomplete #auto="matAutocomplete" class="light-theme" [displayWith]="displayFn"
|
||||||
(opened)="setIsAutoCompleteOpen(true)" (closed)="setIsAutoCompleteOpen(false)" autoActiveFirstOption>
|
(opened)="setIsAutoCompleteOpen(true)" (closed)="setIsAutoCompleteOpen(false)" autoActiveFirstOption>
|
||||||
<mat-option *ngFor="let option of incommingInputOptions; trackBy: trackByValue"
|
<mat-option *ngFor="let option of ioOptions; trackBy: trackByValue"
|
||||||
[value]="option.value"
|
[value]="option.value"
|
||||||
[smTooltip]="option.label"
|
[smTooltip]="option.label + ' (' + option.type + ')'"
|
||||||
smShowTooltipIfEllipsis
|
class="option"
|
||||||
(onSelectionChange)="paramSelected($event)">
|
(onSelectionChange)="paramSelected($event)">
|
||||||
<div [smSearchText]="optsInput.value">{{option.label}}</div>
|
<div [smSearchText]="optsInput.value" style="text-overflow: ellipsis; overflow: hidden;">{{option.label}}</div>
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option disabled style="height: 0; min-height: 0;"></mat-option>
|
<mat-option disabled style="height: 0; min-height: 0;"></mat-option>
|
||||||
|
|
||||||
|
@ -1,14 +1,25 @@
|
|||||||
@import "variables";
|
@import "variables";
|
||||||
|
|
||||||
|
::ng-deep {
|
||||||
|
.option {
|
||||||
|
background-color: red;
|
||||||
|
|
||||||
|
span {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
:host {
|
:host {
|
||||||
::ng-deep {
|
::ng-deep {
|
||||||
.mat-expansion-panel-body {
|
.mat-expansion-panel-body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-expansion-panel-header {
|
.mat-expansion-panel-header {
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
width: 300px;
|
width: 300px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
@ -23,7 +34,7 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-body{
|
.panel-body {
|
||||||
max-height: calc(70vh - 100px);
|
max-height: calc(70vh - 100px);
|
||||||
min-height: 350px;
|
min-height: 350px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
@ -32,8 +43,9 @@
|
|||||||
|
|
||||||
.section {
|
.section {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
margin-top:12px;
|
margin-top: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
@ -43,6 +55,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.param {
|
.param {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -58,6 +71,7 @@
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
flex: 1 1 0;
|
flex: 1 1 0;
|
||||||
color: $blue-100;
|
color: $blue-100;
|
||||||
@ -79,9 +93,11 @@
|
|||||||
margin: 12px 0 24px;
|
margin: 12px 0 24px;
|
||||||
padding-bottom: 12px;
|
padding-bottom: 12px;
|
||||||
color: $blue-100;
|
color: $blue-100;
|
||||||
|
|
||||||
.al-icon {
|
.al-icon {
|
||||||
grid-area: icon;
|
grid-area: icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
grid-area: name;
|
grid-area: name;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -100,27 +116,35 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
background-color: $pipeline-pending;
|
background-color: $pipeline-pending;
|
||||||
|
|
||||||
&.queued {
|
&.queued {
|
||||||
background-color: $pipeline-queued;
|
background-color: $pipeline-queued;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.skipped {
|
&.skipped {
|
||||||
background-color: $pipeline-skipped;
|
background-color: $pipeline-skipped;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.cached {
|
&.cached {
|
||||||
background-color: $pipeline-cached;
|
background-color: $pipeline-cached;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.executed {
|
&.executed {
|
||||||
background-color: $pipeline-executed;
|
background-color: $pipeline-executed;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.running {
|
&.running {
|
||||||
background-color: $pipeline-running;
|
background-color: $pipeline-running;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.failed {
|
&.failed {
|
||||||
background-color: $pipeline-failed;
|
background-color: $pipeline-failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.aborted {
|
&.aborted {
|
||||||
background-color: $pipeline-aborted;
|
background-color: $pipeline-aborted;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.completed {
|
&.completed {
|
||||||
background-color: $pipeline-completed;
|
background-color: $pipeline-completed;
|
||||||
}
|
}
|
||||||
@ -138,12 +162,14 @@
|
|||||||
height: 48px;
|
height: 48px;
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
border-top: solid 1px $dark-border;
|
border-top: solid 1px $dark-border;
|
||||||
|
|
||||||
.arr-link {
|
.arr-link {
|
||||||
i {
|
i {
|
||||||
margin-left:4px;
|
margin-left: 4px;
|
||||||
transform: translateY(2px);
|
transform: translateY(2px);
|
||||||
transition: margin-left 0.3s;
|
transition: margin-left 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover i {
|
&:hover i {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,10 @@
|
|||||||
import {Component, EventEmitter, Input, Output, ViewChild} from '@angular/core';
|
import {Component, EventEmitter, Input, Output, ViewChild} from '@angular/core';
|
||||||
import {Store} from '@ngrx/store';
|
import {Store} from '@ngrx/store';
|
||||||
import {Artifact} from '~/business-logic/model/tasks/artifact';
|
import {Artifact} from '~/business-logic/model/tasks/artifact';
|
||||||
import {
|
|
||||||
PipelineItem,
|
|
||||||
StepStatusEnum,
|
|
||||||
TreeStep
|
|
||||||
} from '@common/pipelines-controller/pipeline-controller-info/pipeline-controller-info.component';
|
|
||||||
import {TaskTypeEnum} from '~/business-logic/model/tasks/taskTypeEnum';
|
|
||||||
import {addMessage} from '@common/core/actions/layout.actions';
|
import {addMessage} from '@common/core/actions/layout.actions';
|
||||||
import {fileSizeConfigStorage} from '@common/shared/pipes/filesize.pipe';
|
import {fileSizeConfigStorage} from '@common/shared/pipes/filesize.pipe';
|
||||||
import {ICONS, IOption, MESSAGES_SEVERITY} from '@common/constants';
|
import {ICONS, IOption, MESSAGES_SEVERITY} from '@common/constants';
|
||||||
import {IExperimentInfo} from '~/features/experiments/shared/experiment-info.model';
|
|
||||||
import { MatOptionSelectionChange } from '@angular/material/core';
|
import { MatOptionSelectionChange } from '@angular/material/core';
|
||||||
import { NgModel } from '@angular/forms';
|
import { NgModel } from '@angular/forms';
|
||||||
import { trackByValue } from '@common/shared/utils/forms-track-by';
|
import { trackByValue } from '@common/shared/utils/forms-track-by';
|
||||||
@ -27,10 +21,26 @@ export class PipelineStepInfoComponent {
|
|||||||
public controller: boolean;
|
public controller: boolean;
|
||||||
public fileSizeConfigStorage = fileSizeConfigStorage;
|
public fileSizeConfigStorage = fileSizeConfigStorage;
|
||||||
private _step;
|
private _step;
|
||||||
|
private _ioOptions: Array<{ label: string; value: string, type: string }> ;
|
||||||
|
|
||||||
@Output() deleteStep = new EventEmitter<unknown>();
|
@Output() deleteStep = new EventEmitter<unknown>();
|
||||||
@Output() stepParamsChanged = new EventEmitter<unknown>();
|
@Output() stepParamsChanged = new EventEmitter<unknown>();
|
||||||
|
|
||||||
|
@Input() set ioOptions(options: any) {
|
||||||
|
const opts = options.map((op) => {
|
||||||
|
return {
|
||||||
|
value: "${"+op.stepName+"."+op.key+"}",
|
||||||
|
label: `${op.stepName}.${op.key}`,
|
||||||
|
type: op.type
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this._ioOptions = cloneDeep(opts);
|
||||||
|
}
|
||||||
|
get ioOptions() {
|
||||||
|
return this._ioOptions;
|
||||||
|
}
|
||||||
|
|
||||||
@Input() set step(step) {
|
@Input() set step(step) {
|
||||||
this._step = step ? cloneDeep(step) : null;
|
this._step = step ? cloneDeep(step) : null;
|
||||||
}
|
}
|
||||||
@ -42,9 +52,9 @@ export class PipelineStepInfoComponent {
|
|||||||
@ViewChild('optsInput') optsInput: NgModel;
|
@ViewChild('optsInput') optsInput: NgModel;
|
||||||
public trackByValue = trackByValue;
|
public trackByValue = trackByValue;
|
||||||
isAutoCompleteOpen: boolean;
|
isAutoCompleteOpen: boolean;
|
||||||
public incommingInputOptions: { label: string; value: string }[] = [
|
/* public incommingInputOptions: { label: string; value: string }[] = [
|
||||||
{label: "test", value: "test1"}
|
{label: "test", value: "test1"}
|
||||||
];
|
]; */
|
||||||
setIsAutoCompleteOpen(focus: boolean) {
|
setIsAutoCompleteOpen(focus: boolean) {
|
||||||
this.isAutoCompleteOpen = focus;
|
this.isAutoCompleteOpen = focus;
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ export const PipelineFlowComponent: FunctionComponent<IMyComponentProps> = (
|
|||||||
nodeTypes={nodeTypes}
|
nodeTypes={nodeTypes}
|
||||||
>
|
>
|
||||||
{/* <Background variant={BackgroundVariant.Lines} gap={20} size={0.4} /> */}
|
{/* <Background variant={BackgroundVariant.Lines} gap={20} size={0.4} /> */}
|
||||||
<MiniMap nodeStrokeWidth={3} />
|
{/* <MiniMap nodeStrokeWidth={3} /> */}
|
||||||
<Controls />
|
<Controls />
|
||||||
</ReactFlow>
|
</ReactFlow>
|
||||||
{/* <ReactFlow nodes={nodes}
|
{/* <ReactFlow nodes={nodes}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {createAction, props} from '@ngrx/store';
|
import {createAction, props} from '@ngrx/store';
|
||||||
// import {ReportsGetAllExResponse} from '~/business-logic/model/reports/reportsGetAllExResponse';
|
// import {ReportsGetAllExResponse} from '~/business-logic/model/reports/reportsGetAllExResponse';
|
||||||
// import {IReport} from './reports.consts';
|
// import {IReport} from './reports.consts';
|
||||||
import { Pipeline, PipelinesCompileRequest, PipelinesCreateRequest, PipelinesRunRequest, PipelinesUpdateRequest, PipelinesUpdateResponse, pipelinesSettingsModel } from '~/business-logic/model/pipelines/models';
|
import { Pipeline, PipelinesCompileRequest, PipelinesCreateRequest, PipelinesRunRequest, PipelinesUpdateRequest, PipelinesUpdateResponse, PipelinesUpdateStepsRequest, pipelinesSettingsModel } from '~/business-logic/model/pipelines/models';
|
||||||
import { PipelinesCreateStepsRequest } from '~/business-logic/model/pipelines/pipelinesCreateStepsRequest';
|
import { PipelinesCreateStepsRequest } from '~/business-logic/model/pipelines/pipelinesCreateStepsRequest';
|
||||||
import { TasksGetByIdRequest } from '~/business-logic/model/tasks/models';
|
import { TasksGetByIdRequest } from '~/business-logic/model/tasks/models';
|
||||||
import { Task } from '~/business-logic/model/tasks/task';
|
import { Task } from '~/business-logic/model/tasks/task';
|
||||||
@ -17,6 +17,11 @@ export const createPipelineStep = createAction(
|
|||||||
PIPELINES_PREFIX + 'CREATE_PIPELINE_STEP',
|
PIPELINES_PREFIX + 'CREATE_PIPELINE_STEP',
|
||||||
props<{ pipelinesCreateStepRequest: PipelinesCreateStepsRequest }>()
|
props<{ pipelinesCreateStepRequest: PipelinesCreateStepsRequest }>()
|
||||||
);
|
);
|
||||||
|
export const updatePipelineStep = createAction(
|
||||||
|
PIPELINES_PREFIX + 'UPDATE_PIPELINE_STEP',
|
||||||
|
props<{changes: Partial<PipelinesUpdateStepsRequest>}>()
|
||||||
|
);
|
||||||
|
|
||||||
export const pipelineSettings= createAction(
|
export const pipelineSettings= createAction(
|
||||||
PIPELINES_PREFIX + 'SETTINGS_PIPELINE_ACTION',
|
PIPELINES_PREFIX + 'SETTINGS_PIPELINE_ACTION',
|
||||||
props<{ pipelinesSettingsRequest: pipelinesSettingsModel }>()
|
props<{ pipelinesSettingsRequest: pipelinesSettingsModel }>()
|
||||||
|
@ -6,7 +6,7 @@ import {catchError, filter, map, mergeMap, switchMap, /* tap */} from 'rxjs/oper
|
|||||||
import {activeLoader, addMessage, /* addMessage, */ deactivateLoader, setServerError} from '../core/actions/layout.actions';
|
import {activeLoader, addMessage, /* addMessage, */ deactivateLoader, setServerError} from '../core/actions/layout.actions';
|
||||||
import {requestFailed} from '../core/actions/http.actions';
|
import {requestFailed} from '../core/actions/http.actions';
|
||||||
import {pipelineSettings,
|
import {pipelineSettings,
|
||||||
createPipeline, createPipelineStep, getAllExperiments, getExperimentById, getPipelineById, setExperimentsResults, setSelectedPipeline, updatePipeline, updatePipelineSuccess, compilePipeline, runPipeline
|
createPipeline, createPipelineStep, getAllExperiments, getExperimentById, getPipelineById, setExperimentsResults, setSelectedPipeline, updatePipeline, updatePipelineSuccess, compilePipeline, runPipeline, updatePipelineStep
|
||||||
} from './pipelines.actions';
|
} from './pipelines.actions';
|
||||||
// import {ApiReportsService} from '~/business-logic/api-services/reports.service';
|
// import {ApiReportsService} from '~/business-logic/api-services/reports.service';
|
||||||
/* import {IReport, PAGE_SIZE} from './reports.consts';
|
/* import {IReport, PAGE_SIZE} from './reports.consts';
|
||||||
@ -203,6 +203,21 @@ export class PipelinesEffects {
|
|||||||
})))
|
})))
|
||||||
));
|
));
|
||||||
|
|
||||||
|
updatePipelineStep$ = createEffect(() => this.actions.pipe(
|
||||||
|
ofType(updatePipelineStep),
|
||||||
|
switchMap((action) => this.pipelinesApiService.pipelinesUpdateStep(action.changes)
|
||||||
|
.pipe(mergeMap(() => {
|
||||||
|
return [deactivateLoader(updatePipelineStep.type)];
|
||||||
|
}),
|
||||||
|
catchError(err => {
|
||||||
|
return [
|
||||||
|
requestFailed(err),
|
||||||
|
setServerError(err, null, 'failed to update a pipeline step'),
|
||||||
|
deactivateLoader(updatePipelineStep.type),
|
||||||
|
]
|
||||||
|
})))
|
||||||
|
));
|
||||||
|
|
||||||
pipelineSettings$ = createEffect(() => this.actions.pipe(
|
pipelineSettings$ = createEffect(() => this.actions.pipe(
|
||||||
ofType(pipelineSettings),
|
ofType(pipelineSettings),
|
||||||
switchMap((action) => this.pipelinesApiService.pipelinesSettingCall(action.pipelinesSettingsRequest)
|
switchMap((action) => this.pipelinesApiService.pipelinesSettingCall(action.pipelinesSettingsRequest)
|
||||||
|
Loading…
Reference in New Issue
Block a user