Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
witiumCloud2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WitCloud
witiumCloud2
Commits
09870ed0
Commit
09870ed0
authored
Jul 30, 2021
by
yating.lin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改InfluxDB管理页面、存储策略管理页面
parent
bf732f9b
Pipeline
#1044
passed with stage
in 0 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
190 additions
and
24 deletions
+190
-24
login.component.ts
src/app/extra/login/login.component.ts
+12
-13
influxdb.component.html
src/app/main/influxdb/influxdb.component.html
+2
-2
influxdb.component.ts
src/app/main/influxdb/influxdb.component.ts
+2
-1
retention-policy-mgr.component.html
.../retention-policy-mgr/retention-policy-mgr.component.html
+3
-3
retention-policy-mgr.component.ts
...in/retention-policy-mgr/retention-policy-mgr.component.ts
+9
-0
en.json
src/assets/i18n/en.json
+80
-2
jpn.json
src/assets/i18n/jpn.json
+80
-2
zh.json
src/assets/i18n/zh.json
+2
-1
No files found.
src/app/extra/login/login.component.ts
View file @
09870ed0
...
@@ -39,7 +39,7 @@ export class LoginComponent implements OnInit {
...
@@ -39,7 +39,7 @@ export class LoginComponent implements OnInit {
if
(
data
.
code
===
1
)
{
if
(
data
.
code
===
1
)
{
window
.
sessionStorage
.
setItem
(
'_AMap_AMap.MapInner'
,
data
.
message
);
window
.
sessionStorage
.
setItem
(
'_AMap_AMap.MapInner'
,
data
.
message
);
this
.
router
.
navigate
([
'app/home'
]);
this
.
router
.
navigate
([
'app/home'
]);
//
this.getCurUser();
this
.
getCurUser
();
}
else
{
}
else
{
this
.
message
.
error
(
data
.
message
);
this
.
message
.
error
(
data
.
message
);
}
}
...
@@ -48,18 +48,17 @@ export class LoginComponent implements OnInit {
...
@@ -48,18 +48,17 @@ export class LoginComponent implements OnInit {
}]);
}]);
}
}
// getCurUser() {
getCurUser
()
{
// this.isLoading = true;
this
.
isLoading
=
true
;
// this.api.user.getSelfInfo(['', (data: any) => {
this
.
api
.
user
.
getSelfInfo
([
''
,
(
data
:
any
)
=>
{
// if (data.userName) {
if
(
data
.
userName
)
{
// window.sessionStorage.setItem(encodeURIComponent('_AMap_AMap.IndoorMapFunc'), encodeURIComponent(JSON.stringify(data)));
window
.
sessionStorage
.
setItem
(
encodeURIComponent
(
'_AMap_AMap.IndoorMapFunc'
),
encodeURIComponent
(
data
.
companyNo
));
// this.permission.getAllPermission('login', data);
}
else
{
// } else {
this
.
message
.
error
(
this
.
translate
.
instant
(
'noUserInfo'
));
// this.message.error(this.translate.instant('noUserInfo'));
}
// }
this
.
isLoading
=
false
;
// this.isLoading = false;
}]);
// }]);
}
// }
// toEn() {
// toEn() {
// this.translate.use('en');
// this.translate.use('en');
...
...
src/app/main/influxdb/influxdb.component.html
View file @
09870ed0
...
@@ -14,24 +14,24 @@
...
@@ -14,24 +14,24 @@
<thead
nz-thead
>
<thead
nz-thead
>
<tr>
<tr>
<th
nz-th
><span>
{{'num' | translate}}
</span></th>
<th
nz-th
><span>
{{'num' | translate}}
</span></th>
<th
nz-th
><span>
{{'companyName' | translate}}
</span></th>
<th
nz-th
><span>
{{'databaseName' | translate}}
</span></th>
<th
nz-th
><span>
{{'databaseName' | translate}}
</span></th>
<th
nz-th
><span>
{{'dbPolicy' | translate}}
</span></th>
<th
nz-th
><span>
{{'dbPolicy' | translate}}
</span></th>
<th
nz-th
><span>
{{'duration' | translate}}
</span></th>
<th
nz-th
><span>
{{'duration' | translate}}
</span></th>
<th
nz-th
><span>
{{'shardDuration' | translate}}
</span></th>
<th
nz-th
><span>
{{'shardDuration' | translate}}
</span></th>
<th
nz-th
><span>
{{'remark' | translate}}
</span></th>
<th
nz-th
><span>
{{'remark' | translate}}
</span></th>
<th
nz-th
><span>
{{'belongCompany' | translate}}
</span></th>
<th
nz-th
><span>
{{'oper' | translate}}
</span></th>
<th
nz-th
><span>
{{'oper' | translate}}
</span></th>
</tr>
</tr>
</thead>
</thead>
<tbody
nz-tbody
>
<tbody
nz-tbody
>
<tr
*
ngFor=
"let one of nzTable.data,let i = index"
>
<tr
*
ngFor=
"let one of nzTable.data,let i = index"
>
<td
nz-td
>
{{i + 1}}
</td>
<td
nz-td
>
{{i + 1}}
</td>
<td
nz-td
>
{{one.companyName}}
</td>
<td
nz-td
>
{{one.databaseName}}
</td>
<td
nz-td
>
{{one.databaseName}}
</td>
<td
nz-td
>
{{one.retentionPolicyName}}
</td>
<td
nz-td
>
{{one.retentionPolicyName}}
</td>
<td
nz-td
>
{{one.duration}}
</td>
<td
nz-td
>
{{one.duration}}
</td>
<td
nz-td
>
{{one.shardDuration}}
</td>
<td
nz-td
>
{{one.shardDuration}}
</td>
<td
nz-td
>
{{one.remark}}
</td>
<td
nz-td
>
{{one.remark}}
</td>
<td
nz-td
>
{{one.companyName}}
</td>
<td
nz-td
>
<td
nz-td
>
<span
class=
"editSpan"
(
click
)="
onPolicyMgr
(
one
)"
>
{{'retentionPolicyMgr' | translate}}
</span>
<span
class=
"editSpan"
(
click
)="
onPolicyMgr
(
one
)"
>
{{'retentionPolicyMgr' | translate}}
</span>
<nz-divider
nzType=
"vertical"
*
ngIf=
"0 == one.defaultDatabase"
></nz-divider>
<nz-divider
nzType=
"vertical"
*
ngIf=
"0 == one.defaultDatabase"
></nz-divider>
...
...
src/app/main/influxdb/influxdb.component.ts
View file @
09870ed0
...
@@ -85,7 +85,8 @@ export class InfluxdbComponent implements OnInit {
...
@@ -85,7 +85,8 @@ export class InfluxdbComponent implements OnInit {
onPolicyMgr
(
one
)
{
onPolicyMgr
(
one
)
{
this
.
router
.
navigate
([
'/app/systemMgr/influxdbMgr/retentionPolicyMgr'
],
this
.
router
.
navigate
([
'/app/systemMgr/influxdbMgr/retentionPolicyMgr'
],
{
queryParams
:
{
influxdbDatabaseNo
:
one
.
influxdbDatabaseNo
,
defaultDatabase
:
one
.
defaultDatabase
}});
{
queryParams
:
{
influxdbDatabaseNo
:
one
.
influxdbDatabaseNo
,
defaultDatabase
:
one
.
defaultDatabase
,
companyNo
:
one
.
companyNo
}});
}
}
edit
(
one
)
{
edit
(
one
)
{
this
.
isUpdate
=
true
;
this
.
isUpdate
=
true
;
...
...
src/app/main/retention-policy-mgr/retention-policy-mgr.component.html
View file @
09870ed0
<div
class=
"searchBar"
@
fade
*
ngIf=
"
defaultDatabase == 0
"
>
<div
class=
"searchBar"
@
fade
*
ngIf=
"
canEdit
"
>
<div
class=
"btnLine"
>
<div
class=
"btnLine"
>
<button
nz-button
class=
"searchBtn"
[
nzLoading
]="
isLoading
"
(
click
)="
add
()"
><span>
{{'add' | translate}}
</span></button>
<button
nz-button
class=
"searchBtn"
[
nzLoading
]="
isLoading
"
(
click
)="
add
()"
><span>
{{'add' | translate}}
</span></button>
</div>
</div>
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<th
nz-th
><span>
{{'isDefault' | translate}}
</span></th>
<th
nz-th
><span>
{{'isDefault' | translate}}
</span></th>
<th
nz-th
><span>
{{'shardDuration' | translate}}
</span></th>
<th
nz-th
><span>
{{'shardDuration' | translate}}
</span></th>
<th
nz-th
><span>
{{'remark' | translate}}
</span></th>
<th
nz-th
><span>
{{'remark' | translate}}
</span></th>
<th
nz-th
*
ngIf=
"
defaultDatabase == 0
"
><span>
{{'oper' | translate}}
</span></th>
<th
nz-th
*
ngIf=
"
canEdit
"
><span>
{{'oper' | translate}}
</span></th>
</tr>
</tr>
</thead>
</thead>
<tbody
nz-tbody
>
<tbody
nz-tbody
>
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<td
nz-td
><div
*
ngIf=
"1 === one.defaultPolicy"
>
是
</div><div
*
ngIf=
"0 === one.defaultPolicy"
>
否
</div></td>
<td
nz-td
><div
*
ngIf=
"1 === one.defaultPolicy"
>
是
</div><div
*
ngIf=
"0 === one.defaultPolicy"
>
否
</div></td>
<td
nz-td
>
{{one.shardDuration}}
</td>
<td
nz-td
>
{{one.shardDuration}}
</td>
<td
nz-td
>
{{one.remark}}
</td>
<td
nz-td
>
{{one.remark}}
</td>
<td
nz-td
*
ngIf=
"
defaultDatabase == 0
"
>
<td
nz-td
*
ngIf=
"
canEdit
"
>
<span
class=
"editSpan"
(
click
)="
onSetDefalut
(
one
)"
>
{{'setAsDefault' | translate}}
</span>
<span
class=
"editSpan"
(
click
)="
onSetDefalut
(
one
)"
>
{{'setAsDefault' | translate}}
</span>
<nz-divider
nzType=
"vertical"
></nz-divider>
<nz-divider
nzType=
"vertical"
></nz-divider>
<span
class=
"editSpan"
(
click
)="
edit
(
one
)"
>
{{'edit' | translate}}
</span>
<span
class=
"editSpan"
(
click
)="
edit
(
one
)"
>
{{'edit' | translate}}
</span>
...
...
src/app/main/retention-policy-mgr/retention-policy-mgr.component.ts
View file @
09870ed0
...
@@ -16,6 +16,7 @@ import {StringUtil} from '../../service/StringUtil';
...
@@ -16,6 +16,7 @@ import {StringUtil} from '../../service/StringUtil';
export
class
RetentionPolicyMgrComponent
implements
OnInit
{
export
class
RetentionPolicyMgrComponent
implements
OnInit
{
influxdbDatabaseNo
=
''
;
influxdbDatabaseNo
=
''
;
canEdit
=
false
;
defaultDatabase
=
1
;
defaultDatabase
=
1
;
req
:
any
=
{};
req
:
any
=
{};
data
:
any
=
[];
data
:
any
=
[];
...
@@ -34,11 +35,19 @@ export class RetentionPolicyMgrComponent implements OnInit {
...
@@ -34,11 +35,19 @@ export class RetentionPolicyMgrComponent implements OnInit {
this
.
ac
.
queryParams
.
subscribe
((
param
)
=>
{
this
.
ac
.
queryParams
.
subscribe
((
param
)
=>
{
this
.
influxdbDatabaseNo
=
param
.
influxdbDatabaseNo
;
this
.
influxdbDatabaseNo
=
param
.
influxdbDatabaseNo
;
this
.
defaultDatabase
=
param
.
defaultDatabase
;
this
.
defaultDatabase
=
param
.
defaultDatabase
;
this
.
companyNo
=
param
.
companyNo
;
});
});
this
.
init
();
this
.
init
();
}
}
init
()
{
init
()
{
const
userCompanyNo
=
window
.
sessionStorage
.
getItem
(
encodeURIComponent
(
'_AMap_AMap.IndoorMapFunc'
));
// 非默认influxDB 或者 默认influxDB数据
if
(
this
.
defaultDatabase
===
0
||
this
.
companyNo
===
userCompanyNo
)
{
this
.
canEdit
=
true
;
}
else
{
this
.
canEdit
=
false
;
}
this
.
getData
();
this
.
getData
();
}
}
...
...
src/assets/i18n/en.json
View file @
09870ed0
...
@@ -102,7 +102,7 @@
...
@@ -102,7 +102,7 @@
"topicType"
:
"主题类型"
,
"topicType"
:
"主题类型"
,
"dataType"
:
"数据类型"
,
"dataType"
:
"数据类型"
,
"inTime"
:
"间隔时间/ms"
,
"inTime"
:
"间隔时间/ms"
,
"dataSaveInTime"
:
"数据存储间隔时间/
m
s"
,
"dataSaveInTime"
:
"数据存储间隔时间/
μ
s"
,
"sensor"
:
"传感器"
,
"sensor"
:
"传感器"
,
"wayDetail"
:
"通道详情"
,
"wayDetail"
:
"通道详情"
,
"detail"
:
"详情"
,
"detail"
:
"详情"
,
...
@@ -122,5 +122,83 @@
...
@@ -122,5 +122,83 @@
"isAlarm"
:
"是否报警"
,
"isAlarm"
:
"是否报警"
,
"isTag"
:
"是否为标签"
,
"isTag"
:
"是否为标签"
,
"isId"
:
"是否为索引"
,
"isId"
:
"是否为索引"
,
"saveOther"
:
"另存为"
"saveOther"
:
"另存为"
,
"addWay"
:
"添加通道"
,
"alarmInterval"
:
"报警时间间隔/ms"
,
"wayInfo"
:
"通道报警信息模板"
,
"wayDescription"
:
"通道描述"
,
"addTopic"
:
"新增主题"
,
"interval"
:
"间隔时间/ms"
,
"dataInterval"
:
"批量数据存储间隔时间/μs"
,
"frequency"
:
"发送频率"
,
"probesModel"
:
"通道模板"
,
"topicModuleWay"
:
"主题配置模板通道"
,
"influxdbMgr"
:
"influxDB管理"
,
"databaseName"
:
"数据库名称"
,
"field"
:
"域名"
,
"dbState"
:
"数据库状态"
,
"dbPolicy"
:
"存储策略名称"
,
"simcard"
:
"sim卡号"
,
"selectScene"
:
"选择场景"
,
"configJson"
:
"配置Json"
,
"updateGateway"
:
"编辑网关"
,
"selectInfluxDB"
:
"选择数据库"
,
"topicModel"
:
"主题模板"
,
"updateSensor"
:
"编辑传感器"
,
"confirmUnbindThisRecord"
:
"确认解绑此设备吗"
,
"selectGateway"
:
"选择网关"
,
"bindGateway"
:
"绑定网关"
,
"belongAddress"
:
"所属位置"
,
"sensorType"
:
"传感器类型"
,
"changeModel"
:
"更换模板"
,
"sensorTopicWay"
:
"传感器主题通道"
,
"topic"
:
"主题"
,
"updateWay"
:
"编辑通道"
,
"updateTime"
:
"更新时间"
,
"Time"
:
"时间"
,
"Numerical"
:
"数值"
,
"updateData"
:
"最新数据"
,
"see"
:
"查看"
,
"pleaseFillAll"
:
"请填完所有必填项"
,
"isSaveOtherProbesModel"
:
"另存为通道模板"
,
"isSaveOtherTopicModel"
:
"另存为主题模板"
,
"bindTongxinAddr"
:
"绑定通信地址"
,
"bindStartTongxinAddr"
:
"绑定通信起始地址"
,
"bindUpGateway"
:
"绑定上级网关"
,
"gatewayBindTips"
:
"Modbus, Sub1G, LoRa等通信协议地址"
,
"wrongNum"
:
"数值填写错误"
,
"updateTopic"
:
"编辑主题"
,
"wrongEng"
:
"部分字段要求为英文格式"
,
"addNum"
:
"新增数量"
,
"startSN"
:
"起始序列号"
,
"confirmUnbindSelectedRecord"
:
"确认解绑选中的这些设备吗"
,
"refresh"
:
"刷新"
,
"companyAlias"
:
"公司别名"
,
"province"
:
"所在省"
,
"city"
:
"所在市"
,
"area"
:
"所在区"
,
"address"
:
"地址"
,
"manager"
:
"管理员"
,
"addCompany"
:
"新增公司"
,
"updateCompany"
:
"编辑公司"
,
"maxRole"
:
"公司最高权限"
,
"sceneName"
:
"场景名称"
,
"retentionPolicyMgr"
:
"存储策略管理"
,
"duration"
:
"存储策略时长"
,
"shardDuration"
:
"shard保存时长"
,
"retentionPolicyName"
:
"存储策略名称"
,
"retentionPolicyNo"
:
"存储策略名称"
,
"isDefault"
:
"是否 default"
,
"setAsDefault"
:
"设为 default"
,
"editInfluxDB"
:
"编辑InfluxDB"
,
"addInfluxDB"
:
"新增InfluxDB"
,
"editPolicy"
:
"编辑存储策略"
,
"addPolicy"
:
"新增存储策略"
,
"isDefaultDB"
:
"是否 default"
,
"popDuration"
:
"存储策略时长(h)"
,
"popShardDuration"
:
"shard保存时长(h)"
,
"selectInfluxDBTable"
:
"选择InfluxDB数据库"
,
"selectCompanyInfluxDBTable"
:
"选择InfluxDB数据库"
,
"noUserInfo"
:
"用户信息不存在"
,
"belongCompany"
:
"所属公司"
}
}
src/assets/i18n/jpn.json
View file @
09870ed0
...
@@ -102,7 +102,7 @@
...
@@ -102,7 +102,7 @@
"topicType"
:
"主题类型"
,
"topicType"
:
"主题类型"
,
"dataType"
:
"数据类型"
,
"dataType"
:
"数据类型"
,
"inTime"
:
"间隔时间/ms"
,
"inTime"
:
"间隔时间/ms"
,
"dataSaveInTime"
:
"数据存储间隔时间/
m
s"
,
"dataSaveInTime"
:
"数据存储间隔时间/
μ
s"
,
"sensor"
:
"传感器"
,
"sensor"
:
"传感器"
,
"wayDetail"
:
"通道详情"
,
"wayDetail"
:
"通道详情"
,
"detail"
:
"详情"
,
"detail"
:
"详情"
,
...
@@ -122,5 +122,83 @@
...
@@ -122,5 +122,83 @@
"isAlarm"
:
"是否报警"
,
"isAlarm"
:
"是否报警"
,
"isTag"
:
"是否为标签"
,
"isTag"
:
"是否为标签"
,
"isId"
:
"是否为索引"
,
"isId"
:
"是否为索引"
,
"saveOther"
:
"另存为"
"saveOther"
:
"另存为"
,
"addWay"
:
"添加通道"
,
"alarmInterval"
:
"报警时间间隔/ms"
,
"wayInfo"
:
"通道报警信息模板"
,
"wayDescription"
:
"通道描述"
,
"addTopic"
:
"新增主题"
,
"interval"
:
"间隔时间/ms"
,
"dataInterval"
:
"批量数据存储间隔时间/μs"
,
"frequency"
:
"发送频率"
,
"probesModel"
:
"通道模板"
,
"topicModuleWay"
:
"主题配置模板通道"
,
"influxdbMgr"
:
"influxDB管理"
,
"databaseName"
:
"数据库名称"
,
"field"
:
"域名"
,
"dbState"
:
"数据库状态"
,
"dbPolicy"
:
"存储策略名称"
,
"simcard"
:
"sim卡号"
,
"selectScene"
:
"选择场景"
,
"configJson"
:
"配置Json"
,
"updateGateway"
:
"编辑网关"
,
"selectInfluxDB"
:
"选择数据库"
,
"topicModel"
:
"主题模板"
,
"updateSensor"
:
"编辑传感器"
,
"confirmUnbindThisRecord"
:
"确认解绑此设备吗"
,
"selectGateway"
:
"选择网关"
,
"bindGateway"
:
"绑定网关"
,
"belongAddress"
:
"所属位置"
,
"sensorType"
:
"传感器类型"
,
"changeModel"
:
"更换模板"
,
"sensorTopicWay"
:
"传感器主题通道"
,
"topic"
:
"主题"
,
"updateWay"
:
"编辑通道"
,
"updateTime"
:
"更新时间"
,
"Time"
:
"时间"
,
"Numerical"
:
"数值"
,
"updateData"
:
"最新数据"
,
"see"
:
"查看"
,
"pleaseFillAll"
:
"请填完所有必填项"
,
"isSaveOtherProbesModel"
:
"另存为通道模板"
,
"isSaveOtherTopicModel"
:
"另存为主题模板"
,
"bindTongxinAddr"
:
"绑定通信地址"
,
"bindStartTongxinAddr"
:
"绑定通信起始地址"
,
"bindUpGateway"
:
"绑定上级网关"
,
"gatewayBindTips"
:
"Modbus, Sub1G, LoRa等通信协议地址"
,
"wrongNum"
:
"数值填写错误"
,
"updateTopic"
:
"编辑主题"
,
"wrongEng"
:
"部分字段要求为英文格式"
,
"addNum"
:
"新增数量"
,
"startSN"
:
"起始序列号"
,
"confirmUnbindSelectedRecord"
:
"确认解绑选中的这些设备吗"
,
"refresh"
:
"刷新"
,
"companyAlias"
:
"公司别名"
,
"province"
:
"所在省"
,
"city"
:
"所在市"
,
"area"
:
"所在区"
,
"address"
:
"地址"
,
"manager"
:
"管理员"
,
"addCompany"
:
"新增公司"
,
"updateCompany"
:
"编辑公司"
,
"maxRole"
:
"公司最高权限"
,
"sceneName"
:
"场景名称"
,
"retentionPolicyMgr"
:
"存储策略管理"
,
"duration"
:
"存储策略时长"
,
"shardDuration"
:
"shard保存时长"
,
"retentionPolicyName"
:
"存储策略名称"
,
"retentionPolicyNo"
:
"存储策略名称"
,
"isDefault"
:
"是否 default"
,
"setAsDefault"
:
"设为 default"
,
"editInfluxDB"
:
"编辑InfluxDB"
,
"addInfluxDB"
:
"新增InfluxDB"
,
"editPolicy"
:
"编辑存储策略"
,
"addPolicy"
:
"新增存储策略"
,
"isDefaultDB"
:
"是否 default"
,
"popDuration"
:
"存储策略时长(h)"
,
"popShardDuration"
:
"shard保存时长(h)"
,
"selectInfluxDBTable"
:
"选择InfluxDB数据库"
,
"selectCompanyInfluxDBTable"
:
"选择InfluxDB数据库"
,
"noUserInfo"
:
"用户信息不存在"
,
"belongCompany"
:
"所属公司"
}
}
src/assets/i18n/zh.json
View file @
09870ed0
...
@@ -199,5 +199,6 @@
...
@@ -199,5 +199,6 @@
"popShardDuration"
:
"shard保存时长(h)"
,
"popShardDuration"
:
"shard保存时长(h)"
,
"selectInfluxDBTable"
:
"选择InfluxDB数据库"
,
"selectInfluxDBTable"
:
"选择InfluxDB数据库"
,
"selectCompanyInfluxDBTable"
:
"选择InfluxDB数据库"
,
"selectCompanyInfluxDBTable"
:
"选择InfluxDB数据库"
,
"noUserInfo"
:
"用户信息不存在"
"noUserInfo"
:
"用户信息不存在"
,
"belongCompany"
:
"所属公司"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment