Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update keyboard shortcuts #137

Merged
merged 3 commits into from
Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions app/dashboard/static/js/app/utils/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ define([
}

function setHotKeys() {
var goToBoot,
goToBuild,
var goToBuild,
goToCompare,
goToHome,
goToInfo,
goToJob,
goToSoc,
goToTest,
selectSearch,
selectTableLength,
showHelp;
Expand All @@ -78,8 +78,8 @@ define([
window.location = document.getElementById('build-l').href;
};

goToBoot = function() {
window.location = document.getElementById('boot-l').href;
goToTest = function() {
window.location = document.getElementById('tests-l').href;
};

goToSoc = function() {
Expand Down Expand Up @@ -114,7 +114,7 @@ define([
$.mapHotKeys.createSequence('g', 'o', $(document), goToHome),
$.mapHotKeys.createSequence('g', 'j', $(document), goToJob),
$.mapHotKeys.createSequence('g', 'b', $(document), goToBuild),
$.mapHotKeys.createSequence('g', 't', $(document), goToBoot),
$.mapHotKeys.createSequence('g', 't', $(document), goToTest),
$.mapHotKeys.createSequence('g', 's', $(document), goToSoc),
$.mapHotKeys.createSequence('g', 'c', $(document), goToCompare),
$.mapHotKeys.createSequence('g', 'i', $(document), goToInfo)
Expand Down
3 changes: 3 additions & 0 deletions app/dashboard/static/js/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
'app/view-builds-job-kernel-defconfig': 'app/view-builds-job-kernel-defconfig.2017.3.3',
'app/view-builds-job-kernel-defconfig-logs': 'app/view-builds-job-kernel-defconfig-logs.2020.6',
'app/view-index': 'app/view-index.2017.3.3',
'app/view-info': 'app/view-info.2021.03',
'app/view-jobs-all': 'app/view-jobs-all.2020.10',
'app/view-jobs-job': 'app/view-jobs-job.2020.10',
'app/view-jobs-job-branch': 'app/view-jobs-job-branch.2020.10',
Expand Down Expand Up @@ -102,6 +103,7 @@
{name: 'app/view-builds-job-kernel-defconfig-logs.2020.6'},
{name: 'app/view-builds-job-kernel-defconfig.2017.3.3'},
{name: 'app/view-index.2017.3.3'},
{name: 'app/view-info.2021.03'},
{name: 'app/view-jobs-all.2020.10'},
{name: 'app/view-jobs-job-branch.2020.10'},
{name: 'app/view-jobs-job.2020.10'},
Expand All @@ -121,6 +123,7 @@
{name: 'kci-builds-job-kernel-defconfig'},
{name: 'kci-builds-job-kernel-defconfig-logs'},
{name: 'kci-index'},
{name: 'kci-info'},
{name: 'kci-jobs-all'},
{name: 'kci-jobs-job'},
{name: 'kci-jobs-job-branch'},
Expand Down
1 change: 1 addition & 0 deletions app/dashboard/static/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ require.config({
'app/view-builds-job-kernel-defconfig': 'app/view-builds-job-kernel-defconfig.2017.3.3',
'app/view-builds-job-kernel-defconfig-logs': 'app/view-builds-job-kernel-defconfig-logs.2020.6',
'app/view-index': 'app/view-index.2017.3.3',
'app/view-info': 'app/view-info.2021.03',
'app/view-jobs-all': 'app/view-jobs-all.2020.10',
'app/view-jobs-job': 'app/view-jobs-job.2020.10',
'app/view-jobs-job-branch': 'app/view-jobs-job-branch.2020.10',
Expand Down
24 changes: 24 additions & 0 deletions app/dashboard/static/js/kci-info.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*!
* kernelci dashboard.
*
* Copyright (C) 2014, 2015, 2016, 2017 Linaro Ltd.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

require(['common'], function() {
'use strict';
require(['app/view-info']);
});
7 changes: 1 addition & 6 deletions app/dashboard/templates/hotkeys.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,13 @@ <h4>Navigation</h4>
<tr>
<td><kbd>g</kbd> then <kbd>t</kbd></td>
<td>&nbsp;:&nbsp;</td>
<td>Go to the boots page</td>
<td>Go to the tests page</td>
</tr>
<tr>
<td><kbd>g</kbd> then <kbd>s</kbd></td>
<td>&nbsp;:&nbsp;</td>
<td>Go to the SoCs page</td>
</tr>
<tr>
<td><kbd>g</kbd> then <kbd>c</kbd></td>
<td>&nbsp;:&nbsp;</td>
<td>Go to the compare page</td>
</tr>
<tr>
<td><kbd>g</kbd> then <kbd>i</kbd></td>
<td>&nbsp;:&nbsp;</td>
Expand Down
7 changes: 3 additions & 4 deletions app/dashboard/templates/info.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ <h4>Symbols Legend</h4>
<dd>Indicates job and/or tree resources</dd>
<dt><a href="#"><i class="fa fa-cube"></i></a></dt>
<dd>Indicates build resources</dd>
<dt><a href="#"><i class="fa fa-hdd-o"></i></a></dt>
<dd>Indicates boot report resources</dd>
<dt><a href="#"><i class="fa fa-server"></i></a></dt>
<dd>Indicates SoC resources</dd>
<dt><a href="#"><i class="fa fa-th-large"></i></a></dt>
<dd>Indicates the compare resource</dd>
<dt>
<a href="#"><i class="fa fa-external-link"></i></a>
</dt>
Expand All @@ -40,3 +36,6 @@ <h4>Keyboard shortcuts</h4>
</p>
</div>
{% endblock %}
{%- block scripts %}
<script data-main="/static/js/kci-info" src="/static/js/lib/require.js"></script>
{%- endblock %}