@@ -14,6 +14,7 @@ import {
14
14
Collapse ,
15
15
Checkbox ,
16
16
Select ,
17
+ Space ,
17
18
} from "antd" ;
18
19
import React , { useEffect , useState } from "react" ;
19
20
import { useShowModal } from "../components/ModalManager" ;
@@ -38,6 +39,7 @@ import { useConfig } from "../components/ConfigProvider";
38
39
import Cron from "react-js-cron" ;
39
40
import { ScheduleFormItem } from "../components/ScheduleFormItem" ;
40
41
import { proto3 } from "@bufbuild/protobuf" ;
42
+ import { isWindows } from "../state/buildcfg" ;
41
43
42
44
export const AddRepoModal = ( { template } : { template : Repo | null } ) => {
43
45
const [ confirmLoading , setConfirmLoading ] = useState ( false ) ;
@@ -495,55 +497,111 @@ export const AddRepoModal = ({ template }: { template: Repo | null }) => {
495
497
</ Form . Item >
496
498
497
499
{ /* Repo.commandPrefix */ }
498
- < Form . Item
499
- label = {
500
- < Tooltip
501
- title = {
502
- < span >
503
- Modifiers for the backup operation e.g. set the CPU or IO
504
- priority. Currently only available on unix systems.
505
- </ span >
506
- }
507
- >
508
- Command Modifiers
509
- </ Tooltip >
510
- }
511
- >
512
- < Row >
513
- < Col span = { 12 } >
514
- < Form . Item name = { [ "commandPrefix" , "ioNice" ] } required = { false } >
515
- < Select
516
- allowClear
517
- style = { { width : "100%" } }
518
- placeholder = "Select an IO priority"
519
- options = { proto3
520
- . getEnumType ( CommandPrefix_IONiceLevel )
521
- . values . map ( ( v ) => ( { label : v . name , value : v . name } ) ) }
522
- />
523
- </ Form . Item >
524
- </ Col >
525
-
526
- < Col span = { 12 } >
527
- < Form . Item name = { [ "commandPrefix" , "cpuNice" ] } required = { false } >
528
- < Select
529
- allowClear
530
- style = { { width : "100%" } }
531
- placeholder = "Select a CPU priority"
532
- options = { proto3
533
- . getEnumType ( CommandPrefix_CPUNiceLevel )
534
- . values . map ( ( v ) => ( { label : v . name , value : v . name } ) ) }
535
- />
536
- </ Form . Item >
537
- </ Col >
538
- </ Row >
539
- </ Form . Item >
500
+ { ! isWindows && (
501
+ < Form . Item
502
+ label = {
503
+ < Tooltip
504
+ title = {
505
+ < span >
506
+ Modifiers for the backup operation e.g. set the CPU or IO
507
+ priority.
508
+ </ span >
509
+ }
510
+ >
511
+ Command Modifiers
512
+ </ Tooltip >
513
+ }
514
+ colon = { false }
515
+ >
516
+ < Row >
517
+ < Col span = { 12 } style = { { paddingLeft : "5px" } } >
518
+ < Tooltip
519
+ title = {
520
+ < >
521
+ Available IO priority modes
522
+ < ul >
523
+ < li >
524
+ IO_BEST_EFFORT_LOW - runs at lower than default disk
525
+ priority (will prioritize other processes)
526
+ </ li >
527
+ < li >
528
+ IO_BEST_EFFORT_HIGH - runs at higher than default
529
+ disk priority (top of disk IO queue)
530
+ </ li >
531
+ < li >
532
+ IO_IDLE - only runs when disk bandwidth is idle
533
+ (e.g. no other operations are queued)
534
+ </ li >
535
+ </ ul >
536
+ </ >
537
+ }
538
+ >
539
+ IO Priority:
540
+ < br />
541
+ < Form . Item
542
+ name = { [ "commandPrefix" , "ioNice" ] }
543
+ required = { false }
544
+ >
545
+ < Select
546
+ allowClear
547
+ style = { { width : "100%" } }
548
+ placeholder = "Select an IO priority"
549
+ options = { proto3
550
+ . getEnumType ( CommandPrefix_IONiceLevel )
551
+ . values . map ( ( v ) => ( {
552
+ label : v . name ,
553
+ value : v . name ,
554
+ } ) ) }
555
+ />
556
+ </ Form . Item >
557
+ </ Tooltip >
558
+ </ Col >
559
+ < Col span = { 12 } style = { { paddingLeft : "5px" } } >
560
+ < Tooltip
561
+ title = {
562
+ < >
563
+ Available CPU priority modes:
564
+ < ul >
565
+ < li > CPU_DEFAULT - no change in priority</ li >
566
+ < li >
567
+ CPU_HIGH - higher than default priority (backrest
568
+ must be running as root)
569
+ </ li >
570
+ < li > CPU_LOW - lower than default priority</ li >
571
+ </ ul >
572
+ </ >
573
+ }
574
+ >
575
+ CPU Priority:
576
+ < br />
577
+ < Form . Item
578
+ name = { [ "commandPrefix" , "cpuNice" ] }
579
+ required = { false }
580
+ >
581
+ < Select
582
+ allowClear
583
+ style = { { width : "100%" } }
584
+ placeholder = "Select a CPU priority"
585
+ options = { proto3
586
+ . getEnumType ( CommandPrefix_CPUNiceLevel )
587
+ . values . map ( ( v ) => ( {
588
+ label : v . name ,
589
+ value : v . name ,
590
+ } ) ) }
591
+ />
592
+ </ Form . Item >
593
+ </ Tooltip >
594
+ </ Col >
595
+ </ Row >
596
+ </ Form . Item >
597
+ ) }
540
598
541
599
< Form . Item
542
600
label = {
543
601
< Tooltip
544
602
title = {
545
603
"Auto-unlock will remove lockfiles at the start of forget and prune operations. " +
546
- "This is potentially unsafe if the repo is shared by multiple client devices. Opt-in (and disabled) by default."
604
+ "This is potentially unsafe if the repo is shared by multiple client devices. Disabled by default."
547
605
}
548
606
>
549
607
Auto Unlock
0 commit comments