Re-run formatter to format latest UI changes.

This commit is contained in:
Orne Brocaar 2022-05-02 11:03:01 +01:00
parent 2ea86b2ca2
commit 96482764cc
9 changed files with 49 additions and 38 deletions

View File

@ -23,7 +23,6 @@ import Autocomplete, { OptionCallbackFunc, OptionsCallbackFunc } from "../compon
import TenantStore from "../stores/TenantStore";
import SessionStore from "../stores/SessionStore";
interface IState {
tenantId: string;
selectedKey: string;
@ -160,10 +159,10 @@ class SideMenu extends Component<RouteComponentProps, IState> {
label: "Network Server",
icon: <CloudOutlined />,
children: [
{key: "ns-dashboard", icon: <DashboardOutlined />, label: <Link to="/dashboard">Dashboard</Link>},
{key: "ns-tenants", icon: <HomeOutlined />, label: <Link to="/tenants">Tenants</Link>},
{key: "ns-users", icon: <UserOutlined />, label: <Link to="/users">Users</Link>},
{key: "ns-api-keys", icon: <KeyOutlined />, label: <Link to="/api-keys">API keys</Link>},
{ key: "ns-dashboard", icon: <DashboardOutlined />, label: <Link to="/dashboard">Dashboard</Link> },
{ key: "ns-tenants", icon: <HomeOutlined />, label: <Link to="/tenants">Tenants</Link> },
{ key: "ns-users", icon: <UserOutlined />, label: <Link to="/users">Users</Link> },
{ key: "ns-api-keys", icon: <KeyOutlined />, label: <Link to="/api-keys">API keys</Link> },
],
});
}
@ -174,12 +173,32 @@ class SideMenu extends Component<RouteComponentProps, IState> {
label: "Tenant",
icon: <HomeOutlined />,
children: [
{key: "tenant-dashboard", icon: <DashboardOutlined />, label: <Link to={`/tenants/${tenantId}`}>Dashboard</Link>},
{key: "tenant-users", icon: <UserOutlined />, label: <Link to={`/tenants/${tenantId}/users`}>Users</Link>},
{key: "tenant-api-keys", icon: <KeyOutlined />, label: <Link to={`/tenants/${tenantId}/api-keys`}>API keys</Link>},
{key: "tenant-device-profiles", icon: <ControlOutlined />, label: <Link to={`/tenants/${tenantId}/device-profiles`}>Device profiles</Link>},
{key: "tenant-gateways", icon: <WifiOutlined />, label: <Link to={`/tenants/${tenantId}/gateways`}>Gateways</Link>},
{key: "tenant-applications", icon: <AppstoreOutlined />, label: <Link to={`/tenants/${tenantId}/applications`}>Applications</Link>},
{
key: "tenant-dashboard",
icon: <DashboardOutlined />,
label: <Link to={`/tenants/${tenantId}`}>Dashboard</Link>,
},
{ key: "tenant-users", icon: <UserOutlined />, label: <Link to={`/tenants/${tenantId}/users`}>Users</Link> },
{
key: "tenant-api-keys",
icon: <KeyOutlined />,
label: <Link to={`/tenants/${tenantId}/api-keys`}>API keys</Link>,
},
{
key: "tenant-device-profiles",
icon: <ControlOutlined />,
label: <Link to={`/tenants/${tenantId}/device-profiles`}>Device profiles</Link>,
},
{
key: "tenant-gateways",
icon: <WifiOutlined />,
label: <Link to={`/tenants/${tenantId}/gateways`}>Gateways</Link>,
},
{
key: "tenant-applications",
icon: <AppstoreOutlined />,
label: <Link to={`/tenants/${tenantId}/applications`}>Applications</Link>,
},
],
});
}

View File

@ -108,5 +108,5 @@ pre {
}
.CodeMirror {
height: 600px;
height: 600px;
}

View File

