mirror of
https://github.com/dkmstr/openuds-gui.git
synced 2025-01-18 10:03:33 +03:00
added launcher
This commit is contained in:
parent
00ebedf61f
commit
f1598bcb18
@ -34,6 +34,7 @@ import { ModalComponent } from './gui/modal/modal.component';
|
||||
import { SafeHtmlPipe } from './gui/safe-html.pipe';
|
||||
import { AboutComponent } from './pages/about/about.component';
|
||||
import { DownloadsComponent } from './pages/downloads/downloads.component';
|
||||
import { LauncherComponent } from './pages/launcher/launcher.component';
|
||||
|
||||
|
||||
@NgModule({
|
||||
@ -52,6 +53,7 @@ import { DownloadsComponent } from './pages/downloads/downloads.component';
|
||||
ErrorComponent,
|
||||
AboutComponent,
|
||||
DownloadsComponent,
|
||||
LauncherComponent,
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
|
@ -11,7 +11,7 @@
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
justify-content: start;
|
||||
justify-content: flex-start;
|
||||
flex-flow: column wrap;
|
||||
position: relative;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
.services-group {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
justify-content: start;
|
||||
justify-content: flex-start;
|
||||
/* margin: 0 10%; */
|
||||
}
|
||||
.services-group-title {
|
||||
|
@ -8,6 +8,7 @@ import { DownloadsComponent } from '../pages/downloads/downloads.component';
|
||||
import { ServicesComponent } from '../pages/services/services.component';
|
||||
import { ErrorComponent } from '../pages/error/error.component';
|
||||
import { AboutComponent } from '../pages/about/about.component';
|
||||
import { LauncherComponent } from '../pages/launcher/launcher.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', redirectTo: 'services', pathMatch: 'full' },
|
||||
@ -22,6 +23,9 @@ const routes: Routes = [
|
||||
{ path: 'error/:id', component: ErrorComponent },
|
||||
{ path: 'about', component: AboutComponent },
|
||||
|
||||
// TODO: Fix this launcher part
|
||||
{ path: 'ticket/launcher', component: LauncherComponent},
|
||||
|
||||
// Placeholder, maybe we change it to "page not found"
|
||||
{ path: '**', redirectTo: 'services' },
|
||||
];
|
||||
|
0
src/app/pages/launcher/launcher.component.css
Normal file
0
src/app/pages/launcher/launcher.component.css
Normal file
10
src/app/pages/launcher/launcher.component.html
Normal file
10
src/app/pages/launcher/launcher.component.html
Normal file
@ -0,0 +1,10 @@
|
||||
<div>
|
||||
<h1> <uds-translate>UDS Service launcher</uds-translate></h1>
|
||||
<br />
|
||||
<p><uds-translate>The service you have requested is being launched.</uds-translate></p>
|
||||
<h5><uds-translate>Please, note that reloading this page will not work.</uds-translate></h5>
|
||||
<h5><uds-translate>To relaunch service, you will have to do it from origin.</uds-translate></h5>
|
||||
<br />
|
||||
<h6><uds-translate>If the service does not launchs automatically, probably you dont have the UDS plugin installed</uds-translate></h6>
|
||||
<h6><uds-translate>You can obtain it from the</uds-translate> <a routerLink="/client-download"><uds-translate>UDS Plugin download page</uds-translate></a></h6>
|
||||
</div>
|
19
src/app/pages/launcher/launcher.component.ts
Normal file
19
src/app/pages/launcher/launcher.component.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { UDSApiService } from '../../uds-api.service';
|
||||
|
||||
@Component({
|
||||
selector: 'uds-launcher',
|
||||
templateUrl: './launcher.component.html',
|
||||
styleUrls: ['./launcher.component.css']
|
||||
})
|
||||
export class LauncherComponent implements OnInit {
|
||||
|
||||
constructor(public api: UDSApiService) { }
|
||||
|
||||
ngOnInit() {
|
||||
if (this.api.config.urls.launch !== '') {
|
||||
this.api.launchURL(this.api.config.urls.launch);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -3,41 +3,3 @@
|
||||
<uds-services-group *ngFor="let g of group; let i = index" [services]="g.services" [group]="g.group" [expanded]="i==0"></uds-services-group>
|
||||
</mat-accordion>
|
||||
</div>
|
||||
|
||||
<!-- TO BE REMOVED
|
||||
<div class="container">
|
||||
|
||||
<ngb-tabset justify="fill">
|
||||
<ngb-tab *ngFor="let g of group">
|
||||
<ng-template ngbTabTitle>
|
||||
<div class="group-title"><img class="img-rounded group-img title" [src]="groupImage(g.group)"> {{ g.group.name }}</div>
|
||||
</ng-template>
|
||||
<ng-template ngbTabContent>
|
||||
<div class="service-container" *ngFor="let s of g.services">
|
||||
|
||||
<div class="service">
|
||||
<div class="service-image">
|
||||
<img class="se-agranda" [src]="serviceImage(s)">
|
||||
</div>
|
||||
<span>{{ s.name }}</span>
|
||||
|
||||
<span class="gear">
|
||||
|
||||
|
||||
<span data-href="/release/Fc99ab60a-abca-5f2a-a277-93f782654231" class="release fa fa-trash"> </span>
|
||||
|
||||
|
||||
<span data-href="/reset/Fc99ab60a-abca-5f2a-a277-93f782654231" class="reseter fa fa-refresh"> </span>
|
||||
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ng-template>
|
||||
</ngb-tab>
|
||||
</ngb-tabset>
|
||||
|
||||
</div>
|
||||
-->
|
||||
|
@ -83,7 +83,11 @@ export class ServicesComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.loadServices(); // Loads service related data
|
||||
if (this.api.config.urls.launch) {
|
||||
this.api.logout();
|
||||
} else {
|
||||
this.loadServices(); // Loads service related data
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -26,6 +26,8 @@ export interface UDSUrls {
|
||||
readonly action: string;
|
||||
readonly galleryImage: string;
|
||||
readonly transportIcon: string;
|
||||
|
||||
readonly launch: string;
|
||||
}
|
||||
|
||||
export interface UDSMessages {
|
||||
|
Loading…
x
Reference in New Issue
Block a user