fix gitignore.

This commit is contained in:
Nawaz Dhandala
2022-03-19 17:21:52 +00:00
parent 45f1802a8d
commit 8dc9fda113
14 changed files with 96 additions and 96 deletions

2
.gitignore vendored
View File

@@ -5,7 +5,7 @@ node_modules
/node_modules
# Build Dist
/build/dist
*/build/dist/*
.idea
# testing

View File

@@ -23,10 +23,10 @@ export function postApi(url: $TSFixMe, data: $TSFixMe) {
headers,
data,
})
.then(function (response) {
.then((response) => {
deffered.resolve(response);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.status === 401) {
User.clear();
history.push('/login');
@@ -50,10 +50,10 @@ export function getApi(url: $TSFixMe) {
url: `${baseURL}/${url}`,
headers,
})
.then(function (response) {
.then((response) => {
deffered.resolve(response);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.status === 401) {
User.clear();
history.push('/login');
@@ -79,10 +79,10 @@ export function putApi(url: $TSFixMe, data: $TSFixMe) {
headers,
data,
})
.then(function (response) {
.then((response) => {
deffered.resolve(response);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.status === 401) {
User.clear();
history.push('/login');
@@ -108,10 +108,10 @@ export function deleteApi(url: $TSFixMe, data: $TSFixMe) {
headers,
data,
})
.then(function (response) {
.then((response) => {
deffered.resolve(response);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.status === 401) {
User.clear();
history.push('/login');

View File

@@ -12,12 +12,12 @@
const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
// [::1] is the IPv6 localhost address.
window.location.hostname === '[::1]' ||
// 127.0.0.1/8 is considered localhost for IPv4.
window.location.hostname.match(
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
)
// [::1] is the IPv6 localhost address.
window.location.hostname === '[::1]' ||
// 127.0.0.1/8 is considered localhost for IPv4.
window.location.hostname.match(
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
)
);
export function register(config: $TSFixMe) {
@@ -48,7 +48,7 @@ export function register(config: $TSFixMe) {
window.addEventListener('fetch', event => {
event.respondWith(
caches.match(event.request).then(function (response) {
caches.match(event.request).then((response) => {
// Cache hit - return response
if (response) {
return response;

View File

@@ -31,10 +31,10 @@ export function postApi(url: $TSFixMe, data: $TSFixMe, licensing: $TSFixMe) {
headers,
data,
})
.then(function (response) {
.then((response) => {
deffered.resolve(response);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.status === 401) {
const cookies = new Cookies();
cookies.remove('admin-data', { path: '/' });
@@ -62,10 +62,10 @@ export function getApi(url: $TSFixMe, licensing: $TSFixMe) {
url: `${licensing ? licensingURL : baseURL}/${url}`,
headers,
})
.then(function (response) {
.then((response) => {
deffered.resolve(response);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.status === 401) {
const cookies = new Cookies();
cookies.remove('admin-data', { path: '/' });
@@ -95,10 +95,10 @@ export function putApi(url: $TSFixMe, data: $TSFixMe) {
headers,
data,
})
.then(function (response) {
.then((response) => {
deffered.resolve(response);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.status === 401) {
const cookies = new Cookies();
cookies.remove('admin-data', { path: '/' });
@@ -128,10 +128,10 @@ export function deleteApi(url: $TSFixMe, data: $TSFixMe) {
headers,
data,
})
.then(function (response) {
.then((response) => {
deffered.resolve(response);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.status === 401) {
const cookies = new Cookies();
cookies.remove('admin-data', { path: '/' });
@@ -160,10 +160,10 @@ export function getApiDocs(url: $TSFixMe) {
url: `${API_DOCS_URL}/${url}`,
headers,
})
.then(function (response) {
.then((response) => {
deffered.resolve(response);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.status === 401) {
const cookies = new Cookies();
cookies.remove('admin-data', { path: '/' });
@@ -192,10 +192,10 @@ export function getApiHelm(url: $TSFixMe) {
url: `${HELM_CHART_URL}/${url}`,
headers,
})
.then(function (response) {
.then((response) => {
deffered.resolve(response);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.status === 401) {
const cookies = new Cookies();
cookies.remove('admin-data', { path: '/' });
@@ -224,10 +224,10 @@ export function getApiDashboard(url: $TSFixMe) {
url: `${DASHBOARD_URL}/api/${url}`,
headers,
})
.then(function (response) {
.then((response) => {
deffered.resolve(response);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.status === 401) {
const cookies = new Cookies();
cookies.remove('admin-data', { path: '/' });

View File

@@ -23,10 +23,10 @@ const _this = {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -45,10 +45,10 @@ const _this = {
url: `${config.serverUrl}/${url}`,
headers,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -68,10 +68,10 @@ const _this = {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -91,10 +91,10 @@ const _this = {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {

View File

@@ -23,10 +23,10 @@ const _this = {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -45,10 +45,10 @@ const _this = {
url: `${config.serverUrl}/${url}`,
headers,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -68,10 +68,10 @@ const _this = {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -91,10 +91,10 @@ const _this = {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {

View File

@@ -23,10 +23,10 @@ export function postApi(url: $TSFixMe, data: $TSFixMe) {
headers,
data,
})
.then(function (response) {
.then((response) => {
deffered.resolve(response);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.status === 401) {
const cookies = new Cookies();
cookies.remove('admin-data', { path: '/' });
@@ -58,10 +58,10 @@ export function getApi(url: $TSFixMe) {
url: `${baseURL}/${url}`,
headers,
})
.then(function (response) {
.then((response) => {
deffered.resolve(response);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.status === 401) {
const cookies = new Cookies();
cookies.remove('admin-data', { path: '/' });
@@ -95,10 +95,10 @@ export function putApi(url: $TSFixMe, data: $TSFixMe) {
headers,
data,
})
.then(function (response) {
.then((response) => {
deffered.resolve(response);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.status === 401) {
const cookies = new Cookies();
cookies.remove('admin-data', { path: '/' });
@@ -132,10 +132,10 @@ export function deleteApi(url: $TSFixMe, data: $TSFixMe) {
headers,
data,
})
.then(function (response) {
.then((response) => {
deffered.resolve(response);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.status === 401) {
const cookies = new Cookies();
cookies.remove('admin-data', { path: '/' });

View File

@@ -26,10 +26,10 @@ const _this = {
maxContentLength: Infinity,
maxBodyLength: Infinity,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -48,10 +48,10 @@ const _this = {
url: withBaseUrl ? `${url}` : `${serverUrl}/${url}`,
headers,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -75,10 +75,10 @@ const _this = {
maxContentLength: Infinity,
maxBodyLength: Infinity,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -98,10 +98,10 @@ const _this = {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {

View File

@@ -20,10 +20,10 @@ const _this = {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {

View File

@@ -20,10 +20,10 @@ const _this = {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -42,10 +42,10 @@ const _this = {
url: `${config.serverUrl}/${url}`,
headers,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -65,10 +65,10 @@ const _this = {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -88,10 +88,10 @@ const _this = {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {

View File

@@ -25,10 +25,10 @@ const _this = {
maxContentLength: Infinity,
maxBodyLength: Infinity,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {

View File

@@ -29,10 +29,10 @@ const _this = {
maxContentLength: Infinity,
maxBodyLength: Infinity,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -51,10 +51,10 @@ const _this = {
url: `${config.probeApiUrl}/${url}?limit=${limit}`,
headers,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -79,10 +79,10 @@ const _this = {
maxContentLength: Infinity,
maxBodyLength: Infinity,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -102,10 +102,10 @@ const _this = {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {

View File

@@ -20,10 +20,10 @@ const _this = {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -42,10 +42,10 @@ const _this = {
url: `${config.serverUrl}/${url}`,
headers,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -65,10 +65,10 @@ const _this = {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {
@@ -88,10 +88,10 @@ const _this = {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response.data);
})
.catch(function (error) {
.then((error) => {
if (error && error.response && error.response.data)
error = error.response.data;
if (error && error.data) {

View File

@@ -19,10 +19,10 @@ export function postApi(url: $TSFixMe, data: $TSFixMe) {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response);
})
.catch(function (error) {
.then((error) => {
reject(error);
});
});
@@ -40,10 +40,10 @@ export function getApi(url: $TSFixMe) {
url: `${API_URL}/${url}`,
headers,
})
.then(function (response) {
.then((response) => {
resolve(response);
})
.catch(function (error) {
.then((error) => {
reject(error);
});
});
@@ -62,10 +62,10 @@ export function putApi(url: $TSFixMe, data: $TSFixMe) {
headers,
data,
})
.then(function (response) {
.then((response) => {
resolve(response);
})
.catch(function (error) {
.then((error) => {
reject(error);
});
});