diff --git a/app/app.module.ts b/app/app.module.ts index d5557d59bf..04cbd96092 100644 --- a/app/app.module.ts +++ b/app/app.module.ts @@ -28,6 +28,7 @@ import { TaskModule } from "app/components/task/task.module"; import { BatchLabsErrorHandler } from "app/error-handler"; // services +import { HttpModule } from "@angular/http"; import { PollService } from "app/services/core"; import { AccountService, @@ -45,6 +46,7 @@ import { FileSystemService, GithubDataService, HttpUploadService, + JobHookTaskService, JobService, LocalFileStorage, NodeService, @@ -86,6 +88,7 @@ const modules = [ FormsModule, MaterialModule, ReactiveFormsModule, + HttpModule, RouterModule.forRoot(routes, { useHash: true }), BaseModule, ...modules, @@ -107,6 +110,7 @@ const modules = [ FileSystemService, GithubDataService, HttpUploadService, + JobHookTaskService, JobService, LocalFileStorage, NodeService, diff --git a/app/components/base/focus-section/focus-section.module.ts b/app/components/base/focus-section/focus-section.module.ts index f90b557d74..61d3ac3a24 100644 --- a/app/components/base/focus-section/focus-section.module.ts +++ b/app/components/base/focus-section/focus-section.module.ts @@ -16,7 +16,7 @@ import { FocusSectionComponent } from "./focus-section.component"; BrowserModule, FormsModule, RouterModule, - MaterialModule.forRoot(), + MaterialModule, ], }) export class FocusSectionModule { diff --git a/app/components/base/form/form.module.ts b/app/components/base/form/form.module.ts index 021d461f8d..3fc13df601 100644 --- a/app/components/base/form/form.module.ts +++ b/app/components/base/form/form.module.ts @@ -43,7 +43,7 @@ const components = [ BrowserModule, ButtonsModule, FormsModule, - MaterialModule.forRoot(), + MaterialModule, ReactiveFormsModule, RouterModule, ...modules, diff --git a/app/components/base/quick-list/quick-list.module.ts b/app/components/base/quick-list/quick-list.module.ts index 29019cb3d7..19c5094092 100644 --- a/app/components/base/quick-list/quick-list.module.ts +++ b/app/components/base/quick-list/quick-list.module.ts @@ -26,7 +26,7 @@ import { QuickListComponent, QuickListItemStatusComponent } from "./quick-list.c BrowserModule, FormsModule, RouterModule, - MaterialModule.forRoot(), + MaterialModule, ContextMenuModule, ], }) diff --git a/app/components/base/sidebar/sidebar.ts b/app/components/base/sidebar/sidebar.ts index c708e25d61..9c96fe5106 100644 --- a/app/components/base/sidebar/sidebar.ts +++ b/app/components/base/sidebar/sidebar.ts @@ -24,7 +24,7 @@ import { SidebarPageComponent } from "./sidebar-page"; imports: [ BrowserModule, FormsModule, - MaterialModule.forRoot(), + MaterialModule, ], providers: [ SidebarManager, diff --git a/app/components/base/tabs/tab-group.component.ts b/app/components/base/tabs/tab-group.component.ts index 772cd57b79..89620322f5 100644 --- a/app/components/base/tabs/tab-group.component.ts +++ b/app/components/base/tabs/tab-group.component.ts @@ -1,5 +1,5 @@ import { - AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, Input, OnInit, QueryList, + AfterViewInit, ChangeDetectorRef, Component, ContentChildren, Input, OnInit, QueryList, } from "@angular/core"; import { ActivatedRoute, Router } from "@angular/router"; @@ -8,7 +8,6 @@ import { TabComponent } from "./tab.component"; @Component({ selector: "bl-tab-group", templateUrl: "tab-group.html", - changeDetection: ChangeDetectionStrategy.OnPush, }) export class TabGroupComponent implements AfterViewInit, OnInit { @Input() @@ -57,6 +56,10 @@ export class TabGroupComponent implements AfterViewInit, OnInit { }); } + public detectChanges() { + this.changeDetector.markForCheck(); + } + private _updateSelectedTab() { if (!this.tabs) { return; diff --git a/app/components/job/details/job-details.component.ts b/app/components/job/details/job-details.component.ts index ae8f933fd3..e391655f19 100644 --- a/app/components/job/details/job-details.component.ts +++ b/app/components/job/details/job-details.component.ts @@ -38,6 +38,8 @@ export class JobDetailsComponent implements OnInit, OnDestroy { public decorator: JobDecorator; public data: RxEntityProxy; + public hasHookTask = false; + private _paramsSubscriber: Subscription; constructor( @@ -51,6 +53,7 @@ export class JobDetailsComponent implements OnInit, OnDestroy { this.data = this.jobService.get(null, {}); this.data.item.subscribe((job) => { this.job = job; + this.hasHookTask = Boolean(job && job.jobPreparationTask); if (job) { this.decorator = new JobDecorator(job); } diff --git a/app/components/job/details/job-details.html b/app/components/job/details/job-details.html index 080934cba6..7b9ab124c3 100644 --- a/app/components/job/details/job-details.html +++ b/app/components/job/details/job-details.html @@ -40,6 +40,10 @@ Configuration + + Prep/Release tasks + + diff --git a/app/components/job/details/job-details.module.ts b/app/components/job/details/job-details.module.ts index 53e993e00e..f94d7f957d 100644 --- a/app/components/job/details/job-details.module.ts +++ b/app/components/job/details/job-details.module.ts @@ -5,6 +5,7 @@ import { BaseModule } from "app/components/base"; import { FileBrowseModule } from "app/components/file/browse"; import { FileDetailsModule } from "app/components/file/details"; import { TaskBrowseModule } from "app/components/task/browse"; +import { JobHookTaskModule } from "../job-hook-task"; import { JobErrorDisplayComponent } from "./error-display"; import { JobConfigurationComponent } from "./job-configuration.component"; import { JobDefaultComponent } from "./job-default.component"; @@ -20,7 +21,7 @@ const components = [ ]; const modules = [ - BaseModule, FileBrowseModule, FileDetailsModule, TaskBrowseModule, + BaseModule, FileBrowseModule, FileDetailsModule, TaskBrowseModule, JobHookTaskModule, ]; @NgModule({ diff --git a/app/components/job/job-hook-task/index.ts b/app/components/job/job-hook-task/index.ts new file mode 100644 index 0000000000..51df75ee09 --- /dev/null +++ b/app/components/job/job-hook-task/index.ts @@ -0,0 +1 @@ +export * from "./job-hook-task.module"; diff --git a/app/components/job/job-hook-task/job-hook-task-browser/index.ts b/app/components/job/job-hook-task/job-hook-task-browser/index.ts new file mode 100644 index 0000000000..d764f60008 --- /dev/null +++ b/app/components/job/job-hook-task/job-hook-task-browser/index.ts @@ -0,0 +1 @@ +export * from "./job-hook-task-browser.component"; diff --git a/app/components/job/job-hook-task/job-hook-task-browser/job-hook-task-browser.component.ts b/app/components/job/job-hook-task/job-hook-task-browser/job-hook-task-browser.component.ts new file mode 100644 index 0000000000..20d760d1d0 --- /dev/null +++ b/app/components/job/job-hook-task/job-hook-task-browser/job-hook-task-browser.component.ts @@ -0,0 +1,125 @@ +import { Component, Input, OnChanges, OnDestroy, SimpleChanges } from "@angular/core"; +import { FormControl } from "@angular/forms"; +import { List } from "immutable"; +import { Subscription } from "rxjs"; + +import { Job, JobHookTask, JobHookTaskResult, JobHookTaskState } from "app/models"; +import { JobHookTaskListParams, JobHookTaskService } from "app/services"; +import { RxListProxy } from "app/services/core"; +import { DateUtils } from "app/utils"; +import { FilterBuilder } from "app/utils/filter-builder"; + +import "./job-hook-task-browser.scss"; + +type HookTaskType = "preparationTask" | "releaseTask"; +const HookTaskType = { + preparationTask: "preparationTask" as HookTaskType, + releaseTask: "releaseTask" as HookTaskType, +}; + +@Component({ + selector: "bl-job-hook-task-browser", + templateUrl: "job-hook-task-browser.html", +}) +export class JobHookTaskBrowserComponent implements OnDestroy, OnChanges { + public HookTaskType = HookTaskType; + + public onlyFailedControl = new FormControl(false); + + @Input() + public job: Job; + + public data: RxListProxy; + + public tasks: List; + public displayItems: any[]; + public pickedTaskId: string; + public pickedTask: JobHookTask; + + public type: HookTaskType = "preparationTask"; + private _sub: Subscription; + + constructor(jobHookTaskService: JobHookTaskService) { + this.data = jobHookTaskService.list(); + this.data.items.subscribe((items) => { + this.tasks = items; + this._computeDisplayItems(); + }); + + this._sub = this.onlyFailedControl.valueChanges.subscribe((onlyFailed) => { + const filter = FilterBuilder.prop("jobPreparationTaskExecutionInfo/exitCode").ne(0).toOData(); + this.data.patchOptions({ + filter: filter, + }); + this.data.fetchNext(); + }); + } + + public ngOnChanges(changes: SimpleChanges) { + if (changes.job) { + const { previousValue, currentValue } = changes.job; + if (previousValue && currentValue && previousValue.id === currentValue.id) { + return; + } + this.data.params = { jobId: this.job.id }; + this.data.refresh(); + } + } + + public ngOnDestroy() { + this.data.dispose(); + this._sub.unsubscribe(); + } + + public formatDate(date: Date) { + return DateUtils.prettyDate(date, 7); + } + + public updateType(type) { + if (type === HookTaskType.releaseTask && !this.hasReleaseTask) { + return; + } + this.type = type; + this._computeDisplayItems(); + } + + public status(task: JobHookTask) { + const info = task[this.type]; + + if (!info) { + return "waiting"; + } + const { state, result } = info; + + if (state === JobHookTaskState.running) { + return "runnning"; + } else if (result === JobHookTaskResult.success) { + return "success"; + } else { + return "failure"; + } + } + + public pickTask(id: string) { + this.pickedTaskId = id; + this.pickedTask = this.tasks.filter(x => x.id === id).first(); + } + + public get hasReleaseTask() { + return Boolean(this.job.jobReleaseTask); + } + + private _computeDisplayItems() { + this.displayItems = this.tasks.map((task) => { + const info = task[this.type]; + return { + id: task.id, + nodeId: task.nodeId, + status: this.status(task), + startTime: this.formatDate(info && info.startTime), + endTime: this.formatDate(info && info.endTime), + exitCode: info && info.exitCode, + }; + }).toArray(); + } +} diff --git a/app/components/job/job-hook-task/job-hook-task-browser/job-hook-task-browser.html b/app/components/job/job-hook-task/job-hook-task-browser/job-hook-task-browser.html new file mode 100644 index 0000000000..65bae66381 --- /dev/null +++ b/app/components/job/job-hook-task/job-hook-task-browser/job-hook-task-browser.html @@ -0,0 +1,39 @@ +
+
+ Only failed +
+
+
+ Preparation Tasks +
+
+ Release tasks +
+
+
+
+ + + NodeId + Status + Started + Completed + Exit code + + + + {{task.nodeId}} + + + + + + {{task.startTime}} + {{task.endTime}} + {{task.exitCode}} + + +
+ +
+
diff --git a/app/components/job/job-hook-task/job-hook-task-browser/job-hook-task-browser.scss b/app/components/job/job-hook-task/job-hook-task-browser/job-hook-task-browser.scss new file mode 100644 index 0000000000..22a8ce7e6c --- /dev/null +++ b/app/components/job/job-hook-task/job-hook-task-browser/job-hook-task-browser.scss @@ -0,0 +1,37 @@ +@import "app/styles/variables"; + +bl-job-hook-task-browser { + .filters { + display: flex; + } + + .content { + display: flex; + border-top: 1px solid #d5d5d5; + + > .details { + padding-top: 10px; + border-left: 1px solid $border-color; + width: 600px; + } + } + + .type-toggle { + margin: 10px; + text-align: right; + cursor: pointer; + > .option { + display: inline-block; + } + + > .option.active { + text-decoration: underline; + cursor: default; + } + + > .option.disabled { + opacity: 0.5; + cursor: default; + } + } +} diff --git a/app/components/job/job-hook-task/job-hook-task-details/index.ts b/app/components/job/job-hook-task/job-hook-task-details/index.ts new file mode 100644 index 0000000000..0919a7edfc --- /dev/null +++ b/app/components/job/job-hook-task/job-hook-task-details/index.ts @@ -0,0 +1 @@ +export * from "./job-hook-task-details.component"; diff --git a/app/components/job/job-hook-task/job-hook-task-details/job-hook-task-details.component.ts b/app/components/job/job-hook-task/job-hook-task-details/job-hook-task-details.component.ts new file mode 100644 index 0000000000..3d2de3e517 --- /dev/null +++ b/app/components/job/job-hook-task/job-hook-task-details/job-hook-task-details.component.ts @@ -0,0 +1,21 @@ +import { Component, Input } from "@angular/core"; +import { JobHookTask } from "app/models"; + +import "./job-hook-task-details.scss"; + +@Component({ + selector: "bl-job-hook-task-details", + templateUrl: "job-hook-task-details.html", +}) +export class JobHookTaskDetailsComponent { + @Input() + public task: JobHookTask; + + @Input() + public type: string = "preparationTask"; + + public get currentFolder() { + const info = this.task[this.type]; + return info && info.taskRootDirectory; + } +} diff --git a/app/components/job/job-hook-task/job-hook-task-details/job-hook-task-details.html b/app/components/job/job-hook-task/job-hook-task-details/job-hook-task-details.html new file mode 100644 index 0000000000..13cad4c69f --- /dev/null +++ b/app/components/job/job-hook-task/job-hook-task-details/job-hook-task-details.html @@ -0,0 +1,9 @@ +
+ + + + + + + +
diff --git a/app/components/job/job-hook-task/job-hook-task-details/job-hook-task-details.scss b/app/components/job/job-hook-task/job-hook-task-details/job-hook-task-details.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/app/components/job/job-hook-task/job-hook-task.module.ts b/app/components/job/job-hook-task/job-hook-task.module.ts new file mode 100644 index 0000000000..d0f7dc2263 --- /dev/null +++ b/app/components/job/job-hook-task/job-hook-task.module.ts @@ -0,0 +1,26 @@ +import { NgModule } from "@angular/core"; + +import { commonModules } from "app/common"; +import { FileBrowseModule } from "app/components/file/browse"; +import { JobHookTaskBrowserComponent } from "./job-hook-task-browser"; +import { JobHookTaskDetailsComponent } from "./job-hook-task-details"; + +const components = [ + JobHookTaskBrowserComponent, + JobHookTaskDetailsComponent, +]; + +const modules = [ + FileBrowseModule, + ...commonModules, +]; + +@NgModule({ + declarations: components, + exports: [...modules, ...components], + imports: [...modules], + entryComponents: [ + ], +}) +export class JobHookTaskModule { +} diff --git a/app/components/job/job.module.ts b/app/components/job/job.module.ts index d8cfffa30d..aa96ba00e3 100644 --- a/app/components/job/job.module.ts +++ b/app/components/job/job.module.ts @@ -7,13 +7,14 @@ import { JobAdvancedFilterComponent } from "app/components/job/browse/filter/job import { JobListComponent } from "app/components/job/browse/job-list.component"; import { JobDetailsModule } from "app/components/job/details"; import { JobHomeComponent } from "app/components/job/home/job-home.component"; +import { JobHookTaskModule } from "./job-hook-task"; const components = [ JobAdvancedFilterComponent, JobHomeComponent, JobListComponent, JobStatsPreviewComponent, ]; const modules = [ - JobActionModule, JobDetailsModule, ...commonModules, + JobActionModule, JobDetailsModule, JobHookTaskModule, ...commonModules, ]; @NgModule({ diff --git a/app/core/record/helpers.ts b/app/core/record/helpers.ts index e9bb1fe9cf..7a885dae99 100644 --- a/app/core/record/helpers.ts +++ b/app/core/record/helpers.ts @@ -1,5 +1,6 @@ import { Type } from "@angular/core"; +import { exists } from "app/utils"; import { RecordSetAttributeError } from "./errors"; import { Record } from "./record"; @@ -36,7 +37,8 @@ export function updateTypeMetadata(ctr: Type, attr: string, type: TypeMetad export function setProp(ctr: Type, attr: string) { Object.defineProperty(ctr.prototype, attr, { get: function (this: Record) { - return (this as any)._map.get(attr) || (this as any)._defaultValues[attr]; + const value = (this as any)._map.get(attr); + return exists(value) ? value : (this as any)._defaultValues[attr]; }, set: function (this: Record, value: T) { if ((this as any)._initialized) { diff --git a/app/core/record/record.ts b/app/core/record/record.ts index 3f904179f4..970de05245 100644 --- a/app/core/record/record.ts +++ b/app/core/record/record.ts @@ -1,6 +1,6 @@ import { List, Map } from "immutable"; -import { nil } from "app/utils"; +import { exists, nil } from "app/utils"; import { metadataForRecord, primitives } from "./helpers"; /** @@ -31,7 +31,7 @@ export class Record { public merge(other: Partial): this { const ctr: any = this.constructor; - return new ctr({ ...this.toJS(), ...other as any}); + return new ctr({ ...this.toJS(), ...other as any }); } /** @@ -79,7 +79,7 @@ export class Record { } const value = (data as any)[key]; - if (value && typeMetadata && !primitives.has(typeMetadata.type.name)) { + if (exists(value) && typeMetadata && !primitives.has(typeMetadata.type.name)) { if (typeMetadata.list) { obj[key] = List(value && value.map(x => new typeMetadata.type(x))); } else { diff --git a/app/models/index.ts b/app/models/index.ts index b0fb5e5a67..ea119709cb 100644 --- a/app/models/index.ts +++ b/app/models/index.ts @@ -21,6 +21,8 @@ export * from "./job"; export * from "./job-action"; export * from "./job-constraints"; export * from "./job-execution-information"; +export * from "./job-hook-task-execution-info"; +export * from "./job-hook-task"; export * from "./job-manager-task"; export * from "./job-preparation-task"; export * from "./job-release-task"; diff --git a/app/models/job-hook-task-execution-info.ts b/app/models/job-hook-task-execution-info.ts new file mode 100644 index 0000000000..4900fa16e6 --- /dev/null +++ b/app/models/job-hook-task-execution-info.ts @@ -0,0 +1,41 @@ +import { Model, Prop, Record } from "app/core"; +import { FailureInfoAttributes } from "./failure-info"; + +export type JobHookTaskState = "running" | "completed"; +export const JobHookTaskState = { + running: "running" as JobHookTaskState, + completed: "completed" as JobHookTaskState, +}; + +export type JobHookTaskResult = "success" | "failure"; +export const JobHookTaskResult = { + success: "Success" as JobHookTaskResult, + failure: "Failure" as JobHookTaskResult, +}; + +export interface JobHookTaskExecutionInfoAttributes { + state: JobHookTaskState; + startTime: Date; + endTime: Date; + taskRootDirectory: string; + taskRootDirectoryUrl: string; + exitCode: number; + failureInfo: FailureInfoAttributes; + retryCount: number; + lastRetryTime: Date; + result: JobHookTaskResult; +} + +@Model() +export class JobHookTaskExecutionInfo extends Record { + @Prop() public state: JobHookTaskState; + @Prop() public startTime: Date; + @Prop() public endTime: Date; + @Prop() public taskRootDirectory: string; + @Prop() public taskRootDirectoryUrl: string; + @Prop() public exitCode: number; + @Prop() public failureInfo: FailureInfoAttributes; + @Prop() public retryCount: number; + @Prop() public lastRetryTime: Date; + @Prop() public result: JobHookTaskResult; +} diff --git a/app/models/job-hook-task.ts b/app/models/job-hook-task.ts new file mode 100644 index 0000000000..ec8e433112 --- /dev/null +++ b/app/models/job-hook-task.ts @@ -0,0 +1,32 @@ +import { Model, Prop, Record } from "app/core"; +import { JobHookTaskExecutionInfo } from "./job-hook-task-execution-info"; + +export interface JobHookTaskAttributes { + poolId: string; + nodeId: string; + nodeUrl: string; + jobPreparationTaskExecutionInfo: JobHookTaskExecutionInfo; + jobReleaseTaskExecutionInfo: JobHookTaskExecutionInfo; +} + +@Model() +export class JobHookTask extends Record { + @Prop() public poolId: string; + @Prop() public nodeId: string; + @Prop() public nodeUrl: string; + @Prop() public preparationTask: JobHookTaskExecutionInfo; + @Prop() public releaseTask: JobHookTaskExecutionInfo; + + /** + * Id is a computed attribute using the pool and the node id. It is not returned by the server + */ + @Prop() public id: string; + constructor(data: JobHookTaskAttributes) { + super({ + ...data, + id: `${data.poolId}/${data.nodeId}`, + preparationTask: data.jobPreparationTaskExecutionInfo, + releaseTask: data.jobReleaseTaskExecutionInfo, + }); + } +} diff --git a/app/services/index.ts b/app/services/index.ts index 02629425d3..e4232bd063 100644 --- a/app/services/index.ts +++ b/app/services/index.ts @@ -10,6 +10,7 @@ export * from "./fs.service"; export * from "./github-data.service"; export * from "./http-upload-service"; export * from "./job-service"; +export * from "./job-hook-task.service"; export * from "./local-file-storage.service"; export * from "./pool-service"; export * from "./node-service"; diff --git a/app/services/job-hook-task.service.ts b/app/services/job-hook-task.service.ts new file mode 100644 index 0000000000..87bc063aca --- /dev/null +++ b/app/services/job-hook-task.service.ts @@ -0,0 +1,30 @@ +import { Injectable } from "@angular/core"; + +import { JobHookTask } from "app/models"; +import { BatchClientService } from "./batch-client.service"; +import { RxBatchListProxy, RxListProxy, TargetedDataCache } from "./core"; +import { ServiceBase } from "./service-base"; + +export interface JobHookTaskListParams { + jobId?: string; +} + +@Injectable() +export class JobHookTaskService extends ServiceBase { + private _cache = new TargetedDataCache({ + key: ({ jobId }) => jobId, + }, "nodeUrl"); + + constructor(batchService: BatchClientService) { + super(batchService); + } + + public list(initialOptions: any = {}): RxListProxy { + return new RxBatchListProxy(JobHookTask, this.batchService, { + cache: ({ jobId }) => this._cache.getCache({ jobId }), + proxyConstructor: (client, params, options) => client.job.listHookTasks(params.jobId, options), + initialOptions, + initialParams: {jobId: null}, + }); + } +} diff --git a/package.json b/package.json index da7fb9b24c..3c1ad96328 100644 --- a/package.json +++ b/package.json @@ -158,7 +158,7 @@ "@angular/core": "4.1.2", "@angular/forms": "4.1.2", "@angular/http": "4.1.2", - "@angular/material": "2.0.0-beta.3", + "@angular/material": "~2.0.0-beta.7", "@angular/platform-browser": "4.1.2", "@angular/platform-browser-dynamic": "4.1.2", "@angular/router": "4.1.2", diff --git a/src/client/api/batch-client-proxy/jobProxy.ts b/src/client/api/batch-client-proxy/jobProxy.ts index 7fbf0bc0e4..5f7f43aa3f 100644 --- a/src/client/api/batch-client-proxy/jobProxy.ts +++ b/src/client/api/batch-client-proxy/jobProxy.ts @@ -82,4 +82,17 @@ export default class JobProxy { public patch(jobId: string, attributes: any, options?: any): Promise { return this.client.job.patch(jobId, attributes, wrapOptions(options)); } + + /** + */ + public listHookTasks(jobId: string, options?: models.JobListPreparationAndReleaseTaskStatusNextOptions) { + const entity = { + list: this.client.job.listPreparationAndReleaseTaskStatus.bind(this.client.job), + listNext: this.client.job.listPreparationAndReleaseTaskStatusNext.bind(this.client.job), + }; + + // returns all of the tasklets, there is no nextLink data + return new ListProxy(entity, [jobId], + wrapOptions({ jobListPreparationAndReleaseTaskStatusOptions: options })); + } } diff --git a/test/app/components/base/background-task/background-task-tracker.spec.ts b/test/app/components/base/background-task/background-task-tracker.spec.ts index 9af59722df..262c1832fb 100644 --- a/test/app/components/base/background-task/background-task-tracker.spec.ts +++ b/test/app/components/base/background-task/background-task-tracker.spec.ts @@ -13,7 +13,7 @@ describe("BackgroundTaskTrackerComponent", () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [MaterialModule.forRoot(), BackgroundTaskModule], + imports: [MaterialModule, BackgroundTaskModule], declarations: [ ], }); diff --git a/test/app/components/base/form/server-error/server-error.component.spec.ts b/test/app/components/base/form/server-error/server-error.component.spec.ts index 10c0623988..139b48f22d 100644 --- a/test/app/components/base/form/server-error/server-error.component.spec.ts +++ b/test/app/components/base/form/server-error/server-error.component.spec.ts @@ -30,7 +30,7 @@ describe("ServerErrorComponent", () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [MaterialModule.forRoot()], + imports: [MaterialModule], declarations: [ ServerErrorComponent, ServerErrorTestComponent, diff --git a/test/app/components/base/form/simple-form/simple-form.spec.ts b/test/app/components/base/form/simple-form/simple-form.spec.ts index 7c8cdb71e3..099d15d1b0 100644 --- a/test/app/components/base/form/simple-form/simple-form.spec.ts +++ b/test/app/components/base/form/simple-form/simple-form.spec.ts @@ -50,7 +50,7 @@ describe("SimpleFormComponent", () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [ReactiveFormsModule, MaterialModule.forRoot()], + imports: [ReactiveFormsModule, MaterialModule], declarations: [ SubmitButtonComponent, FormTestComponent, diff --git a/test/app/components/base/sidebar/sidebar-spec-helper.ts b/test/app/components/base/sidebar/sidebar-spec-helper.ts index 3a747fcc5c..991dc605a7 100644 --- a/test/app/components/base/sidebar/sidebar-spec-helper.ts +++ b/test/app/components/base/sidebar/sidebar-spec-helper.ts @@ -47,7 +47,7 @@ export class AppTestComponent implements AfterViewInit { export function setupSidebarTest() { TestBed.configureTestingModule({ declarations: [FakeComponent, AppTestComponent], - imports: [SidebarModule.forRoot(), MaterialModule.forRoot()], + imports: [SidebarModule.forRoot(), MaterialModule], }); TestBed.overrideModule(BrowserDynamicTestingModule, { diff --git a/test/app/components/base/tabs/tabs.spec.ts b/test/app/components/base/tabs/tabs.spec.ts index 15aff0ad2c..2f72a32297 100644 --- a/test/app/components/base/tabs/tabs.spec.ts +++ b/test/app/components/base/tabs/tabs.spec.ts @@ -41,7 +41,7 @@ describe("Tabs", () => { }; TestBed.configureTestingModule({ - imports: [MaterialModule.forRoot(), TabsModule, NoopAnimationsModule], + imports: [MaterialModule, TabsModule, NoopAnimationsModule], declarations: [TabTestComponent], providers: [ { provide: Router, useValue: routerSpy }, diff --git a/yarn.lock b/yarn.lock index c75fa5bd22..c0f0e39ecc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -54,9 +54,11 @@ version "4.1.2" resolved "https://registry.yarnpkg.com/@angular/http/-/http-4.1.2.tgz#fc378c3330c0410e1fb8aac2546329a6887776e4" -"@angular/material@2.0.0-beta.3": - version "2.0.0-beta.3" - resolved "https://registry.yarnpkg.com/@angular/material/-/material-2.0.0-beta.3.tgz#ec31dee61d7300ece28fee476852db236ded1e13" +"@angular/material@~2.0.0-beta.7": + version "2.0.0-beta.7" + resolved "https://registry.yarnpkg.com/@angular/material/-/material-2.0.0-beta.7.tgz#2584aaf1ffbe24779916345f1ac82921ccbc2577" + dependencies: + tslib "^1.7.1" "@angular/platform-browser-dynamic@4.1.2": version "4.1.2" @@ -6201,7 +6203,7 @@ tsickle@^0.21.0: source-map "^0.5.6" source-map-support "^0.4.2" -tslib@^1.6.0: +tslib@^1.6.0, tslib@^1.7.1: version "1.7.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.7.1.tgz#bc8004164691923a79fe8378bbeb3da2017538ec"