diff --git a/package-lock.json b/package-lock.json
index e23f4475..49da0a76 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,16 +9,16 @@
"version": "1.15.0",
"dependencies": {
"@angular/animations": "^17.1.1",
- "@angular/cdk": "^17.1.1",
+ "@angular/cdk": "^17.3.6",
"@angular/common": "^17.1.1",
"@angular/compiler": "^17.1.1",
- "@angular/core": "^17.1.1",
- "@angular/forms": "^17.1.1",
- "@angular/material": "^17.1.1",
+ "@angular/core": "^17.3.5",
+ "@angular/forms": "^17.3.6",
+ "@angular/material": "^17.3.6",
"@angular/platform-browser": "^17.1.1",
"@angular/platform-browser-dynamic": "^17.1.1",
"@angular/platform-server": "^17.1.1",
- "@angular/router": "^17.1.1",
+ "@angular/router": "^17.3.5",
"@angular/service-worker": "^17.1.1",
"@angular/youtube-player": "^17.1.1",
"@aws-sdk/client-s3": "^3.499.0",
@@ -999,9 +999,9 @@
}
},
"node_modules/@angular/cdk": {
- "version": "17.1.1",
- "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-17.1.1.tgz",
- "integrity": "sha512-Q5qC6VUyT7N/hj8eETdh0bkmBmsXm0JZikhXdBvcDUl8yPbhMPKQCkx4UJzBrZJg/+78XyI9FI/q8w/yQAJZJA==",
+ "version": "17.3.6",
+ "resolved": "https://sres.web.boeing.com/artifactory/api/npm/npm-releases/@angular/cdk/-/cdk-17.3.6.tgz",
+ "integrity": "sha512-7eKrC61/6pmMAxllU/vYKadZRF7x7GxUYpA5G70fNaQsIUUiZvxx/SJN9AuZEoPGAtF6atKlJD8QVmFoDzv/Lw==",
"dependencies": {
"tslib": "^2.3.0"
},
@@ -1126,9 +1126,9 @@
}
},
"node_modules/@angular/core": {
- "version": "17.1.1",
- "resolved": "https://registry.npmjs.org/@angular/core/-/core-17.1.1.tgz",
- "integrity": "sha512-JtNYM9eHr8eUSrGPq/kn0+/F+TSZ7EBWxZhM1ZndOlGu1gA4fGhrDid4ZXIHIs07DbM4NZjMn+LhRyx02YDsSA==",
+ "version": "17.3.5",
+ "resolved": "https://sres.web.boeing.com/artifactory/api/npm/npm-releases/@angular/core/-/core-17.3.5.tgz",
+ "integrity": "sha512-y6P27lcrKy3yMx/rtMuGsAnDyVEsS3BdyArTXcD0TOImVGHhVIaB0L95DUCam3ajTe2f2x39eozJZDh7QSpJaw==",
"dependencies": {
"tslib": "^2.3.0"
},
@@ -1141,9 +1141,9 @@
}
},
"node_modules/@angular/forms": {
- "version": "17.1.1",
- "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-17.1.1.tgz",
- "integrity": "sha512-rqHVzaJDV8+VbnfC6mDgzX6ooa0X0hmnd+XfuOZaEJ7MtyOmqQ8qas2PAKXU7nMIImYXfYc4O4XWbSc1pRy1Hw==",
+ "version": "17.3.6",
+ "resolved": "https://sres.web.boeing.com/artifactory/api/npm/npm-releases/@angular/forms/-/forms-17.3.6.tgz",
+ "integrity": "sha512-WXxWhwvgRfYLNP2dB4Qe83tavEh2LnS4H0uoiecWHXijW2R9z8304X1vEyS1EtQK7o/s8fCVDVDjeY+hxLnCLw==",
"dependencies": {
"tslib": "^2.3.0"
},
@@ -1151,9 +1151,9 @@
"node": "^18.13.0 || >=20.9.0"
},
"peerDependencies": {
- "@angular/common": "17.1.1",
- "@angular/core": "17.1.1",
- "@angular/platform-browser": "17.1.1",
+ "@angular/common": "17.3.6",
+ "@angular/core": "17.3.6",
+ "@angular/platform-browser": "17.3.6",
"rxjs": "^6.5.3 || ^7.4.0"
}
},
@@ -1167,9 +1167,9 @@
}
},
"node_modules/@angular/material": {
- "version": "17.1.1",
- "resolved": "https://registry.npmjs.org/@angular/material/-/material-17.1.1.tgz",
- "integrity": "sha512-Ngh/4MY3MAPd4Fe2kb9W8j8Ix+hA9MVPvppYTlSsYzvlhV8YhOEaH2nuv9hJLrOiurlRWt7VlW13YkufK4VBgg==",
+ "version": "17.3.6",
+ "resolved": "https://sres.web.boeing.com/artifactory/api/npm/npm-releases/@angular/material/-/material-17.3.6.tgz",
+ "integrity": "sha512-sttN0JNvd2QvCCFIsxb5noiy7tgQdWrwvmrkJ+3KguHh5X84jDliA/d8N7Xgy2IBLnS/q/Hl9DdRCOiItWG1bw==",
"dependencies": {
"@material/animation": "15.0.0-canary.7f224ddd4.0",
"@material/auto-init": "15.0.0-canary.7f224ddd4.0",
@@ -1222,7 +1222,7 @@
},
"peerDependencies": {
"@angular/animations": "^17.0.0 || ^18.0.0",
- "@angular/cdk": "17.1.1",
+ "@angular/cdk": "17.3.6",
"@angular/common": "^17.0.0 || ^18.0.0",
"@angular/core": "^17.0.0 || ^18.0.0",
"@angular/forms": "^17.0.0 || ^18.0.0",
@@ -1288,9 +1288,9 @@
}
},
"node_modules/@angular/router": {
- "version": "17.1.1",
- "resolved": "https://registry.npmjs.org/@angular/router/-/router-17.1.1.tgz",
- "integrity": "sha512-pPIRX0v8agij2dRSU25iwj9qFy0S25cztsy7bGfZ+M510jwRCqu1JsitqXtQ85XSv/bdFqiNiFU0UbwVFl+QiQ==",
+ "version": "17.3.5",
+ "resolved": "https://sres.web.boeing.com/artifactory/api/npm/npm-releases/@angular/router/-/router-17.3.5.tgz",
+ "integrity": "sha512-KsIIs3t9IpxsdMSrJDZzO5WgIWkVE6Ep5WWiSyPIgEfA+ndGpJLmyv0d/r1yKKlYUJxz7Hde55o4thgT2n2x/A==",
"dependencies": {
"tslib": "^2.3.0"
},
@@ -1298,9 +1298,9 @@
"node": "^18.13.0 || >=20.9.0"
},
"peerDependencies": {
- "@angular/common": "17.1.1",
- "@angular/core": "17.1.1",
- "@angular/platform-browser": "17.1.1",
+ "@angular/common": "17.3.5",
+ "@angular/core": "17.3.5",
+ "@angular/platform-browser": "17.3.5",
"rxjs": "^6.5.3 || ^7.4.0"
}
},
diff --git a/package.json b/package.json
index dd30651e..a31266c5 100644
--- a/package.json
+++ b/package.json
@@ -20,16 +20,16 @@
"private": true,
"dependencies": {
"@angular/animations": "^17.1.1",
- "@angular/cdk": "^17.1.1",
+ "@angular/cdk": "^17.3.6",
"@angular/common": "^17.1.1",
"@angular/compiler": "^17.1.1",
- "@angular/core": "^17.1.1",
- "@angular/forms": "^17.1.1",
- "@angular/material": "^17.1.1",
+ "@angular/core": "^17.3.5",
+ "@angular/forms": "^17.3.6",
+ "@angular/material": "^17.3.6",
"@angular/platform-browser": "^17.1.1",
"@angular/platform-browser-dynamic": "^17.1.1",
"@angular/platform-server": "^17.1.1",
- "@angular/router": "^17.1.1",
+ "@angular/router": "^17.3.5",
"@angular/service-worker": "^17.1.1",
"@angular/youtube-player": "^17.1.1",
"@aws-sdk/client-s3": "^3.499.0",
@@ -56,9 +56,9 @@
"date-fns": "^3.3.1",
"diff": "^5.1.0",
"dom-to-image": "^2.6.0",
+ "dompurify": "^3.0.8",
"export-to-csv": "^1.2.2",
"filesize": "^10.1.0",
- "dompurify": "^3.0.8",
"has-ansi": "^5.0.1",
"hocon-parser": "^1.0.1",
"localforage": "^1.10.0",
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 912aa94c..8e70fca4 100755
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -27,6 +27,11 @@ import {MAT_TOOLTIP_DEFAULT_OPTIONS, MatTooltipDefaultOptions} from '@angular/ma
import {UpdateNotifierComponent} from '@common/shared/ui-components/overlay/update-notifier/update-notifier.component';
import {ChooseColorModule} from '@common/shared/ui-components/directives/choose-color/choose-color.module';
import {SpinnerComponent} from '@common/shared/ui-components/overlay/spinner/spinner.component';
+import { MatButtonModule } from '@angular/material/button';
+import { MatInputModule } from '@angular/material/input';
+import { MatFormFieldModule } from '@angular/material/form-field';
+import { UploadArtifactDialogComponent } from '@common/shared/ui-components/overlay/upload-artifact-dialog/upload-artifact-dialog.component';
+
@NgModule({
declarations : [AppComponent],
@@ -61,6 +66,10 @@ import {SpinnerComponent} from '@common/shared/ui-components/overlay/spinner/spi
UpdateNotifierComponent,
ChooseColorModule,
SpinnerComponent,
+ MatButtonModule,
+ MatInputModule,
+ MatFormFieldModule,
+ UploadArtifactDialogComponent
],
providers : [
UserPreferences,
diff --git a/src/app/features/experiments/experiments.module.ts b/src/app/features/experiments/experiments.module.ts
index ccaa052b..2aff8e29 100755
--- a/src/app/features/experiments/experiments.module.ts
+++ b/src/app/features/experiments/experiments.module.ts
@@ -87,6 +87,7 @@ import {MatInputModule} from '@angular/material/input';
import {MatSelectModule} from '@angular/material/select';
import {HesitateDirective} from '@common/shared/ui-components/directives/hesitate.directive';
import {ShowTooltipIfEllipsisDirective} from '@common/shared/ui-components/indicators/tooltip/show-tooltip-if-ellipsis.directive';
+import {MatButtonModule} from '@angular/material/button';
@NgModule({
@@ -149,7 +150,8 @@ import {ShowTooltipIfEllipsisDirective} from '@common/shared/ui-components/indic
MatInputModule,
MatSelectModule,
HesitateDirective,
- ShowTooltipIfEllipsisDirective
+ ShowTooltipIfEllipsisDirective,
+ MatButtonModule
],
declarations: [
ExperimentsComponent,
diff --git a/src/app/webapp-common/core/actions/common-auth.actions.ts b/src/app/webapp-common/core/actions/common-auth.actions.ts
index e680a6e9..e3f08aee 100755
--- a/src/app/webapp-common/core/actions/common-auth.actions.ts
+++ b/src/app/webapp-common/core/actions/common-auth.actions.ts
@@ -75,6 +75,7 @@ export const getSignedUrl = createAction(
disableCache?: number;
dprsUrl?: string | boolean;
error?: boolean;
+ method?: string;
}}>()
);
export const setSignedUrl = createAction(
diff --git a/src/app/webapp-common/experiments/dumb/experiment-artifact-item-view/experiment-artifact-item-view.component.html b/src/app/webapp-common/experiments/dumb/experiment-artifact-item-view/experiment-artifact-item-view.component.html
index d31235c0..ffd846e0 100755
--- a/src/app/webapp-common/experiments/dumb/experiment-artifact-item-view/experiment-artifact-item-view.component.html
+++ b/src/app/webapp-common/experiments/dumb/experiment-artifact-item-view/experiment-artifact-item-view.component.html
@@ -18,6 +18,7 @@
{{(artifact?.content_size | filesize : fileSizeConfigStorage) || ''}}
{{artifact?.hash}}
+ {{artifact?.mode | titlecase}}
{{data[1]}}
@@ -32,5 +33,5 @@
[formData]="artifact?.type_data?.preview"
>
-
+
diff --git a/src/app/webapp-common/experiments/dumb/experiment-artifact-item-view/experiment-artifact-item-view.component.ts b/src/app/webapp-common/experiments/dumb/experiment-artifact-item-view/experiment-artifact-item-view.component.ts
index db3d85e7..6d7756af 100755
--- a/src/app/webapp-common/experiments/dumb/experiment-artifact-item-view/experiment-artifact-item-view.component.ts
+++ b/src/app/webapp-common/experiments/dumb/experiment-artifact-item-view/experiment-artifact-item-view.component.ts
@@ -1,12 +1,27 @@
-import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
+import {ChangeDetectionStrategy, Component, Input, Inject} from '@angular/core';
+import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';
import {Artifact} from '~/business-logic/model/tasks/artifact';
import {BaseClickableArtifactComponent} from '../base-clickable-artifact.component';
import {fileSizeConfigStorage} from '@common/shared/pipes/filesize.pipe';
+import { ApiTasksService } from '~/business-logic/api-services/tasks.service';
+import { ConfirmDialogComponent } from '@common/shared/ui-components/overlay/confirm-dialog/confirm-dialog.component';
+import { take } from 'rxjs/operators';
+import { addMessage } from '@common/core/actions/layout.actions';
+import { Observable } from 'rxjs/internal/Observable';
+import { IExperimentInfo } from '~/features/experiments/shared/experiment-info.model';
+import { selectExperimentInfoData } from '~/features/experiments/reducers';
+import { ArtifactId } from '~/business-logic/model/tasks/artifactId';
+import { deleteS3Sources } from '@common/shared/entity-page/entity-delete/common-delete-dialog.actions';
+import { EXPERIMENTS_STATUS_LABELS } from '~/features/experiments/shared/experiments.const';
@Component({
selector: 'sm-experiment-artifact-item-view',
templateUrl: './experiment-artifact-item-view.component.html',
styleUrls: ['./experiment-artifact-item-view.component.scss'],
+ providers: [
+ { provide: MAT_DIALOG_DATA, useValue: {} },
+ { provide: MatDialogRef, useValue: {} }
+ ],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class ExperimentArtifactItemViewComponent extends BaseClickableArtifactComponent{
@@ -14,11 +29,28 @@ export class ExperimentArtifactItemViewComponent extends BaseClickableArtifactCo
public isLinkable: boolean;
public fileSizeConfigStorage = fileSizeConfigStorage;
public inMemorySize: boolean;
+ public experimentInfo$: Observable;
private _artifact: Artifact;
+ private artifactId: ArtifactId;
+ private _experiment: any;
@Input() editable: boolean;
@Input() downloading: boolean;
+ constructor(
+ @Inject(MAT_DIALOG_DATA) public data: ConfirmDialogComponent,
+ public dialogRef: MatDialogRef,
+ private dialog: MatDialog,
+ private tasksApi: ApiTasksService,
+ ){
+ super();
+ this.experimentInfo$ = this.store.select(selectExperimentInfoData);
+ this.artifactId = {key: '', mode: 'output'};
+ this.experimentInfo$.subscribe((res) => {
+ this._experiment = res;
+ });
+ }
+
@Input() set artifact(artifact: Artifact) {
this._artifact = artifact;
if(artifact){
@@ -39,6 +71,14 @@ export class ExperimentArtifactItemViewComponent extends BaseClickableArtifactCo
return this._artifact;
}
+ getStatusLabel() {
+ return EXPERIMENTS_STATUS_LABELS[this._experiment?.status] || '';
+ }
+
+ enableDeleteButton() {
+ return this.getStatusLabel() === 'Draft';
+ }
+
linkClicked(event: Event) {
this.signUrl(this.artifact.uri).subscribe(signed => {
const a = document.createElement('a');
@@ -48,4 +88,34 @@ export class ExperimentArtifactItemViewComponent extends BaseClickableArtifactCo
});
event.preventDefault();
}
+
+ deleteArtifact(key, mode) {
+ this.artifactId = {key: key, mode: mode};
+ const confirmDialogRef: MatDialogRef = this.dialog.open(ConfirmDialogComponent, {
+ data: {
+ title: 'Delete Artifact',
+ body: 'Are you sure you want to delete artifact ' + key + ' from the experiment and S3?
This cannot be undone.',
+ yes: 'Delete',
+ no: 'Cancel',
+ iconClass: 'al-icon al-ico-trash al-color blue-300',
+ }
+ });
+
+ confirmDialogRef.afterClosed().pipe(take(1)).subscribe((confirmed) => {
+ if (confirmed) {
+ this.tasksApi.tasksDeleteArtifacts({
+ /* eslint-disable @typescript-eslint/naming-convention */
+ task: this._experiment.id,
+ artifacts: [this.artifactId]
+ /* eslint-enable @typescript-eslint/naming-convention */
+ }, null, 'body', true).subscribe({
+ next: () => {
+ this.store.dispatch(deleteS3Sources({files: [this.artifact.uri]}))
+ },
+ error: err => this.store.dispatch(addMessage('error', `Error ${err.error?.meta?.result_msg}`)),
+ complete: () => this.store.dispatch(addMessage('success', 'Artifact deleted successfully.')),
+ });
+ }
+ });
+ }
}
diff --git a/src/app/webapp-common/experiments/dumb/experiment-info-header/experiment-info-header.component.html b/src/app/webapp-common/experiments/dumb/experiment-info-header/experiment-info-header.component.html
index 3684fa80..8cb3bf39 100644
--- a/src/app/webapp-common/experiments/dumb/experiment-info-header/experiment-info-header.component.html
+++ b/src/app/webapp-common/experiments/dumb/experiment-info-header/experiment-info-header.component.html
@@ -22,6 +22,9 @@
*ngIf="(!minimized) && shared"
>
+
+
+