Services
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
<h3>{{'apps' | i18n}}</h3>
|
||||
|
||||
<mat-card *ngFor="let app of apps">
|
||||
<mat-card-header>
|
||||
<mat-icon>{{'apps.' + app.name + '.icon' | i18n}}</mat-icon>
|
||||
<mat-card-title>{{'apps.' + app.name + '.title' | i18n}}</mat-card-title>
|
||||
<mat-card-subtitle>{{'apps.' + app.name + '.subtitle' | i18n}}</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<p>
|
||||
{{ 'apps.' + app.name + '.text' | i18n}}
|
||||
</p>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<a href="{{app.url}}" target="_blank" mat-raised-button color="primary">{{'apps.goto' | i18n}}</a>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
@@ -1,21 +0,0 @@
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { AppService } from './../../services/app.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-apps',
|
||||
templateUrl: './apps.component.html',
|
||||
styleUrls: ['./apps.component.scss']
|
||||
})
|
||||
export class AppsComponent implements OnInit {
|
||||
|
||||
apps = [];
|
||||
|
||||
constructor(private appService: AppService) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.appService.apps().subscribe((data: any) => {
|
||||
this.apps = data;
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,7 +15,7 @@ export class LoginComponent implements OnInit {
|
||||
form: FormGroup;
|
||||
public loginInvalid: boolean;
|
||||
public apiUrl = environment.apiUrl;
|
||||
targetRoute = '/apps';
|
||||
targetRoute = '/services';
|
||||
loginModel = {};
|
||||
|
||||
constructor(private formBuilder: FormBuilder, private authService: AuthService, private router: Router, private route: ActivatedRoute) { }
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<h3>{{'services' | i18n}}</h3>
|
||||
|
||||
<mat-card *ngFor="let service of services">
|
||||
<mat-card-header>
|
||||
<mat-icon>{{'services.' + service.name + '.icon' | i18n}}</mat-icon>
|
||||
<mat-card-title>{{'services.' + service.name + '.title' | i18n}}</mat-card-title>
|
||||
<mat-card-subtitle>{{'services.' + service.name + '.subtitle' | i18n}}</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<p>
|
||||
{{ 'services.' + service.name + '.text' | i18n}}
|
||||
</p>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<a href="{{service.url}}" target="_blank" mat-raised-button color="primary">{{'services.goto' | i18n}}</a>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
+6
-6
@@ -1,20 +1,20 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AppsComponent } from './apps.component';
|
||||
import { ServicesComponent } from './services.component';
|
||||
|
||||
describe('AppsComponent', () => {
|
||||
let component: AppsComponent;
|
||||
let fixture: ComponentFixture<AppsComponent>;
|
||||
describe('ServicesComponent', () => {
|
||||
let component: ServicesComponent;
|
||||
let fixture: ComponentFixture<ServicesComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ AppsComponent ]
|
||||
declarations: [ ServicesComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AppsComponent);
|
||||
fixture = TestBed.createComponent(ServicesComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { ServiceService } from '../../services/service.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-services',
|
||||
templateUrl: './services.component.html',
|
||||
styleUrls: ['./services.component.scss']
|
||||
})
|
||||
export class ServicesComponent implements OnInit {
|
||||
|
||||
services = [];
|
||||
|
||||
constructor(private serviceService: ServiceService) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.serviceService.services().subscribe((data: any) => {
|
||||
this.services = data;
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user