Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frosh/tools",
"version": "3.0.0",
"version": "3.1.0",
"description": "Provides some basic things for managing the Shopware Installation",
"type": "shopware-platform-plugin",
"license": "MIT",
Expand Down Expand Up @@ -35,10 +35,10 @@
}
},
"require": {
"shopware/core": "~6.6.0"
"shopware/core": "~6.6.0 || ~6.7.0"
},
"require-dev": {
"shopware/elasticsearch": "~6.6.0"
"shopware/elasticsearch": "~6.6.0 || ~6.7.0"
},
"config": {
"allow-plugins": {
Expand Down
3 changes: 2 additions & 1 deletion src/Controller/ShopwareFilesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public function listShopwareFiles(): JsonResponse
$data = $this->httpClient->request('GET', $url)->getContent(false);
$data = trim((string) $data);

if (empty($data)) {
// Cloudflare fallbacks to index.html for 404 pages...
if (empty($data) || str_contains($data, '<!DOCTYPE html>')) {
return new JsonResponse(['error' => 'No file information for this Shopware version']);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<sw-card-view>
<sw-card
class="frosh-tools-tab-cache__cache-card"
deprecated
:title="$t('frosh-tools.tabs.cache.title')"
:isLoading="isLoading"
:large="true"
Expand All @@ -10,76 +11,83 @@
<!-- @todo: Make the refresh button fancy -->
<sw-button
variant="ghost"
deprecated
@click="createdComponent"
>
<sw-icon
deprecated
:small="true"
name="regular-undo"
></sw-icon>
</sw-button>
</template>
<sw-data-grid
:showSelection="false"
:dataSource="cacheFolders"
:columns="columns"
>
<template #column-name="{ item }">
<sw-label
variant="success"
appearance="pill"
v-if="item.active"
>
{{ $t('frosh-tools.active') }}
</sw-label>
<sw-label
variant="primary"
appearance="pill"
v-if="item.type"
>
{{ item.type }}
</sw-label>
{{ item.name }}
</template>

<template #column-size="{ item }">
<template v-if="item.size < 0">
{{ $t('frosh-tools.unknown') }}
<template #grid>
<sw-data-grid
:showSelection="false"
:dataSource="cacheFolders"
:columns="columns"
>
<template #column-name="{ item }">
<sw-label
variant="success"
appearance="pill"
v-if="item.active"
>
{{ $t('frosh-tools.active') }}
</sw-label>
<sw-label
variant="primary"
appearance="pill"
v-if="item.type"
>
{{ item.type }}
</sw-label>
{{ item.name }}
</template>

<template v-else>
{{ formatSize(item.size) }}
</template>
</template>
<template #column-size="{ item }">
<template v-if="item.size < 0">
{{ $t('frosh-tools.unknown') }}
</template>

<template #column-freeSpace="{ item }">
<template v-if="item.freeSpace < 0">
{{ $t('frosh-tools.unknown') }}
<template v-else>
{{ formatSize(item.size) }}
</template>
</template>

<template v-else>
{{ formatSize(item.freeSpace) }}
<template #column-freeSpace="{ item }">
<template v-if="item.freeSpace < 0">
{{ $t('frosh-tools.unknown') }}
</template>

<template v-else>
{{ formatSize(item.freeSpace) }}
</template>
</template>
</template>

<template #actions="{ item }">
<sw-context-menu-item
variant="danger"
@click="clearCache(item)"
>
{{ $t('frosh-tools.clear') }}
</sw-context-menu-item>
</template>
</sw-data-grid>
<template #actions="{ item }">
<sw-context-menu-item
variant="danger"
@click="clearCache(item)"
>
{{ $t('frosh-tools.clear') }}
</sw-context-menu-item>
</template>
</sw-data-grid>
</template>
</sw-card>
<sw-card
class="frosh-tools-tab-cache__action-card"
deprecated
:title="$t('frosh-tools.actions')"
:isLoading="isLoading"
:large="true"
positionIdentifier="frosh-tools-tab-cache-action"
>
<sw-button
variant="primary"
deprecated
@click="compileTheme"
>
{{ $t('frosh-tools.compileTheme') }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<sw-card-view>
<sw-card
:title="$t('frosh-tools.tabs.elasticsearch.title')"
deprecated
:large="true"
:isLoading="isLoading"
positionIdentifier="frosh-tools-tab-elasticsearch"
>
<sw-alert
variant="error"
deprecated
v-if="!isLoading && !isActive"
>
{{ $t('frosh-tools.tabs.elasticsearch.disabled') }}
Expand Down Expand Up @@ -37,77 +39,95 @@
</sw-card>
<sw-card
:title="$t('frosh-tools.tabs.elasticsearch.indices')"
deprecated
v-if="!isLoading && isActive"
:large="true"
positionIdentifier="frosh-tools-tab-elasticsearch-indices"
>
<template #toolbar>
<!-- @todo: Make the refresh button fancy -->
<sw-button
deprecated
variant="ghost"
@click="createdComponent"
>
<sw-icon
:small="true"
deprecated
name="regular-undo"
></sw-icon>
</sw-button>
</template>
<sw-data-grid
v-if="indices"
:showSelection="false"
:dataSource="indices"
:columns="columns"
>
<template #column-name="{ item }">
<sw-label
variant="primary"
appearance="pill"
v-if="item.aliases.length"
>
{{ $t('frosh-tools.active') }}
</sw-label>
{{ item.name }}
<br/>
</template>

<template #column-indexSize="{ item }">
{{ formatSize(item.indexSize) }}
<br/>
</template>
<template #grid>
<sw-data-grid
v-if="indices"
:showSelection="false"
:dataSource="indices"
:columns="columns"
>
<template #column-name="{ item }">
<sw-label
variant="primary"
appearance="pill"
v-if="item.aliases.length"
>
{{ $t('frosh-tools.active') }}
</sw-label>
{{ item.name }}
<br/>
</template>

<template #column-indexSize="{ item }">
{{ formatSize(item.indexSize) }}
<br/>
</template>

<template #actions="{ item }">
<sw-context-menu-item
variant="danger"
@click="deleteIndex(item.name)"
>
{{ $t('frosh-tools.delete') }}
</sw-context-menu-item>
</template>
</sw-data-grid>
<template #actions="{ item }">
<sw-context-menu-item
variant="danger"
@click="deleteIndex(item.name)"
>
{{ $t('frosh-tools.delete') }}
</sw-context-menu-item>
</template>
</sw-data-grid>
</template>
</sw-card>
<sw-card
:title="$t('frosh-tools.actions')"
v-if="!isLoading && isActive"
deprecated
:large="true"
positionIdentifier="frosh-tools-tab-elasticsearch-health"
>
<sw-button
deprecated
@click="reindex"
variant="primary"
>
{{ $t('frosh-tools.tabs.elasticsearch.action.reindex') }}
</sw-button>
<sw-button @click="switchAlias">
<sw-button
deprecated
@click="switchAlias"
>
{{ $t('frosh-tools.tabs.elasticsearch.action.switchAlias') }}
</sw-button>
<sw-button @click="flushAll">
<sw-button
deprecated
@click="flushAll"
>
{{ $t('frosh-tools.tabs.elasticsearch.action.flushAll') }}
</sw-button>
<sw-button @click="cleanup">
<sw-button
deprecated
@click="cleanup"
>
{{ $t('frosh-tools.tabs.elasticsearch.action.cleanup') }}
</sw-button>
<sw-button
deprecated
@click="resetElasticsearch"
variant="danger"
>
Expand All @@ -116,6 +136,7 @@
</sw-card>
<sw-card
:title="$t('frosh-tools.tabs.elasticsearch.console.title')"
deprecated
v-if="!isLoading && isActive"
:large="true"
positionIdentifier="frosh-tools-tab-elasticsearch-console"
Expand All @@ -129,7 +150,10 @@
:sanitizeInput="false"
v-model="consoleInput"
></sw-code-editor>
<sw-button @click="onConsoleEnter">
<sw-button
deprecated
@click="onConsoleEnter"
>
{{ $t('frosh-tools.tabs.elasticsearch.console.send') }}
</sw-button>
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,37 @@
:isLoading="isLoading"
:large="true"
positionIdentifier="frosh-tools-tab-files__files-card"
deprecated
>
<sw-alert
variant="error"
deprecated
v-if="items.error"
>{{ items.error }}</sw-alert>
<sw-alert
variant="success"
deprecated
v-if="items.ok"
>
{{ $t('frosh-tools.tabs.files.allFilesOk') }}
</sw-alert>
<sw-alert
variant="warning"
v-else-if="items.files"
deprecated
>
{{ $t('frosh-tools.tabs.files.notOk') }}
</sw-alert>
<template #toolbar>
<!-- @todo: Make the refresh button fancy -->
<sw-button
variant="ghost"
deprecated
@click="refresh"
>
<sw-icon
:small="true"
deprecated
name="regular-undo"
></sw-icon>
</sw-button>
Expand Down Expand Up @@ -80,10 +86,14 @@
<template #modal-footer>
<sw-button
variant="ghost-danger"
deprecated
@click="restoreFile(diffData.file.name)"
:disabled="diffData.file.expected"
>
<sw-icon name="regular-exclamation-triangle"></sw-icon>
<sw-icon
name="regular-exclamation-triangle"
deprecated
></sw-icon>
{{ $t('frosh-tools.tabs.files.restore.restoreFile') }}
</sw-button>
</template>
Expand Down
Loading
Loading