Skip to content

Commit

Permalink
Removed the analytics service (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
RishiDiwanTT authored Nov 6, 2023
1 parent 4ffe069 commit 28a75ef
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 221 deletions.
29 changes: 0 additions & 29 deletions src/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
PatronAuthServicesData,
SitewideSettingsData,
MetadataServicesData,
AnalyticsServicesData,
SearchServicesData,
DiscoveryServicesData,
LibraryRegistrationsData,
Expand Down Expand Up @@ -87,9 +86,6 @@ export default class ActionCreator extends BaseActionCreator {
static readonly METADATA_SERVICES = "METADATA_SERVICES";
static readonly EDIT_METADATA_SERVICE = "EDIT_METADATA_SERVICE";
static readonly DELETE_METADATA_SERVICE = "DELETE_METADATA_SERVICE";
static readonly ANALYTICS_SERVICES = "ANALYTICS_SERVICES";
static readonly EDIT_ANALYTICS_SERVICE = "EDIT_ANALYTICS_SERVICE";
static readonly DELETE_ANALYTICS_SERVICE = "DELETE_ANALYTICS_SERVICE";
static readonly SEARCH_SERVICES = "SEARCH_SERVICES";
static readonly EDIT_SEARCH_SERVICE = "EDIT_SEARCH_SERVICE";
static readonly DELETE_SEARCH_SERVICE = "DELETE_SEARCH_SERVICE";
Expand Down Expand Up @@ -602,31 +598,6 @@ export default class ActionCreator extends BaseActionCreator {
).bind(this);
}

fetchAnalyticsServices() {
const url = "/admin/analytics_services";
return this.fetchJSON<AnalyticsServicesData>(
ActionCreator.ANALYTICS_SERVICES,
url
).bind(this);
}

editAnalyticsService(data: FormData) {
const url = "/admin/analytics_services";
return this.postForm(ActionCreator.EDIT_ANALYTICS_SERVICE, url, data).bind(
this
);
}

deleteAnalyticsService(identifier: string | number) {
const url = "/admin/analytics_service/" + identifier;
return this.postForm(
ActionCreator.DELETE_ANALYTICS_SERVICE,
url,
null,
"DELETE"
).bind(this);
}

fetchSearchServices() {
const url = "/admin/search_services";
return this.fetchJSON<SearchServicesData>(
Expand Down
81 changes: 0 additions & 81 deletions src/components/AnalyticsServices.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/ConfigTabContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import PatronAuthServices from "./PatronAuthServices";
import SitewideAnnouncements from "./SitewideAnnouncements";
import SitewideSettings from "./SitewideSettings";
import MetadataServices from "./MetadataServices";
import AnalyticsServices from "./AnalyticsServices";
import SearchServices from "./SearchServices";
import CatalogServices from "./CatalogServices";
import DiscoveryServices from "./DiscoveryServices";
Expand Down Expand Up @@ -47,7 +46,6 @@ export default class ConfigTabContainer extends TabContainer<
patronAuth: PatronAuthServices,
sitewideSettings: SitewideSettings,
metadata: MetadataServices,
analytics: AnalyticsServices,
search: SearchServices,
catalogServices: CatalogServices,
discovery: DiscoveryServices,
Expand Down
2 changes: 0 additions & 2 deletions src/components/ServiceEditForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export interface ServiceEditFormState {
libraries: LibraryWithSettingsData[];
expandedLibraries: string[];
selectedLibrary: string | null;
analyticsOption?: string | null;
}

/** Form for editing service configuration based on protocol information from the server.
Expand All @@ -61,7 +60,6 @@ export default class ServiceEditForm<
libraries: (this.props.item && this.props.item.libraries) || [],
expandedLibraries: [],
selectedLibrary: null,
analyticsOption: null,
};
this.handleProtocolChange = this.handleProtocolChange.bind(this);
this.handleParentChange = this.handleParentChange.bind(this);
Expand Down
84 changes: 0 additions & 84 deletions src/components/__tests__/AnalyticsServices-test.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions src/components/__tests__/ConfigTabContainer-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import IndividualAdmins from "../IndividualAdmins";
import PatronAuthServices from "../PatronAuthServices";
import SitewideSettings from "../SitewideSettings";
import MetadataServices from "../MetadataServices";
import AnalyticsServices from "../AnalyticsServices";
import SearchServices from "../SearchServices";
import CatalogServices from "../CatalogServices";
import DiscoveryServices from "../DiscoveryServices";
Expand Down Expand Up @@ -69,7 +68,6 @@ describe("ConfigTabContainer", () => {
PatronAuthServices,
SitewideSettings,
MetadataServices,
AnalyticsServices,
SearchServices,
CatalogServices,
DiscoveryServices,
Expand Down Expand Up @@ -116,7 +114,6 @@ describe("ConfigTabContainer", () => {
const linkTexts = links.map((link) => link.text());
expect(linkTexts).to.contain("Libraries");
expect(linkTexts).to.contain("Admins");
expect(linkTexts).not.to.contain("Analytics");
expect(linkTexts).not.to.contain("Collections");
expect(linkTexts).not.to.contain("Patron Authentication");
expect(linkTexts).not.to.contain("Sitewide Settings");
Expand All @@ -141,7 +138,6 @@ describe("ConfigTabContainer", () => {
SearchServices,
CatalogServices,
DiscoveryServices,
AnalyticsServices,
SitewideAnnouncements,
];
for (const componentClass of hiddenComponentClasses) {
Expand Down Expand Up @@ -193,7 +189,6 @@ describe("ConfigTabContainer", () => {
SearchServices,
CatalogServices,
DiscoveryServices,
AnalyticsServices,
SitewideAnnouncements,
];
for (const componentClass of hiddenComponentClasses) {
Expand Down
6 changes: 0 additions & 6 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,12 +369,6 @@ export interface MetadataServicesData extends ServicesData {
metadata_services: MetadataServiceData[];
}

export interface AnalyticsServiceData extends ServiceData {}

export interface AnalyticsServicesData extends ServicesData {
analytics_services: AnalyticsServiceData[];
}

export interface SearchServiceData extends ServiceData {}

export interface SearchServicesData extends ServicesData {
Expand Down
8 changes: 0 additions & 8 deletions src/reducers/analyticsServices.ts

This file was deleted.

4 changes: 0 additions & 4 deletions src/reducers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import patronAuthServices from "./patronAuthServices";
import sitewideAnnouncements from "./sitewideAnnouncements";
import sitewideSettings from "./sitewideSettings";
import metadataServices from "./metadataServices";
import analyticsServices from "./analyticsServices";
import searchServices from "./searchServices";
import catalogServices from "./catalogServices";
import discoveryServices from "./discoveryServices";
Expand Down Expand Up @@ -51,7 +50,6 @@ import {
SitewideAnnouncementsData,
SitewideSettingsData,
MetadataServicesData,
AnalyticsServicesData,
SearchServicesData,
CatalogServicesData,
DiscoveryServicesData,
Expand Down Expand Up @@ -84,7 +82,6 @@ export interface State {
sitewideAnnouncements: FetchEditState<SitewideAnnouncementsData>;
sitewideSettings: FetchEditState<SitewideSettingsData>;
metadataServices: FetchEditState<MetadataServicesData>;
analyticsServices: FetchEditState<AnalyticsServicesData>;
searchServices: FetchEditState<SearchServicesData>;
catalogServices: FetchEditState<CatalogServicesData>;
discoveryServices: FetchEditState<DiscoveryServicesData>;
Expand Down Expand Up @@ -126,7 +123,6 @@ export default combineReducers<State>({
sitewideAnnouncements,
sitewideSettings,
metadataServices,
analyticsServices,
searchServices,
catalogServices,
discoveryServices,
Expand Down

0 comments on commit 28a75ef

Please sign in to comment.