mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-10-12 00:00:32 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51ca89daba | ||
|
|
99951029c8 | ||
|
|
2d2869d184 | ||
|
|
9d85d52005 | ||
|
|
b2ce2c86fb | ||
|
|
1f92324a45 | ||
|
|
2031295ba4 | ||
|
|
f079050545 |
@@ -0,0 +1,20 @@
|
||||
name: Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
jobs:
|
||||
sonarcloud:
|
||||
name: SonarCloud
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: SonarCloud Scan
|
||||
uses: SonarSource/sonarcloud-github-action@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/subosito/gotenv"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
@@ -45,7 +46,16 @@ func handleNode(create request.RuntimeCreate, runtime *model.Runtime, fileOp fil
|
||||
runtime.Status = constant.RuntimeCreating
|
||||
runtime.CodeDir = create.CodeDir
|
||||
|
||||
nodeDetail, err := appDetailRepo.GetFirst(commonRepo.WithByID(runtime.AppDetailID))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
go func() {
|
||||
_, _ = http.Get(nodeDetail.DownloadCallBackUrl)
|
||||
}()
|
||||
go startRuntime(runtime)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -8,3 +8,5 @@ ssl_session_timeout 10m;
|
||||
add_header Strict-Transport-Security "max-age=31536000";
|
||||
error_page 497 https://$host$request_uri;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
+2
-1
@@ -15,7 +15,8 @@
|
||||
- **Quick website building**: Deeply integrated with Wordpress and [Halo](https://github.com/halo-dev/halo/), with one-click solutions for domain name binding, SSL certificate configuration, and more;
|
||||
- **Efficient management**: Easily manage Linux servers through the web interface, including application management, host monitoring, file management, database management, container management, and more;
|
||||
- **Secure and reliable**: Minimal vulnerability exposure, with firewall and security audit functions provided;
|
||||
- **One-click backup**: Support for one-click backup and restore, with backup data stored in the cloud and never lost.
|
||||
- **One-click backup**: Support for one-click backup and restore, with backup data stored in the cloud and never lost;
|
||||
- **App Store**: Curate a variety of high-quality open-source tools and application software, enabling you to easily install and upgrade them.
|
||||
|
||||
## UI Display
|
||||
|
||||
|
||||
+2
-1
@@ -15,7 +15,8 @@
|
||||
- **素早いウェブサイト構築**: Wordpress および [Halo](https://github.com/halo-dev/halo/) と深く統合されており、ドメイン名のバインディング、SSL 証明書の設定など、ワンクリックで解決できます;
|
||||
- **効率的なマネジメント**: アプリケーション管理、ホスト監視、ファイル管理、データベース管理、コンテナ管理など、web インターフェイスを通じて Linux サーバーを簡単に管理できます;
|
||||
- **安全性と信頼性**: ファイアウォールとセキュリティ監査機能により、脆弱性の露出を最小限に抑えます;
|
||||
- **ワンクリックバックアップ**: ワンクリックでのバックアップと復元をサポートし、バックアップデータはクラウドに保存され、失われることはありません。
|
||||
- **ワンクリックバックアップ**: ワンクリックでのバックアップと復元をサポートし、バックアップデータはクラウドに保存され、失われることはありません;
|
||||
- **アプリストア**: さまざまな種類の高品質なオープンソースツールとアプリケーションソフトウェアを厳選し、インストールとアップグレードを容易にサポートします。
|
||||
|
||||
## UI ディスプレイ
|
||||
|
||||
|
||||
+2
-1
@@ -16,7 +16,8 @@
|
||||
- **快速建站**:深度集成 Wordpress 和 [Halo](https://github.com/halo-dev/halo/),域名綁定、SSL 證書配置等一鍵搞定;
|
||||
- **高效管理**:通過 Web 端輕鬆管理 Linux 服務器,包括主機監控、文件管理、數據庫管理、容器管理等;
|
||||
- **安全可靠**:基於容器來管理和部署應用,最小漏洞暴露面,提供防火牆和日誌審計等功能;
|
||||
- **一鍵備份**:支持一鍵備份和恢復,備份數據到各類雲端存儲,永不丟失。
|
||||
- **一鍵備份**:支持一鍵備份和恢復,備份數據到各類雲端存儲,永不丟失;
|
||||
- **應用商店**:精選各類高質量開源工具和應用軟件,助力您輕鬆安裝和升級。
|
||||
|
||||
## UI 展示
|
||||
|
||||
|
||||
@@ -546,6 +546,8 @@ const message = {
|
||||
cpuShareHelper:
|
||||
'The default CPU share for a container is 1024, which can be increased to give the container more CPU time.',
|
||||
|
||||
containerFromAppHelper:
|
||||
'Detected that this container originates from the app store. App operations may cause current edits to be invalidated.',
|
||||
command: 'Command',
|
||||
console: 'Console Interaction',
|
||||
tty: 'TTY (-t)',
|
||||
|
||||
@@ -532,6 +532,7 @@ const message = {
|
||||
cpuShare: 'CPU 權重',
|
||||
cpuShareHelper: '容器默認份額為 1024 個 CPU,增大可使當前容器獲得更多的 CPU 時間',
|
||||
|
||||
containerFromAppHelper: '檢測到該容器來源於應用商店,應用操作可能會導致當前編輯失效',
|
||||
command: '命令',
|
||||
console: '控製臺交互',
|
||||
tty: '偽終端 ( -t )',
|
||||
|
||||
@@ -532,6 +532,7 @@ const message = {
|
||||
cpuShare: 'CPU 权重',
|
||||
cpuShareHelper: '容器默认份额为 1024 个 CPU,增大可使当前容器获得更多的 CPU 时间',
|
||||
|
||||
containerFromAppHelper: '检测到该容器来源于应用商店,应用操作可能会导致当前编辑失效',
|
||||
command: '命令',
|
||||
console: '控制台交互',
|
||||
tty: '伪终端 ( -t )',
|
||||
|
||||
@@ -24,6 +24,13 @@
|
||||
>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-col :span="22">
|
||||
<el-alert
|
||||
v-if="dialogData.title === 'edit' && isFromApp(dialogData.rowData!)"
|
||||
:title="$t('container.containerFromAppHelper')"
|
||||
class="common-prompt"
|
||||
:closable="false"
|
||||
type="error"
|
||||
/>
|
||||
<el-form-item :label="$t('commons.table.name')" prop="name">
|
||||
<el-input clearable v-model.trim="dialogData.rowData!.name" />
|
||||
</el-form-item>
|
||||
@@ -171,7 +178,7 @@
|
||||
<el-form-item label="Command" prop="cmdStr">
|
||||
<el-input v-model="dialogData.rowData!.cmdStr" :placeholder="$t('container.cmdHelper')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Entrypoint" prop="entrypoint">
|
||||
<el-form-item label="Entrypoint" prop="entrypointStr">
|
||||
<el-input
|
||||
v-model="dialogData.rowData!.entrypointStr"
|
||||
:placeholder="$t('container.entrypointHelper')"
|
||||
@@ -295,9 +302,17 @@ const acceptParams = (params: DialogProps): void => {
|
||||
itemCmd += `'${item}' `;
|
||||
}
|
||||
dialogData.value.rowData.cmdStr = itemCmd ? itemCmd.substring(0, itemCmd.length - 1) : '';
|
||||
if (dialogData.value.rowData.entrypoint) {
|
||||
dialogData.value.rowData.entrypointStr = dialogData.value.rowData.entrypoint.join(' ');
|
||||
|
||||
let itemEntrypoint = '';
|
||||
if (dialogData.value.rowData?.entrypoint) {
|
||||
for (const item of dialogData.value.rowData.entrypoint) {
|
||||
itemEntrypoint += `'${item}' `;
|
||||
}
|
||||
}
|
||||
|
||||
dialogData.value.rowData.entrypointStr = itemEntrypoint
|
||||
? itemEntrypoint.substring(0, itemEntrypoint.length - 1)
|
||||
: '';
|
||||
dialogData.value.rowData.labels = dialogData.value.rowData.labels || [];
|
||||
dialogData.value.rowData.env = dialogData.value.rowData.env || [];
|
||||
dialogData.value.rowData.labelsStr = dialogData.value.rowData.labels.join('\n');
|
||||
@@ -435,8 +450,21 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dialogData.value.rowData!.entrypointStr) {
|
||||
dialogData.value.rowData!.entrypoint = dialogData.value.rowData!.entrypointStr.split(' ');
|
||||
dialogData.value.rowData!.entrypoint = [];
|
||||
if (dialogData.value.rowData?.entrypointStr) {
|
||||
if (dialogData.value.rowData?.entrypointStr.indexOf(`'`) !== -1) {
|
||||
let itemEntrypoint = dialogData.value.rowData!.entrypointStr.split(`'`);
|
||||
for (const entry of itemEntrypoint) {
|
||||
if (entry && entry !== ' ') {
|
||||
dialogData.value.rowData!.entrypoint.push(entry);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let itemEntrypoint = dialogData.value.rowData!.entrypointStr.split(` `);
|
||||
for (const entry of itemEntrypoint) {
|
||||
dialogData.value.rowData!.entrypoint.push(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dialogData.value.rowData!.publishAllPorts) {
|
||||
dialogData.value.rowData!.exposedPorts = [];
|
||||
@@ -554,6 +582,13 @@ const checkPortValid = () => {
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const isFromApp = (rowData: Container.ContainerHelper) => {
|
||||
if (rowData && rowData.labels) {
|
||||
return rowData.labels.indexOf('createdBy=Apps') > -1;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
defineExpose({
|
||||
acceptParams,
|
||||
});
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
{{ ssl.primaryDomain }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :label="$t('website.otherDomains')">
|
||||
{{ ssl.otherDomains }}
|
||||
{{ ssl.domains }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :label="$t('ssl.provider')">
|
||||
{{ getProvider(ssl.provider) }}
|
||||
@@ -71,10 +71,10 @@ import useClipboard from 'vue-clipboard3';
|
||||
import { MsgError, MsgSuccess } from '@/utils/message';
|
||||
const { toClipboard } = useClipboard();
|
||||
|
||||
let open = ref(false);
|
||||
let id = ref(0);
|
||||
let curr = ref('detail');
|
||||
let ssl = ref<any>({});
|
||||
const open = ref(false);
|
||||
const id = ref(0);
|
||||
const curr = ref('detail');
|
||||
const ssl = ref<any>({});
|
||||
|
||||
const handleClose = () => {
|
||||
open.value = false;
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
sonar.projectKey=1Panel-dev_1Panel
|
||||
sonar.organization=1panel-dev
|
||||
|
||||
# This is the name and version displayed in the SonarCloud UI.
|
||||
#sonar.projectName=1Panel
|
||||
#sonar.projectVersion=1.0
|
||||
|
||||
|
||||
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
|
||||
#sonar.sources=.
|
||||
|
||||
# Encoding of the source code. Default is default system encoding
|
||||
#sonar.sourceEncoding=UTF-8
|
||||
Reference in New Issue
Block a user