Skip to content

Commit 71afd38

Browse files
Merge stable in master
2 parents 93e264e + 293b262 commit 71afd38

9 files changed

Lines changed: 44 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# 0.12.3
2+
3+
### Hot fix:
4+
* File-group/container issue with adding more files(Disabled for non file group for now) [\#1033](https://github.com/Azure/BatchLabs/issues/1033)
5+
* Storage Container Search Broken [\#1039](https://github.com/Azure/BatchLabs/issues/1039)
6+
7+
# 0.12.2
8+
9+
### Hot fix:
10+
* Update Electron to fix vulnerability [\#1030](https://github.com/Azure/BatchLabs/issues/1030)
11+
112
# 0.12.1
213

314
### Hot fix:

app/components/base/buttons/buttons.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Job, JobState } from "app/models";
66

77
export class BaseButton {
88
@Input() public action: ButtonAction;
9+
@Input() public disabled: boolean;
910
@Input() public tooltipPosition: string = "below";
1011
}
1112

@@ -215,7 +216,12 @@ export class ResizeButtonComponent extends BaseButton {
215216
@Component({
216217
selector: "bl-edit-button",
217218
template: `
218-
<bl-button color="light" [action]="action" [title]="title" icon="fa fa-pencil-square-o" permission="write">
219+
<bl-button color="light"
220+
[action]="action"
221+
[title]="title"
222+
icon="fa fa-pencil-square-o"
223+
permission="write"
224+
[disabled]="disabled">
219225
</bl-button>
220226
`,
221227
})

app/components/base/list-and-show-layout/list-and-show-layout.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ export class ListAndShowLayoutComponent implements AfterViewInit, OnChanges, OnD
5656
@Output()
5757
public listScrolledToBottom = new EventEmitter<any>();
5858

59+
@Output()
60+
public filterChange = new EventEmitter<Filter>();
61+
5962
@ViewChild("quickSearchInput")
6063
public quickSearchInput: ElementRef;
6164

@@ -167,6 +170,7 @@ export class ListAndShowLayoutComponent implements AfterViewInit, OnChanges, OnD
167170

168171
private _updateFilter() {
169172
this.filter = FilterBuilder.and(this.quickFilter, this.advancedFilter);
173+
this.filterChange.emit(this.filter);
170174
}
171175

172176
private _clearListSubs() {

app/components/data/details/data-details.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export class DataDetailsComponent implements OnInit, OnDestroy {
3030
public containerId: string;
3131
public decorator: ApplicationDecorator;
3232
public data: EntityView<BlobContainer, GetContainerParams>;
33+
public isFileGroup = false;
3334

3435
private _paramsSubscriber: Subscription;
3536

@@ -43,6 +44,7 @@ export class DataDetailsComponent implements OnInit, OnDestroy {
4344
this.data = this.storageService.containerView();
4445
this.data.item.subscribe((container) => {
4546
this.container = container;
47+
this.isFileGroup = container && container.isFileGroup;
4648
});
4749

4850
this.data.deleted.subscribe((key) => {

app/components/data/details/data-details.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</div>
88
<bl-button-group summaryActions>
99
<bl-refresh-btn [refresh]="refresh"></bl-refresh-btn>
10-
<bl-edit-button title="Add more files to the file group" [action]="manageFileGroup"></bl-edit-button>
10+
<bl-edit-button title="Add more files to the file group" [action]="manageFileGroup" [disabled]="!isFileGroup"></bl-edit-button>
1111
<bl-delete-button title="Delete this file group" [action]="deleteFileGroup"></bl-delete-button>
1212
<bl-download-button title="Download this file group" [action]="download"></bl-download-button>
1313
</bl-button-group>

app/components/data/home/data-home.component.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class DataHomeComponent implements OnDestroy {
3333
@ViewChild(MatMenuTrigger) public trigger: MatMenuTrigger;
3434

3535
public containerTypes = containerTypes;
36-
public quickSearchQuery = new FormControl();
36+
public quickSearchQuery: string = "";
3737
public filter: Filter = FilterBuilder.none();
3838
public hasAutoStorage = true;
3939
public containerTypePrefix = new FormControl("");
@@ -45,10 +45,6 @@ export class DataHomeComponent implements OnDestroy {
4545
private dialogService: DialogService,
4646
public storageService: StorageService) {
4747

48-
this.quickSearchQuery.valueChanges.debounceTime(400).distinctUntilChanged().subscribe((query: string) => {
49-
this._updateFilter();
50-
});
51-
5248
this.containerTypePrefix.valueChanges.subscribe((prefix) => {
5349
this._updateFilter();
5450
});
@@ -62,6 +58,15 @@ export class DataHomeComponent implements OnDestroy {
6258
this._autoStorageSub.unsubscribe();
6359
}
6460

61+
public quickSearchFilterChanged(filter: Filter) {
62+
if (filter.isEmpty()) {
63+
this.quickSearchQuery = "";
64+
} else {
65+
this.quickSearchQuery = (filter.properties[0] as any).value;
66+
}
67+
this._updateFilter();
68+
}
69+
6570
@autobind()
6671
public addFileGroup() {
6772
this.trigger.openMenu();
@@ -104,7 +109,7 @@ export class DataHomeComponent implements OnDestroy {
104109

105110
private _updateFilter() {
106111
const prefix = this.containerTypePrefix.value || "";
107-
const search = this.quickSearchQuery.value || "";
112+
const search = this.quickSearchQuery || "";
108113
const query = prefix + search;
109114
if (query === "") {
110115
this.filter = FilterBuilder.none();

app/components/data/home/data-home.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<bl-storage-error-display [noClassic]="true"></bl-storage-error-display>
22

3-
<bl-list-and-show-layout #layout (listScrolledToBottom)="fileGroupList.onScrollToBottom()" [list]="fileGroupList" *ngIf="storageService.hasArmAutoStorage | async">
3+
<bl-list-and-show-layout #layout (listScrolledToBottom)="fileGroupList.onScrollToBottom()" (filterChange)="quickSearchFilterChanged($event)"
4+
[list]="fileGroupList" *ngIf="storageService.hasArmAutoStorage | async">
45
<div bl-list-title>
56
Storage containers
67
</div>

app/models/blob-container.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Model, Prop, Record } from "app/core";
2+
import { Constants } from "common";
23
import { ContainerLease, ContainerLeaseAttributes } from "./container-lease";
34
import { NavigableRecord } from "./navigable-record";
45

@@ -31,4 +32,8 @@ export class BlobContainer extends Record<BlobContainerAttributes> implements Na
3132
public get routerLink(): string[] {
3233
return ["/data", this.id];
3334
}
35+
36+
public get isFileGroup() {
37+
return this.id && this.id.startsWith(Constants.ncjFileGroupPrefix);
38+
}
3439
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "Microsoft Corporation",
1010
"email": "tiguerin@microsoft.com"
1111
},
12-
"version": "0.12.1",
12+
"version": "0.12.3",
1313
"main": "build/client/main.prod.js",
1414
"scripts": {
1515
"ts": "ts-node --project tsconfig.node.json",

0 commit comments

Comments
 (0)