You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by pi...@apache.org on 2021/10/18 18:02:21 UTC
[submarine] branch master updated: SUBMARINE-989. Add error message
of invalid notebook name
This is an automated email from the ASF dual-hosted git repository.
pingsutw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new 90a9906 SUBMARINE-989. Add error message of invalid notebook name
90a9906 is described below
commit 90a9906f589f8f5c9ffba9062963cd3bebd78b6d
Author: Ray02250418 <s9...@gmail.com>
AuthorDate: Sat Oct 16 01:07:38 2021 +0800
SUBMARINE-989. Add error message of invalid notebook name
### What is this PR for?
Add the error message of invalid notebook name in workbench.
Edit experiment error message position.
### What type of PR is it?
Bug Fix
### Todos
### What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-989
### How should this be tested?
### Screenshots (if appropriate)
Notebook name error message:
<img width="703" alt="image" src="https://user-images.githubusercontent.com/71302532/137569882-24729553-3757-4f61-bfc2-b44f46942b39.png">
Experiment name error message:
<img width="1002" alt="image" src="https://user-images.githubusercontent.com/71302532/137569912-9159bbdd-8703-4431-b8ab-1dcc271064e2.png">
### Questions:
* Do the license files need updating? No
* Are there breaking changes for older versions? No
* Does this need new documentation? No
Author: Ray02250418 <s9...@gmail.com>
Signed-off-by: Kevin <pi...@apache.org>
Closes #778 from Ray02250418/SUBMARINE-989 and squashes the following commits:
7d28e957 [Ray02250418] SUBMARINE-989. Use "rem" width and left in css alert message
38b7471b [Ray02250418] SUBMARINE-989. Remove unused code
d2a53b0c [Ray02250418] SUBMARINE-989. Change the position of experiment name error message
eb264350 [Ray02250418] SUBMARINE-989. Add error message of invalid notebook name
---
.../experiment-customized-form.component.html | 6 ++++--
.../experiment-customized-form.component.scss | 9 +++++++--
.../notebook-home/notebook-form/notebook-form.component.html | 3 +++
.../notebook-home/notebook-form/notebook-form.component.scss | 9 ++++++++-
4 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-form/experiment-customized-form/experiment-customized-form.component.html b/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-form/experiment-customized-form/experiment-customized-form.component.html
index 5604852..5f58663 100644
--- a/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-form/experiment-customized-form/experiment-customized-form.component.html
+++ b/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-form/experiment-customized-form/experiment-customized-form.component.html
@@ -41,8 +41,10 @@
formControlName="experimentName"
placeholder="mnist-example"
/>
- <div class="alert-message" *ngIf="experiment.get('experimentName').hasError('pattern')">
- Only letters(a-z), numbers(0-9), and hyphens are allowed, but you can't start or end with hyphens.
+ <div class="alert-message-container">
+ <div class="alert-message" *ngIf="experiment.get('experimentName').hasError('pattern')">
+ Only letters(a-z), numbers(0-9), and hyphens are allowed, but you can't start or end with hyphens.
+ </div>
</div>
</div>
<div class="single-field-group">
diff --git a/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-form/experiment-customized-form/experiment-customized-form.component.scss b/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-form/experiment-customized-form/experiment-customized-form.component.scss
index 01fd3f4..e73f143 100644
--- a/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-form/experiment-customized-form/experiment-customized-form.component.scss
+++ b/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-form/experiment-customized-form/experiment-customized-form.component.scss
@@ -102,6 +102,7 @@ textarea.ng-invalid.ng-touched {
/* utility */
.single-field-group {
display: flex;
+ flex-wrap: wrap;
align-items: center;
margin-bottom: 1.5rem;
& label {
@@ -117,11 +118,15 @@ textarea.ng-invalid.ng-touched {
}
}
+.alert-message-container {
+ flex: 0 0 100%;
+}
.alert-message {
+ position: relative;
color: red;
- margin-top: .3rem;
- margin-left: .5rem;
+ width: 28rem;
+ left: 16.5rem;
}
/* For jobs */
diff --git a/submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook-home/notebook-form/notebook-form.component.html b/submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook-home/notebook-form/notebook-form.component.html
index 141200a..6cfc004 100644
--- a/submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook-home/notebook-form/notebook-form.component.html
+++ b/submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook-home/notebook-form/notebook-form.component.html
@@ -30,6 +30,9 @@
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input required type="text" name="notebookName" id="notebookName" formControlName="notebookName" />
</nz-form-control>
+ <div class="alert-message" *ngIf="notebookForm.get('notebookName').hasError('pattern')">
+ Only letters(a-z), numbers(0-9), and hyphens are allowed, but you can't start with numbers/hyphens or end with hyphens.
+ </div>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="environment">Environment</nz-form-label>
diff --git a/submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook-home/notebook-form/notebook-form.component.scss b/submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook-home/notebook-form/notebook-form.component.scss
index 9daa273..5332791 100644
--- a/submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook-home/notebook-form/notebook-form.component.scss
+++ b/submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook-home/notebook-form/notebook-form.component.scss
@@ -21,4 +21,11 @@
margin: 10px;
width : 140px;
height: 50px
-}
\ No newline at end of file
+}
+
+.alert-message {
+ position: relative;
+ color: red;
+ width: 26rem;
+ left: 10rem;
+ }
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org