Skip to content

Commit

Permalink
move frontend files to a new repository
Browse files Browse the repository at this point in the history
  • Loading branch information
avelino committed Jan 5, 2015
0 parents commit d71c198
Show file tree
Hide file tree
Showing 2,160 changed files with 372,366 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.PHONY: test
test: pep8 clean
@coverage report
@nosetests mining/test
@$(which gulp.js)

.PHONY: tox-test
tox-test: environment
@tox

.PHONY: environment
environment:
@pip install -r requirements_dev.txt
@pip install -r requirements.txt
@pip install numexpr==2.3
@python setup.py develop
@npm install gulp gulp-jshint
@mv mining/mining.sample.ini mining/mining.ini

.PHONY: install
install:
@python setup.py install

.PHONY: pep8
pep8:
@flake8 mining --ignore=F403,F401,F812,E128 --exclude=mining/assets

.PHONY: sdist
sdist: test
@python setup.py sdist upload

.PHONY: clean
clean:
@find ./ -name '*.pyc' -exec rm -f {} \;
@find ./ -name 'Thumbs.db' -exec rm -f {} \;
@find ./ -name '*~' -exec rm -f {} \;
157 changes: 157 additions & 0 deletions assets/app/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Page Not Found :(</title>
<style>
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
}

::selection {
background: #b3d4fc;
text-shadow: none;
}

html {
padding: 30px 10px;
font-size: 20px;
line-height: 1.4;
color: #737373;
background: #f0f0f0;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}

html,
input {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
max-width: 500px;
_width: 500px;
padding: 30px 20px 50px;
border: 1px solid #b3b3b3;
border-radius: 4px;
margin: 0 auto;
box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff;
background: #fcfcfc;
}

h1 {
margin: 0 10px;
font-size: 50px;
text-align: center;
}

h1 span {
color: #bbb;
}

h3 {
margin: 1.5em 0 0.5em;
}

p {
margin: 1em 0;
}

ul {
padding: 0 0 0 40px;
margin: 1em 0;
}

.container {
max-width: 380px;
_width: 380px;
margin: 0 auto;
}

/* google search */

#goog-fixurl ul {
list-style: none;
padding: 0;
margin: 0;
}

#goog-fixurl form {
margin: 0;
}

#goog-wm-qt,
#goog-wm-sb {
border: 1px solid #bbb;
font-size: 16px;
line-height: normal;
vertical-align: top;
color: #444;
border-radius: 2px;
}

#goog-wm-qt {
width: 220px;
height: 20px;
padding: 5px;
margin: 5px 10px 0 0;
box-shadow: inset 0 1px 1px #ccc;
}

#goog-wm-sb {
display: inline-block;
height: 32px;
padding: 0 10px;
margin: 5px 0 0;
white-space: nowrap;
cursor: pointer;
background-color: #f5f5f5;
background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1);
background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1);
background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1);
background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1);
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
*overflow: visible;
*display: inline;
*zoom: 1;
}

#goog-wm-sb:hover,
#goog-wm-sb:focus {
border-color: #aaa;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
background-color: #f8f8f8;
}

#goog-wm-qt:hover,
#goog-wm-qt:focus {
border-color: #105cb6;
outline: 0;
color: #222;
}

input::-moz-focus-inner {
padding: 0;
border: 0;
}
</style>
</head>
<body>
<div class="container">
<h1>Not found <span>:(</span></h1>
<p>Sorry, but the page you were trying to view does not exist.</p>
<p>It looks like this was the result of either:</p>
<ul>
<li>a mistyped address</li>
<li>an out-of-date link</li>
</ul>
<script>
var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host;
</script>
<script src="//linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
</div>
</body>
</html>
Binary file added assets/app/favicon.ico
Binary file not shown.
48 changes: 48 additions & 0 deletions assets/app/scripts/admin/admin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
'use strict';
var admin = angular.module('miningApp.admin',[])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when('/admin/connection', {
templateUrl: 'assets/app/views/connection.html',
controller: 'ConnectionCtrl'
})
.when('/admin/cube', {
templateUrl: 'assets/app/views/cube.html',
controller: 'CubeCtrl'
})
.when('/admin/element', {
templateUrl: 'assets/app/views/element.html',
controller: 'ElementCtrl'
})
.when('/admin/dashboard', {
templateUrl: 'assets/app/views/dashboard.html',
controller: 'DashboardCtrl'
})
.when('/admin/dashboard-group', {
templateUrl: 'assets/app/views/dashboard_group.html',
controller: 'DashboardGroupCtrl'
})
.when('/admin/user', {
templateUrl: 'assets/app/views/user.html',
controller: 'UserCtrl'
})
.when('/admin/late-scheduler', {
templateUrl: 'assets/app/views/late_scheduler.html',
controller: 'LateSchedulerCtrl'
})
.otherwise({
redirectTo: '/'
});
}])
.run(['$rootScope', 'Dashboard', 'Cube', '$interval',
function($rootScope, Dashboard, Cube, $interval){
$rootScope.late_cubes = Cube.getLate();
$rootScope.$on("UPDATE_LATE_CUBES", function(event, message){
$rootScope.late_cubes = message;
});
$interval(function(){
$rootScope.$emit("UPDATE_LATE_CUBES", Cube.getLate());
}, 10000);
$rootScope.dashboard = Dashboard.query();
}])
;
29 changes: 29 additions & 0 deletions assets/app/scripts/admin/controllers/connection.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
'use strict';
admin.controller('ConnectionCtrl', ['$scope', 'Connection', 'AlertService', '$rootScope',
function ($scope, Connection, AlertService, $rootScope) {
$rootScope.inSettings = true;
$scope.connections = Connection.query();
$scope.connection = new Connection();
$scope.selectConnection = function (c) {
$scope.connection = c;
};
$scope.deleteConnection = function (connection) {
Connection.delete({}, {'slug': connection.slug});
$scope.connections.splice($scope.connections.indexOf(connection), 1);
};
$scope.save = function () {
if ($scope.connection.slug) {
Connection.update({'slug': $scope.connection.slug}, $scope.connection);
} else {
$scope.connection.$save().then(function (response) {
AlertService.add('success', 'Save ok');
$scope.connections.push(response);
});
}
$scope.connection = new Connection();
};
$scope.newForm = function () {
$scope.connection = new Connection();
};
}
]);
Loading

0 comments on commit d71c198

Please sign in to comment.