Skip to content

Commit 72d21e9

Browse files
committed
Merge remote-tracking branch 'upstream/ignition-8.3' into ignition-8.3
2 parents bb756d5 + f9aa673 commit 72d21e9

File tree

21 files changed

+113
-82
lines changed

21 files changed

+113
-82
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
### Gradle Examples
66

77
##### [Perspective Component](perspective-component)
8-
> [!WARNING]
9-
> Additional work on Ignition is required before all components in this example will work as expected.
10-
118
Adds component to the Perspective module's set of components, demonstrating use of various APIs in a build automation which represents one possible solution for 'production' toolchains.
129

1310
##### [Perspective Minimal Component](perspective-component-minimal)

perspective-component-minimal/gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[versions]
2-
ignition = "8.3.0-SNAPSHOT"
2+
ignition = "8.3.0-beta2"
33

44
[libraries]
55
# Dependencies provided by the Ignition SDK, they all reference the 'ignition' version

perspective-component/README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
# Perspective Component Module Example
2-
> [!WARNING]
3-
> Additional work on Ignition is required before all components in this example will work as expected.
4-
52
This is an example module which adds some custom components to the Perspective module. There are 3 different components
63
in this example, each exercising different aspects of the Perspective component API, as well as demonstrating
74
a few different ways of dealing with data and configuration of the components in the gateway designer.
@@ -31,20 +28,20 @@ Ultimately it's up to implementors to choose the tools they prefer.
3128

3229
## Quick Tool Overview
3330

34-
This project uses a number of build tools in order to complete the various parts of its assembly. It's importatnt to note that these tools are just some example options. You may use any tool you want (or no tool at all). These examples use:
31+
This project uses a number of build tools in order to complete the various parts of its assembly. It's important to note that these tools are just some example options. You may use any tool you want (or no tool at all). These examples use:
3532

