diff --git a/src/main/webui/src/app/components/CompUtils.js b/src/main/webui/src/app/components/CompUtils.js index 2086b43..c07f654 100644 --- a/src/main/webui/src/app/components/CompUtils.js +++ b/src/main/webui/src/app/components/CompUtils.js @@ -14,8 +14,6 @@ * limitations under the License. */ -import {jsonGet} from '../RestClient.js'; - export const Utils = { remoteOptions: store => { let options = []; @@ -139,39 +137,5 @@ export const Utils = { let allParams = [message]; params.forEach(p => allParams.push(p)); Reflect.apply(console.log, undefined, allParams); - }, - // TODO: not used? - getDisTimeouts: (state, setState, storeType) => { - jsonGet({ - url: '/api/admin/schedule/store/all/disable-timeout', - done: response => { - let disabledMap = Utils.setDisableMap(response, state.listing); - setState({ - disabledMap - }); - }, - fail: () => { - Utils.logMessage(`disable timeout get failed in ${storeType} listing.`); - } - }); - }, - // TODO: Not used? - getStores: (state, setState, storeType) => { - let url = `/api/admin/stores/_all/${storeType}`; - jsonGet({ - url, - done: response => { - setState({ - listing: response.items, - rawListing: response.items - }); - Utils.getDisTimeouts(state, setState); - }, - fail: errorText => { - setState({ - message: JSON.parse(errorText).error - }); - } - }); } }; diff --git a/src/main/webui/src/app/components/ComponentConstants.js b/src/main/webui/src/app/components/ComponentConstants.js index 6039e76..cfbf6dd 100644 --- a/src/main/webui/src/app/components/ComponentConstants.js +++ b/src/main/webui/src/app/components/ComponentConstants.js @@ -13,19 +13,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -// mock data: options +// TODO: mock data: options. Need to use CompUtils. const remoteOptionLegend = [ {icon: "S", title: "Snapshots allowed"}, {icon: "R", title: "Releases allowed"} ]; +// TODO: mock data: options. Need to use CompUtils. const hostedOptionLegend = [ {icon: 'S', title: 'Snapshots allowed'}, {icon: 'R', title: 'Releases allowed'}, {icon: 'D', title: 'Deployment allowed'} ]; -// TODO this should be fetched from backend +// TODO: this should be fetched from backend const PACKAGE_TYPES = ["maven", "generic","npm"]; diff --git a/src/main/webui/src/app/components/content/CommonPageWidget.jsx b/src/main/webui/src/app/components/content/CommonPageWidget.jsx index 2d3fe5d..e2dcd3a 100644 --- a/src/main/webui/src/app/components/content/CommonPageWidget.jsx +++ b/src/main/webui/src/app/components/content/CommonPageWidget.jsx @@ -28,6 +28,7 @@ LocalURLSection.propTypes = { storeKey: PropTypes.string }; +// For options, see CompUtils.remoteOptions|hostedOptions const CapabilitiesSection = ({options}) =>