generated from finos/software-project-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'finos:master' into master
- Loading branch information
Showing
87 changed files
with
785 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
'@finos/legend-application-data-cube-bootstrap': minor | ||
'@finos/legend-application-query-bootstrap': minor | ||
'@finos/legend-application-studio-bootstrap': minor | ||
'@finos/legend-application-data-cube-deployment': minor | ||
'@finos/legend-application-pure-ide-deployment': minor | ||
'@finos/legend-application-query-deployment': minor | ||
'@finos/legend-application-repl-deployment': minor | ||
'@finos/legend-application-studio-deployment': minor | ||
'@finos/legend-server-showcase-deployment': minor | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# @finos/legend-application-data-cube-bootstrap | ||
|
||
## 12.85.0 | ||
|
||
## 12.84.0 | ||
|
||
## 12.83.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
packages/legend-application-data-cube-deployment/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# @finos/legend-application-data-cube-deployment | ||
|
||
## 12.85.0 | ||
|
||
## 12.84.0 | ||
|
||
## 12.83.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
packages/legend-application-data-cube/src/__lib__/LegendDataCubeNavigation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* 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 { generatePath } from '@finos/legend-application/browser'; | ||
|
||
export enum LEGEND_DATA_CUBE_ROUTE_PATTERN_TOKEN { | ||
DATA_CUBE_QUERY_ID = 'id', | ||
} | ||
|
||
export const LEGEND_DATA_CUBE_ROUTE_PATTERN = Object.freeze({ | ||
DEFAULT: '/', | ||
VIEW_EXISTING_QUERY: `/:${LEGEND_DATA_CUBE_ROUTE_PATTERN_TOKEN.DATA_CUBE_QUERY_ID}`, | ||
}); | ||
|
||
export type ExistingDataCubeViewerPathParams = { | ||
[LEGEND_DATA_CUBE_ROUTE_PATTERN_TOKEN.DATA_CUBE_QUERY_ID]: string; | ||
}; | ||
|
||
export const generatedSavedQueryUrl = (id: string): string => { | ||
return generatePath(LEGEND_DATA_CUBE_ROUTE_PATTERN.VIEW_EXISTING_QUERY, { | ||
id, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
packages/legend-application-data-cube/src/components/source/ExistingDataCubeQuery.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
/** | ||
* 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 { observer } from 'mobx-react-lite'; | ||
import { useLegendDataCubeBaseStore } from '../LegendDataCubeFrameworkProvider.js'; | ||
import { useEffect } from 'react'; | ||
import { QuestionIcon } from '@finos/legend-art'; | ||
import { useParams } from '@finos/legend-application/browser'; | ||
import { DataCube } from '@finos/legend-data-cube'; | ||
import { guaranteeNonNullable } from '@finos/legend-shared'; | ||
import { | ||
LEGEND_DATA_CUBE_ROUTE_PATTERN_TOKEN, | ||
type ExistingDataCubeViewerPathParams, | ||
} from '../../__lib__/LegendDataCubeNavigation.js'; | ||
import { flowResult } from 'mobx'; | ||
|
||
export const ExistingDataCubeQuery = observer(() => { | ||
const dataCubeStore = useLegendDataCubeBaseStore(); | ||
const params = useParams<ExistingDataCubeViewerPathParams>(); | ||
const sourceSelector = dataCubeStore.sourceSelector; | ||
const queryId = guaranteeNonNullable( | ||
params[LEGEND_DATA_CUBE_ROUTE_PATTERN_TOKEN.DATA_CUBE_QUERY_ID], | ||
); | ||
useEffect(() => { | ||
flowResult(dataCubeStore.initialize(queryId)).catch( | ||
dataCubeStore.applicationStore.alertUnhandledError, | ||
); | ||
}, [dataCubeStore, queryId]); | ||
|
||
return ( | ||
<> | ||
<div className="h-full w-full bg-white"> | ||
<div className="bg-sky-900"> | ||
<div className="mx-auto max-w-full px-2 sm:px-6 lg:px-8"> | ||
<div className="relative flex h-12 items-center justify-between"> | ||
<div className="flex flex-1 items-center justify-center sm:items-stretch sm:justify-start"> | ||
<div className="flex flex-shrink-0 items-center"> | ||
<div className="text-gray-300">Legend Data Cube</div> | ||
</div> | ||
</div> | ||
<div className="md:block"> | ||
<div className="ml-4 flex items-center md:ml-6"> | ||
<button | ||
type="button" | ||
className="relative rounded-full bg-sky-900 p-1 text-gray-400 hover:text-white focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-800" | ||
> | ||
<QuestionIcon /> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{dataCubeStore.cubeViewer ? ( | ||
<> | ||
<div className="h-[calc(100%_-_30px)]"> | ||
<div className="h-[calc(100%_-_30px)]"> | ||
<DataCube engine={dataCubeStore.cubeViewer.engine} /> | ||
</div> | ||
</div> | ||
</> | ||
) : ( | ||
<> | ||
<div | ||
onClick={() => sourceSelector.openModal()} | ||
className="bg-white shadow" | ||
> | ||
<div className="mx-auto h-40 px-4 py-6 sm:px-6 lg:px-8"> | ||
<div className="group flex w-full flex-col items-center justify-center rounded-md border-2 border-dashed border-slate-300 py-3 text-base font-medium leading-6 text-slate-900 hover:cursor-pointer hover:border-solid hover:border-blue-500 hover:bg-white hover:text-blue-500"> | ||
<svg | ||
className="mb-1 text-slate-400 group-hover:text-blue-500" | ||
width="20" | ||
height="20" | ||
fill="currentColor" | ||
aria-hidden="true" | ||
> | ||
<path d="M10 5a1 1 0 0 1 1 1v3h3a1 1 0 1 1 0 2h-3v3a1 1 0 1 1-2 0v-3H6a1 1 0 1 1 0-2h3V6a1 1 0 0 1 1-1Z" /> | ||
</svg> | ||
Add Source | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
)} | ||
</div> | ||
</> | ||
); | ||
}); |
Oops, something went wrong.