Skip to content

Commit

Permalink
Fix a store listing capabilities issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ligangty committed Jan 4, 2024
1 parent 0bafcd1 commit 94ca337
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const StoreListingWidget = ({storeList, disableMap, storeType}) => {
}
</div>
<div>
<CapabilitiesSection options={Utils.remoteOptions(store)} />
<CapabilitiesSection options={Utils.storeOptions(store)} />
</div>
<div className="description field"><span>{store.description}</span></div>
</div>
Expand Down
9 changes: 9 additions & 0 deletions src/main/webui/src/app/utils/AppUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
* useful in new UI and and decide if removing some of them.
*/
export const Utils = {
storeOptions: store => {
if(store.type==='remote') {
return Utils.remoteOptions(store);
}
if(store.type==='hosted'){
return Utils.hostedOptions(store);
}
return [];
},
remoteOptions: store => {
const options = [];
if (store.type==="remote"){
Expand Down
2 changes: 0 additions & 2 deletions src/main/webui/src/app/utils/RestClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

import {Utils} from "./AppUtils.js";

const httpCall = (url, method, headers={}, payload) => fetch(url, {
method,
credentials: 'same-origin',
Expand Down

0 comments on commit 94ca337

Please sign in to comment.