@ -53,7 +53,7 @@ class HttpIntegrationForm extends Component<IProps> {
<Form.List name="headersMap">
{(fields, { add, remove }) => (
<>
{fields.map(( {key, name, ...restField} ) => (
{fields.map(({ key, name, ...restField }) => (
<Row gutter={24}>
<Col span={6}>
<Form.Item

View File

@ -64,7 +64,7 @@ function encodeDownlink(input) {
}
`;
let deviceProfile = new DeviceProfile();
let deviceProfile = new DeviceProfile();
deviceProfile.setPayloadCodecScript(codecScript);
deviceProfile.setSupportsOtaa(true);
deviceProfile.setUplinkInterval(3600);

View File

@ -217,7 +217,7 @@ class DeviceProfileForm extends Component<IProps, IState> {
label="Expected uplink interval (secs)"
tooltip="The expected interval in seconds in which the device sends uplink messages. This is used to determine if a device is active or inactive."
name="uplinkInterval"
rules={[{required: true, message: "Please enter an uplink interval!"}]}
rules={[{ required: true, message: "Please enter an uplink interval!" }]}
>
<InputNumber min={0} disabled={this.props.disabled} />
</Form.Item>
@ -228,7 +228,7 @@ class DeviceProfileForm extends Component<IProps, IState> {
tooltip="Frequency to initiate an End-Device status request (request/day). Set to 0 to disable."
name="deviceStatusReqInterval"
>
<InputNumber min={0} disabled={this.props.disabled} />
<InputNumber min={0} disabled={this.props.disabled} />
</Form.Item>
</Col>
</Row>
@ -326,18 +326,21 @@ class DeviceProfileForm extends Component<IProps, IState> {
<Select.Option value={CodecRuntime.JS}>JavaScript functions</Select.Option>
</Select>
</Form.Item>
{this.state.payloadCodecRuntime === CodecRuntime.JS && <CodeEditor
label="Codec functions"
name="payloadCodecScript"
value={this.props.initialValues.getPayloadCodecScript()}
formRef={this.formRef} disabled={this.props.disabled}
/>}
{this.state.payloadCodecRuntime === CodecRuntime.JS && (
<CodeEditor
label="Codec functions"
name="payloadCodecScript"
value={this.props.initialValues.getPayloadCodecScript()}
formRef={this.formRef}
disabled={this.props.disabled}
/>
)}
</Tabs.TabPane>
<Tabs.TabPane tab="Tags" key="6">
<Form.List name="tagsMap">
{(fields, { add, remove }) => (
<>
{fields.map(( {key, name, ...restField} ) => (
{fields.map(({ key, name, ...restField }) => (
<Row gutter={24}>
<Col span={6}>
<Form.Item

View File

@ -113,7 +113,7 @@ class DeviceForm extends Component<IProps> {
<Form.List name="tagsMap">
{(fields, { add, remove }) => (
<>
{fields.map(( {key, name, ...restField} ) => (
{fields.map(({ key, name, ...restField }) => (
<Row gutter={24}>
<Col span={6}>
<Form.Item
@ -153,7 +153,7 @@ class DeviceForm extends Component<IProps> {
<Form.List name="variablesMap">
{(fields, { add, remove }) => (
<>
{fields.map(( {key, name, ...restField} ) => (
{fields.map(({ key, name, ...restField }) => (
<Row gutter={24}>
<Col span={6}>
<Form.Item

View File

@ -148,7 +148,7 @@ class GatewayForm extends Component<IProps, IState> {
<Form.List name="tagsMap">
{(fields, { add, remove }) => (
<>
{fields.map(( {key, name, ...restField} ) => (
{fields.map(({ key, name, ...restField }) => (
<Row gutter={24}>
<Col span={6}>
<Form.Item

View File

@ -126,7 +126,6 @@ class Login extends Component<RouteComponentProps, LoginState> {
if (this.props.location.search === "") {
InternalStore.settings((resp: SettingsResponse) => {
console.log("SDF");
this.setState({
loaded: true,
oidcEnabled: resp.getOpenidConnect()!.getEnabled(),

View File

@ -5789,11 +5789,6 @@ grpc-web@^1.2.1:
resolved "https://registry.yarnpkg.com/grpc-web/-/grpc-web-1.2.1.tgz#860051d705bf5baa7b81fcbd14030060bf16b7b9"
integrity sha512-ibBaJPzfMVuLPgaST9w0kZl60s+SnkPBQp6QKdpEr85tpc1gXW2QDqSne9xiyiym0logDfdUSm4aX5h9YBA2mw==
grpc-web@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/grpc-web/-/grpc-web-1.3.1.tgz#6d8affe75a103790b7ad570824e765a1d6a418e4"
integrity sha512-VxyYEAGsatecAFY3xieRDzsuhm92yQBsJD7fd5Z3MY150hZWPwkrUWetzJ0QK5W0uym4+VedPQrei38wk0eIjQ==
gzip-size@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462"
@ -8481,11 +8476,6 @@ prelude-ls@~1.1.2:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
prepend-http@^1.0.0:
version "1.0.4"
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=
prettier@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032"
@ -8505,7 +8495,7 @@ pretty-error@^4.0.0:
renderkid "^3.0.0"
pretty-format@^26.0.0, pretty-format@^26.6.2:
version "26.6.2"
version "26.6.2"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93"
integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==
dependencies: