Skip to content

Commit 578d0fa

Browse files
authored
Merge pull request #244 from LabKey/fb_merge_23.7_to_develop
Merge discvr-23.7 to develop
2 parents c39f04c + 147c3ce commit 578d0fa

File tree

137 files changed

+1737
-1562
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+1737
-1562
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,18 @@ jobs:
4040
# Only generate the distribution if this is the default branch
4141
GENERATE_DIST: ${{ env.DEFAULT_BRANCH == github.ref_name && '1' || '0' }}
4242

43-
- name: Publish Release
43+
- name: Publish Latest Release
44+
id: publish-release
4445
if: ${{ env.DEFAULT_BRANCH == github.ref_name && github.event_name == 'push' && github.base_ref == '' }}
45-
uses: "marvinpinto/action-automatic-releases@latest"
46-
with:
47-
repo_token: "${{ secrets.PAT }}"
48-
automatic_release_tag: "latest"
49-
prerelease: true
50-
title: "Development Build: ${{ env.DEFAULT_BRANCH }}"
51-
files: /home/runner/work/_temp/_github_home/lkDist/discvr/DISCVR-*
46+
env:
47+
GH_TOKEN: "${{ secrets.PAT }}"
48+
run: |
49+
LK_VERSION=$(cat /home/runner/work/_temp/_github_home/lkDist/release.txt | sed 's/-SNAPSHOT//g')
50+
cd /home/runner/work/_temp/_github_home/labkey_build/${LK_VERSION}/server/server/modules/DiscvrLabKeyModules
51+
COUNT=$(gh release list | grep 'latest' | wc -l)
52+
if [ $COUNT != '0' ];then gh release delete 'latest' --cleanup-tag -y; fi
53+
54+
git push -f origin "latest"
55+
56+
gh release create 'latest' --verify-tag --generate-notes --prerelease --title "Development Build: ${{ env.DEFAULT_BRANCH }}"
57+
gh release upload 'latest' /home/runner/work/_temp/_github_home/lkDist/discvr/DISCVR-*

.github/workflows/build_latest.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,18 @@ jobs:
3636
env:
3737
GENERATE_DIST: 1
3838

39-
# See: https://github.com/marketplace/actions/automatic-releases
40-
- name: Deploy Build
41-
if: ${{ env.DEFAULT_BRANCH == github.ref_name }}
42-
uses: "marvinpinto/action-automatic-releases@latest"
43-
with:
44-
repo_token: "${{ secrets.PAT }}"
45-
automatic_release_tag: "latest"
46-
prerelease: true
47-
title: "Development Build: ${{ fromJson(steps.get_default_branch.outputs.data).default_branch }}"
48-
files: /home/runner/work/_temp/_github_home/lkDist/discvr/DISCVR-*
39+
- name: Publish Latest Release
40+
id: publish-release
41+
if: ${{ env.DEFAULT_BRANCH == github.ref_name && github.event_name == 'push' && github.base_ref == '' }}
42+
env:
43+
GH_TOKEN: "${{ secrets.PAT }}"
44+
run: |
45+
LK_VERSION=$(cat /home/runner/work/_temp/_github_home/lkDist/release.txt | sed 's/-SNAPSHOT//g')
46+
cd /home/runner/work/_temp/_github_home/labkey_build/${LK_VERSION}/server/server/modules/DiscvrLabKeyModules
47+
COUNT=$(gh release list | grep 'latest' | wc -l)
48+
if [ $COUNT != '0' ];then gh release delete 'latest' --cleanup-tag -y; fi
49+
50+
git push -f origin "latest"
51+
52+
gh release create 'latest' --verify-tag --generate-notes --prerelease --title "Development Build: ${{ env.DEFAULT_BRANCH }}"
53+
gh release upload 'latest' /home/runner/work/_temp/_github_home/lkDist/discvr/DISCVR-*

QueryExtensions/build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import org.labkey.gradle.util.BuildUtils
2+
3+
plugins {
4+
id 'org.labkey.build.module'
5+
}
6+
7+
dependencies {
8+
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:DiscvrLabKeyModules:discvrcore", depProjectConfig: "published", depExtension: "module")
9+
}

