diff --git a/app/app.component.ts b/app/app.component.ts index 167dcc3a80..7e444996aa 100644 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -6,7 +6,6 @@ import { Observable } from "rxjs"; import { AccountService, AdalService, CommandService, NodeService, SSHKeyService, SettingsService, SubscriptionService, } from "app/services"; -import AccountCreateDialogComponent from "./components/account/add/account-create-dialog.component"; import { SidebarContentComponent, SidebarManager } from "./components/base/sidebar"; const adalConfig = { @@ -74,10 +73,6 @@ export class AppComponent implements AfterViewInit, OnInit { this.sidebar.open(); } - public addAccount() { - this.sidebarManager.open("add-account", AccountCreateDialogComponent); - } - public logout() { this.adalService.logout(); } diff --git a/app/app.layout.html b/app/app.layout.html index c64f30afa6..5fa1d9adb6 100644 --- a/app/app.layout.html +++ b/app/app.layout.html @@ -30,16 +30,9 @@ -
- diff --git a/app/app.module.ts b/app/app.module.ts index ed419fcd07..b4c1a2a87d 100644 --- a/app/app.module.ts +++ b/app/app.module.ts @@ -5,65 +5,28 @@ import { MaterialModule } from "@angular/material"; import { BrowserModule } from "@angular/platform-browser"; import { RouterModule } from "@angular/router"; +// application router import { routes } from "./app.routes"; // components -import { NodeConnectModule } from "app/components/node/connect"; -import { StartTaskModule } from "app/components/pool/start-task"; -import { AppComponent } from "./app.component"; -import { DeleteAccountDialogComponent } from "./components/account/action/delete-account-dialog.component"; -import AccountCreateDialogComponent from "./components/account/add/account-create-dialog.component"; -import { AccountBrowseModule } from "./components/account/browse"; -import { AccountDetailsHomeComponent } from "./components/account/details/account-details-home.component"; -import { AccountDetailsComponent } from "./components/account/details/account-details.component"; -import { AccountHomeComponent } from "./components/account/home/account-home.component"; -import { ApplicationModule } from "./components/application/application.module"; -import { BaseModule } from "./components/base"; -import { FileBrowseModule } from "./components/file/browse"; -import { FileDetailsModule } from "./components/file/details"; -import { FileHomeComponent } from "./components/file/home"; -import { JobStatsPreviewComponent } from "./components/job/base/job-stats-preview"; -import { JobAdvancedFilterComponent } from "./components/job/browse/filter/job-advanced-filter.component"; -import { JobListComponent } from "./components/job/browse/job-list.component"; -import { JobDetailsModule } from "./components/job/details"; -import { JobHomeComponent } from "./components/job/home/job-home.component"; -import { NodeBrowseModule } from "./components/node/browse"; -import { NoNodeSelectedComponent, NodeDetailsComponent, NodePropertiesComponent } from "./components/node/details"; -import { NodeHomeComponent } from "./components/node/home"; -import { PoolNodesPreviewComponent } from "./components/pool/base/pool-nodes-preview.component"; -import { PoolAdvancedFilterComponent } from "./components/pool/browse/filter"; -import { PoolListComponent } from "./components/pool/browse/pool-list.component"; -import { PoolDetailsModule } from "./components/pool/details"; -import { PoolGraphsModule } from "./components/pool/graphs"; -import { PoolHomeComponent } from "./components/pool/home/pool-home.component"; -import { MainNavigationComponent } from "./components/shared/main-navigation.component"; -import { TaskBrowseModule } from "./components/task/browse"; -import { TaskDetailsModule } from "./components/task/details"; -import { TaskHomeComponent } from "./components/task/home"; -import { AADUserDropdownComponent } from "./components/user"; +import { AppComponent } from "app/app.component"; +import { MainNavigationComponent } from "app/components/shared/main-navigation.component"; +import { AADUserDropdownComponent } from "app/components/user"; -// job actions -import { JobActionModule } from "./components/job/action"; +// extenal modules +import { AccountModule } from "app/components/account/account.module"; +import { ApplicationModule } from "app/components/application/application.module"; +import { BaseModule } from "app/components/base"; +import { FileModule } from "app/components/file/file.module"; +import { JobModule } from "app/components/job/job.module"; +import { NodeModule } from "app/components/node/node.module"; +import { PoolModule } from "app/components/pool/pool.module"; +import { TaskModule } from "app/components/task/task.module"; -// pool actions -import { - DeletePoolDialogComponent, - PoolCreateBasicDialogComponent, - PoolOsPickerComponent, - PoolResizeDialogComponent, -} from "./components/pool/action"; - -// task actions -import { - DeleteTaskDialogComponent, - RerunTaskFormComponent, - TaskCreateBasicDialogComponent, - TerminateTaskDialogComponent, -} from "./components/task/action"; -import { TaskBaseModule } from "./components/task/base"; +// unhandled application error handler +import { BatchLabsErrorHandler } from "app/error-handler"; // services -import { BatchLabsErrorHandler } from "app/error-handler"; import { AccountService, AdalService, @@ -89,13 +52,7 @@ import { } from "./services"; const modules = [ - AccountBrowseModule, - ApplicationModule, - PoolDetailsModule, PoolGraphsModule, StartTaskModule, - JobDetailsModule, JobActionModule, - TaskBaseModule, TaskDetailsModule, TaskBrowseModule, - NodeBrowseModule, NodeConnectModule, - FileBrowseModule, FileDetailsModule, + AccountModule, ApplicationModule, FileModule, JobModule, NodeModule, PoolModule, TaskModule, ]; @NgModule({ @@ -104,46 +61,11 @@ const modules = [ ], declarations: [ AADUserDropdownComponent, - AccountCreateDialogComponent, - AccountDetailsComponent, - AccountDetailsHomeComponent, - AccountHomeComponent, AppComponent, - DeleteAccountDialogComponent, - DeletePoolDialogComponent, - DeleteTaskDialogComponent, - FileHomeComponent, - JobAdvancedFilterComponent, - JobHomeComponent, - JobListComponent, - JobStatsPreviewComponent, MainNavigationComponent, - NodeDetailsComponent, - NodePropertiesComponent, - NodeHomeComponent, - NoNodeSelectedComponent, - PoolAdvancedFilterComponent, - PoolCreateBasicDialogComponent, - PoolHomeComponent, - PoolListComponent, - PoolNodesPreviewComponent, - PoolOsPickerComponent, - PoolResizeDialogComponent, - RerunTaskFormComponent, - TaskCreateBasicDialogComponent, - TaskHomeComponent, - TerminateTaskDialogComponent, ], entryComponents: [ - AccountCreateDialogComponent, - DeleteAccountDialogComponent, - DeletePoolDialogComponent, - DeleteTaskDialogComponent, - PoolCreateBasicDialogComponent, - PoolResizeDialogComponent, - RerunTaskFormComponent, - TaskCreateBasicDialogComponent, - TerminateTaskDialogComponent, + // imported in specific area modules ], imports: [ BrowserModule, @@ -161,6 +83,7 @@ const modules = [ ApplicationService, AzureHttpService, ArmHttpService, + BatchClientService, CommandService, ElectronRemote, ElectronShell, @@ -168,13 +91,12 @@ const modules = [ FileSystemService, HttpUploadService, JobService, - PoolService, - SubscriptionService, - SSHKeyService, NodeService, NodeUserService, - BatchClientService, + PoolService, SettingsService, + SSHKeyService, + SubscriptionService, TaskService, { provide: ErrorHandler, useClass: BatchLabsErrorHandler }, ...commands, diff --git a/app/app.routes.ts b/app/app.routes.ts index b5e436cae0..e8016eedc4 100644 --- a/app/app.routes.ts +++ b/app/app.routes.ts @@ -3,23 +3,20 @@ import { Routes } from "@angular/router"; import { Constants } from "app/utils"; // component imports for routing -import { AccountDetailsHomeComponent } from "./components/account/details/account-details-home.component"; -import { AccountDetailsComponent } from "./components/account/details/account-details.component"; +import { AccountDefaultComponent, AccountDetailsComponent } from "./components/account/details"; import { AccountHomeComponent } from "./components/account/home/account-home.component"; -import { ApplicationDefaultComponent } from "./components/application/details/application-default.component"; -import { ApplicationDetailsComponent } from "./components/application/details/application-details.component"; +import { ApplicationDefaultComponent, ApplicationDetailsComponent } from "./components/application/details"; import { ApplicationHomeComponent } from "./components/application/home/application-home.component"; import { FileDetailsComponent } from "./components/file/details/file-details.component"; import { FileHomeComponent } from "./components/file/home"; -import { JobDetailsHomeComponent } from "./components/job/details/job-details-home.component"; -import { JobDetailsComponent } from "./components/job/details/job-details.component"; +import { JobDefaultComponent, JobDetailsComponent } from "./components/job/details"; import { JobHomeComponent } from "./components/job/home/job-home.component"; -import { NoNodeSelectedComponent, NodeDetailsComponent } from "./components/node/details"; +import { NodeDefaultComponent, NodeDetailsComponent } from "./components/node/details"; import { NodeHomeComponent } from "./components/node/home"; import { PoolDetailsComponent } from "./components/pool/details"; -import { PoolDetailsHomeComponent } from "./components/pool/details"; +import { PoolDefaultComponent } from "./components/pool/details"; import { PoolHomeComponent } from "./components/pool/home/pool-home.component"; -import { NoTaskSelectedComponent, TaskDetailsComponent } from "./components/task/details"; +import { TaskDefaultComponent, TaskDetailsComponent } from "./components/task/details"; import { TaskHomeComponent } from "./components/task/home"; // set up the routing table @@ -29,7 +26,7 @@ export const routes: Routes = [ component: AccountHomeComponent, path: "accounts", children: [ - { path: "", component: AccountDetailsHomeComponent }, // accounts/ + { path: "", component: AccountDefaultComponent }, // accounts/ { path: ":id", component: AccountDetailsComponent }, // accounts/{account.id} ], }, @@ -37,7 +34,7 @@ export const routes: Routes = [ path: "jobs", component: JobHomeComponent, children: [ - { path: "", component: JobDetailsHomeComponent }, // jobs/ + { path: "", component: JobDefaultComponent }, // jobs/ { path: ":id", component: JobDetailsComponent }, // jobs/{job.id} ], }, @@ -45,7 +42,7 @@ export const routes: Routes = [ path: "pools", component: PoolHomeComponent, children: [ - { path: "", component: PoolDetailsHomeComponent }, // pools/ + { path: "", component: PoolDefaultComponent }, // pools/ { path: ":id", component: PoolDetailsComponent }, // pools/{pool.id} ], }, @@ -61,7 +58,7 @@ export const routes: Routes = [ path: "pools/:poolId/nodes", component: NodeHomeComponent, children: [ - { path: "", component: NoNodeSelectedComponent }, // pools/{pool.id}/nodes + { path: "", component: NodeDefaultComponent }, // pools/{pool.id}/nodes { path: ":id", component: NodeDetailsComponent }, // pools/{pool.id}/nodes/{node.id} ], }, @@ -69,7 +66,7 @@ export const routes: Routes = [ path: "jobs/:jobId/tasks", component: TaskHomeComponent, children: [ - { path: "", component: NoTaskSelectedComponent }, // jobs/{job.id}/tasks + { path: "", component: TaskDefaultComponent }, // jobs/{job.id}/tasks { path: ":id", component: TaskDetailsComponent }, // jobs/{job.id}/tasks/{task.id} ], }, diff --git a/app/assets/styles/base/forms.scss b/app/assets/styles/base/forms.scss index 9399b4763c..1447114d29 100644 --- a/app/assets/styles/base/forms.scss +++ b/app/assets/styles/base/forms.scss @@ -117,6 +117,10 @@ fieldset { width: 100%; margin: 10px 0; + &.element-spacer { + margin-bottom: 15px; + } + &.pad-top { margin-top: 20px; } @@ -159,7 +163,7 @@ fieldset { md-select { height: 2em; margin-top: 5px; - width: 33%; + width: 40%; } .input-summary { diff --git a/app/assets/styles/base/list.scss b/app/assets/styles/base/list.scss index b5b266c254..8ddbd6af10 100644 --- a/app/assets/styles/base/list.scss +++ b/app/assets/styles/base/list.scss @@ -169,5 +169,14 @@ bl-no-item { font-size: 5em; } } + + &.slim { + height: 30px; + font-size: 1.05em; + align-items: left; + justify-content: left; + color: $genericGray; + display: block; + } } } diff --git a/app/assets/styles/base/property-list.scss b/app/assets/styles/base/property-list.scss index 4fd8c08e2a..02890d3c72 100644 --- a/app/assets/styles/base/property-list.scss +++ b/app/assets/styles/base/property-list.scss @@ -8,11 +8,14 @@ $group-padding: 28px; $value-width: $property-width - $label-width - $label-value-margin - $clipboard-width; section { - width: $property-width; + // add an extra 10px to make room for the copy button + width: $property-width + 10px; + label, > table td.label { width: $label-width !important; min-width: $label-width; } + .value { width: $value-width; } @@ -162,7 +165,7 @@ bl-property-group { } > table { - $table-width: $property-width - $clipboard-width + 1; + $table-width: $property-width - $clipboard-width + 15; width: $table-width; max-width: $table-width; table-layout: fixed; @@ -192,18 +195,18 @@ bl-property-group { padding: 5px; padding-left: 20px; font-size: $value-font-size; - height: 23px; + height: 20px; } bl-tp-cell { cursor: pointer; font-size: $value-font-size; - height: 23px; + height: 20px; position: relative; padding: 0; .cell-value { - padding: 5px 8px; + padding: 4px 8px; text-overflow: ellipsis; overflow: hidden; } diff --git a/app/assets/styles/job/details.scss b/app/assets/styles/job/details.scss index a4539622d1..3ebd6cc37e 100644 --- a/app/assets/styles/job/details.scss +++ b/app/assets/styles/job/details.scss @@ -11,7 +11,6 @@ bl-job-details { bl-job-progress-status { display: block; - padding-top: 5px; .running-task-status { @@ -20,7 +19,7 @@ bl-job-progress-status { .running { width: 220px; - height: 180px; + height: 130px; } .queued, .completed { @@ -43,7 +42,7 @@ bl-job-progress-status { .toggle-job-pool-tasks { margin: 0 10px; display: flex; - font-size: 11px; + font-size: 12px; justify-content: space-between; > .option { @@ -51,9 +50,8 @@ bl-job-progress-status { &.active { color: map-get($md-prussian-blue, 600); - text-decoration: underline; + font-weight: bold; } } } - } diff --git a/app/assets/styles/pool/base.scss b/app/assets/styles/pool/base.scss index 56df45a28e..f48dbbb246 100644 --- a/app/assets/styles/pool/base.scss +++ b/app/assets/styles/pool/base.scss @@ -1,4 +1,10 @@ bl-pool-nodes-preview { + > div.large { + span { + font-size: 1.5em; + } + } + .resize-error { color: $red; font-weight: bold; diff --git a/app/assets/styles/pool/create.scss b/app/assets/styles/pool/create.scss index 00f7cbadd6..18af359d74 100644 --- a/app/assets/styles/pool/create.scss +++ b/app/assets/styles/pool/create.scss @@ -3,8 +3,13 @@ bl-pool-os-picker { margin: 0; } + .serviceReference { + display: flex; + } + .imageReference { display: flex; + > .form-element { width: 30%; margin-right: 10px; diff --git a/app/assets/styles/vendor/material-theme.scss b/app/assets/styles/vendor/material-theme.scss index 1abec4c66b..9133d5198e 100644 --- a/app/assets/styles/vendor/material-theme.scss +++ b/app/assets/styles/vendor/material-theme.scss @@ -176,3 +176,7 @@ md-input-container.bl-textarea { padding: 5px; } } + +.mat-select-placeholder { + margin-top: 6px; +} diff --git a/app/components/account/account.module.ts b/app/components/account/account.module.ts new file mode 100644 index 0000000000..f9800fcc4c --- /dev/null +++ b/app/components/account/account.module.ts @@ -0,0 +1,29 @@ +import { NgModule } from "@angular/core"; + +import { commonModules } from "app/common"; +import { AccountCreateDialogComponent } from "app/components/account/action/add/account-create-dialog.component"; +import { DeleteAccountDialogComponent } from "app/components/account/action/delete/delete-account-dialog.component"; +import { AccountBrowseModule } from "app/components/account/browse"; +import { AccountDefaultComponent, AccountDetailsComponent } from "app/components/account/details"; +import { AccountHomeComponent } from "app/components/account/home"; + +const components = [ + AccountCreateDialogComponent, AccountDefaultComponent, AccountDetailsComponent, + AccountHomeComponent, DeleteAccountDialogComponent, +]; + +const modules = [ + AccountBrowseModule, ...commonModules, +]; + +@NgModule({ + declarations: components, + exports: [...modules, ...components], + imports: [...modules], + entryComponents: [ + AccountCreateDialogComponent, + DeleteAccountDialogComponent, + ], +}) +export class AccountModule { +} diff --git a/app/components/account/add/account-create-dialog.component.ts b/app/components/account/action/add/account-create-dialog.component.ts similarity index 51% rename from app/components/account/add/account-create-dialog.component.ts rename to app/components/account/action/add/account-create-dialog.component.ts index 64f7166662..1184ddef83 100644 --- a/app/components/account/add/account-create-dialog.component.ts +++ b/app/components/account/action/add/account-create-dialog.component.ts @@ -2,14 +2,14 @@ import { Component } from "@angular/core"; import { FormBuilder } from "@angular/forms"; import { Router } from "@angular/router"; +import { SidebarRef } from "app/components/base/sidebar"; import { AccountService } from "app/services"; -import { SidebarRef } from "../../base/sidebar"; @Component({ selector: "bl-account-create-dialog", templateUrl: "account-create-dialog.html", }) -export default class AccountCreateDialogComponent { +export class AccountCreateDialogComponent { public isSaving: boolean = false; constructor( @@ -21,16 +21,5 @@ export default class AccountCreateDialogComponent { public onSubmit() { alert("Not supported yet!"); - // this.isSaving = true; - // const account = Object.assign({}, this.account); - // this.accountService.add(account).subscribe( - // (val) => { this.resetForm(); }, - // (error) => { log.error("storeAccount() :: error: ", error); }, - // () => { - // this.isSaving = false; - // this.sidebarRef.destroy(); - // this.router.navigate(["/accounts", account.id]); - // }, - // ); } } diff --git a/app/components/account/add/account-create-dialog.html b/app/components/account/action/add/account-create-dialog.html similarity index 100% rename from app/components/account/add/account-create-dialog.html rename to app/components/account/action/add/account-create-dialog.html diff --git a/app/components/account/action/delete-account-dialog.component.ts b/app/components/account/action/delete/delete-account-dialog.component.ts similarity index 67% rename from app/components/account/action/delete-account-dialog.component.ts rename to app/components/account/action/delete/delete-account-dialog.component.ts index 6e1975ef29..91a0d69d99 100644 --- a/app/components/account/action/delete-account-dialog.component.ts +++ b/app/components/account/action/delete/delete-account-dialog.component.ts @@ -18,9 +18,5 @@ export class DeleteAccountDialogComponent { public destroyAccount() { alert("Not supported yet!"); - // this.accountService.delete(this.accountId).subscribe({ - // error: (error) => { log.error("destroyAccount() :: error: ", error); }, - // complete: () => this.dialogRef.close(), // todo: clear current selection, show notification - // }); } } diff --git a/app/components/account/action/delete-account-dialog.html b/app/components/account/action/delete/delete-account-dialog.html similarity index 100% rename from app/components/account/action/delete-account-dialog.html rename to app/components/account/action/delete/delete-account-dialog.html diff --git a/app/components/account/details/account-details-home.component.ts b/app/components/account/details/account-default.component.ts similarity index 89% rename from app/components/account/details/account-details-home.component.ts rename to app/components/account/details/account-default.component.ts index 94c1d1d0f3..17c54cd968 100644 --- a/app/components/account/details/account-details-home.component.ts +++ b/app/components/account/details/account-default.component.ts @@ -10,7 +10,7 @@ import { Component } from "@angular/core"; `, }) -export class AccountDetailsHomeComponent { +export class AccountDefaultComponent { public static breadcrumb() { return { name: "Accounts" }; } diff --git a/app/components/account/details/account-details.component.ts b/app/components/account/details/account-details.component.ts index 73acf0c7b0..324e1d6521 100644 --- a/app/components/account/details/account-details.component.ts +++ b/app/components/account/details/account-details.component.ts @@ -1,11 +1,9 @@ import { Component, NgZone, OnDestroy, OnInit, ViewContainerRef } from "@angular/core"; -import { MdDialog, MdDialogConfig } from "@angular/material"; import { ActivatedRoute, Router } from "@angular/router"; import { Subscription } from "rxjs/Subscription"; import { AccountResource } from "app/models"; import { AccountService } from "app/services"; -import { DeleteAccountDialogComponent } from "../action/delete-account-dialog.component"; @Component({ selector: "bl-account-details", @@ -29,7 +27,6 @@ export class AccountDetailsComponent implements OnInit, OnDestroy { private _paramsSubscriber: Subscription; constructor( - private dialog: MdDialog, private router: Router, private activatedRoute: ActivatedRoute, private accountService: AccountService, @@ -59,21 +56,6 @@ export class AccountDetailsComponent implements OnInit, OnDestroy { this._paramsSubscriber.unsubscribe(); } - public deleteAccount() { - if (!this.account) { - return; - } - let config = new MdDialogConfig(); - config.viewContainerRef = this.viewContainerRef; - - const dialogRef = this.dialog.open(DeleteAccountDialogComponent, config); - dialogRef.componentInstance.accountId = this.accountId; - dialogRef.componentInstance.accountName = this.account.name; - dialogRef.afterClosed().subscribe(() => { - this.router.navigate(["/accounts"]); - }); - } - public selectAccount(accountId: string): void { this.accountService.selectAccount(accountId); } diff --git a/app/components/account/details/account-details.html b/app/components/account/details/account-details.html index f126c113c4..4d1961ac77 100644 --- a/app/components/account/details/account-details.html +++ b/app/components/account/details/account-details.html @@ -10,7 +10,6 @@ -