Project

General

Profile

Actions

action #166310

closed

coordination #154768: [saga][epic][ux] State-of-art user experience for openQA

coordination #154771: [epic] Improved test developer user experience

Replace jquery ajax calls with fetch API size:M

Added by tinita 4 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2024-09-04
Due date:
% Done:

0%

Estimated time:

Description

Motivation

We want to get rid of jquery, and as part of this we could get rid of is our ajax calls.

We are currently using jquery for that, e.g. $.ajax({ ... }).

Instead we could use the fetch API:
https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch

Acceptance Criteria

  • AC1: We don't use jquery any more for ajax calls
  • AC2: Ajax calls still work in all browsers we support

Suggestions

  • Confirm that fetch API is available in all current browsers (including the latest versions of Chromium and Firefox available under the oldest still supported Leap version, e.g. some Firefox ESR version provided by Leap)
    • Consider checking that we document what browsers are supported by/required by openQA
  • Grep for $.ajax, $.ajaxSetup and similar calls to find relevant usages to be replaced (and post/ajaxSetup or similar calls)
  • For the X-CSRF-TOKEN header see https://github.com/os-autoinst/openQA/blob/master/assets/javascripts/openqa.js#L22

Out of scope

  • Whatever datatables does internally

Related issues 2 (1 open1 closed)

Related to openQA Project (public) - action #156340: Evaluate the use of state-of-the-art web development frameworks to simplify our stack, e.g. alpine.js, vanilla CSS nesting size:SWorkable2024-02-29

Actions
Related to openQA Project (public) - action #64412: Get rid of eval in OpenQA::WebAPI::Plugin::HashedParamsResolveddheidler2020-03-11

Actions
Actions

Also available in: Atom PDF