Skip to content

Commit

Permalink
[#1206] Renamed Kea config refresh button
Browse files Browse the repository at this point in the history
  • Loading branch information
msiodelski committed Nov 27, 2023
1 parent bd0b9c2 commit 321e888
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
12 changes: 6 additions & 6 deletions doc/user/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,8 @@ there are three types of triggers:

The selectors and triggers are not configurable by a user.

Refreshing Kea Configurations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Synchronizing Kea Configurations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Stork pullers periodically check Kea configurations against the local copies
stored in the Stork database. These local copies are only updated when Stork
Expand All @@ -830,16 +830,16 @@ servers to Stork.

There are many internal operations in Stork occuring when the configuration change
has been detected (e.g., populating host reservations, log viewer initialization,
configuration reviews, and many others). Refreshing the configurations from Kea
configuration reviews, and many others). Resynchronizing the configurations from Kea
triggers all these tasks. It may possibly correct some data integrity issues that
may sometimes occur due to software bugs, network errors, or any other reason.

To schedule refreshing the configuration from the Kea servers, navigate to
``Services`` and then ``Kea Apps``. Click on ``Refresh Kea Configs`` button.
To schedule the configuration synchronization from the Kea servers, navigate to
``Services`` and then ``Kea Apps``. Click on ``Resynchronize Kea Configs`` button.
The pullers will fetch and populate the updated configuration data, but depending
on the configured puller intervals, it will take some time. Ensure the pullers
are not disabled on the ``Settings`` page; otherwise, the configurations will
never refresh.
never re-synchronize.

Dashboard
=========
Expand Down
6 changes: 3 additions & 3 deletions webui/src/app/apps-page/apps-page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@
</div>
<div *ngIf="appType === 'kea'" class="ml-2">
<p-button
id="apps-refresh-button"
label="Refresh Kea Configs"
id="sync-kea-configs-button"
label="Resynchronize Kea Configs"
icon="pi pi-file-import"
styleClass="p-button-warning"
(click)="onRefreshKeaConfigs($event)"
(click)="onSyncKeaConfigs($event)"
></p-button>
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions webui/src/app/apps-page/apps-page.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ describe('AppsPageComponent', () => {
expect(breadcrumbsComponent.items[1].label).toEqual('Kea Apps')
})

it('should refresh configurations from Kea', fakeAsync(() => {
component.onRefreshKeaConfigs(null)
it('should request synchronization configurations from Kea', fakeAsync(() => {
component.onSyncKeaConfigs(null)
fixture.detectChanges()

const dialog = fixture.debugElement.query(By.directive(ConfirmDialog))
Expand All @@ -157,8 +157,8 @@ describe('AppsPageComponent', () => {
expect(msgSrv.add).toHaveBeenCalled()
}))

it('should report an error while refreshing configurations from Kea', fakeAsync(() => {
component.onRefreshKeaConfigs(null)
it('should report an error while requesting synchronization configurations from Kea', fakeAsync(() => {
component.onSyncKeaConfigs(null)
fixture.detectChanges()

const dialog = fixture.debugElement.query(By.directive(ConfirmDialog))
Expand All @@ -178,8 +178,8 @@ describe('AppsPageComponent', () => {
expect(msgSrv.add).toHaveBeenCalled()
}))

it('should cancel refreshing conifgurations from Kea', fakeAsync(() => {
component.onRefreshKeaConfigs(null)
it('should cancel synchronizing conifgurations from Kea', fakeAsync(() => {
component.onSyncKeaConfigs(null)
fixture.detectChanges()

const dialog = fixture.debugElement.query(By.directive(ConfirmDialog))
Expand Down
14 changes: 7 additions & 7 deletions webui/src/app/apps-page/apps-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,22 +346,22 @@ export class AppsPageComponent implements OnInit, OnDestroy {
}

/**
* Sends a request to the server to clear Kea config hashes.
* Sends a request to the server to re-synchronize Kea configs.
*
* Clearing the config hashes causes the server to fetch and update
* Kea configurations in the Stork database.
*
* @param event event triggered on button click.
*/
onRefreshKeaConfigs(event): void {
onSyncKeaConfigs(event): void {
this.confirmService.confirm({
message:
'This operation instructs the server to fetch the configurations from all Kea servers' +
' and update them in the Stork database. Use it when you suspect that the configuration' +
' information diverged between Kea and Stork. This operation should be harmless and typically' +
' it only causes some additional overhead to populate the fetched data. Populating the data ' +
' can take some time depending on the puller intervals settings and Kea servers availability.',
header: 'Refresh Kea Configs',
header: 'Resynchronize Kea Configs',
icon: 'pi pi-exclamation-triangle',
acceptLabel: 'Continue',
rejectLabel: 'Cancel',
Expand All @@ -373,9 +373,9 @@ export class AppsPageComponent implements OnInit, OnDestroy {
.then(() => {
this.msgSrv.add({
severity: 'success',
summary: 'Request to refresh sent',
summary: 'Request to resynchronize sent',
detail:
'Successfully sent the request to the server to refresh' +
'Successfully sent the request to the server to resynchronize' +
' Kea configurations in Stork server. It may take a while' +
' before it takes effect.',
life: 10000,
Expand All @@ -384,9 +384,9 @@ export class AppsPageComponent implements OnInit, OnDestroy {
.catch(() => {
this.msgSrv.add({
severity: 'error',
summary: 'Request to refresh failed',
summary: 'Request to resynchronize failed',
detail:
'The request to refresh Kea configurations in Stork failed' +
'The request to resynchronize Kea configurations in Stork failed' +
' due to an internal server error. You can try again to see' +
' if the error goes away.',
life: 10000,
Expand Down

0 comments on commit 321e888

Please sign in to comment.