mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
More HDFS Manage Access dialog updates (#7692)
* Add support for default permissions on directories (cherry picked from commit 4e81cceba142c6763c3447b4d2965cd75764f8f9) * Remove unneeded import (cherry picked from commit ffe5f357357e75e9290966e89768c699df2e1311) * Add recursive apply and clean up webhdfs (cherry picked from commit ae76df14f99e599df1cdfcc74ee22d3822f11a59) * Final set of changes * Undo changes to azdata/sqlops and few minor fixes * Remove cast to fix build error * Hide defaults checkbox for files and switch checkbox order
This commit is contained in:
@@ -19,4 +19,18 @@ export function equals<T>(one: ReadonlyArray<T>, other: ReadonlyArray<T>, itemEq
|
||||
|
||||
export function flatten<T>(arr: ReadonlyArray<T>[]): T[] {
|
||||
return ([] as T[]).concat.apply([], arr);
|
||||
}
|
||||
}
|
||||
|
||||
export function groupBy<T>(data: ReadonlyArray<T>, compare: (a: T, b: T) => number): T[][] {
|
||||
const result: T[][] = [];
|
||||
let currentGroup: T[] | undefined = undefined;
|
||||
for (const element of data.slice(0).sort(compare)) {
|
||||
if (!currentGroup || compare(currentGroup[0], element) !== 0) {
|
||||
currentGroup = [element];
|
||||
result.push(currentGroup);
|
||||
} else {
|
||||
currentGroup.push(element);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user