Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Commit

Permalink
add kiosk mode for main dashboard (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
abenaguev authored and satterly committed Nov 7, 2018
1 parent 40a2239 commit e456426
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<body ng-controller="MenuController">

<nav class="navbar navbar-default" role="navigation">
<nav class="navbar navbar-default" role="navigation" ng-hide="isKiosk">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
Expand Down
4 changes: 4 additions & 0 deletions app/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ angular.module('alerta')
return viewLocation === $location.path();
};

$scope.isKiosk = window.location.search.indexOf('kiosk') > 0;

$scope.isSearchable = function() {
var searchableViews = [
'/alerts',
Expand Down Expand Up @@ -137,6 +139,8 @@ angular.module('alerta')
return $auth.isAuthenticated();
};

$scope.isKiosk = window.location.search.indexOf('kiosk') > 0;

var colorDefaults = {
severity: {
security: 'blue',
Expand Down
8 changes: 4 additions & 4 deletions app/partials/alert-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div class="container-fluid">

<div class="row">
<div class="row" ng-hide="isKiosk">
<div class="col-md-3 col-sm-3 col-xs-12">
<select class="form-control input-sm" ng-model="option" ng-change="setService(option)"
ng-options="s as s.service group by s.environment for s in services | orderBy:['environment','service']">
Expand All @@ -20,7 +20,7 @@
</div>
</div> <!-- row -->

<div class="row">
<div class="row" ng-hide="isKiosk">
<div class="col-md-12">
<ul class="nav nav-tabs">
<li ng-class="{active: !environment}"><a data-toggle="tab" ng-click="setEnv(null)">ALL&nbsp;<span class="badge">{{ total || 0 }}</span></a></li>
Expand All @@ -34,7 +34,7 @@
<div class="row">
<div class="col-md-12">
<table class="table">
<tr>
<tr ng-hide="isKiosk">
<th ng-repeat="col in columns">
<a href="" ng-click="toggleSort(col)">
<span ng-show="col == 'duplicateCount'">Dupl. </span>
Expand Down Expand Up @@ -94,7 +94,7 @@
</div>
</div> <!-- row -->

<div class="row" ng-show="alerts">
<div class="row" ng-show="!isKiosk && alerts">
<div class="col-md-12">
<button type="button" class="btn btn-default full-width" ng-click="alertLimit = alertLimit + 20">{{(alerts|filter:search).length | showing:alertLimit }}</button>
</div>
Expand Down

0 comments on commit e456426

Please sign in to comment.