|
|
|
@ -259,18 +259,12 @@ public class InstallScripts { |
|
|
|
try { |
|
|
|
createDefaultRuleChains(tenantId); |
|
|
|
createDefaultRuleChain(tenantId, "Thermostat"); |
|
|
|
loadEdgeDemoRuleChains(tenantId); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("Unable to load dashboard from json", e); |
|
|
|
throw new RuntimeException("Unable to load dashboard from json", e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void loadEdgeDemoRuleChains(TenantId tenantId) throws Exception { |
|
|
|
Path edgeDemoRuleChainsDir = Paths.get(getDataDir(), JSON_DIR, DEMO_DIR, EDGE_MANAGEMENT, RULE_CHAINS_DIR); |
|
|
|
loadRuleChainsFromPath(tenantId, edgeDemoRuleChainsDir); |
|
|
|
} |
|
|
|
|
|
|
|
public void createOAuth2Templates() throws Exception { |
|
|
|
Path oauth2ConfigTemplatesDir = Paths.get(getDataDir(), JSON_DIR, SYSTEM_DIR, OAUTH2_CONFIG_TEMPLATES_DIR); |
|
|
|
try (DirectoryStream<Path> dirStream = Files.newDirectoryStream(oauth2ConfigTemplatesDir, path -> path.toString().endsWith(JSON_EXT))) { |
|
|
|
|