|
|
@@ -145,7 +145,16 @@ class Route_Storage_AclReinstall extends RouteBase {
|
|
|
|
|
|
Lib::loadClass('XML');
|
|
|
$xsdType = XML::getXsdTypeFromXsdSchema("{$antAclPath}/{$item['name']}.xsd", $namespace = $item['namespace'], $name = $item['name']);
|
|
|
+ DBG::nicePrint($item, '$item');
|
|
|
DBG::nicePrint($xsdType, '$xsdType');
|
|
|
+
|
|
|
+ echo '<hr>';
|
|
|
+ echo UI::h('h3', [], "Lista zmian:");
|
|
|
+
|
|
|
+ echo ($item['primaryKey'] != $xsdType['primaryKey'])
|
|
|
+ ? UI::h('p', [ 'style' => "" ], "@primaryKey - zmiana z '{$item['primaryKey']}' na '{$xsdType['primaryKey']}'")
|
|
|
+ : UI::h('p', [ 'style' => "font-style:italic; color:silver" ], "@primaryKey - bez zmian");
|
|
|
+
|
|
|
if (empty($xsdType['struct'])) throw new Exception("Field list not found for '{$item['namespace']}'");
|
|
|
foreach ($xsdType['struct'] as $fieldName => $x) {
|
|
|
$listEnum = [];
|
|
|
@@ -177,7 +186,7 @@ class Route_Storage_AclReinstall extends RouteBase {
|
|
|
return UI::h('li', [], $fieldName);
|
|
|
}, $diffFieldsToCreate)),
|
|
|
])
|
|
|
- : UI::h('p', [ 'style' => "font-style:italic" ], "Brak pól do dodania");
|
|
|
+ : UI::h('p', [ 'style' => "font-style:italic; color:silver" ], "Brak pól do dodania");
|
|
|
echo (!empty($diffFieldsToRemove))
|
|
|
? UI::h('details', [ 'open' => "open", 'style' => "margin:4px 0; color:#8a6d3b; background-color:#fcf8e3; border:1px solid #faebcc;" ], [
|
|
|
UI::h('summary', [ 'style' => "padding:4px; outline:none; cursor:pointer" ], "Pola do usunięcia (".count($diffFieldsToRemove)."):"),
|
|
|
@@ -185,7 +194,7 @@ class Route_Storage_AclReinstall extends RouteBase {
|
|
|
return UI::h('li', [], $fieldName);
|
|
|
}, $diffFieldsToRemove)),
|
|
|
])
|
|
|
- : UI::h('p', [ 'style' => "font-style:italic" ], "Brak pól do usunięcia");
|
|
|
+ : UI::h('p', [ 'style' => "font-style:italic; color:silver" ], "Brak pól do usunięcia");
|
|
|
foreach ($sameFields as $fieldName) {
|
|
|
// UI::alert('warning', "TODO: is field changed? '{$fieldName}'");
|
|
|
$oldField = array_filter($item['field'], function ($field) use ($fieldName) { return ( $fieldName === $field['fieldNamespace'] ); });
|
|
|
@@ -201,10 +210,8 @@ class Route_Storage_AclReinstall extends RouteBase {
|
|
|
if (json_encode($newField['appInfo']) !== $oldField['appInfo']) $fieldDiff[] = 'appInfo';
|
|
|
echo (!empty($fieldDiff))
|
|
|
? UI::h('p', [ 'style' => "" ], "Pole '{$fieldName}' - zmiany: " . implode(", ", $fieldDiff))
|
|
|
- : UI::h('p', [ 'style' => "font-style:italic" ], "Pole '{$fieldName}' - bez zmian");
|
|
|
+ : UI::h('p', [ 'style' => "font-style:italic; color:silver" ], "Pole '{$fieldName}' - bez zmian");
|
|
|
}
|
|
|
-
|
|
|
- throw new Exception("TODO: Podgląd zmian dla AntAcl {$item['namespace']} ...");
|
|
|
}
|
|
|
public function printReinstallTableAclPreview($item) {
|
|
|
throw new Exception("TODO: Podgląd zmian dla tabeli {$item['namespace']} ...");
|