diff --git a/src/main/webui/src/app/components/content/common/StoreCapabilitiesSections.jsx b/src/main/webui/src/app/components/content/common/StoreCapabilitiesSections.jsx new file mode 100644 index 0000000..72ef6d2 --- /dev/null +++ b/src/main/webui/src/app/components/content/common/StoreCapabilitiesSections.jsx @@ -0,0 +1,42 @@ +/** + * Copyright (C) 2023 Red Hat, Inc. (https://github.com/Commonjava/indy-ui-service) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import {PropTypes} from 'prop-types'; +import {Filters} from '../../../utils/Filters.js'; + +export const StoreViewCapabilitiesSection = ({store}) => +
Capabilities
+
+ { + (store.allow_releases || store.allow_snapshots) && +
+
+ {Filters.checkmark(store.allow_releases)} + +
+
+ {Filters.checkmark(store.allow_snapshots)} + +
+
+ } +
+
; + +StoreViewCapabilitiesSection.propTypes = { + store: PropTypes.object.isRequired +}; diff --git a/src/main/webui/src/app/components/content/common/StoreListingWidget.test.js b/src/main/webui/src/app/components/content/common/StoreListingWidget.test.jsx similarity index 100% rename from src/main/webui/src/app/components/content/common/StoreListingWidget.test.js rename to src/main/webui/src/app/components/content/common/StoreListingWidget.test.jsx diff --git a/src/main/webui/src/app/components/content/remote/RemoteView.jsx b/src/main/webui/src/app/components/content/remote/RemoteView.jsx index 54a3954..64b3e7e 100644 --- a/src/main/webui/src/app/components/content/remote/RemoteView.jsx +++ b/src/main/webui/src/app/components/content/remote/RemoteView.jsx @@ -20,6 +20,7 @@ import {PropTypes} from 'prop-types'; import {StoreViewControlPanel as ControlPanel} from '../common/StoreControlPanels.jsx'; import {Hint, PasswordMask} from '../common/Hints.jsx'; import {StoreViewBasicSection as BasicSection} from '../common/StoreBasicSections.jsx'; +import {StoreViewCapabilitiesSection} from '../common/StoreCapabilitiesSections.jsx'; // import ViewJsonDebugger from './Debugger.jsx'; import {Filters} from '../../../utils/Filters.js'; import {Utils} from '../../../utils/AppUtils.js'; @@ -211,24 +212,7 @@ export default function RemoteView() { -
Capabilities
-
- { - (store.allow_releases || store.allow_snapshots) && - -
-
- {Filters.checkmark(store.allow_releases)} - -
-
- {Filters.checkmark(store.allow_snapshots)} - -
-
- - } -
+
Remote Access
diff --git a/src/main/webui/src/content-browse/DirectoryListing.test.js b/src/main/webui/src/content-browse/DirectoryListing.test.jsx similarity index 100% rename from src/main/webui/src/content-browse/DirectoryListing.test.js rename to src/main/webui/src/content-browse/DirectoryListing.test.jsx