This repository has been archived by the owner on May 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/CarnegieLearningWeb/educa…
- Loading branch information
Showing
24 changed files
with
337 additions
and
18 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...atures/dashboard/home/components/modal/import-experiment/import-experiment.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<div class="import-experiment-container"> | ||
<span class="ft-24-700 title">{{ 'home.experiment.import-experiment.text' | translate | titlecase }}</span> | ||
|
||
<div class="import-experiment-body"> | ||
<p class="ft-16-400"> | ||
{{ 'home.import-experiment.message.text' | translate }} | ||
</p> | ||
<input | ||
accept=".json" | ||
type="file" | ||
class="ft-14-400 file-input" | ||
(change)="uploadFile($event)" | ||
/> | ||
<span class="error-msg" *ngIf="!isExperimentJSONValid"> | ||
{{ 'home.import-experiment.error.message.text' | translate }} | ||
</span> | ||
</div> | ||
|
||
<div class="button-container"> | ||
<button class="modal-btn" mat-raised-button (click)="onCancelClick()"> | ||
{{ 'global.cancel.text' | translate }} | ||
</button> | ||
<button | ||
mat-raised-button | ||
class="modal-btn default-button" | ||
[ngClass]="{ 'default-button--disabled': !experimentInfo }" | ||
[disabled]="!experimentInfo" | ||
(click)="importExperiment()" | ||
> | ||
{{ 'global.import.text' | translate }} | ||
</button> | ||
</div> | ||
</div> |
33 changes: 33 additions & 0 deletions
33
...atures/dashboard/home/components/modal/import-experiment/import-experiment.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
.import-experiment-container { | ||
.title { | ||
display: block; | ||
padding: 30px 40px 0; | ||
height: 88px; | ||
} | ||
|
||
.import-experiment-body { | ||
margin: 20px 0; | ||
padding: 0 40px; | ||
|
||
.file-input { | ||
&:hover { | ||
cursor: pointer; | ||
} | ||
} | ||
|
||
.error-msg { | ||
display: block; | ||
padding-top: 10px; | ||
} | ||
|
||
.error-msg { | ||
color: var(--red); | ||
} | ||
} | ||
|
||
.button-container { | ||
display: flex; | ||
justify-content: flex-end; | ||
padding: 0 40px 40px; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...res/dashboard/home/components/modal/import-experiment/import-experiment.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ImportExperimentComponent } from './import-experiment.component'; | ||
import { TestingModule } from '../../../../../../../testing/testing.module'; | ||
import { ExperimentService } from '../../../../../../core/experiments/experiments.service'; | ||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; | ||
|
||
describe('ImportExperimentComponent', () => { | ||
let component: ImportExperimentComponent; | ||
let fixture: ComponentFixture<ImportExperimentComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ ImportExperimentComponent ], | ||
imports: [TestingModule], | ||
providers: [ | ||
ExperimentService, | ||
{ provide: MatDialogRef, useValue: {} }, | ||
{ provide: MAT_DIALOG_DATA, useValue: [] }, | ||
] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ImportExperimentComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.