Skip to content
This repository has been archived by the owner on Aug 20, 2019. It is now read-only.

Commit

Permalink
Merge pull request #44 from adamfitzgibbon/Icons
Browse files Browse the repository at this point in the history
Added icons to application and notifications
  • Loading branch information
djw8605 authored Sep 3, 2016
2 parents dc3bc01 + 4f0a170 commit 3435461
Show file tree
Hide file tree
Showing 9 changed files with 451 additions and 44 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = function(grunt) {
command: 'cd HCCGo/ && npm start'
},
build_electron: {
command: 'cd HCCGo/ && npm run-script packageWin'
command: 'cd HCCGo/ && npm run-script packageOsx'
}
},
auto_install: {
Expand Down
19 changes: 10 additions & 9 deletions HCCGo/app/css/application.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ body {

}

.navIcon {
height: 130%;
}

.highlight {
background-color: #F1F5F8;
}
Expand Down Expand Up @@ -264,7 +268,7 @@ div.historyinfo {
top: -0px;
}

.status-check
.status-check
{
stroke-dasharray: 110;
stroke-dashoffset: -110;
Expand All @@ -275,7 +279,7 @@ div.historyinfo {
{
stroke-dasharray: 110;
stroke-dashoffset: -110;
stroke-width: 0;
stroke-width: 0;
}

.status-anx-complete
Expand All @@ -288,24 +292,24 @@ div.historyinfo {

}

.status-check-complete
{
.status-check-complete
{
animation: status-check 1s ease-in forwards;
stroke-width: 15;
stroke-dashoffset: 0;
stroke: #009900;
transition: status-stroke 1.6s;
}

.status-fill
.status-fill
{
stroke-dasharray: 285;
stroke-dashoffset: -100;
animation: status-spin-fill 3s linear infinite forwards;
transform-origin: 50% 50%;
}

.status-fill-complete
.status-fill-complete
{
animation: status-fill 1s ease-out forwards;
}
Expand Down Expand Up @@ -352,6 +356,3 @@ div.historyinfo {
stroke: #f44336;
transition: status-stroke 1.6s;
}



36 changes: 23 additions & 13 deletions HCCGo/app/html/navbar.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
<div class="navbar navbar-hcc" ng-controller="NavCtrl">
<div class="navbar-header">
<a ng-click="goHome()" class="navbar-brand" href="javascript:void(0)">HCC Go</a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a ng-click="goHome()" class="navbar-brand" href="javascript:void(0)">
<img class="navIcon" src="../icons/HCCGo.png" />
</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">

<div class="navbar-collapse collapse navbar-responsive-collapse" id="myNavbar">
<!--File Management Dropdown -->
<ul class="nav navbar-nav">
<button type="button"
ng-click="jobHistory()"
<li>
<button type="button"
ng-click="jobHistory()"
class="navbar-left btn btn-success navbar-btn btn-primary">
Submit
</button>
<button type="button"
ng-click="goToSCP()"
</li>
<li>
<button type="button"
ng-click="goToSCP()"
class="navbar-left btn btn-secondary navbar-btn btn-primary">
File Management
</button>

</li>
</ul>


<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="javascript:void(0)" data-target="#" class="dropdown-toggle" data-toggle="dropdown"> {{username}}@{{params.clusterId}} <b class="caret"></b></a>
Expand All @@ -29,8 +39,8 @@
</li>
</ul>




</div>
</div>
35 changes: 17 additions & 18 deletions HCCGo/app/js/NotifierService.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@

notifierModule = angular.module('NotifierModule', ['toastr'])

notifierModule.factory('notifierService',['$log', '$q', '$routeParams', 'toastr',
notifierModule.factory('notifierService',['$log', '$q', '$routeParams', 'toastr',
function($log, $q, $routeParams, toastr) {

const {ipcRenderer} = require('electron');
const notifier = require('node-notifier');
var path = require('path');
var fs = require('fs');

const toastrOptions = {closeButton: true,
timeOut: 5000,
extendedTimeOut: 5000,
progressBar: true};

/**
* To notify user of application dependent on window focus
*
*/

// Get window focus status
var getWinFocus = function() {
var deferred = $q.defer();
Expand All @@ -28,29 +28,28 @@ notifierModule.factory('notifierService',['$log', '$q', '$routeParams', 'toastr'
});
ipcRenderer.send('focus-check-reply', 'ping');
return deferred.promise;
}
}

// Pop a success message
var success = function(msg, title) {
getWinFocus().then(function (response) {
if (response) {
toastr.success(msg, title, toastrOptions);
} else {
} else {
notifier.notify({
title: title,
message: msg,
icon: void 0,
sound: false,
wait: false
message: msg,
icon: path.join(__dirname, '../icons/HCCGo.png'),
sound: false,
wait: false
}, function (err, response) {
if (err) {
$log.debug(err);
}
})
}
});
});
}

// Pop a warning message
var warning = function(msg) {
getWinFocus().then(function (response) {
Expand All @@ -60,7 +59,7 @@ notifierModule.factory('notifierService',['$log', '$q', '$routeParams', 'toastr'
notifier.notify({
title: 'Warning!',
message: msg,
icon: void 0,
icon: path.join(__dirname, '../icons/HCCGo.png'),
sound: false,
wait: false
}, function (err, response) {
Expand All @@ -81,7 +80,7 @@ notifierModule.factory('notifierService',['$log', '$q', '$routeParams', 'toastr'
notifier.notify({
title: title,
message: msg,
icon: void 0,
icon: path.join(__dirname, '../icons/HCCGo.png'),
sound: false,
wait: false
}, function (err, response) {
Expand All @@ -92,11 +91,11 @@ notifierModule.factory('notifierService',['$log', '$q', '$routeParams', 'toastr'
}
});
}

return {
success: success,
warning: warning,
error: error
}

}]);
Binary file added HCCGo/icons/HCCGo.icns
Binary file not shown.
Binary file added HCCGo/icons/HCCGo.ico
Binary file not shown.
Binary file added HCCGo/icons/HCCGo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions HCCGo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"description": "Interface for HCC Resouces",
"scripts": {
"start": "electron .",
"packageWin": "node ./node_modules/electron-packager/cli.js ./ HCCGo --platform=win32 --arch=all --out ../packageWin/ --version 1.2.6 --overwrite",
"packageOsx": "node ./node_modules/electron-packager/cli.js ./ HCCGo --platform=darwin --arch=x64 --out ../packageOsx/ --version 1.2.6 --overwrite",
"packageNix": "node ./node_modules/electron-packager/cli.js ./ HCCGo --platform=linux --arch=all --out ../packageNix/ --version 1.2.6 --overwrite",
"packageWin": "node ./node_modules/electron-packager/cli.js ./ HCCGo --platform=win32 --arch=all --out ../packageWin/ --version 1.2.6 --overwrite --icon ./icons/HCCGo",
"packageOsx": "node ./node_modules/electron-packager/cli.js ./ HCCGo --platform=darwin --arch=x64 --out ../packageOsx/ --version 1.2.6 --overwrite --icon ./icons/HCCGo",
"packageNix": "node ./node_modules/electron-packager/cli.js ./ HCCGo --platform=linux --arch=all --out ../packageNix/ --version 1.2.6 --overwrite --icon ./icons/HCCGo",
"postinstall": "./postinstall.js"
},
"keywords": [
Expand Down
397 changes: 397 additions & 0 deletions artifacts/HCCGo.ai

Large diffs are not rendered by default.

0 comments on commit 3435461

Please sign in to comment.