From 2c27ebec5980209a620012ab05d2f89fd6e822c1 Mon Sep 17 00:00:00 2001 From: Michael Freeman Date: Sun, 2 Mar 2025 21:23:10 -0600 Subject: [PATCH] updated for web --- web/next.config.ts | 16 ++++++++++++++++ web/src/app/layout.tsx | 16 ++++++++++++++++ web/src/app/nodes/page.js | 16 ++++++++++++++++ web/src/app/page.tsx | 16 ++++++++++++++++ web/src/app/providers.js | 16 ++++++++++++++++ .../app/service/[nodeid]/[servicename]/page.js | 16 ++++++++++++++++ web/src/components/Dashboard.jsx | 16 ++++++++++++++++ web/src/components/DuskDashboard.jsx | 16 ++++++++++++++++ web/src/components/ExportButton.jsx | 16 ++++++++++++++++ web/src/components/Navbar.jsx | 16 ++++++++++++++++ web/src/components/NetworkStatus.jsx | 16 ++++++++++++++++ web/src/components/NetworkSweepView.jsx | 16 ++++++++++++++++ web/src/components/NodeList.jsx | 16 ++++++++++++++++ web/src/components/NodeTimeline.jsx | 16 ++++++++++++++++ web/src/components/SNMPDashboard.jsx | 16 ++++++++++++++++ web/src/components/ServiceDashboard.jsx | 16 ++++++++++++++++ web/src/components/ServiceSparkline.jsx | 16 ++++++++++++++++ web/src/env.js | 16 ++++++++++++++++ web/src/lib/api.js | 16 ++++++++++++++++ web/src/middleware.ts | 16 ++++++++++++++++ web/tailwind.config.ts | 16 ++++++++++++++++ 21 files changed, 336 insertions(+) diff --git a/web/next.config.ts b/web/next.config.ts index ef2819d..a44986f 100644 --- a/web/next.config.ts +++ b/web/next.config.ts @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { NextConfig } from "next"; const nextConfig: NextConfig = { diff --git a/web/src/app/layout.tsx b/web/src/app/layout.tsx index 7d1968b..9e963d5 100644 --- a/web/src/app/layout.tsx +++ b/web/src/app/layout.tsx @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // app/layout.tsx import './globals.css'; import { Inter } from 'next/font/google'; diff --git a/web/src/app/nodes/page.js b/web/src/app/nodes/page.js index 604a7ba..9e1bf04 100644 --- a/web/src/app/nodes/page.js +++ b/web/src/app/nodes/page.js @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // Server component that fetches data import {Suspense} from "react"; import NodeList from "../../components/NodeList"; diff --git a/web/src/app/page.tsx b/web/src/app/page.tsx index 3015d3b..6ad422b 100644 --- a/web/src/app/page.tsx +++ b/web/src/app/page.tsx @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // src/app/page.tsx (Server Component) import { Suspense } from 'react'; import Dashboard from '../components/Dashboard'; diff --git a/web/src/app/providers.js b/web/src/app/providers.js index 20497a9..16d52f2 100644 --- a/web/src/app/providers.js +++ b/web/src/app/providers.js @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + 'use client'; import { createContext, useState, useEffect, useContext } from 'react'; diff --git a/web/src/app/service/[nodeid]/[servicename]/page.js b/web/src/app/service/[nodeid]/[servicename]/page.js index d9811e7..ca8376b 100644 --- a/web/src/app/service/[nodeid]/[servicename]/page.js +++ b/web/src/app/service/[nodeid]/[servicename]/page.js @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // src/app/service/[nodeid]/[servicename]/page.js import { Suspense } from 'react'; import ServiceDashboard from '../../../../components/ServiceDashboard'; diff --git a/web/src/components/Dashboard.jsx b/web/src/components/Dashboard.jsx index 68b796c..9ef397d 100644 --- a/web/src/components/Dashboard.jsx +++ b/web/src/components/Dashboard.jsx @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // src/components/Dashboard.jsx - Client Component 'use client'; diff --git a/web/src/components/DuskDashboard.jsx b/web/src/components/DuskDashboard.jsx index f91a381..393e3c4 100644 --- a/web/src/components/DuskDashboard.jsx +++ b/web/src/components/DuskDashboard.jsx @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import React, { useState, useEffect } from 'react'; import { LineChart, diff --git a/web/src/components/ExportButton.jsx b/web/src/components/ExportButton.jsx index 6391d1c..5090e14 100644 --- a/web/src/components/ExportButton.jsx +++ b/web/src/components/ExportButton.jsx @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import React from 'react'; import * as XLSX from 'xlsx'; import { Download } from 'lucide-react'; diff --git a/web/src/components/Navbar.jsx b/web/src/components/Navbar.jsx index d76d0b0..664ce21 100644 --- a/web/src/components/Navbar.jsx +++ b/web/src/components/Navbar.jsx @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + 'use client'; import React from 'react'; diff --git a/web/src/components/NetworkStatus.jsx b/web/src/components/NetworkStatus.jsx index a5c4bb9..fd95707 100644 --- a/web/src/components/NetworkStatus.jsx +++ b/web/src/components/NetworkStatus.jsx @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import React from 'react'; // Helper functions for formatting diff --git a/web/src/components/NetworkSweepView.jsx b/web/src/components/NetworkSweepView.jsx index 9ac09f4..51ab02b 100644 --- a/web/src/components/NetworkSweepView.jsx +++ b/web/src/components/NetworkSweepView.jsx @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { useState } from 'react'; import ExportButton from './ExportButton'; diff --git a/web/src/components/NodeList.jsx b/web/src/components/NodeList.jsx index 692737d..0c97a74 100644 --- a/web/src/components/NodeList.jsx +++ b/web/src/components/NodeList.jsx @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + 'use client'; import React, { useState, useMemo, useCallback, useEffect } from 'react'; diff --git a/web/src/components/NodeTimeline.jsx b/web/src/components/NodeTimeline.jsx index 6e9b9d5..244f5f7 100644 --- a/web/src/components/NodeTimeline.jsx +++ b/web/src/components/NodeTimeline.jsx @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + 'use client'; import React, { useState, useEffect } from 'react'; diff --git a/web/src/components/SNMPDashboard.jsx b/web/src/components/SNMPDashboard.jsx index b374727..7fdc8ac 100644 --- a/web/src/components/SNMPDashboard.jsx +++ b/web/src/components/SNMPDashboard.jsx @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + 'use client'; import React, {useCallback, useState, useEffect} from 'react'; diff --git a/web/src/components/ServiceDashboard.jsx b/web/src/components/ServiceDashboard.jsx index 04d959f..7aa2dc4 100644 --- a/web/src/components/ServiceDashboard.jsx +++ b/web/src/components/ServiceDashboard.jsx @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + 'use client'; import React, { useState, useEffect } from 'react'; diff --git a/web/src/components/ServiceSparkline.jsx b/web/src/components/ServiceSparkline.jsx index 1e5ca16..5e848cd 100644 --- a/web/src/components/ServiceSparkline.jsx +++ b/web/src/components/ServiceSparkline.jsx @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + 'use client'; import React, { useState, useEffect, useMemo } from 'react'; diff --git a/web/src/env.js b/web/src/env.js index d534a1d..30741a4 100644 --- a/web/src/env.js +++ b/web/src/env.js @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // src/env.js import { createRuntimeEnv } from 'next-runtime-env'; diff --git a/web/src/lib/api.js b/web/src/lib/api.js index b9bb397..6d0ee0a 100644 --- a/web/src/lib/api.js +++ b/web/src/lib/api.js @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // src/lib/api.js - improved version with caching import { useState, useEffect, useRef } from "react"; import { env } from 'next-runtime-env'; diff --git a/web/src/middleware.ts b/web/src/middleware.ts index 3207790..5d5af42 100644 --- a/web/src/middleware.ts +++ b/web/src/middleware.ts @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // src/middleware.ts import { NextResponse } from 'next/server'; import type { NextRequest } from 'next/server'; diff --git a/web/tailwind.config.ts b/web/tailwind.config.ts index b289268..9d4b6d9 100644 --- a/web/tailwind.config.ts +++ b/web/tailwind.config.ts @@ -1,3 +1,19 @@ +/*- + * Copyright 2025 Carver Automation Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { Config } from "tailwindcss"; import animate from "tailwindcss-animate";