Commit 42afe629 authored by ReemyHasan's avatar ReemyHasan

Add ML model

parent 4a9a737a
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>
);
}
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;
......@@ -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/";
......@@ -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">
......
This diff is collapsed.
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
......@@ -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 />,
......
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);
}
};
......@@ -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));
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment