Skip to content

Commit 0eb00d3

Browse files
Fix backup page
show full/incremental and CRON expressions
1 parent e9e807a commit 0eb00d3

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

orientdb-studio.iml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" version="4">
3+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
4+
<output url="file://$MODULE_DIR$/target/classes" />
5+
<output-test url="file://$MODULE_DIR$/target/test-classes" />
6+
<content url="file://$MODULE_DIR$">
7+
<excludeFolder url="file://$MODULE_DIR$/target" />
8+
</content>
9+
<orderEntry type="inheritedJdk" />
10+
<orderEntry type="sourceFolder" forTests="false" />
11+
</component>
12+
</module>

src/app/administration/stats/backup/singlebackup.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@
5252
<div class="form-group" *ngIf="mode == '3' || mode == '2'">
5353
<label class="col-sm-3 control-label">Full Backup</label>
5454
<div class="col-sm-9">
55-
<cron *ngIf="backup.modes['FULL_BACKUP']" [cron]="backup.modes['FULL_BACKUP'].when"
55+
<cron *ngIf="backup.modes['FULL_BACKUP']" [cronVal]="backup.modes['FULL_BACKUP'].when"
5656
(changed)="onChange('2',$event)"></cron>
5757
</div>
5858
</div>
5959
<div class="form-group" *ngIf="mode == '3' || mode == '1'">
6060
<label class="col-sm-3 control-label">Incremental Backup</label>
6161
<div class="col-sm-9">
62-
<cron *ngIf="backup.modes['INCREMENTAL_BACKUP']" [cron]="backup.modes['INCREMENTAL_BACKUP'].when"
62+
<cron *ngIf="backup.modes['INCREMENTAL_BACKUP']" [cronVal]="backup.modes['INCREMENTAL_BACKUP'].when"
6363
(changed)="onChange('1',$event)"></cron>
6464
</div>
6565
</div>
@@ -109,4 +109,4 @@
109109
</div>
110110
</div>
111111
</div>
112-
</div>
112+
</div>

src/app/administration/stats/backup/singlebackup.component.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ class SingleBackupComponent implements OnInit, OnDestroy, OnChanges {
125125
ngOnInit(): void {
126126
this.ee = this.agent.active;
127127
this.canEdit = this.permissionService.isAllow("server.backup.edit");
128+
129+
if(this.backup.modes["INCREMENTAL_BACKUP"] && this.backup.modes["FULL_BACKUP"]){
130+
this.mode = "3";
131+
} else if(this.backup.modes["INCREMENTAL_BACKUP"]){
132+
this.mode = "1";
133+
} else {
134+
this.mode = "2";
135+
}
128136
}
129137

130138
ngOnChanges(changes: SimpleChanges) {

src/app/util/cron.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class CronComponent implements OnInit, OnChanges {
2121
constructor(private elem: ElementRef) {}
2222

2323
@Input()
24-
private cron;
24+
private cronVal;
2525

2626
@Output()
2727
private changed: EventEmitter<any> = new EventEmitter();
@@ -33,6 +33,7 @@ export class CronComponent implements OnInit, OnChanges {
3333
}
3434
ngOnInit(): void {
3535
let self = this;
36+
3637
this.cronElement = $(this.elem.nativeElement).cron({
3738
onChange: function() {
3839
self.changed.emit($(this).cron("value"));
@@ -41,7 +42,8 @@ export class CronComponent implements OnInit, OnChanges {
4142
"5 Minutes": "0 0/5 * * * ?",
4243
"10 Minutes": "0 0/10 * * * ?",
4344
"30 Minutes": "0 0/30 * * * ?"
44-
}
45+
},
46+
initial: this.cronVal
4547
});
4648
}
4749
}

0 commit comments

Comments
 (0)