Skip to content

Commit

Permalink
bugfix: fix title not update on Login
Browse files Browse the repository at this point in the history
Signed-off-by: bingshen.wbs <[email protected]>
  • Loading branch information
BSWANG committed Jan 29, 2024
1 parent 4fdbabb commit f5648a0
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 0 deletions.
7 changes: 7 additions & 0 deletions webui/src/pages/capture/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { CaptureTask } from "@/services/capture";
import captureService from "@/services/capture"
import { useEffect, useState } from "react";
import { getErrorMessage } from "@/utils";
import {definePageConfig} from "ice";

const submitCapture = (props, callback) => {
const task: CaptureTask = {
Expand Down Expand Up @@ -76,3 +77,9 @@ export default function Capture() {
</div>
)
}

export const pageConfig = definePageConfig(() => {
return {
title: 'Capture',
};
});
7 changes: 7 additions & 0 deletions webui/src/pages/config/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import AddDialog, { SelectableItem, Selection } from "./components/AddDialog";
import probeTypes from "./types.json"
import { getErrorMessage } from "@/utils"
import _ from "lodash"
import {definePageConfig} from "ice";

const METRIC_PROBE = "metric_probe"
const EVENT_PROBE = "event_probe"
Expand Down Expand Up @@ -189,3 +190,9 @@ export default function Config() {
</div>
);
}

export const pageConfig = definePageConfig(() => {
return {
title: 'Node Configuration',
};
});
8 changes: 8 additions & 0 deletions webui/src/pages/diagnosis/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { DiagnosisResult, DiagnosisTask } from "@/services/diagnosis"
import { Link } from "@ice/runtime"
import diagnosisService from '@/services/diagnosis'
import { getErrorMessage } from "@/utils"
import {definePageConfig} from "ice";


const makeAction = (d: DiagnosisResult, showMessageDialog: (message: string) => void): JSX.Element | null => {
Expand Down Expand Up @@ -119,3 +120,10 @@ export default function Diagnosis() {
</div>
);
}

export const pageConfig = definePageConfig(() => {
return {
title: 'Diagnose',
};
});

6 changes: 6 additions & 0 deletions webui/src/pages/index/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import FlowDashboard from "../monitoring/flow";
import {definePageConfig} from "ice";

export default FlowDashboard;
export const pageConfig = definePageConfig(() => {
return {
title: 'Network Graph',
};
});
7 changes: 7 additions & 0 deletions webui/src/pages/monitoring/dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useEffect, useState } from 'react';
import Exception from '@/components/Exception';
import { Loading, Message } from '@alifd/next';
import store from '@/store'
import {definePageConfig} from "ice";

export default function Dashboard() {
const [loading, setLoading] = useState(true)
Expand Down Expand Up @@ -50,3 +51,9 @@ export default function Dashboard() {
</div>
);
}

export const pageConfig = definePageConfig(() => {
return {
title: 'Dashboard',
};
});
7 changes: 7 additions & 0 deletions webui/src/pages/monitoring/events/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { getErrorMessage } from '@/utils';
import EventList from './components/EventList';
import styles from './index.module.css'
import { useRequest } from '@ice/plugin-request/hooks';
import {definePageConfig} from "ice";

export default function Events() {
const [eventData, setEventData] = useState<EventData[]>([]);
Expand Down Expand Up @@ -151,3 +152,9 @@ export default function Events() {
</div>
);
}

export const pageConfig = definePageConfig(() => {
return {
title: 'Events',
};
});
8 changes: 8 additions & 0 deletions webui/src/pages/monitoring/flow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import flowService, { FlowData } from '@/services/flow'
import { getErrorMessage } from '@/utils';
import { Dayjs } from 'dayjs';
import * as dayjs from 'dayjs';
import {definePageConfig} from "ice";

const getNamespaces = (data: any) => {
return data.nodes.map((node: any) => {
Expand Down Expand Up @@ -149,3 +150,10 @@ export default function FlowDashboard() {
</div>
);
}

export const pageConfig = definePageConfig(() => {
return {
title: 'Network Graph',
};
});

7 changes: 7 additions & 0 deletions webui/src/pages/pingmesh/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import PingForm from "@/pages/pingmesh/pingForm";
import PingGraph from "@/pages/pingmesh/pingGraph";
import pingMeshService from "@/services/pingmesh";
import {getErrorMessage} from "@/utils";
import {definePageConfig} from "ice";

export default function Capture() {
const [latency, setLatency] = useState()
Expand Down Expand Up @@ -34,3 +35,9 @@ export default function Capture() {
</div>
)
}

export const pageConfig = definePageConfig(() => {
return {
title: 'Latency Detection',
};
});

0 comments on commit f5648a0

Please sign in to comment.