mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-27 17:26:03 +08:00
feat(runtime): fix issue with install php runtime failed (#8230)
This commit is contained in:
parent
a617424786
commit
0bddeef63e
8 changed files with 30 additions and 5 deletions
|
|
@ -113,5 +113,6 @@ type Resource struct {
|
|||
type Database struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
From string `json:"from"`
|
||||
ID uint `json:"id"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ func (a AppService) PageApp(ctx *gin.Context, req request.AppSearch) (interface{
|
|||
lang := strings.ToLower(common.GetLang(ctx))
|
||||
for _, ap := range apps {
|
||||
if req.Type == "php" {
|
||||
if ap.RequiredPanelVersion == 0 || !common.CompareAppVersion(fmt.Sprintf("%f", ap.RequiredPanelVersion), info.SystemVersion) {
|
||||
if ap.RequiredPanelVersion == 0 || !common.CompareAppVersion(fmt.Sprintf("%f", ap.RequiredPanelVersion), common.GetSystemVersion(info.SystemVersion)) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3219,6 +3219,7 @@ func (w WebsiteService) ListDatabases() ([]response.Database, error) {
|
|||
ID: db.ID,
|
||||
Name: db.Name,
|
||||
Type: database.Type,
|
||||
From: database.From,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -3230,6 +3231,7 @@ func (w WebsiteService) ListDatabases() ([]response.Database, error) {
|
|||
ID: db.ID,
|
||||
Name: db.Name,
|
||||
Type: database.Type,
|
||||
From: database.From,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -399,3 +399,12 @@ func RestartService(core, agent, reload bool) {
|
|||
global.LOG.Errorf("restart 1panel service failed, err: %v, std: %s", err, std)
|
||||
}
|
||||
}
|
||||
|
||||
func GetSystemVersion(versionString string) string {
|
||||
re := regexp.MustCompile(`v(\d+\.\d+\.\d+)`)
|
||||
match := re.FindStringSubmatch(versionString)
|
||||
if len(match) > 1 {
|
||||
return match[1]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
|
|
|||
|
|
@ -628,6 +628,7 @@ export namespace Website {
|
|||
type: string;
|
||||
databaseID: number;
|
||||
websiteID: number;
|
||||
from: string;
|
||||
}
|
||||
|
||||
export interface ChangeDatabase {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,11 @@
|
|||
>
|
||||
<PHP :id="id" v-if="tabIndex == '13'"></PHP>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('logs.resource')" name="14">
|
||||
<el-tab-pane
|
||||
:label="$t('logs.resource')"
|
||||
name="14"
|
||||
v-if="website.type === 'runtime' || website.type === 'static'"
|
||||
>
|
||||
<Resource :id="id" v-if="tabIndex == '14'"></Resource>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('website.other')" name="12">
|
||||
|
|
|
|||
|
|
@ -23,7 +23,12 @@
|
|||
>
|
||||
<div class="flex justify-between items-center">
|
||||
<span>{{ item.name }}</span>
|
||||
<el-tag>{{ item.type }}</el-tag>
|
||||
<div>
|
||||
<el-tag>{{ item.type }}</el-tag>
|
||||
<el-tag class="ml-1">
|
||||
{{ item.from === 'local' ? $t('commons.table.local') : $t('database.remote') }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ const shortcuts = [
|
|||
{
|
||||
text: useI18n().t('website.ever'),
|
||||
value: () => {
|
||||
return new Date('9999-12-31');
|
||||
return new Date('2006-01-02');
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -438,7 +438,10 @@ const pickerVisibility = (visibility: boolean, row: any) => {
|
|||
};
|
||||
|
||||
const updateWebsitConfig = (row: any) => {
|
||||
const reqDate = dateFormatSimple(row.expireDate);
|
||||
let reqDate = dateFormatSimple(row.expireDate);
|
||||
if (reqDate == '2006-01-02') {
|
||||
reqDate = '9999-12-31';
|
||||
}
|
||||
const req = {
|
||||
id: row.id,
|
||||
primaryDomain: row.primaryDomain,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue