Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
web-ui
Project
Overview
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
WEBGDE-Components
web-ui
Commits
d7b50cde
Commit
d7b50cde
authored
Jan 13, 2023
by
Jorem Magcawas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update save metrics
parent
c4eed604
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
41 deletions
+21
-41
config.ini
WebGde/WebContent/WEB-INF/config/config.ini
+3
-0
undefined
WebGde/WebContent/metrics/undefined
+0
-35
AppConfig.java
.../java/com/svi/template/restservice/globals/AppConfig.java
+4
-1
ApplicationConfig.java
.../com/svi/webgde/restservice/config/ApplicationConfig.java
+3
-1
GDEWebServices.java
...a/com/svi/webgde/restservice/services/GDEWebServices.java
+11
-4
No files found.
WebGde/WebContent/WEB-INF/config/config.ini
View file @
d7b50cde
...
...
@@ -16,3 +16,6 @@ CASSANDRA_KEYSPACE=gfs_db
GET_ROLE_RIGHTS_URL
=
http://localhost:8080/gfs-explorer/svc/gfs-rest/rights/
CHECK_RIGHT_URL
=
http://localhost:8080/gfs-explorer/svc/gfs-rest/check-right/
GET_SUB_URL
=
http://localhost:8080/gfs-explorer/svc/gfs-rest/get-sub/
[GDE_URL]
METRICS_DIR
=
C:
\\
Users
\\
jmagcawas
\\
git
\\
web-ui
\\
WebGde
\\
WebContent
\\
metrics
\\
WebGde/WebContent/metrics/undefined
deleted
100644 → 0
View file @
c4eed604
Start Time: 1/11/2023 2:46:07 PM
End Time: 1/11/2023 2:49:36 PM
Start Time: 1/11/2023 2:54:23 PM
End Time: 1/11/2023 2:56:01 PM
Start Time: 1/11/2023 4:27:21 PM
End Time: 1/11/2023 4:27:37 PM
Start Time: 1/11/2023 4:36:17 PM
End Time: 1/11/2023 4:36:57 PM
Start Time: 1/11/2023 4:38:04 PM
End Time: 1/11/2023 4:38:15 PM
Start Time: 1/11/2023 5:03:29 PM
End Time: 1/11/2023 5:04:17 PM
Start Time: 1/11/2023 5:07:25 PM
End Time: 1/11/2023 5:07:41 PM
Start Time: 1/11/2023 5:15:32 PM
End Time: 1/11/2023 5:15:34 PM
Start Time: 1/12/2023 3:13:39 PM
End Time: 1/12/2023 3:14:05 PM
Start Time: 1/12/2023 3:13:39 PM
End Time: 1/12/2023 3:15:44 PM
Start Time: 1/12/2023 3:24:06 PM
End Time: 1/12/2023 3:24:21 PM
\ No newline at end of file
WebGde/src/main/java/com/svi/template/restservice/globals/AppConfig.java
View file @
d7b50cde
...
...
@@ -22,7 +22,10 @@ public enum AppConfig {
SOLR_PORT
(
"SOLR_PORT"
),
SOLR_CORE_NAME
(
"SOLR_CORE_NAME"
),
SOLR_IDKEY
(
"SOLR_IDKEY"
),
MENU_PROPERTIES
(
"MENU_PROPERTIES"
);
MENU_PROPERTIES
(
"MENU_PROPERTIES"
),
METRICS_DIR
(
"METRICS_DIR"
);
private
String
value
=
""
;
private
static
Properties
properties
;
...
...
WebGde/src/main/java/com/svi/webgde/restservice/config/ApplicationConfig.java
View file @
d7b50cde
...
...
@@ -20,7 +20,9 @@ public enum ApplicationConfig {
GET_ROLE_RIGHTS_URL
(
"GET_ROLE_RIGHTS_URL"
),
CHECK_RIGHT_URL
(
"CHECK_RIGHT_URL"
),
GET_SUBFOLDERS_URL
(
"GET_SUBFOLDERS_URL"
),
GET_SUBFILES_URL
(
"GET_SUBFILES_URL"
);
GET_SUBFILES_URL
(
"GET_SUBFILES_URL"
),
METRICS_DIR
(
"METRICS_DIR"
);
private
String
value
=
""
;
private
static
Properties
prop
;
...
...
WebGde/src/main/java/com/svi/webgde/restservice/services/GDEWebServices.java
View file @
d7b50cde
...
...
@@ -27,6 +27,7 @@ import org.json.simple.JSONArray;
import
com.opencsv.CSVReader
;
import
com.opencsv.CSVWriter
;
import
com.svi.template.restservice.globals.AppConfig
;
import
com.svi.webgde.restservice.object.XMLContents
;
import
com.svi.webgde.restservice.utils.XMLUtil
;
...
...
@@ -119,9 +120,15 @@ public class GDEWebServices {
@Consumes
(
MediaType
.
APPLICATION_JSON
)
@Produces
(
MediaType
.
APPLICATION_JSON
)
@Path
(
"/write-mertrics"
)
public
Response
writeCSVMetrics
(
JsonObject
jsonObject
)
{
String
tempDir
=
"C:\\Users\\jmagcawas\\git\\web-ui\\WebGde\\WebContent\\metrics\\"
+
jsonObject
.
getString
(
"file_name"
).
trim
();
File
file
=
new
File
(
tempDir
);
public
Response
writeCSVMetrics
(
JsonObject
jsonObject
)
{
String
myfolder
=
AppConfig
.
METRICS_DIR
.
getValue
();
File
folderFile
=
new
File
(
myfolder
);
if
(!
folderFile
.
exists
())
{
folderFile
.
mkdir
();
}
String
metricFile
=
myfolder
+
"/"
+
jsonObject
.
getString
(
"file_name"
).
trim
();
File
file
=
new
File
(
metricFile
);
int
record_count
=
1
;
if
(!
file
.
exists
())
{
try
{
...
...
@@ -142,7 +149,7 @@ public class GDEWebServices {
CSVReader
reader
=
null
;
int
linecount
=
0
;
try
{
reader
=
new
CSVReader
(
new
FileReader
(
tempDir
));
reader
=
new
CSVReader
(
new
FileReader
(
metricFile
));
String
[]
nextLine
;
String
[]
lastLine
=
null
;
//read one line at a time
...
...
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