Skip to content

Commit

Permalink
feat: centre of computing page
Browse files Browse the repository at this point in the history
  • Loading branch information
heydoyouknowme0 committed Aug 31, 2024
1 parent f8b70b0 commit a59a41d
Show file tree
Hide file tree
Showing 4 changed files with 361 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
import WorkInProgress from '~/components/work-in-progress';
import Link from 'next/link';
import { Suspense } from 'react';

import Heading from '~/components/heading';
import ImageHeader from '~/components/image-header';
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from '~/components/ui';
import { getTranslations } from '~/i18n/translations';
import { db } from '~/server/db';

Expand All @@ -12,8 +24,160 @@ export default async function CentreOfComputingAndNetworking({

const section = (await db.query.sections.findFirst({
where: (section, { eq }) =>
eq(section.urlName, 'centre-of-computing-and-networking'),
eq(section.urlName, 'centre-of-computing-networking'),
}))!;

return <WorkInProgress locale={locale} />;
return (
<>
<ImageHeader
title={text.title}
src="institute/centre-of-computing-and-networking/header.jpg"
headings={[
{ label: text.label.about, href: '#about' },
{
label: text.label.facilities,
href: '#facilities',
},
{
label: text.label.infrastructure,
href: '#infrastructure',
},
]}
/>
<section id="about" className="container">
<p>{section?.aboutUs}</p>
<Heading
glyphDirection="ltr"
heading="h2"
text={text.label.about}
href="#about"
/>
<h5>{text.responsibilitiesTitle}</h5>
<ol className="!mt-1 list-inside list-decimal">
{text.responsibilities.map((responsibility, index) => (
<li key={index}>{responsibility}</li>
))}
</ol>
<p className="mb-3 mt-2 text-primary-700 hover:text-primary-500">
<Link href="#infrastructure">
{text.clickHere}
<strong>{text.clickHereInfo}</strong>
</Link>
</p>
<Table scrollAreaClassName="mb-10">
<TableHeader>
<TableRow>
<TableHead>{text.staffTable.designation}</TableHead>
<TableHead>{text.staffTable.name}</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<Suspense
fallback={
<TableRow>
<TableCell colSpan={2} rowSpan={2}>
Loading...
</TableCell>
</TableRow>
}
>
<DelayedStaff
id={section.id}
headId={section.headFacultyId}
profIncharge={text.staffTable.profIncharge}
/>
</Suspense>
</TableBody>
</Table>
<h4>{text.workTimeTitle}</h4>
<p>{text.workTime}</p>
</section>
<section id="facilities" className="container">
<Heading
glyphDirection="rtl"
heading="h2"
text={text.label.facilities}
href="#facilities"
/>
<h4>{text.networkingTitle}</h4>
<ul className="!mt-1 mb-5 list-inside list-disc">
{text.networking.map((networking, index) => (
<li key={index}>{networking}</li>
))}
</ul>
<h4>{text.resourcesTitle}</h4>
<Table scrollAreaClassName="mb-10">
<TableHeader>
<TableRow>
<TableHead>{text.resourcesTableTitle.sno}</TableHead>
<TableHead>{text.resourcesTableTitle.item}</TableHead>
<TableHead className="text-center">
{text.resourcesTableTitle.quantity}
</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{text.resources.map((resource, index) => (
<TableRow key={index}>
<TableCell>{index + 1}</TableCell>
<TableCell>{resource}</TableCell>
<TableCell className="text-center">
{['05', '160', '05'][index] ?? '1'}
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
<h4>{text.softwareTitle}</h4>
<ol className="!mt-1 list-inside list-decimal">
{text.software.map((software, index) => (
<li className="whitespace-pre-line" key={index}>
{software}
</li>
))}
</ol>
</section>
<section className="container" id="infrastructure">
<Heading
glyphDirection="ltr"
heading="h2"
text={text.label.infrastructure}
href="#infrastructure"
/>
<p className="whitespace-pre-line">{text.infrastructureData}</p>
<ol className="!mt-1 list-inside list-decimal">
{text.infrastructureList.map((infrastructure, index) => (
<li className="whitespace-pre-wrap" key={index}>
{infrastructure}
</li>
))}
</ol>
</section>
</>
);
}

const DelayedStaff = async ({
id,
headId,
profIncharge,
}: {
id: number;
headId: number;
profIncharge: string;
}) => {
const staff = await db.query.staff.findMany({
columns: { id: true, designation: true },
where: (staff, { eq }) => eq(staff.workingSectionId, id),
with: { person: { columns: { name: true } } },
});
const sortedStaff = staff.sort((a, b) =>
a.id === headId ? -1 : b.id === headId ? 1 : 0
);
return sortedStaff.map(({ id, designation, person: { name } }, index) => (
<TableRow key={index}>
<TableCell>{headId === id ? profIncharge : designation}</TableCell>
<TableCell>{name}</TableCell>
</TableRow>
));
};
82 changes: 81 additions & 1 deletion i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,87 @@ const text: Translations = {
Account: {},
CentralLibrary: {},
CentralWorkshop: {},
CentreOfComputingAndNetworking: {},
CentreOfComputingAndNetworking: {
title: 'Centre of Computing & Networking',
label: {
about: 'About Us',
facilities: 'Facilities',
infrastructure: 'IT Infrastructure Usage Policy',
},
responsibilitiesTitle:
'Centre of Computing and Networking (CCN) is the central computing and networking facility of the Institute, entrusted with the following responsibilities:',
responsibilities: [
'Development of the computing and networking infrastructure',
'Maintaining and updating the Institute’s website',
'E-mail services for the students, faculty and staff',
'Extending IT infrastructure for online tests for placement of the students',
'Development and operation of online applications',
'Printing and scanning facilities.',
'CCN has equipped with Super computer Param Shavak from CDAC. The students and faculty are utilizing this facility for high end computing.',
],
clickHere: 'Click here to see :',
clickHereInfo: 'NIT Kurukshetra IT Infrastructure Usage Policy ',
infrastructureData:
'The Centre of Computing and Networking(CCN) provides facilities to support and enhance the educational mission of the institute; for enriching the educational experience of the students, faculty and the staff and supporting their research and academic activities; and for providing automation support to the institute. This facility is needed for day-to-day academic as well as official activities.\n\nA user account is created for every individual on admission to the institute. The account allows you to browse the web, send and receive e-mail, use the computational and interactive facilities . Hence, it is expected that user have to use the services in a responsible manner. The user conduct and use should be tempered with propriety and a spirit that respects the right of everyone. Any abuse of the facility may have serious implications on the reputation and the standing of the institute as well as can bring the facility of the institute into disrepute. Such misuse of the facility will not be tolerated.\n\nTo access the NIT Kurukshetra (NITK) computing, networking and other IT facilities, all the users (Faculty, Staff, and Students) are expected to abide by the following guidelines, which are intended to preserve the utility and flexibility of the system, protect the privacy of academic and official work. The compliance with the guidelines are necessary for the continued use of IT facilities. The compliance with the guidelines are necessary for the continued use of IT facilities. The users should stick to the use of the facility in accordance with the guidelines. Any misuse of the IT facilities may lead to the action under the IT ACT of Govt. of India.',
infrastructureList: [
'Faculty, staff, and students with authorized accounts may use the computing and IT facilities for academic purposes and official purpose \n\t•does not violate any law, Institute policy, or IT act of the Government of India.\n\t•does not interfere with the performance of Institute duties or work of an academic activities.\n\t•does not result in commercial gain or private profit.',
'Users are expected to respect the privacy of other users and they must not allow any other person to use their password or share their account. It is the users’ responsibility to protect their account from unauthorized use by changing passwords periodically and using passwords that are not easily guessed. Sharing of passwords for any purpose whatsoever is strictly prohibited.',
"Users should exercise care while entering their passwords at other non-trusted sites and should not be misled by purported emails from admin or other IDs. Please verify the sender's identity before replying to such emails.",
'Any attempt to circumvent system security, guess others’ passwords, or in any way gain unauthorized access to local or network resources is forbidden. Users may not use another person’s computing account, attempt to forge an account identity, or use a false account or email address.',
'Transferring copyrighted materials to or from the NITK systems without express consent of the owner is a violation of international law. In addition, use of the internet for commercial gain or profit is not allowed from an educational site. If done so, it will be the sole responsibility of the user. Downloading copyrighted movies/books/games via torrents or other means is traceable, and users are warned that on receipt of any complaints, disciplinary action may be initiated.',
'Any violations of software piracy and copyright, email account holder shall be held responsible, and action under copyright may be initiated against the user.',
'Downloading and installing new software has to be done with the explicit consent of the respective Head of Dept. Installation of unlicensed software on NITK facilities, or on individual machines connected to the NITK network, is strictly prohibited.',
'To the extent possible, users are expected to use only their official email addresses provided by NITK for official communications with other members of the Institute. Any complaints/requests to CCN must be made using your authorized email ID; otherwise, CCN will not be able to verify your identity. In case for some reason you are not able to access your CCN email, then you may write to us from your registered alternate email ID with us.',
'It is forbidden to use electronic mail and other network communications facilities to harass, offend, or annoy other users of the network, including impeding their computing systems, software, or data. It is also forbidden to send emails or messages masquerading as another person or to hide the sender’s identity. Chain letters are not allowed. Neither is any form of commercial advertising or soliciting allowed. Spamming is strictly disallowed. Subscribing to mailing lists outside the Institute is an individual’s responsibility.',
'Recreational downloads and peer-to-peer connections for recreational purposes are banned.',
'Setting up unsecured Wi-Fi systems on the NITK network is prohibited.',
'Users are expected to take proper care of equipment and are expected to report any malfunction to the staff on duty at CCN. Users should not attempt to move, repair, reconfigure, modify, or attach external devices to the systems.',
'NO FOOD OR DRINK is permitted in the CCN laboratories. Smoking is strictly prohibited. Also, making noise either through games/music or even talking and/or singing loudly is prohibited.',
'Display of offensive material (either on computer screens or through posters, etc.) is strictly disallowed, and serious action will be taken against offenders.',
'Violations of guidelines/policy will be treated as academic misconduct, misdemeanor, or indiscipline as appropriate. Depending upon the nature of the violation, CCN may take action by issuing a warning, disabling the account, and for routine infractions, appropriate fines/penalties as determined by the Institute will be levied.',
'The policy may change as and when it is considered appropriate, and new policies or changes in policy will take effect immediately after a brief announcement by any means, e-mail, printed notices, or Institute Website.',
],
staffTable: {
name: 'Name',
designation: 'Administrative and Technical Staff',
profIncharge: 'Prof. in-Charge',
},
workTimeTitle: 'Working Hours',
workTime:
'9:00 AM to 5:30 PM (Monday to Saturday). CCN remains closed on Sunday and National holidays.',
networkingTitle: 'Networking Facilities',
networking: [
'Campus wide LAN on OFC backbone supported by two leased lines for internet access',
'1 Gbps from RailTel Corporation of India Ltd',
'500 Mbps from Reliance Jio Infocomm Ltd',
'Network upgraded from 1G to 10G',
'Structured networking supporting 7000 nodes',
'Wi-Fi Networking with the support of 3000 concurrent users',
'Bio-Metric Attendance System (BAS) is being looked after by CCN',
"Installed HoneyPot Sensor (Raspberry Pi) under the project 'Scalable Attack Data Capture and Analysis framework for CTI Generation' by C-DAC, Mohali",
],
resourcesTitle: 'Computing Facilities Hardware Resources',
resourcesTableTitle: {
sno: 'S.No.',
item: 'Item',
quantity: 'Quantity',
},
resources: [
'Servers',
'Desktop PCs (i7)',
'Video Conferencing device(s)',
'Outdoor LED Panels installed at four prime locations in the campus.',
'NEXT GENERTION FIREWALL FORTINET (FortiGate 2000E)',
],
softwareTitle: 'Software Packages',
software: [
'Endpoint Security',
'Word-processing: MS office Professional 2016',
'EIGAP Plus (50 User-5 year) including ENVI Single Use Software (ESRI India Technologies Ltd.)',
'FE Analysis Engineering/Multi-Physics Software Solution.',
'MATLAB 2021 Campus Wide',
],
},
ElectricalMaintenance: {},
Estate: {},
GeneralAdministration: {},
Expand Down
Loading

0 comments on commit a59a41d

Please sign in to comment.