mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-07-14 01:57:32 +08:00
parent
81280517bf
commit
41d2b5f235
@ -164,9 +164,10 @@
|
||||
$scope.instances.push(instance);
|
||||
$scope.idx[instance.name] = instance;
|
||||
}
|
||||
if ($scope.instances.length) {
|
||||
$scope.showInstance($scope.instances[0]);
|
||||
}
|
||||
|
||||
// If instance is passed in URL, select it
|
||||
let inst = $scope.idx[$location.hash()];
|
||||
if (inst) $scope.showInstance(inst);
|
||||
}, function(response) {
|
||||
if (response.status == 404) {
|
||||
document.write('session not found');
|
||||
@ -183,6 +184,7 @@
|
||||
|
||||
$scope.showInstance = function(instance) {
|
||||
$scope.selectedInstance = instance;
|
||||
$location.hash(instance.name);
|
||||
if (!instance.creatingTerminal) {
|
||||
if (!instance.term) {
|
||||
$timeout(function() {
|
||||
@ -287,8 +289,8 @@
|
||||
}
|
||||
}
|
||||
}])
|
||||
|
||||
.config(['$mdIconProvider', function($mdIconProvider) {
|
||||
$mdIconProvider.defaultIconSet('../assets/social-icons.svg', 24);
|
||||
}]);
|
||||
.config(['$mdIconProvider', '$locationProvider', function($mdIconProvider, $locationProvider) {
|
||||
$locationProvider.html5Mode({enabled: true, requireBase: false});
|
||||
$mdIconProvider.defaultIconSet('../assets/social-icons.svg', 24);
|
||||
}]);
|
||||
})();
|
||||
|
Loading…
x
Reference in New Issue
Block a user