Not logged in
Check-in [a71227df8e]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Missed/dialed/received calls are now being shown separately.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a71227df8ea2797dd3facf25fa9b69784b79f8b9
User & Date: petr 2010-11-11 16:12:51
Context
2010-11-11
16:22
Added TODO check-in: 32e789e18a user: petr tags: trunk
16:12
Missed/dialed/received calls are now being shown separately. check-in: a71227df8e user: petr tags: trunk
15:20
Added some functionality to the menu. Not tested on the real hardware. check-in: d5282e9f92 user: petr tags: trunk
Changes

Added static/quickdial32.png.

cannot compute difference between binary files

Added templates/calls.tpl.













































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<div class="yui3-g">
    <div class="yui3-u-1">
        <table>
            <thead>
                <tr>
                    <th>Number</th>
                    <th>Name</th>
                    <th>Time</th>
                    <th>?</th>
                    <th>End time</th>
                    <th>?</th>
                    <th>?</th>
                    <th>?</th>
                </tr>
            </thead>
            <tbody>
                $calls
            </tbody>
        </table>
    </div>
</div>    

Changes to templates/global.tpl.

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
                        <h1>Nortel 1535 Management Interface - $title</h1>
                    </div>
                </div>
                <div class="yui3-g" id="container">
                    <div class="yui3-u" id="nav">
                        <h3>Calls</h3>
                        <div class="menuitem">
                            <a href="/">All calls</a>
                        </div>
                        <div class="menuitem">
                            <a href="/missed"><img src="/static/missed32.png"/> Missed</a>
                        </div>
                        <div class="menuitem">
                            <a href="/dialed"><img src="/static/called32.png"/> Dialed</a>
                        </div>
                        <div class="menuitem">
                            <a href="/received"><img src="/static/received32.png"/> Received</a>
                        </div>
                        <h3>Phonebook</h3>
                        <div class="menuitem">
                            <a href="/phonebook">Phonebook</a>
                        </div>
                        <div class="menuitem">
                            <a href="/phonebook">Quick dial</a>
                        </div>
                        <div class="menuitem">
                            <a href="/media"><img src="/static/media32.png"/> Media</a>
                        </div>
                        <h3>System</h3>
                        <div class="menuitem">
                            <a href="/sip"><img src="/static/settings32.png"/> SIP Settings</a>







|


|


|


|






|







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
                        <h1>Nortel 1535 Management Interface - $title</h1>
                    </div>
                </div>
                <div class="yui3-g" id="container">
                    <div class="yui3-u" id="nav">
                        <h3>Calls</h3>
                        <div class="menuitem">
                            <a href="/"><img src="/static/quickdial32.png"/> All calls</a>
                        </div>
                        <div class="menuitem">
                            <a href="/calls/missed"><img src="/static/missed32.png"/> Missed</a>
                        </div>
                        <div class="menuitem">
                            <a href="/calls/dialed"><img src="/static/called32.png"/> Dialed</a>
                        </div>
                        <div class="menuitem">
                            <a href="/calls/received"><img src="/static/received32.png"/> Received</a>
                        </div>
                        <h3>Phonebook</h3>
                        <div class="menuitem">
                            <a href="/phonebook">Phonebook</a>
                        </div>
                        <div class="menuitem">
                            <a href="/phonebook"><img src="/static/quickdial32.png"/> Quick dial</a>
                        </div>
                        <div class="menuitem">
                            <a href="/media"><img src="/static/media32.png"/> Media</a>
                        </div>
                        <h3>System</h3>
                        <div class="menuitem">
                            <a href="/sip"><img src="/static/settings32.png"/> SIP Settings</a>

Changes to templates/index.tpl.

1
2
3
4
5
6
7
8
9
10
<div class="yui3-g">
    <div class="yui3-u-1">
        <h1>$title</h1>
        <h3>Missed</h3>
        <table>
            <thead>
                <tr>
                    <th>Number</th>
                    <th>Name</th>
                    <th>Time</th>


<







1
2

3
4
5
6
7
8
9
<div class="yui3-g">
    <div class="yui3-u-1">

        <h3>Missed</h3>
        <table>
            <thead>
                <tr>
                    <th>Number</th>
                    <th>Name</th>
                    <th>Time</th>

