PromucFlow_constructor/app/client/src/pages/Applications/ApplicationLoaders.tsx
Ankita Kinger b062bda7ff
chore: Adding programmatic access control and user session limit as business feature ramps on CE (#27039)
## Description

Adding programmatic access control and user session limit as business
feature ramps on CE

#### PR fixes following issue(s)
Fixes [#27040](https://github.com/appsmithorg/appsmith/issues/27040)

#### Type of change
- Chore (housekeeping or task changes that don't impact user perception)

## Testing

#### How Has This Been Tested?
- [x] Manual
- [ ] JUnit
- [ ] Jest
- [ ] Cypress

## Checklist:
#### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
2023-09-07 11:00:12 +05:30

231 lines
5.6 KiB
TypeScript

import { Classes } from "@blueprintjs/core";
import type { Theme } from "constants/DefaultTheme";
import React from "react";
import styled, { createGlobalStyle } from "styled-components";
export const LoadingAnimation = createGlobalStyle<{ theme: Theme }>`
&&&& .${Classes.SKELETON} {
background: ${(props) => props.theme.colors.loader.light};;
border-color: ${(props) => props.theme.colors.loader.light};;
animation: 1000ms linear infinite alternate loaderAnimation;
@keyframes loaderAnimation {
from {
background: ${(props) => props.theme.colors.loader.light};
border-color: ${(props) => props.theme.colors.loader.light};;
}
to {
background: ${(props) => props.theme.colors.loader.dark};
border-color: ${(props) => props.theme.colors.loader.dark};
}
}
}
`;
export const loadingUserWorkspaces = [
{
workspace: {
id: "loadingWorkspaceId1",
userPermissions: ["read:workspaces", "read:workspaceApplications"],
name: "loadingWorkspaceName1",
workspaceSettings: [],
plugins: [
{
userPermissions: [],
pluginId: "5c9f512f96c1a50004819786",
status: "FREE",
new: true,
},
{
userPermissions: [],
pluginId: "5ca385dc81b37f0004b4db85",
status: "FREE",
new: true,
},
{
userPermissions: [],
pluginId: "5e687c18fb01e64e6a3f873f",
status: "FREE",
new: true,
},
{
userPermissions: [],
pluginId: "5e75ce2b8f4b473507a4a52e",
status: "FREE",
new: true,
},
{
userPermissions: [],
pluginId: "5f16c4be93f44d4622f487e2",
status: "FREE",
new: true,
},
],
slug: "d60b8e5f",
logoUrl: "/api/v1/assets/null",
new: false,
},
applications: [
{
id: "loadingAppId1",
userPermissions: ["read:applications"],
name: "loadingAppName1",
workspaceId: "loadingWorkspaceId1",
isPublic: false,
pages: [
{
id: "5f7c3bc3b295692137139bd7",
isDefault: true,
default: true,
},
],
appIsExample: false,
new: false,
defaultPageId: "5f7c3bc3b295692137139bd7",
},
{
id: "loadingAppId2",
userPermissions: ["read:applications"],
name: "loadingAppName2",
workspaceId: "loadingWorkspaceId1",
isPublic: false,
pages: [
{
id: "5f7daa65349e65508a53e3c1",
isDefault: true,
default: true,
},
],
appIsExample: false,
color: "#5CE7EF",
new: false,
defaultPageId: "5f7daa65349e65508a53e3c1",
},
],
},
{
workspace: {
id: "loadingWorkspaceId2",
userPermissions: ["read:workspaces", "read:workspaceApplications"],
name: "loadingWorkspaceName2",
workspaceSettings: [],
plugins: [
{
userPermissions: [],
pluginId: "5c9f512f96c1a50004819786",
status: "FREE",
new: true,
},
{
userPermissions: [],
pluginId: "5ca385dc81b37f0004b4db85",
status: "FREE",
new: true,
},
{
userPermissions: [],
pluginId: "5e687c18fb01e64e6a3f873f",
status: "FREE",
new: true,
},
{
userPermissions: [],
pluginId: "5e75ce2b8f4b473507a4a52e",
status: "FREE",
new: true,
},
{
userPermissions: [],
pluginId: "5f16c4be93f44d4622f487e2",
status: "FREE",
new: true,
},
],
slug: "aaf8723f",
logoUrl: "/api/v1/assets/null",
new: false,
},
applications: [
{
id: "loadingAppId3",
userPermissions: ["read:applications"],
name: "loadingAppName3",
workspaceId: "loadingWorkspaceId2",
isPublic: false,
pages: [
{
id: "5f7da6d6e71ebc07bb2699f5",
isDefault: true,
default: true,
},
],
appIsExample: false,
new: false,
defaultPageId: "5f7da6d6e71ebc07bb2699f5",
},
{
id: "loadingAppId4",
userPermissions: ["read:applications"],
name: "loadingAppName4",
workspaceId: "loadingWorkspaceId2",
isPublic: false,
pages: [
{
id: "5f7da88ee71ebc07bb269a03",
isDefault: true,
default: true,
},
],
appIsExample: false,
new: false,
defaultPageId: "5f7da88ee71ebc07bb269a03",
},
{
id: "loadingAppId5",
userPermissions: ["read:applications"],
name: "loadingAppName5",
workspaceId: "loadingWorkspaceId2",
isPublic: false,
pages: [
{
id: "5f7da915349e65508a53e3b6",
isDefault: true,
default: true,
},
],
appIsExample: false,
new: false,
defaultPageId: "5f7da915349e65508a53e3b6",
},
],
},
];
const AppName = styled.div`
margin-top: 10px;
width: 150px;
height: 16px;
`;
const Container = styled.div`
margin: 32px;
`;
const ContentLoader = styled.div`
width: 150px;
height: 150px;
`;
export function AppLoader() {
return (
<>
<LoadingAnimation />
<Container className="app-box">
<ContentLoader className={Classes.SKELETON} />
<AppName className={Classes.SKELETON} />
</Container>
</>
);
}