summaryrefslogtreecommitdiff
path: root/www/templates/montage.html
blob: 328b36c74bb42d81f6af220e36ddf382062d5066 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<ion-view title="Montage View" class="bar-stable" cache-view="false" hide-nav-bar="{{minimal}}">
    <ion-nav-buttons side="left">
        <button class="button button-icon button-clear ion-navicon" ng-click="openMenu()"></button>
    </ion-nav-buttons>

    <ion-nav-buttons side="right">
        <button class="button button-icon button-clear ion-android-contract" ng-click="switchMinimal()"></button>
    </ion-nav-buttons>

    <ion-content padding="true">

        <ion-refresher pulling-text="Pull to reload Monitors..." spinner="bubbles" on-refresh="doRefresh()"></ion-refresher>
        <!-- Hi:ROOT: {{montageSize}} LOCAL {{slider.monsize}} -->

        <span ng-if="!minimal">
        <div class=" range range-positive">
            <i class="icon ion-arrow-shrink"></i>

            <input type="range" ng-model="slider.monsize" min="1" max="6">
            <i class="icon ion-arrow-expand"></i>

        </div>
        </span>
        <!-- Hi:{{slider.monsize}} {{devWidth}} -->

        <div class="wrapper">


            <span ng-repeat="monitor in monitors| limitTo: monLimit">
              <span ng-if="!minimal">
                   <header class="header">&nbsp;<i class="ion-monitor"></i> {{monitor.Monitor.Name}}&nbsp;</header>
                </span>
            <article class="main">
                <!-- does not route via APIs. As of today, there is no way to do this via apis.
                 FIXME: I should probably not pass username and password here - instead go the http interceptor
                 and auth token mode -->
                <div ng-if="!isSimulated()">

                    <!-- FIXME: Scale is hard coded to 50 for montage to save resources. Better way? -->
                    <img ng-src="{{LoginData.streamingurl}}/cgi-bin/zms?mode=single&monitor={{monitor.Monitor.Id}}&maxfps={{LoginData.maxFPS}}&scale=50&user={{LoginData.username}}&pass={{LoginData.password}}&rand={{randomval}}" width="{{((devWidth-30)/(7-slider.monsize))}}px;" ng-click="openModal(monitor.Monitor.Id, monitor.Monitor.Controllable)" />

                </div>

                <div ng-if="isSimulated()">

                    <img ng-src="img/demo.gif?rand={{rand}}" width="{{((devWidth-30)/(7-slider.monsize))}}px;" ng-click="openModal(monitor.Monitor.Id)">

                </div>
            </article>

            <span ng-if="!minimal">
               <span style="font-size:10px;">
               <footer class="footer">
                  
                   {{monitor.Monitor.Enabled=="1"?"Enabled":"Not Enabled"}}
                   &nbsp;
                   <span style="float:right">
                       <i class="icon ion-android-alert"></i>
                       
                       :{{monitor.Monitor.Function}}
                    </span>
            </footer>
            </span>

            </span>
            </span>
            <!-- ng repeat-->

            <div ng-show="minimal">
                <br/>
                <button class="button button-outline button-positive" ng-click="switchMinimal()">
  exit full screen view
</button>



            </div>

        </div>
        <!--wrapper-->



    </ion-content>

</ion-view>