mirror of
https://github.com/whyour/qinglong.git
synced 2025-11-09 16:16:07 +08:00
Fix TypeScript errors and formatting
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
parent
a05d5df470
commit
d0c7ec39bf
|
|
@ -66,6 +66,40 @@ const SHOW_TAB_COUNT = 10;
|
||||||
|
|
||||||
const Crontab = () => {
|
const Crontab = () => {
|
||||||
const { headerStyle, isPhone, theme } = useOutletContext<SharedContext>();
|
const { headerStyle, isPhone, theme } = useOutletContext<SharedContext>();
|
||||||
|
|
||||||
|
// State declarations
|
||||||
|
const [value, setValue] = useState<any[]>([]);
|
||||||
|
const [loading, setLoading] = useState(true);
|
||||||
|
const [isModalVisible, setIsModalVisible] = useState(false);
|
||||||
|
const [isLabelModalVisible, setIsLabelModalVisible] = useState(false);
|
||||||
|
const [editedCron, setEditedCron] = useState();
|
||||||
|
const [searchText, setSearchText] = useState('');
|
||||||
|
const [isLogModalVisible, setIsLogModalVisible] = useState(false);
|
||||||
|
const [logCron, setLogCron] = useState<any>();
|
||||||
|
const [selectedRowIds, setSelectedRowIds] = useState<string[]>([]);
|
||||||
|
const [pageConf, setPageConf] = useState<{
|
||||||
|
page: number;
|
||||||
|
size: number;
|
||||||
|
sorter: any;
|
||||||
|
filters: any;
|
||||||
|
}>({} as any);
|
||||||
|
const [viewConf, setViewConf] = useState<any>();
|
||||||
|
const [isDetailModalVisible, setIsDetailModalVisible] = useState(false);
|
||||||
|
const [detailCron, setDetailCron] = useState<any>();
|
||||||
|
const [searchValue, setSearchValue] = useState('');
|
||||||
|
const [total, setTotal] = useState<number>();
|
||||||
|
const [isCreateViewModalVisible, setIsCreateViewModalVisible] =
|
||||||
|
useState(false);
|
||||||
|
const [isViewManageModalVisible, setIsViewManageModalVisible] =
|
||||||
|
useState(false);
|
||||||
|
const [cronViews, setCronViews] = useState<any[]>([]);
|
||||||
|
const [enabledCronViews, setEnabledCronViews] = useState<any[]>([]);
|
||||||
|
const [moreMenuActive, setMoreMenuActive] = useState(false);
|
||||||
|
const tableRef = useRef<HTMLDivElement>(null);
|
||||||
|
const tableScrollHeight = useTableScrollHeight(tableRef);
|
||||||
|
const [activeKey, setActiveKey] = useState('');
|
||||||
|
const [allSubscriptions, setAllSubscriptions] = useState<any[]>([]);
|
||||||
|
|
||||||
const columns: ColumnProps<ICrontab>[] = [
|
const columns: ColumnProps<ICrontab>[] = [
|
||||||
{
|
{
|
||||||
title: intl.get('名称'),
|
title: intl.get('名称'),
|
||||||
|
|
@ -323,38 +357,6 @@ const Crontab = () => {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const [value, setValue] = useState<any[]>([]);
|
|
||||||
const [loading, setLoading] = useState(true);
|
|
||||||
const [isModalVisible, setIsModalVisible] = useState(false);
|
|
||||||
const [isLabelModalVisible, setIsLabelModalVisible] = useState(false);
|
|
||||||
const [editedCron, setEditedCron] = useState();
|
|
||||||
const [searchText, setSearchText] = useState('');
|
|
||||||
const [isLogModalVisible, setIsLogModalVisible] = useState(false);
|
|
||||||
const [logCron, setLogCron] = useState<any>();
|
|
||||||
const [selectedRowIds, setSelectedRowIds] = useState<string[]>([]);
|
|
||||||
const [pageConf, setPageConf] = useState<{
|
|
||||||
page: number;
|
|
||||||
size: number;
|
|
||||||
sorter: any;
|
|
||||||
filters: any;
|
|
||||||
}>({} as any);
|
|
||||||
const [viewConf, setViewConf] = useState<any>();
|
|
||||||
const [isDetailModalVisible, setIsDetailModalVisible] = useState(false);
|
|
||||||
const [detailCron, setDetailCron] = useState<any>();
|
|
||||||
const [searchValue, setSearchValue] = useState('');
|
|
||||||
const [total, setTotal] = useState<number>();
|
|
||||||
const [isCreateViewModalVisible, setIsCreateViewModalVisible] =
|
|
||||||
useState(false);
|
|
||||||
const [isViewManageModalVisible, setIsViewManageModalVisible] =
|
|
||||||
useState(false);
|
|
||||||
const [cronViews, setCronViews] = useState<any[]>([]);
|
|
||||||
const [enabledCronViews, setEnabledCronViews] = useState<any[]>([]);
|
|
||||||
const [moreMenuActive, setMoreMenuActive] = useState(false);
|
|
||||||
const tableRef = useRef<HTMLDivElement>(null);
|
|
||||||
const tableScrollHeight = useTableScrollHeight(tableRef);
|
|
||||||
const [activeKey, setActiveKey] = useState('');
|
|
||||||
const [allSubscriptions, setAllSubscriptions] = useState<any[]>([]);
|
|
||||||
|
|
||||||
const goToScriptManager = (record: any) => {
|
const goToScriptManager = (record: any) => {
|
||||||
const result = getCommandScript(record.command);
|
const result = getCommandScript(record.command);
|
||||||
if (Array.isArray(result)) {
|
if (Array.isArray(result)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user