diff --git a/frontend/jupyter/cypress/e2e/main-page.cy.ts b/frontend/jupyter/cypress/e2e/main-page.cy.ts
index 9fc27595..98f72174 100644
--- a/frontend/jupyter/cypress/e2e/main-page.cy.ts
+++ b/frontend/jupyter/cypress/e2e/main-page.cy.ts
@@ -36,7 +36,7 @@ describe('Main tables', () => {
});
// We use function () in order to be able to access aliases via this
- it('renders every Notebook name into the table', () => {
+ it('renders every Notebook name into the table', function () {
let i = 0;
const notebooks = this.notebooksRequest.notebooks;
// Table is sorted by Name in ascending order by default
@@ -49,7 +49,7 @@ describe('Main tables', () => {
});
});
- it('checks Status icon for all notebooks', () => {
+ it('checks Status icon for all notebooks', function () {
let i = 0;
const notebooks = this.notebooksRequest.notebooks;
cy.get('[data-cy-table-id="notebooks-table"]')
@@ -81,7 +81,7 @@ describe('Main tables', () => {
});
});
- it.only('should display icon for default notebook', () => {
+ it('should display icon for default notebook', () => {
cy.get('[data-cy-table-id="notebooks-table"]')
.find(`[data-cy-resource-table-row="Name"]`)
.contains('test-pro-b')
@@ -92,26 +92,92 @@ describe('Main tables', () => {
.should('exist');
});
- it('should have icon for oom', () => {
- cy.get('[data-cy-table-id="notebooks-table"]')
- .find(`[data-cy-resource-table-row="Name"]`)
- .contains('a-dog-breed-katib')
- .parent()
- .parent()
- .find('app-warning-icon')
- .find('mat-icon')
- .should('exist');
- });
-
- it('should not have icon for oom', () => {
- cy.get('[data-cy-table-id="notebooks-table"]')
- .find(`[data-cy-resource-table-row="Name"]`)
- .contains('a-test-01')
- .parent()
- .parent()
- .find('app-warning-icon')
- .find('mat-icon')
- .should('not.exist');
+ describe('warning icon', ()=>{
+ it('should not have a warning icon', () => {
+ cy.get('[data-cy-table-id="notebooks-table"]')
+ .find(`[data-cy-resource-table-row="Name"]`)
+ .contains('a-test-01')
+ .parent()
+ .parent()
+ .find('app-warning-icon')
+ .find('mat-icon')
+ .should('not.exist');
+ });
+
+ it('should have a warning for OOMKilled', () => {
+ cy.get('[data-cy-table-id="notebooks-table"]')
+ .find(`[data-cy-resource-table-row="Name"]`)
+ .contains('a-dog-breed-katib')
+ .parent()
+ .parent()
+ .find('app-warning-icon')
+ .find('mat-icon')
+ .should('exist');
+
+ cy.get('[data-cy-table-id="notebooks-table"]')
+ .find(`[data-cy-resource-table-row="Name"]`)
+ .contains('a-dog-breed-katib')
+ .parent()
+ .parent()
+ .find('app-warning-icon')
+ .find('mat-icon')
+ .invoke('attr', 'aria-describedby')
+ .then(tooltip=>{
+ // Couldn't get the test to open the tooltip by hovering, so using the next best thing
+ cy.get(`#${tooltip}`)
+ .should('have.text', 'Potential issues with this notebook server:\n* Last restarted because of an Out-Of-Memory error.');
+ });
+ });
+
+ it('should have a warning for full volume', () => {
+ cy.get('[data-cy-table-id="notebooks-table"]')
+ .find(`[data-cy-resource-table-row="Name"]`)
+ .contains('b-culled-notebook')
+ .parent()
+ .parent()
+ .find('app-warning-icon')
+ .find('mat-icon')
+ .should('exist');
+
+ cy.get('[data-cy-table-id="notebooks-table"]')
+ .find(`[data-cy-resource-table-row="Name"]`)
+ .contains('b-culled-notebook')
+ .parent()
+ .parent()
+ .find('app-warning-icon')
+ .find('mat-icon')
+ .invoke('attr', 'aria-describedby')
+ .then(tooltip=>{
+ // Couldn't get the test to open the tooltip by hovering, so using the next best thing
+ cy.get(`#${tooltip}`)
+ .should('have.text', 'Potential issues with this notebook server:\n* One or more attached volumes are full.');
+ });
+ });
+
+ it('should have a warning for both OOMKilled and full volume', () => {
+ cy.get('[data-cy-table-id="notebooks-table"]')
+ .find(`[data-cy-resource-table-row="Name"]`)
+ .contains('test-pro-b')
+ .parent()
+ .parent()
+ .find('app-warning-icon')
+ .find('mat-icon')
+ .should('exist');
+
+ cy.get('[data-cy-table-id="notebooks-table"]')
+ .find(`[data-cy-resource-table-row="Name"]`)
+ .contains('test-pro-b')
+ .parent()
+ .parent()
+ .find('app-warning-icon')
+ .find('mat-icon')
+ .invoke('attr', 'aria-describedby')
+ .then(tooltip=>{
+ // Couldn't get the test to open the tooltip by hovering, so using the next best thing
+ cy.get(`#${tooltip}`)
+ .should('have.text', 'Potential issues with this notebook server:\n* Last restarted because of an Out-Of-Memory error.\n* One or more attached volumes are full.');
+ });
+ });
});
it('should start a notebook', () => {
@@ -645,7 +711,7 @@ describe('Main tables', () => {
);
});
- describe('should handle volume pending resize', ()=>{
+ describe('volume pending resize', ()=>{
it('should display pending resize icon', ()=>{
cy.get('[data-cy-table-id="volumes-table"]')
.find(`[data-cy-resource-table-row="Name"]`)
@@ -885,6 +951,33 @@ describe('Main tables', () => {
.should('eq', 200);
cy.get('mat-dialog-container').should('not.exist');
});
+
+ it('should display usage warning icon when above 95% full', () => {
+ cy.get('[data-cy-table-id="volumes-table"]')
+ .find(`[data-cy-resource-table-row="Name"]`)
+ .contains('titanic-ml-47xh5-data-m57vq-2md82')
+ .scrollIntoView();
+
+ // should display icon on volumes with pending resize
+ cy.get('[data-cy-table-id="volumes-table"]')
+ .find(`[data-cy-resource-table-row="Name"]`)
+ .contains('test-notebook-volume')
+ .parent()
+ .parent()
+ .find('app-usage')
+ .find('mat-icon')
+ .should('exist').and('have.class', 'warning-icon');
+
+ // should not display icon when volume has no pending resize
+ cy.get('[data-cy-table-id="volumes-table"]')
+ .find(`[data-cy-resource-table-row="Name"]`)
+ .contains('titanic-ml-47xh5-data-m57vq-2md82')
+ .parent()
+ .parent()
+ .find('app-usage')
+ .find('mat-icon')
+ .should('not.exist');
+ });
});
describe('Kubecost table', () => {
diff --git a/frontend/jupyter/cypress/fixtures/pvcs.json b/frontend/jupyter/cypress/fixtures/pvcs.json
index dbb8c46a..0f583af4 100644
--- a/frontend/jupyter/cypress/fixtures/pvcs.json
+++ b/frontend/jupyter/cypress/fixtures/pvcs.json
@@ -137,22 +137,22 @@
"eventMessage": "waiting for first consumer to be created before binding"
},
"age": "2026-02-06T14:57:17Z",
- "capacity": "0",
+ "capacity": "8Gi",
"pendingResize": "0",
"modes": [
"ReadWriteOnce"
],
"class": "default",
"notebooks": [
- "test-notebook"
+ "test-pro-b"
],
"labels": null,
"viewer": {
"status": "",
"url": ""
},
- "usage": "",
- "usedBytes": ""
+ "usage": "96",
+ "usedBytes": "1234560"
},
{
"name": "test-notebook-volume",
@@ -165,22 +165,22 @@
"eventMessage": "waiting for first consumer to be created before binding"
},
"age": "2026-02-06T14:57:17Z",
- "capacity": "0",
+ "capacity": "4Gi",
"pendingResize": "0",
"modes": [
"ReadWriteOnce"
],
"class": "default",
"notebooks": [
- "test-notebook"
+ "b-culled-notebook"
],
"labels": null,
"viewer": {
"status": "",
"url": ""
},
- "usage": "",
- "usedBytes": ""
+ "usage": "97.567",
+ "usedBytes": "743628800"
},
{
"name":"test-pro-b-volume",
diff --git a/frontend/jupyter/i18n/fr/messages.fr.xlf b/frontend/jupyter/i18n/fr/messages.fr.xlf
index 5bce90bb..d2b9c302 100644
--- a/frontend/jupyter/i18n/fr/messages.fr.xlf
+++ b/frontend/jupyter/i18n/fr/messages.fr.xlf
@@ -923,7 +923,7 @@
1
-
+
Shared memory
Mémoire partagée
@@ -2042,7 +2042,7 @@
Nouveau bloc-notes
src/app/pages/index/index-default/index-default.component.ts
- 80
+ 82
@@ -2050,7 +2050,7 @@
Ajouter un nouveau bloc-notes
src/app/pages/index/index-default/index-default.component.ts
- 81
+ 83
@@ -2058,7 +2058,7 @@
Bloc-notes
src/app/pages/index/index-default/index-default.component.ts
- 125
+ 127
@@ -2066,7 +2066,7 @@
Mise-à-jour de la dernière activité pour ajouter heure(s)
src/app/pages/index/index-default/index-default.component.ts
- 288
+ 290
@@ -2074,7 +2074,7 @@
Délai de l'arrêt automatique pour
src/app/pages/index/index-default/index-default.component.ts
- 303
+ 305
@@ -2082,7 +2082,7 @@
Ceci permettra de maintenir le bloc-notes actif pendant le nombre d’heures spécifié
src/app/pages/index/index-default/index-default.component.ts
- 304
+ 306
@@ -2090,7 +2090,7 @@
Soumettre
src/app/pages/index/index-default/index-default.component.ts
- 305
+ 307
src/app/services/config.ts
@@ -2102,7 +2102,7 @@
Annuler
src/app/pages/index/index-default/index-default.component.ts
- 307
+ 309
src/app/services/config.ts
@@ -2114,7 +2114,7 @@
Préparation de l'arrêt du serveur bloc-notes.
src/app/pages/index/index-default/index-default.component.ts
- 333
+ 335
@@ -2122,7 +2122,7 @@
Serveur bloc-notes en supression.
src/app/pages/index/index-default/index-default.component.ts
- 342
+ 344
@@ -2130,7 +2130,7 @@
Aucun pod n'est actuellement en cours d'exécution pour ce serveur bloc-notes.
src/app/pages/index/index-default/index-default.component.ts
- 344
+ 346
@@ -2138,7 +2138,7 @@
Serveur bloc-notes en arrêt.
src/app/pages/index/index-default/index-default.component.ts
- 346
+ 348
@@ -2146,7 +2146,7 @@
En exécution
src/app/pages/index/index-default/index-default.component.ts
- 348
+ 350
@@ -2154,7 +2154,7 @@
En attente du StatefulSet pour créer le Pod sous-jacent.
src/app/pages/index/index-default/index-default.component.ts
- 350
+ 352
@@ -2162,7 +2162,7 @@
Aucune information n'a été trouvée sur l'état de ce serveur bloc-notes.
src/app/pages/index/index-default/index-default.component.ts
- 352
+ 354
@@ -2170,11 +2170,11 @@
Une erreur s'est produite. Cliquez sur le nom du serveur bloc-notes pour plus d'informations.
src/app/pages/index/index-default/index-default.component.ts
- 354
+ 356
src/app/pages/index/index-default/index-default.component.ts
- 356
+ 358
@@ -2182,7 +2182,7 @@
Planification du Pod.
src/app/pages/index/index-default/index-default.component.ts
- 358
+ 360
@@ -2190,11 +2190,11 @@
Voir les détails
src/app/pages/index/index-default/index-default.component.ts
- 388
+ 395
src/app/pages/index/index-default/index-default.component.ts
- 501
+ 525
@@ -2202,7 +2202,7 @@
Modifier
src/app/pages/index/index-default/index-default.component.ts
- 394
+ 401
@@ -2210,7 +2210,7 @@
Supprimer
src/app/pages/index/index-default/index-default.component.ts
- 400
+ 407
@@ -2218,7 +2218,7 @@
Retarder l'arrêt automatique
src/app/pages/index/index-default/index-default.component.ts
- 406
+ 413
@@ -2226,7 +2226,7 @@
Attaché
src/app/pages/index/index-default/index-default.component.ts
- 486
+ 494
@@ -2234,7 +2234,7 @@
Libre
src/app/pages/index/index-default/index-default.component.ts
- 490
+ 514
@@ -2242,7 +2242,7 @@
Augmenter la taille
src/app/pages/index/index-default/index-default.component.ts
- 511
+ 535
@@ -2250,7 +2250,7 @@
Le volume a été soumit avec succès
src/app/pages/index/index-default/index-default.component.ts
- 671
+ 695
@@ -2293,9 +2293,31 @@
21
-
- Error Out Of Memory Killed.
- Erreur: serveur bloc-notes arrêté; mémoire insuffisante
+
+ Potential issues with this notebook server:
+
+ Problèmes potentiels avec ce serveur bloc-notes :
+
+
+ src/app/pages/index/index-default/warning-icons/warning-icon.component.ts
+ 23
+
+
+
+ * Last restarted because of an Out-Of-Memory error.
+
+ * Dernier redémarrage dû à une erreur de mémoire insuffisante.
+
+
+ src/app/pages/index/index-default/warning-icons/warning-icon.component.ts
+ 25
+
+
+
+ * One or more attached volumes are full.
+
+ * Un ou plusieurs volumes attachés sont remplis.
+
src/app/pages/index/index-default/warning-icons/warning-icon.component.ts
29
diff --git a/frontend/jupyter/i18n/messages.xlf b/frontend/jupyter/i18n/messages.xlf
index 6a0a9c0f..bcf77dbc 100644
--- a/frontend/jupyter/i18n/messages.xlf
+++ b/frontend/jupyter/i18n/messages.xlf
@@ -822,7 +822,7 @@
1
-
+
Shared memory
src/app/pages/form/form-new/form-advanced-options/form-advanced-options.component.html
@@ -1808,49 +1808,49 @@
New Notebook
src/app/pages/index/index-default/index-default.component.ts
- 80
+ 82
Add a new notebook
src/app/pages/index/index-default/index-default.component.ts
- 81
+ 83
Notebook
src/app/pages/index/index-default/index-default.component.ts
- 125
+ 127
Updating last activity to add hours
src/app/pages/index/index-default/index-default.component.ts
- 288
+ 290
Delay auto-shutdown for
src/app/pages/index/index-default/index-default.component.ts
- 303
+ 305
This will keep the notebook alive for the number of hours specified
src/app/pages/index/index-default/index-default.component.ts
- 304
+ 306
Submit
src/app/pages/index/index-default/index-default.component.ts
- 305
+ 307
src/app/services/config.ts
@@ -1861,7 +1861,7 @@
Cancel
src/app/pages/index/index-default/index-default.component.ts
- 307
+ 309
src/app/services/config.ts
@@ -1872,127 +1872,127 @@
Preparing to stop the Notebook Server.
src/app/pages/index/index-default/index-default.component.ts
- 333
+ 335
Deleting this Notebook Server.
src/app/pages/index/index-default/index-default.component.ts
- 342
+ 344
No Pods are currently running for this Notebook Server.
src/app/pages/index/index-default/index-default.component.ts
- 344
+ 346
Notebook Server is stopping.
src/app/pages/index/index-default/index-default.component.ts
- 346
+ 348
Running
src/app/pages/index/index-default/index-default.component.ts
- 348
+ 350
Waiting for StatefulSet to create the underlying Pod.
src/app/pages/index/index-default/index-default.component.ts
- 350
+ 352
Couldn't find any information for the status of this notebook server.
src/app/pages/index/index-default/index-default.component.ts
- 352
+ 354
An error has occured. Click on the notebook server name for more information.
src/app/pages/index/index-default/index-default.component.ts
- 354
+ 356
src/app/pages/index/index-default/index-default.component.ts
- 356
+ 358
Scheduling the Pod.
src/app/pages/index/index-default/index-default.component.ts
- 358
+ 360
View details
src/app/pages/index/index-default/index-default.component.ts
- 388
+ 395
src/app/pages/index/index-default/index-default.component.ts
- 501
+ 525
Edit
src/app/pages/index/index-default/index-default.component.ts
- 394
+ 401
Delete
src/app/pages/index/index-default/index-default.component.ts
- 400
+ 407
Delay auto-shutdown
src/app/pages/index/index-default/index-default.component.ts
- 406
+ 413
Attached
src/app/pages/index/index-default/index-default.component.ts
- 486
+ 494
Unattached
src/app/pages/index/index-default/index-default.component.ts
- 490
+ 514
Increase size
src/app/pages/index/index-default/index-default.component.ts
- 511
+ 535
Volume was submitted successfully.
src/app/pages/index/index-default/index-default.component.ts
- 671
+ 695
@@ -2030,8 +2030,25 @@
21
-
- Error Out Of Memory Killed.
+
+ Potential issues with this notebook server:
+
+
+ src/app/pages/index/index-default/warning-icons/warning-icon.component.ts
+ 23
+
+
+
+ * Last restarted because of an Out-Of-Memory error.
+
+
+ src/app/pages/index/index-default/warning-icons/warning-icon.component.ts
+ 25
+
+
+
+ * One or more attached volumes are full.
+
src/app/pages/index/index-default/warning-icons/warning-icon.component.ts
29
diff --git a/frontend/jupyter/src/app/pages/index/index-default/index-default.component.ts b/frontend/jupyter/src/app/pages/index/index-default/index-default.component.ts
index 70e03edb..8aa490fc 100644
--- a/frontend/jupyter/src/app/pages/index/index-default/index-default.component.ts
+++ b/frontend/jupyter/src/app/pages/index/index-default/index-default.component.ts
@@ -76,6 +76,8 @@ export class IndexDefaultComponent implements OnInit, OnDestroy {
kubecostLoading = false;
notebookInfoLoaded = false;
+ fullVolumes: Map = new Map();
+
private newNotebookButton = new ToolbarButton({
text: $localize`New Notebook`,
tooltip: $localize`Add a new notebook`,
@@ -373,6 +375,11 @@ export class IndexDefaultComponent implements OnInit, OnDestroy {
url: `/notebook/details/${notebook.namespace}/${notebook.name}`,
};
+ // Check if this notebook has full volumes
+ if (this.fullVolumes.get(notebook.name)) {
+ notebook.hasFullVolumes = true;
+ }
+
// Status for auto-shutdown
// Only a notebook that is active aka has a "last_activity"
// If notebook not ready then it needs to be disabled
@@ -481,10 +488,27 @@ export class IndexDefaultComponent implements OnInit, OnDestroy {
//AAW: overwrite status field with our custom values
pvcsCopy.forEach(element => {
if (element.notebooks.length) {
- element.usedBy = element.notebooks[0];
+ let usedByNotebookName = element.notebooks[0];
+ element.usedBy = usedByNotebookName;
element.status = {} as Status;
element.status.message = $localize`Attached`;
element.status.phase = STATUS_TYPE.MOUNTED;
+
+ // Check if a notebook needs to be alerted of a full volume
+ if (
+ usedByNotebookName !== '' &&
+ Math.ceil(parseFloat(element.usage)) > 95
+ ) {
+ this.fullVolumes.set(usedByNotebookName, true);
+
+ // Update the notebook object
+ let usedByNotebook = this.processedData.find(
+ nb => nb.name === usedByNotebookName,
+ );
+ if (usedByNotebook) {
+ this.updateNotebookFields(usedByNotebook);
+ }
+ }
} else {
element.status = {} as Status;
element.status.message = $localize`Unattached`;
diff --git a/frontend/jupyter/src/app/pages/index/index-default/warning-icons/warning-icon.component.html b/frontend/jupyter/src/app/pages/index/index-default/warning-icons/warning-icon.component.html
index a59cb5e8..865ee880 100644
--- a/frontend/jupyter/src/app/pages/index/index-default/warning-icons/warning-icon.component.html
+++ b/frontend/jupyter/src/app/pages/index/index-default/warning-icons/warning-icon.component.html
@@ -1,7 +1,8 @@
sim_card_alert
diff --git a/frontend/jupyter/src/app/pages/index/index-default/warning-icons/warning-icon.component.ts b/frontend/jupyter/src/app/pages/index/index-default/warning-icons/warning-icon.component.ts
index 7c53365e..45a1aecf 100644
--- a/frontend/jupyter/src/app/pages/index/index-default/warning-icons/warning-icon.component.ts
+++ b/frontend/jupyter/src/app/pages/index/index-default/warning-icons/warning-icon.component.ts
@@ -8,26 +8,26 @@ import { TableColumnComponent } from 'kubeflow/lib/resource-table/component-valu
})
export class WarningComponent implements TableColumnComponent {
row: any;
- textToolTip = '';
constructor() {}
set element(elem: any) {
this.row = elem;
- if (this.showWarnings()) {
- this.textToolTip = this.getWarningsText();
- }
}
public showWarnings(): boolean {
- return this.row?.isOOMKilled ? true : false;
+ return this.row?.isOOMKilled || this.row?.hasFullVolumes ? true : false;
}
public getWarningsText() {
- var thetext = '';
+ var text = $localize`Potential issues with this notebook server:\n`;
if (this.row?.isOOMKilled) {
- thetext += '* ' + $localize`Error Out Of Memory Killed.` + '\n';
+ text += $localize`* Last restarted because of an Out-Of-Memory error.\n`;
+ }
+
+ if (this.row?.hasFullVolumes) {
+ text += $localize`* One or more attached volumes are full.\n`;
}
- return thetext;
+ return text;
}
}
diff --git a/frontend/jupyter/src/app/types/notebook.ts b/frontend/jupyter/src/app/types/notebook.ts
index 92da2d23..ca897fdf 100644
--- a/frontend/jupyter/src/app/types/notebook.ts
+++ b/frontend/jupyter/src/app/types/notebook.ts
@@ -55,6 +55,7 @@ export interface NotebookProcessedObject extends NotebookResponseObject {
status: string;
text: string;
}[];
+ hasFullVolumes?: boolean;
}
export interface NotebookFormObject {
diff --git a/frontend/jupyter/src/styles.scss b/frontend/jupyter/src/styles.scss
index 78192d2a..e4e13579 100644
--- a/frontend/jupyter/src/styles.scss
+++ b/frontend/jupyter/src/styles.scss
@@ -22,3 +22,8 @@ mat-form-field {
height: 100%;
}
}
+
+// ZONE: To enable multiline tooltips
+.multiline-tooltip {
+ white-space: pre-line;
+}