Skip to content

Commit

Permalink
Merge pull request #36 from diggyk/master
Browse files Browse the repository at this point in the history
Start of questCreationController
  • Loading branch information
gmjosack committed Sep 10, 2015
2 parents d7f780f + f7959f8 commit 124fd4f
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 74 deletions.
8 changes: 3 additions & 5 deletions hermes/handlers/frontends.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
# Logging object
log = logging.getLogger(__name__)


class AppHandler(web.RequestHandler):
class NgApp(web.RequestHandler):
"""Our generic handler to serve out the root of our AngularJS app."""
def get(self, filename):
logging.info("REQ: {}".format(filename))
def get(self):
self.render(
os.path.join(os.path.dirname(__file__), "../webapp/build/{}".format(filename))
os.path.join(os.path.dirname(__file__), "../webapp/build/index.html")
)
15 changes: 12 additions & 3 deletions hermes/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,17 @@
(r"/api/v1/extquery\/?", api.ExtQueryHandler),

# Frontend Handlers
(r"/(.*)",
(
r"/((?:css|js|vendor|templates)/.*)",
web.StaticFileHandler,
dict(path=os.path.join(os.path.dirname(__file__), "webapp/build/"),
default_filename="index.html"))
dict(
path=os.path.join(os.path.dirname(__file__), "webapp/build")
)
),

# Frontend Handlers
(
r"/.*",
frontends.NgApp
)
]
4 changes: 2 additions & 2 deletions hermes/webapp/src/js/controllers/fateCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@
var pathStr = "M" + x1 + "," + y1
+ " C" + (x1 + indent) + "," + y1 + "," + x1 + "," + y2 + "," + (x1 + indent) + "," + y2
+ " L" + x2 + "," + y2;
console.log(pathStr);
paper.path(pathStr).attr({'stroke': '#000'});

addEdgeLabel(paper, settings, edge, (x1 + indent), y2);
Expand Down Expand Up @@ -243,6 +242,7 @@
}
}

angular.module('hermesApp').controller('FateCtrl', ['HermesService', FateCtrl]);
angular.module('hermesApp').controller('FateCtrl', FateCtrl);
FateCtrl.$inject = ['HermesService'];

})();
7 changes: 7 additions & 0 deletions hermes/webapp/src/js/controllers/questCreationCtrl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(function() {
'use strict';

function QuestCreationCtrl(hermesService) {

}
})();
61 changes: 0 additions & 61 deletions hermes/webapp/src/js/directives/sigma.js

This file was deleted.

3 changes: 3 additions & 0 deletions hermes/webapp/src/js/hermesApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
$routeProvider.when('/', {
templateUrl: '/templates/fateViewer.html',
reloadOnSearch: false
}).when('/fates', {
templateUrl: '/templates/fateViewer.html',
reloadOnSearch: false
}).otherwise({redirectTo: '/'});

// use the HTML5 History API
Expand Down
6 changes: 3 additions & 3 deletions hermes/webapp/src/js/services/hermesService.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@
* display
*/
function layoutGraph(baseX, node) {
console.log(baseX + ", " + baseY);

// update the x and y coords of this node
node["x"] = baseX;
node["y"] = baseY;
Expand Down Expand Up @@ -189,6 +187,8 @@
}

angular.module('hermesApp')
.factory('HermesService', ["$http", "$q", HermesService]);
.factory('HermesService',HermesService);

HermesService.$inject = ["$http", "$q"];

})();

0 comments on commit 124fd4f

Please sign in to comment.