/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { CopyIcon, Dialog, InfoCircleIcon, Modal, ModalBody, ModalHeader, ModalHeaderActions, ModalTitle, TimesIcon, } from '@finos/legend-art'; import { isNonNullable } from '@finos/legend-shared'; import { useQueryEditorStore } from './QueryEditorStoreProvider.js'; export const LegendQueryInfo: React.FC<{ open: boolean; closeModal: () => void; }> = (props) => { const { open, closeModal } = props; const editorStore = useQueryEditorStore(); const applicationStore = editorStore.applicationStore; const config = applicationStore.config; const copyInfo = (): void => { applicationStore.clipboardService .copyTextToClipboard( [ `Environment: ${config.env}`, `Version: ${config.appVersion}`, `Revision: ${config.appVersionCommitId}`, `Build Time: ${config.appVersionBuildTime}`, `Engine Server: ${config.engineServerUrl}`, `Depot Server: ${config.depotServerUrl}`, ] .filter(isNonNullable) .join('\n'), ) .then(() => applicationStore.notificationService.notifySuccess( 'Copied application info to clipboard', ), ) .catch(applicationStore.alertUnhandledError); }; const goToReleaseLog = (): void => { applicationStore.releaseNotesService.setReleaseLog(true); closeModal(); }; return ( } title="About Legend Query" />
Environment:
{config.env}
Version:
{config.appVersion}
Revision:
{config.appVersionCommitId}
Build Time:
{config.appVersionBuildTime}
Details of Released Versions
Engine Server:
Depot Server:
); };