Skip to content

Commit

Permalink
Replace usingWanda by usingNewChecksEngine
Browse files Browse the repository at this point in the history
  • Loading branch information
arbulu89 committed Dec 19, 2022
1 parent 57a90f0 commit e1b59b5
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion assets/js/components/ClusterDetails/ChecksSelectionNew.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function ChecksSelectionNew({ clusterId, cluster }) {
{localSavingSuccess && selectedChecks.length > 0 && (
<SuggestTriggeringChecksExecutionAfterSettingsUpdated
clusterId={clusterId}
usingWanda
usingNewChecksEngine
onClose={() => setLocalSavingSuccess(null)}
/>
)}
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/ClusterDetails/ClusterDetailsNew.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export function ClusterDetailsNew() {
cssClasses="rounded relative w-1/4 ml-0.5 disabled:bg-slate-50 disabled:text-slate-500 disabled:border-gray-400"
clusterId={clusterID}
disabled={!hasSelectedChecks}
usingWanda
usingNewChecksEngine
>
<EOS_PLAY_CIRCLE
className={classNames('inline-block fill-jungle-green-500', {
Expand Down
12 changes: 7 additions & 5 deletions assets/js/components/ClusterDetails/ClusterSettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ import { truncatedClusterNameClasses } from './ClusterDetails';

export const UNKNOWN_PROVIDER = 'unknown';

export function ClusterSettings({ usingWanda = false }) {
export function ClusterSettings({ usingNewChecksEngine = false }) {
const { clusterID } = useParams();

const cluster = useSelector(getCluster(clusterID));

const tabsSettings = {
'Checks Selection': usingWanda ? (
'Checks Selection': usingNewChecksEngine ? (
<ChecksSelectionNew clusterId={clusterID} cluster={cluster} />
) : (
<ChecksSelection clusterId={clusterID} cluster={cluster} />
Expand All @@ -42,7 +42,9 @@ export function ClusterSettings({ usingWanda = false }) {
<div className="w-full px-2 sm:px-0">
<BackButton
url={
usingWanda ? `/clusters_new/${clusterID}` : `/clusters/${clusterID}`
usingNewChecksEngine
? `/clusters_new/${clusterID}`
: `/clusters/${clusterID}`
}
>
Back to Cluster Details
Expand Down Expand Up @@ -121,7 +123,7 @@ export function SavingFailedAlert({ onClose = () => {}, children }) {

export function SuggestTriggeringChecksExecutionAfterSettingsUpdated({
clusterId,
usingWanda = false,
usingNewChecksEngine = false,
onClose = () => {},
}) {
return (
Expand All @@ -136,7 +138,7 @@ export function SuggestTriggeringChecksExecutionAfterSettingsUpdated({
<TriggerChecksExecutionRequest
cssClasses="tn-checks-start-execute rounded-full group flex rounded-full items-center text-sm px-2 bg-jungle-green-500 text-white"
clusterId={clusterId}
usingWanda={usingWanda}
usingNewChecksEngine={usingNewChecksEngine}
>
<EOS_PLAY_CIRCLE color="green" />
</TriggerChecksExecutionRequest>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { executionRequested } from '@state/actions/lastExecutions';
function TriggerChecksExecutionRequest({
clusterId,
cssClasses,
usingWanda = false,
usingNewChecksEngine = false,
children,
...props
}) {
Expand All @@ -31,7 +31,7 @@ function TriggerChecksExecutionRequest({
onClick={() => {
dispatch(executionRequested(clusterId, hosts, checks));
navigate(
usingWanda
usingNewChecksEngine
? `/clusters_new/${clusterId}/executions/last`
: `/clusters/${clusterId}/checks/results`
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ describe('TriggerChecksExecutionRequest', () => {
};

const [statefulView, store] = withState(
<TriggerChecksExecutionRequest clusterId={clusterID1} usingWanda />,
<TriggerChecksExecutionRequest
clusterId={clusterID1}
usingNewChecksEngine
/>,
initialState
);

Expand Down
2 changes: 1 addition & 1 deletion assets/js/trento.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function App() {
/>
<Route
path="clusters_new/:clusterID/settings"
element={<ClusterSettings usingWanda />}
element={<ClusterSettings usingNewChecksEngine />}
/>
<Route
path="clusters/:clusterID/checks/results"
Expand Down

0 comments on commit e1b59b5

Please sign in to comment.