Add CSV download button FE

pull/32/head
HardiReady 2018-04-02 11:20:04 +02:00
parent a24f3bf4b1
commit 3745241d75
3 changed files with 44 additions and 24 deletions

View File

@ -18,7 +18,6 @@ So if your server is reachable at `https://cc.myserver.lan` the API endpoint is
https://cc.myserver.lan/api/ https://cc.myserver.lan/api/
``` ```
## Authentication ## Authentication
Requests to most of the API endpoints have to be authenticated using an API token which is received after successfully providing your application credentials to the API. Requests to most of the API endpoints have to be authenticated using an API token which is received after successfully providing your application credentials to the API.

View File

@ -10,6 +10,16 @@
margin-bottom: 10px; margin-bottom: 10px;
} }
form.tab-control {
padding: 10px;
}
span.tab-control {
margin: 4px 67px;
padding: 4px 16px;
}
.war-header { .war-header {
border-bottom: thin solid lightgrey; border-bottom: thin solid lightgrey;
} }
@ -34,6 +44,10 @@
color: #f5f5f5; color: #f5f5f5;
} }
.nav-tabs > li:last-child {
margin-left: 70px;
}
.nav-link { .nav-link {
cursor: pointer !important; cursor: pointer !important;
color: #FFF !important; color: #FFF !important;

View File

@ -24,9 +24,25 @@
</div> </div>
<div class="pull-left " style="padding-left: 100px; padding-top:15px"> <div class="pull-left " style="padding-left: 100px; padding-top:15px">
<a class="btn btn-default" style="margin: 20px" target="_blank" href="resource/logs/{{war._id}}/clean.log">Logfile <a class="btn btn-default" style="margin: 20px" target="_blank" href="resource/logs/{{war._id}}/clean.log">
anzeigen</a> Logfile anzeigen
<form class="form-group" *ngIf="tab === 0"> </a>
</div>
</div>
<ul class="nav nav-tabs">
<li class="nav-item" [ngClass]="{active :tab === 0}" (click)="switchTab(0)">
<a class="nav-link"><img src="../../../assets/scoreboard-btn.png"> Scoreboard</a>
</li>
<li class="nav-item" [ngClass]="{active :tab === 1}" (click)="switchTab(1)">
<a class="nav-link"><img src="../../../assets/fraction-btn.png"> Fraktionen</a>
</li>
<li class="nav-item" [ngClass]="{active :tab === 2, deactivated :tab !== 2} ">
<a class="nav-link"><img src="../../../assets/player-stats-btn.png"> Player</a>
</li>
<li>
<div *ngIf="tab === 0">
<form class="pull-left tab-control">
<label class="radio-inline"> <label class="radio-inline">
<input type="radio" name="fractSelect" <input type="radio" name="fractSelect"
[checked]="(fractionFilterSelected == undefined) ? 'true' : 'false'" [checked]="(fractionFilterSelected == undefined) ? 'true' : 'false'"
@ -45,20 +61,11 @@
#fractRadioOpfor #fractRadioOpfor
(change)="filterPlayersByFraction(fractRadioOpfor.value)">{{fraction.OPFOR}} (change)="filterPlayersByFraction(fractRadioOpfor.value)">{{fraction.OPFOR}}
</label> </label>
<br>
</form> </form>
<span class="btn btn-default pull-left tab-control">
Download CSV
</span>
</div> </div>
</div>
<ul class="nav nav-tabs">
<li class="nav-item" [ngClass]="{active :tab === 0}" (click)="switchTab(0)">
<a class="nav-link"><img src="../../../assets/scoreboard-btn.png"> Scoreboard</a>
</li>
<li class="nav-item" [ngClass]="{active :tab === 1}" (click)="switchTab(1)">
<a class="nav-link"><img src="../../../assets/fraction-btn.png"> Fraktionen</a>
</li>
<li class="nav-item" [ngClass]="{active :tab === 2, deactivated :tab !== 2} ">
<a class="nav-link"><img src="../../../assets/player-stats-btn.png"> Player</a>
</li> </li>
</ul> </ul>