Aumentar truncate dos cards de tarefas e adicionar margem no footer
This commit is contained in:
@@ -3364,9 +3364,6 @@ tbody tr:hover td {
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.task-card-description {
|
.task-card-description {
|
||||||
@@ -3374,13 +3371,13 @@ tbody tr:hover td {
|
|||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 4;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
max-height: 3em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.task-card-footer {
|
.task-card-footer {
|
||||||
|
margin-top: 12px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ const TasksUI = {
|
|||||||
<h4 class="task-card-name">${Utils.escapeHtml(task.name)}</h4>
|
<h4 class="task-card-name">${Utils.escapeHtml(task.name)}</h4>
|
||||||
<span class="badge ${categoryClass}">${Utils.escapeHtml(categoryLabel)}</span>
|
<span class="badge ${categoryClass}">${Utils.escapeHtml(categoryLabel)}</span>
|
||||||
</div>
|
</div>
|
||||||
${task.description ? `<p class="task-card-description" title="${Utils.escapeHtml(task.description)}">${Utils.escapeHtml(task.description.length > 120 ? task.description.slice(0, 120) + '…' : task.description)}</p>` : ''}
|
${task.description ? `<p class="task-card-description" title="${Utils.escapeHtml(task.description)}">${Utils.escapeHtml(task.description.length > 240 ? task.description.slice(0, 240) + '…' : task.description)}</p>` : ''}
|
||||||
<div class="task-card-footer">
|
<div class="task-card-footer">
|
||||||
<span class="task-card-date">
|
<span class="task-card-date">
|
||||||
<i data-lucide="calendar"></i>
|
<i data-lucide="calendar"></i>
|
||||||
|
|||||||
79
scripts/deploy.sh
Executable file
79
scripts/deploy.sh
Executable file
@@ -0,0 +1,79 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
VPS_HOST="fred@192.168.1.151"
|
||||||
|
VPS_PORT=2222
|
||||||
|
VPS_APP_DIR="/home/fred/vps/apps/agents-orchestrator"
|
||||||
|
VPS_COMPOSE_DIR="/home/fred/vps"
|
||||||
|
SSH="ssh -p $VPS_PORT $VPS_HOST"
|
||||||
|
|
||||||
|
RED='\033[0;31m'
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m'
|
||||||
|
|
||||||
|
info() { echo -e "${GREEN}[deploy]${NC} $1"; }
|
||||||
|
warn() { echo -e "${YELLOW}[deploy]${NC} $1"; }
|
||||||
|
error() { echo -e "${RED}[deploy]${NC} $1"; }
|
||||||
|
|
||||||
|
SKIP_PUSH=false
|
||||||
|
for arg in "$@"; do
|
||||||
|
case "$arg" in
|
||||||
|
--skip-push) SKIP_PUSH=true ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$SKIP_PUSH" = false ]; then
|
||||||
|
info "Fazendo push para origin..."
|
||||||
|
git push origin main
|
||||||
|
info "Fazendo push para nitro..."
|
||||||
|
git push nitro main 2>/dev/null || warn "Push para nitro falhou (não crítico)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
info "Verificando dados no VPS antes do deploy..."
|
||||||
|
DATA_FILES=$($SSH "ls -1 $VPS_APP_DIR/data/*.json 2>/dev/null | wc -l")
|
||||||
|
info "Arquivos de dados encontrados: $DATA_FILES"
|
||||||
|
|
||||||
|
if [ "$DATA_FILES" -gt 0 ]; then
|
||||||
|
info "Criando backup dos dados..."
|
||||||
|
$SSH "cp -r $VPS_APP_DIR/data $VPS_APP_DIR/data-backup-\$(date +%Y%m%d-%H%M%S)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
info "Sincronizando código com o VPS..."
|
||||||
|
rsync -avz --delete \
|
||||||
|
--exclude='node_modules' \
|
||||||
|
--exclude='data' \
|
||||||
|
--exclude='data-backup-*' \
|
||||||
|
--exclude='.git' \
|
||||||
|
--exclude='.env' \
|
||||||
|
--exclude='*.log' \
|
||||||
|
-e "ssh -p $VPS_PORT" \
|
||||||
|
./ "$VPS_HOST:$VPS_APP_DIR/"
|
||||||
|
|
||||||
|
info "Corrigindo permissões do diretório data..."
|
||||||
|
$SSH "sudo chown -R 1000:1000 $VPS_APP_DIR/data"
|
||||||
|
|
||||||
|
info "Rebuilding container..."
|
||||||
|
$SSH "cd $VPS_COMPOSE_DIR && docker compose up -d --build agents-orchestrator 2>&1 | tail -5"
|
||||||
|
|
||||||
|
info "Verificando container..."
|
||||||
|
sleep 2
|
||||||
|
STATUS=$($SSH "docker ps --filter name=agents-orchestrator --format '{{.Status}}'")
|
||||||
|
if echo "$STATUS" | grep -q "Up"; then
|
||||||
|
info "Container rodando: $STATUS"
|
||||||
|
else
|
||||||
|
error "Container não está rodando! Status: $STATUS"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
DATA_AFTER=$($SSH "ls -1 $VPS_APP_DIR/data/*.json 2>/dev/null | wc -l")
|
||||||
|
info "Arquivos de dados após deploy: $DATA_AFTER"
|
||||||
|
|
||||||
|
if [ "$DATA_AFTER" -lt "$DATA_FILES" ]; then
|
||||||
|
error "ALERTA: Menos arquivos de dados após deploy! ($DATA_FILES -> $DATA_AFTER)"
|
||||||
|
error "Backup disponível em data-backup-*"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
$SSH "ls -dt $VPS_APP_DIR/data-backup-* 2>/dev/null | tail -n +4 | xargs rm -rf 2>/dev/null" || true
|
||||||
|
info "Deploy concluído com sucesso!"
|
||||||
Reference in New Issue
Block a user