Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
Vlass Manager UI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
Vlass Manager UI
Commits
08e115f5
Commit
08e115f5
authored
4 years ago
by
Reid Givens
Browse files
Options
Downloads
Patches
Plain Diff
SSA-6493: make the title tag hostname aware
parent
dd7b8ec9
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/app/app.component.ts
+25
-1
25 additions, 1 deletion
src/app/app.component.ts
src/app/app.module.ts
+3
-2
3 additions, 2 deletions
src/app/app.module.ts
src/app/env/window.provider.ts
+12
-0
12 additions, 0 deletions
src/app/env/window.provider.ts
src/index.html
+1
-1
1 addition, 1 deletion
src/index.html
with
41 additions
and
4 deletions
src/app/app.component.ts
+
25
−
1
View file @
08e115f5
...
...
@@ -18,6 +18,8 @@ import {
faToggleOn
}
from
"
@fortawesome/free-solid-svg-icons
"
;
import
{
DOCUMENT
}
from
"
@angular/common
"
;
import
{
WINDOW
}
from
"
./env/window.provider
"
;
import
{
Title
}
from
"
@angular/platform-browser
"
;
@
Component
({
selector
:
'
app-root
'
,
...
...
@@ -42,13 +44,35 @@ export class AppComponent {
public
darkMode
=
false
;
constructor
(
private
titleService
:
Title
,
private
authService
:
AuthService
,
private
storageService
:
StorageService
,
private
router
:
Router
,
private
route
:
ActivatedRoute
,
private
alertService
:
AlertService
,
@
Inject
(
DOCUMENT
)
document
@
Inject
(
DOCUMENT
)
document
,
@
Inject
(
WINDOW
)
private
window
:
Window
)
{
// set the title based on the host
let
title
=
'
VLASS Manager
'
switch
(
this
.
window
.
location
.
hostname
)
{
case
'
archive-test.nrao.edu
'
:
title
=
'
TEST |
'
+
title
;
break
;
case
'
archive-new.nrao.edu
'
:
// leave the title alone
break
;
case
'
webtest.aoc.nrao.edu
'
:
title
=
'
DEV |
'
+
title
;
break
;
case
'
localhost
'
:
title
=
'
LOCAL |
'
+
title
;
break
;
default
:
title
=
'
~?~ |
'
+
title
break
;
}
this
.
titleService
.
setTitle
(
title
);
/*
this.route.queryParams.subscribe(params => {
if (params.hasOwnProperty('ticket')) {
...
...
This diff is collapsed.
Click to expand it.
src/app/app.module.ts
+
3
−
2
View file @
08e115f5
import
{
BrowserModule
}
from
'
@angular/platform-browser
'
;
import
{
BrowserModule
,
Title
}
from
'
@angular/platform-browser
'
;
import
{
BrowserAnimationsModule
}
from
"
@angular/platform-browser/animations
"
;
import
{
APP_INITIALIZER
,
NgModule
}
from
'
@angular/core
'
;
import
{
NgbModule
}
from
"
@ng-bootstrap/ng-bootstrap
"
;
...
...
@@ -36,6 +36,7 @@ import {ExecutionDetailComponent} from './executions/execution/execution-detail/
import
{
FontAwesomeModule
}
from
"
@fortawesome/angular-fontawesome
"
;
import
{
LoadingComponent
}
from
'
./loading/loading.component
'
;
import
{
QueueSettingsComponent
}
from
'
./settings/queue-settings/queue-settings.component
'
;
import
{
WINDOW_PROVIDERS
}
from
"
./env/window.provider
"
;
/*
We will 'provide' this function below to load and set the global configuration from the
...
...
@@ -91,7 +92,7 @@ export function init_app(configService: ConfigurationService) {
useFactory
:
init_app
,
deps
:
[
ConfigurationService
],
multi
:
true
}],
}
,
Title
,
WINDOW_PROVIDERS
],
bootstrap
:
[
AppComponent
]
})
export
class
AppModule
{
...
...
This diff is collapsed.
Click to expand it.
src/app/env/window.provider.ts
0 → 100644
+
12
−
0
View file @
08e115f5
import
{
FactoryProvider
,
InjectionToken
}
from
'
@angular/core
'
;
export
const
WINDOW
=
new
InjectionToken
<
Window
>
(
'
window
'
);
const
windowProvider
:
FactoryProvider
=
{
provide
:
WINDOW
,
useFactory
:
()
=>
window
};
export
const
WINDOW_PROVIDERS
=
[
windowProvider
]
This diff is collapsed.
Click to expand it.
src/index.html
+
1
−
1
View file @
08e115f5
...
...
@@ -2,7 +2,7 @@
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
>
<title>
V
lassMngr2
</title>
<title>
V
LASS Manager
</title>
<base
href=
"./"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment