Files
nebula.js/commands/serve/web/utils/checkIfHistoryConnectionDisabled.js
Ahmad Mirzaei 1c8dd28078 test: nebula web - part 01 (#1004)
* test: base test renderer

* test: `<ConnectionStep />`

* test: `<AppList /> tests`

* test: `<ConnectionGuid />`

* test: `<HubLayout />`

* test: `<ConnectionHistory />`

* test: `<ConnectionOptions />` done

* test: `<Error />` done

* test: `<SelectEngine />` done
2022-11-14 13:55:04 +01:00

16 lines
464 B
JavaScript

export const checkIfHistoryConnectionDisabled = ({ item, info }) => {
if (!info) return false;
if ((info.isClientIdProvided || info.isWebIntegrationIdProvided) && item.includes('localhost')) return true;
if (info.isClientIdProvided) {
if (item.includes('qlik-client-id')) return false;
return true;
}
if (info.isWebIntegrationIdProvided) {
if (item.includes('qlik-web-integration-id')) return false;
return true;
}
return false;
};