-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errores varios y cuota por defecto al crear site(portal-ext.properties) #43
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ change-log= | |
page-url=http://www.liferay.com/community/user-groups/spain/welcome | ||
author=LSUG | ||
licenses=LGPL | ||
liferay-versions=6.2.5+,6.2.10 | ||
liferay-versions=6.2+ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Se puso explicitamente esta versión ya que creo que se usa API a partir de esta linea base. Esto no se cambiara. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, pues por lo menos, pon la versión 6.2.16(Que es la que estamos usando :( , te confirmo que funciona bien) |
||
|
||
portal-dependency-jars=\ | ||
jstl-api.jar,\ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
alerts-enabled=Alerts Enabled | ||
allocated-space=Allocated Space | ||
enable-alerts=Enable Alerts | ||
enable-quota=Enable Quota | ||
free-space=Free Space | ||
quota-alert=Quota Alerts (%) | ||
quota-assigned=Allocated Quota (MB) | ||
quota-control=Quota Control | ||
quota-enabled=Quota Enabled | ||
quota-status=Quota Status | ||
quota-used=Used Quota | ||
quota-unlimited=Cuota ilimitada | ||
send-alert-when-reach=Send alert when reach | ||
server-capacity=Server Capacity (Hard Disk) | ||
server-description=Quota Control Portlet allows to enable the management of space quota usage.\nIf quota control is enabled, you'll be able to manage quota control for each instance. When you add quota control you can enable if you want to send mail alerts to portal and instance administrators, quota space assigned to the site (in Gb) and at what percentage the alerts have to be sent. | ||
server-quota-title=Server Quota Management | ||
site-name=Site Name | ||
sites-quota-description=Sites Quota Management | ||
total-quota=Total Quota | ||
used-space=Used Space | ||
user-sites=User sites | ||
server-current-used-size-diagram-title=Current used size (by instance) | ||
user-site-current-used-size-diagram-title=User quota | ||
user-site-no-quota-enabled=There is no disk quota enabled for this user | ||
sites-quota-enabled-sites-used-diagram-title=Current used size (enabled quota sites) | ||
assigned-quota-less-than-current=Assigned quota is less than current used quota. | ||
unused-space=Free space | ||
quota-from-instance-x-above-the-alert=The instance {0} is above the quota alert | ||
quota-from-site-x-above-the-alert=The site {0} is above the quota alert | ||
quota-from-user-x-above-the-alert={0} user site has reached the quota alert threshold | ||
javax.portlet.title.serverquotaportlet_WAR_quotacontrolportlet=Server quota | ||
javax.portlet.title.sitesquotaportlet_WAR_quotacontrolportlet=Sites quota | ||
javax.portlet.title.myquotaportlet_WAR_quotacontrolportlet=My user quota | ||
javax.portlet.title.siteconfigurationquotaportlet_WAR_quotacontrolportlet=Site quota | ||
alerts-enabled=Alertes activades | ||
allocated-space=Espai assignat | ||
enable-alerts=Activar alertes | ||
enable-quota=Activar quota | ||
free-space=Espai lliure | ||
quota-alert=Alerta de quota (%) | ||
quota-assigned=Quota assignada (MB) | ||
quota-control=Control de quota | ||
quota-enabled=Quota activada | ||
quota-status=Estat de quota | ||
quota-used=Quota utilitzada | ||
quota-unlimited=Quota il.limitada | ||
send-alert-when-reach=Enviar una alerta quan s'arribi | ||
server-capacity=Capacitat del servidor(Hard Disk) | ||
server-description=Control de quota permet habilitar la gesti� de l'�s que es fa de l'espai per fitxers.\nSi s'activa, podr�s gestionar quotes per cada instancia i lloc web. En afegir una quota podr�s habilitar l'enviament de mails i alertes al portal i administradors i configurar l'espai assignat a un lloc web(en Gb) i a partir de quin percentatge s'enviar� l'alerta. | ||
server-quota-title=Gesti� de quotes al servidor | ||
site-name=Nom del lloc | ||
sites-quota-description=Gesti� de quotes al servidor | ||
total-quota=Quota total | ||
used-space=Espai utilitzat | ||
user-sites=Llocs web d'usuaris | ||
server-current-used-size-diagram-title=Espai utilitzat(per inst�ncia) | ||
user-site-current-used-size-diagram-title=Quota d'usuari | ||
user-site-no-quota-enabled=No hi ha quota de disc per aquest usuari | ||
sites-quota-enabled-sites-used-diagram-title=Espai utilitzat(habilitat per llocs web) | ||
assigned-quota-less-than-current=La quota assignada es inferior a la quota utilitzada. | ||
unused-space=Espai lliure | ||
quota-from-instance-x-above-the-alert=La inst�ncia {0} est�per sobre l'alerta assignada | ||
quota-from-site-x-above-the-alert=El lloc web {0} est� per sobre la quota assignada | ||
quota-from-user-x-above-the-alert={0} lloc web ha arribat a l'alerta de quota | ||
javax.portlet.title.serverquotaportlet_WAR_quotacontrolportlet=Quota de servidor | ||
javax.portlet.title.sitesquotaportlet_WAR_quotacontrolportlet=Quota de lloc web | ||
javax.portlet.title.myquotaportlet_WAR_quotacontrolportlet=La meva quota d'usuari | ||
javax.portlet.title.siteconfigurationquotaportlet_WAR_quotacontrolportlet=Quota de lloc web |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,7 +104,10 @@ protected void doRun(long companyId) throws Exception { | |
|
||
if (quota == null) { | ||
long quotaUsed = QuotaLocalServiceUtil.calculateSiteUsedQuota(classPK); | ||
QuotaLocalServiceUtil.addQuota(companyId, classNameId, classPK, 0, 0, quotaUsed, Constants.QUOTA_INACTIVE); | ||
|
||
QuotaLocalServiceUtil.createDefaultQuota(companyId, classNameId, group.getClassPK()); | ||
QuotaLocalServiceUtil.decrementQuota(classNameId, group.getClassPK(), quotaUsed); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ¿Por que es necesario decrementar la Quota aqui? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Porque si tienes un site que ya usa recursos y instalas el portlet con una cuota por defecto, al inicializarse la cuota del site por defecto ya debe decrementar el uso que ya se esta haciendo de recursos. Sino, te encontrarías que al instalar el portlet cuota con una cuota por defecto, el uso de recursos hasta la fecha no se contabilizaría. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Para eso ya esta la llamada a addQuota con la variable quotaUsed :-). Has visto que esto no funcionaba bien? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. El método addQuota no tiene en cuenta la inicialización por defecto, si se cambia hay que cambiar el método. Por otro lado, entiendo que el método createDefaultQuota esta para eso, como mucho añadirle el parámetro para hacer en un solo paso. Como quieras... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Si que tiene en cuenta la inicializacion por defecto. Como dije antes, para eso esta la variable quotaUsed en dicho método. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Juan no nos estamos entendiendo. El método addQuota no tiene en cuenta la configuración por defecto que AHORA puedes poner en el fichero portal-ext.properties. Esta modificación es muy necesaria. Mírate la definición de los métodos en la classe QuotaLocalServiceImpl:
Si quieres lo comentamos por teléfono. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, entendido! Pensare si ese es el mejor sitio. Gracias. |
||
sitesQuotaAdded++; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hola @acoronadoc. Estoy a punto de acabar el portlet para Liferay 7 y quería mirar lo que puedo añadir de esta pull request. ¿Por qué es necesario añadir el view_file_entry si no influye en la modificación de la cuota, y la nueva excepcion que lanza?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Es necesario para que la cuota se actualice cuando utilizas la funcionalidad de arrastrar ficheros.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
¿Te refieres a arrastrar ficheros desde el ordenador a la pagina inicial de la document library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hola de nuevo. He estado haciendo pruebas y en caso de cualquier error al arrastrar un fichero desde una carpeta del sistema operativo, no muestra ninguno (he abierto https://issues.liferay.com/browse/LPS-75051 por ello).
He probado a añadir este cambio y el comportamiento sigue igual (no muestra el mensaje personalizado de cuota por ningún sitio).
¿Puedes describir los pasos a reproducir? He probado tanto Liferay 7 GA4 como 6.2 GA5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hola Juan, diría que para arreglar esto solo hice este cambio(También hace varios meses de esto y arreglé otras cosas también). No me suena haber tocado nada mas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vaya, pues en mi caso no soluciona nada. En tal caso no añadiré este cambio. Por ahora sólo añadiría la mejora de las propiedades por defecto y la traducción al catalán.