36-
* [Gradle](https://gradle.org/) - the primary build tool. Most tasks executed in a typical workflow are gradle tasks.
37-
* [lerna.js](https://lernajs.io/) - is a javascript build-orchestration tool. It allows us to have independent 'modules'
33+
* [Gradle](https://gradle.org/) the primary build tool. Most tasks executed in a typical workflow are gradle tasks.
34+
* [lerna.js](https://lernajs.io/) is a javascript build-orchestration tool. It allows us to have independent 'modules'
3835
and 'packages' in the same git/hg repository without having to do a lot of complicated symlinking/publishing to pull in changes from one project to another. It's mostly useful from the commandline, outside of gradle.
39-
* [yarn](https://yarnpkg.com/) - is a javascript dependency (package) manager that provides a number of improvements
36+
* [yarn](https://yarnpkg.com/) is a javascript dependency (package) manager that provides a number of improvements
4037
over npm, though it shares much of the same commands and api. Much like Ivy or Maven, yarn is used to resolve and download dependencies hosted on remotely hosted repositories. Inductive Automation publishes our own dependencies through the
4138
same nexus repository system we use for other sdk artifacts. To correctly resolve the Inductive Automation node packages,
4239
an `.npmrc` file needs to be added to the front end projects to tell yarn/npm where to find packages in the `@inductiveautomation` namespace. You will find examples of these in the `web/` directory.
43-
* [Typescript](https://www.typescriptlang.org/) - the language used to write the front end parts. Typescript is not required, but is strongly recommended. Typescript can be thought of as modern javascript with types added (though this is a simplification). The addition of types to JS results in a far better developer experience through much better tooling
40+
* [Typescript](https://www.typescriptlang.org/) the language used to write the front end parts. Typescript is not required, but is strongly recommended. Typescript can be thought of as modern javascript with types added (though this is a simplification). The addition of types to JS results in a far better developer experience through much better tooling
4441
support. This can improve maintainability, refactoring, code navigation, bug discovery, etc. Typescript has its own compiler which emits javascript. This compiler is frequently paired with other build tools in a way that it emits the javascript, but
4542
other tools handle the actual bundling of assets, css, and other supporting dependencies. Think of typescript as the
4643
java compiler without jars or resources. It just takes typescript files in, and emits the javascript files.
47-
* [Webpack](https://webpack.js.org/) - the 'bundler' that we use to take the javascript emitted by the typescript compiler and turn it into an actual package that includes necessary assets, dependencies, generates sourcemaps, etc.
44+
* [Webpack](https://webpack.js.org/) the 'bundler' that we use to take the javascript emitted by the typescript compiler and turn it into an actual package that includes necessary assets, dependencies, generates sourcemaps, etc.
4845

4946

5047
More documentation incoming, and the web/README.md contains a lot of information about the typescript build process.
@@ -71,13 +68,13 @@ gradlew build
7168
```
7269

7370
If you would like to be able to execute parts of the build without depending on gradle, you'll need familiarity with
74-
the javascript and typescript ecosystem, including NodeJs, NPM/Yarn, Typescript, Webpack, Babel, etc.
71+
the javascript and typescript ecosystem, including Node.js, NPM/Yarn, Typescript, Webpack, Babel, etc.
7572

7673
While not a comprehensive instruction set, the process of setting up these tools would look something like the following:
7774

78-
1. Install node and npm, which can be used to further install yarn, typescript, webpack, etc. MacOs and Linux can
75+
1. Install node and npm, which can be used to further install yarn, typescript, webpack, etc. macOS and Linux can
7976
install via package managers, or they and Windows can be installed via the downloads at the
80-
[NodeJS Website](https://nodejs.org/). We recommend sticking with the LTS versions (actual versions used by the build)
77+
[Node.js Website](https://nodejs.org/). We recommend sticking with the LTS versions (actual versions used by the build)
8178
can be seen in the `./web/build.gradle` file, within the `node` configuration block.
8279

8380
2. With npm installed, install the global dev-dependency tools. While it's possible to make gradle handle all these,
@@ -104,7 +101,7 @@ This section provides a high-level overview of the different parts of this proje
104101
the `web` subproject, see the readme there.
105102

106103
This example module has a fairly traditional Ignition Module project layout with one key difference. Like most cross-scope projects, this one has a `common` subproject which is shared between gateway and designer scopes. What it does NOT
107-
have is a `client` scope. Instead we have a `web` subproject which contains the source code, assets, and build
104+
have is a `client` scope. Instead, we have a `web` subproject which contains the source code, assets, and build
108105
configuration used to build the html/js/css used in the module.
109106

110107
Within the `web` directory is a _lerna workspace_, which is simply a javascript corollary to a 'maven multi-module

perspective-component/gateway/src/main/java/org/fakester/gateway/endpoint/DataEndpoints.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.fakester.gateway.endpoint;
22

3+
import java.util.EnumSet;
34
import java.util.List;
45
import java.util.Objects;
56
import java.util.concurrent.atomic.AtomicReference;
@@ -12,6 +13,8 @@
1213
import com.inductiveautomation.ignition.gateway.dataroutes.RouteGroup;
1314
import com.inductiveautomation.ignition.gateway.model.GatewayContext;
1415
import com.inductiveautomation.ignition.gateway.tags.model.GatewayTagManager;
16+
import com.inductiveautomation.perspective.gateway.api.SessionScope;
17+
import com.inductiveautomation.perspective.gateway.comm.Routes;
1518
import jakarta.servlet.http.HttpServletResponse;
1619

1720

@@ -33,6 +36,7 @@ public static void mountRoutes(RouteGroup routes) {
3336
routes.newRoute("/component/tagcount")
3437
.type(RouteGroup.TYPE_JSON)
3538
.handler(DataEndpoints::fetchTagCount)
39+
.accessControl(Routes.requireSession(EnumSet.of(SessionScope.Client, SessionScope.Designer)))
3640
.mount();
3741
}
3842

perspective-component/gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[versions]
2-
ignition = "8.3.0-SNAPSHOT"
2+
ignition = "8.3.0-beta2"
33

44
[libraries]
55
# Dependencies provided by the Ignition SDK, they all reference the 'ignition' version

perspective-component/web/packages/client/typescript/components/TagCounter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface TagCountProps {
2727
}
2828

2929
const HOST = `${location.protocol}//${location.host}`;
30-
const COUNT_FETCH_URL = `${HOST}/main/data/radcomponents/component/tagcount`;
30+
const COUNT_FETCH_URL = `${HOST}/data/radcomponents/component/tagcount`;
3131

3232
interface TagCounterState {
3333
tagCount: number;

secret-provider/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Secret Provider
22

3-
This module provides an example implementation of the `SecretProvider` interface, which allows for the user of stored
3+
This module provides an example implementation of the `SecretProvider` interface, which allows for the use of stored
44
secrets by Ignition. It is backed by a MongoDB backend, and the secrets are expected to be stored in the MongoDB
55
database as the JSON returned from `SystemEncryptionService.entryToJson(Plaintext)`.
66

secret-provider/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
<groupId>com.inductiveautomation.ignition.examples</groupId>
88
<artifactId>secret-provider</artifactId>
99
<packaging>pom</packaging>
10-
<version>1.0.0-SNAPSHOT</version>
10+
<version>1.3.0-SNAPSHOT</version>
1111

1212
<modules>
1313
<module>secret-provider-build</module>
1414
<module>secret-provider-gateway</module>
1515
</modules>
1616

1717
<properties>
18-
<ignition-platform-version>8.3.0-beta3</ignition-platform-version>
18+
<ignition-platform-version>8.3.0-rc1</ignition-platform-version>
1919
<ignition-sdk-version>${ignition-platform-version}</ignition-sdk-version>
2020
<module-name>MongoDB Secret Provider Example</module-name>
2121
<module-description>Adds a secret provider backed by MongoDB to Ignition.</module-description>

secret-provider/secret-provider-build/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.inductiveautomation.ignition.examples</groupId>
88
<artifactId>secret-provider</artifactId>
9-
<version>1.0.0-SNAPSHOT</version>
9+
<version>1.3.0-SNAPSHOT</version>
1010
</parent>
1111

1212
<artifactId>secret-provider-build</artifactId>

secret-provider/secret-provider-gateway/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.inductiveautomation.ignition.examples</groupId>
99
<artifactId>secret-provider</artifactId>
10-
<version>1.0.0-SNAPSHOT</version>
10+
<version>1.3.0-SNAPSHOT</version>
1111
</parent>
1212

1313
<artifactId>secret-provider-gateway</artifactId>

0 commit comments

Comments
 (0)