Skip to content

Commit 6d9d96f

Browse files
Merge branch 'main' into release-2.7.4
2 parents d69ebab + 3850016 commit 6d9d96f

File tree

4 files changed

+86
-0
lines changed

4 files changed

+86
-0
lines changed

template/v2/dirs/etc/patches/apply_patches.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ fi
1111
# Validate parameter
1212
case "$1" in
1313
"smus")
14+
bash "/etc/patches/smus-script/replace-job-with-schedule.sh"
1415
PATCH_DIR="/etc/patches/smus"
1516
;;
1617
"studio-ai")
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
# this is to replace sagemaker unfied studio jupyter scheduler label from "Job" to "Scheudule" to align with overall experience
3+
set -ex
4+
5+
BASE_PATH="/opt/conda/share/jupyter/labextensions/@jupyterlab/scheduler/static"
6+
7+
# Function to perform replacement
8+
replace_string() {
9+
local search="$1"
10+
local replace="$2"
11+
echo "Replacing '$search' with '$replace'..."
12+
grep -l -i -r "$search" "$BASE_PATH" | xargs sed -i "s/$search/$replace/gI"
13+
}
14+
15+
# List of replacements
16+
replace_string "\"Schedule\"" "\" \""
17+
replace_string "Create Job\"" "Create Schedule\""
18+
replace_string "Job name\"" "Schedule name\""
19+
replace_string "Run job with input folder\"" "Run schedule with input folder\""
20+
replace_string "\"The scheduled job will have access to all files under" "\"The schedule will have access to all files under"
21+
replace_string "Notebook Jobs\"" "Notebook Schedules\""
22+
replace_string "Notebook Job Definitions\"" "Notebook Schedule Definitions\""
23+
replace_string "job definitions" "schedule definitions"
24+
replace_string "Create Notebook Job" "Create Notebook Schedule"
25+
replace_string "notebook job definition" "notebook schedule definition"
26+
replace_string "Job definition name" "Schedule definition name"
27+
replace_string "Job Detail\"" "Schedule Detail\""
28+
replace_string "Job ID\"" "Schedule ID\""
29+
replace_string "Your job definition" "Your schedule definition"
30+
replace_string "Your job" "Your schedule"
31+
replace_string "Job Definition\"" "Schedule Definition\""
32+
replace_string "Run Job\"" "Run Schedule\""
33+
replace_string "Creating job" "Creating schedule"
34+
replace_string "Reload Job\"" "Reload Schedule\""
35+
replace_string "Delete Job\"" "Delete Schedule\""
36+
replace_string "Download Job Files\"" "Download Schedule Files\""
37+
replace_string "No notebook jobs associated with this job definition" "No notebook schedules associated with this schedule definition"
38+
replace_string "Create Job from Schedule Definition\"" "Create Schedule from Schedule Definition\""
39+
replace_string "Job definition ID\"" "Schedule definition ID\""
40+
replace_string "Create a notebook job" "Create a notebook schedule"
41+
42+
echo "All replacements completed!"

template/v3/dirs/etc/patches/apply_patches.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ fi
1111
# Validate parameter
1212
case "$1" in
1313
"smus")
14+
bash "/etc/patches/smus-script/replace-job-with-schedule.sh"
1415
PATCH_DIR="/etc/patches/smus"
1516
;;
1617
"studio-ai")
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
# this is to replace sagemaker unfied studio jupyter scheduler label from "Job" to "Scheudule" to align with overall experience
3+
set -ex
4+
5+
BASE_PATH="/opt/conda/share/jupyter/labextensions/@jupyterlab/scheduler/static"
6+
7+
# Function to perform replacement
8+
replace_string() {
9+
local search="$1"
10+
local replace="$2"
11+
echo "Replacing '$search' with '$replace'..."
12+
grep -l -i -r "$search" "$BASE_PATH" | xargs sed -i "s/$search/$replace/gI"
13+
}
14+
15+
# List of replacements
16+
replace_string "\"Schedule\"" "\" \""
17+
replace_string "Create Job\"" "Create Schedule\""
18+
replace_string "Job name\"" "Schedule name\""
19+
replace_string "Run job with input folder\"" "Run schedule with input folder\""
20+
replace_string "\"The scheduled job will have access to all files under" "\"The schedule will have access to all files under"
21+
replace_string "Notebook Jobs\"" "Notebook Schedules\""
22+
replace_string "Notebook Job Definitions\"" "Notebook Schedule Definitions\""
23+
replace_string "job definitions" "schedule definitions"
24+
replace_string "Create Notebook Job" "Create Notebook Schedule"
25+
replace_string "notebook job definition" "notebook schedule definition"
26+
replace_string "Job definition name" "Schedule definition name"
27+
replace_string "Job Detail\"" "Schedule Detail\""
28+
replace_string "Job ID\"" "Schedule ID\""
29+
replace_string "Your job definition" "Your schedule definition"
30+
replace_string "Your job" "Your schedule"
31+
replace_string "Job Definition\"" "Schedule Definition\""
32+
replace_string "Run Job\"" "Run Schedule\""
33+
replace_string "Creating job" "Creating schedule"
34+
replace_string "Reload Job\"" "Reload Schedule\""
35+
replace_string "Delete Job\"" "Delete Schedule\""
36+
replace_string "Download Job Files\"" "Download Schedule Files\""
37+
replace_string "No notebook jobs associated with this job definition" "No notebook schedules associated with this schedule definition"
38+
replace_string "Create Job from Schedule Definition\"" "Create Schedule from Schedule Definition\""
39+
replace_string "Job definition ID\"" "Schedule definition ID\""
40+
replace_string "Create a notebook job" "Create a notebook schedule"
41+
42+
echo "All replacements completed!"

0 commit comments

Comments
 (0)