Skip to content

Commit

Permalink
refactor(main): delete v1.19 => v1.21
Browse files Browse the repository at this point in the history
Signed-off-by: cuisongliu <[email protected]>
  • Loading branch information
cuisongliu committed Dec 10, 2023
1 parent 4a8c440 commit 176c559
Show file tree
Hide file tree
Showing 238 changed files with 83 additions and 103 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ import (
"path/filepath"
"testing"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/jaevor/go-nanoid"
"k8s.io/apimachinery/pkg/api/resource"

bbv1 "github.com/labring/sealos/controllers/db/bytebase/apis/bytebase/v1"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ import (
"testing"
"time"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

admissionv1beta1 "k8s.io/api/admission/v1beta1"
//+kubebuilder:scaffold:imports
"k8s.io/apimachinery/pkg/runtime"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ import (
"path/filepath"
"testing"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import '@/styles/globals.scss';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import type { AppProps } from 'next/app';
import {QueryClient, QueryClientProvider} from '@tanstack/react-query';
import type {AppProps} from 'next/app';

const queryClient = new QueryClient({
defaultOptions: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Html, Head, Main, NextScript } from 'next/document';
import {Head, Html, Main, NextScript} from 'next/document';

export default function Document() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { generateByteBaseTemplate, ByteBaseStatus } from '@/interfaces/bytebase';
import { authSession } from '@/service/auth';
import { ApplyYaml, CRDMeta, GetCRD, GetUserDefaultNameSpace, K8sApi } from '@/service/kubernetes';
import { jsonRes } from '@/service/response';
import type { NextApiRequest, NextApiResponse } from 'next';
import {ByteBaseStatus, generateByteBaseTemplate} from '@/interfaces/bytebase';
import {authSession} from '@/service/auth';
import {ApplyYaml, CRDMeta, GetCRD, GetUserDefaultNameSpace, K8sApi} from '@/service/kubernetes';
import {jsonRes} from '@/service/response';
import type {NextApiRequest, NextApiResponse} from 'next';

export const ByteBaseMeta: CRDMeta = {
group: 'bytebase.db.sealos.io',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import request from '@/service/request';
import useSessionStore from '@/stores/session';
import { useQuery } from '@tanstack/react-query';
import {useQuery} from '@tanstack/react-query';
import clsx from 'clsx';
import { useEffect, useState } from 'react';
import { createSealosApp, sealosApp } from 'sealos-desktop-sdk/app';
import {useEffect, useState} from 'react';
import {createSealosApp, sealosApp} from 'sealos-desktop-sdk/app';
import styles from './index.module.scss';

export default function Index() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IncomingHttpHeaders } from 'http';
import {IncomingHttpHeaders} from 'http';

export const authSession = async (header: IncomingHttpHeaders) => {
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// http.ts
import { ApiResp } from '@/interfaces/api';
import {ApiResp} from '@/interfaces/api';
import useSessionStore from '@/stores/session';
import axios, { AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from 'axios';
import axios, {AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders} from 'axios';

const request = axios.create({
baseURL: '/',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NextApiResponse } from 'next';
import { ApiResp } from '@/interfaces/api';
import {NextApiResponse} from 'next';
import {ApiResp} from '@/interfaces/api';

const showStatus = (status: number) => {
let message = '';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Session } from '@/interfaces/session';
import { sessionKey } from '@/interfaces/session';
import { create } from 'zustand';
import { devtools, persist } from 'zustand/middleware';
import { immer } from 'zustand/middleware/immer';
import type {Session} from '@/interfaces/session';
import {sessionKey} from '@/interfaces/session';
import {create} from 'zustand';
import {devtools} from 'zustand/middleware';
import {immer} from 'zustand/middleware/immer';
import * as yaml from 'js-yaml';

type SessionState = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"baseUrl": ".",
"baseUrl": "./",
"paths": {
"@/*": ["./src/*"]
}
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions deprecated/frontend/providers/imagehub/public/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import clsx from 'clsx';
import 'github-markdown-css/github-markdown-light.css';
import ReactMarkdown from 'react-markdown';
import SyntaxHighlighter from 'react-syntax-highlighter';
const { stackoverflowLight } = require('react-syntax-highlighter/dist/cjs/styles/hljs');
import styles from './index.module.scss';

const { stackoverflowLight } = require('react-syntax-highlighter/dist/cjs/styles/hljs');

type TMarkDown = {
text: string;
themeDark?: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import clsx from 'clsx';
import { useState } from 'react';
import {useState} from 'react';
import styles from './index.module.scss';
import Iconfont from '@/components/iconfont';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import useSessionStore from '@/stores/session';
import { Nunito } from '@next/font/google';
import {Nunito} from '@next/font/google';
import clsx from 'clsx';
import { useEffect, useState } from 'react';
import { createSealosApp, sealosApp } from 'sealos-desktop-sdk/app';
import {useEffect, useState} from 'react';
import {createSealosApp, sealosApp} from 'sealos-desktop-sdk/app';
import styles from './index.module.scss';

const nunito = Nunito({ subsets: ['latin'] });

export default function Layout({ children }: any) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CRDMeta } from '@/services/kubernetes';
import {CRDMeta} from '@/services/kubernetes';

const RepositoryMeta: CRDMeta = {
group: 'imagehub.sealos.io',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Layout from '@/layout';
import type { AppProps } from 'next/app';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import type {AppProps} from 'next/app';
import {QueryClient, QueryClientProvider} from '@tanstack/react-query';
import '../styles/globals.scss';

const queryClient = new QueryClient({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Html, Head, Main, NextScript } from 'next/document';
import {Head, Html, Main, NextScript} from 'next/document';

export default function Document() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import * as k8s from '@kubernetes/client-node';
import { DataPackType, ImageHubDataPackCRDTemplate, ImageHubDataPackMeta } from '@/mock/imagehub';
import type { NextApiRequest, NextApiResponse } from 'next';
import { ApplyYaml, GetClusterObject, K8sApi } from '@/services/kubernetes';
import { CRDTemplateBuilder } from '@/services/wrapper';
import { hashAny } from '@/utils/strings';
import {
BadRequestResp,
InternalErrorResp,
JsonResp,
UnprocessableResp,
CreatedJsonResp
} from '@/services/response';
import {DataPackType, ImageHubDataPackCRDTemplate, ImageHubDataPackMeta} from '@/mock/imagehub';
import type {NextApiRequest, NextApiResponse} from 'next';
import {ApplyYaml, GetClusterObject, K8sApi} from '@/services/kubernetes';
import {CRDTemplateBuilder} from '@/services/wrapper';
import {hashAny} from '@/utils/strings';
import {BadRequestResp, CreatedJsonResp, InternalErrorResp, JsonResp, UnprocessableResp} from '@/services/response';

type DataPackDesc = {
codes: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
import * as k8s from '@kubernetes/client-node';
import {
DataPackType,
ImageHubDataPackCRDTemplate,
ImageHubDataPackMeta,
RepositoryMeta
} from '@/mock/imagehub';
import type { NextApiRequest, NextApiResponse } from 'next';
import { ApplyYaml, GetClusterObject, K8sApi, ListClusterObject } from '@/services/kubernetes';
import { CRDTemplateBuilder } from '@/services/wrapper';
import { hashAny } from '@/utils/strings';
import {
BadRequestResp,
InternalErrorResp,
JsonResp,
UnprocessableResp,
CreatedJsonResp
} from '@/services/response';
import {DataPackType, ImageHubDataPackCRDTemplate, ImageHubDataPackMeta, RepositoryMeta} from '@/mock/imagehub';
import type {NextApiRequest, NextApiResponse} from 'next';
import {ApplyYaml, GetClusterObject, K8sApi, ListClusterObject} from '@/services/kubernetes';
import {CRDTemplateBuilder} from '@/services/wrapper';
import {hashAny} from '@/utils/strings';
import {BadRequestResp, CreatedJsonResp, InternalErrorResp, JsonResp, UnprocessableResp} from '@/services/response';

type repositoryStatus = {
items: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* eslint-disable @next/next/no-img-element */
import Iconfont from '@/components/iconfont';
import MarkDown from '@/components/markdown';
import { formattedSize, handleImageName, TAppDetail } from '@/interfaces/imagehub';
import {formattedSize, handleImageName, TAppDetail} from '@/interfaces/imagehub';
import request from '@/services/request';
import useSessionStore from '@/stores/session';
import { useQuery, useQueryClient } from '@tanstack/react-query';
import {useQuery, useQueryClient} from '@tanstack/react-query';
import clsx from 'clsx';
import { useEffect, useRef, useState } from 'react';
import {useEffect, useRef, useState} from 'react';
// import Button from '@/components/button';
import { throttle } from 'lodash';
import { useRouter } from 'next/router';
import {throttle} from 'lodash';
import {useRouter} from 'next/router';
import styles from './detail.module.scss';

export default function DetailPage() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
/* eslint-disable @next/next/no-img-element */
import {
formattedSize,
getSelectLabels,
handleImageName,
ImagehubLabels,
TAppInfo,
TImageLabels
formattedSize,
getSelectLabels,
handleImageName,
ImagehubLabels,
TAppInfo,
TImageLabels
} from '@/interfaces/imagehub';
import request from '@/services/request';
import useSessionStore from '@/stores/session';
import { useQuery, useQueryClient } from '@tanstack/react-query';
import {useQuery, useQueryClient} from '@tanstack/react-query';
import clsx from 'clsx';
import produce from 'immer';
import { useState } from 'react';
import {useState} from 'react';
import Error from '@/components/error';
import Labels from '@/components/labels';
import styles from './store.module.scss';
import Pagination from '@/components/pgination';
import { sortBy } from 'lodash';
import { useRouter } from 'next/router';
import {sortBy} from 'lodash';
import {useRouter} from 'next/router';

export default function StorePage() {
const router = useRouter();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// http.ts
import axios, { AxiosRequestConfig, AxiosRequestHeaders, AxiosResponse } from 'axios';
import axios, {AxiosRequestConfig, AxiosRequestHeaders, AxiosResponse} from 'axios';
import useSessionStore from '@/stores/session';
import type { ApiResp } from '@/interfaces/api';
import { isApiResp } from '@/interfaces/api';
import type {ApiResp} from '@/interfaces/api';
import {isApiResp} from '@/interfaces/api';

// display status information
const showStatus = (status: number) => {
Expand Down
Loading

0 comments on commit 176c559

Please sign in to comment.