Skip to content

Commit

Permalink
feat: lab pages (#204)
Browse files Browse the repository at this point in the history
Signed-off-by: neil <[email protected]>
Signed-off-by: laixingyou <[email protected]>
Signed-off-by: edmondfrank <[email protected]>
Co-authored-by: laixingyou <[email protected]>
Co-authored-by: edmondfrank <[email protected]>
  • Loading branch information
3 people authored Aug 23, 2023
1 parent 2d26cba commit 2e5a881
Show file tree
Hide file tree
Showing 221 changed files with 15,000 additions and 2,752 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- 'release'
- 'main'
- 'demo'
paths-ignore:
- README.md
- docs/**
Expand All @@ -25,6 +26,7 @@ jobs:
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'release') }}
type=raw,value=nightly,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=demo,enable=${{ github.ref == format('refs/heads/{0}', 'demo') }}
type=sha,prefix={{branch}}-
- name: Set up QEMU
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ next.config.original.js


tmp


graphql.config.yml
35 changes: 35 additions & 0 deletions apps/storybook/src/stories/Modal.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import type { Meta, StoryObj } from '@storybook/react';

import { Modal } from '@oss-compass/ui';

const meta: Meta<typeof Modal> = {
title: 'basic/Modal',
component: Modal,
argTypes: {
open: { control: 'boolean' },
},
};

export default meta;

type Story = StoryObj<typeof Modal>;

export const Default: Story = {
args: {
open: true,
},
render: ({ open }) => {
return (
<div className="p-10">
<Modal open={open}>
<div className="rounded bg-white p-10 shadow">
<div>Text in a modal</div>
<div>
Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
</div>
</div>
</Modal>
</div>
);
},
};
23 changes: 23 additions & 0 deletions apps/storybook/src/stories/Switch.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import type { Meta, StoryObj } from '@storybook/react';

import { Switch, SelectOption } from '@oss-compass/ui';

const meta: Meta<typeof Switch> = {
title: 'basic/Switch',
component: Switch,
argTypes: {},
};

export default meta;
type Story = StoryObj<typeof Switch>;

export const Default: Story = {
args: {},
render: (args) => {
return (
<>
<Switch defaultChecked inputProps={{ 'aria-label': 'switch' }} />
</>
);
},
};
9 changes: 0 additions & 9 deletions apps/web/i18n/en/analyze.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@
"robustness": "Robustness",
"niche_creation": "Niche Creation"
},
"range": {
"3M": "Last 3 months",
"6M": "Last 6 months",
"1Y": "Last year",
"2Y": "Last 2 years",
"3Y": "Last 3 years",
"5Y": "Last 5 years",
"Since2000": "Since inception"
},
"confirm": "OK",
"custom": "Custom",
"display": "Charts Display",
Expand Down
3 changes: 2 additions & 1 deletion apps/web/i18n/en/auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"the_email_address": "The email address",
"has_been_successfully": "has been successfully bound to your OSS Compass account",
"resend_email": "Please go to the account settings page and resend the verification email.",
"account_setting": "Account Setting"
"account_setting": "Account Setting",
"auth_failed": "Login failed"
}
28 changes: 27 additions & 1 deletion apps/web/i18n/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
"about": "About",
"submit_your_project": "Submit your project"
},
"range": {
"3M": "Last 3 months",
"6M": "Last 6 months",
"1Y": "Last year",
"2Y": "Last 2 years",
"3Y": "Last 3 years",
"5Y": "Last 5 years",
"Since2000": "Since inception"
},
"community": {
"code_base": "Repository",
"discussion": "Discussion",
Expand Down Expand Up @@ -49,30 +58,47 @@
"search": {
"no_result": "No result"
},
"topic": {
"productivity": "Productivity",
"robustness": "Robustness",
"niche_creation": "Niche Creation"
},
"no_data": "No data available",
"next": "Next",
"know_more": "more",
"ago": "ago",
"signin": "Sign In",
"subscribe": "My Subscriptions",
"profile_setting": "Account Setting",
"my_models": "My Models",
"signout": "Sign Out",
"btn": {
"create": "Create",
"back": "Back",
"confirm": "Confirm",
"save": "Save",
"delete": "Delete",
"edit": "Edit",
"cancel": "Cancel",
"func_disabled": "The feature is temporarily disabled"
},
"prompt": {
"please_enter": "Please enter"
},
"confirm": {
"delete": "Are you sure you want to delete?"
},
"toast": {
"modification_successful": "Modification Successful",
"modification_failed": "Modification Failed"
},
"loading": "Loading...",
"loading_more": "Loading more...",
"load_more": "Load More",
"nothing_more_to_load": "Nothing more to load",
"copy": {
"click_to_copy": "click to copy",
"copy_successfully": "copy successfully"
}
},
"contact_us": "Contact us through <s> the community </s>. "
}
120 changes: 119 additions & 1 deletion apps/web/i18n/en/lab.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"back_my_lab": "Back to My Lab",
"the_locale_names_are_used_for": "Compass Lab is a sandbox that helps people quickly create and validate metrics models of their interest, which can be used for proprietary domain evaluations or as general models. It provides over 20,000 open-source project datasets from over 200 categories, 100+ CHAOSS metrics, and custom algorithms to promote continuous innovation in modeling.",
"discuss": "Discuss",
"create_a_model": "Create a model",
"pick_for_compare": "Pick for compare",
"datasets": "Datasets",
"metrics": "Metrics",
"algorithm": "Algorithm",
"projects_in_datasets": "{{length}} projects in datasets are using this model",
"create_your_own_model_in_5_minutes": "Create your own model in 5 minutes",
"create_a_model_now": "Create a model now",
Expand All @@ -14,5 +17,120 @@
"select_algorithm": "Select algorithm",
"support_AHP": "Support AHP and other self-defined algorithms",
"release_model": "Publish model",
"expose_the_model": "Publish the model and invite partners to improve it"
"expose_the_model": "Publish the model and invite partners to improve it",
"add_dataset": "Add Dataset",
"add_metric": "Add Metric",
"my_models": "My Models",
"new_model": "New Model",
"versions": "Versions",
"default_display_version": "Default display version",
"user_management": "Member",
"model_name": "Model Name",
"version_name": "Version Name",
"selected_count": "Selected {{value}} items",
"search_dataset_placeholder": "Search repository",
"search_metric_placeholder": "Search metrics",
"commit_enter": "Press Enter to send a comment",
"reply": "reply",
"user": {
"invite_users": "Invite member",
"input_email": "Please input the email address of the invitee, multiple email addresses are separated by commas",
"send_email": "Send email",
"please_enter_the_correct_email_format": "Please enter the correct email format",
"multiple": "Multiple",
"browsable": "Browsable",
"view_and_comment_the_report": "View and comment on reports",
"trigger_analysis": "Triggerable analysis",
"can_trigger_model_report_scan": "Trigger model report scanning",
"modifiable_model": "Modifiable models",
"can_modifiable_model_parameter": "Modify parameter configurations in the model",
"send_successful": "Send successful",
"send_failed": "Send failed",
"member": "Member",
"owner": "Owner",
"join_at": "Join at",
"member_to_be_added": "Member to be added",
"waiting_for_confirmation_to_join": "Invitation sent, waiting to join",
"uninvite": "Cancel invitation",
"confirm_cancel_invitation": "Confirm cancel invitation",
"confirm_delete": "Confirm delete",
"quit": "quit",
"confirm_quit": "Confirm quit",
"quit_successful": "Quit successful"
},
"remaining_times_of_analysis_performed_this_week": "Remaining times of analysis performed this week: ",
"view_report": "View report",
"click_on_the_left_menu_and_select_a_category": "Click on the left menu and select a category.",
"cant_find_a_suitable_dataset": "Can't find a suitable dataset? ",
"cant_find_a_suitable_metric": "Can't find a suitable metric? ",
"ecological_dimension": "Ecological Dimension",
"industry_options": {
"is_it_applicable_to_general_industries_fields": "Is it applicable to general industries/fields?",
"yes": "Yes",
"not": "No, this is an industry specific model."
},
"is_public": "Public",
"is_public_options": {
"label": "Is public",
"public": "public",
"public_desc": "This is an open evaluation model that allows display on the Compass LAB homepage for user participation in assessment evolution.",
"non_public": "non public",
"non_public_desc": "This is a confidential internal evaluation model. I only wish to conduct evaluations and iterations with my collaborative team members."
},
"weight_threshold_settings": {
"label": "Weight & Threshold Settings",
"metrics": "Metrics",
"weight_percentage": "Weight percentage",
"threshold": "Threshold",
"between": "Between 0 and {{end}}"
},
"algorithm_selection": {
"label": "Algorithm selection",
"default": "System default algorithm",
"default_desc": "The default <s> algorithm </s> used in our models is derived from <b>Rob Pike</b>, and it was initially employed by the openSSF <c> criticality score </c> (a big thank you to Rob and the criticality score!). Taking into account considerations of time series and value ranges, we have made improvements to this algorithm in its implementation. For more details, please refer to the <d> source code </d> and <e>article</e>.",
"contact_us": "Have more ideas about model algorithms? Welcome to join the <s> official Slack community </s> and discuss with us.",
"metrics_value": "Metrics Value",
"metrics_threshold": "Metrics Threshold",
"metrics_weight": "Metrics Weight"
},
"trigger_analysis": {
"card_btn": "Analysis",
"title": "Confirm trigger analysis?",
"retry_title": "Confirm analysis again?",
"status": "Last time trigger status: ",
"time": "Last time trigger time: ",
"analyzing": "Analyzing...",
"times_limit": "Not enough times"
},
"analysis_status": {
"tips": "Report analysis not completed: ",
"pending": "pending",
"progress": "progress",
"success": "success",
"unsumbit": "unsumbit"
},
"threshold_range": "Between 0 and {{value}}",
"select_over_tips": "Cannot exceed 10 items",
"create": "Create",
"edit": "Edit",
"new_version": "New Version",
"edit_comment": "Edit comment",
"create_failed": "Create failed",
"create_succeed": "Create succeed",
"edit_failed": "Edit failed",
"edit_succeed": "Edit succeed",
"joining_the_compass": "Joining the Compass Lab",
"agree_to_join": "Agree to Join",
"i_have_understood_and_agreed_to_the": "I have understood and agreed to the",
"experimental_model_terms_of_use": "Experimental Model Terms of Use",
"please_check_the_terms": "Please check the Terms of Use",
"you_are_here_because_you_have_been_invited": "You are here because you have been invited by <s>{{invitee}}</s> to join the Compass Lab to collaborate in building the model <s>{{modelName}}</s>, do you agree to join?",
"form_tips": {
"name_require": "Please enter model name",
"version_require": "Please enter version name",
"dataset_require": "Please select dataset",
"metric_require": "Please select metric"
},
"projects_selected": "{{count}} repository selected",
"no_comment_data": "No comments yet"
}
Loading

1 comment on commit 2e5a881

@vercel
Copy link

@vercel vercel bot commented on 2e5a881 Aug 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.