diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 1ddc2b80..d5a30b5b 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -29,7 +29,7 @@ import { NamespaceSelectComponent } from "./main-table/namespace-select/namespac import { ResourceTableComponent } from "./main-table/resource-table/resource-table.component"; import { SnackBarComponent } from "./services/snack-bar/snack-bar.component"; import { ResourceFormComponent } from "./resource-form/resource-form.component"; -import { ConfirmDialogComponent } from "./main-table/resource-table/confirm-dialog/confirm-dialog.component"; +import { ConfirmDialogComponent } from "./main-table/confirm-dialog/confirm-dialog.component"; import { VolumeComponent } from "./resource-form/volume/volume.component"; import { FormNameComponent } from "./resource-form/form-name/form-name.component"; import { FormImageComponent } from "./resource-form/form-image/form-image.component"; @@ -48,6 +48,7 @@ import { RokFormDataVolumesComponent } from "./uis/rok/rok-resource-form/rok-for import { RokErrorMsgComponent } from "./uis/rok/rok-error-msg/rok-error-msg.component"; import { FormConfigurationsComponent } from "./resource-form/form-configurations/form-configurations.component"; import { FormGpusComponent } from "./resource-form/form-gpus/form-gpus.component"; +import { VolumeTableComponent } from "./main-table/volumes-table/volume-table.component"; @NgModule({ @@ -77,6 +78,7 @@ import { FormGpusComponent } from "./resource-form/form-gpus/form-gpus.component RokErrorMsgComponent, FormConfigurationsComponent, FormGpusComponent, + VolumeTableComponent, ], imports: [ BrowserModule, diff --git a/frontend/src/app/main-table/resource-table/confirm-dialog/confirm-dialog.component.html b/frontend/src/app/main-table/confirm-dialog/confirm-dialog.component.html similarity index 100% rename from frontend/src/app/main-table/resource-table/confirm-dialog/confirm-dialog.component.html rename to frontend/src/app/main-table/confirm-dialog/confirm-dialog.component.html diff --git a/frontend/src/app/main-table/resource-table/confirm-dialog/confirm-dialog.component.scss b/frontend/src/app/main-table/confirm-dialog/confirm-dialog.component.scss similarity index 100% rename from frontend/src/app/main-table/resource-table/confirm-dialog/confirm-dialog.component.scss rename to frontend/src/app/main-table/confirm-dialog/confirm-dialog.component.scss diff --git a/frontend/src/app/main-table/resource-table/confirm-dialog/confirm-dialog.component.spec.ts b/frontend/src/app/main-table/confirm-dialog/confirm-dialog.component.spec.ts similarity index 100% rename from frontend/src/app/main-table/resource-table/confirm-dialog/confirm-dialog.component.spec.ts rename to frontend/src/app/main-table/confirm-dialog/confirm-dialog.component.spec.ts diff --git a/frontend/src/app/main-table/resource-table/confirm-dialog/confirm-dialog.component.ts b/frontend/src/app/main-table/confirm-dialog/confirm-dialog.component.ts similarity index 100% rename from frontend/src/app/main-table/resource-table/confirm-dialog/confirm-dialog.component.ts rename to frontend/src/app/main-table/confirm-dialog/confirm-dialog.component.ts diff --git a/frontend/src/app/main-table/main-table.component.html b/frontend/src/app/main-table/main-table.component.html index 52f76dba..670a3d48 100644 --- a/frontend/src/app/main-table/main-table.component.html +++ b/frontend/src/app/main-table/main-table.component.html @@ -8,6 +8,21 @@
Notebook Servers
@@ -13,7 +14,7 @@Status | diff --git a/frontend/src/app/main-table/resource-table/resource-table.component.scss b/frontend/src/app/main-table/resource-table/resource-table.component.scss index b5b32094..e69de29b 100644 --- a/frontend/src/app/main-table/resource-table/resource-table.component.scss +++ b/frontend/src/app/main-table/resource-table/resource-table.component.scss @@ -1,86 +0,0 @@ -.card { - width: 900px; - padding: 0px; - border-radius: 5px; - background: white; -} - -table { - width: 100%; -} - -.header { - display: flex; - align-items: center; - padding: 0px 16px 0px 16px; - height: 64px; -} - -.header p { - font-weight: 400; - font-size: 20px; -} - -.cdk-column-actions { - text-align: center; -} - -.mat-icon { - line-height: 0.85; -} - -td.mat-cell:last-of-type, -td.mat-footer-cell:last-of-type, -th.mat-header-cell:last-of-type { - padding-right: 0px; -} - -.inline { - display: inline-block; -} - -// Status Icons -.running { - color: green; -} - -.warning { - color: orange; -} - -.error { - color: red; -} - -.status { - display: inline-flex; - vertical-align: middle; -} - -.delete { - color: red; -} - -// Flex -.parent { - display: flex; -} - -.spacer { - flex-grow: 1; -} - -th, -td { - overflow: hidden; - text-overflow: ellipsis; -} - -td.mat-column-image, -td.mat-column-name { - max-width: 200px; -} - -td.mat-column-cpu { - width: 40px; -} diff --git a/frontend/src/app/main-table/resource-table/resource-table.component.ts b/frontend/src/app/main-table/resource-table/resource-table.component.ts index 899d60f4..ed6de115 100644 --- a/frontend/src/app/main-table/resource-table/resource-table.component.ts +++ b/frontend/src/app/main-table/resource-table/resource-table.component.ts @@ -1,33 +1,19 @@ -import { Component, OnInit, ViewChild } from "@angular/core"; -import { MatSort } from "@angular/material/sort"; +import { Component, OnInit, ViewChild, Input, Output, EventEmitter } from "@angular/core"; import { MatTableDataSource } from "@angular/material/table"; -import { MatDialog } from "@angular/material/dialog"; -import { Subscription } from "rxjs"; -import { first } from "rxjs/operators"; -import { isEqual } from "lodash"; - -import { NamespaceService } from "src/app/services/namespace.service"; -import { KubernetesService } from "src/app/services/kubernetes.service"; import { Resource } from "src/app/utils/types"; -import { ExponentialBackoff } from "src/app/utils/polling"; -import { ConfirmDialogComponent } from "./confirm-dialog/confirm-dialog.component"; +import {MatDialog} from "@angular/material/dialog"; +import {ConfirmDialogComponent} from "../confirm-dialog/confirm-dialog.component"; +import {first} from "rxjs/operators"; @Component({ selector: "app-resource-table", templateUrl: "./resource-table.component.html", - styleUrls: ["./resource-table.component.scss"] + styleUrls: ["./resource-table.component.scss", "../main-table.component.scss"] }) export class ResourceTableComponent implements OnInit { - @ViewChild(MatSort) sort: MatSort; - - // Logic data - resources = []; - currNamespace = ""; - - subscriptions = new Subscription(); - poller: ExponentialBackoff; + @Input() notebooks: Resource[]; + @Output() deleteNotebookEvent = new EventEmitter
---|
Status | +
+
+ |
+ Name | +{{ elem.pvc.name }} | +Size | ++ {{ elem.pvc.size }} + | +Used By | ++ {{ elem.mountedBy || '(None)' }} + | ++ | + + | +
---|