Skip to content

Commit

Permalink
Fixed style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ChandiH committed Dec 26, 2024
1 parent ed03fbd commit b64d1b0
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 19 deletions.
3 changes: 2 additions & 1 deletion src/frontend/core/common/JasmineGraphFrontendCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ long JasmineGraphFrontEndCommon::getSLAForGraphId(SQLiteDBInterface *sqlite, Per
return graphSLAValue;
}

Check warning on line 186 in src/frontend/core/common/JasmineGraphFrontendCommon.cpp

View check run for this annotation

Codecov / codecov/patch

src/frontend/core/common/JasmineGraphFrontendCommon.cpp#L185-L186

Added lines #L185 - L186 were not covered by tests

std::vector<std::vector<std::pair<std::string, std::string>>> JasmineGraphFrontEndCommon::getGraphData(SQLiteDBInterface *sqlite) {
std::vector<std::vector<std::pair<std::string, std::string>>>
JasmineGraphFrontEndCommon::getGraphData(SQLiteDBInterface *sqlite) {

Check warning on line 189 in src/frontend/core/common/JasmineGraphFrontendCommon.cpp

View check run for this annotation

Codecov / codecov/patch

src/frontend/core/common/JasmineGraphFrontendCommon.cpp#L189

Added line #L189 was not covered by tests
return sqlite->runSelect("SELECT idgraph, name, upload_path, graph_status_idgraph_status, vertexcount, edgecount, centralpartitioncount FROM graph;");
}

Expand Down
4 changes: 2 additions & 2 deletions src/frontend/core/common/JasmineGraphFrontendCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ limitations under the License.
#include "../../../query/algorithms/triangles/Triangles.h"

class JasmineGraphFrontEndCommon {
public:
public:
static bool graphExists(std::string basic_string, SQLiteDBInterface *sqlite);

static bool graphExistsByID(std::string id, SQLiteDBInterface *sqlite);
Expand Down Expand Up @@ -54,4 +54,4 @@ class JasmineGraphFrontEndCommon {
static std::string getPartitionCount(std::string path);
};

#endif //JASMINEGRAPHFRONTENDCOMMON_H
#endif //JASMINEGRAPHFRONTENDCOMMON_H
24 changes: 15 additions & 9 deletions src/frontend/ui/JasmineGraphFrontEndUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ bool JasmineGraphFrontEndUI::strian_exit;
string JasmineGraphFrontEndUI::stream_topic_name;

static void list_command(int connFd, SQLiteDBInterface *sqlite, bool *loop_exit_p);
static void add_graph_command(std::string masterIP, int connFd, SQLiteDBInterface *sqlite, bool *loop_exit_p, std::string command);
static void remove_graph_command(std::string masterIP, int connFd, SQLiteDBInterface *sqlite, bool *loop_exit_p, std::string command);
static void triangles_command(std::string masterIP, int connFd, SQLiteDBInterface *sqlite,
static void add_graph_command(std::string masterIP,
int connFd, SQLiteDBInterface *sqlite, bool *loop_exit_p, std::string command);
static void remove_graph_command(std::string masterIP,
int connFd, SQLiteDBInterface *sqlite, bool *loop_exit_p, std::string command);
static void triangles_command(std::string masterIP,
int connFd, SQLiteDBInterface *sqlite,
PerformanceSQLiteDBInterface *perfSqlite, JobScheduler *jobScheduler, bool *loop_exit_p, std::string command);

void *uifrontendservicesesion(void *dummyPt) {
Expand Down Expand Up @@ -110,11 +113,11 @@ void *uifrontendservicesesion(void *dummyPt) {
break;

Check warning on line 113 in src/frontend/ui/JasmineGraphFrontEndUI.cpp

View check run for this annotation

Codecov / codecov/patch

src/frontend/ui/JasmineGraphFrontEndUI.cpp#L113

Added line #L113 was not covered by tests
} else if (token.compare(LIST) == 0) {
list_command(connFd, sqlite, &loop_exit);
} else if (token.compare(ADGR) == 0){
} else if (token.compare(ADGR) == 0) {
add_graph_command(masterIP, connFd, sqlite, &loop_exit, line);
} else if (token.compare(TRIANGLES) == 0) {
triangles_command(masterIP, connFd, sqlite, perfSqlite, jobScheduler, &loop_exit, line);
}else if (token.compare(RMGR) == 0) {
} else if (token.compare(RMGR) == 0) {
remove_graph_command(masterIP, connFd, sqlite, &loop_exit, line);
} else {
ui_frontend_logger.error("Message format not recognized " + line);
Expand Down Expand Up @@ -302,7 +305,8 @@ std::string sanitizeFileName(const std::string& fileName) {
return std::regex_replace(fileName, unsafePattern, "");
}

Check warning on line 306 in src/frontend/ui/JasmineGraphFrontEndUI.cpp

View check run for this annotation

Codecov / codecov/patch

src/frontend/ui/JasmineGraphFrontEndUI.cpp#L306

Added line #L306 was not covered by tests

static void add_graph_command(std::string masterIP, int connFd, SQLiteDBInterface *sqlite, bool *loop_exit_p, std::string command) {
static void add_graph_command(std::string masterIP,

Check warning on line 308 in src/frontend/ui/JasmineGraphFrontEndUI.cpp

View check run for this annotation

Codecov / codecov/patch

src/frontend/ui/JasmineGraphFrontEndUI.cpp#L308

Added line #L308 was not covered by tests
int connFd, SQLiteDBInterface *sqlite, bool *loop_exit_p, std::string command) {
char delimiter = '|';

Check warning on line 310 in src/frontend/ui/JasmineGraphFrontEndUI.cpp

View check run for this annotation

Codecov / codecov/patch

src/frontend/ui/JasmineGraphFrontEndUI.cpp#L310

Added line #L310 was not covered by tests
std::stringstream ss(command);
std::string token;
Expand Down Expand Up @@ -397,7 +401,8 @@ static void add_graph_command(std::string masterIP, int connFd, SQLiteDBInterfac
}
}

static void remove_graph_command(std::string masterIP, int connFd, SQLiteDBInterface *sqlite, bool *loop_exit_p, std::string command){
static void remove_graph_command(std::string masterIP,

Check warning on line 404 in src/frontend/ui/JasmineGraphFrontEndUI.cpp

View check run for this annotation

Codecov / codecov/patch

src/frontend/ui/JasmineGraphFrontEndUI.cpp#L404

Added line #L404 was not covered by tests
int connFd, SQLiteDBInterface *sqlite, bool *loop_exit_p, std::string command) {
char delimiter = '|';

Check warning on line 406 in src/frontend/ui/JasmineGraphFrontEndUI.cpp

View check run for this annotation

Codecov / codecov/patch

src/frontend/ui/JasmineGraphFrontEndUI.cpp#L406

Added line #L406 was not covered by tests
std::stringstream ss(command);
std::string token;
Expand Down Expand Up @@ -439,8 +444,9 @@ static void remove_graph_command(std::string masterIP, int connFd, SQLiteDBInter
}
}

static void triangles_command(std::string masterIP, int connFd, SQLiteDBInterface *sqlite,
PerformanceSQLiteDBInterface *perfSqlite, JobScheduler *jobScheduler, bool *loop_exit_p, std::string command) {
static void triangles_command(std::string masterIP, int connFd,

Check warning on line 447 in src/frontend/ui/JasmineGraphFrontEndUI.cpp

View check run for this annotation

Codecov / codecov/patch

src/frontend/ui/JasmineGraphFrontEndUI.cpp#L447

Added line #L447 was not covered by tests
SQLiteDBInterface *sqlite, PerformanceSQLiteDBInterface *perfSqlite,
JobScheduler *jobScheduler, bool *loop_exit_p, std::string command) {
char delimiter = '|';

Check warning on line 450 in src/frontend/ui/JasmineGraphFrontEndUI.cpp

View check run for this annotation

Codecov / codecov/patch

src/frontend/ui/JasmineGraphFrontEndUI.cpp#L450

Added line #L450 was not covered by tests
std::stringstream ss(command);
std::string token;
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/ui/JasmineGraphFrontEndUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ class JasmineGraphFrontEndUI {
JobScheduler *jobScheduler;
};

#endif //JASMINEGRAPHFRONTENDUI_H
#endif //JASMINEGRAPHFRONTENDUI_H
6 changes: 2 additions & 4 deletions src/frontend/ui/JasmineGraphFrontEndUIProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ limitations under the License.

#include "../JasmineGraphFrontEndProtocol.h"

class JasmineGraphFrontEndUIProtocol : public JasminGraphFrontEndProtocol
{

class JasmineGraphFrontEndUIProtocol : public JasminGraphFrontEndProtocol {
};

#endif //JASMINEGRAPHFRONTENDUIPROTOCOL_H
#endif //JASMINEGRAPHFRONTENDUIPROTOCOL_H
2 changes: 1 addition & 1 deletion src/server/JasmineGraphServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void *runfrontend(void *dummyPt) {
return NULL;
}

void *runuifrontend(void *dummyPt){
void *runuifrontend(void *dummyPt) {
JasmineGraphServer *refToServer = (JasmineGraphServer *)dummyPt;
refToServer->frontendUI = new JasmineGraphFrontEndUI(refToServer->sqlite, refToServer->performanceSqlite,

Check warning on line 83 in src/server/JasmineGraphServer.cpp

View check run for this annotation

Codecov / codecov/patch

src/server/JasmineGraphServer.cpp#L81-L83

Added lines #L81 - L83 were not covered by tests
refToServer->masterHost, refToServer->jobScheduler);
Expand Down
2 changes: 1 addition & 1 deletion src/util/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ std::string Utils::downloadFile(const std::string& fileURL, const std::string& l

// Set curl options
curl_easy_setopt(curl, CURLOPT_URL, fileURL.c_str());
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); // Follow redirects if any
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); // Follow redirects if any
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_file_callback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &outFile);

Expand Down

0 comments on commit b64d1b0

Please sign in to comment.