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 cb3d9bb  SUBMARINE-1176. CPU can be decimal
cb3d9bb is described below

commit cb3d9bb7da748bcf4bc8f4771b3346b469212c41
Author: kobe860219 <[email protected]>
AuthorDate: Sat Jan 15 12:45:04 2022 +0800

    SUBMARINE-1176. CPU can be decimal
    
    ### What is this PR for?
    Make input support decimal for user to chose resource.
    
    ### What type of PR is it?
    [Improvement]
    
    ### Todos
    * [ ] - Task
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/SUBMARINE-1176
    
    ### How should this be tested?
    
    ### Screenshots (if appropriate)
    ![螢幕錄製 2022-01-15 
下午12](https://user-images.githubusercontent.com/48027290/149609359-e372b1b6-9778-4da7-8c19-401b736d71f3.gif)
    
    ### Questions:
    * Do the license files need updating? No
    * Are there breaking changes for older versions? No
    * Does this need new documentation? No
    
    Author: kobe860219 <[email protected]>
    
    Signed-off-by: Kevin <[email protected]>
    
    Closes #869 from kobe860219/SUBMARINE-1176 and squashes the following 
commits:
    
    a094c803 [kobe860219] SUBMARINE-1176. CPU can be decimal
    5d4e9178 [kobe860219] SUBMARINE-1176. CPU can be decimal
---
 .../notebook/notebook-home/notebook-form/notebook-form.component.html   | 2 +-
 .../notebook/notebook-home/notebook-form/notebook-form.component.ts     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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 6cfc004..0de928d 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
@@ -50,7 +50,7 @@
     <nz-form-item>
       <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired 
nzFor="cpus">CPU</nz-form-label>
       <nz-form-control [nzSm]="14" [nzXs]="24">
-        <input nz-input min="0" required type="number" name="cpus" id="cpus" 
formControlName="cpus" />
+        <input nz-input min="0" required type="number" name="cpus" id="cpus" 
step="0.1" formControlName="cpus" />
       </nz-form-control>
     </nz-form-item>
     <nz-form-item>
diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook-home/notebook-form/notebook-form.component.ts
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook-home/notebook-form/notebook-form.component.ts
index c821500..5296eb9 100644
--- 
a/submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook-home/notebook-form/notebook-form.component.ts
+++ 
b/submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook-home/notebook-form/notebook-form.component.ts
@@ -66,7 +66,7 @@ export class NotebookFormComponent implements OnInit {
       ],
       envName: [null, Validators.required], // Environment
       envVars: this.fb.array([], 
[this.experimentValidatorService.nameValidatorFactory('key')]),
-      cpus: [null, [Validators.min(1), Validators.required]],
+      cpus: [null, [Validators.min(0.1), Validators.required]],
       gpus: [null],
       memoryNum: [null, [Validators.required]],
       unit: [this.MEMORY_UNITS[0], [Validators.required]],

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to