Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • Product/1107-frontendPerformance
  • Product/1180-genericOrganizationMembershipFunction
  • Product/1215-gitlabCleanUp
  • Product/1440-largerFiles
  • Product/1442-projectInviteMngmnt
  • Product/1573-ReadOnlyResources
  • Product/588-quotaManagement
  • Product/789-userContactEmail
  • Product/917-maintenanceFunctionality
  • Sprint/2021-01
  • Sprint/2021-02
  • Sprint/2021-04
  • Sprint/2021-06
  • Sprint/2021-07
  • Sprint/2021-09
  • Sprint/2021-15
  • Sprint/2022-01
  • Topic/1227-frontendPerformance
  • Topic/1280-quotaManagementUI
  • Topic/1281-genericOrganizationMembershipFunction
  • Topic/1295-contactChangeUi
  • Topic/1297-maintenanceBanner
  • Topic/1451-uploadUrl
  • Topic/1452-largerFiles
  • Topic/1528-projectInviteAPIcon
  • Topic/1529-HandleExternalUserInvitation
  • Topic/1594-SetReadOnlyResources
  • dev
  • gitkeep
  • master
  • v1.0.0
  • v1.0.1
  • v1.1.0
  • v1.1.1
  • v1.10.0
  • v1.11.0
  • v1.12.0
  • v1.13.0
  • v1.14.0
  • v1.15.0
  • v1.16.0
  • v1.17.0
  • v1.17.1
  • v1.18.0
  • v1.18.1
  • v1.19.0
  • v1.2.0
  • v1.20.0
  • v1.21.0
  • v1.22.0
  • v1.23.0
  • v1.23.1
  • v1.24.0
  • v1.24.1
  • v1.24.2
  • v1.25.0
  • v1.26.0
  • v1.27.0
  • v1.28.0
  • v1.29.0
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.30.0
  • v1.31.0
  • v1.4.0
  • v1.5.0
  • v1.6.0
  • v1.7.0
  • v1.8.0
  • v1.9.0
71 results

Target

Select target project
  • coscine/frontend/libraries/api-connection
1 result
Select Git revision
  • Product/1107-frontendPerformance
  • Product/1180-genericOrganizationMembershipFunction
  • Product/1215-gitlabCleanUp
  • Product/1440-largerFiles
  • Product/1442-projectInviteMngmnt
  • Product/1573-ReadOnlyResources
  • Product/588-quotaManagement
  • Product/789-userContactEmail
  • Product/917-maintenanceFunctionality
  • Sprint/2021-01
  • Sprint/2021-02
  • Sprint/2021-04
  • Sprint/2021-06
  • Sprint/2021-07
  • Sprint/2021-09
  • Sprint/2021-15
  • Sprint/2022-01
  • Topic/1227-frontendPerformance
  • Topic/1280-quotaManagementUI
  • Topic/1281-genericOrganizationMembershipFunction
  • Topic/1295-contactChangeUi
  • Topic/1297-maintenanceBanner
  • Topic/1451-uploadUrl
  • Topic/1452-largerFiles
  • Topic/1528-projectInviteAPIcon
  • Topic/1529-HandleExternalUserInvitation
  • Topic/1594-SetReadOnlyResources
  • dev
  • gitkeep
  • master
  • v1.0.0
  • v1.0.1
  • v1.1.0
  • v1.1.1
  • v1.10.0
  • v1.11.0
  • v1.12.0
  • v1.13.0
  • v1.14.0
  • v1.15.0
  • v1.16.0
  • v1.17.0
  • v1.17.1
  • v1.18.0
  • v1.18.1
  • v1.19.0
  • v1.2.0
  • v1.20.0
  • v1.21.0
  • v1.22.0
  • v1.23.0
  • v1.23.1
  • v1.24.0
  • v1.24.1
  • v1.24.2
  • v1.25.0
  • v1.26.0
  • v1.27.0
  • v1.28.0
  • v1.29.0
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.30.0
  • v1.31.0
  • v1.4.0
  • v1.5.0
  • v1.6.0
  • v1.7.0
  • v1.8.0
  • v1.9.0
