-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21977 from votdev/info_no_rgw_mimic
mimic: mgr/dashboard: Display notification if RGW is not configured Reviewed-by: Ricardo Dias <rdias@suse.com> Reviewed-by: Tatjana Dehler <tdehler@suse.com>
- Loading branch information
Showing
15 changed files
with
313 additions
and
35 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
12 changes: 12 additions & 0 deletions
12
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-501/rgw-501.component.html
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,12 @@ | ||
<nav aria-label="breadcrumb"> | ||
<ol class="breadcrumb"> | ||
<li i18n | ||
class="breadcrumb-item">Object Gateway</li> | ||
</ol> | ||
</nav> | ||
<cd-info-panel> | ||
{{ message }} | ||
<ng-container i18n> | ||
Please consult the <a href="http://docs.ceph.com/docs/mimic/mgr/dashboard/#enabling-the-object-gateway-management-frontend">documentation</a> on how to configure and enable the Object Gateway management functionality. | ||
</ng-container> | ||
</cd-info-panel> |
6 changes: 6 additions & 0 deletions
6
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-501/rgw-501.component.scss
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,6 @@ | ||
.alert-row-icon { | ||
vertical-align: top; | ||
padding-right: 15px; | ||
} | ||
.alert-row-text { | ||
} |
31 changes: 31 additions & 0 deletions
31
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-501/rgw-501.component.spec.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,31 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { RouterTestingModule } from '@angular/router/testing'; | ||
|
||
import { SharedModule } from '../../../shared/shared.module'; | ||
import { Rgw501Component } from './rgw-501.component'; | ||
|
||
describe('Rgw501Component', () => { | ||
let component: Rgw501Component; | ||
let fixture: ComponentFixture<Rgw501Component>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ Rgw501Component ], | ||
imports: [ | ||
RouterTestingModule, | ||
SharedModule | ||
] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(Rgw501Component); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
26 changes: 26 additions & 0 deletions
26
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-501/rgw-501.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,26 @@ | ||
import { Component, OnDestroy, OnInit } from '@angular/core'; | ||
import { ActivatedRoute } from '@angular/router'; | ||
|
||
import * as _ from 'lodash'; | ||
|
||
@Component({ | ||
selector: 'cd-rgw-501', | ||
templateUrl: './rgw-501.component.html', | ||
styleUrls: ['./rgw-501.component.scss'] | ||
}) | ||
export class Rgw501Component implements OnInit, OnDestroy { | ||
message = 'The Object Gateway service is not configured.'; | ||
routeParamsSubscribe: any; | ||
|
||
constructor(private route: ActivatedRoute) {} | ||
|
||
ngOnInit() { | ||
this.routeParamsSubscribe = this.route.params.subscribe((params: { message: string }) => { | ||
this.message = params.message; | ||
}); | ||
} | ||
|
||
ngOnDestroy() { | ||
this.routeParamsSubscribe.unsubscribe(); | ||
} | ||
} |
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
18 changes: 18 additions & 0 deletions
18
...ind/mgr/dashboard/frontend/src/app/shared/components/info-panel/info-panel.component.html
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,18 @@ | ||
<alert type="info"> | ||
<table> | ||
<tr> | ||
<td rowspan="2" class="info-panel-alert-icon"> | ||
<i class="fa fa-3x fa-info-circle alert-info" | ||
aria-hidden="true"></i> | ||
</td> | ||
<td class="info-panel-alert-title"> | ||
{{ title }} | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="info-panel-alert-text"> | ||
<ng-content></ng-content> | ||
</td> | ||
</tr> | ||
</table> | ||
</alert> |
9 changes: 9 additions & 0 deletions
9
...ind/mgr/dashboard/frontend/src/app/shared/components/info-panel/info-panel.component.scss
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,9 @@ | ||
.info-panel-alert-icon { | ||
vertical-align: top; | ||
padding-right: 15px; // See @alert-padding in bootstrap/less/variables.less | ||
} | ||
.info-panel-alert-title { | ||
font-weight: bold; | ||
} | ||
.info-panel-alert-text { | ||
} |
28 changes: 28 additions & 0 deletions
28
.../mgr/dashboard/frontend/src/app/shared/components/info-panel/info-panel.component.spec.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,28 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { AlertModule } from 'ngx-bootstrap'; | ||
|
||
import { InfoPanelComponent } from './info-panel.component'; | ||
|
||
describe('InfoPanelComponent', () => { | ||
let component: InfoPanelComponent; | ||
let fixture: ComponentFixture<InfoPanelComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ InfoPanelComponent ], | ||
imports: [ AlertModule.forRoot() ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(InfoPanelComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
14 changes: 14 additions & 0 deletions
14
...ybind/mgr/dashboard/frontend/src/app/shared/components/info-panel/info-panel.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,14 @@ | ||
import { Component, Input } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'cd-info-panel', | ||
templateUrl: './info-panel.component.html', | ||
styleUrls: ['./info-panel.component.scss'] | ||
}) | ||
export class InfoPanelComponent { | ||
/** | ||
* The title to be displayed. Defaults to 'Information'. | ||
* @type {string} | ||
*/ | ||
@Input() title = 'Information'; | ||
} |
Oops, something went wrong.