-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat:frontend license app Signed-off-by: jingyang <3161362058@qq.com> * fix Signed-off-by: jingyang <3161362058@qq.com> * fix * fix detail Signed-off-by: jingyang <3161362058@qq.com> --------- Signed-off-by: jingyang <3161362058@qq.com>
- Loading branch information
Showing
28 changed files
with
228 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
NEXT_PUBLIC_MOCK_USER= | ||
SEALOS_DOMAIN="cloud.sealos.io" | ||
LICENSE_DOMAIN="dev.sealos.top" | ||
MONGODB_URI= | ||
# Same as desktop important | ||
PASSWORD_SALT= | ||
# PASSWORD_SALT= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
{ | ||
"Upload Token File": "Upload Token File", | ||
"Upload Token File": "Upload License File", | ||
"Activate License": "Activate License", | ||
"Activation Record": "Activation Record", | ||
"Purchase License": "Purchase License", | ||
"Please go to": "Please go to", | ||
"Purchase": "purchase a license.", | ||
"Purchase": "purchase", | ||
"Activation Time": "Activation time: ", | ||
"Go to the message center to see the results": "Go to the message center to see the results", | ||
"token does not exist": "token does not exist", | ||
"No Record": "No Record" | ||
} | ||
"token does not exist": "license does not exist", | ||
"No Record": "No Record", | ||
"Activation time": "Activation time", | ||
"Activation Successful": "Activation Successful" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
{ | ||
"Upload Token File": "上传 token 文件", | ||
"Upload Token File": "上传 License 文件", | ||
"Activate License": "激活 License", | ||
"Activation Record": "激活记录", | ||
"Purchase License": "购买 License", | ||
"Please go to": "请到", | ||
"Purchase": "购买 license", | ||
"Please go to": "请前往", | ||
"Purchase": "购买", | ||
"Activation Time": "激活时间: ", | ||
"Go to the message center to see the results": "前往消息中心查看结果", | ||
"token does not exist": "token 不存在", | ||
"No Record": "暂无记录" | ||
} | ||
"token does not exist": "license 不存在", | ||
"No Record": "暂无记录", | ||
"Activation time": "激活时间", | ||
"Activation Successful": "激活成功" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { GET, POST } from '@/services/request'; | ||
import { License } from '@/types'; | ||
import { LicenseRecord } from '@/types'; | ||
|
||
export const applyLicense = (yamlList: string[], type: 'create' | 'replace' | 'update') => | ||
POST('/api/applyYamlList', { yamlList, type }); | ||
|
||
export const getLicenseRecord = ({ page = 1, pageSize = 10 }: { page: number; pageSize: number }) => | ||
GET<{ | ||
totalCount: number; | ||
items: License[]; | ||
items: LicenseRecord[]; | ||
}>('/api/license/getLicense', { page, pageSize }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,42 @@ | ||
export interface License { | ||
_id: string; | ||
uid: string; | ||
meta: { | ||
token: string; | ||
createTime: string; // 激活时间 | ||
export type LicenseRecord = { | ||
_id?: string; | ||
token: string; | ||
activationTime: string; | ||
claims: { | ||
type: string; | ||
data: { | ||
amount: number; | ||
}; | ||
registeredclaims: { | ||
issuer: string; | ||
subject: string; | ||
audience: null | string[]; | ||
expiresat: { | ||
time: Date; | ||
}; | ||
notbefore: null | string; | ||
issuedat: { | ||
time: Date; | ||
}; | ||
id: string; | ||
}; | ||
}; | ||
|
||
payload: { | ||
iss: string; | ||
iat: Date; // 签发日期 | ||
exp: Date; // 有效期 | ||
amt: number; // 额度 | ||
}; | ||
} | ||
}; | ||
|
||
export type LicenseCollection = { | ||
uid: string; | ||
license: License[]; | ||
}; | ||
|
||
export type LicenseYaml = { | ||
apiVersion: string; | ||
kind: string; | ||
metadata: { | ||
name: string; | ||
namespace: string; | ||
}; | ||
spec: { | ||
type: string; | ||
token: string; | ||
}; | ||
}; |
Oops, something went wrong.