[arvados-workbench2] updated: 2.4.0-375-gfea546c9
git repository hosting
git at public.arvados.org
Tue Dec 13 17:58:03 UTC 2022
Summary of changes:
cypress/integration/collection.spec.js | 4 +++
src/common/config.ts | 2 ++
.../process-logs-panel-actions.ts | 18 +++++------
src/validators/validators.tsx | 4 +--
.../property-value-field.tsx | 2 +-
.../resource-properties-form.tsx | 36 +++++++++++++++-------
src/views/inactive-panel/inactive-panel.tsx | 13 ++------
7 files changed, 45 insertions(+), 34 deletions(-)
via fea546c92e3a63f0435a69352d4189dc89fb94aa (commit)
via 9483bf3e0866d2d9186c0e0b1d479e41f492f59b (commit)
via be10b3320688ab82efdee9dfff814a40a5fe825a (commit)
via 50ec33497a4b0a9d6f262fa5a0176f2952ec1f6c (commit)
via 74e6ba2377c3c1ad7c2a8e97c24e8be369f40fe3 (commit)
via d10e3de65595d9ab1983da00dc498c5fb11abf79 (commit)
via 11a591c335dadfbe56ebf4369b7094227e73342e (commit)
via b2bc9ff2d2c52c78d19ed93e1c64e5d2f3e01e5b (commit)
from 039106c2ec7cf5e6b22ad0f0b4beeb66ddf61a6f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit fea546c92e3a63f0435a69352d4189dc89fb94aa
Merge: be10b332 9483bf3e
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date: Tue Dec 13 18:57:33 2022 +0100
19851: Merge branch 'main' into 19851-log-panel-fix
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>
commit be10b3320688ab82efdee9dfff814a40a5fe825a
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date: Tue Dec 13 18:55:16 2022 +0100
19851: Uses API.MaxItemsPerResponse setting for log requests.
Also, count=none on the 2nd request for better performance.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>
diff --git a/src/common/config.ts b/src/common/config.ts
index 574445df..65ee687c 100644
--- a/src/common/config.ts
+++ b/src/common/config.ts
@@ -15,6 +15,7 @@ interface WorkbenchConfig {
export interface ClusterConfigJSON {
API: {
UnfreezeProjectRequiresAdmin: boolean
+ MaxItemsPerResponse: number
},
ClusterID: string;
RemoteClusters: {
@@ -227,6 +228,7 @@ export const mapRemoteHosts = (clusterConfigJSON: ClusterConfigJSON, config: Con
export const mockClusterConfigJSON = (config: Partial<ClusterConfigJSON>): ClusterConfigJSON => ({
API: {
UnfreezeProjectRequiresAdmin: false,
+ MaxItemsPerResponse: 1000,
},
ClusterID: "",
RemoteClusters: {},
diff --git a/src/store/process-logs-panel/process-logs-panel-actions.ts b/src/store/process-logs-panel/process-logs-panel-actions.ts
index e0db51f8..e0f5a14e 100644
--- a/src/store/process-logs-panel/process-logs-panel-actions.ts
+++ b/src/store/process-logs-panel/process-logs-panel-actions.ts
@@ -34,8 +34,9 @@ export const initProcessLogsPanel = (processUuid: string) =>
async (dispatch: Dispatch, getState: () => RootState, { logService }: ServiceRepository) => {
dispatch(processLogsPanelActions.RESET_PROCESS_LOGS_PANEL());
const process = getProcess(processUuid)(getState().resources);
+ const maxPageSize = getState().auth.config.clusterConfig.API.MaxItemsPerResponse;
if (process && process.container) {
- const logResources = await loadContainerLogs(process.container.uuid, logService);
+ const logResources = await loadContainerLogs(process.container.uuid, logService, maxPageSize);
const initialState = createInitialLogPanelState(logResources);
dispatch(processLogsPanelActions.INIT_PROCESS_LOGS_PANEL(initialState));
}
@@ -69,7 +70,7 @@ export const addProcessLogsPanelItem = (message: ResourceEventMessage<{ text: st
}
};
-const loadContainerLogs = async (containerUuid: string, logService: LogService) => {
+const loadContainerLogs = async (containerUuid: string, logService: LogService, maxPageSize: number) => {
const requestFilters = new FilterBuilder()
.addEqual('object_uuid', containerUuid)
.addIn('event_type', PROCESS_PANEL_LOG_EVENT_TYPES)
@@ -81,20 +82,21 @@ const loadContainerLogs = async (containerUuid: string, logService: LogService)
.addDesc('eventAt')
.getOrder();
const { items, itemsAvailable } = await logService.list({
- limit: MAX_PAGE_SIZE,
+ limit: maxPageSize,
filters: requestFilters,
order: requestOrderAsc,
});
- // Request the remaining, or the last 1000 logs if necessary
- const remainingLogs = itemsAvailable - MAX_PAGE_SIZE;
+ // Request the remaining, or the last 'maxPageSize' logs if necessary
+ const remainingLogs = itemsAvailable - maxPageSize;
if (remainingLogs > 0) {
const { items: itemsLast } = await logService.list({
- limit: min([MAX_PAGE_SIZE, remainingLogs]),
+ limit: min([maxPageSize, remainingLogs]),
filters: requestFilters,
order: requestOrderDesc,
+ count: 'none',
})
- if (remainingLogs > MAX_PAGE_SIZE) {
+ if (remainingLogs > maxPageSize) {
const snipLine = {
...items[items.length - 1],
eventType: LogEventType.SNIP,
@@ -147,8 +149,6 @@ export const navigateToLogCollection = (uuid: string) =>
}
};
-const MAX_PAGE_SIZE = 1000;
-
const ALL_FILTER_TYPE = 'All logs';
const MAIN_FILTER_TYPE = 'Main logs';
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list