forked from tkestack/tke
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: fix monitor ns prefix * feat: add project resourceLimit manage * feat: add sub project * feat: add project ns migrate * feat: add project ns kubectlConfig * feat: add bussiness project model * feat: refator project * feat(bussiness): add projectId requestHeader * fix: nodeSelector can not select more node * feat: add Import cluster * feat: add helm namespace * feat: add project ns kubeconfig Co-authored-by: kaychen <[email protected]>
- Loading branch information
Showing
88 changed files
with
3,323 additions
and
1,376 deletions.
There are no files selected for viewing
Binary file not shown.
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
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const tips = seajs.require('tips'); | ||
import { t, Trans } from '@tencent/tea-app/lib/i18n'; | ||
|
||
export function downloadText(crtText, filename, contentType = 'text/plain;charset=utf-8;') { | ||
let crtFile = '\ufeff'; | ||
let userAgent = navigator.userAgent; | ||
|
||
if (navigator.msSaveBlob) { | ||
let blob = new Blob([crtText], { type: contentType }); | ||
navigator.msSaveBlob(blob, filename); | ||
} else if (userAgent.indexOf('MSIE 9.0') > 0) { | ||
tips.error(t('该浏览器暂不支持导出功能')); | ||
} else { | ||
let blob = new Blob([crtText], { type: contentType }); | ||
let link = document.createElement('a') as any; | ||
|
||
if (link.download !== undefined) { | ||
let url = URL.createObjectURL(blob); | ||
link.setAttribute('href', url); | ||
link.setAttribute('download', filename); | ||
link.style.visibility = 'hidden'; | ||
document.body.appendChild(link); | ||
link.click(); | ||
document.body.removeChild(link); | ||
} | ||
} | ||
} | ||
|
||
export function downloadCrt(crtText, filename = 'cluster-ca.crt') { | ||
downloadText(crtText, filename, 'text/plain;charset=utf-8;'); | ||
} | ||
|
||
export function downloadKubeconfig(crtText, filename = 'kubeconfig') { | ||
downloadText(crtText, filename, 'applicatoin/octet-stream;charset=utf-8;'); | ||
} |
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
Oops, something went wrong.