Skip to content

Commit

Permalink
Move the registry to in-memory cache (#6481)
Browse files Browse the repository at this point in the history
* feat(logging): remove plugin logger from start tasks of main plugin

- Enhance the logging messages
- Minor enhancements

* feat(logging): minor fixes to logging messages in the main plugin

* feat(logging): remove custom logger from endpoints of main plugin

* fix(logging): remove parameter of addJobToQueue

* feat(core): replace the loggin service and move services to core plugin

- Replace the logging services
- Move services to core plugin
  - CacheAPIUserAllowRunAs
  - ManageHosts
  - ServerAPIClient (aka api-interceptor)
  - ServerAPIHostEntries (aka )
  - UpdateConfigurationFile
  - UpdateRegistry
- Adapt the usage of services in the main and check updates plugin from
  core plugin
- Remove plugin logger from main and core plugins
- Remove API endpoint
  - GET /utils/logs/ui
- Remove unused code
- Adapt the test suites

* feat(logging): removed constants related to log files path

* fix(dependency): removed winston dependency of plugins and update the yarn.lock files

* fix(logging): removed logs.level plugin setting

* fix(logging): fixed monitoring and statistics backend tasks

* fix(monitoring): manage API host entries

* feat(core): add description to core services classes

* feat(docs): add docs to core plugin

* feat(docs): add description to core services

* test: fix of check updates plugin

* test: fix of check updates plugin

* feat(logging): remove the App logs application

- Remove GET /utils/logs endpoint
  - Remove related tests
- Remove App logs application

* fix: typo in UpdateRegistry service

* feat: add InputFormPassword component

* feat: add Configuration and ConfigurationStore services for core plugin

- Create Configuration service
- Create ConfigurationStore (backend and frontend side)
- Register the plugin settings in the configuration services

* feat: adapt API endpoints related to configuration to use the Configuration service

- API endpoints:
  - GET /utils/configuration
  - PUT /utils/configuration
  - PUT /utils/configuration/files/{key}
  - DELETE /utils/configuration/files/{key}

* feat: adapt the monitoring task of main plugin to use the Configuration service

* fix: remove unwanted log

* feat: adapt API endpoints related to sample data to the configuration service

* feat: enhance plugin settings to define the mapping in the saved object

* remove: remove buildIndexSettings service

* feat(configuration): remove reference to configuration file in App Settings

* feat(uilib): create buttons that opens flyouts

* fix: plugin settings definition

* feat(configuration): manage API host entries from the Server APIs
application

- Create API endpoints to manage the API host entries
  - PUT /hosts/apis/{id}
  - DELETE /hosts/apis/{id}
- Replace the Add new button on Server APIs application. Now it opens a
  flyout with a form to add the new API host
- Add edit and delete buttons to the table in Server APIs application
- Remove the render of old AddAPI component through AngularJS
- Remove deprecated methods of AngularJS controller related to Server
  APIs application
- Extend the definition of routes of main plugin to accept and use the
  configuration to validate the related endpoints

* feat(configuration): minor fixes and rename field in the settings definition

- Rename the `persistence` field to `store` in the settings definition
  to define how to store in the backend side
- Add readme files related to Configuration and ConfigurationStore
  services
- Add test for Configuration service
- Minor fixes in the Configuration service
- Define new methods for the Configuration instance of the frontend for
  the core plugin

* feat(configuration): code format to categories

* feat(configuration): renamed persistence to store in the setting definition of main plugin

* feat(configuration): workaround for cron.statistics.interval validation funtions

* fix(configuration): remove validation of body to delete API host entry from configuration

* feat(configuration): refactor ManageHosts service

- Refactor ManageHosts service:
  - Integrate the services within the ManageHosts service:
    - CacheAPIUserAllowRunAs
    - ServerAPIHostEntries
  - Renamed:
    - `serverAPIHostEntries.getHostsEntries` to `.getEntries`
    - `.getHostById` to `.get`
  - Adapted the usage of previous separated services
- Replaced the logic in the `DELETE /hosts/apis/{id}` by the usage of
  ManageHosts.delete instead of using the Configuration service
- Adapted the export types in the setup and start plugin life cycle
  methods
- Removed ServerAPIHostEntries: the methods were moved to ManageHosts
  service

* feat(configuration): remove unused UpdateConfigurationFile service

* fix(configuration): remove API host entry from the Server APIs table

* feat(configuration): remove getConfiguration service

- Remove getConfiguration service from the core and main plugins
- Replace partially the usage of getConfiguration service by
  Configuration
  - Add configuration dependency to the ReportPrinter and adapt when
    getting the configuration
  - Replace the usage on GET /api/logos
  - Replace some usages on the monitoring and statistics jobs
- Enhance the backend Configuration service with a .getCustomizationSetting method (replace the logic of old getCustomizationSetting)
- Remove the getCustomizationSetting service

* feat(configuration): enhance .getEntries method of ManageHost service

- Enhance .getEntries method of ManageHost service
  - Adapt usage
- Enhance IConfiguration type

* feat(configuration): Close flyout of adding/editing API host entry when applying the configuration

- Close flyout of adding/editing API host entry when applying the
  configuration

* fix(configuration): enhance the WzButtonOpenFlyout and WzButtonPermissionsOpenFlyout buttons

* fix(configuration): remove some unused services related to settings

* fix(configuration): workaround-to-be-adapted to display the Server API tables despite the current API is down

* fix(configuration): adapt the App Settings applications to the new Configuration service

* fix(configuration): add support to the useForm for arrayOf field type

* test: fix tests of check-updates plugin

* test(configuration): fix some tests

* feat(configuration): remove usage of getConfiguration deprecated service

* feat(configuration): remove deprecated services

- Remove deprecated services:
  - getCategorySettingByTitle
  - getSettingDefaultValue
  - getSettingsDefault
  - getSettingsByCategories
  - getSettingsDefaultList
  - groupSettingsByCategory
  - getPluginSettingDescription
  - services related to the creation of the initial file configuration

* feat(configuration): enhance Configuration.get method cloning the value to return

* remove(configuration): commented validations

* remove(configuration): category settings defition in the main plugin

* fix(configuration): enhance configuration store

- Enhance ConfigurationStore services (frontend and backend side)
- Some replacements of the usage of configuration service

* fix(test): fix tests related to configuration

* fix(test): fix some tests

* test: enhance tests

* feat(configuration): remove reference to wazuh.yml file path

* feat(configuration): add Encryptation backend service

- Add Encryptation backend service
  - Create tests
  - Add new `wazuh_core.encryptation.password` plugin config to be used
    by this service
  - Create instance of this within the ConfigurationStore of the backend
    side
- Enhance the docs

* feat(security): add new DashboardSecurity service to frontend

- Add new DashboardSecurity service to frontend
  - Moved the logic of checkCurrentSecurityPlatform service to a method
    of the new service. Adapt its usage.
  - Replace the logic in the Server API table to use the new service to
    manage the button permissions
  - Create instance in the core plugin and expose to rest of plugins
- Move routeDecoratorProtectedAdministratorRoleValidToken to a new routeDecoratorProtectedAdministrator
  route decorator to protect the routes related to manage the configuration.
   - Affected endpoints:
     - PUT /hosts/apis/{id}
     - DELETE /hosts/apis/{id}
     - PUT /utils/configuration
     - PUT /utils/configuration/files/{key}
     - DELETE /utils/configuration/files/{key}
   - Adapted related tests
- Enhance types of public in core plugin
- Add new method isAdministrator to the security factories in the
  backend side

* feat(configuration): error when updating partial configuration in App Settings

* git(configuration): rename Encryptation to Encryption service

- Rename Encryptation to Encryption service
- Moved the enhancement of Configuration service of the core plugin in
  the frontend side

* feat(encryption): moved the default value to constants

* todo: add todo

* docs(configuration): add a configuration readme file

- Create `user-manual` folder on `docs` of core plugin

* feat(configuratio): move the API is down view

- Move the API is down view
  - Remove render through AngularJS template
  - Remove properties defined in controller
  - Add a new callout to render in Server APIs
    - Include a button that opens a flyout with a basic troubleshooting

* fix(configuration): conditional view API is down callout

* feat(configuration): remove references to wazuh.yml

* feat(configuration): add a task to migrate the configuration file

- Add a task to migrate the configuration file
> After the migration, the configuration file is renamed to avoid the future updates

* feat(configuration): rename plugin settings properties

- Rename setting property: isConfigurableFromFile to isConfigurableFromSettings
- Remove setting property: isConfigurableFromUI
- Remove the settingss definition on the main plugin and some types.
  Adapt the usage of types from the core plugin.

* fix(configuration): fix password fields on editing API host entry

- Fix password fields on edition API host entry that
  displayed an error when this was not modified

* fix(configuration): fix error adding an API host entry

* fix(configuration): fix redefinition of styles related to EuiFormRow

* feat(configuration): reafactor the administrator user

- Create API endpoint: GET /utils/account/is-admin
- Refactor the DashboardSecurity method to get if the current user is
  an admin or not

* fix(configuration): fix default value of port setting of an API entry

* fix(configuration): fix response when the current user is not an administrator

* feat(configuration): add wazuh_core.security.administrator.roles plugin setting

- Add add wazuh_core.security.administrator.roles plugin setting to
  define the administrator users

* feat(configuration): fixed response of ConfigurationStore when updating settings on the server side

* todo(configuration): add todo

* feat(configuration): add CLI to udpate the configuration from file

* feat(configuration): replace the label of Add API host button

* feat(configuration): add endpoint to clear the configuration

- Add endpoint to clear the configuration:
  POST /utils/configuration/clear
- Clear the configuration in the migration or script to set the
  configuration

* feat(confgiuration): change API endpoint /utils/account/is-admin to /utils/account

* feat(configuration): refactor response of GET /utils/account API endpoint

- Rename properties of response of GET /utils/account
  - is_admin to administrator
  - message to administrator_message

* feat(configuration): add an option to clear the previous configuration

* feat(configuration): support for multiple instances of configuration

- Support for multiple instances of configuration that gives the ability
  to deploy multiple instances of Wazuh dashboard with independant
  configurations

* feat(configuration): apply the migration process if there is no saved
object stored

- Changes in the migrate configguration from file process:
  - Apply the migration process if there is no saved object stored yet.
  - Remove the renaming of file

* fix: remove the requirement of administrator user to remove reports in the Reports application

* feat(configuration): rename wazuh_core.configuration.instance to wazuh_core.instance

* remove: remove unused import

* feat(configuration): add user account data to Redux store

* feat(authorization): replace the authorization for the administrator actions

- Change in Redux:
  - Create userAccount property in the appStateReducers
  - Create action creator for the userAccount property
- Fetch the userAccount data when the application is initiated
- Remove previous management of administrator actions
  - Remove Redux action creator
  - Remove state property
  - Remove hooks
  - Remove HOCs
- Remove constants from main and core plugins:
  - WAZUH_ROLE_ADMINISTRATOR_ID
  - WAZUH_ROLE_ADMINISTRATOR_NAME
- Replace the optional requirement of API roles by plugin administrator in the
  WzButtonPermissions
- Replace the optional requirement of API roles by plugin administrator in the
  authorization HOCs
- Replace the protection of endpoints to use the plugin administrator instead
  of based in API roles:
  - POST /elastic/samplealerts/{category}
  - DELETE /elastic/samplealerts/{category}

* fix(configuration): replace the usage of deprecated getSettingDefaultValue

* fix: tests

* feat: rename platform setting from wazuh_core.configuration.encryption_password to wazuh_core.configuration.encryption_key

* fix: tests

* feat: rename script to setup the configuration

* feat(configuration): consider administrator used based on rest API access

- Replace the logic to consider the administrator user based on the rest
  API access
- Removed plugin setting: wazuh_core.security.administrator.roles
- Removed the required configuration of the DashboardSecurity service
  that is not necessary anymore

* feat(configuration): remove unused constant

* feat(configuration): fix clear

* feat(configuration): add cache to ConfigurationStore backend service

- Create CacheTTL class
- Add cache to ConfigurationStoreBackend

* fix(cache): wrong returned value

* fix(menu): minor bugs

- Fix infinte loop of requests when there are not configured API hosts entries
- Fix update of API hosts entries when changin the index pattern

* fix: fix update API host list when swithching the index pattern

* fix: apply buton was disabled when editing

* fix: adapt the configuration management to the stastistics job

* fix: sort the plugin setting categories by title

* fix: display callout related to API seems to be down

* fix: remove unused file

* fix: remove some unwanted comments

* fix: tests

* fix: resolve some todos

* changelog: add pull request entries

* fix: renamed some referecnts to API hosts by API connections

* fix: refactor update API host entry to use the ManageHosts instance instead

* fix: missing variable

* feat: move test of plugin setting input value validation to core plugin

* fix: replace refernces to API connections

* feat: add confirm modal to WzButtonPermissionsOpenFlyout and WzButtonOpenFlyout

* fix: variable name

* fix: move some AngularJS dependencies to the component in the ApiTable component

* fix: remove console log on setup-configuration script

* fix: execution of setup-script through the sh script

* fix: replace details button about the available updates

* feat(manage-hosts): enhance the management of API connections

- Create API endpoint to create API connections:
  - POST /hosts/apis/{id}
- Adapt the API request done by the form of API connection
- Adapt setup-configuration script to use the new API endpoint
- Add method to create API connection to the ManageHosts service

* feat: add platform server mock and wazuh-host test

* fix: enhance error messages in API endpoints related to API hosts management

* feat: enhance setup-configuration script

* fix: description of API endopoint controller

* fix: clear and reset method of Configuration service

* feat(configuration): replace the management of setup the plugins configuration

- Create new API endpoint to import a configuration file
  - POST /utils/configuration/import
- Create method to enhance the configuration of the backend side to
  manage the importation
- Remove duplicated code to check if updating some settings requires to
  do some actions to apply

* remove: remove unneeded script to setup the configuration

* fix(configuration): fix display warnings on settings that requires to run the health check

* feat(configuration): renamed the type of configuration saved objecto to wazuh-dashboard-plugins-config

* fix(configuration): tests

* remove(configuration): unused types and settings-validator service on main plugin

* fix: tests

* remove: remove unused API endpoint GET /api/timestamp

* remove: installationDate field of registry file

* remove: lastRestart field of registry file

* remove: unused method of UpdateRegistry service

* remove: name filed of registry file

* fix: add todo

* remove: remove API endpoint and usage of GET /hosts/remove-orphan-entries

* remove(registry): remove logic to create the registry file on start

* remove: remove API endpoint PUT /hosts/update-hostname/{id}

- Remove API endpoint (route and controller)
- Remove API request of frontend side

* feat(core): move the registry management to in memory cache in ManageHosts service

- Move the registry management to in memory cache managed by ManageHosts
  service.
  - Initialize the registry data on start
  - Update the registry on adding, editing or deleting an API host
- Remove the cacheAPIUserAllowRunAs of the ManageHosts service to use
  the registry data
  - Remove the cacheAPIUserAllowRunAs property of Manage hosts
- Move the logic to check if the run_as is enabled to the ManageHosts
  instead of cacheAPIUserAllowRunAs
- Remove the UpdateRegistry service
- Update the backend types of the core plugin

* changelog: add entry

* fix: move initiation of manageHost service

* fix(registry): enhance message about migrate configuration

* changelog: fix entry

* fix(reporting): tests

* remove: console.log

* fix: error deleting API connection

* fix(api-connections): error editing API connection entry when changing the id

* fix(api-connections): error Run as enabled in the API connections table

* changelog: add pull request entry

---------

Co-authored-by: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com>
Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
  • Loading branch information
3 people committed Apr 3, 2024
1 parent fc92c44 commit 1da123b
Show file tree
Hide file tree
Showing 26 changed files with 252 additions and 1,220 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Expand Up @@ -24,13 +24,20 @@ All notable changes to the Wazuh app project will be documented in this file.
- Change the view of API is down and check connection to Server APIs application [#6337](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6337)
- Changed the usage of the endpoint GET /groups/{group_id}/files/{file_name} [#6385](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6385)
- Refactoring and redesign endpoints summary visualizations [#6268](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6268)
- Moved the registry data to in-memory cache [#6481](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6481)
- Remove AngularJS controller for manage groups [#6543](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6543)
- Remove some branding references across the application. [#6155](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6155)

### Fixed

- Fixed the scripted fields disappear when the fields of the events index pattern was refreshed [#6237](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6237)

### Removed

- Removed API endpoint GET /api/timestamp [#6481](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6481)
- Removed API endpoint PUT /api/update-hostname/{id} [#6481](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6481)
- Removed API endpoint DELETE /hosts/remove-orphan-entries [#6481](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6481)

## Wazuh v4.8.2 - OpenSearch Dashboards 2.10.0 - Revision 00

### Added
Expand Down
Expand Up @@ -20,7 +20,8 @@ exports[`SettingsAboutAppInfo component should render version, revision, install
<div
class="euiText euiText--medium"
>
App version:
App version:
<b>
4.8.0
</b>
Expand All @@ -32,22 +33,10 @@ exports[`SettingsAboutAppInfo component should render version, revision, install
<div
class="euiText euiText--medium"
>
App revision:
<b>
01
</b>
</div>
</div>
<div
class="euiFlexItem"
>
<div
class="euiText euiText--medium"
>
Install date:
App revision:
<b>
Sep 25, 2023 @ 14:03:40.816
01
</b>
</div>
</div>
Expand Down
Expand Up @@ -14,9 +14,8 @@ describe('SettingsAboutAppInfo component', () => {
appInfo={{
'app-version': '4.8.0',
revision: '01',
installationDate: 'Sep 25, 2023 @ 14:03:40.816',
}}
/>
/>,
);

expect(container).toMatchSnapshot();
Expand All @@ -25,7 +24,5 @@ describe('SettingsAboutAppInfo component', () => {
expect(getByText('4.8.0')).toBeInTheDocument();
expect(getByText('App revision:')).toBeInTheDocument();
expect(getByText('01')).toBeInTheDocument();
expect(getByText('Install date:')).toBeInTheDocument();
expect(getByText('Sep 25, 2023 @ 14:03:40.816')).toBeInTheDocument();
});
});
24 changes: 12 additions & 12 deletions plugins/main/public/components/settings/about/appInfo.tsx
@@ -1,33 +1,33 @@
import { EuiCallOut, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui';
import React from 'react';
import { formatUIDate } from '../../../react-services/time-service';

interface SettingsAboutAppInfoProps {
appInfo?: {
'app-version': string;
installationDate: string;
revision: string;
};
}

export const SettingsAboutAppInfo = ({ appInfo }: SettingsAboutAppInfoProps) => {
export const SettingsAboutAppInfo = ({
appInfo,
}: SettingsAboutAppInfoProps) => {
return (
<EuiCallOut>
<EuiFlexGroup alignItems="center" justifyContent="flexStart" gutterSize="none">
<EuiFlexGroup
alignItems='center'
justifyContent='flexStart'
gutterSize='none'
>
<EuiFlexItem>
<EuiText>
App version: <b>{appInfo?.['app-version'] ? appInfo['app-version'] : ''}</b>
App version:{' '}
<b>{appInfo?.['app-version'] ? appInfo['app-version'] : ''}</b>
</EuiText>
</EuiFlexItem>
<EuiFlexItem>
<EuiText>
App revision: <b>{appInfo?.['revision'] ? appInfo['revision'] : ''}</b>
</EuiText>
</EuiFlexItem>
<EuiFlexItem>
<EuiText>
Install date:{' '}
<b>{appInfo?.['installationDate'] ? formatUIDate(appInfo['installationDate']) : ''}</b>
App revision:{' '}
<b>{appInfo?.['revision'] ? appInfo['revision'] : ''}</b>
</EuiText>
</EuiFlexItem>
</EuiFlexGroup>
Expand Down
Expand Up @@ -18,7 +18,6 @@ describe('SettingsAbout component', () => {
appInfo={{
'app-version': '4.8.0',
revision: '01',
installationDate: 'Sep 25, 2023 @ 14:03:40.816',
}}
pluginAppName='Dashboard'
/>,
Expand Down
5 changes: 2 additions & 3 deletions plugins/main/public/components/settings/about/index.tsx
Expand Up @@ -6,7 +6,6 @@ import { SettingsAboutGeneralInfo } from './generalInfo';
interface SettingsAboutProps {
appInfo?: {
'app-version': string;
installationDate: string;
revision: string;
};
pluginAppName: string;
Expand All @@ -16,10 +15,10 @@ export const SettingsAbout = (props: SettingsAboutProps) => {
const { appInfo, pluginAppName } = props;

return (
<EuiPage paddingSize="m">
<EuiPage paddingSize='m'>
<EuiPageBody>
<SettingsAboutAppInfo appInfo={appInfo} />
<EuiSpacer size="l" />
<EuiSpacer size='l' />
<SettingsAboutGeneralInfo pluginAppName={pluginAppName} />
</EuiPageBody>
</EuiPage>
Expand Down
13 changes: 1 addition & 12 deletions plugins/main/public/components/settings/api/api-table.js
Expand Up @@ -147,10 +147,6 @@ export const ApiTable = compose(
true,
);
APIConnection.cluster_info = response.data;
// Updates the cluster-information in the registry
await GenericRequest.request('PUT', `/hosts/update-hostname/${id}`, {
cluster_info: APIConnection.cluster_info,
});
APIConnection.status = 'online';
APIConnection.allow_run_as = response.data.allow_run_as;
!silent && ErrorHandler.info('Connection success', 'Settings');
Expand Down Expand Up @@ -218,14 +214,7 @@ export const ApiTable = compose(
const clusterInfo = data.data || {};
APIconnection.status = 'online';
APIconnection.cluster_info = clusterInfo;
//Updates the cluster info in the registry
await GenericRequest.request(
'PUT',
`/hosts/update-hostname/${APIconnection.id}`,
{
cluster_info: clusterInfo,
},
);
APIconnection.allow_run_as = clusterInfo.allow_run_as;
if (options?.selectAPIHostOnAvailable) {
this.setDefault(entry);
}
Expand Down
17 changes: 0 additions & 17 deletions plugins/main/public/components/wz-menu/wz-menu.js
Expand Up @@ -354,22 +354,6 @@ export const WzMenu = withWindowSize(
});
};

/**
* @param {String} id
* @param {Object} clusterInfo
* Updates the wazuh registry of an specific api id
*/
updateClusterInfoInRegistry = async (id, clusterInfo) => {
try {
const url = `/hosts/update-hostname/${id}`;
await this.genericReq.request('PUT', url, {
cluster_info: clusterInfo,
});
} catch (error) {
return Promise.reject(error);
}
};

changeAPI = async event => {
try {
const apiId = event.target[event.target.selectedIndex];
Expand All @@ -382,7 +366,6 @@ export const WzMenu = withWindowSize(
return item.id === apiId.value;
});

this.updateClusterInfoInRegistry(apiId.value, clusterInfo);
apiData[0].cluster_info = clusterInfo;

AppState.setClusterInfo(apiData[0].cluster_info);
Expand Down
23 changes: 0 additions & 23 deletions plugins/main/public/controllers/settings/settings.js
Expand Up @@ -125,8 +125,6 @@ export class SettingsController {
checkManager: entry => this.checkManager(entry),
getHosts: () => this.getHosts(),
testApi: (entry, force) => ApiCheck.checkApi(entry, force),
updateClusterInfoInRegistry: (id, clusterInfo) =>
this.updateClusterInfoInRegistry(id, clusterInfo),
copyToClipBoard: msg => this.copyToClipBoard(msg),
};

Expand Down Expand Up @@ -306,28 +304,9 @@ export class SettingsController {
};
getErrorOrchestrator().handleError(options);
}
// Every time that the API entries are required in the settings the registry will be checked in order to remove orphan host entries
await this.genericReq.request('POST', '/hosts/remove-orphan-entries', {
entries: this.apiEntries,
});
return;
}

/**
* @param {String} id
* @param {Object} clusterInfo
*/
async updateClusterInfoInRegistry(id, clusterInfo) {
try {
const url = `/hosts/update-hostname/${id}`;
await this.genericReq.request('PUT', url, {
cluster_info: clusterInfo,
});
} catch (error) {
return Promise.reject(error);
}
}

// Check manager connectivity
async checkManager(item, isIndex, silent = false) {
try {
Expand All @@ -351,7 +330,6 @@ export class SettingsController {
tmpData.cluster_info = data.data;
const { cluster_info } = tmpData;
// Updates the cluster-information in the registry
await this.updateClusterInfoInRegistry(id, cluster_info);
this.$scope.$emit('updateAPI', { cluster_info });
this.apiEntries[index].cluster_info = cluster_info;
this.apiEntries[index].status = 'online';
Expand Down Expand Up @@ -399,7 +377,6 @@ export class SettingsController {
const response = data.data.data;
this.appInfo = {
'app-version': response['app-version'],
installationDate: response['installationDate'],
revision: response['revision'],
};

Expand Down
33 changes: 0 additions & 33 deletions plugins/main/public/services/resolves/check-timestamp.js

This file was deleted.

10 changes: 1 addition & 9 deletions plugins/main/public/services/resolves/index.js
Expand Up @@ -9,18 +9,10 @@
*
* Find more information about this on the LICENSE file.
*/
import { checkTimestamp } from './check-timestamp';
import { healthCheck } from './health-check';
import { settingsWizard } from './settings-wizard';
import { getSavedSearch } from './get-saved-search';
import { getIp } from './get-ip';
import { getWzConfig } from './get-config';

export {
checkTimestamp,
healthCheck,
settingsWizard,
getSavedSearch,
getIp,
getWzConfig,
};
export { healthCheck, settingsWizard, getSavedSearch, getIp, getWzConfig };

0 comments on commit 1da123b

Please sign in to comment.