dashboard work finished

pull/365/head
Callum White 2017-11-27 13:17:25 +00:00
parent 5ae870f267
commit 9b75080329
6 changed files with 105 additions and 58 deletions

View File

@ -24,9 +24,11 @@
$scope.progressLabels = ["Complete", "In progress", "To do"];
$scope.progressData = [complete, inProgress, toDo];
$scope.progressColors = ['#0BD680', '#FFC93C', '#DBDBDB'];
$scope.teamLabels = ["Front end", "Back end", "Devops"];
$scope.teamData = [frontEnd, backEnd, devOps];
$scope.teamColors = ['#0BD680', '#626EEF', '#FFC93C'];
$scope.options = {
elements: {
@ -179,10 +181,10 @@
response.data.results.forEach(function (test) {
var session = test.automation_session;
if ((session.status === 'done' && session.reason === 'UI_STOPPED') || session.status === 'passed') {
if (session.status === 'passed') {
$scope.behatResults.passed += 1;
browserTestLog(session, 'passed')
} else if (session.status !== 'running') {
} else if (session.status === 'failed') {
$scope.behatResults.failed += 1;
browserTestLog(session, 'failed')
}

View File

@ -4,14 +4,14 @@
<div class="row">
<div class="col-md-6">
<canvas id="doughnut" chart-options="options" class="chart chart-doughnut"
chart-data="progressData" chart-labels="progressLabels" chart-click="changeData">
chart-data="progressData" chart-labels="progressLabels" chart-colors="progressColors" chart-click="changeData">
</canvas>
</div>
<div class="col-md-6">
<canvas id="pie" class="chart chart-pie"
chart-options="options" chart-data="teamData" chart-labels="teamLabels"
chart-click="changeData">
chart-click="changeData" chart-colors="teamColors">
</canvas>
</div>
</div>
@ -21,15 +21,15 @@
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-5">
<div style="background: red; border-radius: 8px; color: white; padding: 24px 48px; box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.25)">
<p style="margin-bottom: 24px;">Failed</p>
<h1 style="text-align: right; margin-bottom: 0px;">{{behatResults.failed}}</h1>
<div class="behat-box failed" data-ng-class="{'no-results': behatResults.failed === 0}">
<p>Failed</p>
<h1>{{behatResults.failed}}</h1>
</div>
</div>
<div class="col-md-5">
<div style="background: lightgreen; border-radius: 8px; padding: 24px 48px; box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.25)">
<p style="margin-bottom: 24px;">Passed</p>
<h1 style="text-align: right; margin-bottom: 0px;">{{behatResults.passed}}</h1>
<div class="behat-box passed" data-ng-class="{'no-results': behatResults.passed === 0}">
<p>Passed</p>
<h1>{{behatResults.passed}}</h1>
</div>
</div>
<div class="col-md-1"></div>
@ -42,8 +42,8 @@
<div class="col-md-5">
<h4>Windows</h4>
<div data-ng-repeat="(browser, results) in behatResults.windows" style="padding: 6px; border-radius: 4px; margin-bottom: 3px;" data-ng-style="results.percentage === 100 ? {background: 'green'} : {background: 'red'}">
<ul style="margin-bottom: 0; padding-left: 24px;">
<div class="browser-row" data-ng-repeat="(browser, results) in behatResults.windows" data-ng-class="results.percentage === 100 ? 'passed' : results.percentage === 0 ? 'no-results' : 'failed'">
<ul>
<li>
<span>{{results.name}}</span><span style="float: right;">{{results.percentage}}%</span>
</li>
@ -53,8 +53,8 @@
<div class="col-md-5">
<h4>Mac</h4>
<div data-ng-repeat="(browser, results) in behatResults.mac" style="padding: 6px; border-radius: 4px; margin-bottom: 3px;" data-ng-style="results.percentage === 100 ? {background: 'green'} : {background: 'red'}">
<ul style="margin-bottom: 0; padding-left: 24px;">
<div class="browser-row" data-ng-repeat="(browser, results) in behatResults.mac" data-ng-class="results.percentage === 100 ? 'passed' : results.percentage === 0 ? 'no-results' : 'failed'">
<ul>
<li>
<span>{{results.name}}</span><span style="float: right;">{{results.percentage}}%</span>
</li>

View File

@ -7,15 +7,7 @@
angular.module('BlurAdmin.pages', [
'ui.router',
'BlurAdmin.pages.dashboard'
// 'BlurAdmin.pages.ui',
// 'BlurAdmin.pages.components',
// 'BlurAdmin.pages.form',
// 'BlurAdmin.pages.tables',
// 'BlurAdmin.pages.charts',
// 'BlurAdmin.pages.maps',
// 'BlurAdmin.pages.profile',
])
.config(routeConfig);
@ -23,40 +15,40 @@
function routeConfig($urlRouterProvider, baSidebarServiceProvider) {
$urlRouterProvider.otherwise('/dashboard');
baSidebarServiceProvider.addStaticItem({
title: 'Pages',
icon: 'ion-document',
subMenu: [{
title: 'Sign In',
fixedHref: 'auth.html',
blank: true
}, {
title: 'Sign Up',
fixedHref: 'reg.html',
blank: true
}, {
title: 'User Profile',
stateRef: 'profile'
}, {
title: '404 Page',
fixedHref: '404.html',
blank: true
}]
});
baSidebarServiceProvider.addStaticItem({
title: 'Menu Level 1',
icon: 'ion-ios-more',
subMenu: [{
title: 'Menu Level 1.1',
disabled: true
}, {
title: 'Menu Level 1.2',
subMenu: [{
title: 'Menu Level 1.2.1',
disabled: true
}]
}]
});
// baSidebarServiceProvider.addStaticItem({
// title: 'Pages',
// icon: 'ion-document',
// subMenu: [{
// title: 'Sign In',
// fixedHref: 'auth.html',
// blank: true
// }, {
// title: 'Sign Up',
// fixedHref: 'reg.html',
// blank: true
// }, {
// title: 'User Profile',
// stateRef: 'profile'
// }, {
// title: '404 Page',
// fixedHref: '404.html',
// blank: true
// }]
// });
// baSidebarServiceProvider.addStaticItem({
// title: 'Menu Level 1',
// icon: 'ion-ios-more',
// subMenu: [{
// title: 'Menu Level 1.1',
// disabled: true
// }, {
// title: 'Menu Level 1.2',
// subMenu: [{
// title: 'Menu Level 1.2.1',
// disabled: true
// }]
// }]
// });
}
})();

View File

@ -25,3 +25,56 @@
.list-of-words:not(:nth-last-child(2)):after {
content: ", ";
}
.behat-box {
border-radius: 8px;
padding: 24px 48px;
box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.25);
&.passed:not(.no-results) {
background: #0BD680;
}
&.failed:not(.no-results) {
background: #FF004E;
color: white;
}
&.no-results {
background: #DBDBDB;
opacity: 0.4;
}
p {
margin-bottom: 24px;
}
h1 {
text-align: right;
margin-bottom: 0px;
}
}
.browser-row {
padding: 6px;
border-radius: 4px;
margin-bottom: 3px;
&.passed {
background: rgba(11, 214, 128, 0.12);
}
&.failed {
background: rgba(255, 0, 78, 0.12);
}
&.no-results {
background: #DBDBDB;
opacity: 0.4;
}
> ul {
margin-bottom: 0;
padding-left: 24px;
}
}

View File

@ -6,7 +6,7 @@ $panel-heading-font-size: 16px;
color: $default-text;
background-color: $default;
border: none;
border-radius: 5px;
border-radius: 8px;
position: relative;
margin-bottom: 24px;
box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.25);

View File

@ -11,7 +11,7 @@ $border-light: tint($border, 15%);
$input-border: shade($border, 5%);
$input-background: #ffffff;
$sidebar: #1C2B36;
$sidebar: #273142;
$sidebar-text: #ffffff;
$dropdown-text: #7d7d7d;
$bootstrap-panel-text: #7d7d7d;