71 results
Show changes
Commits on Source (5)
{
"name": "@coscine/api-connection",
"version": "1.24.2",
"version": "1.25.0",
"description": "This library provides methods to connect to CoScInE Apis with JavaScript.",
"keywords": [
"coscine",
......
......@@ -8,6 +8,7 @@ export { MetadataApi } from './requests/metadata-api';
export { NoticeApi } from './requests/notice-api';
export { OrganizationApi } from './requests/organization-api';
export { PIDApi } from './requests/pid-api';
export { QuotaApi } from './requests/quota-api';
export { ProjectApi } from './requests/project-api';
export { ProjectRoleApi } from './requests/project-role-api';
export { ResourceApi } from './requests/resource-api';
......
......@@ -50,7 +50,44 @@ export class ProjectApi {
) {
apiConnectionBasic.setHeader();
return axios
.get(getProjectApiUrl() + projectId + '/quotas')
.get(getProjectApiUrl() + projectId + '/quota/-/all')
.then(thenHandler)
.catch(catchHandler);
}
public static getQuota(
projectId: string,
resourceTypeId: any,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
return axios
.get(getProjectApiUrl() + projectId + '/quota/' + resourceTypeId)
.then(thenHandler)
.catch(catchHandler);
}
public static getMaxiumQuota(
projectId: string,
resourceTypeId: any,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
return axios
.get(getProjectApiUrl() + projectId + '/quota/' + resourceTypeId + '/max')
.then(thenHandler)
.catch(catchHandler);
}
public static setQuota(
projectId: string,
resourceTypeId: string,
body: any,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
return axios
.post(getProjectApiUrl() + projectId + '/quota/' + resourceTypeId, body)
.then(thenHandler)
.catch(catchHandler);
}
......
const axios = require('axios');
import apiConnectionBasic from '../basic/api-connection-basic';
function getQuotaApiUrl() {
return (
'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Quota/Quota/'
);
}
export class QuotaApi {
public static getResourceQuotas(
projectId: string,
resourceTypeId: string,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
return axios
.get(getQuotaApiUrl() + projectId + '/' + resourceTypeId + '/all')
.then(thenHandler)
.catch(catchHandler);
}
public static getResourceQuota(
resourceId: string,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
return axios
.get(getQuotaApiUrl() + resourceId)
.then(thenHandler)
.catch(catchHandler);
}
public static setResourceQuota(
resourceId: string,
body: any,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch,
) {
apiConnectionBasic.setHeader();
return axios
.post(getQuotaApiUrl() + resourceId, body)
.then(thenHandler)
.catch(catchHandler);
}
}
......@@ -3201,9 +3201,9 @@ __metadata:
linkType: hard
"core-js@npm:^3.6.1":
version: 3.8.2
resolution: "core-js@npm:3.8.2"
checksum: 8fa2c580b77b9d54d3f6ee147be4d9ae01ea6d77f35f16b05962161e9bec02d846449cce4c68b9d190145edc8ded71142f6fd99e35b53fc642b20a3bf47bbd07
version: 3.8.3
resolution: "core-js@npm:3.8.3"
checksum: 3c67d1732d505f6afaf836f18038dae8267e8c0e8e84e1c679bac67589e66d0807c24750c7d8b1118cc386c3d66a1d96f20d9cb0f6a879b19cfc04e9f073fe78
languageName: node
linkType: hard
......@@ -4757,7 +4757,7 @@ __metadata:
languageName: node
linkType: hard
"fs-extra@npm:^9.0.0, fs-extra@npm:^9.0.1":
"fs-extra@npm:^9.0.0":
version: 9.0.1
resolution: "fs-extra@npm:9.0.1"
dependencies:
......@@ -4769,6 +4769,18 @@ __metadata:
languageName: node
linkType: hard
"fs-extra@npm:^9.0.1":
version: 9.1.0
resolution: "fs-extra@npm:9.1.0"
dependencies:
at-least-node: ^1.0.0
graceful-fs: ^4.2.0
jsonfile: ^6.0.1
universalify: ^2.0.0
checksum: e667d8df54113b527bf5830dd9db8f142618db488894b329fe07724c7020dfacf8a372b144a74e683ae44e66f56117adca9cac165950dda7d83537c46c10dc4b
languageName: node
linkType: hard
"fs-minipass@npm:^1.2.5":
version: 1.2.7
resolution: "fs-minipass@npm:1.2.7"
......@@ -10558,8 +10570,8 @@ resolve@1.17.0:
linkType: hard
"rollup@npm:^2.36.1":
version: 2.36.2
resolution: "rollup@npm:2.36.2"
version: 2.37.0
resolution: "rollup@npm:2.37.0"
dependencies:
fsevents: ~2.1.2
dependenciesMeta:
......@@ -10567,7 +10579,7 @@ resolve@1.17.0:
optional: true
bin:
rollup: dist/bin/rollup
checksum: 65a892680d0da59b77a8174d90ff203bd8f4a34a5ec9d230d9bbf735ecad700426f1e079ed1953cd24bc9c0fcf77aed7219da77db11347222814e8d9364c60cd
checksum: ef944ab73701ae1b8459bbed91f49895db57580413880cbb1727c8eb5fd136f5ec313a7af5093c836d703e0ee7c77fd9ec027af2fe039a37d18dcff2a9b05d6f
languageName: node
linkType: hard
......