-
Notifications
You must be signed in to change notification settings - Fork 0
/
xul.php
142 lines (126 loc) · 5.35 KB
/
xul.php
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
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?php
include('./auth.php');
header('Content-Type: application/vnd.mozilla.xul+xml');
echo '<?xml version="1.0"?>';
echo '<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>';
?>
<window
id="statmainwindow"
title="phpMyFAQ Statistics"
orient="vertical"
xmlns:html="http://www.w3.org/1999/xhtml/"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script src="xul.js" />
<popupset>
<popup id="dumpmenu">
<menuitem label="Add to filter" oncommand="" />
</popup>
</popupset>
<popupset>
<popup id="filtermenu">
<menuitem label="Add filter for PMF 2.0.0" oncommand="addToFilter('`phpMyFAQ_main.currentVersion` = "2.0.0"');" />
<menuitem label="Add filter for PMF 2.0.1" oncommand="addToFilter('`phpMyFAQ_main.currentVersion` = "2.0.1"');" />
<menuitem label="Add filter for host != 127.0.0.1" oncommand="addToFilter('System_ip NOT LIKE "127.0.%"');" />
<menuitem label="Add filter for OS = Windows" oncommand="addToFilter('System_OS = "WINNT"');" />
</popup>
</popupset>
<menubar id="main-menubar">
<menu id="file-menu" label="File">
<menupopup id="file-popup">
<menuitem label="Export as SVG" oncommand="exportChart('svg', this);" />
<menuitem label="Export as PNG" oncommand="exportChart('png', this);" />
<menuitem label="Save SVG on server" oncommand="exportToServer('svg', this);" />
<menuitem label="Save PNG on server" oncommand="exportToServer('png', this);" />
</menupopup>
</menu>
<menu id="dump-menu" label="Dump">
<menupopup id="dumpmenu">
<menuitem label="Export as HTML" oncommand="exportDump('html', this);" />
<menuitem label="Export as CSV" oncommand="exportDump('csv', this);" />
<menuitem label="Export as SQL" oncommand="exportDump('sql', this);" />
</menupopup>
</menu>
</menubar>
<hbox>
<image src="pmf_logo.png" width="32" height="32" />
<label style="font-size: 18px; border-bottom: 1px solid 6699cc;">phpMyFAQ statistics viewer</label>
</hbox>
<tabbox flex="1" id="maintabbox">
<tabs>
<tab label="Charts" />
<tab id="dumptab" label="Dump" oncommand="getDump(false);" />
<tab id="dumptab" label="Query log" oncommand="getQueryList();" />
<tab label="Configuration" />
<tab label="About" />
</tabs>
<tabpanels flex="1">
<tabpanel flex="1">
<hbox flex="1">
<listbox id="diagramlist" onselect="showSVGFromSelection(this);">
</listbox>
<splitter state="open" collapse="before" resizebefore="closest" resizeafter="closest"><grippy /></splitter>
<vbox flex="3">
<iframe id="diagramframe" src="about:blank" flex="4" />
</vbox>
</hbox>
</tabpanel>
<tabpanel flex="1" context="dumpmenu">
<tree id="dumptree" flex="1">
</tree>
<!--
<listbox id="dumplist" flex="1">
</listbox>
-->
</tabpanel>
<tabpanel flex="1">
<textbox id="querybox" multiline="true" value="" flex="1"/>
</tabpanel>
<tabpanel flex="1">
<grid flex="1">
<columns>
<column/>
<column/>
</columns>
<rows>
<row>
<label>Chart Size X-orientation</label>
<textbox id="setting_chart_x" min="100" max="3000" type="number" value="800" hidespinbuttons="false" />
</row>
<row>
<label>Chart Size Y-orientation</label>
<textbox id="setting_chart_y" min="100" max="3000" type="number" value="600" hidespinbuttons="false" />
</row>
<row>
<label>Chart file format</label>
<menulist id="setting_chart_format" label="svg">
<menupopup>
<menuitem label="svg" selected="true"/>
<menuitem label="png"/>
</menupopup>
</menulist>
</row>
<row>
<label>Pie chart Summary Threshold: (in percent)</label>
<textbox id="setting_chart_pie_threshold" min="0" max="100" type="number" value="1" hidespinbuttons="false" />
</row>
<row>
<label>Steps for the timeline:</label>
<textbox id="setting_timeline_steps" min="2" max="500" type="number" value="50" hidespinbuttons="false" />
</row>
</rows>
</grid>
</tabpanel>
<tabpanel flex="1">
<label>You should know - else leave this site!</label>
<html:h1>I want to see</html:h1>
<html:h2>Sieben, sieben, eins, zwei, sieben, sieben</html:h2>
</tabpanel>
</tabpanels>
</tabbox>
<hbox>
<label>Filter:</label>
<textbox id="filtertext" flex="1" />
<button label="..." popup="filtermenu" />
<button label="Filter!" id="filterbutton" oncommand="applyFilter();" />
</hbox>
</window>