Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c622f85
Merge pull request #2333 from Azure/stable
gingi Jun 11, 2021
fd1c6d9
Bump websockets from 7.0 to 9.1 in /python (#2335)
dependabot[bot] Jun 11, 2021
068ddfd
Bump ws from 6.2.1 to 6.2.2 (#2328)
dependabot[bot] Jun 11, 2021
8000326
Fixes username in profile button
gingi Jun 11, 2021
d047294
Upgrades azure-storage dep for component governance
gingi Jun 14, 2021
f5ac9b1
Minor npm audit fixes
gingi Jun 14, 2021
cfd1070
Bump postcss from 7.0.35 to 7.0.36 (#2341)
dependabot[bot] Jun 16, 2021
34dc5ec
Add fpga to vm size categories (#2340)
cRui861 Jun 16, 2021
5d20f38
Fix tooltip doesn't close with esc key (#2345)
cRui861 Jul 1, 2021
95b7856
Fixes AB#492: Keyboard shortcuts for Copy button
gingi Jul 2, 2021
ad01876
Only show Cloud Services deprecation warning when Windows (Cloud Serv…
dpwatrous Jul 22, 2021
ca3a3ba
Fix Screen Reader not announcing loading information when refreshing …
cRui861 Jul 28, 2021
f5100aa
Fix: Unable to log in with personal (MSA) accounts
dpwatrous Jul 29, 2021
8e9ac92
Upgrade @azure/msal-node dependency
gingi Jul 29, 2021
11ad6b6
Merge pull request #2354 from Azure/dpwatrous/msa-auth-fix
dpwatrous Jul 29, 2021
84f940f
Fix AB#282: Luminosity contrast ratio of the sorting key is less than…
cRui861 Jul 29, 2021
88bff28
Fix: Resize error name wasn't being displayed properly (#2356)
dpwatrous Aug 3, 2021
75bb07e
Fix stylelint deprecation warning (#2355)
dpwatrous Aug 3, 2021
faf5afc
Bump tar from 6.1.0 to 6.1.3
dependabot[bot] Aug 3, 2021
0e23ccb
Publish script bumps version post-release
gingi Jun 14, 2021
962de1b
Fix regex to handle urls with @ and fix SAML issue to access urls (#2…
cRui861 Aug 11, 2021
dde9da7
Add await to currentBranch (#2372)
cRui861 Aug 11, 2021
19253f2
Bump path-parse from 1.0.6 to 1.0.7 (#2368)
dependabot[bot] Aug 11, 2021
9334146
Prepare for release 2.11.0 (#2373)
cRui861 Aug 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

"unit-case": "lower",
"unit-no-unknown": true,
"unit-blacklist": ["rem"],
"unit-disallowed-list": ["rem"],

"value-no-vendor-prefix": true,

Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# 2.11.0

[All items](https://github.com/Azure/BatchExplorer/milestone/45?closed=1)

### feature

* Dynamically show/hide cloud services deprecation warning [\#2360](https://github.com/Azure/BatchExplorer/issues/2360)
* Add fpga to vm size categories [\#2359](https://github.com/Azure/BatchExplorer/issues/2359)

### bug

* Fix resize error name wasn't being displayed properly [\#2361](https://github.com/Azure/BatchExplorer/issues/2361)
* Fix accessibility issues regarding luminosity contrast, screen-reader, and keyboard shortcuts [\#2358](https://github.com/Azure/BatchExplorer/issues/2358)
* Fix login with personal account [\#2344](https://github.com/Azure/BatchExplorer/issues/2344)
* Fix user button tooltip showing as 'undefined' instead of username [\#2334](https://github.com/Azure/BatchExplorer/issues/2334)

# 2.10.0

[All items](https://github.com/Azure/BatchExplorer/milestone/44?closed=1)
Expand Down
588 changes: 287 additions & 301 deletions ThirdPartyNotices.txt

Large diffs are not rendered by default.

252 changes: 146 additions & 106 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"name": "Microsoft Corporation",
"email": "batchexplorer@microsoft.com"
},
"version": "2.10.0",
"version": "2.11.0",
"main": "build/client/main.prod.js",
"scripts": {
"ts": "ts-node --project tsconfig.node.json --files",
Expand Down Expand Up @@ -85,6 +85,7 @@
"@types/inflection": "^1.5.28",
"@types/jasmine": "^3.5.12",
"@types/js-yaml": "^3.12.5",
"@types/keytar": "^4.4.2",
"@types/luxon": "^1.24.3",
"@types/node": "12.12.21",
"@types/node-fetch": "^2.5.7",
Expand Down Expand Up @@ -173,11 +174,10 @@
"@angular/platform-browser-dynamic": "^9.1.12",
"@angular/platform-server": "^9.1.12",
"@angular/router": "^9.1.12",
"@azure/msal-node": "^1.0.1",
"@azure/msal-node": "^1.3.0",
"@azure/storage-blob": "^10.5.0",
"@types/keytar": "^4.4.2",
"applicationinsights": "^1.8.5",
"azure-storage": "^2.10.3",
"azure-storage": "^2.10.4",
"chart.js": "^2.9.3",
"chokidar": "^3.4.3",
"commander": "^2.20.3",
Expand Down
2 changes: 1 addition & 1 deletion python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
websockets==7.0
websockets==9.1
pylint==2.3.0
azure-batch-extensions==7.0.0
pyinstaller==3.6
Expand Down
22 changes: 14 additions & 8 deletions scripts/lca/generate-third-party.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const defaultThirdPartyNoticeOptions: ThirdPartyNoticeOptions = {
const thirdPartyNoticeFile = path.join(Constants.root, "ThirdPartyNotices.txt");

const output: string[] = [];
const gitUrlRegex = /(?:git|ssh|https?|git@[-\w.]+):(\/\/[-\w.]+\/)?(.*?)(\.git)?(\/?|\#[-\d\w._]+?)$/;
const gitUrlRegex = /(?:git|ssh|https?|git@[-\w.]+):(\/\/[-\w@.]+\/)?(.*?)(\.git)?(\/?|\#[-\d\w._]+?)$/;
const repoNameRegex = /https?:\/\/github\.com\/(.*)/;
const innerSeparator = "-".repeat(60);
const outerSeparator = "=".repeat(60);
Expand Down Expand Up @@ -86,7 +86,6 @@ function listDependencies(): string[] {
function loadDependency(name: string) {
const contents = fs.readFileSync(`node_modules/${name}/package.json`).toString();
const dependency = JSON.parse(contents);

const repoUrl = getRepoUrl(dependency);
const url = dependency.homepage || repoUrl;
return {
Expand Down Expand Up @@ -120,16 +119,23 @@ function getRepoName(repoUrl: string | null): string | null {
return value.split("/").slice(0, 2).join("/");
}

function loadLicense(repoUrl: string | null): Promise<any> {
function loadLicense(repoUrl: string | null, anonymous = false): Promise<any> {
const repoName = getRepoName(repoUrl);
return fetch(`https://api.github.com/repos/${repoName}/license`, {
headers: {
Authorization: `token ${process.env.GH_TOKEN}`,
},
}).then((res) => {
const licenseUrl = `https://api.github.com/repos/${repoName}/license`;
const headers = anonymous ? {} : { Authorization: `token ${process.env.GH_TOKEN}`}

return fetch(licenseUrl, {headers}).then((res) => {
/** Will look up default license if cannot find a license */
if (!anonymous && res.status === 403) {
console.warn(`Access denied, retrying request anonymously. Url: ${licenseUrl}`);
return loadLicense(repoUrl, anonymous = true);
} else if (res.status >= 300 && res.status != 404) {
throw new Error(`Response status ${res.status} ${res.statusText} with url: ${licenseUrl}`);
}
return res.json();
}).catch((error) => {
console.error(`Error loading license for ${repoName}`, error);
process.exit(1)
});
}

Expand Down
68 changes: 42 additions & 26 deletions scripts/publish/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {
createIssue, createPullRequest, getMilestone, githubToken, listMilestoneIssues, listPullRequests,
} from "./github-api";

const MAIN_BRANCH = "master";

const root = path.resolve(path.join(__dirname, "../.."));
const allMessages: string[] = [];
const repoName = "Azure/BatchExplorer";
Expand Down Expand Up @@ -54,57 +56,71 @@ function checkGithubToken() {
/**
* This goes back to master and pull
*/
async function gotoMaster() {
await run("git checkout master");
async function gotoMainBranch() {
await run(`git checkout ${MAIN_BRANCH}`);
await run("git pull");
success("Checkout to master branch and pulled latest");
success(`Checkout to ${MAIN_BRANCH} branch and pulled latest`);
}

async function loadMillestone(millestoneId: number) {
return getMilestone(repoName, millestoneId);
async function loadMilestone(milestoneId: number) {
return getMilestone(repoName, milestoneId);
}

async function getCurrentBranch(): Promise<string> {
const { stdout } = await run(`git symbolic-ref --short -q HEAD`);
return stdout.trim();
}

function getMillestoneId() {
function getMilestoneId() {
if (process.argv.length < 3) {
throw new Error("No millestone id was provided.");
throw new Error("No milestone id was provided.");
}
return parseInt(process.argv[2], 10);
}

async function confirmVersion(version: string) {
return new Promise((resolve, reject) => {
ask(`Up program to be version ${version} (From millestone title) [Y/n]`, true, (ok) => {
ask(`Up program to be version ${version} (From milestone title) [Y/n]`, true, (ok) => {
if (ok) {
success(`A new release for version ${version} will be prepared`);
resolve(null);
} else {
reject(new Error("Millestone version wasn't confirmed. Please change millestone title"));
reject(new Error("milestone version wasn't confirmed. Please change milestone title"));
}
});
});
}

function calcNextVersion(version: string) {
const match = /^(\d+\.)(\d+)(\.\d+)$/.exec(version);
return `${match[1]}${parseInt(match[2], 10) + 1}${match[3]}`;
}

function getPreparationBranchName(version: string) {
return `release/prepare-${version}`;
}

async function switchToNewBranch(branchName: string) {
await run(`git checkout -b ${branchName}`);
await run(`git checkout -B ${branchName}`);
success(`Created a new branch ${branchName}`);
}

async function bumpVersion(version) {
await run(`npm version --no-git-tag-version --allow-same-version ${version}`);
success(`Updated version in package.json to ${version}`);
const currentBranch = await getCurrentBranch();
const nextVersion = calcNextVersion(version);
const bumpBranch = `release/bump-${nextVersion}`;
await gotoMainBranch();
await switchToNewBranch(bumpBranch);
await run(`npm version --no-git-tag-version --allow-same-version ${nextVersion}`);

await run(`git commit -am "Bump version to ${nextVersion}"`);
await run(`git push origin ${bumpBranch}`);
await run(`git checkout "${currentBranch}"`);
success(`Updated version in package.json to ${nextVersion} (branch: ${bumpBranch})`);
}

async function updateChangeLog(version, millestoneId) {
const { stdout } = await run(`gh-changelog-gen --repo ${repoName} ${millestoneId} --formatter markdown`);
async function updateChangeLog(version, milestoneId) {
const { stdout } = await run(`gh-changelog-gen --repo ${repoName} ${milestoneId} --formatter markdown`);
const changelogFile = path.join(root, "CHANGELOG.md");
const changelogContent = fs.readFileSync(changelogFile);

Expand All @@ -129,14 +145,14 @@ async function push(branchName: string) {
await run(`git push --set-upstream origin ${branchName}`);
}

async function createIssueIfNot(millestoneId, version) {
async function createIssueIfNot(milestoneId, version) {
const title = `Prepare for release of version ${version}`;
const issues = await listMilestoneIssues(repoName, millestoneId);
const issues = await listMilestoneIssues(repoName, milestoneId);
let issue = issues.filter(x => x.title === title)[0];
if (issue) {
success(`Issue was already created earlier ${issue.html_url}`);
} else {
issue = await createIssue(repoName, title, newIssueBody, millestoneId);
issue = await createIssue(repoName, title, newIssueBody, milestoneId);
success(`Created a new issue ${issue.html_url}`);
}
return issue;
Expand Down Expand Up @@ -166,27 +182,27 @@ async function buildApp() {

async function startPublish() {
checkGithubToken();
const millestoneId = getMillestoneId();
const millestone = await loadMillestone(millestoneId);
if (!millestone.title && millestone["message"]) {
throw new Error(`Error fetching milestone: ${millestone["message"]}`);
const milestoneId = getMilestoneId();
const milestone = await loadMilestone(milestoneId);
if (!milestone.title && milestone["message"]) {
throw new Error(`Error fetching milestone: ${milestone["message"]}`);
}
const version = millestone.title;
const version = milestone.title;
await confirmVersion(version);
const releaseBranch = getPreparationBranchName(version);
const branch = await getCurrentBranch();
if (branch !== releaseBranch) {
await gotoMaster();
await gotoMainBranch();
await switchToNewBranch(releaseBranch);
}
await bumpVersion(version);
await updateChangeLog(version, millestoneId);
await updateChangeLog(version, milestoneId);
await updateThirdParty();
await commitChanges();
await push(releaseBranch);
const issue = await createIssueIfNot(millestoneId, version);
const issue = await createIssueIfNot(milestoneId, version);
await createPullrequestIfNot(version, releaseBranch, issue);
await buildApp();
await bumpVersion(version);
}

startPublish().then(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ describe("UserSpecificDataStore", () => {

expect(spy).not.toHaveBeenCalled();

userServiceSpy.currentUser.next({ unique_name: "foo@example.com" });
userServiceSpy.currentUser.next({ username: "foo@example.com" });
});

describe("when the user is loaded", () => {
beforeEach(() => {
userServiceSpy.currentUser.next({ unique_name: "foo@example.com" });
userServiceSpy.currentUser.next({ username: "foo@example.com" });
});

it("defaults to null when there is no value", async () => {
Expand Down Expand Up @@ -85,7 +85,7 @@ describe("UserSpecificDataStore", () => {
});

it("it gets value for the new user when switching", async () => {
userServiceSpy.currentUser.next({ unique_name: "other@example.com" });
userServiceSpy.currentUser.next({ username: "other@example.com" });

expect(await store.getItem("key-1")).toEqual("my-value-2");
expect(await store.getItem("key-2")).toEqual(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { GlobalStorage } from "../global-storage";
export const USER_SERVICE = "USER_SERVICE";

export interface User {
unique_name: string;
username: string;
}

export interface UserService {
Expand All @@ -34,7 +34,7 @@ export class UserSpecificDataStore implements DataStore, OnDestroy {
this._currentUser = this.userService.currentUser.pipe(
takeUntil(this._destroy),
filter(isNotNullOrUndefined),
map(x => x.unique_name),
map(x => x.username),
publishReplay(1),
refCount(),
);
Expand Down
4 changes: 1 addition & 3 deletions src/@batch-flask/ui/buttons/button.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Component, DebugElement, NO_ERRORS_SCHEMA } from "@angular/core";
import { ComponentFixture, TestBed } from "@angular/core/testing";
import { MatTooltip } from "@angular/material/tooltip";
import { By } from "@angular/platform-browser";
import { NoopAnimationsModule } from "@angular/platform-browser/animations";
import { MaterialModule } from "@batch-flask/core";
Expand Down Expand Up @@ -54,8 +53,7 @@ describe("ButtonComponent", () => {

it("Should have the tooltip specified with title", () => {
const el = de.query(By.css(".action-btn"));
const tooltip = el.injector.get(MatTooltip);
expect(tooltip.message).toBe("Stop");
expect(el.nativeElement.title).toBe("Stop");
});

it("should change color", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/@batch-flask/ui/buttons/button.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="action-btn" [ngClass]="type" [matTooltip]="tooltipTitle" [matTooltipPosition]="tooltipPosition">
<div class="action-btn" [ngClass]="type" title="{{tooltipTitle}}">
<div [class.hide]="status !== SubmitStatus.Idle" class="label">
<i [class]="icon"></i>
<ng-content></ng-content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export class RefreshButtonComponent implements OnDestroy {
@autobind()
public onClick() {
this.status = RefreshStatus.Refreshing;
this.liveAnnouncer.announce("Refreshing in progress");
this._refreshSub = this.refresh().subscribe(
() => {
this.status = RefreshStatus.Succeeded;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ let idCounter = 0;
@Component({
selector: "bl-tp-cell",
template: `
<div class="cell-value">
<div class="cell-value" aria-keyshortcuts="Enter Space">
<ng-container *ngIf="!useContent">{{value}}</ng-container>
<ng-content *ngIf="useContent"></ng-content>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/@batch-flask/ui/table/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ bl-table {

.sort-icon {
margin-left: 3px;
color: $main-background;
}

&:hover:not(.sorting) > .sort-icon {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe("ProfileButtonComponent", () => {
it("shows the current user info in tooltip", () => {
authServiceSpy.currentUser.next({
name: "Some Name",
unique_name: "some.name@example.com",
username: "some.name@example.com",
});
fixture.detectChanges();
const tooltip: MatTooltip = clickableEl.injector.get(MatTooltip);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ export class ProfileButtonComponent implements OnDestroy, OnInit {
private fs: FileSystemService,
private router: Router) {

authService.currentUser.pipe(takeUntil(this._destroy)).subscribe((user) => {
authService.currentUser.pipe(takeUntil(this._destroy)).subscribe(user => {
if (user) {
this.currentUserName = `${user.name} (${user.unique_name})`;
this.currentUserName = `${user.name} (${user.username})`;
} else {
this.currentUserName = "";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ export class PoolCreateBasicDialogComponent extends DynamicForm<Pool, PoolCreate
public get virtualMachineConfiguration() {
return this._osControl.value && this._osControl.value.virtualMachineConfiguration;
}

public get cloudServiceConfiguration() {
return this._osControl.value && this._osControl.value.cloudServiceConfiguration;
}

public osSource: PoolOsSources = PoolOsSources.IaaS;
public osType: "linux" | "windows" = "linux";
public NodeFillType = NodeFillType;
Expand Down
Loading