
remove node modules make new data file for web ui initial commit of dashboard switch back to non SSL request move port splitting to common place; add to node resource location Signed-off-by: Patrick Reilly <patrick@kismatic.io> various path fixes make svg path relative work around missing mime type Signed-off-by: Patrick Reilly <patrick@kismatic.io> fix paths fix karma path remove bad protractor test
26 lines
590 B
JavaScript
26 lines
590 B
JavaScript
/**=========================================================
|
|
* Module: tabs-global.js
|
|
* Page Controller
|
|
=========================================================*/
|
|
|
|
app.controller('TabCtrl', [
|
|
'$scope',
|
|
'$location',
|
|
'tabs',
|
|
function($scope, $location, tabs) {
|
|
$scope.tabs = tabs;
|
|
|
|
$scope.switchTab = function(index) {
|
|
var location_path = $location.path();
|
|
var tab = tabs[index];
|
|
|
|
if (tab) {
|
|
var path = '/%s'.format(tab.component);
|
|
if (location_path.indexOf(path) == -1) {
|
|
$location.path(path);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
]);
|