QueryExtensions/module.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ModuleClass: org.labkey.queryextensions.QueryExtensionsModule
2+
Label: Query Extensions
3+
Description: This module contains low-level extensions to the LabKey Query layer
4+
License: Apache 2.0
5+
LicenseURL: http://www.apache.org/licenses/LICENSE-2.0
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (c) 2023 LabKey Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
-- Create schema, tables, indexes, and constraints used for QueryExtensions module here
18+
-- All SQL VIEW definitions should be created in queryextensions-create.sql and dropped in queryextensions-drop.sql
19+
CREATE SCHEMA queryextensions;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright (c) 2023 LabKey Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
-- Create schema, tables, indexes, and constraints used for QueryExtensions module here
18+
-- All SQL VIEW definitions should be created in queryextensions-create.sql and dropped in queryextensions-drop.sql
19+
CREATE SCHEMA queryextensions;
20+
GO
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
* Copyright (c) 2023 LabKey Corporation
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
18+
-->
19+
<tables xsi:schemaLocation="http://labkey.org/data/xml ..\..\..\..\schemas\tableInfo.xsd"
20+
xmlns="http://labkey.org/data/xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright (c) 2023 LabKey Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.labkey.queryextensions;
18+
19+
import org.labkey.api.action.SimpleViewAction;
20+
import org.labkey.api.action.SpringActionController;
21+
import org.labkey.api.security.RequiresPermission;
22+
import org.labkey.api.security.permissions.ReadPermission;
23+
import org.labkey.api.view.JspView;
24+
import org.labkey.api.view.NavTree;
25+
import org.springframework.validation.BindException;
26+
import org.springframework.web.servlet.ModelAndView;
27+
28+
public class QueryExtensionsController extends SpringActionController
29+
{
30+
private static final DefaultActionResolver _actionResolver = new DefaultActionResolver(QueryExtensionsController.class);
31+
public static final String NAME = "queryextensions";
32+
33+
public QueryExtensionsController()
34+
{
35+
setActionResolver(_actionResolver);
36+
}
37+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (c) 2023 LabKey Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.labkey.queryextensions;
18+
19+
public class QueryExtensionsManager
20+
{
21+
private static final QueryExtensionsManager _instance = new QueryExtensionsManager();
22+
23+
private QueryExtensionsManager()
24+
{
25+
26+
}
27+
28+
public static QueryExtensionsManager get()
29+
{
30+
return _instance;
31+
}
32+
}
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
/*
2+
* Copyright (c) 2023 LabKey Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.labkey.queryextensions;
18+
19+
import org.jetbrains.annotations.NotNull;
20+
import org.jetbrains.annotations.Nullable;
21+
import org.labkey.api.data.Container;
22+
import org.labkey.api.module.DefaultModule;
23+
import org.labkey.api.module.ModuleContext;
24+
import org.labkey.api.view.WebPartFactory;
25+
26+
import java.util.Collection;
27+
import java.util.Collections;
28+
import java.util.Set;
29+
30+
public class QueryExtensionsModule extends DefaultModule
31+
{
32+
public static final String NAME = "QueryExtensions";
33+
34+
@Override
35+
public String getName()
36+
{
37+
return NAME;
38+
}
39+
40+
@Override
41+
public @Nullable Double getSchemaVersion()
42+
{
43+
return 23.000;
44+
}
45+
46+
@Override
47+
public boolean hasScripts()
48+
{
49+
return true;
50+
}
51+
52+
@Override
53+
@NotNull
54+
protected Collection<WebPartFactory> createWebPartFactories()
55+
{
56+
return Collections.emptyList();
57+
}
58+
59+
@Override
60+
protected void init()
61+
{
62+
addController(QueryExtensionsController.NAME, QueryExtensionsController.class);
63+
}
64+
65+
@Override
66+
public void doStartup(ModuleContext moduleContext)
67+
{
68+
69+
}
70+
71+
@Override
72+
@NotNull
73+
public Collection<String> getSummary(Container c)
74+
{
75+
return Collections.emptyList();
76+
}
77+
78+
@Override
79+
@NotNull
80+
public Set<String> getSchemaNames()
81+
{
82+
return Collections.singleton(QueryExtensionsSchema.NAME);
83+
}
84+
}

0 commit comments

Comments
 (0)