Skip to content

Commit

Permalink
Merge branch 'OCD-4765' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
tmy1313 committed Mar 4, 2025
2 parents 0969568 + fc0b929 commit f510e14
Show file tree
Hide file tree
Showing 6 changed files with 376 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/app/api/url-checker.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { useMutation } from 'react-query';

import { useAxios } from './axios';

const usePostUrlChecker = () => {
const axios = useAxios();
return useMutation(async (data) => axios.post('urls/validate', data));
};

export default usePostUrlChecker;
1 change: 1 addition & 0 deletions src/app/navigation/navigation-top.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
<li ng-if="vm.hasAnyRole(['chpl-admin', 'chpl-onc', 'chpl-onc-acb'])"><a ui-sref="administration.change-requests"><i class="fa fa-caret-right" ng-if="vm.isActive('administration.change-requests')"></i> Change Requests</a></li>
<li ng-if="vm.hasAnyRole(['chpl-admin', 'chpl-onc', 'chpl-onc-acb'])"><a ui-sref="administration.system-maintenance"><i class="fa fa-caret-right" ng-if="vm.isActive('administration.system-maintenance')"></i> System Maintenance</a></li>
<li ng-if="vm.hasAnyRole(['chpl-admin', 'chpl-onc'])"><a ui-sref="dashboard"><i class="fa fa-caret-right" ng-if="vm.isActive('sys-admin.dashboard')"></i>Dashboard</a></li>
<li ng-if="vm.hasAnyRole(['chpl-admin', 'chpl-onc', 'chpl-onc-acb'])"><a ui-sref="administration.url-checker"><i class="fa fa-caret-right" ng-if="vm.isActive('administration.url-checker')"></i>URL Checker</a></li>
<li ng-if="vm.hasAnyRole(['chpl-admin'])"><a href="rest/ff4j-console/home">FF4j</a></li>
</ul>
</li>
Expand Down
4 changes: 3 additions & 1 deletion src/app/pages/administration/administration.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import ChplLoginPage from './login/login-wrapper';
import ChplReportsWrapper from './reports/reports-wrapper';
import ChplSystemMaintenanceWrapper from './system-maintenance/system-maintenance-wrapper';
import ChplUploadPageWrapper from './upload/upload-page-wrapper';
import ChplUrlCheckerWrapper from './url-checker/url-checker-wrapper';

import { reactToAngularComponent } from 'services/angular-react-helper';

Expand Down Expand Up @@ -39,4 +40,5 @@ angular
.component('chplLoginPageBridge', reactToAngularComponent(ChplLoginPage))
.component('chplReportsWrapperBridge', reactToAngularComponent(ChplReportsWrapper))
.component('chplSystemMaintenanceWrapperBridge', reactToAngularComponent(ChplSystemMaintenanceWrapper))
.component('chplUploadPageWrapperBridge', reactToAngularComponent(ChplUploadPageWrapper));
.component('chplUploadPageWrapperBridge', reactToAngularComponent(ChplUploadPageWrapper))
.component('chplUrlCheckerWrapperBridge', reactToAngularComponent(ChplUrlCheckerWrapper));
8 changes: 8 additions & 0 deletions src/app/pages/administration/administration.state.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ const states = [{
title: 'CHPL Administration - Upload',
roles: ['chpl-admin', 'chpl-onc', 'chpl-onc-acb'],
},
}, {
name: 'administration.url-checker',
url: '/url-checker',
component: 'chplUrlCheckerWrapperBridge',
data: {
title: 'CHPL Administration - URL Checker',
roles: ['chpl-admin', 'chpl-onc', 'chpl-onc-acb'],
},
}, {
name: 'login',
url: '/login',
Expand Down
18 changes: 18 additions & 0 deletions src/app/pages/administration/url-checker/url-checker-wrapper.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';

import ChplUrlChecker from './url-checker';

import AppWrapper from 'app-wrapper';

function ChplUrlCheckerWrapper() {
return (
<AppWrapper>
<ChplUrlChecker />
</AppWrapper>
);
}

export default ChplUrlCheckerWrapper;

ChplUrlCheckerWrapper.propTypes = {
};
Loading

0 comments on commit f510e14

Please sign in to comment.