Configurable branch for gateways dashboard sync
This commit is contained in:
parent
84fd3129ee
commit
79db9ea5be
@ -50,6 +50,8 @@ public class DashboardSyncService {
|
|||||||
private boolean enabled;
|
private boolean enabled;
|
||||||
@Value("${transport.gateway.dashboard.sync.repository_url:}")
|
@Value("${transport.gateway.dashboard.sync.repository_url:}")
|
||||||
private String repoUrl;
|
private String repoUrl;
|
||||||
|
@Value("${transport.gateway.dashboard.sync.branch:main}")
|
||||||
|
private String branch;
|
||||||
@Value("${transport.gateway.dashboard.sync.fetch_frequency:24}")
|
@Value("${transport.gateway.dashboard.sync.fetch_frequency:24}")
|
||||||
private int fetchFrequencyHours;
|
private int fetchFrequencyHours;
|
||||||
|
|
||||||
@ -61,7 +63,7 @@ public class DashboardSyncService {
|
|||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gitSyncService.registerSync(REPO_KEY, repoUrl, "main", TimeUnit.HOURS.toMillis(fetchFrequencyHours), this::update);
|
gitSyncService.registerSync(REPO_KEY, repoUrl, branch, TimeUnit.HOURS.toMillis(fetchFrequencyHours), this::update);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void update() {
|
private void update() {
|
||||||
|
|||||||
@ -1251,6 +1251,8 @@ transport:
|
|||||||
enabled: "${TB_GATEWAY_DASHBOARD_SYNC_ENABLED:true}"
|
enabled: "${TB_GATEWAY_DASHBOARD_SYNC_ENABLED:true}"
|
||||||
# URL of gateways dashboard repository
|
# URL of gateways dashboard repository
|
||||||
repository_url: "${TB_GATEWAY_DASHBOARD_SYNC_REPOSITORY_URL:https://github.com/thingsboard/gateway-management-extensions-dist.git}"
|
repository_url: "${TB_GATEWAY_DASHBOARD_SYNC_REPOSITORY_URL:https://github.com/thingsboard/gateway-management-extensions-dist.git}"
|
||||||
|
# Branch of gateways dashboard repository to work with
|
||||||
|
branch: "${TB_GATEWAY_DASHBOARD_SYNC_BRANCH:main}"
|
||||||
# Fetch frequency in hours for gateways dashboard repository
|
# Fetch frequency in hours for gateways dashboard repository
|
||||||
fetch_frequency: "${TB_GATEWAY_DASHBOARD_SYNC_FETCH_FREQUENCY:24}"
|
fetch_frequency: "${TB_GATEWAY_DASHBOARD_SYNC_FETCH_FREQUENCY:24}"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user