Changes to templates/phonebook.tpl.

1
2
<h1>$title</h1>
$phonebook
<


1

$phonebook

Changes to templates/settings.tpl.

1
2
<h1>Settings</h1>
$dump
<


1

$dump

Changes to web.py.

83
84
85
86
87
88
89



















90
91
92
93
94
95
96
...
120
121
122
123
124
125
126
127












128
129
130
131
132
133

134
135
136
137
138
139
140
        p = open("../lgvp/received.txt", "r")
        n2 = missed2table(p)
        p = open("../lgvp/dialed.txt", "r")
        n3 = missed2table(p)
        self.write(t_index.safe_substitute({"missed": n1, "received": n2,
            "dialed": n3, "title": "All calls"}))





















class Settings(Handler):
    def get(self):
        t = Template("templates/global.tpl", content="templates/settings.tpl")
        files = glob.glob("../lgvp/*.cfg")
        dump = ""
        for gf in files:
................................................................................

class Status(Handler):
    def get(self):
        t = Template("templates/global.tpl", content="templates/settings.tpl")
        dump = "<pre>" + "".join(os.popen("dmesg")) + "</pre>"
        self.write(t.safe_substitute({"dump": dump, "title": "System status"}))














mapping = {"/": Index,
        "/missed": Index,
        "/received": Index,
        "/dialed": Index,
        "/system": Status,
        "/sip": Settings,

        "/reboot": Reboot,
        "/phonebook": Phonebook}


class App(SimpleHTTPServer.SimpleHTTPRequestHandler):
    def do_GET(self):
        if self.path.startswith("/static/"):







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 








>
>
>
>
>
>
>
>
>
>
>
>

|
|
|


>







83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
...
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
        p = open("../lgvp/received.txt", "r")
        n2 = missed2table(p)
        p = open("../lgvp/dialed.txt", "r")
        n3 = missed2table(p)
        self.write(t_index.safe_substitute({"missed": n1, "received": n2,
            "dialed": n3, "title": "All calls"}))


class Calls(Handler):
    def get(self):
        t_calls = Template("templates/global.tpl", content="templates/calls.tpl")
        if self.request.path.endswith("missed"):
            ct = "Missed calls"
            p = open("../lgvp/missed.txt", "r")
            calls = missed2table(p)
        if self.request.path.endswith("dialed"):
            ct = "Dialed calls"
            p = open("../lgvp/dialed.txt", "r")
            calls = missed2table(p)
        if self.request.path.endswith("received"):
            ct = "Received calls"
            p = open("../lgvp/received.txt", "r")
            calls = missed2table(p)
        self.write(t_calls.safe_substitute({"title": ct, "calls": calls}))



class Settings(Handler):
    def get(self):
        t = Template("templates/global.tpl", content="templates/settings.tpl")
        files = glob.glob("../lgvp/*.cfg")
        dump = ""
        for gf in files:
................................................................................

class Status(Handler):
    def get(self):
        t = Template("templates/global.tpl", content="templates/settings.tpl")
        dump = "<pre>" + "".join(os.popen("dmesg")) + "</pre>"
        self.write(t.safe_substitute({"dump": dump, "title": "System status"}))


class Media(Handler):
    def get(self):
        t = Template("templates/global.tpl", content="templates/settings.tpl")
        dump = "<pre>"
        dump = dump + "\n".join(glob.glob("../lgvp/photos/*"))
        dump = dump + "\n".join(glob.glob("../lgvp/audios/*"))
        dump = dump + "\n".join(glob.glob("../lgvp/videos/*"))
        dump = dump + "</pre>"
        self.write(t.safe_substitute({"dump": dump, "title": "Media"}))



mapping = {"/": Index,
        "/calls/missed": Calls,
        "/calls/received": Calls,
        "/calls/dialed": Calls,
        "/system": Status,
        "/sip": Settings,
        "/media": Media,
        "/reboot": Reboot,
        "/phonebook": Phonebook}


class App(SimpleHTTPServer.SimpleHTTPRequestHandler):
    def do_GET(self):
        if self.path.startswith("/static/"):