mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-01-01 12:41:43 +08:00
File system -> File storage in error messages
This commit is contained in:
parent
1028bafd0d
commit
946c20e168
9 changed files with 10 additions and 10 deletions
|
@ -240,7 +240,7 @@ defimpl Livebook.FileSystem, for: Livebook.FileSystem.Local do
|
|||
if node(file_system.origin_pid) == node() do
|
||||
:ok
|
||||
else
|
||||
{:error, "this local file system belongs to a different host"}
|
||||
{:error, "this disk belongs to a different host"}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ defmodule Livebook.FileSystem.S3 do
|
|||
|
||||
_config ->
|
||||
{:error,
|
||||
"S3 file system config is expected to have keys: :bucket_url, :access_key_id and :secret_access_key, but got #{inspect(config)}"}
|
||||
"S3 configuration is expected to have keys: :bucket_url, :access_key_id and :secret_access_key, but got #{inspect(config)}"}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -494,7 +494,7 @@ defmodule Livebook.LiveMarkdown.Import do
|
|||
file = Livebook.FileSystem.File.new(file_system, path)
|
||||
{:ok, %{type: :file, name: name, file: file}}
|
||||
else
|
||||
{:error, "skipping file #{name}, since it points to an unknown file system"}
|
||||
{:error, "skipping file #{name}, since it points to an unknown file storage"}
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -605,7 +605,7 @@ defmodule Livebook.LiveMarkdown.Import do
|
|||
defp take_stamp_data([{:stamp, data} | elements]), do: {data, elements}
|
||||
defp take_stamp_data(elements), do: {nil, elements}
|
||||
|
||||
@invalid_stamp_message "invalid notebook stamp, disabling default access to secrets and remote file systems "
|
||||
@invalid_stamp_message "invalid notebook stamp, disabling default access to secrets and remote files "
|
||||
@personal_stamp_context "(you are either not the author of this notebook or changed its source outside of Livebook)"
|
||||
@org_stamp_context "(this may happen if you made changes to the notebook source outside of Livebook)"
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ defmodule Livebook.Settings do
|
|||
defp storage_to_fs(%{type: "s3"} = config) do
|
||||
case FileSystem.S3.from_config(config) do
|
||||
{:ok, fs} -> fs
|
||||
{:error, message} -> raise ArgumentError, "invalid S3 file system: #{message}"
|
||||
{:error, message} -> raise ArgumentError, "invalid S3 configuration: #{message}"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -269,7 +269,7 @@ defmodule LivebookWeb.FileSelectComponent do
|
|||
<button
|
||||
type="button"
|
||||
class="button-base button-gray pl-3 pr-2"
|
||||
aria-label="switch file system"
|
||||
aria-label="switch file storage"
|
||||
disabled={@file_system_select_disabled}
|
||||
>
|
||||
<span><%= file_system_name(@file.file_system) %></span>
|
||||
|
|
|
@ -27,7 +27,7 @@ defmodule LivebookWeb.OpenLive.FileComponent do
|
|||
@impl true
|
||||
def render(assigns) do
|
||||
~H"""
|
||||
<div class="h-80" role="region" aria-label="file system">
|
||||
<div class="h-80" role="region" aria-label="file storage">
|
||||
<.live_component
|
||||
module={LivebookWeb.FileSelectComponent}
|
||||
id="home-file-select"
|
||||
|
|
|
@ -57,7 +57,7 @@ defmodule LivebookWeb.SessionLive.AddFileEntryFileComponent do
|
|||
<div :if={@error_message} class="mb-6 error-box">
|
||||
<%= @error_message %>
|
||||
</div>
|
||||
<div class="h-80" role="region" aria-label="file system">
|
||||
<div class="h-80" role="region" aria-label="file storage">
|
||||
<.live_component
|
||||
module={LivebookWeb.FileSelectComponent}
|
||||
id="add-file-entry-select"
|
||||
|
|
|
@ -209,7 +209,7 @@ defmodule LivebookWeb.SessionLive.FilesListComponent do
|
|||
[
|
||||
%{
|
||||
name: "delete_from_file_system",
|
||||
label: "Delete the corresponding file from the file system",
|
||||
label: "Delete the corresponding file from its storage",
|
||||
default: true,
|
||||
disabled: false
|
||||
}
|
||||
|
|
|
@ -1249,7 +1249,7 @@ defmodule Livebook.LiveMarkdown.ImportTest do
|
|||
|
||||
assert %Notebook{file_entries: []} = notebook
|
||||
|
||||
assert messages == ["skipping file document.pdf, since it points to an unknown file system"]
|
||||
assert messages == ["skipping file document.pdf, since it points to an unknown file storage"]
|
||||
end
|
||||
|
||||
test "imports :file file entries with quarantine when no stamp is given" do
|
||||
|
|
Loading…
Reference in a new issue