Skip to content

Commit 395fdb5

Browse files
Re review changes
WIP
1 parent 1eb8ce4 commit 395fdb5

File tree

8 files changed

+14
-15
lines changed

8 files changed

+14
-15
lines changed

desktop/core/src/desktop/api2.py

-3
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,6 @@ def get_config(request):
147147
config['storage_browser']['enable_extract_uploaded_archive'] = ENABLE_EXTRACT_UPLOADED_ARCHIVE.get()
148148
config['clusters'] = list(get_clusters(request.user).values())
149149
config['documents'] = {'types': list(Document2.objects.documents(user=request.user).order_by().values_list('type', flat=True).distinct())}
150-
apps = appmanager.get_apps(request.user)
151-
app_names = [app.name for app in sorted(apps, key=lambda app: app.menu_index)]
152-
config['app_names'] = app_names
153150
config['status'] = 0
154151

155152
return JsonResponse(config)

desktop/core/src/desktop/js/apps/admin/Configuration/ConfigurationTab.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
// limitations under the License.
1616

1717
import React, { useState, useEffect, useMemo } from 'react';
18-
import { Spin, Alert } from 'antd';
18+
import { Spin } from 'antd';
19+
import Alert from 'cuix/dist/components/Alert';
1920
import { i18nReact } from '../../../utils/i18nReact';
2021
import AdminHeader from '../AdminHeader';
2122
import { ConfigurationValue } from './ConfigurationValue';

desktop/core/src/desktop/js/apps/admin/Metrics/MetricsTab.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616

1717
import React, { useState, useEffect } from 'react';
1818
import MetricsTable, { MetricsResponse, MetricsTableProps } from './MetricsTable';
19-
import { Spin, Alert } from 'antd';
19+
import { Spin } from 'antd';
20+
import Alert from 'cuix/dist/components/Alert';
2021
import { get } from '../../../api/utils';
2122
import { i18nReact } from '../../../utils/i18nReact';
2223
import AdminHeader from '../AdminHeader';

desktop/core/src/desktop/js/apps/admin/Overview/Analytics.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ const Analytics = (): JSX.Element => {
4141
huePubSub.publish('hue.global.info', { message: t('Configuration updated') });
4242
} else {
4343
huePubSub.publish('hue.global.error', {
44-
message: t(response.message || 'Error updating configuration')
44+
message: t('Error updating configuration')
4545
});
4646
}
4747
} catch (err) {
48-
huePubSub.publish('hue.global.error', { message: t(String(err)) });
48+
huePubSub.publish('hue.global.error', { message: String(err) });
4949
}
5050
};
5151

52-
const handleCheckboxChange = async event => {
52+
const handleCheckboxChange = event => {
5353
const newPreference = event.target.checked;
5454
setCollectUsage(newPreference);
55-
await saveCollectUsagePreference(newPreference);
55+
saveCollectUsagePreference(newPreference);
5656
};
5757

5858
return (

desktop/core/src/desktop/js/apps/admin/Overview/ConfigStatus.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
// Assuming you have an API endpoint for `install_app_examples`
18-
1917
import React from 'react';
20-
import { Spin, Alert, Table } from 'antd';
18+
// import { Spin } from 'antd';
19+
import Loading from 'cuix/dist/components/Loading';
20+
import Alert from 'cuix/dist/components/Alert';
21+
import Table from 'cuix/dist/components/Table';
2122
import useLoadData from '../../../utils/hooks/useLoadData/useLoadData';
2223
import { INSTALL_APP_EXAMPLES_API_URL } from '../Components/utils';
2324
import { i18nReact } from '../../../utils/i18nReact';
@@ -69,7 +70,7 @@ function ConfigStatus(): JSX.Element {
6970
}
7071

7172
if (loading) {
72-
return <Spin spinning={loading} className="config__spin" />;
73+
return <Loading spinning={loading} className="config__spin" />;
7374
}
7475

7576
const configErrorsExist = Boolean(data?.configErrors?.length);

desktop/core/src/desktop/js/apps/admin/ServerLogs/ServerLogsTab.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// limitations under the License.
1616

1717
import React, { useState } from 'react';
18-
import { Alert } from 'antd';
18+
import Alert from 'cuix/dist/components/Alert';
1919
import ServerLogsHeader from './ServerLogsHeader';
2020
import { i18nReact } from '../../../utils/i18nReact';
2121
import useLoadData from '../../../utils/hooks/useLoadData/useLoadData';

desktop/core/src/desktop/js/config/types.ts

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ export interface HueConfig extends GenericApiResponse {
9090
has_computes: boolean;
9191
main_button_action: AppConfig<Interpreter>;
9292
status: number;
93-
app_names: string[];
9493
hue_config: {
9594
enable_sharing: boolean;
9695
collect_usage: boolean;

0 commit comments

Comments
 (0)