-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathyoda-time-stats-csv.html
200 lines (163 loc) · 6.65 KB
/
yoda-time-stats-csv.html
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
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="Yoda. GitHub lightweight extention for Agile Project Management using GitHub issues. Issues Statistics to CSV Tool.">
<!--
Copyright 2018 Hewlett Packard Enterprise Development LP
Copyright 2024- Jens Vedel Markussen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<title>GitHub CSV Time Chart</title>
<link rel="icon" href="time-stats-icon-csv-32.png" type="image/png" />
<script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
<script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.min.js"></script>
<script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.4.1/papaparse.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css">
<link rel="stylesheet" type="text/css" href="yoda.css">
</head>
<body>
<div class="frame">
<div class="dropdown">
<img id="hamburger" src="threebars.png" class="dropimg">
<div id="yodamenu" class="dropdown-content"></div>
</div>
<div class="field">
<label>CSV Owner</label>
<input type="text" id="owner" size="15">
<span class="tooltip">GitHub organisation or user for CSV file</span>
</div>
<div class="field">
<label>CSV Repository</label>
<input id="repo" size="15">
<span class="tooltip">Repo for CSV file</span>
</div>
<div class="field">
<label>CSV Path</label>
<input type="text" size="25" id="path" value="">
<span class="tooltip">Path for CSV file</span>
</div>
<div class="field">
<label>CSV Branch / Commit</label>
<input type="text" size="20" id="branch" value="">
<span class="tooltip">Optional branch for CSV file</span>
</div>
<div class="field" style="display: none;">
<label>GitHub user</label>
<input type="text" size="20" id="user" value="">
<span class="tooltip">Your GitHub user-id</span>
</div>
<div class="field" style="display: none;">
<label>GitHub token</label>
<input type="password" size="30" id="token" value="">
<span class="tooltip">GitHub personal token</span>
</div>
<div class="field">
<label>CSV date column</label>
<input type="text" size="10" id="datecolumn" value="scanDate">
<span class="tooltip">CSV column containing date</span>
</div>
<div class="field">
<label>CSV group columns</label>
<input type="text" size="25" id="groupcolumns" value="Family,Product,Repository,Tool">
<span class="tooltip">Comma-separated list of column for group</span>
</div>
<button id="readcsv">Read CSV</button>
<div class="field">
<label>CSV entries</label>
<input size="10" id="entries" value="" disabled>
<span class="tooltip">Number of entries/lines read from CSV</span>
</div>
</div>
<div class="frame" id="filterframe">
<div class="field">
<label>Filters</label>
<select id="filters" style="width: 300px" class="select2" multiple></select>
<span class="tooltip">Columns to filter</span>
</div>
</div>
<div class="frame">
<div class="field">
<label>Start date (blank=2m ago)</label>
<input type="text" id="startdate" size="20" value="">
<span class="tooltip">Timeline start</span>
</div>
<div class="field">
<label>End date (today=blank)</label>
<input type="text" id="enddate" size="20" value="">
<span class="tooltip">Timeline end</span>
</div>
<div class="field">
<label>Interval</label>
<input type="text" id="interval" size="5" value="7">
<span class="tooltip">Interval in days or months (<i>m</i> postfix)</span>
</div>
<div class="field">
<label>Max age</label>
<input type="text" id="maxage" size="5" value="40">
<span class="tooltip">Max age in days for entry to be still valid</span>
</div>
<div class="field">
<label>X-axis column</label>
<select id="axiscolumn" style="width: 150px" class="select2"></select>
<span class="tooltip">X-axis column (if not doing date based)</span>
</div>
<div class="field">
<label>Bar Splitting</label>
<select id="barsplit" style="width: 150px" class="select2"></select>
<span class="tooltip">Split into bars (by CSV field)</span>
</div>
<div class="field">
<label>Count column</label>
<select id="countfield" style="width: 150px" class="select2"></select>
<span class="tooltip">Column to count (empty to count #entries)</span>
</div>
<div class="field">
<label>Axis category</label>
<input type="text" id="axiscategory" size="10" value="vulnerabilities">
<span class="tooltip">Entry types for use on axis labels</span>
</div>
<div class="field">
<label>Title</label>
<input type="text" id="title" size="30" value="">
<span class="tooltip">Chart title</span>
</div>
<button id="drawbutton">Draw chart</button>
<div class="field">
<label>Stacked</label>
<input type="checkbox" id="stacked" checked>
<span class="tooltip">Stack bars</span>
</div>
<div class="field">
<label>Percentage</label>
<input type="checkbox" id="percentage">
<span class="tooltip">Show relative percentage (so relative weight) instead of numbers</span>
</div>
<div class="field" style="display: none;">
<label>CSV delimiter</label> <input type="text" id="csvdelimiter" size="5" value=';'>
<span class="tooltip">CSV field delimiter</span>
</div>
</div>
<div style="width: 90%">
<canvas id="canvas"></canvas>
</div>
<div id="snackbar">Some text some message..</div>
<script type="module">
import { init } from './yoda-time-stats-csv.js';
init();
</script>
</body>
</html>