Skip to content

Commit

Permalink
Merge pull request #405 from hashmapinc/revert-401-Tempus-400
Browse files Browse the repository at this point in the history
Revert "Tempus-400"
  • Loading branch information
cherrera2001 committed Jun 4, 2018
2 parents f8eb770 + 032ba1f commit 61f4f57
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,12 @@ public void performInstall() {

componentDiscoveryService.discoverComponents();

systemDataLoaderService.loadSystemThemes();
systemDataLoaderService.createSysAdmin();
systemDataLoaderService.createAdminSettings();
systemDataLoaderService.loadSystemWidgets();
systemDataLoaderService.loadSystemPlugins();
systemDataLoaderService.loadSystemRules();

systemDataLoaderService.loadSystemThemes();

if (loadDemo) {
log.info("Loading demo data...");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,24 +176,18 @@ public void createAdminSettings() throws Exception {

public void loadSystemThemes() throws Exception {

List<Theme> theme = themeService.findAll();

if(theme.size() < 2) {

log.info("Loading theme data...");
Theme theme1 = new Theme();
theme1.setThemeName("Tempus Blue");
theme1.setThemeValue("themeBlue");
theme1.setThemeStatus(false);
themeService.saveTheme(theme1);

Theme theme2 = new Theme();
theme2.setThemeName("Tempus Dark");
theme2.setThemeValue("themeDark");
theme2.setThemeStatus(true);
themeService.saveTheme(theme2);

}
log.info("Loading theme data...");
Theme theme1 = new Theme();
theme1.setThemeName("Tempus Blue");
theme1.setThemeValue("themeBlue");
theme1.setThemeStatus(false);
themeService.saveTheme(theme1);

Theme theme2 = new Theme();
theme2.setThemeName("Tempus Dark");
theme2.setThemeValue("themeDark");
theme2.setThemeStatus(true);
themeService.saveTheme(theme2);


}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ private static List<CQLDataSet> getDataSetLists(){
dataSets.addAll(Arrays.asList(
new ClassPathCQLDataSet("cassandra/upgrade/1.cql", false, false)
));

dataSets.addAll(Arrays.asList(
new ClassPathCQLDataSet("cassandra/upgrade/2.cql", false, false)
));

return dataSets;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ public class ControllerSqlTestSuite {
Arrays.asList("sql/schema.sql", "sql/system-data.sql"),
"sql/drop-all-tables.sql",
"sql-test.properties",
Arrays.asList("sql/upgrade/1.sql", "sql/upgrade/2.sql", "sql/upgrade/3.sql")
Arrays.asList("sql/upgrade/1.sql", "sql/upgrade/2.sql")
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ public class MqttSqlTestSuite {
Arrays.asList("sql/schema.sql", "sql/system-data.sql"),
"sql/drop-all-tables.sql",
"sql-test.properties",
Arrays.asList("sql/upgrade/1.sql", "sql/upgrade/2.sql","sql/upgrade/3.sql"));
Arrays.asList("sql/upgrade/1.sql", "sql/upgrade/2.sql"));
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class SystemSqlTestSuite {
Arrays.asList("sql/schema.sql", "sql/system-data.sql"),
"sql/drop-all-tables.sql",
"sql-test.properties",
Arrays.asList("sql/upgrade/1.sql", "sql/upgrade/2.sql", "sql/upgrade/3.sql")
Arrays.asList("sql/upgrade/1.sql", "sql/upgrade/2.sql")
);


Expand Down
7 changes: 7 additions & 0 deletions dao/src/main/resources/cassandra/schema.cql
Original file line number Diff line number Diff line change
Expand Up @@ -781,3 +781,10 @@ CREATE TABLE IF NOT EXISTS tempus.audit_log_by_tenant_id_partitions (
) WITH CLUSTERING ORDER BY ( partition ASC )
AND compaction = { 'class' : 'LeveledCompactionStrategy' };

CREATE TABLE IF NOT EXISTS tempus.theme (
id uuid,
name text,
value text,
is_enabled boolean,
PRIMARY KEY (id,name)
);
23 changes: 0 additions & 23 deletions dao/src/main/resources/cassandra/upgrade/2.cql

This file was deleted.

6 changes: 6 additions & 0 deletions dao/src/main/resources/sql/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,12 @@ CREATE TABLE IF NOT EXISTS computation_job (
tenant_id varchar(31)
);

CREATE TABLE IF NOT EXISTS theme (
id varchar (31) NOT NULL CONSTRAINT theme_pkey PRIMARY KEY,
name varchar,
value varchar,
is_enabled boolean
);



Expand Down
23 changes: 0 additions & 23 deletions dao/src/main/resources/sql/upgrade/3.sql

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class JpaDaoTestSuite {
Arrays.asList("sql/schema.sql", "sql/system-data.sql"),
"sql/drop-all-tables.sql",
"sql-test.properties",
Arrays.asList("sql/upgrade/1.sql", "sql/upgrade/2.sql", "sql/upgrade/3.sql")
Arrays.asList("sql/upgrade/1.sql", "sql/upgrade/2.sql")
);

}
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ private static List<CQLDataSet> getDataSetLists(){
dataSets.addAll(Arrays.asList(
new ClassPathCQLDataSet("cassandra/upgrade/1.cql", false, false)
));
dataSets.addAll(Arrays.asList(
new ClassPathCQLDataSet("cassandra/upgrade/2.cql", false, false)
));

return dataSets;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ public class SqlDaoServiceTestSuite {
Arrays.asList("sql/schema.sql", "sql/system-data.sql"),
"sql/drop-all-tables.sql",
"sql-test.properties",
Arrays.asList("sql/upgrade/1.sql", "sql/upgrade/2.sql","sql/upgrade/3.sql")
Arrays.asList("sql/upgrade/1.sql", "sql/upgrade/2.sql")
);
}

0 comments on commit 61f4f57

Please sign in to comment.