Browse Source

refactor: sync

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/6751/head
Pranav C 1 year ago
parent
commit
1ec856ec05
  1. 1
      packages/nc-gui/components/general/WorkspaceIcon.vue
  2. 3
      packages/nocodb-sdk/src/lib/enums.ts
  3. 1
      packages/nocodb/src/controllers/utils.controller.ts
  4. 12
      packages/nocodb/src/modules/jobs/jobs.controller.ts
  5. 2
      tests/playwright/setup/index.ts

1
packages/nc-gui/components/general/WorkspaceIcon.vue

@ -10,6 +10,7 @@ const props = defineProps<{
const workspaceColor = computed(() => {
const color = props.workspace ? props.workspace.meta?.color || stringToColor(props.workspace.id!) : undefined
return color || '#0A1433'
})

3
packages/nocodb-sdk/src/lib/enums.ts

@ -157,9 +157,8 @@ export enum WorkspaceStatus {
export enum WorkspacePlan {
FREE = 'free',
STANDARD = 'standard',
TEAM = 'team',
BUSINESS = 'business',
BUSINESS_PRO = 'business-pro',
}
export const RoleLabels = {

1
packages/nocodb/src/controllers/utils.controller.ts

@ -61,7 +61,6 @@ export class UtilsController {
@Get([
'/api/v1/db/meta/nocodb/info',
'/api/v2/meta/nocodb/info',
// todo: remove this once we added the health api
'/api/v1/meta/nocodb/info',
])
async appInfo(@Request() req) {

12
packages/nocodb/src/modules/jobs/jobs.controller.ts

@ -123,7 +123,7 @@ export class JobsController implements OnModuleInit {
this.closedJobs.push(jobId);
setTimeout(() => {
this.closedJobs = this.closedJobs.filter((j) => j !== jobId);
}, POLLING_INTERVAL * 1.5);
}, POLLING_INTERVAL * 2);
}
break;
}
@ -184,10 +184,9 @@ export class JobsController implements OnModuleInit {
response = {
status: 'update',
data,
_mid: this.localJobs[jobId]._mid,
_mid: ++this.localJobs[jobId]._mid,
};
this.localJobs[jobId].messages.push(response);
this.localJobs[jobId]._mid += 1;
// limit to 20 messages
if (this.localJobs[jobId].messages.length > 20) {
@ -233,13 +232,13 @@ export class JobsController implements OnModuleInit {
this.closedJobs.push(jobId);
setTimeout(() => {
this.closedJobs = this.closedJobs.filter((j) => j !== jobId);
}, POLLING_INTERVAL * 1.5);
}, POLLING_INTERVAL * 2);
setTimeout(() => {
delete this.jobRooms[jobId];
delete this.localJobs[jobId];
NocoCache.del(`${CacheScope.JOBS}:${jobId}:messages`);
}, POLLING_INTERVAL);
}, POLLING_INTERVAL * 2);
}
}
@ -253,11 +252,10 @@ export class JobsController implements OnModuleInit {
response = {
status: 'update',
data,
_mid: this.localJobs[jobId]._mid,
_mid: ++this.localJobs[jobId]._mid,
};
this.localJobs[jobId].messages.push(response);
this.localJobs[jobId]._mid += 1;
// limit to 20 messages
if (this.localJobs[jobId].messages.length > 20) {

2
tests/playwright/setup/index.ts

@ -181,7 +181,7 @@ async function localInit({
try {
let response: AxiosResponse<any, any>;
// Login as root user
if (isSuperUser) {
if (isSuperUser && !isEE()) {
// required for configuring license key settings
response = await axios.post('http://localhost:8080/api/v1/auth/user/signin', {
email: `user@nocodb.com`,

Loading…
Cancel
Save