Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
FMS_Project_Frontend
Project
Project
Details
Activity
Releases
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
bashar.hussein
FMS_Project_Frontend
Commits
42afe629
Commit
42afe629
authored
Aug 08, 2023
by
ReemyHasan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ML model
parent
4a9a737a
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
407 additions
and
4 deletions
+407
-4
index.tsx
packages/admin/pages/ml-model/index.tsx
+25
-0
ml-model.jpg
packages/admin/public/images/ml-model.jpg
+0
-0
ml1.png
packages/admin/public/images/ml1.png
+0
-0
ml2.jpg
packages/admin/public/images/ml2.jpg
+0
-0
ml-model-icon.tsx
...ponents/assets/custom-ant-icons/sidebar/ml-model-icon.tsx
+13
-0
app-constant.tsx
packages/admin/src/data/constant/app-constant.tsx
+1
-0
index.tsx
packages/admin/src/features/about/index.tsx
+1
-0
index.tsx
packages/admin/src/features/ml-model/index.tsx
+276
-0
metrics-pop-up.tsx
packages/admin/src/features/ml-model/metrics-pop-up.tsx
+44
-0
routes.tsx
packages/admin/src/routes.tsx
+6
-0
ml-model-service.tsx
packages/admin/src/services/ml-model-service.tsx
+15
-0
tailwind.css
packages/admin/src/styles/tailwind.css
+22
-0
styles.module.css
packages/shared-library/src/buttons/styles.module.css
+4
-4
No files found.
packages/admin/pages/ml-model/index.tsx
0 → 100644
View file @
42afe629
import
*
as
React
from
"react"
;
import
Head
from
"next/head"
;
import
AppLayout
from
"@/src/components/layout"
;
import
MLContent
from
"@/src/features/ml-model"
;
import
{
Fragment
}
from
"react"
;
import
useTranslation
from
"next-translate/useTranslation"
;
import
{
TranslationFiles
}
from
"@/src/data/core"
;
import
ProtectedRoute
from
"../../src/features/protectedRoute"
;
export
default
function
MLModel
()
{
const
{
t
}
=
useTranslation
(
TranslationFiles
.
COMMON
);
return
(
<
Fragment
>
<
ProtectedRoute
role=
"admin"
>
<
Head
>
<
title
>
{
t
(
"ml-model"
)
}
</
title
>
</
Head
>
<
AppLayout
>
<
MLContent
/>
</
AppLayout
>
</
ProtectedRoute
>
</
Fragment
>
);
}
packages/admin/public/images/ml-model.jpg
0 → 100644
View file @
42afe629
324 KB
packages/admin/public/images/ml1.png
0 → 100644
View file @
42afe629
701 KB
packages/admin/public/images/ml2.jpg
0 → 100644
View file @
42afe629
438 KB
packages/admin/src/components/assets/custom-ant-icons/sidebar/ml-model-icon.tsx
0 → 100644
View file @
42afe629
import
React
from
"react"
;
import
{
BulbOutlined
}
from
"@ant-design/icons"
;
const
MlIcon
=
(
props
:
any
)
=>
{
// const AboutIconSvg = () => (
// );
return
(
<
BulbOutlined
style=
{
{
fontSize
:
'19px'
,
color
:
'#fadb14'
}
}
className=
{
"ExclamationCircleOutlined "
}
/>
// <Icon data-testid="arrow-left-icon" component={AboutIconSvg} {...props} />
);
};
export
default
MlIcon
;
packages/admin/src/data/constant/app-constant.tsx
View file @
42afe629
...
...
@@ -5,4 +5,5 @@ export const TrapURL: string = `http://localhost:6644/api/rethink/data`;
export
const
SettingURL
:
string
=
`http://localhost:6644/api/about`
;
export
const
AuthURL
:
string
=
"http://localhost:6644/auth/"
;
export
const
UserURL
:
string
=
`http://localhost:6644/users/`
;
export
const
MLMODELURL
:
string
=
"http://192.168.24.47:7373/api/"
;
packages/admin/src/features/about/index.tsx
View file @
42afe629
...
...
@@ -104,6 +104,7 @@ export default function AboutContent() {
<
section
className=
"pb-20 bg-blueGray-200 -mt-24"
>
<
div
className=
"container mx-auto px-4"
>
<
div
className=
"flex flex-wrap"
>
<
div
className=
"lg:pt-12 pt-6 w-full md:w-4/12 px-4 text-center"
>
<
div
className=
"relative flex flex-col min-w-0 break-words bg-white w-full mb-8 shadow-lg rounded-lg"
>
<
div
className=
"px-4 py-5 flex-auto"
>
...
...
packages/admin/src/features/ml-model/index.tsx
0 → 100644
View file @
42afe629
This diff is collapsed.
Click to expand it.
packages/admin/src/features/ml-model/metrics-pop-up.tsx
0 → 100644
View file @
42afe629
import
React
,
{
useState
,
useEffect
}
from
"react"
;
import
{
Button
,
Card
,
Col
,
DatePicker
,
Form
,
Input
,
Modal
,
Row
,
Select
,
message
,
}
from
"antd"
;
import
useTranslation
from
"next-translate/useTranslation"
;
import
{
TranslationFiles
}
from
"@/src/data/core"
;
import
{
UpdateUserInfo
}
from
"@/src/services/user-service"
;
import
{
useCookies
}
from
"react-cookie"
;
import
MainUtils
from
"@/src/utils/main"
;
interface
Props
{
modalProps
:
any
;
setModalProps
:
any
;
}
export
default
function
MetricsPopUp
({
modalProps
,
setModalProps
}:
Props
)
{
const
{
t
}
=
useTranslation
(
TranslationFiles
.
COMMON
);
const
[
isModalOpen
,
setIsModalOpen
]
=
useState
(
false
);
const
handleCancel
=
()
=>
{
setModalProps
(
false
,
null
);
};
useEffect
(()
=>
{
setIsModalOpen
(
modalProps
.
isOpen
);
},
[
modalProps
])
return
(
<
Modal
title=
"Metrics Details"
visible=
{
isModalOpen
}
onOk=
{
handleCancel
}
onCancel=
{
handleCancel
}
>
<
div
>
Hi
</
div
>
</
Modal
>
);
}
\ No newline at end of file
packages/admin/src/routes.tsx
View file @
42afe629
...
...
@@ -6,6 +6,7 @@ import SchedulingIcon from "@/src/components/assets/custom-ant-icons/sidebar/sch
import
AboutIcon
from
"@/src/components/assets/custom-ant-icons/sidebar/about-icon"
;
import
UsersIcon
from
"@/src/components/assets/custom-ant-icons/sidebar/users-icon"
;
import
SetupIcon
from
"@/src/components/assets/custom-ant-icons/sidebar/setup-icon"
;
import
MlIcon
from
"@/src/components/assets/custom-ant-icons/sidebar/ml-model-icon"
;
type
RoutesType
=
{
key
:
string
;
...
...
@@ -44,6 +45,11 @@ export const routes: Array<RoutesType> = [
icon
:
<
UsersIcon
/>,
label
:
"users"
,
},
{
key
:
"ml-model"
,
icon
:
<
MlIcon
/>,
label
:
"ml-model"
,
},
{
key
:
"setup"
,
icon
:
<
SetupIcon
/>,
...
...
packages/admin/src/services/ml-model-service.tsx
0 → 100644
View file @
42afe629
import
axios
from
"axios"
;
import
{
MLMODELURL
}
from
"../data/constant/app-constant"
;
import
{
message
}
from
"antd"
;
export
const
sendFileToServer
=
async
(
data
:
any
)
=>
{
try
{
// console.log(values);
const
response
=
await
axios
.
post
(
MLMODELURL
+
"csv/upload"
,
data
);
message
.
success
(
"File uploaded Successfully "
+
response
);
return
response
;
}
catch
(
error
)
{
message
.
error
(
"error!!"
+
error
);
}
};
packages/admin/src/styles/tailwind.css
View file @
42afe629
...
...
@@ -1515,7 +1515,29 @@ select {
--tw-border-opacity
:
1
;
border-color
:
rgba
(
212
,
212
,
216
,
var
(
--tw-border-opacity
));
}
.secondary
{
background-color
:
#FFFFFF
;
color
:
var
(
--primary-gray-700
);
border
:
1px
solid
#D0D5DD
;
}
.traity
{
background-color
:
var
(
--primary-indego-50
);
color
:
#000f24
;
border
:
1px
solid
#D0D5DD
;
}
.link
{
background-color
:
rgb
(
42
,
165
,
73
);
color
:
var
(
--primary-indego-50
);
border
:
none
;
box-shadow
:
none
!important
;
}
.move
{
background-color
:
#6366f1
;
color
:
var
(
--primary-indego-50
);
border
:
none
;
box-shadow
:
none
!important
;
}
.focus
\
:border-gray-500:focus
{
--tw-border-opacity
:
1
;
border-color
:
rgba
(
113
,
113
,
122
,
var
(
--tw-border-opacity
));
...
...
packages/shared-library/src/buttons/styles.module.css
View file @
42afe629
...
...
@@ -52,24 +52,24 @@
.traity
{
background-color
:
var
(
--primary-indego-50
);
color
:
var
(
--primary-blue-700
);
border
:
1px
solid
var
(
--secondary-gray-100
)
;
border
:
1px
solid
#D0D5DD
;
}
.traity
:hover
{
background-color
:
var
(
--secondary-gray
);
color
:
var
(
--primary-blue-700
)
!important
;
border
:
1px
solid
var
(
--secondary-gray
)
!important
;
border
:
1px
solid
#D0D5DD
;
}
.link
{
background-color
:
var
(
--primary-blue-600
);
background-color
:
rgb
(
42
,
165
,
73
);
color
:
var
(
--primary-indego-50
);
border
:
none
;
box-shadow
:
none
!important
;
}
.link
:hover
{
background-color
:
var
(
--primary-blue-700
);
background-color
:
rgb
(
90
,
204
,
118
);
color
:
var
(
--secondary-gray-100
)
!important
;
border
:
none
!important
;
box-shadow
:
none
!important
;
...
...
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