Skip to content

Commit

Permalink
Feature/package (#620)
Browse files Browse the repository at this point in the history
* fix: fix #549

* feat: fix #533 and update package

---------

Co-authored-by: yanpengju <[email protected]>
  • Loading branch information
codding-y and yanpengju authored Jul 14, 2023
1 parent 9c9111f commit babab3e
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 36 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<MasaFrameworkPackageVersion>1.0.0-rc.4.2</MasaFrameworkPackageVersion>
<MasaFrameworkPackageVersion>1.0.0-rc.4.3</MasaFrameworkPackageVersion>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<PackageReference Include="Masa.Contrib.StackSdks.Middleware" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.StackSdks.Pm" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.StackSdks.Auth" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.StackSdks.Tsc" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.StackSdks.Tsc.OpenTelemetry" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.StackSdks.Config" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.Authentication.Identity" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.Caching.Distributed.StackExchangeRedis" Version="$(MasaFrameworkPackageVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<MExpansionPanels @bind-Values="_selectPanels" Multiple Flat>
@foreach (var configObject in _configObjects)
{
bool disablePanel = _userInfo.Account.ToLower() != "admin" && configObject.Encryption;
bool disablePanel = !MasaUser.IsSuperAdmin && configObject.Encryption;
bool showPublish = !_selectPanels.Contains(configObject.Id) && configObject.LatestRelease != null;
var formatLabelCode = configObject.FormatLabelCode.Trim().ToLower();
if (formatLabelCode == "json")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,7 @@ private List<ConfigObjectModel> GetCloneConfigObjects()
{
configs.RemoveAll(config => config.Encryption);
}
configs.RemoveAll(config => config.FromRelation);

return configs;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@
<p style="font-size:14px; font-weight:700; color:#1B2559">@T("Clusters requiring cloning")</p>
<MChipGroup Multiple Column Values="_selectEnvClusterIds" ValuesChanged="CloneEnvClusterValueChanged">
@foreach (var item in _cloneSelectApp.EnvironmentClusters)
{
<MChip Value="item.Id" Large Class="envClusterChip mr-6 mb-6 m-chip--envcluster" Filter Outlined Style=@($"border-color:{item.EnvironmentColor};color:{item.EnvironmentColor}")>
<div>@item.EnvironmentName</div>
<span class="split--text">&nbsp; | &nbsp;</span>
<div class="emphasis2--text">@item.ClusterName</div>
</MChip>
}
{
<MChip Value="item.Id" Large Class="envClusterChip mr-6 mb-6 m-chip--envcluster" Filter Outlined Style=@($"border-color:{item.EnvironmentColor};color:{item.EnvironmentColor}")>
<div>@item.EnvironmentName</div>
<span class="split--text">&nbsp; | &nbsp;</span>
<div class="emphasis2--text">@item.ClusterName</div>
</MChip>
}
</MChipGroup>
<p style="font-size:14px; font-weight:700; color:#1B2559">@T("Select config object")</p>

@if (ConfigObjects.Any())
@if (ConfigObjects.Any(c => !c.FromRelation || c.Encryption && !MasaUser.IsSuperAdmin))
{
<MCheckbox Value="CloneConfigObjectAllChecked"
ValueChanged="CloneConfigObjectAllCheckedChanged"
TValue="bool"
HideDetails="true"
Label="@(CloneConfigObjectAllChecked ? @T("Deselect all") : @T("Select all"))"
Color="primary"></MCheckbox>
ValueChanged="CloneConfigObjectAllCheckedChanged"
TValue="bool"
HideDetails="true"
Label="@(CloneConfigObjectAllChecked ? @T("Deselect all") : @T("Select all"))"
Color="primary"></MCheckbox>
}

<MExpansionPanels Flat Accordion>
Expand Down Expand Up @@ -288,11 +288,11 @@
@if (ConfigObjects.Any())
{
<MCheckbox Value="CloneConfigObjectAllChecked"
ValueChanged="CloneConfigObjectAllCheckedChanged"
TValue="bool"
HideDetails="true"
Label="@(CloneConfigObjectAllChecked ? @T("Deselect all") : @T("Select all"))"
Color="primary"></MCheckbox>
ValueChanged="CloneConfigObjectAllCheckedChanged"
TValue="bool"
HideDetails="true"
Label="@(CloneConfigObjectAllChecked ? @T("Deselect all") : @T("Select all"))"
Color="primary"></MCheckbox>
}

<MExpansionPanels Flat Accordion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Masa.Contrib.StackSdks.Config" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.StackSdks.Tsc" Version="$(MasaFrameworkPackageVersion)" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Masa.Dcc.Web.Admin.Rcl\Masa.Dcc.Web.Admin.Rcl.csproj" />
</ItemGroup>
Expand Down
10 changes: 0 additions & 10 deletions src/Web/Masa.Dcc.Web.Admin/Masa.Dcc.Web.Admin.Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@
Scopes = new List<string> { "offline_access" }
};

if (!builder.Environment.IsDevelopment())
{
builder.Services.AddObservable(builder.Logging, () => new MasaObservableOptions
{
ServiceNameSpace = builder.Environment.EnvironmentName,
ServiceVersion = masaStackConfig.Version,
ServiceName = masaStackConfig.GetWebId(MasaStackProject.DCC)
}, () => masaStackConfig.OtlpUrl, true);
}

string dccServiceAddress = masaStackConfig.GetDccServiceDomain();
#if DEBUG
dccServiceAddress = "http://localhost:6196";
Expand Down

0 comments on commit babab3e

Please sign in to comment.