mirror of
https://github.com/openstf/stf
synced 2025-10-05 10:39:25 +02:00
Adding Activity mockup.
This commit is contained in:
parent
e184cb7c85
commit
efa5875d60
9 changed files with 96 additions and 4 deletions
|
@ -1,11 +1,15 @@
|
|||
module.exports = function refreshPageDirective() {
|
||||
module.exports = function refreshPageDirective($window) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
scope: {
|
||||
},
|
||||
template: require('./refresh-page.jade'),
|
||||
link: function () {
|
||||
link: function (scope) {
|
||||
scope.reloadWindow = function () {
|
||||
$window.location.reload()
|
||||
}
|
||||
|
||||
// TODO: reload with $route.reload()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
button.btn.btn-sm.btn-primary-outline(ng-click='window.location.reload()')
|
||||
button.btn.btn-sm.btn-primary-outline(ng-click='reloadWindow()')
|
||||
i.fa.fa-refresh
|
||||
span(translate) Refresh
|
||||
span(translate) Refresh
|
||||
|
|
3
res/app/control-panes/activity/activity-controller.js
Normal file
3
res/app/control-panes/activity/activity-controller.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
module.exports = function ActivityCtrl($scope) {
|
||||
|
||||
}
|
17
res/app/control-panes/activity/activity-spec.js
Normal file
17
res/app/control-panes/activity/activity-spec.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
describe('ActivityCtrl', function () {
|
||||
|
||||
beforeEach(module('stf.activity'));
|
||||
|
||||
var scope, ctrl;
|
||||
|
||||
beforeEach(inject(function ($rootScope, $controller) {
|
||||
scope = $rootScope.$new();
|
||||
ctrl = $controller('ActivityCtrl', {$scope: scope});
|
||||
}));
|
||||
|
||||
it('should ...', inject(function () {
|
||||
expect(1).toEqual(1);
|
||||
|
||||
}));
|
||||
|
||||
});
|
19
res/app/control-panes/activity/activity.css
Normal file
19
res/app/control-panes/activity/activity.css
Normal file
|
@ -0,0 +1,19 @@
|
|||
.stf-activity .activity-list .activity-date,
|
||||
.stf-activity .activity-list .activity-buttons {
|
||||
opacity: 0;
|
||||
transition: opacity 0.25s ease-in-out;
|
||||
}
|
||||
|
||||
.stf-activity .activity-list li:hover .activity-date,
|
||||
.stf-activity .activity-list li:hover .activity-buttons {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.stf-activity .activity-title {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.stf-activity .activity-icon {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
31
res/app/control-panes/activity/activity.jade
Normal file
31
res/app/control-panes/activity/activity.jade
Normal file
|
@ -0,0 +1,31 @@
|
|||
.widget-container.scrollableX.list.rating-widget.stf-activity(ng-controller='ActivityCtrl')
|
||||
//.heading
|
||||
i.fa
|
||||
span(translate) Activity
|
||||
.widget-content.padded
|
||||
ul.activity-list
|
||||
li
|
||||
.reviewer-info
|
||||
i.fa.fa-exclamation-triangle.fa-2x.activity-icon
|
||||
//img(width='30', height='30', src='images/avatar-male.jpg')
|
||||
h5.activity-title WebSocket Disconnected
|
||||
em.activity-date.pull-right 2014/04/30 18:33:22
|
||||
.review-text
|
||||
p.pull-left Socket connection was lost, try again reloading the page.
|
||||
.activity-buttons.pull-right
|
||||
refresh-page
|
||||
.clearfix
|
||||
li
|
||||
.reviewer-info
|
||||
i.fa.fa-mobile.fa-2x.activity-icon
|
||||
h5.activity-title 'Nexus 5' Disconnected
|
||||
em.activity-date.pull-right 2014/04/30 15:33:22
|
||||
.review-text
|
||||
p.pull-left Device was disconnected because it timed out.
|
||||
.activity-buttons.pull-right
|
||||
button.btn.btn-sm.btn-primary-outline(ng-click='')
|
||||
i.fa.fa-refresh
|
||||
span(translate) Reconnect device
|
||||
|
||||
.clearfix
|
||||
|
11
res/app/control-panes/activity/index.js
Normal file
11
res/app/control-panes/activity/index.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
require('./activity.css')
|
||||
|
||||
module.exports = angular.module('stf.activity', [
|
||||
require('stf/common-ui').name
|
||||
])
|
||||
.run(["$templateCache", function ($templateCache) {
|
||||
$templateCache.put('control-panes/activity/activity.jade',
|
||||
require('./activity.jade')
|
||||
)
|
||||
}])
|
||||
.controller('ActivityCtrl', require('./activity-controller'))
|
|
@ -43,6 +43,12 @@ module.exports = function ($scope, gettext, $routeParams, $location, DeviceServi
|
|||
].concat(angular.copy(sharedTabs))
|
||||
|
||||
$scope.belowTabs = [
|
||||
{
|
||||
title: gettext('Activity'),
|
||||
icon: 'fa-clock-o',
|
||||
templateUrl: 'control-panes/activity/activity.jade',
|
||||
filters: ['native', 'web']
|
||||
},
|
||||
{
|
||||
title: gettext('Logs'),
|
||||
icon: 'fa-list-alt',
|
||||
|
|
|
@ -11,6 +11,7 @@ module.exports = angular.module('control-panes', [
|
|||
require('./cpu').name,
|
||||
require('./dashboard').name,
|
||||
require('./inspect').name,
|
||||
require('./activity').name,
|
||||
require('./logs').name,
|
||||
require('./resources').name,
|
||||
require('./screenshots').name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue