-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.0.7-beta - Manage buttons moved to service
- Loading branch information
Bruno Vale
committed
Apr 30, 2018
1 parent
77c0136
commit 7fc0358
Showing
35 changed files
with
161 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
swarmmanagercontroller/src/main/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
swarmmanagerfrontend/src/app/components/control.bar/control.bar.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-control-bar', | ||
styleUrls: ['control.bar.component.scss'], | ||
templateUrl: 'control.bar.component.html' | ||
}) | ||
export class ControlBarComponent { | ||
} |
10 changes: 0 additions & 10 deletions
10
swarmmanagerfrontend/src/app/components/list.control.bar/list.control.bar.component.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
swarmmanagerfrontend/src/app/services/docker/services/docker.service.state.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 26 additions & 14 deletions
40
swarmmanagerfrontend/src/app/services/utils/browser.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,54 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { NavigationEnd, NavigationStart, Router } from '@angular/router'; | ||
import { NavigationEnd, Router } from '@angular/router'; | ||
|
||
@Injectable() | ||
export class BrowserService { | ||
|
||
private backUrl: string; | ||
private currentUrl: string; | ||
private backEnabled: boolean; | ||
private goingBack = false; | ||
private history = []; | ||
|
||
constructor(private router: Router) { | ||
this.router.events | ||
.subscribe(event => { | ||
if (event instanceof NavigationEnd) { | ||
if (this.currentUrl != null) { | ||
this.backUrl = this.currentUrl; | ||
this.currentUrl = event.url; | ||
if (!this.goingBack) { | ||
this.history.push(event.url); | ||
} else { | ||
this.currentUrl = event.url; | ||
this.history.pop(); | ||
this.goingBack = false; | ||
} | ||
} | ||
}); | ||
} | ||
|
||
cannotGoBack(): boolean { | ||
return this.backUrl == null; | ||
return this.history.length == 1; | ||
} | ||
|
||
getBackUrl(): string { | ||
return this.backUrl; | ||
goBack(): string { | ||
this.goingBack = true; | ||
if (this.history.length > 1) { | ||
return this.history[this.history.length - 2]; | ||
} | ||
return null; | ||
} | ||
|
||
getPreviousUrl(): string { | ||
if (this.history.length > 1) { | ||
return this.history[this.history.length - 2]; | ||
} | ||
return null; | ||
} | ||
|
||
getCurrentUrl(): string { | ||
return this.currentUrl; | ||
if (this.history.length > 0) { | ||
return this.history[this.history.length - 1]; | ||
} | ||
return null; | ||
} | ||
|
||
reset(): void { | ||
this.currentUrl = null; | ||
this.backUrl = null; | ||
this.history = []; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.