Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the registry to in-memory cache #6481

Merged
merged 169 commits into from Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
701b9aa
feat(logging): remove plugin logger from start tasks of main plugin
Desvelao Nov 21, 2023
70f02f4
feat(logging): minor fixes to logging messages in the main plugin
Desvelao Nov 21, 2023
c3ba9d1
feat(logging): remove custom logger from endpoints of main plugin
Desvelao Nov 21, 2023
7c34345
fix(logging): remove parameter of addJobToQueue
Desvelao Nov 21, 2023
ff2c07d
feat(core): replace the loggin service and move services to core plugin
Desvelao Nov 28, 2023
283788e
Merge branch 'master' of https://github.com/wazuh/wazuh-kibana-app in…
Desvelao Nov 28, 2023
842b4a3
feat(logging): removed constants related to log files path
Desvelao Nov 28, 2023
dad9274
fix(dependency): removed winston dependency of plugins and update the…
Desvelao Nov 28, 2023
3914913
fix(logging): removed logs.level plugin setting
Desvelao Nov 28, 2023
20ed9bc
fix(logging): fixed monitoring and statistics backend tasks
Desvelao Nov 28, 2023
dba3e2f
Merge branch 'master' of https://github.com/wazuh/wazuh-kibana-app in…
Desvelao Dec 1, 2023
2d0053b
fix(monitoring): manage API host entries
Desvelao Dec 4, 2023
a9de346
feat(core): add description to core services classes
Desvelao Dec 4, 2023
20b0f90
feat(docs): add docs to core plugin
Desvelao Dec 4, 2023
9ca647e
feat(docs): add description to core services
Desvelao Dec 4, 2023
54187b5
test: fix of check updates plugin
Desvelao Dec 5, 2023
efc99e2
test: fix of check updates plugin
Desvelao Dec 5, 2023
d726682
feat(logging): remove the App logs application
Desvelao Dec 11, 2023
87b2b18
fix: typo in UpdateRegistry service
Desvelao Dec 22, 2023
6042fe5
feat: add InputFormPassword component
Desvelao Dec 22, 2023
ac8b873
feat: add Configuration and ConfigurationStore services for core plugin
Desvelao Dec 22, 2023
b0fd099
feat: adapt API endpoints related to configuration to use the Configu…
Desvelao Dec 22, 2023
1edc282
feat: adapt the monitoring task of main plugin to use the Configurati…
Desvelao Dec 22, 2023
9d24c19
fix: remove unwanted log
Desvelao Dec 22, 2023
322abe1
feat: adapt API endpoints related to sample data to the configuration…
Desvelao Dec 22, 2023
3fb4c1d
feat: enhance plugin settings to define the mapping in the saved object
Desvelao Dec 22, 2023
60bd3e4
remove: remove buildIndexSettings service
Desvelao Dec 22, 2023
25c68fa
feat(configuration): remove reference to configuration file in App Se…
Desvelao Jan 9, 2024
0c4f64a
feat(uilib): create buttons that opens flyouts
Desvelao Jan 9, 2024
e61360e
fix: plugin settings definition
Desvelao Jan 9, 2024
6e6747f
feat(configuration): manage API host entries from the Server APIs
Desvelao Jan 16, 2024
19df5cc
feat(configuration): minor fixes and rename field in the settings def…
Desvelao Jan 16, 2024
f1fc446
feat(configuration): code format to categories
Desvelao Jan 16, 2024
a437cd7
feat(configuration): renamed persistence to store in the setting defi…
Desvelao Jan 16, 2024
8a81c8f
feat(configuration): workaround for cron.statistics.interval validati…
Desvelao Jan 16, 2024
2b983bb
fix(configuration): remove validation of body to delete API host entr…
Desvelao Jan 17, 2024
3297abb
feat(configuration): refactor ManageHosts service
Desvelao Jan 17, 2024
af186dd
feat(configuration): remove unused UpdateConfigurationFile service
Desvelao Jan 17, 2024
f7b6a24
fix(configuration): remove API host entry from the Server APIs table
Desvelao Jan 17, 2024
e6be313
feat(configuration): remove getConfiguration service
Desvelao Jan 17, 2024
9ac67b5
feat(configuration): enhance .getEntries method of ManageHost service
Desvelao Jan 17, 2024
954e30e
feat(configuration): Close flyout of adding/editing API host entry wh…
Desvelao Jan 17, 2024
e6071a3
fix(configuration): enhance the WzButtonOpenFlyout and WzButtonPermis…
Desvelao Jan 17, 2024
c3bae50
fix(configuration): remove some unused services related to settings
Desvelao Jan 17, 2024
c1b28e8
fix(configuration): workaround-to-be-adapted to display the Server AP…
Desvelao Jan 17, 2024
9a4814c
fix(configuration): adapt the App Settings applications to the new Co…
Desvelao Jan 17, 2024
a8c1b3e
fix(configuration): add support to the useForm for arrayOf field type
Desvelao Jan 17, 2024
e3542e9
Merge branch 'master' of https://github.com/wazuh/wazuh-kibana-app in…
Desvelao Jan 17, 2024
c28a428
test: fix tests of check-updates plugin
Desvelao Jan 17, 2024
9cb1424
test(configuration): fix some tests
Desvelao Jan 18, 2024
8c884ca
feat(configuration): remove usage of getConfiguration deprecated service
Desvelao Jan 18, 2024
c147487
feat(configuration): remove deprecated services
Desvelao Jan 18, 2024
29b1e6b
feat(configuration): enhance Configuration.get method cloning the val…
Desvelao Jan 18, 2024
e0fa4c6
remove(configuration): commented validations
Desvelao Jan 18, 2024
b13a31a
remove(configuration): category settings defition in the main plugin
Desvelao Jan 18, 2024
88699c1
fix(configuration): enhance configuration store
Desvelao Jan 19, 2024
fa9eb42
fix(test): fix tests related to configuration
Desvelao Jan 19, 2024
98e75d4
fix(test): fix some tests
Desvelao Jan 19, 2024
4b9145c
test: enhance tests
Desvelao Jan 22, 2024
832db0c
feat(configuration): remove reference to wazuh.yml file path
Desvelao Jan 23, 2024
3a68651
feat(configuration): add Encryptation backend service
Desvelao Jan 23, 2024
ffe0c98
feat(security): add new DashboardSecurity service to frontend
Desvelao Jan 23, 2024
782fadd
feat(configuration): error when updating partial configuration in App…
Desvelao Jan 23, 2024
a2ca290
git(configuration): rename Encryptation to Encryption service
Desvelao Jan 23, 2024
5ef49bf
feat(encryption): moved the default value to constants
Desvelao Jan 23, 2024
a2eec61
todo: add todo
Desvelao Jan 23, 2024
cf398cb
docs(configuration): add a configuration readme file
Desvelao Jan 23, 2024
f23067c
feat(configuratio): move the API is down view
Desvelao Feb 1, 2024
12d2c2b
fix(configuration): conditional view API is down callout
Desvelao Feb 1, 2024
7188b96
feat(configuration): remove references to wazuh.yml
Desvelao Feb 2, 2024
02f4da7
feat(configuration): add a task to migrate the configuration file
Desvelao Feb 2, 2024
d07c6df
feat(configuration): rename plugin settings properties
Desvelao Feb 5, 2024
4c634eb
fix(configuration): fix password fields on editing API host entry
Desvelao Feb 5, 2024
bdfc8be
fix(configuration): fix error adding an API host entry
Desvelao Feb 5, 2024
c57c041
fix(configuration): fix redefinition of styles related to EuiFormRow
Desvelao Feb 5, 2024
33835ee
feat(configuration): reafactor the administrator user
Desvelao Feb 5, 2024
0acefcc
fix(configuration): fix default value of port setting of an API entry
Desvelao Feb 5, 2024
edbfca5
fix(configuration): fix response when the current user is not an admi…
Desvelao Feb 5, 2024
6feb6ca
feat(configuration): add wazuh_core.security.administrator.roles plug…
Desvelao Feb 5, 2024
ea46c7e
feat(configuration): fixed response of ConfigurationStore when updati…
Desvelao Feb 6, 2024
57b6369
todo(configuration): add todo
Desvelao Feb 6, 2024
780fd49
feat(configuration): add CLI to udpate the configuration from file
Desvelao Feb 6, 2024
fdaf6b7
feat(configuration): replace the label of Add API host button
Desvelao Feb 7, 2024
c1a351a
feat(configuration): add endpoint to clear the configuration
Desvelao Feb 7, 2024
8921b0d
feat(confgiuration): change API endpoint /utils/account/is-admin to /…
Desvelao Feb 7, 2024
6afed42
feat(configuration): refactor response of GET /utils/account API endp…
Desvelao Feb 7, 2024
8aaf86e
feat(configuration): add an option to clear the previous configuration
Desvelao Feb 7, 2024
a306a8d
feat(configuration): support for multiple instances of configuration
Desvelao Feb 8, 2024
a600c26
feat(configuration): apply the migration process if there is no saved
Desvelao Feb 8, 2024
5f7cff3
fix: remove the requirement of administrator user to remove reports i…
Desvelao Feb 8, 2024
167a9bf
feat(configuration): rename wazuh_core.configuration.instance to wazu…
Desvelao Feb 8, 2024
c6a0dc1
remove: remove unused import
Desvelao Feb 8, 2024
b5a6069
feat(configuration): add user account data to Redux store
Desvelao Feb 8, 2024
a852a85
feat(authorization): replace the authorization for the administrator …
Desvelao Feb 9, 2024
cee2488
Merge branch '4.9.0' of https://github.com/wazuh/wazuh-kibana-app int…
Desvelao Feb 20, 2024
a49dad0
fix(configuration): replace the usage of deprecated getSettingDefault…
Desvelao Feb 20, 2024
1b4440b
fix: tests
Desvelao Feb 20, 2024
9eab3c1
feat: rename platform setting from wazuh_core.configuration.encryptio…
Desvelao Feb 21, 2024
a6ae945
fix: tests
Desvelao Feb 21, 2024
905d510
feat: rename script to setup the configuration
Desvelao Feb 21, 2024
7afcd70
feat(configuration): consider administrator used based on rest API ac…
Desvelao Feb 21, 2024
790820d
feat(configuration): remove unused constant
Desvelao Feb 22, 2024
d25c469
feat(configuration): fix clear
Desvelao Feb 22, 2024
74f151e
feat(configuration): add cache to ConfigurationStore backend service
Desvelao Feb 23, 2024
a24b6a0
fix(cache): wrong returned value
Desvelao Feb 23, 2024
a5dcce6
fix(menu): minor bugs
Desvelao Feb 23, 2024
b12087e
fix: fix update API host list when swithching the index pattern
Desvelao Feb 26, 2024
b810caf
fix: apply buton was disabled when editing
Desvelao Feb 26, 2024
b5fe654
fix: adapt the configuration management to the stastistics job
Desvelao Feb 26, 2024
1ad52f7
fix: sort the plugin setting categories by title
Desvelao Feb 26, 2024
0a199b4
fix: display callout related to API seems to be down
Desvelao Feb 26, 2024
d2cd4dd
fix: remove unused file
Desvelao Feb 26, 2024
f5953f9
fix: remove some unwanted comments
Desvelao Feb 26, 2024
d5226ac
Merge branch '4.9.0' of https://github.com/wazuh/wazuh-kibana-app int…
Desvelao Feb 26, 2024
e3b20d6
fix: tests
Desvelao Feb 26, 2024
4278cdc
fix: resolve some todos
Desvelao Feb 26, 2024
2265d11
changelog: add pull request entries
Desvelao Feb 26, 2024
772cd3c
fix: renamed some referecnts to API hosts by API connections
Desvelao Feb 26, 2024
acdb6c5
fix: refactor update API host entry to use the ManageHosts instance i…
Desvelao Feb 26, 2024
ff5b4be
fix: missing variable
Desvelao Feb 27, 2024
5b01682
feat: move test of plugin setting input value validation to core plugin
Desvelao Feb 27, 2024
4448efd
fix: replace refernces to API connections
Desvelao Feb 27, 2024
af40c8f
feat: add confirm modal to WzButtonPermissionsOpenFlyout and WzButton…
Desvelao Feb 27, 2024
81b918c
fix: variable name
Desvelao Feb 27, 2024
b75a5cd
fix: move some AngularJS dependencies to the component in the ApiTabl…
Desvelao Feb 29, 2024
d3a3254
fix: remove console log on setup-configuration script
Desvelao Feb 29, 2024
725449b
fix: execution of setup-script through the sh script
Desvelao Feb 29, 2024
1f43ddb
fix: replace details button about the available updates
Desvelao Feb 29, 2024
245d6c1
feat(manage-hosts): enhance the management of API connections
Desvelao Feb 29, 2024
8bc797f
feat: add platform server mock and wazuh-host test
Desvelao Mar 1, 2024
1ff572b
fix: enhance error messages in API endpoints related to API hosts man…
Desvelao Mar 1, 2024
52f93da
feat: enhance setup-configuration script
Desvelao Mar 1, 2024
67376d0
fix: description of API endopoint controller
Desvelao Mar 1, 2024
73025f8
fix: clear and reset method of Configuration service
Desvelao Mar 1, 2024
ce1044a
feat(configuration): replace the management of setup the plugins conf…
Desvelao Mar 1, 2024
fededde
remove: remove unneeded script to setup the configuration
Desvelao Mar 4, 2024
3146de6
Merge branch '4.9.0' of https://github.com/wazuh/wazuh-kibana-app int…
Desvelao Mar 4, 2024
a502874
fix(configuration): fix display warnings on settings that requires to…
Desvelao Mar 4, 2024
247a467
feat(configuration): renamed the type of configuration saved objecto …
Desvelao Mar 4, 2024
840651c
fix(configuration): tests
Desvelao Mar 4, 2024
551e2d2
remove(configuration): unused types and settings-validator service on…
Desvelao Mar 4, 2024
95dc071
fix: tests
Desvelao Mar 4, 2024
2953d9d
remove: remove unused API endpoint GET /api/timestamp
Desvelao Mar 4, 2024
3edf02d
remove: installationDate field of registry file
Desvelao Mar 4, 2024
8eead37
remove: lastRestart field of registry file
Desvelao Mar 4, 2024
090b45e
remove: unused method of UpdateRegistry service
Desvelao Mar 4, 2024
47ef0dc
remove: name filed of registry file
Desvelao Mar 4, 2024
e57702d
fix: add todo
Desvelao Mar 4, 2024
b81ccb8
remove: remove API endpoint and usage of GET /hosts/remove-orphan-ent…
Desvelao Mar 5, 2024
4b5086f
remove(registry): remove logic to create the registry file on start
Desvelao Mar 6, 2024
3214435
remove: remove API endpoint PUT /hosts/update-hostname/{id}
Desvelao Mar 6, 2024
f6f72a5
feat(core): move the registry management to in memory cache in Manage…
Desvelao Mar 6, 2024
44ac5ff
changelog: add entry
Desvelao Mar 6, 2024
3a3107b
Merge branch '4.9.0' of https://github.com/wazuh/wazuh-kibana-app int…
Desvelao Mar 6, 2024
19654bf
fix: move initiation of manageHost service
Desvelao Mar 6, 2024
80c247f
Merge branch '4.9.0' of https://github.com/wazuh/wazuh-kibana-app int…
Desvelao Mar 12, 2024
0b0f4ce
fix(registry): enhance message about migrate configuration
Desvelao Mar 12, 2024
3eec239
changelog: fix entry
Desvelao Mar 12, 2024
e816067
fix(reporting): tests
Desvelao Mar 12, 2024
a08582c
Merge branch '4.9.0' into enhancement/6387-registry-stateless
yenienserrano Mar 18, 2024
cab4219
remove: console.log
Desvelao Mar 20, 2024
c839d9c
Merge branch 'enhancement/6387-registry-stateless' of https://github.…
Desvelao Mar 20, 2024
65a0fb6
Merge branch '4.9.0' into enhancement/6387-registry-stateless
Desvelao Mar 20, 2024
721023c
fix: error deleting API connection
Desvelao Mar 20, 2024
561a4ec
fix(api-connections): error editing API connection entry when changin…
Desvelao Mar 20, 2024
7c944a4
fix(api-connections): error Run as enabled in the API connections table
Desvelao Mar 20, 2024
b6d34c4
changelog: add pull request entry
Desvelao Mar 21, 2024
4149028
Merge branch '4.9.0' into enhancement/6387-registry-stateless
asteriscos Mar 22, 2024
0c356b9
Merge branch '4.9.0' of https://github.com/wazuh/wazuh-kibana-app int…
Desvelao Apr 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 };